/* Hallmark · shape: app screen · genre: editorial · theme: Almanac (deal 2/3, seed personal-second-brain-one-5757·9dd2434d·2026-11-07·r0) · redesign: full
 * nav: top bar + bottom tab bar under 60rem, one top bar above · signature: the "Hoje" sheet (today's summary over the open tasks you can tick) · states: empty, error, missing note, no results
 * axes: mid/grotesk-sans/chromatic-magenta · posture: restrained · contrast: pass · modes: light+dark · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V4 · weakest: E, the stats row is still four bare figures; set as a ruled ledger row, not cards */
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/HankenGrotesk-normal-latin-ext-ieVn2YZDLW.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/HankenGrotesk-normal-latin-ieVn2YZDLW.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/HankenGrotesk-normal-latin-ext-ieVn2YZDLW.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/HankenGrotesk-normal-latin-ieVn2YZDLW.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/IBMPlexMono-normal-latin-ext--F63fjptAg.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/IBMPlexMono-normal-latin--F63fjptAg.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/IBMPlexMono-normal-latin-ext--F6qfjptAg.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/IBMPlexMono-normal-latin--F6qfjptAg.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/Newsreader-italic-latin-ext-cY9XfjOCX1.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/Newsreader-italic-latin-cY9XfjOCX1.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/Newsreader-normal-latin-ext-cY9AfjOCX1.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/Newsreader-normal-latin-cY9AfjOCX1.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/Newsreader-normal-latin-ext-cY9AfjOCX1.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/Newsreader-normal-latin-cY9AfjOCX1.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px;
  --text-xs: 0.8125rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.125rem; --text-xl: 1.35rem; --text-2xl: 1.62rem; --text-3xl: 1.944rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --dur-micro: 120ms; --dur-short: 220ms;
  --container: 70rem; --measure: 68ch; --gutter: 16px; --bar-h: 56px; --tab-h: 64px; --hit: 44px; --control: 40px;
  --z-dropdown: 100; --z-sticky: 200;
  --color-paper: oklch(84% 0.012 245); --color-paper-2: oklch(81% 0.012 245); --color-paper-3: oklch(77% 0.012 245);
  --color-ink: oklch(16% 0.020 245); --color-ink-2: oklch(24% 0.018 245); --color-muted: oklch(38% 0.016 245);
  --color-rule: oklch(73% 0.013 240); --color-rule-2: oklch(32% 0.018 240);
  --color-accent: oklch(45% 0.180 350); --color-accent-2: oklch(37% 0.160 350); --color-accent-ink: oklch(97% 0.006 245); --color-focus: oklch(46% 0.190 350);
  --color-sheet: oklch(93.5% 0.008 245);
  --color-error: oklch(46% 0.17 27); --color-mark: oklch(45% 0.180 350 / 0.16);
  --font-display: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Newsreader", ui-serif, Georgia, serif;
  --font-outlier: "IBM Plex Mono", ui-monospace, monospace;
  --radius-card: 0; --radius-pill: 2px; --rule-hair: 1px; --rule-bar: 2px;
  --tracking-display: -0.02em; --display-weight: 600; --body-weight: 400;
}
/* Escuro: mesma matiz, tokens rederivados (paridade, nunca inversão). */
:root[data-mode="dark"] {
  color-scheme: dark;
  --color-paper: oklch(17% 0.014 245); --color-paper-2: oklch(20% 0.014 245); --color-paper-3: oklch(23% 0.014 245);
  --color-ink: oklch(94% 0.010 245); --color-ink-2: oklch(86% 0.012 245); --color-muted: oklch(72% 0.014 245);
  --color-rule: oklch(32% 0.014 240); --color-rule-2: oklch(76% 0.014 240);
  --color-accent: oklch(70% 0.150 350); --color-accent-2: oklch(76% 0.130 350); --color-accent-ink: oklch(17% 0.020 245); --color-focus: oklch(74% 0.150 350);
  --color-sheet: oklch(22% 0.013 245);
  --color-error: oklch(74% 0.14 27); --color-mark: oklch(70% 0.150 350 / 0.24);
  --body-weight: 350;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode]) {
    color-scheme: dark;
    --color-paper: oklch(17% 0.014 245); --color-paper-2: oklch(20% 0.014 245); --color-paper-3: oklch(23% 0.014 245);
    --color-ink: oklch(94% 0.010 245); --color-ink-2: oklch(86% 0.012 245); --color-muted: oklch(72% 0.014 245);
    --color-rule: oklch(32% 0.014 240); --color-rule-2: oklch(76% 0.014 240);
    --color-accent: oklch(70% 0.150 350); --color-accent-2: oklch(76% 0.130 350); --color-accent-ink: oklch(17% 0.020 245); --color-focus: oklch(74% 0.150 350);
    --color-sheet: oklch(22% 0.013 245);
    --color-error: oklch(74% 0.14 27); --color-mark: oklch(70% 0.150 350 / 0.24);
    --body-weight: 350;
  }
}
@media (min-width: 40rem) { :root { --gutter: 24px; } }
@media (min-width: 60rem) { :root { --gutter: 40px; --bar-h: 64px; } }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--color-muted) var(--color-paper); scroll-padding-top: calc(var(--bar-h) + var(--space-md)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--color-paper); color: var(--color-ink-2);
  font: var(--body-weight) var(--text-md)/1.55 var(--font-body); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; caret-color: var(--color-accent);
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}
::selection { background: var(--color-mark); color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
a { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:active { color: var(--color-accent-2); }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); color: var(--color-ink); letter-spacing: var(--tracking-display); line-height: 1.1; overflow-wrap: break-word; min-width: 0; text-wrap: balance; font-synthesis: none; }
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-md); }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; }
svg { display: block; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
.num { font-family: var(--font-outlier); font-variant-numeric: tabular-nums; font-weight: 400; letter-spacing: 0; }
.muted { color: var(--color-muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--space-md); top: -100px; z-index: var(--z-sticky); background: var(--color-ink); color: var(--color-paper); padding: var(--space-xs) var(--space-md); }
.skip:focus-visible { top: var(--space-xs); }

/* Shell: barra superior */
.topbar { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--color-paper); border-bottom: var(--rule-bar) solid var(--color-rule-2); }
.topbar__in { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); height: var(--bar-h); display: flex; align-items: center; gap: var(--space-xs); }
.brand { font: var(--display-weight) var(--text-lg)/1 var(--font-display); letter-spacing: var(--tracking-display); color: var(--color-ink); text-decoration: none; margin-right: auto; padding-block: var(--space-sm); }
.brand:hover { text-decoration: none; color: var(--color-accent-2); }
.topnav { display: none; }
.iconbtn {
  display: inline-grid; place-items: center; width: var(--hit); height: var(--hit); border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--color-ink); cursor: pointer; text-decoration: none;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.iconbtn:hover { background: var(--color-paper-2); }
.iconbtn:active { background: var(--color-paper-3); }
.iconbtn[aria-current="page"] { color: var(--color-accent); }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Menu "Mais" (details, sem JS) */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { background: var(--color-paper-2); }
.menu__panel {
  position: fixed; right: var(--gutter); top: calc(var(--bar-h) + var(--space-xs)); z-index: var(--z-dropdown); width: 18rem; max-width: calc(100% - 2 * var(--gutter));
  background: var(--color-sheet); color: var(--color-ink); border-top: var(--rule-bar) solid var(--color-ink); outline: var(--rule-hair) solid var(--color-rule); padding: var(--space-xs) 0;
}
.menu__panel a, .menu__panel .menu__item { display: flex; align-items: center; gap: var(--space-sm); min-height: var(--hit); padding: 0 var(--space-md); color: var(--color-ink); text-decoration: none; font: 500 var(--text-sm)/1.2 var(--font-display); width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left; }
.menu__panel a:hover, .menu__panel .menu__item:hover { background: var(--color-paper-2); }
.menu__panel a:active, .menu__panel .menu__item:active { background: var(--color-paper-3); }
.menu__label { padding: var(--space-sm) var(--space-md) var(--space-2xs); font-size: var(--text-sm); color: var(--color-muted); }
.menu__sep { border: 0; border-top: var(--rule-hair) solid var(--color-rule); margin: var(--space-xs) 0; }

/* Seletor de tema: três botões, o atual com aria-pressed */
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 var(--space-md) var(--space-xs); border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-pill); }
.seg button {
  min-height: var(--control); border: 0; background: transparent; color: var(--color-ink); cursor: pointer;
  font: 500 var(--text-sm)/1 var(--font-display); transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.seg button + button { border-left: var(--rule-hair) solid var(--color-rule-2); }
.seg button:hover { background: var(--color-paper-2); }
.seg button:active { background: var(--color-paper-3); }
.seg button[aria-pressed="true"] { background: var(--color-paper-3); color: var(--color-ink); box-shadow: inset 0 -2px 0 var(--color-accent); }
.seg button:focus-visible { outline-offset: -3px; }

/* Barra inferior (celular) */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: var(--z-sticky); background: var(--color-paper); border-top: var(--rule-bar) solid var(--color-rule-2);
  padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
}
.tabbar a {
  position: relative; display: grid; justify-items: center; align-content: center; gap: var(--space-3xs); height: var(--tab-h);
  color: var(--color-muted); text-decoration: none; font: 500 var(--text-xs)/1 var(--font-display);
  transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out);
}
.tabbar a:hover { color: var(--color-ink); }
.tabbar a:active { background: var(--color-paper-2); }
.tabbar a[aria-current="page"] { color: var(--color-ink); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: -2px; left: 25%; right: 25%; height: 2px; background: var(--color-accent); }
.tabbar a:focus-visible { outline-offset: -3px; }

@media (min-width: 60rem) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; gap: var(--space-2xs); margin-right: auto; margin-left: var(--space-lg); }
  .brand { margin-right: 0; }
  .topnav a {
    position: relative; display: inline-flex; align-items: center; height: var(--bar-h); padding: 0 var(--space-sm);
    color: var(--color-muted); text-decoration: none; font: 500 var(--text-sm)/1 var(--font-display);
    transition: color var(--dur-micro) var(--ease-out);
  }
  .topnav a:hover { color: var(--color-ink); }
  .topnav a[aria-current="page"] { color: var(--color-ink); }
  .topnav a[aria-current="page"]::after { content: ""; position: absolute; left: var(--space-sm); right: var(--space-sm); bottom: -2px; height: 2px; background: var(--color-accent); }
  .topnav a:focus-visible { outline-offset: -3px; }
  .search-shortcut { display: none; }
}

/* Página */
.page { max-width: var(--container); margin-inline: auto; padding: var(--space-lg) var(--gutter) var(--space-2xl); }
.pagehead { display: grid; gap: var(--space-2xs); margin-bottom: var(--space-lg); }
.pagehead p { color: var(--color-muted); font-size: var(--text-sm); }
.pagehead .crumb { font: 500 var(--text-sm)/1.3 var(--font-display); }
.section { margin-top: var(--space-xl); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-md); padding-bottom: var(--space-xs); border-bottom: var(--rule-bar) solid var(--color-rule-2); }
.section__head a { font: 500 var(--text-sm)/1.3 var(--font-display); white-space: nowrap; }
.notice { margin-bottom: var(--space-md); padding: var(--space-sm) var(--space-md); background: var(--color-paper-2); color: var(--color-ink); }
.notice--error { color: var(--color-error); }
.empty { padding: var(--space-lg) 0; color: var(--color-muted); }
.empty p + p { margin-top: var(--space-xs); }
@media (min-width: 60rem) {
  .page { padding-top: var(--space-xl); }
  h1 { font-size: var(--text-3xl); }
  .home { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-xl); align-items: start; }
  .home > .section { margin-top: 0; }
  .home__aside > .section:first-child { margin-top: 0; }
}

/* A folha (sheet): o destaque do Início */
.sheet { background: var(--color-sheet); border-top: var(--rule-bar) solid var(--color-ink); padding: var(--space-md); }
.sheet__date { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); padding-bottom: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); }
.sheet__date h2 { font-size: var(--text-xl); }
.sheet__date .num { color: var(--color-muted); font-size: var(--text-sm); }
.sheet__body { padding-top: var(--space-md); font-size: var(--text-lg); line-height: 1.6; color: var(--color-ink-2); max-width: var(--measure); }
.sheet__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); margin-top: var(--space-md); }
@media (min-width: 40rem) { .sheet { padding: var(--space-lg); } }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: var(--hit); padding: 0 var(--space-md);
  border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius-pill); background: transparent; color: var(--color-ink);
  font: 500 var(--text-sm)/1 var(--font-display); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.btn:hover { background: var(--color-paper-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.btn--primary:hover { background: var(--color-accent-2); border-color: var(--color-accent-2); }
.btn--quiet { border-color: var(--color-rule-2); }
.btn--danger { border-color: var(--color-rule-2); color: var(--color-error); }
.btn--block { width: 100%; }
@media (min-width: 60rem) { .btn { min-height: var(--control); } }

/* Listas com régua */
.rows { list-style: none; }
.rows > li { border-bottom: var(--rule-hair) solid var(--color-rule); }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); min-height: 52px; padding: var(--space-xs) var(--space-2xs);
  color: var(--color-ink); text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out);
}
a.row:hover { background: var(--color-paper-2); text-decoration: none; }
a.row:active { background: var(--color-paper-3); }
a.row:focus-visible { outline-offset: -2px; }
.row__title { font: 500 var(--text-md)/1.3 var(--font-display); min-width: 0; overflow-wrap: anywhere; }
.row__meta { color: var(--color-muted); font-size: var(--text-sm); white-space: nowrap; }
.letter { margin-top: var(--space-lg); padding-bottom: var(--space-2xs); font: 600 var(--text-sm)/1 var(--font-display); color: var(--color-muted); border-bottom: var(--rule-bar) solid var(--color-rule-2); }
.letter:first-child { margin-top: 0; }
.count { font-size: var(--text-sm); color: var(--color-muted); }

/* Números (livro-razão de 24h) */
.ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ledger > div { padding: var(--space-sm) 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
.ledger > div:nth-child(odd) { padding-right: var(--space-sm); }
.ledger > div:nth-child(even) { padding-left: var(--space-sm); border-left: var(--rule-hair) solid var(--color-rule); }
.ledger dt { font-size: var(--text-sm); color: var(--color-muted); }
.ledger dd { margin: var(--space-2xs) 0 0; font: 500 var(--text-xl)/1 var(--font-outlier); font-variant-numeric: tabular-nums; color: var(--color-ink); text-align: right; }

/* Tarefas */
.tasks { list-style: none; }
.task { display: grid; grid-template-columns: var(--hit) minmax(0, 1fr); gap: var(--space-xs); padding: var(--space-xs) 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
.task form { margin: 0; }
.check {
  display: grid; place-items: center; width: var(--hit); height: var(--hit); margin-top: calc(-1 * var(--space-2xs)); border: 0; background: transparent; color: var(--color-accent-ink); cursor: pointer;
}
.check__box {
  display: grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid var(--color-muted); border-radius: var(--radius-pill); background: transparent;
  transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.check:hover .check__box { border-color: var(--color-accent); }
.check:active .check__box { transform: scale(0.92); }
.check:focus-visible { outline-offset: -6px; }
.check .icon { width: 16px; height: 16px; stroke-width: 2.4; opacity: 0; }
.task--done .check__box { background: var(--color-accent); border-color: var(--color-accent); }
.task--done .check .icon { opacity: 1; }
.task__text { padding-top: var(--space-2xs); color: var(--color-ink); line-height: 1.45; overflow-wrap: anywhere; }
.task--done .task__text { color: var(--color-muted); text-decoration: line-through; text-decoration-color: var(--color-rule-2); }
.task--done .task__text a { color: var(--color-muted); }
.task__meta { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); margin-top: var(--space-2xs); font-size: var(--text-sm); color: var(--color-muted); }
.task__meta .num { font-size: 0.8125rem; }
.task__meta .due { color: var(--color-ink); }
.task:target { background: var(--color-paper-2); }
/* Conclusão via tasks.js: marca na hora, pulsa até o servidor confirmar, recolhe se sair do filtro */
.task__text { transition: color var(--dur-micro) var(--ease-out); }
.check .icon { transition: opacity var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); transform: scale(0.6); }
.task--done .check .icon { transform: scale(1); }
.task--pending .check { cursor: progress; }
.task--pending .check__box { animation: task-pending 0.9s var(--ease-out) infinite alternate; }
@keyframes task-pending { from { opacity: 1; } to { opacity: 0.45; } }
.task--leaving { overflow: hidden; opacity: 0; padding-block: 0; border-bottom-color: transparent; transition: height 260ms var(--ease-out), opacity 200ms var(--ease-out), padding 260ms var(--ease-out); }

/* Busca */
.searchbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-xs); margin-bottom: var(--space-md); }
.input {
  min-height: var(--hit); width: 100%; padding: 0 var(--space-sm); border: var(--rule-hair) solid var(--color-muted); border-radius: var(--radius-pill);
  background: var(--color-sheet); color: var(--color-ink); font-size: var(--text-md);
}
.input::placeholder { color: var(--color-muted); }
.input:hover { border-color: var(--color-ink); }
.input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -1px; }
.hit { padding: var(--space-sm) var(--space-2xs); }
.hit__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); }
.hit__head a { font: 500 var(--text-md)/1.3 var(--font-display); }
.hit__folder { font-size: var(--text-sm); color: var(--color-muted); white-space: nowrap; }
.hit__snippet { margin-top: var(--space-2xs); color: var(--color-ink-2); font-size: var(--text-sm); line-height: 1.5; }
mark { background: var(--color-mark); color: var(--color-ink); padding: 0 1px; }

/* Nota */
.props { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-lg); margin: 0 0 var(--space-lg); padding-bottom: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); font-size: var(--text-sm); }
.props div { display: flex; gap: var(--space-xs); }
.props dt { color: var(--color-muted); }
.props dd { margin: 0; color: var(--color-ink); }
.prose { max-width: var(--measure); font-size: var(--text-lg); line-height: 1.7; color: var(--color-ink-2); }
.prose > * + * { margin-top: var(--space-md); }
.prose h1, .prose h2 { margin-top: var(--space-xl); padding-bottom: var(--space-xs); border-bottom: var(--rule-bar) solid var(--color-rule-2); font-size: var(--text-xl); }
.prose h3 { margin-top: var(--space-lg); font-size: var(--text-lg); }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: var(--space-xs); }
.prose li::marker { color: var(--color-muted); }
.prose li:has(> input[type="checkbox"]) { list-style: none; margin-left: -1.25em; }
.prose input[type="checkbox"] { accent-color: var(--color-accent); margin-right: var(--space-xs); }
.prose blockquote { margin-inline: 0; padding: var(--space-sm) var(--space-md); background: var(--color-paper-2); color: var(--color-ink); }
.prose code { font-family: var(--font-outlier); font-size: 0.875em; background: var(--color-paper-2); padding: 0 var(--space-3xs); }
.prose pre { overflow-x: auto; background: var(--color-paper-2); padding: var(--space-sm); }
.prose pre code { background: transparent; padding: 0; }
.prose img { max-width: 100%; height: auto; }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; font-size: var(--text-md); }
.prose th { text-align: left; font-weight: 500; color: var(--color-muted); border-bottom: var(--rule-bar) solid var(--color-rule-2); padding: var(--space-xs) var(--space-sm) var(--space-xs) 0; }
.prose td { border-top: var(--rule-hair) solid var(--color-rule); padding: var(--space-xs) var(--space-sm) var(--space-xs) 0; }
.prose hr { border: 0; border-top: var(--rule-hair) solid var(--color-rule); }

/* Sessões */
.sessions { list-style: none; }
.session { padding: var(--space-md) 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
.session__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); }
.session__head h2 { font-size: var(--text-md); }
.session dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2xs) var(--space-md); margin: var(--space-sm) 0 0; font-size: var(--text-sm); }
.session dt { color: var(--color-muted); }
.session dd { margin: 0; color: var(--color-ink); overflow-wrap: anywhere; }
.tag { display: inline-block; padding: var(--space-3xs) var(--space-xs); border: var(--rule-hair) solid var(--color-accent); color: var(--color-ink); font: 500 var(--text-xs)/1.3 var(--font-display); white-space: nowrap; }

/* Telas de acesso (login, link, avisos) */
.auth { padding-bottom: 0; display: grid; min-height: 100dvh; align-content: start; }
.auth__in { width: 100%; max-width: 30rem; margin-inline: auto; padding: var(--space-xl) var(--gutter); }
.auth__brand { display: inline-block; margin-bottom: var(--space-xl); }
.auth .sheet { display: grid; gap: var(--space-md); }
.auth .sheet p { color: var(--color-ink-2); }
.code-big {
  display: block; padding: var(--space-md); background: var(--color-paper-2); color: var(--color-ink); text-align: center; user-select: all;
  font: 500 var(--text-3xl)/1 var(--font-outlier); font-variant-numeric: tabular-nums; letter-spacing: 0.06em;
}
.msg { min-height: 1.55em; color: var(--color-muted); }
.msg.error { color: var(--color-error); }
.auth__foot { display: flex; justify-content: space-between; gap: var(--space-md); margin-top: var(--space-md); font-size: var(--text-sm); }
.auth__foot form { margin: 0; }
@media (min-width: 40rem) { .auth__in { padding-top: 12vh; } }
.num-title { font-family: var(--font-outlier); font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.session__actions { margin-top: var(--space-sm); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .btn:active, .check:active .check__box { transform: none; }
}
.prose strong, .prose b { font-weight: 500; color: var(--color-ink); }
@media (max-width: 39.99rem) {
  .sheet__body { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; line-clamp: 7; overflow: hidden; }
}

/* Revisão: desktop mostra Sessões e Sair na barra; o menu fica só com o tema */
.topbar__desk, .menu__desk-label { display: none; }
@media (min-width: 60rem) {
  a.topbar__desk { display: inline-flex; align-items: center; height: var(--bar-h); padding: 0 var(--space-sm); color: var(--color-muted); text-decoration: none; font: 500 var(--text-sm)/1 var(--font-display); transition: color var(--dur-micro) var(--ease-out); }
  a.topbar__desk:hover, a.topbar__desk[aria-current="page"] { color: var(--color-ink); }
  form.topbar__desk { display: block; margin: 0 0 0 var(--space-xs); }
  .menu__mobile { display: none !important; }
  .menu > summary.iconbtn { width: auto; gap: var(--space-xs); padding: 0 var(--space-sm); font: 500 var(--text-sm)/1 var(--font-display); color: var(--color-muted); }
  .menu > summary.iconbtn:hover { color: var(--color-ink); }
  .menu > summary .icon { display: none; }
  .menu__desk-label { display: inline; }
  .menu__panel { padding-top: var(--space-2xs); }
}
/* Revisão: números com autoridade; faixa com largura limitada */
.ledger { max-width: 34rem; }
.ledger dd { font-size: var(--text-2xl); }
/* Revisão: login sem vãos vazios */
.auth .sheet { display: block; }
.auth .sheet > * + * { margin-top: var(--space-md); }
.auth .sheet > .msg:empty { margin-top: 0; min-height: 0; }
/* Revisão: nota numa só medida; alvo de toque maior nas datas das tarefas */
.note-page { max-width: 46rem; }
.task__meta a { display: inline-block; padding-block: var(--space-xs); margin-block: calc(-1 * var(--space-xs)); }
.sheet__yesterday { white-space: nowrap; }

/* WhatsApp: botão ao lado de cada pessoa */
.wa {
  display: inline-grid; place-items: center; width: 28px; height: 28px; margin: calc(-1 * var(--space-2xs)) 0 calc(-1 * var(--space-2xs)) var(--space-2xs); vertical-align: middle;
  color: var(--color-muted); text-decoration: none; border-radius: var(--radius-pill);
  transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out);
}
.wa .icon { width: 18px; height: 18px; }
.wa:hover { color: var(--color-accent); background: var(--color-paper-2); }
.wa:active { background: var(--color-paper-3); }
.rows > li:has(> .wa) { display: flex; align-items: center; }
.rows > li:has(> .wa) > .row { flex: 1; min-width: 0; }
.rows > li > .wa { width: var(--hit); height: var(--hit); margin: 0; }
.pagehead__actions { margin-top: var(--space-sm); }
.pagehead__actions .btn .icon { width: 18px; height: 18px; }

/* Tarefas: abas, filtros, paginação, seleção em massa */
.pagehead--split { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--space-md); }
.tabs { display: flex; gap: 0; margin-bottom: var(--space-sm); border-bottom: var(--rule-bar) solid var(--color-rule-2); overflow-x: auto; scrollbar-width: none; }
.tabs a {
  position: relative; display: inline-flex; align-items: center; gap: var(--space-xs); min-height: var(--hit); padding: 0 var(--space-md);
  color: var(--color-muted); text-decoration: none; font: 500 var(--text-sm)/1 var(--font-display); white-space: nowrap;
  transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out);
}
.tabs a:first-child { padding-left: var(--space-2xs); }
.tabs a:hover { color: var(--color-ink); }
.tabs a:active { background: var(--color-paper-2); }
.tabs a[aria-current="page"] { color: var(--color-ink); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: var(--space-md); right: var(--space-md); bottom: -2px; height: 2px; background: var(--color-accent); }
.tabs a:first-child[aria-current="page"]::after { left: var(--space-2xs); }
.tabs a:focus-visible { outline-offset: -3px; }
.tabs .num { font-size: var(--text-xs); color: var(--color-muted); }
.filters { margin-bottom: var(--space-sm); }
.filters > summary { list-style: none; cursor: pointer; }
.filters > summary::-webkit-details-marker { display: none; }
.filters[open] > summary { background: var(--color-paper-2); }
.filters__form { display: grid; gap: var(--space-sm); margin-top: var(--space-sm); padding: var(--space-md); background: var(--color-sheet); border-top: var(--rule-bar) solid var(--color-ink); }
.field { display: grid; gap: var(--space-2xs); }
.field > span { font-size: var(--text-sm); color: var(--color-muted); }
select.input { appearance: none; padding-right: var(--space-xl); background-image: linear-gradient(45deg, transparent 50%, var(--color-muted) 50%), linear-gradient(135deg, var(--color-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.filters__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); }
@media (min-width: 40rem) {
  .filters__form { grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr) minmax(0, 1fr); align-items: end; }
  .filters__actions { grid-column: 1 / -1; }
}
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-sm); margin-top: var(--space-lg); }
.pager > :last-child { justify-self: end; }
.notice--ok { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.notice--ok form { margin: 0; }
.task--select { grid-template-columns: var(--hit) minmax(0, 1fr); }
.pick { display: grid; place-items: center; width: var(--hit); height: var(--hit); margin-top: calc(-1 * var(--space-2xs)); cursor: pointer; }
.pick input { width: 20px; height: 20px; margin: 0; accent-color: var(--color-accent); cursor: pointer; }
.task--select:has(input:checked) { background: var(--color-paper-2); }
.bulkbar {
  position: sticky; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); z-index: var(--z-dropdown);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm);
  margin-top: var(--space-md); padding: var(--space-sm) var(--space-md); background: var(--color-sheet); border-top: var(--rule-bar) solid var(--color-ink);
}
.bulkbar__all { font: 500 var(--text-sm)/1.3 var(--font-display); }
.bulkbar__actions { display: flex; gap: var(--space-xs); }
@media (min-width: 60rem) { .bulkbar { bottom: 0; } }
