@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #080808;
  --panel: #101010;
  --panel-raised: #151515;
  --line: #252525;
  --line-strong: #343434;
  --text: #f3f1eb;
  --muted: #8c8a85;
  --quiet: #5f5e5a;
  --green: #b8e986;
  --green-dark: #162014;
  --amber: #e8c878;
  --red: #f18c84;
  --font: 'Manrope', sans-serif;
  --mono: 'DM Mono', monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
::selection { background: rgba(184, 233, 134, .22); }

.boot-screen { min-height: 100vh; display: grid; place-items: center; }
.logo-mark { width: 52px; height: 30px; display: inline-grid; place-items: center; flex: 0 0 auto; overflow: hidden; }
.logo-mark img { width: 100%; height: 100%; display: block; object-fit: cover; filter: contrast(1.04); }
.boot-screen .logo-mark { width: 86px; height: 41px; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .42; transform: scale(.96); } }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, 1fr) minmax(420px, 560px); background: radial-gradient(circle at 18% 20%, #171b14 0, transparent 31%), var(--bg); }
.auth-story { padding: clamp(42px, 7vw, 96px); display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; }
.auth-logo, .sidebar-logo { display: flex; align-items: center; gap: 13px; font-size: 14px; font-weight: 700; letter-spacing: -.02em; }
.auth-logo .logo-mark, .sidebar-logo .logo-mark { animation: none; }
.auth-copy { max-width: 720px; }
.eyebrow { margin: 0 0 17px; color: var(--green); font: 500 10px/1.2 var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.auth-copy h1 { max-width: 760px; margin: 0; font-size: clamp(48px, 7vw, 96px); line-height: .94; letter-spacing: -.07em; }
.auth-copy p { max-width: 560px; margin: 26px 0 0; color: var(--muted); font-size: clamp(15px, 1.5vw, 18px); line-height: 1.7; }
.auth-foot { color: var(--quiet); font: 400 10px/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.auth-panel { min-height: 100vh; padding: clamp(24px, 5vw, 70px); display: flex; align-items: center; background: rgba(13, 13, 13, .94); border-left: 1px solid var(--line); }
.auth-card { width: 100%; }
.auth-card h2 { margin: 0 0 9px; font-size: 32px; letter-spacing: -.045em; }
.auth-subtitle { margin: 0 0 31px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.auth-tabs { display: flex; padding: 4px; margin-bottom: 30px; border: 1px solid var(--line); border-radius: 13px; background: #090909; }
.auth-tab { flex: 1; min-height: 42px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 600; }
.auth-tab.active { background: var(--panel-raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.field { display: grid; gap: 9px; margin: 0 0 18px; }
.field label, .form-label { color: var(--muted); font: 500 10px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
input { width: 100%; height: 52px; border: 1px solid var(--line); border-radius: 12px; outline: 0; padding: 0 15px; background: #0b0b0b; color: var(--text); transition: border-color .18s, box-shadow .18s; }
input:focus { border-color: #575757; box-shadow: 0 0 0 3px rgba(255,255,255,.05); }
.primary-button, .secondary-button, .ghost-button, .icon-button { border: 0; cursor: pointer; transition: transform .15s, border-color .15s, background .15s, opacity .15s; }
.primary-button:active, .secondary-button:active, .ghost-button:active, .icon-button:active { transform: scale(.98); }
.primary-button { min-height: 50px; padding: 0 20px; border-radius: 12px; background: var(--text); color: #080808; font-weight: 700; }
.primary-button:hover { background: #fff; }
.primary-button:disabled, .secondary-button:disabled { opacity: .45; cursor: not-allowed; }
.auth-submit { width: 100%; margin-top: 7px; }
.form-error { min-height: 20px; margin: 12px 0 0; color: var(--red); font-size: 12px; line-height: 1.5; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 228px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 27px 18px 22px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #0b0b0b; }
.sidebar-logo { padding: 0 8px 34px; }
.sidebar-nav { display: grid; gap: 5px; }
.nav-item { min-height: 47px; padding: 0 13px; display: flex; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; font-size: 13px; font-weight: 600; }
.nav-item:hover { color: var(--text); background: #111; }
.nav-item.active { color: var(--text); background: var(--panel-raised); border-color: var(--line); }
.nav-glyph { width: 18px; color: var(--quiet); font: 500 12px/1 var(--mono); }
.nav-item.active .nav-glyph { color: var(--green); }
.native-sidebar-tools { margin-top: 18px; padding-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; border-top: 1px solid var(--line); }
.native-sidebar-tools button { min-width: 0; height: 52px; padding: 0; display: grid; place-items: center; align-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: #0e0e0e; font-size: 9px; font-weight: 700; cursor: pointer; }
.native-sidebar-tools button:hover { color: var(--text); border-color: var(--line-strong); background: #131313; }
.native-sidebar-tools span { color: var(--green); font: 500 9px/1 var(--mono); }
.account-mini { margin-top: auto; padding: 17px 10px 0; border-top: 1px solid var(--line); }
.account-mini strong, .account-mini span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-mini strong { margin-bottom: 5px; font-size: 12px; }
.account-mini span { color: var(--quiet); font: 400 10px/1.4 var(--mono); }

.main { min-width: 0; }
.topbar { height: 76px; padding: 0 clamp(24px, 4vw, 60px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.topbar-date { color: var(--muted); font: 400 11px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.sync-pill { display: flex; align-items: center; gap: 8px; color: var(--quiet); font: 400 10px/1 var(--mono); }
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--quiet); }
.sync-pill.synced .sync-dot { background: var(--green); box-shadow: 0 0 10px rgba(184,233,134,.35); }
.content { width: min(1320px, 100%); margin: 0 auto; padding: clamp(32px, 5vw, 70px) clamp(22px, 5vw, 64px) 100px; }
.page-enter { animation: reveal .35s cubic-bezier(.2,.8,.2,1) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }
.page-heading { margin-bottom: 38px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.page-heading h1 { margin: 0; font-size: clamp(40px, 6vw, 72px); line-height: .95; letter-spacing: -.065em; }
.page-heading p { max-width: 460px; margin: 15px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.date-chip { flex: 0 0 auto; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font: 400 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.section-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(290px, .7fr); gap: 18px; align-items: start; }
.card { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); overflow: hidden; }
.card-head { min-height: 70px; padding: 19px 21px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; font-size: 15px; letter-spacing: -.02em; }
.card-head p { margin: 5px 0 0; color: var(--quiet); font-size: 11px; }
.progress-number { color: var(--green); font: 500 11px/1 var(--mono); }
.progress-track { height: 2px; background: #1c1c1c; }
.progress-fill { height: 100%; background: var(--green); transition: width .35s ease; }
.task-list { padding: 5px 0; }
.task-row { min-height: 67px; padding: 10px 14px 10px 20px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid #1c1c1c; }
.task-row:last-child { border-bottom: 0; }
.check { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #414141; border-radius: 7px; background: transparent; cursor: pointer; }
.check::after { content: ''; width: 8px; height: 4px; border: solid #0a0a0a; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px,-1px); opacity: 0; }
.check.checked { border-color: var(--green); background: var(--green); }
.check.checked::after { opacity: 1; }
.task-title { min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.45; }
.task-row.done .task-title { color: var(--quiet); text-decoration: line-through; }
.row-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.task-row:hover .row-actions, .timeblock:hover .row-actions { opacity: 1; }
.icon-button { width: 32px; height: 32px; border-radius: 9px; background: transparent; color: var(--quiet); font: 500 10px/1 var(--mono); }
.icon-button:hover { background: #1c1c1c; color: var(--text); }
.inline-form { padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; border-top: 1px solid var(--line); }
.inline-form input { height: 46px; }
.inline-form .primary-button { min-height: 46px; }
.empty-state { padding: 35px 22px; color: var(--quiet); font-size: 12px; line-height: 1.6; text-align: center; }
.card-link-row { padding: 14px; border-top: 1px solid var(--line); }
.card-link-row .ghost-button { width: 100%; }

.foundation-stage { min-height: 310px; margin-bottom: 18px; padding: 28px clamp(12px, 4vw, 42px) 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2vw, 22px); align-items: end; border: 1px solid var(--line); border-radius: 20px; background: radial-gradient(circle at 50% 120%, rgba(255,255,255,.08), transparent 54%), #0b0b0b; overflow: hidden; }
.foundation-pedestal { position: relative; min-height: 186px; padding: 21px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid #4b4b4b; border-bottom: 0; border-radius: 14px 14px 0 0; background: linear-gradient(180deg, #121212, #0c0c0c); color: var(--muted); cursor: pointer; text-align: left; transition: border-color .2s, background .2s, transform .2s, box-shadow .25s; }
.foundation-pedestal:nth-child(2) { min-height: 220px; }
.foundation-pedestal:nth-child(3) { min-height: 254px; }
.foundation-pedestal:hover { border-color: #737373; transform: translateY(-3px); }
.foundation-pedestal.selected { border-color: #e6e4dd; color: var(--text); background: linear-gradient(180deg, #191919, #0e0e0e); box-shadow: 0 -16px 50px rgba(255,255,255,.045); }
.foundation-pedestal.complete { border-color: #f1efe8; box-shadow: 0 -12px 48px rgba(255,255,255,.1), inset 0 1px rgba(255,255,255,.08); }
.foundation-pedestal.locked { opacity: .34; filter: saturate(0); }
.pedestal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pedestal-number, .pedestal-state { font: 500 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.pedestal-state { color: var(--quiet); }
.foundation-pedestal strong { max-width: 220px; font-size: clamp(16px, 2vw, 23px); line-height: 1.08; letter-spacing: -.04em; }
.pedestal-lights { display: flex; gap: 8px; }
.pedestal-lights i { width: 8px; height: 8px; border: 1px solid #555; border-radius: 50%; background: #171717; }
.pedestal-lights i.on { border-color: var(--text); background: var(--text); box-shadow: 0 0 15px rgba(255,255,255,.78); }
.foundation-detail-grid { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(420px, 1.2fr); gap: 18px; align-items: start; }
.level-kicker { margin: 0 0 7px !important; color: var(--quiet) !important; font: 500 9px/1 var(--mono) !important; letter-spacing: .14em; text-transform: uppercase; }
.foundation-editor { position: relative; }
.foundation-editor-list, .foundation-today-list { padding: 8px; display: grid; gap: 7px; }
.foundation-item { min-height: 70px; padding: 10px 12px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid #262626; border-radius: 12px; background: #0b0b0b; transition: color .2s, border-color .2s, background .2s, box-shadow .2s; }
.foundation-item.done { color: #080808; border-color: #f2f0e9; background: #f2f0e9; box-shadow: 0 0 30px rgba(255,255,255,.09); }
.foundation-item.unset { border-style: dashed; color: var(--quiet); }
.foundation-check { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: 1px solid #515151; border-radius: 50%; background: #111; cursor: pointer; }
.foundation-check span { width: 9px; height: 5px; border: solid #0a0a0a; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px,-1px); opacity: 0; }
.foundation-item.done .foundation-check { border-color: #0a0a0a; background: #f2f0e9; }
.foundation-item.done .foundation-check span { opacity: 1; }
.foundation-check:disabled { cursor: not-allowed; opacity: .35; }
.foundation-item-copy { min-width: 0; font-size: 13px; font-weight: 650; line-height: 1.4; }
.foundation-edit { min-height: 30px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: var(--quiet); cursor: pointer; font: 500 9px/1 var(--mono); text-transform: uppercase; }
.foundation-edit:hover { color: var(--text); background: #1d1d1d; }
.foundation-item.done .foundation-edit { color: #555; }
.lock-label { color: var(--quiet); font: 500 9px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.foundation-lock { padding: 17px; border-top: 1px solid var(--line); color: var(--quiet); font: 500 9px/1 var(--mono); text-align: center; letter-spacing: .1em; text-transform: uppercase; }
.foundation-calendar { padding: 20px; }
.foundation-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; }
.foundation-calendar-day { min-width: 0; aspect-ratio: 1.05; padding: 8px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid #232323; border-radius: 10px; background: #0b0b0b; color: var(--muted); }
.foundation-calendar-day b { font: 400 9px/1 var(--mono); }
.foundation-calendar-day > span { display: flex; gap: 3px; }
.foundation-calendar-day i { width: 4px; height: 4px; border-radius: 50%; background: #303030; }
.foundation-calendar-day i.on { background: var(--text); box-shadow: 0 0 6px rgba(255,255,255,.55); }
.foundation-calendar-day.complete { border-color: #6f6f6f; background: #161616; }
.foundation-calendar-day.today { box-shadow: inset 0 0 0 1px var(--text); color: var(--text); }
.foundation-calendar-day.out, .foundation-calendar-day.future { opacity: .26; }

.timeblock-list { padding: 13px; display: grid; gap: 8px; }
.timeblock { position: relative; min-height: 78px; padding: 14px 12px 14px 18px; display: grid; grid-template-columns: 5px minmax(0,1fr) auto; gap: 13px; align-items: center; border: 1px solid #222; border-radius: 13px; background: #0b0b0b; }
.timeblock-accent { align-self: stretch; border-radius: 5px; background: var(--amber); }
.timeblock-time { margin-bottom: 7px; color: var(--muted); font: 500 10px/1 var(--mono); }
.timeblock-title { font-size: 13px; font-weight: 700; line-height: 1.35; }
.timeblock.done { opacity: .48; }
.block-form { padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) 105px 105px auto; gap: 8px; border-top: 1px solid var(--line); }
.block-form input { height: 46px; }
.block-form .primary-button { min-height: 46px; }
.day-rule { margin: 18px 0; border: 0; border-top: 1px solid var(--line); }

.tracker-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 18px; align-items: start; }
.tracker-sidebar { padding: 13px; }
.tracker-choice { width: 100%; padding: 15px 13px; display: block; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.tracker-choice + .tracker-choice { margin-top: 3px; }
.tracker-choice strong { display: block; margin-bottom: 5px; color: inherit; font-size: 12px; }
.tracker-choice span { color: var(--quiet); font: 400 9px/1 var(--mono); text-transform: uppercase; }
.tracker-choice.active { border-color: var(--line); background: var(--panel-raised); color: var(--text); }
.tracker-add { padding: 13px 0 0; margin-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.tracker-add input { height: 44px; }
.tracker-add .primary-button { min-height: 44px; }
.tracker-main { min-width: 0; }
.tracker-summary { padding: 23px; display: grid; grid-template-columns: minmax(0, 1fr) repeat(2, 110px); gap: 18px; align-items: end; }
.tracker-summary h2 { margin: 0 0 8px; font-size: 25px; letter-spacing: -.04em; }
.tracker-summary p { margin: 0; color: var(--muted); font-size: 12px; }
.metric { padding-left: 17px; border-left: 1px solid var(--line); }
.metric strong, .metric span { display: block; }
.metric strong { margin-bottom: 7px; font: 500 24px/1 var(--mono); }
.metric span { color: var(--quiet); font: 400 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.calendar-card { margin-top: 18px; padding: 20px; }
.calendar-head { margin-bottom: 19px; display: flex; align-items: center; justify-content: space-between; }
.calendar-head strong { font-size: 13px; }
.calendar-controls { display: flex; gap: 6px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.weekday { padding: 4px 0 9px; color: var(--quiet); font: 400 9px/1 var(--mono); text-align: center; text-transform: uppercase; }
.calendar-day { aspect-ratio: 1; min-width: 0; display: grid; place-items: center; border: 1px solid transparent; border-radius: 9px; color: var(--muted); font: 400 10px/1 var(--mono); }
.calendar-day.out { color: #353535; }
.calendar-day.complete { background: var(--green-dark); border-color: #273d21; color: var(--green); }
.calendar-day.missed { color: #8f504b; }
.calendar-day.today { border-color: #777; color: var(--text); }
.run-card { margin-top: 18px; }
.run-list { padding: 7px 21px 21px; }
.run-row { position: relative; min-height: 72px; padding: 15px 0 15px 43px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; align-items: center; border-bottom: 1px solid #1c1c1c; }
.run-row:last-child { border-bottom: 0; }
.run-row::before { content: ''; position: absolute; left: 11px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.run-row:first-child::before { top: 50%; }
.run-row:last-child::before { bottom: 50%; }
.run-dot { position: absolute; left: 5px; top: 50%; width: 13px; height: 13px; transform: translateY(-50%); border: 2px solid var(--panel); border-radius: 50%; background: #444; box-shadow: 0 0 0 1px var(--line-strong); }
.run-row.complete .run-dot { background: var(--green); }
.run-copy strong, .run-copy span { display: block; }
.run-copy strong { margin-bottom: 5px; font-size: 13px; }
.run-copy span { color: var(--quiet); font: 400 9px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.tracker-actions { display: flex; gap: 6px; }

.notes-heading { align-items: flex-end; }
.notes-heading .primary-button { min-width: 116px; }
.notes-shell { min-height: 710px; display: grid; grid-template-columns: 190px 290px minmax(390px, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: #0b0b0b; box-shadow: 0 28px 90px rgba(0,0,0,.25); }
.notes-folders, .notes-list-panel, .notes-editor { min-width: 0; }
.notes-folders { padding: 15px 10px; border-right: 1px solid var(--line); background: #0d0d0d; }
.notes-pane-title { height: 42px; padding: 0 8px 9px; display: flex; align-items: center; justify-content: space-between; color: var(--quiet); font: 500 9px/1 var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.notes-pane-title button { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 8px; background: #111; color: var(--muted); cursor: pointer; font-size: 16px; }
.folder-row { display: grid; grid-template-columns: minmax(0,1fr) 25px; align-items: center; gap: 1px; }
.note-folder { width: 100%; min-height: 39px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 9px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; font-size: 11px; }
.note-folder span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-folder b { color: var(--quiet); font: 400 9px/1 var(--mono); }
.note-folder:hover { color: var(--text); background: #141414; }
.note-folder.active { border-color: #2a2a2a; background: #191919; color: var(--text); }
.folder-menu { width: 25px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: #4f4f4f; cursor: pointer; font: 500 10px/1 var(--mono); }
.folder-row:hover .folder-menu { color: var(--muted); }
.folder-menu:hover { background: #1b1b1b; color: var(--text) !important; }
.folder-rule { margin: 10px 8px; border-top: 1px solid var(--line); }
.notes-list-panel { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #101010; }
.notes-list-head { min-height: 112px; padding: 17px 14px 13px; border-bottom: 1px solid var(--line); }
.notes-list-head > div { margin: 0 2px 13px; display: flex; align-items: center; justify-content: space-between; }
.notes-list-head > div span { font-size: 13px; font-weight: 700; }
.notes-list-head > div b { color: var(--quiet); font: 400 9px/1 var(--mono); }
.notes-search { height: 38px; display: flex; gap: 5px; }
.notes-search input { flex: 1; width: auto; height: 38px; min-width: 0; padding: 0 11px; border-radius: 9px; font-size: 11px; }
.notes-search button { min-width: 45px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: #171717; color: var(--muted); cursor: pointer; font: 500 8px/1 var(--mono); text-transform: uppercase; }
.notes-list { flex: 1; min-height: 0; padding: 7px; overflow-y: auto; }
.note-choice { width: 100%; min-height: 102px; padding: 14px 13px; display: block; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.note-choice + .note-choice { margin-top: 3px; }
.note-choice:hover { background: #151515; }
.note-choice.active { border-color: #303030; background: #1a1a1a; color: var(--text); box-shadow: 0 12px 32px rgba(0,0,0,.2); }
.note-choice-top { margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.note-choice-top strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.note-choice-top i { color: var(--green); font: 500 7px/1 var(--mono); font-style: normal; letter-spacing: .08em; }
.note-choice-heading { display: block; margin-bottom: 9px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.note-choice-meta { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 8px; color: var(--quiet); font-size: 9px; }
.note-choice-meta time { font-family: var(--mono); }
.note-choice-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notes-list-empty { min-height: 280px; padding: 24px; display: grid; place-content: center; gap: 7px; color: var(--quiet); text-align: center; }
.notes-list-empty strong { color: var(--muted); font-size: 12px; }
.notes-list-empty span { font-size: 10px; }
.notes-editor { min-height: 710px; display: flex; flex-direction: column; background: #121212; }
.note-editor-toolbar { min-height: 58px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: #0f0f0f; }
.note-format-tools, .note-document-actions { display: flex; align-items: center; gap: 5px; }
.note-format-tools button { height: 32px; min-width: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #151515; color: var(--muted); cursor: pointer; font: 500 9px/1 var(--mono); }
.note-format-tools button:hover { border-color: #454545; color: var(--text); }
.note-document-actions select { max-width: 130px; height: 32px; padding: 0 25px 0 9px; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: #151515; color: var(--muted); font-size: 9px; }
.note-pin-button.active { color: var(--green); background: var(--green-dark); }
.note-paper { flex: 1; width: min(760px, 100%); margin: 0 auto; padding: clamp(35px, 6vw, 68px) clamp(28px, 6vw, 66px) 45px; display: flex; flex-direction: column; }
.note-title-input, .note-heading-input { width: 100%; height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.note-title-input:focus, .note-heading-input:focus { border: 0; box-shadow: none; }
.note-title-input { min-height: 2.08em; margin-bottom: 18px; resize: none; overflow: hidden; color: var(--text); font-size: clamp(30px, 3.5vw, 48px); font-weight: 700; line-height: 1.04; letter-spacing: -.06em; }
.note-heading-input { margin-bottom: 25px; padding-bottom: 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 17px; font-weight: 600; letter-spacing: -.025em; }
.note-heading-input:focus { border-bottom: 1px solid #444; }
.note-body-input { flex: 1; width: 100%; min-height: 460px; padding: 0 0 28px; resize: vertical; border: 0; outline: 0; background: transparent; color: #d7d5cf; font-size: 14px; line-height: 1.85; caret-color: var(--green); }
.note-body-input::placeholder, .note-title-input::placeholder, .note-heading-input::placeholder { color: #4f4e4a; }
.note-editor-status { min-height: 39px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: var(--quiet); font: 400 8px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.note-editor-empty { display: grid; place-items: center; padding: 45px; color: var(--muted); text-align: center; }
.note-editor-empty > div { max-width: 300px; }
.empty-document-mark { width: 58px; height: 58px; margin: 0 auto 20px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 17px; color: var(--quiet); font: 500 11px/1 var(--mono); }
.note-editor-empty h2 { margin: 0 0 9px; color: var(--text); font-size: 23px; letter-spacing: -.04em; }
.note-editor-empty p { margin: 0 0 22px; font-size: 12px; line-height: 1.6; }

.focus-hero { min-height: 520px; padding: clamp(32px, 6vw, 70px); display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(circle at 78% 25%, #20281b 0, transparent 31%), var(--panel); }
.focus-orbit { width: 120px; height: 120px; position: relative; display: grid; place-items: center; }
.focus-ring { position: absolute; border: 1px solid var(--line-strong); border-radius: 50%; }
.focus-ring:nth-child(1) { width: 120px; height: 120px; }
.focus-ring:nth-child(2) { width: 76px; height: 76px; }
.focus-ring:nth-child(3) { width: 36px; height: 36px; }
.focus-ring:nth-child(1) { border-top-color: var(--text); animation: focus-orbit 22s linear infinite; }
.focus-ring:nth-child(2) { border-bottom-color: #777; animation: focus-orbit 16s linear infinite reverse; }
.focus-core { width: 7px; height: 7px; border-radius: 50%; background: var(--text); box-shadow: 0 0 16px rgba(255,255,255,.4); animation: focus-breathe 4s ease-in-out infinite; }
@keyframes focus-orbit { to { transform: rotate(360deg); } }
@keyframes focus-breathe { 50% { transform: scale(1.45); box-shadow: 0 0 24px rgba(255,255,255,.6); } }
.focus-copy { max-width: 680px; }
.focus-copy h2 { margin: 0; font-size: clamp(44px, 7vw, 88px); line-height: .94; letter-spacing: -.07em; }
.focus-copy p { max-width: 560px; margin: 21px 0 28px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.focus-button { display: inline-flex; min-height: 55px; align-items: center; gap: 20px; padding: 0 23px; text-decoration: none; }
.focus-page-heading { align-items: flex-end; }
.focus-launch { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.focus-command-bar { min-height: 108px; margin-bottom: 14px; display: grid; grid-template-columns: minmax(0,1fr) 130px 130px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #0d0d0d; }
.focus-linked-plan { padding: 21px 23px; display: flex; flex-direction: column; justify-content: center; }
.focus-linked-plan span, .focus-metric span, .focus-history-head { color: var(--quiet); font: 500 8px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.focus-linked-plan strong { margin: 8px 0 6px; font-size: 16px; letter-spacing: -.025em; }
.focus-linked-plan small { color: var(--muted); font-size: 10px; }
.focus-metric { padding: 20px; display: flex; flex-direction: column; justify-content: center; border-left: 1px solid var(--line); }
.focus-metric strong { margin-bottom: 10px; color: var(--green); font: 500 28px/1 var(--mono); }
.focus-workspace { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) 250px; gap: 14px; align-items: start; }
.focus-room { height: min(860px, calc(100vh - 150px)); min-height: 720px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #080808; }
.focus-room iframe { width: 100%; height: 100%; display: block; border: 0; background: #080808; }
.focus-history { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.focus-history-head { min-height: 57px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.focus-history-head b { color: var(--muted); font-weight: 500; }
.focus-history-row { min-height: 69px; padding: 13px 15px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 10px; border-bottom: 1px solid #1c1c1c; }
.focus-history-row:last-child { border-bottom: 0; }
.focus-history-row span { min-width: 0; overflow: hidden; color: var(--text); font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.focus-history-row small { grid-column: 1; color: var(--quiet); font: 400 8px/1 var(--mono); }
.focus-history-row strong { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--green); font: 500 11px/1 var(--mono); }
.focus-history-empty { padding: 35px 18px; color: var(--quiet); font-size: 11px; line-height: 1.6; text-align: center; }

.settings-stack { display: grid; gap: 18px; }
.settings-row { min-height: 83px; padding: 18px 21px; display: flex; align-items: center; justify-content: space-between; gap: 22px; border-bottom: 1px solid var(--line); }
.settings-row:last-child { border-bottom: 0; }
.settings-row h3 { margin: 0 0 6px; font-size: 13px; }
.settings-row p { margin: 0; color: var(--quiet); font-size: 11px; line-height: 1.5; }
.secondary-button, .ghost-button { min-height: 42px; padding: 0 15px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.secondary-button { border: 1px solid var(--line-strong); background: #171717; }
.secondary-button:hover { border-color: #555; }
.ghost-button { border: 1px solid var(--line); background: transparent; color: var(--muted); }
.danger { color: var(--red); }
.device-state { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 400 10px/1 var(--mono); }
.device-state .sync-dot.online { background: var(--green); }
.device-state.locked { color: var(--text); }
.device-state .sync-dot.locked { background: var(--amber); box-shadow: 0 0 12px rgba(232,200,120,.48); }
.settings-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.pin-settings-form { padding: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; border-top: 1px solid var(--line); }
.pin-settings-form label { display: grid; gap: 8px; color: var(--muted); font: 500 9px/1.2 var(--mono); letter-spacing: .11em; text-transform: uppercase; }
.pin-settings-form input { height: 46px; font: 500 15px/1 var(--mono); letter-spacing: .18em; }
.pin-settings-form .secondary-button { min-height: 46px; }
.pin-settings-error { grid-column: 1 / -1; min-height: 16px; margin: 0; color: var(--red); font-size: 11px; }
.pin-settings-note { padding: 18px 21px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.6; }

.pin-lock-screen { min-height: 100vh; padding: clamp(18px, 4vw, 52px); display: grid; place-items: center; overflow-y: auto; background: radial-gradient(circle at 18% 16%, #1b2017 0, transparent 30%), radial-gradient(circle at 82% 88%, #181818 0, transparent 34%), #060606; }
.pin-lock-card { width: min(1020px, 100%); min-height: min(720px, calc(100vh - 60px)); display: grid; grid-template-columns: minmax(420px, 1.15fr) minmax(280px, .75fr); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 30px; background: rgba(12,12,12,.97); box-shadow: 0 40px 140px rgba(0,0,0,.7); }
.pin-lock-main { padding: clamp(30px, 6vw, 68px); display: flex; flex-direction: column; }
.pin-lock-brand { display: flex; align-items: center; gap: 13px; font-size: 14px; font-weight: 700; }
.pin-lock-copy { margin: auto 0 28px; }
.pin-lock-copy h1 { margin: 0; font-size: clamp(50px, 7vw, 82px); line-height: .92; letter-spacing: -.07em; }
.pin-lock-copy > p:last-child { max-width: 480px; margin: 20px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.pin-dots { height: 34px; display: flex; align-items: center; justify-content: center; gap: 17px; }
.pin-dots span { width: 12px; height: 12px; border: 1px solid #5d5d5d; border-radius: 50%; background: #151515; transition: background .16s, box-shadow .16s, transform .16s; }
.pin-dots span.filled { border-color: var(--text); background: var(--text); box-shadow: 0 0 15px rgba(255,255,255,.38); transform: scale(1.08); }
.pin-lock-error { min-height: 18px; margin: 7px 0 13px; color: var(--red); font-size: 11px; text-align: center; }
.pin-keypad { width: min(300px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.pin-keypad button { height: 54px; border: 1px solid var(--line); border-radius: 15px; background: #111; color: var(--text); cursor: pointer; font: 500 15px/1 var(--mono); transition: transform .13s, border-color .13s, background .13s; }
.pin-keypad button:hover { border-color: #505050; background: #181818; }
.pin-keypad button:active { transform: scale(.96); }
.pin-keypad .pin-key-quiet { color: var(--quiet); font-size: 9px; text-transform: uppercase; }
.pin-unlock-button { width: min(300px, 100%); margin: 14px auto 0; }
.pin-recovery-toggle { margin: 11px auto 0; border: 0; background: transparent; color: var(--quiet); cursor: pointer; font-size: 11px; }
.pin-recovery-toggle:hover { color: var(--text); }
.pin-recovery-form { width: min(420px, 100%); margin: 15px auto 0; padding: 15px; display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 15px; background: #0a0a0a; }
.pin-recovery-form label { color: var(--muted); font: 500 9px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.pin-recovery-form input { height: 46px; }
.pin-lock-aside { padding: clamp(30px, 5vw, 54px); display: flex; flex-direction: column; justify-content: flex-end; border-left: 1px solid var(--line); background: linear-gradient(160deg, rgba(255,255,255,.04), transparent 55%), #0a0a0a; }
.pin-lock-aside > span { margin-bottom: 23px; color: var(--quiet); font: 500 9px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.pin-lock-aside ol { margin: 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.pin-lock-aside li { min-height: 64px; padding: 13px 14px; display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 10px; border: 1px solid #202020; border-radius: 13px; color: var(--quiet); }
.pin-lock-aside li.active { border-color: #5b5b5b; background: #151515; color: var(--text); box-shadow: 0 16px 45px rgba(0,0,0,.24); }
.pin-lock-aside li b { font: 500 9px/1 var(--mono); }
.pin-lock-aside li strong { font-size: 12px; }
.pin-lock-aside > p { margin: 25px 0 0; color: var(--quiet); font-size: 11px; line-height: 1.6; }
.about-card { min-height: 180px; padding: 30px; display: flex; align-items: center; gap: 24px; background: radial-gradient(circle at 12% 50%, rgba(255,255,255,.055), transparent 30%), var(--panel); }
.about-mark .logo-mark { width: 112px; height: 54px; }
.about-card h2 { margin: 0 0 10px; font-size: 25px; letter-spacing: -.045em; }
.about-card p:last-child { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; max-width: 340px; padding: 13px 16px; border: 1px solid var(--line-strong); border-radius: 11px; background: #181818; color: var(--text); box-shadow: 0 14px 50px rgba(0,0,0,.45); font-size: 12px; animation: toast-in .25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 900px) {
  .auth-shell { display: block; }
  .auth-story { min-height: 45vh; padding: 38px 28px; }
  .auth-copy { margin: 70px 0 40px; }
  .auth-copy h1 { font-size: clamp(48px, 13vw, 80px); }
  .auth-foot { display: none; }
  .auth-panel { min-height: 55vh; border-left: 0; border-top: 1px solid var(--line); }
  .section-grid, .tracker-layout, .foundation-detail-grid { grid-template-columns: 1fr; }
  .tracker-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
  .tracker-choice + .tracker-choice { margin-top: 0; }
  .tracker-add { grid-column: 1 / -1; grid-template-columns: 1fr auto; }
  .pin-settings-form { grid-template-columns: 1fr 1fr; }
  .pin-settings-form .secondary-button { grid-column: 1 / -1; }
  .pin-lock-card { grid-template-columns: 1fr; }
  .pin-lock-aside { display: none; }
  .notes-shell { grid-template-columns: 1fr; overflow: visible; }
  .notes-folders { padding: 10px; display: flex; gap: 5px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .notes-pane-title { flex: 0 0 auto; width: 82px; padding: 0 5px; }
  .folder-row { flex: 0 0 auto; grid-template-columns: auto 25px; }
  .note-folder { width: auto; min-width: 110px; }
  .folder-rule { display: none; }
  .notes-list-panel { max-height: 340px; border-right: 0; border-bottom: 1px solid var(--line); }
  .notes-list { min-height: 220px; }
  .notes-editor { min-height: 640px; }
  .focus-workspace { grid-template-columns: 1fr; }
  .focus-history { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .focus-history-head { grid-column: 1 / -1; }
  .focus-history-row:nth-child(even) { border-left: 1px solid #1c1c1c; }
}

@media (max-width: 680px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 15; top: auto; bottom: 0; left: 0; right: 0; width: auto; height: calc(68px + env(safe-area-inset-bottom)); padding: 7px 8px env(safe-area-inset-bottom); display: block; border: 0; border-top: 1px solid var(--line); background: rgba(10,10,10,.94); backdrop-filter: blur(18px); }
  .sidebar-logo, .account-mini, .native-sidebar-tools { display: none; }
  .sidebar-nav { height: 60px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; }
  .nav-item { min-width: 0; min-height: 54px; padding: 6px 2px; overflow: hidden; flex-direction: column; justify-content: center; gap: 6px; border-radius: 10px; font-size: 8px; }
  .nav-item > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-glyph { width: auto; font-size: 10px; }
  .topbar { height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 19px 0; }
  .topbar-date { font-size: 9px; }
  .content { padding: 32px 16px calc(102px + env(safe-area-inset-bottom)); }
  .page-heading { margin-bottom: 28px; display: block; }
  .page-heading h1 { font-size: 48px; }
  .page-heading p { margin-top: 12px; }
  .date-chip { display: inline-block; margin-top: 18px; }
  .card { border-radius: 16px; }
  .row-actions { opacity: 1; }
  .block-form { grid-template-columns: 1fr 1fr; }
  .block-form input:first-child { grid-column: 1 / -1; }
  .block-form .primary-button { grid-column: 1 / -1; }
  .tracker-sidebar { grid-template-columns: 1fr; }
  .tracker-add { grid-column: auto; }
  .tracker-summary { grid-template-columns: 1fr 1fr; }
  .tracker-summary > div:first-child { grid-column: 1 / -1; }
  .tracker-summary .metric { padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .calendar-card { padding: 14px; }
  .calendar-grid { gap: 3px; }
  .foundation-stage { min-height: 218px; padding: 18px 7px 0; gap: 6px; border-radius: 16px; }
  .foundation-pedestal { min-height: 146px; padding: 12px 10px; border-radius: 10px 10px 0 0; }
  .foundation-pedestal:nth-child(2) { min-height: 166px; }
  .foundation-pedestal:nth-child(3) { min-height: 186px; }
  .foundation-pedestal strong { font-size: 13px; }
  .pedestal-state { display: none; }
  .pedestal-lights { gap: 5px; }
  .pedestal-lights i { width: 6px; height: 6px; }
  .foundation-calendar { padding: 12px; }
  .foundation-calendar-grid { gap: 3px; }
  .foundation-calendar-day { min-height: 48px; padding: 6px; border-radius: 7px; }
  .foundation-calendar-day i { width: 3px; height: 3px; }
  .about-card { align-items: flex-start; padding: 24px; }
  .about-mark .logo-mark { width: 88px; height: 42px; }
  .focus-hero { min-height: 560px; }
  .focus-launch { width: 100%; margin-top: 18px; justify-content: center; }
  .focus-command-bar { grid-template-columns: 1fr 1fr; }
  .focus-linked-plan { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .focus-metric { border-left: 0; }
  .focus-metric + .focus-metric { border-left: 1px solid var(--line); }
  .focus-room { height: 760px; min-height: 760px; margin: 0 -16px; border-left: 0; border-right: 0; border-radius: 0; }
  .focus-history { grid-template-columns: 1fr; }
  .focus-history-row:nth-child(even) { border-left: 0; }
  .settings-row { align-items: flex-start; flex-direction: column; }
  .settings-row .secondary-button, .settings-row .ghost-button { width: 100%; }
  .settings-row .settings-link { width: 100%; }
  .pin-settings-form { grid-template-columns: 1fr; }
  .pin-settings-form .secondary-button { grid-column: auto; }
  .pin-lock-screen { min-height: 100dvh; padding: 0; place-items: stretch; }
  .pin-lock-card { min-height: 100dvh; border: 0; border-radius: 0; }
  .pin-lock-main { min-height: 100dvh; padding: calc(28px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom)); }
  .pin-lock-copy { margin: auto 0 20px; }
  .pin-lock-copy h1 { font-size: 48px; }
  .pin-keypad button { height: 50px; }
  .notes-heading .primary-button { width: 100%; margin-top: 19px; }
  .notes-shell { margin: 0 -16px; border-left: 0; border-right: 0; border-radius: 0; }
  .notes-folders { padding-left: 14px; padding-right: 14px; }
  .notes-pane-title { width: 72px; }
  .notes-list-panel { max-height: 320px; }
  .note-editor-toolbar { align-items: flex-start; flex-direction: column; }
  .note-document-actions { width: 100%; }
  .note-document-actions select { flex: 1; max-width: none; }
  .note-paper { padding: 38px 23px 35px; }
  .note-title-input { font-size: 39px; }
  .note-heading-input { font-size: 15px; }
  .note-body-input { min-height: 430px; font-size: 15px; }
  .toast { left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
