/* Layout: phone-first single column (max 560px), sticky header with night-mode switch, five views behind a fixed bottom tab bar, bottom sheet for forms */
:root {
  --paper: #DCE3DF;
  --card: #F3F6F4;
  --ink: #0E1D19;
  --muted: #475752;
  --line: #C0CCC6;
  --accent: #134536;
  --accent-ink: #FFFFFF;
  --hi: #E6C02F;
  --danger: #A12F1E;
  --warn: #8F5A00;
  --ok: #1A5E3A;
  --margin: #B23A26;
  --rule: #BCCDC5;
  --shadow: 0 1px 2px rgba(10,30,25,.10), 0 6px 18px rgba(10,30,25,.10);
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0A0F0D; --card: #131A18; --ink: #E0E9E5; --muted: #8A9A94; --line: #24302C;
    --accent: #6ABFA4; --accent-ink: #07120E; --hi: #D4B236; --danger: #EE7B64; --warn: #E0AA45; --ok: #6BC08B;
    --margin: #C9574A; --rule: #24312D;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0A0F0D; --card: #131A18; --ink: #E0E9E5; --muted: #8A9A94; --line: #24302C;
  --accent: #6ABFA4; --accent-ink: #07120E; --hi: #D4B236; --danger: #EE7B64; --warn: #E0AA45; --ok: #6BC08B;
  --margin: #C9574A; --rule: #24312D;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);
  color-scheme: dark;
}
html, body { background: var(--paper); color: var(--ink); }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; scroll-padding-top: 96px; scroll-padding-bottom: 110px; }
body { font-family: var(--f-body); font-size: 15px; line-height: 1.45; -webkit-tap-highlight-color: transparent; transition: background-color .2s; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
* { box-sizing: border-box; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.app { max-width: 560px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0 calc(96px + env(safe-area-inset-bottom, 0px)); }

header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--paper); padding-block: 14px 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.top-right { display: grid; justify-items: end; gap: 6px; }
.eyebrow { font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
h1 { font-family: var(--f-display); font-weight: 800; font-size: 28px; line-height: 1.1; margin: 2px 0 0; text-wrap: balance; }
h1 .mark { background: linear-gradient(transparent 58%, var(--hi) 58%, var(--hi) 92%, transparent 92%); padding: 0 2px; }
:root[data-theme="dark"] h1 .mark { background: linear-gradient(transparent 58%, color-mix(in srgb, var(--hi) 45%, transparent) 58%, color-mix(in srgb, var(--hi) 45%, transparent) 92%, transparent 92%); }
h2 { font-family: var(--f-display); font-weight: 600; font-size: 17px; margin: 0; }
.sync { font-size: 12px; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.sync.ok .dot { background: var(--ok); }
.sync.warn .dot { background: var(--warn); }
.theme-btn { border: 1px solid var(--line); background: var(--card); border-radius: 999px; min-height: 36px; padding: 4px 12px 4px 10px; display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
header.top > div:first-child { min-width: 0; }
.theme-btn svg { width: 16px; height: 16px; }

main { display: grid; gap: 22px; padding-top: 16px; }
section { display: grid; gap: 10px; min-width: 0; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sec-head .eyebrow { white-space: nowrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; min-width: 0; }
/* The one bold move: "Agora" is a ruled index card (ficha pautada) with a red header line, every text row sitting on a rule */
.now {
  --lh: 28px;
  box-shadow: var(--shadow); border: none; display: grid; gap: 0; position: relative; overflow: hidden;
  padding: 12px 16px 14px 22px;
  background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--lh) - 1px), var(--rule) calc(var(--lh) - 1px) var(--lh)) content-box, var(--card) border-box;
}
.now::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--c, var(--accent)); }
.now > * { line-height: var(--lh); min-width: 0; }
.now .label { line-height: calc(var(--lh) - 2px); border-bottom: 2px solid var(--margin); font-size: 13px; font-weight: 700; color: var(--c, var(--accent)); font-variant-numeric: tabular-nums; }
.now .title { font-family: var(--f-display); font-weight: 800; font-size: 22px; overflow-wrap: anywhere; }
.now .meta { color: var(--muted); font-size: 14px; }
.now .linkbtn { line-height: var(--lh); padding: 0; margin: 0; }

.reminders { display: grid; gap: 8px; }
.remind { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; background: var(--ink); color: var(--paper); border-radius: 12px; padding: 10px 12px; }
.remind svg { width: 20px; height: 20px; color: var(--hi); }
.remind .t { font-weight: 700; overflow-wrap: anywhere; }
.remind .s { font-size: 12px; opacity: .8; }
.remind button { background: none; border: 1px solid currentColor; color: inherit; border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 700; }

.list { display: grid; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); min-width: 0; }
.row:first-child { border-top: none; }
.row .main { min-width: 0; }
.row .t { font-weight: 700; overflow-wrap: anywhere; }
.row .s { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.sub { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.time { font-family: var(--f-mono); font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; line-height: 1.3; }
.time b { color: var(--ink); font-weight: 500; display: block; }
.time .noted { display: block; color: var(--accent); font-family: var(--f-body); font-size: 11.5px; font-weight: 700; margin-top: 2px; }
.swatch { width: 10px; height: 34px; border-radius: 4px; background: var(--c); }
.row.done .t { text-decoration: line-through; color: var(--muted); }
.row.past .swatch { opacity: .35; }
.row.past .t, .row.past .time b { color: var(--muted); }
.tapline { background: none; border: none; padding: 0; text-align: left; width: 100%; min-width: 0; }

.check { position: relative; width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--c, var(--line)); background: transparent; display: grid; place-items: center; padding: 0; }
.check::after { content: ""; position: absolute; inset: -9px; }
.check svg { width: 14px; height: 14px; opacity: 0; }
.check.on { background: var(--c, var(--accent)); }
.check.on svg { opacity: 1; }
.check svg path { stroke: var(--card); }

.chip { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 3px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line); color: var(--muted); }
.chip.late, .chip.today { color: var(--danger); border-color: currentColor; }
.chip.soon { color: var(--warn); border-color: currentColor; }
.type { font-size: 12px; color: var(--c); font-weight: 700; }

.days { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.days button { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 0 6px; display: grid; gap: 2px; justify-items: center; }
.days button .d { font-size: 12px; font-weight: 700; }
.days button .n { font-family: var(--f-display); font-weight: 800; font-size: 18px; }
.pips { display: flex; gap: 2px; height: 5px; justify-content: center; }
.pips i { width: 5px; height: 5px; border-radius: 50%; background: var(--c); }
.days button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.days button.istoday:not([aria-pressed="true"]) { border-color: var(--accent); }

.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.month-nav h2 { text-transform: capitalize; }
.month-nav button { border: 1px solid var(--line); background: var(--card); border-radius: 10px; width: 38px; height: 38px; display: grid; place-items: center; }
.month-nav button svg { width: 18px; height: 18px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .wd { font-size: 12px; font-weight: 700; text-align: center; color: var(--muted); padding-bottom: 2px; }
.cal button { min-height: 62px; max-width: 100%; min-width: 0; overflow: hidden; border: 1px solid var(--line); background: var(--card); border-radius: 9px; padding: 4px 2px; display: grid; grid-template-rows: auto 1fr; justify-items: stretch; align-content: start; gap: 3px; }
.cal button .n { font-family: var(--f-display); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; text-align: center; }
.tags { display: grid; gap: 2px; min-width: 0; }
.tags i { font-style: normal; font-size: 10px; font-weight: 700; line-height: 1.45; border-radius: 3px; padding: 0 2px; background: var(--c); color: var(--card); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.tags i.more { background: transparent; color: var(--muted); }
.cal button[aria-pressed="true"] .tags i:not(.more) { outline: 1px solid var(--accent-ink); }
.cal button[aria-pressed="true"] .tags i.more { color: var(--accent-ink); }
.cal .blank { visibility: hidden; }
.cal button.weekend { background: transparent; }
.cal button.has-exam .n { color: var(--danger); font-weight: 800; }
.cal button.istoday { border-color: var(--accent); border-width: 2px; }
.cal button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.cal button[aria-pressed="true"] .n { color: var(--accent-ink); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.legend b { color: var(--danger); }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 9px 14px; font-size: 13.5px; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.subj { display: grid; gap: 10px; border-left: 6px solid var(--c); }
.subj-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.subj-top .main { min-width: 0; }
.subj .name { font-family: var(--f-display); font-weight: 800; font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.subj-links { display: flex; gap: 16px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--paper); border-radius: 10px; padding: 10px; display: grid; gap: 6px; min-width: 0; align-content: start; }
.stat .k { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.stat .v { font-family: var(--f-display); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1; }
.stat .v small { font-size: 13px; font-weight: 600; color: var(--muted); }
.stat .note { font-size: 12px; color: var(--muted); }
.need { font-size: 13px; font-weight: 700; border-radius: 8px; padding: 6px 8px; background: var(--card); border: 1px solid var(--line); }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); }
.bar i.warn { background: var(--warn); }
.bar i.danger { background: var(--danger); }
.bar.big { height: 10px; border-radius: 5px; }
.bar.big i { background: var(--accent); }
.stepper { display: flex; gap: 6px; }
.stepper button { flex: 1; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 8px 0; font-size: 17px; font-weight: 700; line-height: 1; }
.good { color: var(--ok); } .bad { color: var(--danger); } .mid { color: var(--warn); }

.hours-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.hours-big { font-family: var(--f-display); font-weight: 800; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.hours-big small { font-size: 16px; color: var(--muted); font-weight: 600; }
.cats { display: flex; flex-wrap: wrap; gap: 6px; }

.notes-list { display: grid; gap: 8px; }
.note-item { background: var(--paper); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; }
.note-item .h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.note-item .d { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.note-item p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-item .acts { display: flex; gap: 12px; }

.empty { text-align: center; padding: 26px 16px; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.empty strong { color: var(--ink); font-family: var(--f-display); font-size: 18px; }
.btn { border: none; border-radius: 10px; padding: 11px 16px; font-weight: 700; background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn.danger.armed { background: var(--danger); color: var(--card); }
.linkbtn { background: none; border: none; color: var(--accent); font-weight: 700; padding: 10px 0; margin: -10px 0; font-size: 13.5px; }
.linkbtn.danger { color: var(--danger); }
.notice { font-size: 13px; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; }

nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
nav.tabs .in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
nav.tabs button { background: none; border: none; padding: 9px 0 10px; display: grid; justify-items: center; gap: 3px; font-size: 11px; color: var(--muted); min-width: 0; }
nav.tabs button svg { width: 22px; height: 22px; }
nav.tabs button[aria-current="page"] { color: var(--ink); font-weight: 700; }
nav.tabs button[aria-current="page"] svg { color: var(--accent); }
nav.tabs button[aria-current="page"] span { background: linear-gradient(transparent 55%, var(--hi) 55%, var(--hi) 95%, transparent 95%); padding: 0 3px; }
:root[data-theme="dark"] nav.tabs button[aria-current="page"] span { background: linear-gradient(transparent 55%, color-mix(in srgb, var(--hi) 45%, transparent) 55%, color-mix(in srgb, var(--hi) 45%, transparent) 95%, transparent 95%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) nav.tabs button[aria-current="page"] span { background: linear-gradient(transparent 55%, color-mix(in srgb, var(--hi) 45%, transparent) 55%, color-mix(in srgb, var(--hi) 45%, transparent) 95%, transparent 95%); }
}
.fab { position: fixed; z-index: 7; right: max(16px, calc(50% - 264px), env(safe-area-inset-right, 0px)); bottom: calc(76px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; border-radius: 18px; border: none; background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); display: grid; place-items: center; }
.fab svg { width: 26px; height: 26px; }

.overlay { position: fixed; inset: 0; z-index: 20; background: rgba(4,10,8,.6); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); width: 100%; max-width: 560px; max-height: 92%; overflow-y: auto; border-radius: 20px 20px 0 0; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 10px calc(20px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; animation: up .2s ease-out; overscroll-behavior: contain; }
.sheet:focus { outline: none; }
.sheet:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } body { transition: none; } }
.grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); justify-self: center; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sheet-head .sub { font-size: 13px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-width: 0; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 10px 12px; }
.field textarea { min-height: 90px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: none; background: var(--paper); padding: 9px 0; font-size: 13px; border-left: 1px solid var(--line); min-width: 0; }
.seg button:first-child { border-left: none; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); font-weight: 700; }
.colors { display: flex; flex-wrap: wrap; gap: 8px; }
.colors button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; background: var(--c); }
.colors button[aria-pressed="true"] { border-color: var(--ink); }
.slot { display: grid; grid-template-columns: 1.1fr 1fr 1fr auto; gap: 6px; align-items: center; }
.slot select, .slot input, .grade input { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 8px 6px; min-width: 0; width: 100%; font-size: 14px; }
.x { border: none; background: none; color: var(--muted); font-size: 22px; line-height: 1; width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 10px; flex: none; }
.grade { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 6px; align-items: center; }
.actions { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.actions .right { display: flex; gap: 10px; margin-left: auto; }
.picker { display: grid; gap: 10px; }
.picker button { text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 14px; display: grid; gap: 2px; }
.picker b { font-family: var(--f-display); font-size: 17px; }
.picker span { color: var(--muted); font-size: 13px; }
.toast { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(144px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: calc(100% - 32px); }

/* ---------- standalone app additions ---------- */
html, body { margin: 0; }
[hidden] { display: none !important; }
img { max-width: 100%; }
#appRoot { padding-top: env(safe-area-inset-top, 0px); }
.top-btns { display: flex; gap: 6px; }
.theme-btn.icon-only { padding: 4px 6px; }
a { color: var(--accent); }

.auth { max-width: 440px; margin: 0 auto; min-height: 100vh; display: grid; align-content: center; gap: 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: calc(24px + env(safe-area-inset-top, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)); }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand img { border-radius: 14px; }
.auth-card { display: grid; gap: 12px; box-shadow: var(--shadow); }
.auth-card .sub { margin: 0; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 13px; color: var(--muted); }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.form-msg { margin: 0; font-size: 14px; font-weight: 700; }
.auth-switch { text-align: center; color: var(--muted); font-size: 14px; }
.auth-switch .linkbtn { font-size: 14px; }
.auth-foot { text-align: center; font-size: 12px; margin: 0; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who .main { display: grid; min-width: 0; }
.who b { font-family: var(--f-display); font-size: 18px; overflow-wrap: anywhere; }
.avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 22px; }

.install-card { display: grid; gap: 10px; border-style: dashed; }
.install-acts { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.steps { display: grid; gap: 4px; }
.steps h3 { font-family: var(--f-display); font-size: 15px; margin: 0; }
.steps ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.btn:disabled { opacity: .6; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) h1 .mark { background: linear-gradient(transparent 58%, color-mix(in srgb, var(--hi) 45%, transparent) 58%, color-mix(in srgb, var(--hi) 45%, transparent) 92%, transparent 92%); }
}

/* ---------- import screens ---------- */
.import-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .import-grid { grid-template-columns: 1fr; } }
.import-btn { text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.import-btn b { font-family: var(--f-display); font-size: 15px; }
.import-btn span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.pdf-drop { display: grid; gap: 8px; justify-items: start; border-style: dashed; border-width: 2px; }
.pdf-drop label.btn { cursor: pointer; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pdf-drop:focus-within label.btn { outline: 2px solid var(--accent); outline-offset: 2px; }
.help { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--paper); display: grid; gap: 10px; }
.help summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.help[open] { gap: 10px; }
.help[open] > * + * { margin-top: 10px; }
.howto { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.imp-row { align-items: start; }
.imp-row input[type="checkbox"] { width: 22px; height: 22px; margin: 6px 0 0; accent-color: var(--accent); }
.imp-name { width: 100%; min-width: 0; font-weight: 700; border: 1px solid transparent; border-radius: 8px; background: transparent; padding: 4px 6px; margin-left: -6px; }
.imp-name:hover, .imp-name:focus { border-color: var(--line); background: var(--paper); }
.notice.bad { color: var(--danger); border-color: var(--danger); }
.cal-add { display: grid; gap: 10px; }
.cal-add h3 { font-family: var(--f-display); font-size: 15px; margin: 0; }
.cal-row { align-items: start; }
.cal-acts { display: grid; gap: 8px; justify-items: end; }

.sheet.still { animation: none; }

/* ---------- accessibility and interaction states ---------- */
.skip { position: absolute; left: 16px; top: -200px; z-index: 40; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: calc(8px + env(safe-area-inset-top, 0px)); }
main:focus { outline: none; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.btn:active, .fab:active { transform: translateY(1px); }
@media (hover: hover) {
  .btn:hover { background: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
  .btn.ghost:hover { background: var(--paper); border-color: var(--muted); }
  .btn.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
  .btn.danger.armed:hover { background: var(--danger); }
  .theme-btn:hover, .filters button:not([aria-pressed="true"]):hover, .days button:not([aria-pressed="true"]):hover,
  .cal button:not([aria-pressed="true"]):hover, .month-nav button:hover, .import-btn:hover, .picker button:hover,
  .stepper button:hover, .seg button:not([aria-pressed="true"]):hover { border-color: var(--muted); }
  .linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
  .tapline:hover .t { text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 3px; }
  .x:hover { background: var(--paper); color: var(--ink); }
  nav.tabs button:hover { color: var(--ink); }
}
