:root {
  color-scheme: dark;
  /* Paleta aprovada, centralizada para facilitar futuros ajustes. */
  --bg: #0D0D10;
  --surface: #1B1B22;
  --surface-raised: #24242C;
  --surface-inset: #141419;
  --wine: #572333;
  --ruby: #D9364F;
  --ruby-light: #F07C8B;
  --text: #E4DEDA;
  --muted: #B7B0AE;
  --quiet: #9B9493;
  --rule: #38353B;
  --focus: #F5A0AA;
  --success: #C2D4C9;
  --danger: #FF9B9B;
  --font-ui: Arial, Helvetica, sans-serif;
  --font-reading: var(--font-ui);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-overlay: 0 18px 60px rgb(0 0 0 / 44%);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --sidebar-width: 252px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); font: 16px/1.55 var(--font-ui); }
button, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
a:focus-visible, button:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

.skip-link { position: fixed; z-index: 1000; left: 12px; top: 12px; padding: 12px 16px; transform: translateY(-150%); color: var(--bg); background: var(--text); border-radius: 6px; font-weight: 700; }
.skip-link:focus { transform: translateY(0); }
.app-shell { min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 26px 18px 18px; background: var(--bg); border-right: 1px solid var(--rule); }
.brand { display: flex; align-items: center; gap: 12px; min-height: 48px; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid var(--rule); border-radius: 50%; color: var(--text); }
.brand-mark svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark .mark-accent { stroke: var(--ruby-light); stroke-width: 2.4; }
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-copy strong { font-family: var(--font-reading); font-size: 17px; font-weight: 700; line-height: 1.2; }
.brand-copy small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.side-scopes { display: grid; gap: 5px; margin-top: 34px; }
.scope-link, .chapter-link { display: flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--muted); border-radius: var(--radius-sm); text-decoration: none; transition: color 160ms ease, background-color 160ms ease; }
.scope-link:hover, .chapter-link:hover { color: var(--text); background: #19191E; }
.scope-link[aria-current="page"], .chapter-link[aria-current="page"] { color: var(--text); background: #1B1A20; }
.scope-link[aria-current="page"]::before { width: 3px; height: 18px; margin-left: -8px; margin-right: 9px; border-radius: 5px; background: var(--ruby); content: ""; }
.side-divider { height: 1px; margin: 19px 4px 15px; background: var(--rule); }
.chapter-nav { display: grid; min-width: 0; gap: 2px; overflow-x: hidden; overflow-y: auto; padding-right: 3px; }
.chapter-nav-label { margin: 0 10px 6px; color: var(--quiet); font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.chapter-link { min-width: 0; gap: 10px; min-height: 40px; font-size: 14px; }
.chapter-number { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border: 1px solid #4B4248; border-radius: 50%; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chapter-link[aria-current="page"] .chapter-number { color: var(--ruby-light); border-color: var(--wine); background: #27151D; }
.chapter-link-text { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--rule); }
.download-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; color: var(--text); text-decoration: none; font-size: 13px; border-radius: var(--radius-sm); }
.download-link:hover { background: var(--surface); }
.download-link svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: var(--ruby-light); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.local-note { margin: 9px 9px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.main-column { min-height: 100dvh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 clamp(20px, 4vw, 56px); border-bottom: 1px solid var(--rule); background: rgb(13 13 16 / 96%); backdrop-filter: blur(12px); }
.topbar-context { display: flex; flex-direction: column; min-width: 0; }
.topbar-kicker { color: var(--quiet); font-size: 10px; font-weight: 700; letter-spacing: .13em; }
#topbar-title { overflow: hidden; color: var(--text); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.topbar-download { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin-left: auto; padding: 0 14px; color: var(--text); border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; font-size: 13px; }
.topbar-download:hover { border-color: var(--ruby); }
.menu-button { display: none !important; }
.main-content { width: min(100%, 1320px); min-height: calc(100dvh - 130px); margin: 0 auto; padding: 36px clamp(20px, 4vw, 56px) 72px; }
.app-footer { display: flex; justify-content: space-between; gap: 16px; margin: 0 clamp(20px, 4vw, 56px); padding: 18px 0 max(18px, env(safe-area-inset-bottom)); color: var(--muted); border-top: 1px solid var(--rule); font-size: 12px; }
.loading-state, .error-state { padding: 26px 0; color: var(--muted); }
.error-state { color: var(--danger); }

.home-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(270px, .8fr); align-items: center; gap: clamp(28px, 5vw, 70px); max-width: 1080px; margin: 15px auto 56px; }
.home-copy { max-width: 600px; }
.eyebrow { color: var(--ruby-light); font-size: 11px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.home-copy h1 { max-width: 12ch; margin: 18px 0 18px; font: 500 clamp(38px, 5vw, 62px)/1.06 var(--font-reading); letter-spacing: -.035em; }
.home-copy p { max-width: 57ch; margin: 0 0 18px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.home-copy .lead { color: var(--text); font-size: 20px; }
.cover-art { position: relative; overflow: hidden; width: min(100%, 390px); margin: 0 auto; aspect-ratio: 2 / 3; background: #151317; border: 1px solid #403139; border-radius: 4px 4px 16px 4px; box-shadow: 15px 18px 0 -11px var(--wine), 0 24px 70px rgb(0 0 0 / 42%); }
.cover-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 19px; border: 1px solid transparent; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 700; line-height: 1.2; text-decoration: none; transition: background-color 160ms ease, border-color 160ms ease, transform 120ms ease; touch-action: manipulation; }
.button:active { transform: scale(.985); }
.button-primary { color: #fff; background: var(--ruby); }
.button-primary:hover { background: #C52D45; }
.button-secondary { color: var(--text); background: transparent; border-color: #51464B; }
.button-secondary:hover { background: var(--surface); border-color: var(--ruby); }
.button-quiet { color: var(--muted); background: transparent; border-color: var(--rule); }
.button-quiet:hover { color: var(--text); background: var(--surface); }
.button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.provisional-name { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.provisional-name::before { width: 6px; height: 6px; border-radius: 50%; background: var(--ruby); content: ""; }

.home-progress { max-width: 1080px; margin: 0 auto; padding: 23px 0 27px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.home-progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.home-progress-head h2 { margin: 0; font: 500 22px/1.2 var(--font-reading); }
.progress-value { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.progress-track { height: 5px; overflow: hidden; background: #2A272C; border-radius: 10px; }
.progress-fill { height: 100%; background: var(--ruby); border-radius: inherit; transition: width 200ms ease; }
.progress-caption { display: flex; justify-content: space-between; gap: 12px; margin-top: 9px; color: var(--muted); font-size: 12px; }
.home-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 38px auto 0; max-width: 1080px; background: var(--rule); border: 1px solid var(--rule); }
.home-section { min-height: 150px; padding: 24px; background: var(--bg); text-decoration: none; transition: background-color 160ms ease; }
.home-section:hover { background: #151419; }
.home-section h2 { margin: 0 0 9px; font: 500 22px/1.2 var(--font-reading); }
.home-section p { max-width: 42ch; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.home-section .section-arrow { display: inline-block; margin-top: 20px; color: var(--ruby-light); font-size: 13px; font-weight: 700; }
.version-note { max-width: 1080px; margin: 22px auto 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.section-switch { display: inline-flex; gap: 5px; margin: 0 0 31px; padding: 4px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface-inset); }
.section-switch a { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px; color: var(--muted); border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 650; }
.section-switch a[aria-current="page"] { color: var(--text); background: var(--surface-raised); }
.page-intro { max-width: 780px; margin: 0 0 31px; }
.page-intro .eyebrow { display: block; margin-bottom: 11px; }
.page-intro h1 { margin: 0 0 12px; font: 500 clamp(30px, 4vw, 44px)/1.12 var(--font-reading); letter-spacing: -.025em; }
.page-intro p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.reader-progress { display: flex; align-items: center; gap: 14px; max-width: 990px; margin: 0 0 25px; }
.reader-progress .progress-track { flex: 1; }
.reader-progress-label { min-width: 96px; color: var(--muted); font-size: 12px; text-align: right; }
.reading-layout { display: grid; grid-template-columns: minmax(0, 760px) 220px; align-items: start; gap: clamp(28px, 5vw, 72px); max-width: 1080px; margin: 0 auto; }
.reader-content { min-width: 0; }
.reader-heading { margin: 0 0 23px; font: 500 clamp(29px, 3.2vw, 37px)/1.18 var(--font-reading); letter-spacing: -.025em; }
.chapter-opening { display: block; width: 100%; max-height: 440px; margin: 0 0 34px; object-fit: cover; aspect-ratio: 3 / 2; border: 1px solid #403139; border-radius: 2px 2px 12px 2px; }
.reader-prose { max-width: 70ch; color: var(--text); font: 18px/1.8 var(--font-ui); }
.reader-prose p { margin: 0 0 1.12em; }
.reader-prose strong { color: var(--text); font-weight: 700; }
.reader-prose .reader-subheading { margin: 1.9em 0 .58em; color: var(--text); font: 650 23px/1.35 var(--font-ui); letter-spacing: -.015em; }
.reader-prose hr { height: 1px; margin: 2.2em 0; border: 0; background: var(--rule); }
.reader-aside { position: sticky; top: 94px; display: grid; gap: 14px; }
.aside-panel { padding: 17px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.aside-panel h2 { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.aside-panel p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.aside-panel .button { width: 100%; margin-top: 14px; padding-inline: 10px; font-size: 12px; }
.reader-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--rule); }
.reader-actions .button { min-width: 132px; }
.reader-actions .spacer { flex: 1; }
.chapter-stepper { display: flex; justify-content: space-between; gap: 12px; max-width: 760px; margin-top: 22px; }
.chapter-stepper .button { min-width: 44%; justify-content: flex-start; text-align: left; }
.chapter-stepper .button:last-child { justify-content: flex-end; text-align: right; }
.chapter-stepper-chapter .button,
.chapter-stepper-chapter .button:last-child { justify-content: center; text-align: center; }
.chapter-stepper small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }

.exercise-home { max-width: 990px; }
.local-storage-notice { display: flex; align-items: flex-start; gap: 12px; max-width: 800px; margin: 0 0 26px; padding: 14px 16px; color: var(--muted); background: #171519; border-left: 3px solid var(--ruby); font-size: 13px; line-height: 1.55; }
.local-storage-notice svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: var(--ruby-light); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.exercise-index { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; margin: 24px 0 0; background: var(--rule); border: 1px solid var(--rule); }
.exercise-index-item { display: flex; flex-direction: column; min-height: 172px; padding: 20px; background: var(--bg); }
.exercise-index-item .index-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ruby-light); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.exercise-index-item h2 { margin: 13px 0 7px; font: 500 21px/1.2 var(--font-reading); }
.exercise-index-item p { flex: 1; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.exercise-index-item .button { align-self: flex-start; margin-top: 17px; }
.days-entry { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 800px; margin-top: 34px; padding: 21px 22px; background: var(--surface); border: 1px solid var(--rule); }
.days-entry h2 { margin: 0 0 4px; font: 500 22px/1.2 var(--font-reading); }
.days-entry p { margin: 0; color: var(--muted); font-size: 13px; }
.exercise-back-link { display: inline-flex; min-height: 42px; align-items: center; margin-bottom: 18px; color: var(--muted); text-decoration: none; font-size: 13px; }
.exercise-back-link:hover { color: var(--text); }
.exercise-items { display: grid; gap: 18px; max-width: 800px; }
.exercise-card { padding: clamp(18px, 3vw, 26px); background: var(--surface); border: 1px solid var(--rule); border-top: 2px solid var(--wine); border-radius: var(--radius-sm); }
.exercise-card h2 { margin: 0 0 10px; font: 500 23px/1.25 var(--font-reading); }
.exercise-card p { margin: 0 0 16px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.answer-field { display: grid; gap: 8px; margin-top: 16px; }
.answer-field label { color: var(--text); font-size: 14px; font-weight: 650; }
.answer-field .response-instruction { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.answer-field textarea { display: block; width: 100%; min-height: 144px; padding: 14px; resize: vertical; color: var(--text); background: var(--surface-inset); border: 1px solid #4A4248; border-radius: 7px; font: 16px/1.65 var(--font-ui); }
.answer-field textarea::placeholder { color: #AAA2A1; opacity: 1; }
.field-help { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.response-example { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.response-example strong { font-weight: 650; color: var(--text); }
.field-status { align-self: flex-end; }
.field-status { color: var(--success); }
.exercise-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 16px; max-width: 800px; margin-bottom: 22px; }
.exercise-heading-row .page-intro { margin-bottom: 0; }
.exercise-heading-row .button { flex: 0 0 auto; }

.day-progress { max-width: 800px; margin: 20px 0 24px; }
.day-progress .progress-track { margin-top: 9px; }
.day-count { color: var(--muted); font-size: 13px; }
.day-content { max-width: 800px; }
.day-content h1 { max-width: 21ch; margin: 0 0 20px; font: 500 clamp(31px, 4vw, 43px)/1.14 var(--font-reading); }
.day-prompts { display: grid; gap: 12px; margin: 24px 0; }
.day-prompt { padding: 17px 19px; background: var(--surface); border-left: 2px solid #6E3544; }
.day-prompt strong { display: block; margin-bottom: 5px; color: var(--ruby-light); font-size: 12px; letter-spacing: .09em; text-transform: uppercase; }
.day-prompt p { margin: 0; color: var(--text); font-size: 15px; line-height: 1.6; }
.day-prompt[data-kind="tarefa"] { border-left-color: var(--ruby); background: var(--surface-raised); }
.day-prompt[data-kind="exemplo"] p { color: var(--muted); }
.day-prompt[data-kind="versão-breve"] { border-left-color: var(--ruby-light); }
.day-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--rule); }
.day-nav .button { min-width: 128px; }
.day-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; max-width: 800px; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--rule); }
.day-chip { display: grid; place-items: center; min-height: 42px; color: var(--muted); background: var(--surface-inset); border: 1px solid var(--rule); border-radius: 6px; text-decoration: none; font-size: 12px; font-variant-numeric: tabular-nums; }
.day-chip:hover { color: var(--text); border-color: #6B4650; }
.day-chip[aria-current="step"] { color: var(--text); border-color: var(--ruby); background: #25131A; }
.day-chip[data-done="true"]::after { width: 4px; height: 4px; margin-top: -4px; border-radius: 50%; background: var(--ruby-light); content: ""; }

.workbook-list { display: grid; gap: 20px; max-width: 800px; }
.workbook-card { padding: 22px; background: var(--surface); border: 1px solid var(--rule); }
.workbook-card h2 { margin: 0 0 8px; font: 500 24px/1.2 var(--font-reading); }
.workbook-card .workbook-prompt { margin: 0 0 18px; color: var(--muted); line-height: 1.6; }
.workbook-card .answer-field textarea { min-height: 170px; }
.empty-state { max-width: 720px; padding: 24px; color: var(--muted); border: 1px solid var(--rule); background: var(--surface); }
.completed-mark { color: var(--success); }
.mobile-scrim { display: none; }
.noscript { margin: 24px; padding: 18px; color: var(--text); background: var(--surface); }

@media (max-width: 1080px) {
  .reading-layout { grid-template-columns: minmax(0, 1fr) 190px; gap: 28px; }
  .home-layout { grid-template-columns: minmax(0, 1fr) minmax(230px, .75fr); }
  .home-copy h1 { font-size: clamp(36px, 5.2vw, 54px); }
}

@media (max-width: 820px) {
  :root { --sidebar-width: 276px; }
  .sidebar { z-index: 50; transform: translateX(-102%); transition: transform 220ms ease; box-shadow: none; }
  .sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow-overlay); }
  .mobile-scrim:not([hidden]) { position: fixed; inset: 0; z-index: 40; display: block; background: rgb(0 0 0 / 68%); }
  .main-column { margin-left: 0; }
  .menu-button { display: grid !important; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; color: var(--text); background: transparent; border: 1px solid var(--rule); border-radius: 50%; cursor: pointer; }
  .menu-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .topbar { height: 60px; padding-inline: 16px; }
  .topbar-download { min-height: 40px; padding-inline: 12px; }
  .main-content { padding: 27px 20px 64px; }
  .home-layout { grid-template-columns: minmax(0, 1fr) minmax(210px, .75fr); gap: 26px; margin-top: 5px; }
  .home-copy h1 { font-size: clamp(35px, 6vw, 48px); }
  .home-copy .lead { font-size: 17px; }
  .cover-art { width: min(100%, 290px); }
  .reading-layout { display: block; }
  .reader-aside { display: none; }
  .reader-content, .chapter-stepper { max-width: 720px; }
  .reader-prose { font-size: 18px; }
  .app-footer { margin-inline: 20px; }
}

@media (max-width: 560px) {
  .topbar { gap: 10px; }
  .topbar-kicker { font-size: 9px; }
  #topbar-title { max-width: 42vw; font-size: 12px; }
  .topbar-download { gap: 5px; min-height: 38px; padding-inline: 11px; font-size: 12px; }
  .main-content { padding: 22px 18px 56px; }
  .home-layout { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 20px; margin: 0 auto 30px; }
  .cover-art { width: min(100%, 294px); aspect-ratio: 4 / 3; }
  .cover-art img { object-position: center 64%; }
  .home-copy h1 { max-width: 13ch; margin: 12px 0; font-size: clamp(36px, 10vw, 48px); }
  .home-copy p { font-size: 15px; }
  .home-copy .lead { font-size: 17px; }
  .home-actions { align-items: stretch; flex-direction: column; }
  .home-actions .button { width: 100%; }
  .provisional-name { align-self: center; }
  .home-progress { padding-top: 19px; }
  .home-progress-head h2 { font-size: 20px; }
  .home-sections { grid-template-columns: 1fr; margin-top: 27px; }
  .home-section { min-height: 125px; padding: 19px; }
  .home-section .section-arrow { margin-top: 13px; }
  .version-note { font-size: 12px; }
  .section-switch { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin-bottom: 26px; }
  .section-switch a { padding-inline: 8px; }
  .reader-progress { gap: 9px; }
  .reader-progress-label { min-width: 83px; font-size: 11px; }
  .reader-heading, .page-intro h1, .day-content h1 { font-size: clamp(27px, 7vw, 30px); }
  .chapter-opening { height: min(56vw, 220px); margin-bottom: 25px; aspect-ratio: 16 / 10; }
  .reader-prose { font-size: 18px; line-height: 1.82; }
  .reader-prose p { margin-bottom: 1.1em; }
  .reader-prose .reader-subheading { margin-top: 1.7em; font-size: 21px; }
  .reader-actions { align-items: stretch; flex-direction: column; }
  .reader-actions .spacer { display: none; }
  .reader-actions .button { width: 100%; }
  .chapter-stepper { gap: 8px; }
  .chapter-stepper .button { min-width: 0; width: 50%; padding-inline: 12px; }
  .chapter-stepper-chapter { flex-direction: row; gap: 10px; }
  .chapter-stepper-chapter .button { width: calc(50% - 5px); min-height: 46px; padding-inline: 8px; font-size: 13px; }
  .exercise-index { grid-template-columns: 1fr; }
  .exercise-index-item { min-height: 154px; padding: 18px; }
  .days-entry { align-items: flex-start; flex-direction: column; padding: 18px; }
  .days-entry .button { width: 100%; }
  .exercise-heading-row { align-items: stretch; flex-direction: column; }
  .exercise-heading-row .button { width: 100%; }
  .day-list { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; }
  .day-chip { min-height: 40px; }
  .day-nav { gap: 8px; }
  .day-nav .button { min-width: 0; width: 50%; padding-inline: 13px; }
  .app-footer { flex-direction: column; gap: 4px; margin-inline: 18px; font-size: 11px; }
}

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

/* Tipografia de sistema e foco sem contorno nos títulos de navegação. */
h1[tabindex="-1"]:focus, #main:focus { outline: none; }
.home-copy h1, .page-intro h1, .reader-heading { font-weight: 600; letter-spacing: normal; line-height: 1.2; }
.home-copy h1 { max-width: 19ch; font-size: clamp(32px, 4vw, 48px); }
.brand-copy strong, .reader-prose .reader-subheading { letter-spacing: normal; }
.eyebrow, .topbar-kicker, .chapter-nav-label, .exercise-index-item .index-top, .day-prompt strong { letter-spacing: .035em; }
.text-accent { color: var(--ruby-light); } .home-copy .lead strong { color: var(--text); font-weight: 600; }


/* Mantém a leitura em 18px e amplia controles e textos auxiliares no celular. */
@media (max-width: 760px) {
  .button { min-height: 46px; font-size: 16px; }
  .chapter-stepper-chapter .button { min-height: 48px; font-size: 15px; line-height: 1.35; }
  .home-copy p, .home-section p { font-size: 16px; }
  .home-copy .lead { font-size: 18px; }
  .home-copy h1 { font-size: clamp(30px, 8vw, 36px); }
  .reader-prose { font-size: 18px; line-height: 1.8; }
  .scope-link, .chapter-nav a { font-size: 15px; min-height: 44px; }
  .topbar-kicker, .eyebrow { font-size: 11px; }
  #topbar-title { font-size: 14px; }
  .topbar-download { min-height: 44px; font-size: 14px; }
  .provisional-name, .version-note, .progress-caption, .reader-progress-label, .app-footer, .local-note { font-size: 13px; }
  .day-chip { min-height: 44px; font-size: 15px; }
}

@media(max-width:760px) {
  .menu-button { display: inline-flex !important; align-items: center; justify-content: center; gap: 7px; width: auto; flex: 0 0 auto; min-height: 44px; padding: 0 10px; border-radius: 8px; background: var(--surface); border: 1px solid #625B62; font: 600 14px var(--font-ui); }
  .menu-button svg { width: 18px; height: 18px; }
  .topbar-context { flex: 1; }
  #topbar-title { max-width: 100%; }
}

@media(max-width:760px) {
  .in-materials-hub .topbar { display: none; }
  .in-materials-hub .sidebar, .in-materials-hub .mobile-scrim { top: 0; }
}
