:root {
  color-scheme: light dark;
  --canvas: light-dark(#f7f7f9, #141416);
  --surface: light-dark(#fff, #1b1b1e);
  --sidebar: light-dark(#fbfbfc, #171719);
  --raised: light-dark(#fff, #222226);
  --subtle: light-dark(#f5f5f7, #222225);
  --hover: light-dark(#eeeeF2, #28282d);
  --text: light-dark(#19191f, #f0eff3);
  --muted: light-dark(#5e5e69, #aaaab5);
  --border: light-dark(#e2e2e8, #303036);
  --control-border: light-dark(#cacad3, #45454e);
  --accent: light-dark(#5141c5, #c0b4ff);
  --accent-surface: light-dark(#eeebfc, #2c2646);
  --button: light-dark(#5141c5, #b5a6fa);
  --button-hover: light-dark(#4536ab, #cabefd);
  --on-button: light-dark(#fff, #1c1633);
  --chart: light-dark(#7968dd, #9d8bea);
  --chart-hover: light-dark(#5141c5, #c0b4ff);
  --focus: light-dark(#6251db, #b5a6fa);
  --positive: light-dark(#23654d, #9bd9ba);
  --positive-bg: light-dark(#eaf6ef, #21352c);
  --warning: light-dark(#75510e, #e7c480);
  --warning-bg: light-dark(#fcf4df, #362c1c);
  --danger: light-dark(#a22d43, #f1a5b2);
  --danger-bg: light-dark(#fceef1, #3b252b);
  --danger-button: light-dark(#9d233a, #eea1af);
  --on-danger: light-dark(#fff, #291118);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s10: 40px;
  --s12: 48px;
  --control-height: 36px;
  --topbar-height: 60px;
  --sidebar-width: 212px;
  --content-width: 1160px;
  --fs-xs: .75rem;
  --fs-sm: .8125rem;
  --fs-base: .875rem;
  --fs-section: 1rem;
  --fs-title: 2rem;
  --chart-height: 192px;
  font: 100%/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--text); font-size: var(--fs-base); }
main, aside, section, article, div, form, label { min-width: 0; }
h1, h2, h3, p, dl, ol, pre { margin: 0; }
h1, h2, h3, strong, p, a, td, code { overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.24; font-weight: 650; }
h1 { font-size: var(--fs-title); letter-spacing: -.035em; }
h2 { font-size: var(--fs-section); letter-spacing: -.015em; }
h3 { font-size: var(--fs-base); }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--text); }
small, .muted { color: var(--muted); font-size: var(--fs-sm); }
small { display: block; }
code, pre { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: var(--fs-sm); }
pre { white-space: pre-wrap; padding: var(--s3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--subtle); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 10; inset: var(--s2) auto auto var(--s2); background: var(--surface); padding: var(--s2) var(--s3); border-radius: var(--radius-sm); }
.icon { width: 17px; height: 17px; flex: 0 0 auto; }
.number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.align-end { text-align: right; }
.app-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); grid-template-rows: var(--topbar-height) 1fr; grid-template-areas: "sidebar top" "sidebar main"; }
.sidebar { grid-area: sidebar; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: var(--s4) var(--s3); background: var(--sidebar); border-right: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: var(--s2); width: fit-content; color: var(--text); font-size: .94rem; font-weight: 720; letter-spacing: -.028em; text-decoration: none; }
.brand-mark { flex: 0 0 auto; width: 30px; height: 30px; fill: var(--button); color: var(--on-button); }
.sidebar .brand { margin: 0 var(--s2) var(--s8); }
.sidebar-caption, .eyebrow { color: var(--muted); text-transform: uppercase; font-size: .6875rem; font-weight: 700; letter-spacing: .11em; }
.sidebar-caption { margin: 0 var(--s3) var(--s2); }
.sidebar nav { display: grid; gap: var(--s1); }
.sidebar nav a { display: flex; align-items: center; min-height: var(--control-height); padding: var(--s1) var(--s3); gap: var(--s2); border-radius: var(--radius-sm); font-weight: 550; color: var(--muted); text-decoration: none; }
.sidebar nav a:hover { background: var(--hover); color: var(--text); }
.sidebar nav a[aria-current="page"] { background: var(--accent-surface); color: var(--accent); font-weight: 650; }
.sidebar-note { display: flex; align-items: center; gap: var(--s2); margin-top: auto; padding: var(--s3) var(--s2) var(--s1); border-top: 1px solid var(--border); color: var(--muted); font-size: var(--fs-xs); }
.sidebar-note .icon { width: 15px; height: 15px; }
.topbar { grid-area: top; position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; min-height: var(--topbar-height); padding: 0 var(--s6); gap: var(--s3); background: var(--surface); border-bottom: 1px solid var(--border); }
.context, .top-actions { display: flex; align-items: center; gap: var(--s3); }
.mobile-brand { display: none; }
.current-section { font-weight: 650; }
.top-actions { margin-inline-start: auto; }
.theme-form { display: flex; align-items: center; gap: var(--s2); }
.theme-control { position: relative; display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--control-height); color: var(--muted); }
.theme-control > .icon:first-child { position: absolute; left: var(--s2); pointer-events: none; }
.theme-control > .icon:last-child { position: absolute; right: var(--s2); width: 14px; pointer-events: none; }
.theme-control select { appearance: none; min-width: 100px; padding-inline: 30px 27px; }
.theme-control:not(.compact) > span { position: absolute; width: 1px; clip-path: inset(50%); }
.user-menu { position: relative; }
.user-menu summary { display: flex; gap: var(--s2); align-items: center; min-height: var(--control-height); padding: 3px var(--s2) 3px 3px; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; }
.user-menu summary:hover, .user-menu[open] summary { border-color: var(--border); background: var(--subtle); }
.user-menu summary > span:not(.avatar) { max-width: 14ch; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.avatar { position: relative; isolation: isolate; display: inline-grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; overflow: hidden; border-radius: 50%; background: var(--accent-surface); color: var(--accent); font-size: .65rem; font-weight: 750; }
.avatar img { position: absolute; inset: 0; object-fit: cover; }
.avatar .icon { width: 16px; height: 16px; }
.menu-panel { position: absolute; right: 0; top: calc(100% + var(--s2)); z-index: 2; min-width: 174px; padding: var(--s3); border: 1px solid var(--control-border); border-radius: var(--radius); background: var(--raised); }
.menu-panel form { margin-top: var(--s3); }
.menu-panel .button { width: 100%; }
.identity { display: flex; align-items: flex-start; gap: var(--s2); min-width: 116px; }
main { grid-area: main; width: min(100%, var(--content-width)); margin-inline: auto; padding: var(--s6) clamp(var(--s4), 3vw, var(--s10)) var(--s12); }
main:focus { outline-offset: -2px; }
.stack { display: grid; gap: var(--s4); }
[id]:target { scroll-margin-top: calc(var(--topbar-height) + var(--s3)); }
.surface { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.page-heading, .section-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.page-heading { margin-bottom: var(--s1); }
.page-heading p, .section-heading p { margin-top: var(--s1); color: var(--muted); }
.section { padding: var(--s5); }
.section-heading { margin-bottom: var(--s4); }
.section-heading > .button, .page-heading > .button { flex-shrink: 0; }
.section p + p { margin-top: var(--s2); }
.controls, .inline-actions, .device-actions, .pager { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s2); }
.controls { gap: var(--s3); }
label:not(.theme-control) { display: grid; gap: var(--s1); font-size: var(--fs-sm); font-weight: 600; }
label small { font-weight: 400; }
input, select, .button {
  min-height: var(--control-height); max-width: 100%; padding: 7px var(--s3); border: 1px solid var(--control-border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; line-height: 1.35;
}
input, select { width: auto; min-width: 0; }
input::placeholder { color: var(--muted); }
input:hover, select:hover { border-color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); font-size: var(--fs-sm); font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap; border-color: transparent; background: var(--button); color: var(--on-button); }
.button:hover { background: var(--button-hover); color: var(--on-button); }
.button:active { border-color: currentColor; }
.button.secondary, .button.danger-secondary { border-color: var(--control-border); background: var(--surface); color: var(--text); }
.button.secondary:hover, .button.danger-secondary:hover { background: var(--hover); }
.button.danger-secondary { color: var(--danger); }
.button.danger { background: var(--danger-button); color: var(--on-danger); }
.button.danger:hover { filter: brightness(1.08); }
.button:disabled, input:disabled, select:disabled { opacity: .55; cursor: not-allowed; }
.button .icon { width: 15px; height: 15px; }
summary { cursor: pointer; }
summary:hover { color: var(--accent); }
.disclosure, .technical-id { border-radius: var(--radius-sm); }
.disclosure { margin-top: var(--s3); }
.disclosure > summary, .technical-id > summary { width: fit-content; font-weight: 600; color: var(--accent); }
.disclosure[open] > summary, .technical-id[open] > summary { margin-bottom: var(--s2); }
.disclosure form + p, .disclosure pre + p, .disclosure p + pre { margin-top: var(--s2); }
.technical-id { font-size: var(--fs-xs); }
.technical-id > summary { font-weight: 500; }
.technical { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s2) var(--s4); margin: var(--s2) 0 var(--s3); color: var(--muted); font-size: var(--fs-sm); }
.technical dd { min-width: 0; margin: 0; color: var(--text); }
.technical .button { padding: 3px var(--s2); min-height: 28px; margin-inline-start: var(--s1); }
.badge { display: inline-flex; align-items: center; width: fit-content; gap: 5px; padding: 3px var(--s2); border-radius: 999px; color: var(--muted); background: var(--subtle); font-size: var(--fs-xs); font-weight: 650; white-space: nowrap; }
.badge > span, .chart-legend > span { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.badge.work { color: var(--accent); background: var(--accent-surface); }
.badge.personal, .badge.success { color: var(--positive); background: var(--positive-bg); }
.badge.danger { color: var(--danger); background: var(--danger-bg); }
.empty { display: grid; place-items: center; text-align: center; gap: var(--s1); padding: var(--s8) var(--s4); border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.empty .icon { margin-bottom: var(--s1); color: var(--accent); width: 20px; height: 20px; }
.empty p { max-width: 48ch; color: var(--muted); }
.notice { display: flex; align-items: flex-start; gap: var(--s2); padding: var(--s3) var(--s4); border: 1px solid transparent; border-radius: var(--radius); }
.notice .icon { margin-block-start: 2px; }
.notice.success { color: var(--positive); background: var(--positive-bg); }
.notice.warning { color: var(--warning); background: var(--warning-bg); }
.notice.error { color: var(--danger); background: var(--danger-bg); }
main > .notice { margin-bottom: var(--s4); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: var(--fs-sm); }
th, td { vertical-align: middle; border-bottom: 1px solid var(--border); padding: 9px var(--s3); }
thead th { background: var(--subtle); color: var(--muted); font-weight: 650; }
thead th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
thead th:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
tbody:last-child tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--subtle); }
td strong { font-weight: 650; }
.period-control { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); padding: var(--s2); position: relative; }
.period-tabs { display: flex; flex-wrap: wrap; align-items: center; border-radius: var(--radius-sm); padding: 3px; gap: 2px; background: var(--subtle); }
.period-tabs a, .period-custom summary { display: inline-flex; align-items: center; gap: var(--s1); min-height: 32px; padding: var(--s1) var(--s2); font-weight: 600; font-size: var(--fs-sm); border-radius: var(--radius-sm); color: var(--muted); text-decoration: none; }
.period-tabs a:hover, .period-custom summary:hover { background: var(--hover); color: var(--text); }
.period-tabs a[aria-current] { color: var(--accent); background: var(--accent-surface); }
.period-custom .icon:last-child { width: 14px; }
.period-custom[open] summary { background: var(--subtle); color: var(--text); }
.period-custom.custom-selected:not([open]) summary { background: var(--accent-surface); color: var(--accent); }
.period-custom .controls { position: absolute; z-index: 3; top: calc(100% + var(--s1)); inset-inline-start: var(--s2); max-width: calc(100% - var(--s4)); padding: var(--s3); border: 1px solid var(--control-border); border-radius: var(--radius); background: var(--raised); }
.period-custom .controls input { width: min(148px, 100%); }
.period-label { display: flex; align-items: center; flex-wrap: wrap; gap: 0 var(--s2); margin-inline-start: auto; padding-inline: var(--s2); font-size: var(--fs-sm); font-weight: 600; }
.period-label .muted { font-weight: 400; font-size: var(--fs-xs); }
.metric-grid { display: grid; gap: var(--s3); }
.primary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.secondary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric { display: grid; align-content: start; padding: var(--s4); gap: var(--s1); }
.metric.primary { padding: var(--s5); border-color: var(--control-border); }
.metric-title { display: flex; justify-content: space-between; gap: var(--s2); align-items: center; color: var(--muted); }
.metric-title h2 { font-size: var(--fs-base); letter-spacing: 0; font-weight: 600; }
.icon-chip { display: inline-grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; color: var(--muted); background: var(--subtle); border-radius: var(--radius-sm); }
.primary .icon-chip, .auth-card .icon-chip { color: var(--accent); background: var(--accent-surface); }
.metric strong, .report-value, .project-total strong { font-variant-numeric: tabular-nums; font-size: clamp(1.3rem, 3.3vw, 1.65rem); line-height: 1.15; font-weight: 680; letter-spacing: -.045em; }
.metric.primary strong, .report-value { font-size: clamp(1.65rem, 4vw, 2.35rem); }
.metric p, .report-summary p { color: var(--muted); font-size: var(--fs-sm); }
.chart-legend { display: inline-flex; align-items: center; gap: var(--s2); color: var(--muted); font-size: var(--fs-xs); padding-top: var(--s1); }
.chart-legend > span { background: var(--chart); border-radius: 2px; width: 9px; height: 9px; }
.bar-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3); padding: var(--s3) var(--s2) var(--s6) 0; }
.chart-scale { display: grid; grid-template-rows: repeat(4, 1fr) 0; justify-items: end; align-items: start; height: var(--chart-height);
  color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-scale span { transform: translateY(-50%); }
.chart-plot { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: var(--chart-height); border-bottom: 1px solid var(--border); background: repeating-linear-gradient(to bottom, var(--border) 0 1px, transparent 1px 25%); }
.chart-point { position: relative; min-width: 0; height: var(--chart-height); }
.chart-bar { display: block; height: 100%; width: 100%; margin: 0; border: 0; padding: 0; background: transparent; color: var(--chart); cursor: crosshair; }
.chart-bar > svg { display: block; width: 100%; max-width: 60px; height: 100%; margin-inline: auto; fill: currentColor; }
.chart-bar.zero { color: var(--control-border); }
.chart-bar:is(:hover, :focus-visible) { color: var(--chart-hover); }
.chart-bar:is(:hover, :focus) .chart-tip { visibility: visible; }
.chart-tip { position: absolute; z-index: 2; left: 50%; bottom: 58%; transform: translateX(-50%); visibility: hidden; padding: var(--s2) var(--s3); border: 1px solid var(--control-border); border-radius: var(--radius-sm); background: var(--raised); color: var(--muted); white-space: nowrap; text-align: left; font-size: var(--fs-xs); pointer-events: none; }
.chart-tip strong { display: block; color: var(--text); font-size: var(--fs-base); }
.chart-point.start .chart-tip { left: 0; transform: none; }
.chart-point.end .chart-tip { left: auto; right: 0; transform: none; }
.chart-date { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: var(--s2); color: var(--muted); white-space: nowrap; font-size: var(--fs-xs); }
.chart-point:first-child .chart-date { left: 0; transform: none; }
.project-link, .back-link { display: inline-flex; align-items: center; gap: var(--s2); color: var(--text); font-weight: 650; text-decoration: none; }
.project-link .icon, .back-link .icon { color: var(--accent); }
.project-link:hover, .back-link:hover { color: var(--accent); text-decoration: underline; }
.project-filters { margin-bottom: var(--s4); }
.search-field { display: inline-flex; position: relative; align-items: center; }
.search-field .icon { position: absolute; left: var(--s2); color: var(--muted); pointer-events: none; }
.search-field input { padding-inline-start: var(--s8); width: 236px; }
.project-total { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s3) var(--s5); color: var(--muted); }
.project-total strong { color: var(--text); }
.wide-field { flex: 1 1 min(240px, 100%); }
.source-form select { max-width: min(30ch, 100%); }
.correction-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: var(--s3); border-top: 1px solid var(--border); padding: var(--s3) 0; margin-top: var(--s2); }
.correction-row p { margin-block: var(--s1); }
.correction-row .disclosure { margin: 0; padding: var(--s1) var(--s2); }
.detail-note, .pager { margin-top: var(--s3); }
.pager { align-items: center; }
.report-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s4); padding: var(--s5); border-color: var(--control-border); }
.report-summary .eyebrow { margin-bottom: var(--s1); font-size: var(--fs-xs); }
.report-summary p:last-child { margin-top: var(--s1); }
.report-value span:last-child { color: var(--muted); font-size: var(--fs-section); letter-spacing: 0; }
.report-table th, .report-table td { padding-block: var(--s2); }
.report-day tr:first-child > * { border-top: 1px solid var(--border); background: var(--subtle); font-weight: 650; }
.report-day tr:not(:first-child) td:first-child { padding-inline-start: var(--s5); }
.report-task { display: block; color: var(--text); font-weight: 600; }
.device-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2) var(--s3); padding: var(--s3); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.device-card + .device-card { margin-top: var(--s2); }
.device-main { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.device-main p { color: var(--muted); font-size: var(--fs-sm); }
.device-card > details { grid-column: 1 / -1; margin-top: 0; }
.device-card > details[open] { border-top: 1px solid var(--border); padding-top: var(--s2); }
.steps { padding-inline-start: var(--s5); color: var(--muted); }
.steps li + li { margin-top: var(--s1); }
#connect-device > form { margin-top: var(--s4); }
.key-box, .lookup-result { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s2); padding: var(--s3); margin-top: var(--s3); border-radius: var(--radius-sm); background: var(--subtle); }
.token { font-weight: 600; }
.lookup-result { justify-content: flex-start; }
.lookup-result form { margin-inline-start: auto; }
.settings .section { max-width: 740px; }
.settings-fields { display: grid; gap: var(--s3); max-width: 520px; margin-bottom: var(--s5); }
.settings-fields input { width: min(100%, 312px); }
.zone-field { position: relative; display: grid; justify-items: start; gap: var(--s1); }
#zone-results { position: absolute; top: 62px; z-index: 2; width: min(100%, 360px); max-height: 208px; overflow: auto;
  padding: var(--s1); border: 1px solid var(--control-border); border-radius: var(--radius-sm); background: var(--raised); }
#zone-results [role="option"] { padding: var(--s2); border-radius: var(--radius-sm); font-size: var(--fs-sm); cursor: pointer; }
#zone-results [role="option"]:hover, #zone-results [aria-selected="true"] { background: var(--accent-surface); color: var(--accent); }
.window-presets { display: flex; flex-wrap: wrap; gap: var(--s2); }
.window-presets .button { min-height: 30px; }
.auth-shell .topbar { position: static; }
.auth-shell main { display: grid; justify-items: center; padding-top: clamp(var(--s8), 13vh, 132px); }
.auth-card { width: min(100%, 448px); padding: clamp(var(--s5), 6vw, var(--s10)); border-radius: var(--radius-lg); }
.auth-card .icon-chip { width: 42px; height: 42px; margin-bottom: var(--s5); }
.auth-card h1 { margin-block: var(--s2); line-height: 1.13; }
.auth-description { margin-bottom: var(--s6); color: var(--muted); }
.auth-button { width: 100%; min-height: 42px; }
.auth-caption { margin-top: var(--s3); text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.auth-card .notice { margin-bottom: var(--s3); }
.auth-choices { display: grid; gap: var(--s2); }
.auth-choices .button { justify-content: flex-start; min-height: 44px; }
dialog { width: min(calc(100% - var(--s6)), 420px); padding: var(--s5); border: 1px solid var(--control-border); border-radius: var(--radius-lg); background: var(--raised); color: var(--text); }
dialog::backdrop { background: #0007; }
dialog p { margin: var(--s2) 0 var(--s5); color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--s2); }
.toast { position: fixed; z-index: 5; inset: auto var(--s4) var(--s4) auto; max-width: calc(100% - var(--s8)); padding: var(--s3) var(--s4); border: 1px solid var(--control-border); border-radius: var(--radius); background: var(--raised); }

@media (max-width: 880px) {
  :root { --sidebar-width: 172px; }
  .topbar { padding-inline: var(--s4); }
  .period-label { margin-inline-start: 0; }
}
@media (max-width: 700px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; grid-template-areas: "top" "sidebar" "main"; }
  .topbar { position: static; }
  .mobile-brand { display: block; }
  .current-section { padding-inline-start: var(--s2); border-inline-start: 1px solid var(--border); color: var(--muted); font-size: var(--fs-sm); }
  .sidebar { position: static; height: auto; border-inline: 0; border-bottom: 1px solid var(--border); padding: var(--s2) var(--s4); }
  .sidebar .brand, .sidebar-caption, .sidebar-note { display: none; }
  .sidebar nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sidebar nav a { padding-inline: var(--s2); }
  .sidebar nav a .icon { width: 15px; height: 15px; }
  .sidebar nav a span { overflow-wrap: anywhere; }
  main { padding-top: var(--s5); }
}
@media (max-width: 536px) {
  .task-interval-table, .task-interval-table tbody { display: block; }
  .task-interval-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .task-interval-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s1) var(--s2);
    padding: var(--s2); border-bottom: 1px solid var(--border); }
  .task-interval-table td { padding: 0; border: 0; }
  .task-interval-table td:first-child, .task-interval-table td:last-child { grid-column: 1 / -1; }
  .task-interval-table td:nth-child(3):not(:last-child) { color: var(--muted); }
  .task-interval-table tr:hover td { background: none; }
  :is(.account-table, .project-list), :is(.account-table, .project-list) tbody { display: block; }
  :is(.account-table, .project-list) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .account-table tr { display: grid; grid-template-columns: auto 1fr; gap: var(--s1) var(--s2);
    padding: var(--s3); border: 1px solid var(--border); border-radius: var(--radius-sm); }
  .account-table tr + tr { margin-top: var(--s2); }
  .account-table td { padding: 0; border: 0; }
  .account-table td:first-child, .account-table td:last-child { grid-column: 1 / -1; }
  .account-table .inline-actions { margin-top: var(--s1); }
  .account-table tr:hover td { background: none; }
  .project-list tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
    gap: var(--s1) var(--s2); padding: var(--s2) 0; border-bottom: 1px solid var(--border); }
  .project-list tr:last-child { border-bottom: 0; }
  .project-list td { padding: 0; border: 0; }
  .project-list td:last-child { grid-area: 1 / 2; }
  .project-list td:nth-child(3) { justify-self: end; }
  .project-list tr:hover td { background: none; }
}
@media (max-width: 470px) {
  :root { --fs-title: 1.65rem; --chart-height: 154px; }
  .topbar, main, .sidebar { padding-inline: var(--s3); }
  .topbar, .top-actions, .context { gap: var(--s2); }
  .brand { font-size: var(--fs-sm); }
  .brand-mark { width: 26px; height: 26px; }
  .current-section { display: none; }
  .user-menu summary > span:not(.avatar) { display: none; }
  .theme-control select { min-width: 0; }
  .section, .report-summary { padding: var(--s3); }
  .metric-grid { gap: var(--s2); }
  .metric, .metric.primary { padding: var(--s3); }
  .metric-title h2 { font-size: var(--fs-sm); }
  .metric-title .icon-chip { width: 24px; height: 24px; }
  .metric-title .icon-chip .icon { width: 14px; height: 14px; }
  .secondary-grid .metric { grid-column: span 1; }
  .secondary-grid .metric-title .icon-chip { display: none; }
  .secondary-grid .metric p { font-size: var(--fs-xs); }
  .period-tabs, .period-custom summary { gap: 2px; }
  .period-tabs a, .period-custom summary { padding-inline: 6px; font-size: var(--fs-xs); }
  .period-label { width: 100%; }
  .bar-chart { padding-right: var(--s1); gap: var(--s2); }
  .chart-date { font-size: .68rem; }
  th, td { padding-inline: var(--s2); }
  .technical { grid-template-columns: minmax(0, 1fr); }
  .project-link { gap: var(--s1); }
  .project-link .icon { width: 14px; height: 14px; }
  .overview-projects :is(th, td):last-child { display: none; }
  .project-filters > label:first-of-type { flex: 0 0 100%; }
  .search-field input { width: 100%; }
  .notice { padding-inline: var(--s3); }
}
