:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-2: #111111;
  --card: #141414;
  --card-hover: #191919;
  --text: #ffffff;
  --text-secondary: #b3b3b3;
  --muted: #777777;
  --border: #292929;
  --border-strong: #414141;
  --primary-bg: #ffffff;
  --primary-text: #000000;
  --success: #a9c5a2;
  --warning: #d9bd80;
  --danger: #e3a09a;
  --focus-ring: #ffffff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 22px 70px rgba(0,0,0,.34);
  --sidebar-width: 238px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #f1f1ee;
  --card: #ffffff;
  --card-hover: #f4f4f0;
  --text: #151515;
  --text-secondary: #555555;
  --muted: #777777;
  --border: #deded9;
  --border-strong: #c4c4bd;
  --primary-bg: #111111;
  --primary-text: #ffffff;
  --success: #356c3b;
  --warning: #815b0b;
  --danger: #a3342c;
  --focus-ring: #151515;
  --shadow: 0 22px 70px rgba(0,0,0,.10);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
button:disabled { opacity: .45; cursor: not-allowed; }
::selection { background: var(--text); color: var(--bg); }
.skip-link { position: absolute; z-index: 100; left: 14px; top: -60px; padding: 10px 14px; background: var(--primary-bg); color: var(--primary-text); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.app-shell { min-height: 100vh; }
.sidebar { width: var(--sidebar-width); position: fixed; inset: 0 auto 0 0; z-index: 20; padding: 28px 16px 20px; display: flex; flex-direction: column; border-right: 1px solid var(--border); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px; margin-bottom: 53px; width: fit-content; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: var(--primary-bg); color: var(--primary-text); font-size: 21px; font-weight: 800; letter-spacing: -2px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: 20px; letter-spacing: -.9px; font-weight: 750; }
.brand-copy small { font-size: 8px; font-weight: 700; color: var(--muted); letter-spacing: 1.85px; margin-top: 5px; }
.sidebar-label, .eyebrow, .section-kicker { color: var(--muted); text-transform: uppercase; letter-spacing: 1.7px; font-size: 9px; font-weight: 750; }
.sidebar-label { padding: 0 12px; margin-bottom: 12px; }
.nav-list { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; border: 1px solid transparent; border-radius: 10px; padding: 0 12px; color: var(--text-secondary); transition: background .18s ease, color .18s ease, border-color .18s ease; font-weight: 500; }
.nav-link svg { flex: 0 0 18px; width: 18px; height: 18px; stroke: currentColor; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--card); color: var(--text); border-color: var(--border); }
.nav-link.active .nav-indicator { margin-left: auto; width: 5px; height: 5px; border-radius: 50%; background: var(--text); }
.sidebar-bottom { margin-top: auto; padding: 14px 10px 0; }
.sidebar-note { color: var(--text-secondary); display: flex; align-items: center; gap: 8px; font-size: 11px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.sidebar-bottom p { color: var(--muted); font-size: 10px; margin: 20px 0 0; letter-spacing: .15px; }
.sidebar-bottom p span { padding: 0 4px; }
.workspace { min-height: 100vh; margin-left: var(--sidebar-width); display: flex; flex-direction: column; }
.topbar { height: 70px; flex: 0 0 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--border); padding: 0 38px; background: var(--bg); }
.breadcrumbs { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1.35px; }
.breadcrumbs strong { font-size: 12px; letter-spacing: 0; color: var(--text); font-weight: 600; }
.crumb-divider { color: var(--border-strong); }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.today-chip { color: var(--text-secondary); font-size: 11px; }
.avatar { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; font-weight: 700; font-size: 11px; }
.icon-button { height: 34px; width: 34px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 9px; color: var(--text-secondary); background: transparent; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease; font-size: 19px; }
.icon-button:hover { background: var(--card); color: var(--text); border-color: var(--border-strong); }
.icon-button svg { width: 16px; height: 16px; stroke: currentColor; }
#main-content { width: 100%; flex: 1; padding: 38px clamp(22px, 4vw, 56px) 42px; max-width: 1600px; margin: 0 auto; }
.page { max-width: 1260px; margin: 0 auto; animation: enter .22s ease both; }
@keyframes enter { from { opacity: .65; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-heading h1 { margin: 5px 0 8px; font-size: clamp(29px, 3.1vw, 40px); line-height: 1.14; letter-spacing: -1.8px; font-weight: 650; }
.page-heading p { max-width: 620px; margin: 0; color: var(--text-secondary); font-size: 13px; }
.greeting-line { color: var(--text-secondary); font-size: 12px; letter-spacing: .2px; margin-bottom: 5px; }
.button { min-height: 39px; padding: 0 15px; border-radius: 9px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; font-size: 12px; font-weight: 650; transition: transform .16s ease, background .16s ease, border-color .16s ease; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }
.button svg { width: 15px; height: 15px; stroke: currentColor; }
.button-primary { color: var(--primary-text); background: var(--primary-bg); border-color: var(--primary-bg); }
.button-primary:hover { filter: brightness(.88); }
.button-secondary { color: var(--text); border-color: var(--border-strong); background: transparent; }
.button-secondary:hover { background: var(--card-hover); }
.button-danger { color: var(--danger); background: transparent; border-color: var(--border); }
.button-small { min-height: 31px; padding: 0 10px; font-size: 11px; }
.link-button { border: 0; padding: 2px 0; background: transparent; color: var(--text-secondary); cursor: pointer; font-size: 11px; }
.link-button:hover { color: var(--text); }
.grid { display: grid; gap: 15px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 19px; }
.card { min-width: 0; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.card-title { margin: 0; font-size: 13px; font-weight: 650; letter-spacing: -.15px; }
.card-subtitle { color: var(--muted); font-size: 10px; margin-top: 4px; }
.stat-card { min-height: 137px; padding: 18px 19px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-secondary); font-size: 11px; }
.stat-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--border); color: var(--text-secondary); }
.stat-icon svg { width: 15px; height: 15px; stroke: currentColor; }
.stat-value { margin-top: 17px; font-size: 30px; line-height: 1; font-weight: 600; letter-spacing: -1.3px; font-variant-numeric: tabular-nums; }
.stat-meta { margin-top: 9px; font-size: 10px; color: var(--muted); }
.stat-meta strong { color: var(--text-secondary); font-weight: 600; }
.progress-track { height: 4px; width: 100%; background: var(--surface-2); border-radius: 9px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--text); transition: width .3s ease; }
.progress-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.progress-row span { color: var(--text-secondary); font-size: 11px; }
.progress-row strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.overview-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .85fr); gap: 16px; margin-top: 16px; }
.task-list { display: grid; }
.task-row { display: grid; grid-template-columns: 18px minmax(0,1fr) auto; gap: 11px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--border); }
.task-row:last-child { border-bottom: 0; padding-bottom: 0; }
.task-row:first-child { padding-top: 0; }
.task-check { appearance: none; width: 17px; height: 17px; margin: 3px 0 0; border: 1px solid var(--border-strong); border-radius: 5px; background: transparent; cursor: pointer; display: grid; place-items: center; flex: 0 0 17px; }
.task-check:checked { background: var(--primary-bg); border-color: var(--primary-bg); }
.task-check:checked::after { content: "✓"; color: var(--primary-text); font-size: 12px; font-weight: 800; line-height: 1; }
.task-title { display: block; line-height: 1.45; overflow-wrap: anywhere; font-size: 12px; font-weight: 550; }
.task-title.done { text-decoration: line-through; color: var(--muted); }
.task-description { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; color: var(--muted); font-size: 10px; margin-top: 6px; }
.priority { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; color: var(--text-secondary); }
.priority::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.priority.high::before { background: var(--text); }
.priority.medium::before { background: #888888; }
.priority.low::before { background: #505050; }
.pill { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; border: 1px solid var(--border); border-radius: 6px; padding: 3px 7px; color: var(--text-secondary); font-size: 9px; line-height: 1.25; overflow-wrap: anywhere; }
.motivation-card { min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; background: var(--card); }
.quote-mark { color: var(--muted); font-family: Georgia, serif; font-size: 34px; line-height: .7; }
.motivation-text { margin: 14px 0 17px; max-width: 300px; font-size: 19px; line-height: 1.4; letter-spacing: -.5px; font-weight: 550; }
.motivation-foot { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: 1.4px; }
.habit-row { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); padding: 10px 0; }
.habit-row:last-child { border-bottom: 0; padding-bottom: 0; }
.habit-row:first-child { padding-top: 0; }
.habit-dot { appearance: none; width: 19px; height: 19px; flex: 0 0 19px; border: 1px solid var(--border-strong); border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; }
.habit-dot:checked { background: var(--primary-bg); border-color: var(--primary-bg); }
.habit-dot:checked::after { content: "✓"; color: var(--primary-text); font-size: 11px; font-weight: 800; }
.habit-name { font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
.habit-detail { color: var(--muted); font-size: 10px; margin-top: 2px; }
.habit-streak { margin-left: auto; color: var(--text-secondary); font-size: 10px; white-space: nowrap; }
.empty-state { padding: 25px 12px; text-align: center; color: var(--text-secondary); }
.empty-symbol { margin: 0 auto 12px; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 12px; display: grid; place-items: center; color: var(--muted); }
.empty-symbol svg { width: 18px; height: 18px; stroke: currentColor; }
.empty-state strong { display: block; color: var(--text); font-size: 12px; font-weight: 600; }
.empty-state p { margin: 5px auto 13px; max-width: 280px; color: var(--muted); font-size: 11px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 16px; }
.search-wrap { position: relative; min-width: 190px; flex: 1; max-width: 390px; }
.search-wrap svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); stroke: currentColor; pointer-events: none; }
.field, .select-field, .textarea-field { width: 100%; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 9px; min-height: 39px; padding: 9px 11px; outline: none; font-size: 12px; transition: border-color .16s ease, background .16s ease; }
.search-wrap .field { padding-left: 34px; }
.field::placeholder, .textarea-field::placeholder { color: var(--muted); }
.field:focus, .select-field:focus, .textarea-field:focus { border-color: var(--text-secondary); }
.select-field { min-width: 120px; cursor: pointer; }
.textarea-field { min-height: 85px; resize: vertical; }
.field-label { display: block; color: var(--text-secondary); font-size: 11px; margin-bottom: 6px; font-weight: 550; }
.field-hint { color: var(--muted); font-size: 10px; margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.form-field { min-width: 0; }
.form-span { grid-column: 1/-1; }
.filter-tabs { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); width: fit-content; max-width: 100%; overflow-x: auto; }
.filter-tab { border: 0; background: transparent; color: var(--muted); border-radius: 7px; padding: 7px 12px; white-space: nowrap; font-size: 11px; cursor: pointer; }
.filter-tab[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.tasks-panel { padding: 7px 19px; }
.task-full-row { display: grid; grid-template-columns: 19px minmax(0,1fr) auto; gap: 12px; align-items: start; padding: 15px 0; border-bottom: 1px solid var(--border); }
.task-full-row:last-child { border-bottom: 0; }
.row-actions { display: flex; align-items: center; gap: 5px; }
.mini-action { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; }
.mini-action:hover { color: var(--text); border-color: var(--border); background: var(--card); }
.mini-action svg { width: 14px; height: 14px; stroke: currentColor; }
.form-card { margin-bottom: 16px; }
.form-card h2 { font-size: 14px; margin: 0; }
.form-card .card-head { margin-bottom: 15px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.timer-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(270px,.75fr); gap: 16px; }
.timer-card { padding: 27px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.timer-modes { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.timer-mode { border: 0; border-radius: 7px; padding: 8px 13px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.timer-mode[aria-pressed="true"] { background: var(--primary-bg); color: var(--primary-text); }
.timer-face { width: min(100%, 310px); aspect-ratio: 1; display: grid; place-items: center; position: relative; margin: 22px auto 20px; }
.timer-face svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.timer-track { fill: none; stroke: var(--border); stroke-width: 2; }
.timer-arc { fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.timer-readout { position: relative; z-index: 1; font-size: clamp(50px,7vw,76px); font-weight: 550; letter-spacing: -4px; font-variant-numeric: tabular-nums; line-height: 1; }
.timer-caption { margin-top: 11px; text-transform: uppercase; font-size: 9px; letter-spacing: 1.8px; color: var(--muted); }
.timer-controls { display: flex; justify-content: center; align-items: center; gap: 9px; width: 100%; }
.timer-controls .button-primary { min-width: 130px; }
.timer-task-select { width: min(100%, 285px); margin: 20px auto 0; text-align: left; }
.timer-task-select .select-field { text-align: left; }
.timer-settings-inline { margin-top: 17px; color: var(--muted); font-size: 10px; }
.history-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.history-item:last-child { border-bottom: 0; }
.history-name { font-size: 11px; font-weight: 550; }
.history-date { color: var(--muted); font-size: 10px; margin-top: 3px; }
.history-value { font-variant-numeric: tabular-nums; font-size: 11px; color: var(--text-secondary); white-space: nowrap; }
.streak-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 6px; margin-top: 14px; }
.streak-day { min-width: 0; text-align: center; }
.streak-day-label { color: var(--muted); font-size: 9px; margin-bottom: 7px; }
.streak-day-box { width: 100%; aspect-ratio: 1; max-width: 33px; margin: auto; border: 1px solid var(--border); border-radius: 8px; display: grid; place-items: center; color: var(--muted); font-size: 10px; }
.streak-day-box.done { background: var(--primary-bg); color: var(--primary-text); border-color: var(--primary-bg); }
.streak-day-box.today { border-color: var(--text-secondary); }
.habit-list-card { padding: 7px 19px; }
.habit-full-row { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--border); }
.habit-full-row:last-child { border-bottom: 0; }
.habit-week-mini { display: flex; gap: 4px; align-items: center; }
.habit-week-mini span { display: block; width: 7px; height: 7px; border: 1px solid var(--border-strong); border-radius: 2px; }
.habit-week-mini span.done { background: var(--text); border-color: var(--text); }
.habit-row-side { display: grid; gap: 4px; justify-items: end; }
.analytics-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.analytics-number { font-size: 26px; letter-spacing: -1px; font-weight: 600; line-height: 1.1; margin-top: 10px; font-variant-numeric: tabular-nums; }
.analytics-label { color: var(--text-secondary); font-size: 11px; }
.chart { display: flex; align-items: stretch; gap: 12px; padding-top: 8px; min-height: 185px; }
.chart-column { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.chart-value { color: var(--text-secondary); font-size: 10px; font-variant-numeric: tabular-nums; }
.chart-bar-area { width: min(100%, 42px); flex: 1; min-height: 125px; display: flex; align-items: flex-end; background: var(--surface-2); border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.chart-bar { width: 100%; min-height: 2px; background: var(--text); border-radius: 5px 5px 0 0; transition: height .3s ease; }
.chart-label { color: var(--muted); font-size: 10px; }
.chart-legend { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; margin-top: 15px; }
.legend-dot { width: 6px; height: 6px; background: var(--text); border-radius: 2px; }
.metric-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 8px; font-size: 11px; }
.metric-line strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.calendar-toolbar { display: flex; align-items: center; gap: 8px; }
.calendar-date { font-size: 14px; font-weight: 650; min-width: 150px; text-align: center; }
.agenda-date-title { font-size: 17px; font-weight: 600; letter-spacing: -.4px; margin: 0; }
.agenda-date-sub { color: var(--muted); font-size: 11px; margin-top: 4px; }
.agenda-group { margin-top: 20px; }
.agenda-group-title { color: var(--muted); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 700; margin-bottom: 10px; }
.agenda-item { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--border); }
.agenda-item:last-child { border-bottom: 0; }
.agenda-mark { width: 3px; min-height: 35px; align-self: stretch; background: var(--border-strong); border-radius: 4px; }
.agenda-mark.done { background: var(--text-secondary); }
.agenda-mark.overdue { background: var(--danger); }
.agenda-item-main { min-width: 0; flex: 1; }
.agenda-item-title { font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
.agenda-item-title.done { text-decoration: line-through; color: var(--muted); }
.agenda-item-meta { margin-top: 4px; color: var(--muted); font-size: 10px; }
.settings-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 15px; align-items: start; }
.settings-card { padding: 22px; }
.settings-card h2 { margin: 0; font-size: 14px; font-weight: 650; }
.settings-card > p { margin: 6px 0 18px; color: var(--muted); font-size: 11px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid var(--border); }
.setting-row:first-of-type { border-top: 0; }
.setting-label { font-size: 12px; font-weight: 550; }
.setting-description { margin-top: 3px; color: var(--muted); font-size: 10px; max-width: 320px; }
.setting-control { width: 125px; flex: 0 0 125px; }
.toggle { position: relative; appearance: none; width: 37px; height: 21px; border: 1px solid var(--border-strong); background: var(--surface-2); border-radius: 99px; cursor: pointer; transition: background .18s ease; }
.toggle::after { content: ""; position: absolute; left: 3px; top: 3px; width: 13px; height: 13px; border-radius: 50%; background: var(--muted); transition: transform .18s ease, background .18s ease; }
.toggle:checked { background: var(--primary-bg); border-color: var(--primary-bg); }
.toggle:checked::after { transform: translateX(16px); background: var(--primary-text); }
.privacy-note { padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text-secondary); font-size: 11px; margin-top: 14px; }
.privacy-note strong { color: var(--text); }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.danger-zone h2 { color: var(--danger); }
.app-footer { padding: 18px 38px 23px; display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 9px; letter-spacing: .8px; border-top: 1px solid var(--border); }
.mobile-nav { display: none; }
.toast-region { position: fixed; z-index: 120; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { padding: 12px 14px; background: var(--text); color: var(--bg); border: 1px solid var(--text); border-radius: 10px; box-shadow: var(--shadow); font-size: 12px; animation: toast-in .2s ease both; pointer-events: auto; }
.toast.error { border-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.editor-dialog { width: min(550px, calc(100% - 28px)); max-height: min(88vh, 760px); overflow: auto; padding: 0; border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.editor-dialog::backdrop { background: rgba(0,0,0,.74); backdrop-filter: blur(2px); }
#editor-form { padding: 23px; }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.dialog-header h2 { margin: 4px 0 0; font-size: 23px; letter-spacing: -.7px; font-weight: 650; }
.dialog-fields { display: grid; gap: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.form-error { min-height: 17px; color: var(--danger); font-size: 11px; margin: 8px 0 0; }
.noscript-warning { margin: 30px; padding: 18px; border: 1px solid #999; color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (min-width: 1600px) { #main-content { padding-top: 46px; } }
@media (max-width: 1150px) {
  :root { --sidebar-width: 212px; }
  .topbar { padding: 0 27px; }
  .grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .overview-layout { grid-template-columns: minmax(0,1.2fr) minmax(245px,.8fr); }
  .analytics-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 850px) {
  :root { --sidebar-width: 0px; }
  .sidebar { display: none; }
  .workspace { margin-left: 0; padding-bottom: 76px; }
  .topbar { height: 60px; flex-basis: 60px; padding: 0 21px; }
  #main-content { padding: 27px 20px 32px; }
  .mobile-nav { position: fixed; z-index: 50; display: flex; align-items: stretch; gap: 4px; inset: auto 0 0; padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)); overflow-x: auto; background: var(--surface); border-top: 1px solid var(--border); scrollbar-width: none; }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav .nav-link { flex: 1 0 69px; min-width: 59px; min-height: 53px; flex-direction: column; justify-content: center; gap: 4px; padding: 4px 5px; border-radius: 9px; font-size: 9px; }
  .mobile-nav .nav-link svg { width: 17px; height: 17px; }
  .mobile-nav .nav-link.active .nav-indicator { display: none; }
  .mobile-nav .nav-link.active { background: var(--card); }
  .app-footer { padding: 17px 21px 19px; }
  .overview-layout, .timer-layout { grid-template-columns: 1fr; }
  .timer-card { padding: 22px 16px; }
  .timer-face { width: min(74vw, 300px); }
}
@media (max-width: 560px) {
  .today-chip { display: none; }
  .topbar { padding: 0 15px; }
  #main-content { padding: 24px 14px 25px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 21px; }
  .page-heading .button { align-self: stretch; }
  .page-heading h1 { font-size: 31px; }
  .grid-4, .grid-3, .grid-2, .settings-layout { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .stat-card { min-height: 117px; padding: 14px; }
  .stat-top { font-size: 10px; align-items: flex-start; }
  .stat-icon { display: none; }
  .stat-value { font-size: 27px; margin-top: 15px; }
  .overview-layout { gap: 12px; margin-top: 12px; }
  .card { padding: 16px; border-radius: 12px; }
  .tasks-panel, .habit-list-card { padding: 5px 14px; }
  .toolbar { gap: 7px; }
  .search-wrap { flex-basis: 100%; max-width: none; }
  .toolbar > .select-field { flex: 1; min-width: 0; }
  .filter-tabs { width: 100%; }
  .filter-tab { flex: 1; padding: 7px 9px; }
  .task-full-row { grid-template-columns: 18px minmax(0,1fr); gap: 9px; }
  .task-full-row .row-actions { grid-column: 2; justify-content: flex-end; margin-top: -3px; }
  .task-full-row .task-meta { margin-bottom: 1px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-span { grid-column: auto; }
  .analytics-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .analytics-summary .card { padding: 15px; }
  .analytics-number { font-size: 23px; }
  .chart { gap: 6px; }
  .chart-bar-area { max-width: 32px; }
  .calendar-toolbar { width: 100%; justify-content: space-between; }
  .calendar-date { min-width: 0; font-size: 12px; }
  .setting-row { align-items: flex-start; gap: 12px; }
  .setting-control { width: 112px; flex-basis: 112px; }
  .setting-row .setting-control > .button { width: 100%; max-width: 100%; min-height: 39px; height: auto; padding: 8px 7px; white-space: normal; overflow-wrap: anywhere; text-align: center; }
  .app-footer { font-size: 8px; padding-left: 14px; padding-right: 14px; }
  .avatar { width: 27px; height: 27px; }
  .motivation-text { font-size: 18px; }
  .timer-readout { font-size: 58px; }
  .timer-mode { padding: 8px 10px; }
  .habit-row-side .pill { display: 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; }
}

/* PRAXIS UI POLISH — PASS 02
   Slightly richer surface hierarchy, clearer type rhythm, and a tighter mobile dock.
   Core page structure and interaction styles remain intentionally unchanged. */
:root {
  --surface: #080808;
  --surface-2: #101010;
  --card: #141414;
  --card-hover: #1a1a1a;
  --text-secondary: #bdbdbd;
  --muted: #858585;
  --border: #252525;
  --border-strong: #414141;
  --radius: 15px;
  --radius-sm: 10px;
  --sidebar-width: 248px;
}
:root[data-theme="light"] {
  --surface: #ffffff;
  --surface-2: #f2f2ef;
  --card: #ffffff;
  --card-hover: #f6f6f2;
  --text-secondary: #505050;
  --muted: #707070;
  --border: #deded9;
  --border-strong: #bdbdb7;
}
body { letter-spacing: -.08px; }
.sidebar {
  padding: 29px 15px 22px;
  background: var(--surface);
}
.brand { margin-bottom: 43px; gap: 12px; }
.brand-mark {
  width: 37px; height: 37px; border-radius: 11px;
  font-size: 22px; letter-spacing: -1.8px;
}
.brand-copy strong { font-size: 21px; letter-spacing: -1px; }
.brand-copy small { font-size: 9px; letter-spacing: 1.55px; }
.sidebar-label, .eyebrow, .section-kicker { font-size: 10px; letter-spacing: 1.45px; }
.sidebar-label { margin-bottom: 10px; }
.nav-list { gap: 6px; }
.nav-link {
  min-height: 46px; border-radius: 11px; padding-inline: 12px;
  font-size: 13px; gap: 12px;
}
.nav-link.active {
  background: var(--card); border-color: var(--border);
  box-shadow: inset 2px 0 0 var(--text);
}
.nav-link svg { width: 17px; height: 17px; }
.sidebar-note { font-size: 12px; }
.sidebar-bottom p { font-size: 11px; }
.topbar {
  height: 72px; flex-basis: 72px; padding-inline: 34px;
  background: var(--bg);
}
.breadcrumbs { font-size: 11px; letter-spacing: 1.2px; }
.breadcrumbs strong { font-size: 13px; }
.today-chip { font-size: 12px; }
.avatar { width: 31px; height: 31px; }
.icon-button { width: 36px; height: 36px; border-radius: 10px; }
#main-content { padding: 42px clamp(25px, 4vw, 58px) 46px; }
.page-heading { margin-bottom: 30px; }
.page-heading h1 {
  font-size: clamp(32px, 3.15vw, 43px); line-height: 1.1;
  letter-spacing: -1.95px; font-weight: 640;
}
.page-heading p { font-size: 14px; line-height: 1.65; }
.greeting-line { font-size: 13px; color: var(--text-secondary); }
.button {
  min-height: 42px; padding-inline: 16px; border-radius: 10px;
  font-size: 12.5px; letter-spacing: -.05px;
}
.button-small { min-height: 33px; font-size: 11.5px; }
.grid { gap: 16px; }
.stack { gap: 18px; }
.card {
  border-radius: var(--radius); padding: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
  transition: border-color .18s ease, background .18s ease;
}
:root[data-theme="light"] .card { box-shadow: inset 0 1px 0 rgba(0,0,0,.018); }
.card-head { margin-bottom: 19px; }
.card-title { font-size: 14px; letter-spacing: -.2px; }
.card-subtitle { font-size: 11px; line-height: 1.45; }
.stat-card { min-height: 145px; padding: 20px; }
.stat-top { font-size: 12px; }
.stat-icon { width: 32px; height: 32px; border-radius: 10px; }
.stat-value { font-size: 32px; margin-top: 18px; letter-spacing: -1.45px; }
.stat-meta { font-size: 11px; line-height: 1.5; }
.progress-track { height: 5px; }
.progress-row span { font-size: 12px; }
.progress-row strong { font-size: 13px; }
.overview-layout { gap: 17px; margin-top: 17px; }
.task-row { padding-block: 14px; gap: 12px; }
.task-title, .habit-name { font-size: 13px; line-height: 1.5; }
.task-description { font-size: 11px; line-height: 1.5; }
.task-meta { font-size: 11px; gap: 8px; }
.priority { font-size: 10px; }
.pill { font-size: 10px; padding: 4px 8px; }
.motivation-card { background: var(--card); padding: 23px; }
.motivation-text { font-size: 21px; line-height: 1.42; letter-spacing: -.65px; }
.motivation-foot { font-size: 10px; }
.habit-row { padding-block: 12px; }
.habit-detail, .habit-streak { font-size: 11px; }
.empty-state { padding: 28px 14px; }
.empty-state strong { font-size: 13px; }
.empty-state p { font-size: 12px; line-height: 1.6; }
.search-wrap { max-width: 420px; }
.field, .select-field, .textarea-field {
  min-height: 42px; padding: 10px 12px; border-radius: 10px; font-size: 13px;
}
.search-wrap .field { padding-left: 36px; }
.field-label { font-size: 12px; }
.field-hint { font-size: 11px; }
.filter-tabs { padding: 4px; border-radius: 11px; }
.filter-tab { padding: 8px 13px; font-size: 12px; }
.filter-tab[aria-pressed="true"] { background: var(--card); }
.tasks-panel, .habit-list-card { padding: 8px 21px; }
.task-full-row, .habit-full-row { padding-block: 17px; }
.task-full-row { gap: 13px; }
.mini-action { width: 30px; height: 30px; border-radius: 8px; }
.timer-card { padding: 30px; }
.timer-modes { padding: 4px; border-radius: 11px; }
.timer-mode { padding: 9px 15px; font-size: 12px; }
.timer-face { width: min(100%, 322px); margin-block: 24px 22px; }
.timer-readout { font-size: clamp(55px, 7vw, 80px); letter-spacing: -4.2px; }
.timer-caption { font-size: 10px; }
.timer-controls .button-primary { min-width: 140px; }
.timer-task-select { margin-top: 22px; }
.timer-settings-inline { font-size: 11px; }
.history-item { padding-block: 13px; }
.history-name, .history-value { font-size: 12px; }
.history-date { font-size: 11px; }
.streak-day-label, .chart-label, .chart-value { font-size: 11px; }
.analytics-number { font-size: 28px; }
.analytics-label { font-size: 12px; }
.metric-line { font-size: 12px; }
.metric-line strong { font-size: 13px; }
.calendar-date { font-size: 15px; }
.agenda-date-title { font-size: 18px; }
.agenda-date-sub, .agenda-item-meta { font-size: 11px; }
.agenda-group-title { font-size: 11px; }
.agenda-item-title { font-size: 13px; }
.settings-card { padding: 23px; }
.settings-card h2 { font-size: 15px; }
.settings-card > p { font-size: 12px; line-height: 1.6; }
.setting-label { font-size: 13px; }
.setting-description { font-size: 11px; line-height: 1.55; }
.privacy-note { font-size: 12px; line-height: 1.6; }
.app-footer { padding: 20px 34px 23px; font-size: 10px; }
.toast { padding: 13px 15px; border-radius: 12px; font-size: 13px; }
.editor-dialog { border-radius: 18px; }
#editor-form { padding: 25px; }
.dialog-header h2 { font-size: 25px; }
@media (max-width: 1150px) {
  :root { --sidebar-width: 218px; }
  .topbar { padding-inline: 26px; }
  #main-content { padding-inline: 28px; }
  .card { padding: 19px; }
  .stat-card { padding: 18px; }
  .tasks-panel, .habit-list-card { padding-inline: 18px; }
}
@media (max-width: 850px) {
  .topbar { height: 62px; flex-basis: 62px; padding-inline: 21px; }
  #main-content { padding: 29px 21px 34px; }
  .mobile-nav {
    gap: 3px; padding: 7px max(7px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom));
    background: var(--surface);
  }
  .mobile-nav .nav-link {
    min-height: 54px; min-width: 0; flex: 1 1 0; gap: 5px;
    padding: 5px 2px; font-size: 10px; border-radius: 10px;
  }
  .mobile-nav .nav-link > span:not(.nav-indicator) { white-space: nowrap; }
  .mobile-nav .nav-link.active { box-shadow: inset 0 2px 0 var(--text); }
  .app-footer { padding-inline: 21px; }
  .timer-card { padding: 24px 18px; }
}
@media (max-width: 560px) {
  #main-content { padding: 25px 14px 28px; }
  .page-heading { gap: 14px; margin-bottom: 22px; }
  .page-heading h1 { font-size: clamp(29px, 8vw, 33px); letter-spacing: -1.45px; }
  .page-heading p { font-size: 13px; }
  .grid-4 { gap: 9px; }
  .card { padding: 16px; border-radius: 13px; }
  .stat-card { min-height: 122px; padding: 15px; }
  .stat-top { font-size: 10.5px; line-height: 1.4; }
  .stat-value { font-size: 27px; margin-top: 15px; }
  .stat-meta { font-size: 10px; }
  .card-title { font-size: 13.5px; }
  .card-subtitle { font-size: 10.5px; }
  .tasks-panel, .habit-list-card { padding: 5px 14px; }
  .task-full-row, .habit-full-row { padding-block: 15px; }
  .toolbar { gap: 7px; }
  .filter-tab { padding: 8px 7px; font-size: 11px; }
  .analytics-summary .card { padding: 15px; }
  .analytics-number { font-size: 24px; }
  .analytics-label { font-size: 11px; }
  .timer-readout { font-size: 58px; }
  .timer-mode { padding: 8px 10px; font-size: 11px; }
  .setting-row { gap: 10px; }
  .setting-control { width: 108px; flex-basis: 108px; }
  .app-footer { font-size: 8.5px; padding-inline: 14px; }
  .motivation-text { font-size: 19px; }
  .mobile-nav { gap: 2px; padding-inline: 5px; }
  .mobile-nav .nav-link { padding-inline: 1px; }
  .mobile-nav .nav-link > span:not(.nav-indicator) { font-size: clamp(7.5px, 2.15vw, 9px); letter-spacing: -.15px; }
}
@media (max-width: 360px) {
  .mobile-nav .nav-link { gap: 4px; }
  .mobile-nav .nav-link svg { width: 16px; height: 16px; }
  .mobile-nav .nav-link > span:not(.nav-indicator) { font-size: 7.5px; }
  .topbar { padding-inline: 11px; }
  .breadcrumbs { gap: 7px; font-size: 9px; }
  .breadcrumbs strong { font-size: 11px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
