/* ============================================================
   Balance · styles
   Palette and type from marisolcornejo.com and Keybending.
   ============================================================ */

/* OpenDyslexic, self-hosted. SIL Open Font License — see fonts/OFL.txt. */
@font-face { font-family: 'OpenDyslexic'; src: url('../fonts/OpenDyslexic-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'OpenDyslexic'; src: url('../fonts/OpenDyslexic-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --clay:   #A0522D;
  --rust:   #8B3A2A;
  --gold:   #C9973A;
  --gold-soft: #E7C77F;
  --sage:   #7A9E7E;
  --sage-deep: #4F7454;
  --cream:  #FAF5EC;
  --sand:   #E8D5B0;
  --sand-soft: #F1E6CF;
  --indigo: #2B2D42;
  --indigo-soft: #4A4D6B;
  --text:   #1C1A17;
  --muted:  #6B645A;
  --paper:  #FFFDF8;

  /* Debit is always blue and on the left; credit is always orange and on the right.
     Blue/orange stays apart for every common kind of colour blindness, and the
     words and arrows carry the meaning without the colour. */
  --dr: #3E5C8A;
  --dr-soft: #DCE5F2;
  --cr: #B4531F;
  --cr-soft: #F6DECF;

  --serif-display: 'DM Serif Display', Georgia, serif;
  --serif-body: 'Crimson Pro', Georgia, serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --head-scale: 1;
  --body-leading: 1.5;
  --body-tracking: 0;
  --body-words: normal;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -14px rgba(28, 26, 23, .28);
  --shadow-soft: 0 4px 14px -8px rgba(28, 26, 23, .25);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 64px;
}

/* ---------- reading font ---------- */
:root[data-font="easy"] {
  --serif-display: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', Verdana, sans-serif;
  --serif-body: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', Verdana, sans-serif;
  --mono: 'Atkinson Hyperlegible Mono', 'JetBrains Mono', Menlo, monospace;
  --head-scale: .92;
  --body-leading: 1.62;
  --body-tracking: .01em;
  --body-words: .06em;
}
:root[data-font="dyslexic"] {
  --serif-display: 'OpenDyslexic', 'Atkinson Hyperlegible Next', Verdana, sans-serif;
  --serif-body: 'OpenDyslexic', 'Atkinson Hyperlegible Next', Verdana, sans-serif;
  --mono: 'OpenDyslexic', 'Atkinson Hyperlegible Mono', Menlo, monospace;
  --head-scale: .8;
  --body-leading: 1.7;
  --body-tracking: .01em;
  --body-words: .09em;
}
/* No italics anywhere in this app: the content has no italic markup, and the
   few muted notes are set upright in every font. */
:root:not([data-font="storybook"]) .eyebrow { font-weight: 600; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(201, 151, 58, .12), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(122, 158, 126, .12), transparent 55%),
    var(--cream);
  font-family: var(--serif-body); font-size: 19px;
  line-height: var(--body-leading); letter-spacing: var(--body-tracking); word-spacing: var(--body-words);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--serif-display); font-weight: 400; line-height: 1.15; margin: 0; }
:root:not([data-font="storybook"]) :is(h1, h2, h3, h4) { font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: calc(clamp(2.1rem, 4.2vw, 3.2rem) * var(--head-scale)); }
h2 { font-size: calc(clamp(1.5rem, 2.5vw, 2.05rem) * var(--head-scale)); }
h3 { font-size: calc(1.3rem * var(--head-scale)); }
p { margin: 0 0 .8em; }
a { color: var(--clay); }
strong { font-weight: 700; color: var(--indigo); }
small, .small { font-size: .9rem; }
.muted { color: var(--muted); }
.eyebrow { color: var(--clay); letter-spacing: .02em; font-size: 1rem; }
.center { text-align: center; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--indigo); color: var(--cream); padding: .4rem .8rem; border-radius: 8px; }
.skip:focus { left: 8px; }

button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px;
}
main[tabindex]:focus, main[tabindex]:focus-visible { outline: none; }

/* ---------- header / footer ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .3rem clamp(12px, 4vw, 40px);
  background: rgba(250, 245, 236, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 151, 58, .25);
}
.brand { font-family: var(--serif-display); font-size: 1.45rem; color: var(--indigo); text-decoration: none; display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: .15rem; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { text-decoration: none; color: var(--indigo); padding: .4rem .75rem; border-radius: 999px; font-size: 1rem; transition: background .2s; white-space: nowrap; }
.site-nav a:hover, .site-nav a.active { background: rgba(201, 151, 58, .2); }
.site-nav a.active { font-weight: 700; }
.nav-out { border: 1px solid rgba(201, 151, 58, .45); margin-left: .3rem; }
.icon-btn { background: transparent; border: 0; cursor: pointer; padding: .5rem; border-radius: 50%; display: inline-grid; place-items: center; color: var(--indigo); transition: background .2s; min-width: 40px; min-height: 40px; }
.icon-btn:hover { background: rgba(201, 151, 58, .18); }
.site-footer { text-align: center; color: var(--muted); font-size: .95rem; padding: 2.5rem 1rem 3rem; }
body.focus .site-footer { display: none; }

/* ---------- layout ---------- */
.app { max-width: 1060px; margin: 0 auto; padding: clamp(18px, 4vw, 40px) clamp(14px, 4vw, 40px) 20px; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.stack { display: grid; gap: 1.25rem; }
.card { background: var(--paper); border: 1px solid rgba(201, 151, 58, .35); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: clamp(18px, 2.6vw, 30px); }
.row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-title { margin: 2.2rem 0 .9rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 2px solid var(--clay); background: var(--clay); color: var(--cream);
  padding: .7rem 1.35rem; border-radius: 999px; font-size: 1.08rem; cursor: pointer; min-height: 48px;
  text-decoration: none; transition: transform .15s var(--ease), box-shadow .2s, background .2s;
  box-shadow: 0 8px 18px -12px rgba(160, 82, 45, .7);
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.big { font-size: 1.25rem; padding: .95rem 1.8rem; }
.btn.ghost { background: transparent; color: var(--clay); box-shadow: none; }
.btn.ghost:hover { background: rgba(160, 82, 45, .08); }
.btn.sage { background: var(--sage-deep); border-color: var(--sage-deep); }
.btn.quiet { background: transparent; border-color: rgba(43, 45, 66, .25); color: var(--indigo); box-shadow: none; }
.btn.small { font-size: .95rem; padding: .4rem .95rem; min-height: 40px; }
.btn kbd { font-family: var(--mono); font-size: .7em; background: rgba(255, 255, 255, .22); padding: .1rem .4rem; border-radius: 6px; }
.btn.ghost kbd, .btn.quiet kbd { background: rgba(160, 82, 45, .12); }
.actions { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; margin-top: 1.4rem; }
.actions .grow { flex: 1; }

/* ---------- debit / credit badges ---------- */
.dr, .cr {
  display: inline-flex; align-items: center; gap: .25em; font-weight: 700; font-size: .92em;
  padding: .02em .5em; border-radius: 999px; white-space: nowrap; line-height: 1.35; letter-spacing: 0; word-spacing: 0;
}
.dr { background: var(--dr-soft); color: var(--dr); }
.cr { background: var(--cr-soft); color: var(--cr); }
.dr::before { content: '←'; font-weight: 400; }
.cr::after { content: '→'; font-weight: 400; }

/* ---------- glossary terms inside text ---------- */
.term {
  background: none; border: 0; padding: 0 .05em; cursor: pointer; font: inherit; color: var(--indigo); font-weight: 600;
  text-decoration: underline; text-decoration-style: dotted; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: .22em;
  letter-spacing: inherit; word-spacing: inherit;
}
.term:hover { background: rgba(201, 151, 58, .18); border-radius: 4px; }

.type-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; padding: .1rem .6rem; border-radius: 999px; background: var(--sand-soft); color: var(--indigo); white-space: nowrap; }

/* ---------- sheets (term popup) ---------- */
dialog { color: var(--text); }
.sheet { border: 0; border-radius: var(--radius); padding: 0; width: min(520px, 94vw); background: var(--paper); box-shadow: 0 30px 60px -30px rgba(28, 26, 23, .6); }
.sheet::backdrop, .settings::backdrop { background: rgba(43, 45, 66, .45); }
.sheet-inner { padding: 1.3rem 1.5rem 1.5rem; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .6rem; }
.term-short { font-size: 1.2rem; }
.term-example { background: var(--sand-soft); padding: .8rem 1rem; border-radius: var(--radius-sm); }
.term-example::before { content: 'Example · '; font-weight: 700; color: var(--clay); }
.type-line { color: var(--muted); font-size: .95rem; }
@media (max-width: 640px) {
  .sheet { margin: auto auto 0; width: 100vw; max-width: 100vw; border-radius: var(--radius) var(--radius) 0 0; }
}

/* ---------- home ---------- */
.hello { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: stretch; }
.hello h1 { margin: .2rem 0 .5rem; }
.hello .lede { font-size: 1.2rem; color: var(--muted); max-width: 36ch; }
.next-card { background: linear-gradient(135deg, rgba(201, 151, 58, .2), rgba(122, 158, 126, .16)); border: 1px solid rgba(201, 151, 58, .45); border-radius: var(--radius); padding: 1.2rem 1.4rem; display: grid; gap: .5rem; align-content: start; }
.next-card .what { font-size: 1.3rem; font-weight: 700; color: var(--indigo); line-height: 1.25; }
.next-card .why { color: var(--muted); font-size: 1rem; }
.from-javier { border-left: 6px solid var(--gold); }
.asg { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .6rem 0; border-top: 1px dashed rgba(201, 151, 58, .4); }
.asg:first-of-type { border-top: 0; }
.asg .tick { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--sand); display: grid; place-items: center; font-size: .9rem; }
.asg.done .tick { background: var(--sage); border-color: var(--sage); color: var(--cream); }
.asg.done .asg-text { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(107, 100, 90, .5); }
.asg .note { color: var(--muted); font-size: .92rem; }

.units { display: grid; gap: 1rem; }
.unit { position: relative; overflow: hidden; padding: 0; }
.unit > summary { list-style: none; cursor: pointer; padding: 1.1rem 1.4rem; display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; }
.unit > summary::-webkit-details-marker { display: none; }
.unit .u-emoji { font-size: 2rem; width: 56px; height: 56px; border-radius: 16px; background: var(--sand-soft); display: grid; place-items: center; }
.unit .u-title { font-size: 1.3rem; font-weight: 700; color: var(--indigo); font-family: var(--serif-display); line-height: 1.2; }
.unit .u-tag { color: var(--muted); font-size: .98rem; }
.unit .u-meta { display: grid; justify-items: end; gap: .3rem; }
.unit .u-count { font-family: var(--mono); font-size: .85rem; color: var(--muted); white-space: nowrap; }
.unit .chev { transition: transform .2s; color: var(--muted); }
.unit[open] .chev { transform: rotate(90deg); }
.class-flag { font-size: .8rem; background: var(--indigo); color: var(--cream); padding: .15rem .6rem; border-radius: 999px; white-space: nowrap; }
.unit.is-class { border-color: var(--indigo-soft); box-shadow: 0 0 0 2px rgba(43, 45, 66, .12), var(--shadow-soft); }
.bar { height: 8px; border-radius: 99px; background: var(--sand-soft); overflow: hidden; width: 110px; }
.bar i { display: block; height: 100%; background: var(--sage); border-radius: 99px; }
.lesson-list { display: grid; gap: .4rem; padding: 0 1.4rem 1.3rem; }
.lesson-row {
  display: grid; grid-template-columns: 38px 1fr auto; gap: .8rem; align-items: center; text-decoration: none; color: inherit;
  padding: .6rem .8rem; border-radius: var(--radius-sm); background: rgba(232, 213, 176, .25); border: 1px solid transparent;
  transition: background .2s, transform .15s var(--ease);
}
.lesson-row:hover { background: rgba(232, 213, 176, .5); transform: translateX(3px); }
.lesson-row .num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--indigo); font-family: var(--mono); font-size: .85rem; }
.lesson-row.done .num { background: var(--sage); color: var(--cream); }
.lesson-row.next { border-color: rgba(201, 151, 58, .6); background: rgba(201, 151, 58, .14); }
.lesson-row.next .num { background: var(--gold); color: var(--indigo); }
.lesson-row .t { font-size: 1.05rem; line-height: 1.25; }
.lesson-row .s { color: var(--muted); font-size: .9rem; }
.lesson-row .state { color: var(--muted); font-size: .88rem; white-space: nowrap; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
.tile { text-align: left; padding: 1.1rem 1.2rem; border-radius: var(--radius); cursor: pointer; background: var(--paper); border: 1px solid rgba(201, 151, 58, .35); box-shadow: var(--shadow-soft); display: grid; gap: .3rem; transition: transform .15s var(--ease), box-shadow .2s; text-decoration: none; color: inherit; align-content: start; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile .em { font-size: 1.9rem; }
.tile h3 { font-size: 1.2rem; }
.tile p { color: var(--muted); font-size: .95rem; margin: 0; }
.tile .foot { font-size: .85rem; color: var(--sage-deep); font-weight: 600; margin-top: .3rem; }

/* ---------- lesson player ---------- */
.player { max-width: 800px; margin: 0 auto; display: grid; gap: 1rem; }
.player-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.crumbs { color: var(--muted); font-size: .95rem; }
.crumbs a { color: var(--muted); }
.dots { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.dots span { width: 12px; height: 12px; border-radius: 50%; background: var(--sand); }
.dots span.seen { background: var(--sage); }
.dots span.cur { background: var(--gold); transform: scale(1.3); }
.lesson-card { min-height: 340px; display: grid; gap: .9rem; align-content: start; animation: rise .3s var(--ease); }
.lesson-card h2 { color: var(--indigo); }
.lesson-card .body p { font-size: 1.12rem; max-width: 62ch; }
.kind { font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--clay); }
.player-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: .6rem; align-items: center; }
.player-nav .right { justify-self: end; }
.speak-btn[aria-pressed="true"] { background: rgba(62, 92, 138, .12); border-color: var(--dr); color: var(--dr); }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.goal { background: var(--sand-soft); border-radius: var(--radius-sm); padding: .7rem 1rem; }
.goal::before { content: '🎯 '; }

/* checks (lesson questions and practice multiple choice) */
.choices { display: grid; gap: .6rem; }
.choice {
  text-align: left; padding: .85rem 1.1rem; border-radius: var(--radius-sm); cursor: pointer; font-size: 1.08rem;
  background: var(--paper); border: 2px solid var(--sand); display: grid; grid-template-columns: 34px 1fr; gap: .7rem; align-items: center;
  transition: border-color .15s, background .15s; min-height: 56px;
}
.choice:hover:not(:disabled) { border-color: var(--gold); background: rgba(201, 151, 58, .08); }
.choice .letter { width: 32px; height: 32px; border-radius: 50%; background: var(--sand-soft); display: grid; place-items: center; font-family: var(--mono); font-size: .9rem; }
.choice.right { border-color: var(--sage-deep); background: rgba(122, 158, 126, .16); }
.choice.right .letter { background: var(--sage-deep); color: var(--cream); }
.choice.wrong { border-color: var(--clay); background: rgba(160, 82, 45, .07); }
.choice.wrong .letter { background: var(--clay); color: var(--cream); }
.choice:disabled { cursor: default; }
.feedback { border-radius: var(--radius-sm); padding: .8rem 1rem; font-size: 1.05rem; animation: rise .25s var(--ease); }
.feedback.good { background: rgba(122, 158, 126, .18); border-left: 5px solid var(--sage-deep); }
.feedback.try { background: rgba(201, 151, 58, .16); border-left: 5px solid var(--gold); }
.feedback .lead { font-weight: 700; margin-right: .3rem; }

.recap-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.recap-list li { display: grid; grid-template-columns: 30px 1fr; gap: .6rem; font-size: 1.12rem; padding: .6rem .8rem; background: rgba(122, 158, 126, .12); border-radius: var(--radius-sm); }
.recap-list li::before { content: '✓'; color: var(--sage-deep); font-weight: 700; }

/* ---------- visuals ---------- */
.visual { margin: .3rem 0; overflow-x: auto; }
.money { font-family: var(--mono); white-space: nowrap; letter-spacing: 0; word-spacing: 0; }

.eq { display: flex; align-items: stretch; justify-content: center; gap: .6rem; flex-wrap: wrap; }
.eq-box { min-width: 130px; flex: 1; max-width: 220px; padding: .8rem; border-radius: var(--radius-sm); background: var(--sand-soft); text-align: center; border: 2px solid transparent; display: grid; gap: .2rem; align-content: center; }
.eq-box .nm { font-weight: 700; color: var(--indigo); }
.eq-box .em { font-size: 1.5rem; }
.eq-box .v { font-family: var(--mono); font-size: 1.2rem; }
.eq-box .sub { font-size: .85rem; color: var(--muted); }
.eq-box.hi { border-color: var(--gold); background: rgba(201, 151, 58, .2); }
.eq-op { display: grid; place-items: center; font-size: 2rem; color: var(--muted); font-family: var(--mono); }
.eq-expanded { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; margin-top: .6rem; }
.eq-expanded span { font-size: .9rem; background: var(--paper); border: 1px dashed var(--gold); padding: .2rem .6rem; border-radius: 999px; }

table.fx { border-collapse: collapse; width: 100%; font-size: 1rem; min-width: 520px; }
table.fx th, table.fx td { padding: .45rem .6rem; border-bottom: 1px solid rgba(201, 151, 58, .3); text-align: right; }
table.fx th:first-child, table.fx td:first-child { text-align: left; }
table.fx th { font-size: .9rem; color: var(--muted); font-weight: 700; }
table.fx td.up { color: var(--sage-deep); }
table.fx td.down { color: var(--clay); }
table.fx td.zero { color: var(--muted); }
table.fx tr.total td { font-weight: 700; border-top: 2px solid var(--indigo); border-bottom: 0; }
table.fx .eqsign { color: var(--muted); text-align: center; width: 1.5rem; padding: 0; }

.taccts { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.tacct { min-width: 260px; max-width: 360px; flex: 1; }
.tacct .t-name { text-align: center; font-weight: 700; color: var(--indigo); border-bottom: 3px solid var(--indigo); padding-bottom: .25rem; }
.tacct .t-sides { display: grid; grid-template-columns: 1fr 1fr; }
.tacct .t-side { padding: .35rem .6rem; display: grid; gap: .15rem; align-content: start; min-height: 60px; }
.tacct .t-side.l { border-right: 3px solid var(--indigo); }
.tacct .t-head { font-size: .78rem; font-weight: 700; }
.tacct .t-side.l .t-head { color: var(--dr); }
.tacct .t-side.r .t-head { color: var(--cr); text-align: right; }
.tacct .t-line { display: flex; justify-content: space-between; gap: .4rem; font-size: .98rem; }
.tacct .t-side.r .t-line { flex-direction: row-reverse; }
.tacct .t-note { color: var(--muted); font-size: .8rem; }
.tacct .t-bal { border-top: 2px solid var(--muted); margin-top: .2rem; padding-top: .2rem; font-weight: 700; }

.journal { width: 100%; border-collapse: collapse; font-size: 1.02rem; min-width: 460px; }
.journal th { font-size: .82rem; text-align: left; padding: .3rem .5rem; border-bottom: 2px solid var(--indigo); }
.journal th.dr-h { color: var(--dr); text-align: right; }
.journal th.cr-h { color: var(--cr); text-align: right; }
.journal td { padding: .4rem .5rem; border-bottom: 1px solid rgba(201, 151, 58, .25); vertical-align: top; }
.journal td.date { color: var(--muted); white-space: nowrap; width: 4.5rem; }
.journal td.amt { text-align: right; width: 7rem; }
.journal td.amt.d { color: var(--dr); background: rgba(220, 229, 242, .45); }
.journal td.amt.c { color: var(--cr); background: rgba(246, 222, 207, .45); }
.journal td.acct.credit { padding-left: 2.2rem; }
.journal tr.memo td { color: var(--muted); font-size: .9rem; padding-left: 2.2rem; border-bottom: 2px solid rgba(201, 151, 58, .45); }

.stmt { max-width: 560px; margin: 0 auto; background: var(--paper); border: 1px solid rgba(201, 151, 58, .45); border-radius: var(--radius-sm); padding: 1rem 1.2rem; }
.stmt-head { text-align: center; margin-bottom: .6rem; line-height: 1.3; }
.stmt-head .co { font-weight: 700; color: var(--indigo); }
.stmt-head .nm { font-weight: 700; }
.stmt-head .per { color: var(--muted); font-size: .9rem; }
.stmt-sec { margin-top: .5rem; }
.stmt-sec > .lbl { font-weight: 700; color: var(--clay); font-size: .95rem; }
.stmt-line { display: flex; justify-content: space-between; gap: 1rem; padding: .12rem 0 .12rem 1rem; }
.stmt-line.indent { padding-left: 2rem; }
.stmt-line.total { font-weight: 700; border-top: 1px solid var(--muted); margin-top: .15rem; padding-left: 0; }
.stmt-final { display: flex; justify-content: space-between; font-weight: 700; margin-top: .6rem; padding-top: .3rem; border-top: 2px solid var(--indigo); }
.stmt-final .money { border-bottom: 4px double var(--indigo); }

table.rules { border-collapse: separate; border-spacing: 0 .35rem; width: 100%; min-width: 440px; }
table.rules th { font-size: .85rem; color: var(--muted); text-align: center; }
table.rules th:first-child { text-align: left; }
table.rules td { background: var(--paper); padding: .5rem .7rem; text-align: center; border-top: 1px solid var(--sand); border-bottom: 1px solid var(--sand); }
table.rules td:first-child { text-align: left; border-left: 1px solid var(--sand); border-radius: 10px 0 0 10px; font-weight: 700; }
table.rules td:last-child { border-right: 1px solid var(--sand); border-radius: 0 10px 10px 0; }
.dealer { display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; margin-bottom: .6rem; }
.dealer .half { padding: .6rem .9rem; border-radius: var(--radius-sm); text-align: center; }
.dealer .half.l { background: var(--dr-soft); }
.dealer .half.r { background: var(--cr-soft); }
.dealer .big { font-family: var(--mono); font-size: 1.6rem; letter-spacing: .25em; font-weight: 700; }
.dealer .half.l .big { color: var(--dr); }
.dealer .half.r .big { color: var(--cr); }
.dealer .spell { font-size: .85rem; color: var(--indigo); }

.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.type-card { background: var(--paper); border: 1px solid var(--sand); border-radius: var(--radius-sm); padding: .7rem .8rem; display: grid; gap: .15rem; }
.type-card .em { font-size: 1.5rem; }
.type-card .nm { font-weight: 700; color: var(--indigo); }
.type-card .sh { font-size: .9rem; color: var(--muted); line-height: 1.3; }

.cycle { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .5rem; counter-reset: step; }
.cycle li { counter-increment: step; background: var(--paper); border: 1px solid var(--sand); border-radius: var(--radius-sm); padding: .5rem .7rem; font-size: .95rem; display: grid; grid-template-columns: 30px 1fr; gap: .5rem; align-items: center; }
.cycle li::before { content: counter(step); width: 28px; height: 28px; border-radius: 50%; background: var(--sand-soft); display: grid; place-items: center; font-family: var(--mono); font-size: .8rem; }
.cycle li.hi { border-color: var(--gold); background: rgba(201, 151, 58, .18); font-weight: 700; }
.cycle li.hi::before { background: var(--gold); }

.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 90px 18px 1fr; gap: .7rem; align-items: start; }
.timeline .when { text-align: right; font-weight: 700; color: var(--indigo); padding-top: .1rem; }
.timeline .dot { position: relative; height: 100%; min-height: 44px; }
.timeline .dot::before { content: ''; position: absolute; left: 7px; top: .45rem; bottom: -.4rem; width: 3px; background: var(--sand); }
.timeline li:last-child .dot::before { display: none; }
.timeline .dot::after { content: ''; position: absolute; left: 1px; top: .35rem; width: 15px; height: 15px; border-radius: 50%; background: var(--gold); }
.timeline .what { padding-bottom: .8rem; }

.vlist { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.vlist li { display: grid; grid-template-columns: 44px 1fr; gap: .6rem; align-items: center; background: var(--paper); border: 1px solid var(--sand); border-radius: var(--radius-sm); padding: .5rem .7rem; }
.vlist .em { font-size: 1.6rem; text-align: center; }

/* ---------- practice ---------- */
.mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .9rem; }
.unit-pick { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.seg { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.seg button { border: 2px solid var(--sand); background: var(--paper); border-radius: 999px; padding: .3rem .8rem; cursor: pointer; min-width: 44px; min-height: 40px; }
.seg button.on { border-color: var(--gold); background: rgba(201, 151, 58, .22); font-weight: 700; }
.q-card { display: grid; gap: 1rem; }
.q-text { font-size: 1.3rem; line-height: 1.45; color: var(--indigo); }
.q-account { font-size: 1.6rem; font-weight: 700; color: var(--indigo); }
.big-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.big-choices .choice { grid-template-columns: 1fr; text-align: center; justify-items: center; font-size: 1.1rem; padding: .9rem .6rem; }
.big-choices .choice .em { font-size: 1.6rem; }
.dc-choices { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.dc-choices .choice { grid-template-columns: 1fr; text-align: center; font-size: 1.3rem; padding: 1.1rem; }
.dc-choices .choice.is-dr { border-color: rgba(62, 92, 138, .35); }
.dc-choices .choice.is-cr { border-color: rgba(180, 83, 31, .35); }

.eq-q { display: grid; gap: .6rem; }
.eq-q .eq-row { display: grid; grid-template-columns: minmax(130px, 1fr) auto; gap: .8rem; align-items: center; padding: .5rem .7rem; border-radius: var(--radius-sm); background: var(--sand-soft); }
.eq-q .eq-row.ok { background: rgba(122, 158, 126, .2); }
.eq-q .eq-row.no { background: rgba(160, 82, 45, .1); }
.eq-q .lbl { font-weight: 700; color: var(--indigo); }
.tri { display: inline-flex; gap: .3rem; }
.tri button { border: 2px solid var(--sand); background: var(--paper); border-radius: 12px; padding: .35rem .7rem; cursor: pointer; min-width: 64px; min-height: 44px; font-size: 1rem; }
.tri button.on { border-color: var(--indigo); background: var(--indigo); color: var(--cream); }

.steps { display: flex; gap: .4rem; flex-wrap: wrap; }
.steps span { font-size: .85rem; padding: .2rem .7rem; border-radius: 999px; background: var(--sand-soft); color: var(--muted); }
.steps span.cur { background: var(--gold); color: var(--indigo); font-weight: 700; }
.steps span.done { background: rgba(122, 158, 126, .25); color: var(--sage-deep); }
.acct-tiles { display: flex; flex-wrap: wrap; gap: .5rem; }
.acct-tile { border: 2px solid var(--sand); background: var(--paper); border-radius: 14px; padding: .55rem .9rem; cursor: pointer; font-size: 1.05rem; display: inline-flex; align-items: center; gap: .4rem; min-height: 48px; }
.acct-tile:hover { border-color: var(--gold); }
.acct-tile[aria-pressed="true"] { border-color: var(--indigo); background: var(--indigo); color: var(--cream); }
.acct-tile.bad { border-color: var(--clay); background: rgba(160, 82, 45, .08); color: var(--text); }
.line-rows { display: grid; gap: .5rem; }
.line-row { display: grid; grid-template-columns: minmax(160px, 1fr) auto; gap: .8rem; align-items: center; padding: .55rem .8rem; border-radius: var(--radius-sm); background: var(--sand-soft); }
.line-row.ok { background: rgba(122, 158, 126, .2); }
.line-row.no { background: rgba(160, 82, 45, .1); }
.line-row .nm { font-weight: 700; color: var(--indigo); }
.line-row .nm small { display: block; font-weight: 400; color: var(--muted); }
.money-input { display: inline-flex; align-items: center; background: var(--paper); border: 2px solid var(--sand); border-radius: 12px; padding: 0 .6rem; }
.money-input span { color: var(--muted); font-family: var(--mono); }
.money-input input { border: 0; background: transparent; font-family: var(--mono); font-size: 1.15rem; width: 8ch; padding: .5rem .3rem; text-align: right; color: var(--text); }
.money-input input:focus { outline: none; }
.money-input:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 151, 58, .25); }
.money-input.dr-in { border-color: rgba(62, 92, 138, .45); }
.money-input.cr-in { border-color: rgba(180, 83, 31, .45); }

.own-table { width: 100%; border-collapse: separate; border-spacing: 0 .4rem; }
.own-table th { font-size: .85rem; text-align: left; padding: 0 .4rem; }
.own-table th.dr-h { color: var(--dr); }
.own-table th.cr-h { color: var(--cr); }
.own-table td { padding: 0 .3rem; vertical-align: middle; }
.own-table select { width: 100%; font: inherit; font-size: 1rem; padding: .55rem .5rem; border-radius: 12px; border: 2px solid var(--sand); background: var(--paper); color: var(--text); min-height: 48px; }
.own-table tr.no select { border-color: var(--clay); }
.own-table tr.ok select { border-color: var(--sage-deep); }
.totals-line { display: flex; gap: 1.2rem; justify-content: flex-end; flex-wrap: wrap; font-size: .98rem; color: var(--muted); }
.totals-line .ok { color: var(--sage-deep); font-weight: 700; }

.round-end { text-align: center; max-width: 620px; margin: 0 auto; display: grid; gap: .8rem; justify-items: center; }
.round-end .big-em { font-size: 3.2rem; }
.hint-box { background: rgba(62, 92, 138, .08); border-left: 5px solid var(--dr); padding: .7rem 1rem; border-radius: var(--radius-sm); }

/* ---------- flashcards ---------- */
.flash-wrap { max-width: 680px; margin: 0 auto; display: grid; gap: 1rem; }
.flash { min-height: 300px; display: grid; place-items: center; text-align: center; padding: 2rem 1.5rem; cursor: pointer; perspective: 1000px; }
.flash .front-term { font-family: var(--serif-display); font-size: calc(clamp(2rem, 5vw, 2.8rem) * var(--head-scale)); color: var(--indigo); font-weight: 700; line-height: 1.15; }
.flash .back { display: grid; gap: .8rem; }
.flash .back .term-small { font-weight: 700; color: var(--clay); }
.flash .back .meaning { font-size: 1.35rem; color: var(--indigo); line-height: 1.4; }
.flash .back .ex { background: var(--sand-soft); border-radius: var(--radius-sm); padding: .7rem 1rem; text-align: left; }
.flash.flip { animation: flipin .35s var(--ease); }
@keyframes flipin { from { transform: rotateX(70deg); opacity: .2; } to { transform: none; opacity: 1; } }
.rate { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.rate .btn { width: 100%; }
.leitner { display: flex; gap: .5rem; align-items: flex-end; height: 70px; }
.leitner div { flex: 1; background: var(--sage); border-radius: 6px 6px 0 0; min-height: 4px; position: relative; }
.leitner div span { position: absolute; top: -1.3rem; left: 0; right: 0; text-align: center; font-size: .8rem; color: var(--muted); }
.leitner-labels { display: flex; gap: .5rem; font-size: .75rem; color: var(--muted); }
.leitner-labels span { flex: 1; text-align: center; }

/* ---------- glossary ---------- */
.search { width: 100%; font: inherit; font-size: 1.15rem; padding: .8rem 1rem; border-radius: 999px; border: 2px solid var(--sand); background: var(--paper); color: var(--text); }
.search:focus { border-color: var(--gold); outline: none; }
.gloss { display: grid; gap: .6rem; margin-top: 1rem; }
.gloss-item { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; padding: .9rem 1.1rem; }
.gloss-item h3 { font-size: 1.2rem; }
.gloss-item p { margin: 0; grid-column: 1 / -1; }
.gloss-item .ex { color: var(--muted); font-size: .98rem; }
.letters { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .8rem; }
.letters button { border: 0; background: var(--sand-soft); border-radius: 8px; min-width: 36px; min-height: 36px; cursor: pointer; font-family: var(--mono); }
.letters button.on { background: var(--gold); }

/* ---------- login ---------- */
.sync-status { font-size: .85rem; color: var(--muted); margin: 0 .3rem; }
.sync-status[data-state="error"] { color: var(--rust); }
body.locked .site-nav a, body.locked .site-footer, body.locked .sync-status { display: none; }
.login { max-width: 600px; margin: 6vh auto 0; text-align: center; display: grid; gap: .6rem; justify-items: center; }
.login .scale { font-size: 4.5rem; }
.login-form { display: flex; gap: .6rem; width: 100%; max-width: 480px; margin-top: .6rem; flex-wrap: wrap; }
.login-form input { flex: 1; min-width: 200px; font: inherit; font-size: 1.15rem; text-align: center; padding: .7rem .9rem; border-radius: 999px; border: 2px solid var(--sand); background: var(--paper); }
.login-form.shake { animation: shake .35s var(--ease); }
.login-msg { min-height: 1.5em; color: var(--rust); margin: .2rem 0 0; }
@keyframes shake { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }

/* ---------- settings ---------- */
.settings { border: 0; border-radius: var(--radius); padding: 0; width: min(560px, 94vw); background: var(--paper); box-shadow: 0 30px 60px -30px rgba(28, 26, 23, .6); }
.settings-form { padding: 1.4rem 1.6rem 1.6rem; display: grid; gap: 1.1rem; }
.settings-head { display: flex; align-items: center; justify-content: space-between; }
.toggle { display: grid; grid-template-columns: 48px 1fr; gap: .9rem; align-items: center; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track { width: 48px; height: 28px; border-radius: 999px; background: var(--sand); position: relative; transition: background .2s; }
.toggle-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.toggle input:checked + .toggle-track { background: var(--sage); }
.toggle input:checked + .toggle-track::after { transform: translateX(20px); }
.toggle input:focus-visible + .toggle-track { outline: 3px solid var(--gold); outline-offset: 2px; }
.toggle-text { display: grid; }
.toggle-text small { color: var(--muted); }
.field { display: grid; gap: .45rem; }
.field-label { font-weight: 700; }
.field select { font: inherit; font-size: 1rem; padding: .5rem; border-radius: 10px; border: 2px solid var(--sand); background: var(--paper); }
.font-pick { display: grid; gap: .5rem; }
.font-pick button { border: 2px solid var(--sand); background: var(--sand-soft); border-radius: var(--radius-sm); padding: .6rem .85rem; cursor: pointer; text-align: left; display: grid; gap: .1rem; letter-spacing: normal; word-spacing: normal; }
.font-pick button.on { border-color: var(--gold); background: rgba(201, 151, 58, .2); }
.font-pick .nm { font-size: 1.15rem; line-height: 1.25; }
.font-pick .why { font-size: .85rem; color: var(--muted); font-family: var(--serif-body); }
.font-pick .s-easy { font-family: 'Atkinson Hyperlegible Next', Verdana, sans-serif; }
.font-pick .s-dyslexic { font-family: 'OpenDyslexic', Verdana, sans-serif; font-size: 1rem; }
.settings-more summary { cursor: pointer; color: var(--clay); }
.settings-more > *:not(summary) { margin-top: .6rem; }

/* ---------- confetti ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti i { position: absolute; left: 50%; top: 45%; width: 10px; height: 14px; background: var(--c); border-radius: 2px; animation: burst 1.4s var(--ease) forwards; opacity: 0; }
@keyframes burst { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hello { grid-template-columns: 1fr; }
  .nav-out-text { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 18px; }
  .site-header { flex-wrap: wrap; }
  .site-nav { width: 100%; justify-content: space-between; flex-wrap: nowrap; gap: 0; }
  .site-nav a { padding: .3rem .4rem; font-size: .9rem; }
  .nav-out { margin-left: 0; }
  .icon-btn { min-width: 36px; padding: .3rem; }
  .sync-status { display: none; }
  .unit > summary { grid-template-columns: auto 1fr; }
  .unit .u-meta { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; align-items: center; gap: .6rem; }
  .player-nav { grid-template-columns: 1fr 1fr; }
  .player-nav .mid { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .line-row, .eq-q .eq-row { grid-template-columns: 1fr; }
  .rate { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 64px 18px 1fr; }
}

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

/* ============================================================
   Dashboard (my.marisolcornejo.com)
   ============================================================ */
.today { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem; align-items: stretch; }
.today .date { color: var(--muted); font-size: 1.05rem; }
.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.app-tile { display: grid; gap: .6rem; align-content: start; position: relative; overflow: hidden; }
.app-tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--c, var(--gold)); }
.app-tile .head { display: flex; align-items: center; gap: .8rem; }
.app-tile .icon { font-size: 2.2rem; width: 64px; height: 64px; border-radius: 18px; background: var(--sand-soft); display: grid; place-items: center; }
.app-tile .big-num { font-size: 2rem; font-weight: 700; color: var(--indigo); line-height: 1; font-family: var(--serif-display); }
.app-tile .bar { width: 100%; height: 10px; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; color: var(--muted); font-size: .98rem; }
.facts li strong { color: var(--indigo); }
.week-dots { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; }
.week-dots span { width: 34px; display: grid; justify-items: center; gap: .2rem; font-size: .75rem; color: var(--muted); }
.week-dots i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--sand); display: block; }
.week-dots .on i { background: var(--sage); border-color: var(--sage); }
.week-dots .is-today i { box-shadow: 0 0 0 3px rgba(201, 151, 58, .35); }
.note-card { background: linear-gradient(135deg, rgba(201, 151, 58, .14), rgba(122, 158, 126, .12)); border-left: 6px solid var(--sage); }
.note-card .from { color: var(--muted); font-size: .9rem; }
.dates-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.dates-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .7rem; border-radius: var(--radius-sm); background: var(--sand-soft); flex-wrap: wrap; }
.dates-list .when { color: var(--muted); white-space: nowrap; }
.asg .check { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--sand); background: var(--paper); cursor: pointer; display: grid; place-items: center; font-size: .9rem; color: var(--cream); }
.asg.done .check { background: var(--sage); border-color: var(--sage); }
.pill { display: inline-block; font-size: .78rem; padding: .08rem .55rem; border-radius: 999px; background: var(--sand-soft); color: var(--indigo); white-space: nowrap; }
.pill.typing { background: var(--dr-soft); color: var(--dr); }
.pill.accounting { background: rgba(122, 158, 126, .2); color: var(--sage-deep); }

/* ---------- tutor ---------- */
.tutor { display: grid; gap: 1.4rem; }
.tutor-nav { position: sticky; top: calc(var(--header-h) + 4px); z-index: 10; display: flex; gap: .3rem; flex-wrap: wrap; background: rgba(250, 245, 236, .92); padding: .4rem; border-radius: 999px; border: 1px solid rgba(201, 151, 58, .3); backdrop-filter: blur(6px); }
.tutor-nav a { text-decoration: none; color: var(--indigo); padding: .3rem .8rem; border-radius: 999px; font-size: .95rem; }
.tutor-nav a:hover { background: rgba(201, 151, 58, .2); }
.tutor section { scroll-margin-top: 130px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; }
.stat { background: var(--paper); border: 1px solid rgba(201, 151, 58, .35); border-radius: var(--radius-sm); padding: .8rem 1rem; display: grid; gap: .15rem; }
.stat .v { font-size: 1.7rem; font-weight: 700; color: var(--indigo); line-height: 1.1; }
.stat .l { color: var(--muted); font-size: .88rem; }
table.data { width: 100%; border-collapse: collapse; font-size: .97rem; }
table.data th { text-align: left; font-size: .82rem; color: var(--muted); padding: .35rem .5rem; border-bottom: 2px solid var(--sand); }
table.data td { padding: .45rem .5rem; border-bottom: 1px solid rgba(201, 151, 58, .22); vertical-align: top; }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; }
table.data tr.unit-row td { background: var(--sand-soft); font-weight: 700; color: var(--indigo); }
.meter { display: inline-block; width: 70px; height: 8px; border-radius: 99px; background: var(--sand-soft); overflow: hidden; vertical-align: middle; margin-left: .4rem; }
.meter i { display: block; height: 100%; background: var(--sage); }
.meter.low i { background: var(--clay); }
.meter.mid i { background: var(--gold); }
.trouble { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .7rem 0; border-top: 1px dashed rgba(201, 151, 58, .4); }
.trouble:first-of-type { border-top: 0; }
.trouble .count { min-width: 44px; height: 44px; border-radius: 12px; background: rgba(160, 82, 45, .12); color: var(--rust); display: grid; place-items: center; font-weight: 700; }
.trouble .what { font-weight: 700; color: var(--indigo); }
.trouble .eg { color: var(--muted); font-size: .9rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; align-items: end; }
.form-grid label, .field-block { display: grid; gap: .3rem; font-size: .92rem; font-weight: 600; color: var(--indigo); }
.form-grid select, .form-grid input, .notes-form textarea, .notes-form input, .form-grid textarea {
  font: inherit; font-weight: 400; font-size: 1rem; padding: .55rem .7rem; border-radius: 10px; border: 2px solid var(--sand); background: var(--paper); color: var(--text); width: 100%;
}
.notes-form textarea { min-height: 70px; resize: vertical; }
.notes-form { display: grid; gap: .7rem; }
.note-item { padding: .8rem 0; border-top: 1px dashed rgba(201, 151, 58, .4); display: grid; gap: .3rem; }
.note-item:first-of-type { border-top: 0; }
.note-item .meta { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .9rem; }
.note-item dl { margin: 0; display: grid; grid-template-columns: 9rem 1fr; gap: .2rem .8rem; }
.note-item dt { color: var(--muted); font-size: .9rem; }
.note-item dd { margin: 0; white-space: pre-wrap; }
.save-state { font-size: .9rem; color: var(--muted); }
.save-state.err { color: var(--rust); }
.link-btn { background: none; border: 0; color: var(--clay); cursor: pointer; text-decoration: underline; padding: 0; font: inherit; font-size: .9rem; }
.activity { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; font-size: .95rem; }
.activity li { display: grid; grid-template-columns: 8.5rem 1fr; gap: .6rem; }
.activity .t { color: var(--muted); white-space: nowrap; }
.ok-mark { color: var(--sage-deep); font-weight: 700; }
.miss-mark { color: var(--clay); font-weight: 700; }
@media (max-width: 860px) {
  .today { grid-template-columns: 1fr; }
  .note-item dl { grid-template-columns: 1fr; }
  .activity li { grid-template-columns: 1fr; }
}
