/* ==========================================================================
   Lister Explica — Tratado encadernado
   Capa de pano verde com douração, páginas de pergaminho, tinta ferrogálica,
   rubricas em vermelho. Composto em IM Fell English e EB Garamond.
   ========================================================================== */

@view-transition { navigation: auto; }

:root {
  --vellum: #ece1c8;
  --vellum-deep: #e2d3b2;
  --vellum-light: #f4ecda;
  --ink: #2a1f16;
  --ink-soft: #5c4a36;
  --rubric: #962a1c;
  --rubric-deep: #7a2016;
  --cloth: #1b382e;
  --cloth-deep: #11261f;
  --cloth-light: #26493c;
  --gilt: #c9a458;
  --gilt-light: #e6c97f;
  --gilt-dim: #c9a45866;
  --rule: #b9a27a;
  --rule-soft: #cfbd98;
  --on-cloth: #efe4c9;
  --on-cloth-soft: #d6c8a6;

  --display: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --caps: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --text: "EB Garamond", Garamond, "Iowan Old Style", Georgia, serif;

  --measure: 64ch;
  --gutter: clamp(16px, 4vw, 56px);
  --wide: 1180px;

  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .22 0 0 0 0 .1 .16 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --cloth-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1 .55' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .8 .07 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --corner: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%231b382e' stroke='%23c9a458' stroke-width='.9'%3E%3Cpath d='M12 1.5c2.4 2.9 2.4 4.9 0 6.8-2.4-1.9-2.4-3.9 0-6.8zM12 22.5c-2.4-2.9-2.4-4.9 0-6.8 2.4 1.9 2.4 3.9 0 6.8zM1.5 12c2.9-2.4 4.9-2.4 6.8 0-1.9 2.4-3.9 2.4-6.8 0zM22.5 12c-2.9 2.4-4.9 2.4-6.8 0 1.9-2.4 3.9-2.4 6.8 0z'/%3E%3Crect x='9.4' y='9.4' width='5.2' height='5.2' transform='rotate(45 12 12)'/%3E%3C/g%3E%3C/svg%3E");
  --fleuron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 14'%3E%3Cg fill='none' stroke='%23962a1c' stroke-width='1'%3E%3Cpath d='M0 7h20M40 7h20'/%3E%3Cpath d='M30 1.5c3 2.6 3 8.4 0 11-3-2.6-3-8.4 0-11z' fill='%23962a1c'/%3E%3Cpath d='M22 7c2-2.6 4.4-2.6 6 0-1.6 2.6-4 2.6-6 0zM38 7c-2-2.6-4.4-2.6-6 0 1.6 2.6 4 2.6 6 0z'/%3E%3C/g%3E%3C/svg%3E");
  --fleuron-gilt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 14'%3E%3Cg fill='none' stroke='%23c9a458' stroke-width='1'%3E%3Cpath d='M0 7h20M40 7h20'/%3E%3Cpath d='M30 1.5c3 2.6 3 8.4 0 11-3-2.6-3-8.4 0-11z' fill='%23c9a458'/%3E%3Cpath d='M22 7c2-2.6 4.4-2.6 6 0-1.6 2.6-4 2.6-6 0zM38 7c-2-2.6-4.4-2.6-6 0 1.6 2.6 4 2.6 6 0z'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--vellum);
  background-image: var(--paper-grain),
    radial-gradient(ellipse 120% 80% at 50% 0%, transparent 55%, #c9b28a33 100%);
  font: 400 1.1875rem/1.62 var(--text);
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--rubric); }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
figure, p, h1, h2, h3, dl, dd, blockquote { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: -.012em; text-wrap: balance; }
h1 em, h2 em, h3 em { font-style: italic; }
p, li, dd { text-wrap: pretty; }
::selection { background: var(--rubric); color: var(--vellum-light); }
:focus-visible { outline: 2px solid var(--rubric); outline-offset: 4px; }

.shell { width: min(var(--wide), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip { position: absolute; z-index: 20; top: .5rem; left: .5rem; padding: .55rem 1rem; background: var(--vellum-light); transform: translateY(-200%); }
.skip:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Small-caps label, in the manner of a running head */
.kicker, .folio {
  font: 400 .98rem/1.35 var(--caps);
  letter-spacing: .045em;
  color: var(--rubric);
}
.on-cloth .kicker, .on-cloth .folio, .kicker.gold { color: var(--gilt-light); }
.spark { display: none; }

/* Fleuron divider */
.fleuron { display: block; width: 84px; height: 20px; margin: 1.6rem 0; background: var(--fleuron) center / contain no-repeat; border: 0; }
.on-cloth .fleuron { background-image: var(--fleuron-gilt); }

/* ---------- Cloth (binding) surfaces with gilt tooling ---------- */
.on-cloth {
  position: relative;
  isolation: isolate;
  color: var(--on-cloth);
  background-color: var(--cloth);
  background-image: var(--cloth-grain),
    radial-gradient(ellipse 90% 70% at 70% 20%, #2b5244 0%, transparent 70%),
    radial-gradient(ellipse 80% 60% at 0% 100%, #0d1f19 0%, transparent 70%);
}
.on-cloth a:hover { text-decoration-color: var(--gilt); }
.on-cloth :focus-visible { outline-color: var(--gilt-light); }
.tooled::before, .tooled::after { content: ""; position: absolute; pointer-events: none; z-index: -1; }
.tooled::before {
  inset: clamp(8px, 1.6vw, 18px);
  background:
    var(--corner) 0 0 / 24px 24px no-repeat,
    var(--corner) 100% 0 / 24px 24px no-repeat,
    var(--corner) 0 100% / 24px 24px no-repeat,
    var(--corner) 100% 100% / 24px 24px no-repeat,
    linear-gradient(var(--gilt), var(--gilt)) 12px 12px / calc(100% - 24px) 1px no-repeat,
    linear-gradient(var(--gilt), var(--gilt)) 12px calc(100% - 12px) / calc(100% - 24px) 1px no-repeat,
    linear-gradient(var(--gilt), var(--gilt)) 12px 12px / 1px calc(100% - 24px) no-repeat,
    linear-gradient(var(--gilt), var(--gilt)) calc(100% - 12px) 12px / 1px calc(100% - 24px) no-repeat;
}
.tooled::after { inset: calc(clamp(8px, 1.6vw, 18px) + 19px); border: 1px solid var(--gilt-dim); }

/* ---------- Buttons ---------- */
.button, .case-link, .archive-all, .cta, .nav-cta, .file-link, .mode-return, .read-choice a, .copy-prompt, .coupon-row button {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .55rem 1.15rem .62rem;
  font: 400 1.04rem/1.2 var(--caps); letter-spacing: .04em;
  text-decoration: none; text-align: center;
  border: 1px solid var(--cloth); border-radius: 2px;
  background: var(--cloth); color: var(--on-cloth);
  box-shadow: inset 0 0 0 3px var(--cloth), inset 0 0 0 4px var(--gilt);
  cursor: pointer;
  transition: background-color .2s, box-shadow .2s, color .2s;
}
.button:hover, .case-link:hover, .archive-all:hover, .cta:hover, .file-link:hover, .mode-return:hover, .read-choice a:hover {
  background: var(--cloth-deep); color: var(--gilt-light);
  box-shadow: inset 0 0 0 3px var(--cloth-deep), inset 0 0 0 4px var(--gilt-light);
  text-decoration: none;
}
.button span[aria-hidden], .case-link span, .archive-all span, .cta span { color: var(--gilt-light); font-family: var(--text); }
.button:active, .cta:active, .nav-cta:active, .case-link:active { transform: translateY(1px); }

.on-cloth .button, .on-cloth .cta, .nav-cta, .read-choice .quick-link {
  background: var(--gilt); color: var(--cloth-deep); border-color: var(--gilt);
  box-shadow: inset 0 0 0 3px var(--gilt), inset 0 0 0 4px var(--cloth-deep);
}
.on-cloth .button:hover, .on-cloth .cta:hover, .nav-cta:hover, .read-choice .quick-link:hover {
  background: var(--gilt-light); color: var(--cloth-deep); border-color: var(--gilt-light);
  box-shadow: inset 0 0 0 3px var(--gilt-light), inset 0 0 0 4px var(--cloth-deep);
}
.on-cloth .button span[aria-hidden], .on-cloth .cta span, .nav-cta span { color: var(--rubric-deep); }

/* Quiet, outlined variant */
.button.ghost, .read-choice a:not(.quick-link), .copy-prompt {
  background: transparent; color: var(--gilt-light); border-color: var(--gilt-dim); box-shadow: none;
}
.button.ghost:hover, .read-choice a:not(.quick-link):hover, .copy-prompt:hover { background: #ffffff0d; border-color: var(--gilt); color: var(--gilt-light); box-shadow: none; }

/* ---------- Masthead (running head) ---------- */
.top, .mast {
  position: relative; z-index: 2;
  background: var(--cloth-deep) var(--cloth-grain);
  color: var(--on-cloth);
  border-bottom: 1px solid #c9a45840;
}
.nav, .mast .shell { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand {
  display: inline-flex; align-items: center; gap: .7rem;
  font: 400 1.6rem/1 var(--display); letter-spacing: -.01em;
  text-decoration: none; white-space: nowrap; color: var(--on-cloth);
}
.brand img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 1px var(--cloth-deep), 0 0 0 2px var(--gilt); }
.brand span span { font-style: italic; margin-left: .22em; }
.brand i { color: var(--gilt); font-style: normal; }
.brand:hover { text-decoration: none; color: var(--gilt-light); }
.nav nav { display: flex; gap: clamp(1rem, 2.6vw, 2.3rem); font: 400 1.02rem/1 var(--caps); letter-spacing: .04em; }
.nav nav a { text-decoration: none; color: var(--on-cloth-soft); padding-block: .5rem; border-bottom: 1px solid transparent; }
.nav nav a:hover { color: var(--gilt-light); border-bottom-color: var(--gilt); }
.nav-cta { min-height: 42px; padding: .4rem .95rem .48rem; font-size: .98rem; white-space: nowrap; }
.archive-link, .nav-link { font: 400 1rem/1.2 var(--caps); letter-spacing: .04em; color: var(--gilt-light); text-decoration: none; border-bottom: 1px solid var(--gilt-dim); padding-bottom: .1rem; }
.archive-link:hover, .nav-link:hover { border-bottom-color: var(--gilt-light); }

/* ---------- Colophon (footer) ---------- */
footer, .foot {
  color: var(--on-cloth-soft);
  background: var(--cloth-deep) var(--cloth-grain);
  border-top: 1px solid #c9a45840;
}
.colophon { padding-block: clamp(2.6rem, 6vw, 4rem); text-align: center; display: grid; justify-items: center; gap: .9rem; }
.colophon .brand { font-size: 1.9rem; }
.colophon p { max-width: 44ch; font-style: italic; }
.colophon .fleuron { margin: .2rem 0; background-image: var(--fleuron-gilt); }
.colophon-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.6rem; font: 400 1rem/1.4 var(--caps); letter-spacing: .04em; }
.colophon-links a { color: var(--gilt-light); text-decoration: none; border-bottom: 1px solid var(--gilt-dim); }
.colophon small { font-size: .88rem; color: #b8aa8a; }

/* ---------- Plates (framed illustrations) ---------- */
.plate { position: relative; padding: 7px; border: 1px solid var(--rule); background: var(--vellum-light); box-shadow: 0 0 0 4px var(--vellum), 0 0 0 5px var(--rule-soft); }
.plate img { width: 100%; }
.plate-caption { display: flex; justify-content: space-between; gap: 1rem; margin-top: .85rem; font: italic 400 .98rem/1.35 var(--text); color: var(--ink-soft); }
.plate-caption strong { font: 400 .98rem/1.35 var(--caps); font-style: normal; letter-spacing: .04em; color: var(--rubric); }

/* Old engravings printed straight onto the page */
.printed { mix-blend-mode: multiply; filter: sepia(.28) saturate(.82) contrast(1.04); }

/* ---------- Footnote-style disclosure ---------- */
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}

/* ==========================================================================
   HOME
   ========================================================================== */

.cover-home { padding-block: clamp(3rem, 7vw, 6.5rem) clamp(3.2rem, 7vw, 6rem); }
.cover-home .cover-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; padding-inline: clamp(.5rem, 3vw, 2.5rem); }
.cover-home .imprint { font: 400 1.05rem/1.4 var(--caps); letter-spacing: .05em; color: var(--gilt-light); }
.cover-home h1 {
  margin-top: 1.1rem;
  font-size: clamp(3.1rem, 6.4vw, 6.3rem); line-height: .96; letter-spacing: -.02em;
  color: var(--vellum-light);
  max-width: 11ch;
}
.cover-home h1 em { display: inline; white-space: nowrap; font-size: 1.04em; }
.cover-home .lead { max-width: 44ch; font-size: clamp(1.15rem, 1.6vw, 1.32rem); line-height: 1.55; color: var(--on-cloth); }

/* Signup (SendFox) */
.signup { margin-top: 1.9rem; max-width: 560px; }
.signup fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.signup legend { padding: 0; margin-bottom: .75rem; font: italic 400 1.1rem/1.4 var(--text); color: var(--on-cloth-soft); }
.signup-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; align-items: start; }
.signup-forms details, .signup-forms details[open]::details-content { display: contents; }
.signup-forms details:not([open]) .signup-body { display: none; }
.signup-forms summary { grid-row: 1; }
.signup-forms details:first-child summary { grid-column: 1; }
.signup-forms details:last-child summary { grid-column: 2; }
.profile {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  min-height: 64px; padding: .7rem 1rem;
  border: 1px solid var(--gilt); border-radius: 2px;
  background: transparent; color: var(--vellum-light);
  box-shadow: inset 0 0 0 3px var(--cloth), inset 0 0 0 4px var(--gilt-dim);
  transition: background-color .2s, color .2s;
}
.profile.primary { background: var(--gilt); color: var(--cloth-deep); box-shadow: inset 0 0 0 3px var(--gilt), inset 0 0 0 4px var(--cloth-deep); }
.profile:hover { background: var(--gilt-light); color: var(--cloth-deep); box-shadow: inset 0 0 0 3px var(--gilt-light), inset 0 0 0 4px var(--cloth-deep); }
.profile-label { display: grid; gap: .1rem; font: 400 1.12rem/1.2 var(--caps); letter-spacing: .03em; }
.profile-label small { font: italic 400 .92rem/1.2 var(--text); letter-spacing: 0; opacity: .82; }
.profile-icon { font-size: 1.1rem; transition: transform .25s; }
.signup-panel[open] .profile-icon { transform: rotate(180deg); }
.signup-panel[open] .profile:not(:hover) { background: var(--vellum-light); color: var(--ink); box-shadow: inset 0 0 0 3px var(--vellum-light), inset 0 0 0 4px var(--rubric); border-color: var(--vellum-light); }
.signup-body { grid-column: 1 / -1; margin-top: .2rem; padding: 1rem 1.1rem .8rem; background: var(--vellum-light); color: var(--ink); border: 1px solid var(--gilt); }
.signup-body iframe { display: block; width: 100%; border: 0; }
.signup-body input:not([type=checkbox]):not([type=radio]):not([type=submit]) { width: 100%; min-height: 46px; padding: .5rem .75rem; font: 1.05rem var(--text); color: var(--ink); background: #fffaf0; border: 1px solid var(--rule); border-radius: 2px; }
.signup-body button, .signup-body [type=submit] { min-height: 46px; padding: .5rem 1.1rem; font: 1.02rem var(--caps); letter-spacing: .04em; color: var(--on-cloth); background: var(--cloth); border: 1px solid var(--cloth); border-radius: 2px; box-shadow: inset 0 0 0 3px var(--cloth), inset 0 0 0 4px var(--gilt); cursor: pointer; }
.hosted-form { display: inline-block; padding: .45rem 0 0; font-style: italic; font-size: .98rem; color: var(--rubric); }
.signup-note { margin-top: .9rem; font-style: italic; font-size: 1rem; color: var(--on-cloth-soft); }

/* The cameo: Lister in an oval gilt frame */
.cameo { justify-self: center; width: min(100%, 400px); text-align: center; }
.cameo-frame {
  position: relative; aspect-ratio: 3 / 4; border-radius: 50%;
  padding: 12px; background: var(--cloth-deep);
  box-shadow: 0 0 0 1px var(--gilt), inset 0 0 0 1px var(--gilt), 0 0 0 9px var(--cloth), 0 0 0 10px var(--gilt-dim), 0 30px 60px -20px #00000080;
}
.cameo-frame::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; box-shadow: inset 0 0 40px 6px #3b2a1640; pointer-events: none; }
.cameo-frame > div { height: 100%; border-radius: 50%; overflow: hidden; background: var(--vellum) var(--paper-grain); }
.cameo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; mix-blend-mode: multiply; filter: sepia(.22) saturate(.85) contrast(1.05); }
.cameo figcaption { margin-top: 1.5rem; display: grid; gap: .1rem; }
.cameo figcaption strong { font: 400 1.05rem/1.3 var(--caps); letter-spacing: .05em; color: var(--gilt-light); }
.cameo figcaption span { font: italic 1rem/1.3 var(--text); color: var(--on-cloth-soft); }

/* One orchestrated moment: the gilt is pressed into the cover on load */
@keyframes press-gilt { from { clip-path: inset(50% 50% 50% 50%); opacity: .2; } to { clip-path: inset(0); opacity: 1; } }
@keyframes ink-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cover-home.tooled::before { animation: press-gilt 1.1s cubic-bezier(.6, 0, .2, 1) both; }
.cover-home.tooled::after { animation: ink-in .8s .8s both; }
.cover-home .cover-copy > *, .cover-home .cameo { animation: ink-in .7s cubic-bezier(.2, .6, .2, 1) both; }
.cover-home .cover-copy > :nth-child(1) { animation-delay: .55s; }
.cover-home .cover-copy > :nth-child(2) { animation-delay: .65s; }
.cover-home .cover-copy > :nth-child(3) { animation-delay: .75s; }
.cover-home .cover-copy > :nth-child(4) { animation-delay: .85s; }
.cover-home .cover-copy > :nth-child(5) { animation-delay: .95s; }
.cover-home .cameo { animation-delay: .9s; animation-duration: 1s; }

/* Spine: the headband of subjects */
.spine { background: var(--cloth-deep) var(--cloth-grain); color: var(--gilt-light); border-block: 1px solid #c9a45855; }
.spine .shell { min-height: 58px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .4rem clamp(1rem, 3.5vw, 2.6rem); padding-block: .6rem; font: 400 1.04rem/1.3 var(--caps); letter-spacing: .05em; text-align: center; }
.spine b { width: 30px; height: 8px; background: var(--fleuron-gilt) center / contain no-repeat; font-size: 0; }

/* Pages */
.page { padding-block: clamp(4.5rem, 9vw, 8rem); }
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 34ch); align-items: end; gap: 1.2rem 3rem; margin-bottom: clamp(2.2rem, 5vw, 3.8rem); padding-bottom: 1.6rem; border-bottom: 1px solid var(--rule); position: relative; }
.page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; border-bottom: 1px solid var(--rule-soft); }
.page-head h2 { margin-top: .5rem; font-size: clamp(2.6rem, 5.6vw, 5rem); line-height: .98; max-width: 13ch; }
.page-head > p, .page-head .aside { color: var(--ink-soft); font-size: 1.1rem; }
.page-head .aside-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }

/* Cases: plates with captions */
.archive-feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.6rem, 4vw, 3.5rem); align-items: center; margin-bottom: clamp(3rem, 6vw, 5rem); }
.archive-feature .plate img { aspect-ratio: 1200 / 630; }
.archive-feature-copy h3 { font-size: clamp(2.3rem, 4.4vw, 3.8rem); line-height: 1; margin: .5rem 0 .9rem; }
.archive-feature-copy p:not(.kicker) { font-size: 1.2rem; color: var(--ink-soft); margin-bottom: 1.5rem; max-width: 38ch; }

.case-grid { --col-gap: clamp(2rem, 4.4vw, 4rem); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); align-items: stretch; }
.case { position: relative; display: flex; flex-direction: column; }
.case + .case::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--col-gap) / -2); border-left: 1px solid var(--rule); }
.case-art { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 50% 50% 0 0 / 38% 38% 0 0; border: 1px solid var(--rule); background: var(--vellum-light) var(--paper-grain); }
.case-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.case-art span { position: absolute; left: 50%; bottom: 10px; translate: -50% 0; padding: .1rem .7rem .15rem; font: italic 400 1rem/1.3 var(--display); color: var(--rubric); background: var(--vellum-light); border: 1px solid var(--rule); }
.case-body { display: flex; flex-direction: column; flex: 1; gap: .55rem; padding-top: 1.3rem; }
.case-body h3 { font-size: clamp(1.65rem, 2.4vw, 2.15rem); line-height: 1.04; }
.case-body p:not(.kicker) { color: var(--ink-soft); font-size: 1.08rem; margin-bottom: .9rem; }
.case-link { margin-top: auto; align-self: flex-start; }

/* Tracks: a book open on its facing pages */
.tracks { background: var(--vellum-deep) var(--paper-grain); border-block: 1px solid var(--rule-soft); }
.spread {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  background: var(--vellum-light) var(--paper-grain);
  border: 1px solid var(--rule);
  box-shadow: 0 1px 0 var(--rule-soft), 0 3px 0 -1px var(--vellum-light), 0 4px 0 -1px var(--rule-soft), 0 6px 0 -2px var(--vellum-light), 0 7px 0 -2px var(--rule-soft), 0 30px 50px -30px #4a361e66;
}
.spread::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 40px); width: 80px; pointer-events: none; background: linear-gradient(90deg, transparent, #6b512e14 40%, #6b512e33 50%, #6b512e14 60%, transparent); }
.track { position: relative; display: flex; flex-direction: column; padding: clamp(1.8rem, 5vw, 4rem) clamp(1.4rem, 4.6vw, 4rem) clamp(3.6rem, 6vw, 4.6rem); }
.track h3 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.02; margin: .6rem 0 1rem; }
.track p:not(.kicker) { color: var(--ink-soft); font-size: 1.12rem; max-width: 36ch; margin-bottom: 1.6rem; }
.track .button { align-self: flex-start; margin-top: auto; }
.track .page-no { position: absolute; bottom: 1.3rem; font: italic 1rem var(--display); color: var(--ink-soft); }
.track:first-child .page-no { left: clamp(1.4rem, 4.6vw, 4rem); }
.track:last-child .page-no { right: clamp(1.4rem, 4.6vw, 4rem); }

/* Universe: the antagonist plate on cloth */
.universe-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2.4rem, 7vw, 6.5rem); align-items: center; }
.universe h2 { font-size: clamp(2.6rem, 5.6vw, 5rem); line-height: .98; margin-top: .55rem; color: var(--vellum-light); max-width: 12ch; }
.antagonist { position: relative; }
.antagonist .arch { aspect-ratio: 4 / 5; border-radius: 50% 50% 0 0 / 40% 40% 0 0; overflow: hidden; background: var(--vellum) var(--paper-grain); box-shadow: 0 0 0 1px var(--gilt), 0 0 0 8px var(--cloth), 0 0 0 9px var(--gilt-dim); }
.antagonist img { width: 100%; height: 100%; object-fit: cover; object-position: center 8%; mix-blend-mode: multiply; filter: sepia(.35) saturate(.6) contrast(1.1); }
.antagonist figcaption { margin-top: 1.4rem; text-align: center; font: italic 1rem var(--text); color: var(--on-cloth-soft); }
.antagonist figcaption strong { display: block; font: 400 1.05rem var(--caps); font-style: normal; letter-spacing: .05em; color: var(--gilt-light); }
.universe-intro, .universe-close { margin-top: 1.3rem; max-width: 52ch; font-size: 1.15rem; color: var(--on-cloth); }
.universe-close { font-style: italic; color: var(--gilt-light); }
.method { margin-top: 1.8rem; border-top: 1px solid var(--gilt-dim); }
.method div { display: grid; grid-template-columns: 3rem 1fr; align-items: baseline; padding: .85rem 0; border-bottom: 1px solid var(--gilt-dim); }
.method dt { font: italic 1.5rem/1 var(--display); color: var(--gilt); }
.method dd { display: grid; gap: .1rem; }
.method dd strong { font: 400 1.18rem/1.3 var(--caps); letter-spacing: .03em; color: var(--vellum-light); font-weight: 400; }
.method dd span { color: var(--on-cloth-soft); font-size: 1.05rem; }

/* Douto: the prescription slip */
.douto-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2.4rem, 7vw, 6rem); align-items: center; }
.douto h2 { font-size: clamp(2.6rem, 5.6vw, 5rem); line-height: .98; margin-top: .55rem; max-width: 12ch; }
.douto h2 + p { margin-top: 1.3rem; color: var(--ink-soft); max-width: 50ch; font-size: 1.15rem; }
.steps { margin: 1.5rem 0 2rem; padding: 0; list-style: none; counter-reset: passo; }
.steps li { counter-increment: passo; display: grid; grid-template-columns: 2.4rem 1fr; padding: .55rem 0; border-bottom: 1px dotted var(--rule); font-size: 1.12rem; }
.steps li::before { content: counter(passo, lower-roman) "."; font: italic 1.15rem var(--display); color: var(--rubric); }
.sample {
  position: relative; padding: clamp(1.4rem, 3.6vw, 2.4rem);
  background: #f7f0de var(--paper-grain);
  border: 1px solid var(--rule);
  box-shadow: 0 0 0 6px #f7f0de, 0 0 0 7px var(--rule-soft), 0 26px 40px -24px #4a361e80;
  rotate: 1.2deg;
}
.sample-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: .9rem; border-bottom: 2px solid var(--ink); position: relative; }
.sample-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; border-bottom: 1px solid var(--ink); }
.sample-top b { font: 400 2rem/1 var(--display); }
.sample-top i { color: var(--rubric); font-style: normal; }
.sample-top span { font: italic 1rem var(--text); color: var(--ink-soft); }
.sample-question { position: relative; padding: 1.6rem 0 1.5rem 3.2rem; font: italic 400 clamp(1.3rem, 2.3vw, 1.75rem)/1.35 var(--text); }
.sample-question::before { content: "℞"; position: absolute; left: 0; top: 1.25rem; font: 400 2.6rem/1 var(--display); color: var(--rubric); }
.sample-detail { display: flex; gap: .7rem; padding-top: 1rem; border-top: 1px dotted var(--rule); font-size: 1.02rem; color: var(--ink-soft); }
.sample-detail > span { color: var(--rubric); }

/* Offer: an apothecary label with a wax seal */
.offer .offer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr); align-items: center; gap: clamp(2rem, 6vw, 5.5rem); }
.offer h2 { font-size: clamp(2.6rem, 5.6vw, 5rem); line-height: .98; margin-top: .55rem; color: var(--vellum-light); max-width: 12ch; }
.offer h2 + p { margin-top: 1.3rem; color: var(--on-cloth); max-width: 44ch; font-size: 1.15rem; }
.ticket {
  position: relative; display: grid; gap: .75rem; padding: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--ink); background: var(--vellum-light) var(--paper-grain);
  border-radius: 50% 50% 6px 6px / 14% 14% 6px 6px;
  box-shadow: inset 0 0 0 6px var(--vellum-light), inset 0 0 0 7px var(--rubric), inset 0 0 0 10px var(--vellum-light), inset 0 0 0 11px var(--rubric), 0 28px 50px -22px #000000a0;
  text-align: center; padding-top: clamp(2.6rem, 5vw, 3.4rem);
}
.ticket .kicker { color: var(--rubric); }
.ticket del { font-style: italic; color: var(--ink-soft); font-size: 1.05rem; }
.ticket-price { font: 400 clamp(3.2rem, 6vw, 4.6rem)/1 var(--display); font-variant-numeric: lining-nums; letter-spacing: -.02em; }
.ticket-price small { display: block; margin-top: .3rem; font: italic 1.05rem var(--text); letter-spacing: 0; color: var(--ink-soft); }
.coupon-row { display: flex; align-items: center; justify-content: space-between; gap: .65rem; margin-top: .3rem; padding: .45rem .5rem .45rem 1rem; border: 1px dashed var(--rubric); }
.coupon-row code { font: 400 1.35rem/1 var(--caps); letter-spacing: .22em; color: var(--rubric); }
.coupon-row button { min-height: 42px; padding: .35rem .8rem; font-size: .96rem; }
.ticket .button { width: 100%; }
[data-copy-status]:empty { display: none; }
[data-copy-status] { font-style: italic; font-size: 1rem; color: var(--rubric); }
.ticket-note { font-size: .95rem; color: var(--ink-soft); font-style: italic; }
.seal {
  position: absolute; right: -14px; top: -14px; width: 78px; height: 78px; display: grid; place-items: center;
  border-radius: 47% 53% 50% 48% / 52% 46% 54% 48%;
  background: radial-gradient(circle at 35% 30%, #c2402c, var(--rubric) 45%, #5e160f 100%);
  box-shadow: 0 4px 10px #0006, inset 0 0 0 5px #00000022, inset 0 0 0 7px #ffffff10;
  color: #f2d0bd; font: italic 400 2rem/1 var(--display); rotate: -12deg;
}

/* FAQ: footnotes */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 7vw, 6rem); align-items: start; }
.faq h2 { font-size: clamp(2.6rem, 5.6vw, 5rem); line-height: .98; margin-top: .55rem; max-width: 10ch; }
.notes { border-top: 2px solid var(--ink); counter-reset: nota; }
.notes details { border-bottom: 1px solid var(--rule); counter-increment: nota; }
.notes summary { position: relative; display: grid; grid-template-columns: 2rem 1fr auto; align-items: baseline; gap: .3rem; min-height: 60px; padding: 1rem 0; font: 400 1.35rem/1.25 var(--display); }
.notes summary::before { font: 400 1.35rem/1 var(--display); color: var(--rubric); }
.notes details:nth-child(1) summary::before { content: "*"; }
.notes details:nth-child(2) summary::before { content: "†"; }
.notes details:nth-child(3) summary::before { content: "‡"; }
.notes details:nth-child(4) summary::before { content: "§"; }
.notes details:nth-child(5) summary::before { content: "‖"; }
.notes details:nth-child(6) summary::before { content: "¶"; }
.notes summary::after { content: "+"; font: 400 1.5rem/1 var(--display); color: var(--rubric); transition: rotate .25s; }
.notes details[open] summary::after { rotate: 45deg; }
.notes summary:hover { color: var(--rubric-deep); }
.notes details p { padding: 0 0 1.2rem 2.3rem; color: var(--ink-soft); font-size: 1.1rem; max-width: 58ch; }

/* ==========================================================================
   ARQUIVO (índice)
   ========================================================================== */
.cover-index { padding-block: clamp(3rem, 7vw, 5.5rem); text-align: center; }
.cover-index .shell { display: grid; justify-items: center; }
.crumb { font: 400 1rem var(--caps); letter-spacing: .04em; color: var(--on-cloth-soft); }
.crumb a { color: var(--gilt-light); text-decoration: none; }
.cover-index h1 { margin: .9rem 0 .6rem; font-size: clamp(3.2rem, 8vw, 6.6rem); line-height: .95; color: var(--vellum-light); }
.cover-index p:not(.folio):not(.crumb) { max-width: 50ch; color: var(--on-cloth); font-size: 1.15rem; }
.cover-index .fleuron { margin-inline: auto; }

.daily { position: relative; margin-top: clamp(-2.6rem, -4vw, -1.6rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding: 1.4rem clamp(1.3rem, 4vw, 2.4rem) 1.4rem clamp(3.4rem, 7vw, 4.6rem); background: var(--vellum-light) var(--paper-grain); border: 1px solid var(--rule); box-shadow: 0 0 0 5px var(--vellum-light), 0 0 0 6px var(--rule-soft), 0 24px 40px -26px #4a361e80; z-index: 1; }
.daily::before { content: ""; position: absolute; top: -12px; left: clamp(1.1rem, 3vw, 1.8rem); width: 20px; height: calc(100% + 30px); background: linear-gradient(90deg, #7a2016, var(--rubric) 30%, #b03a29 50%, var(--rubric) 70%, #7a2016); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 10px), 0 100%); }
.daily h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.05; margin: .2rem 0; }
.daily #daily-title { font-style: italic; font-size: 1.2rem; color: var(--ink-soft); }

.toc { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(4rem, 8vw, 7rem); }
.toc-head { text-align: center; margin-bottom: 2.4rem; }
.toc-head h2 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.toc ol { list-style: none; margin: 0 auto; padding: 0; max-width: 920px; border-top: 2px solid var(--ink); }
.toc ol::before { content: ""; display: block; border-top: 1px solid var(--ink); margin-top: 3px; }
.toc li { border-bottom: 1px solid var(--rule-soft); }
.toc a { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: .1rem 1rem; padding: 1.25rem .5rem 1.3rem; text-decoration: none; transition: background-color .2s; }
.toc a:hover { background: #fffaf0a6; }
.toc a:hover .toc-title { color: var(--rubric-deep); }
.toc-num { grid-row: span 2; padding-top: .35rem; font: italic 400 1.35rem/1 var(--display); color: var(--rubric); text-align: right; }
.toc-line { display: flex; align-items: baseline; gap: .6rem; min-width: 0; }
.toc-title { font: 400 clamp(1.45rem, 2.6vw, 1.95rem)/1.15 var(--display); transition: color .2s; }
.toc-line::after { content: ""; flex: 1 1 2rem; order: 2; min-width: 1.5rem; border-bottom: 2px dotted var(--rule); transform: translateY(-.3em); }
.toc-meta { order: 3; white-space: nowrap; font: 400 1rem var(--caps); letter-spacing: .03em; color: var(--ink-soft); }
.toc-dek { grid-column: 2; max-width: 62ch; font-style: italic; color: var(--ink-soft); font-size: 1.06rem; }
.toc-area { grid-column: 2; font: 400 .95rem var(--caps); letter-spacing: .04em; color: var(--rubric); }

/* ==========================================================================
   DOSSIÊ (capítulo)
   ========================================================================== */
.dossie .cover { padding-block: clamp(2.8rem, 7vw, 5.5rem); }
.dossie .cover-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 420px); align-items: center; gap: clamp(1.6rem, 6vw, 5rem); padding-inline: clamp(.5rem, 3vw, 2.5rem); }
.dossie .cover h1 { margin: .8rem 0 1rem; font-size: clamp(2.7rem, 6vw, 5.2rem); line-height: .98; color: var(--vellum-light); max-width: 14ch; }
.dossie .dek { max-width: 42ch; font-size: clamp(1.15rem, 2vw, 1.35rem); font-style: italic; color: var(--on-cloth); }
.story-meta { margin-top: 1.1rem; font: 400 1rem/1.4 var(--caps); letter-spacing: .04em; color: var(--on-cloth-soft); }
.read-choice { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.dossie .cover img { width: 100%; aspect-ratio: 1 / 1.1; object-fit: cover; object-position: 50% 30%; border-radius: 50% 50% 0 0 / 42% 42% 0 0; background: var(--vellum); box-shadow: 0 0 0 1px var(--gilt), 0 0 0 8px var(--cloth), 0 0 0 9px var(--gilt-dim); }
.dossie .cover img.leito-cover { aspect-ratio: 1200 / 630; object-fit: contain; border-radius: 1px; box-shadow: 0 0 0 6px var(--cloth-deep), 0 0 0 7px var(--gilt), 0 24px 40px -20px #000000a0; rotate: 1.5deg; }

.reading { width: min(700px, calc(100% - 2 * var(--gutter))); margin-inline: auto; padding-block: clamp(2.4rem, 6vw, 4.8rem); font-size: clamp(1.2rem, 1.9vw, 1.3rem); line-height: 1.7; }
.reading p { margin: .7rem 0 1.1rem; hyphens: auto; }
.reading > h2, .reading section > h2 { font-size: clamp(1.85rem, 3.4vw, 2.5rem); line-height: 1.08; margin: 2.6rem 0 .9rem; }
.reading .story-label { margin: 0 0 1.2rem; font: 400 1rem/1.5 var(--caps); letter-spacing: .04em; color: var(--ink-soft); text-align: center; }
.reading nav.story-label a { color: var(--rubric); text-decoration: none; }
.reading nav.story-label a:hover { text-decoration: underline; }
.reading nav.story-label + .story-label { margin-top: -.8rem; font-family: var(--text); font-style: italic; letter-spacing: 0; padding-bottom: 1.6rem; background: var(--fleuron) center bottom / 64px 15px no-repeat; }
.reading .scene p:first-child::first-letter {
  float: left; margin: .05em .12em 0 0; padding: .02em .12em 0;
  font: 400 4.5em/.78 var(--display); color: var(--rubric);
}

.brief { scroll-margin-top: 1rem; margin: 1rem 0 2rem; padding: 1.4rem 1.6rem; background: #f7f0de var(--paper-grain); border: 1px solid var(--rule); box-shadow: 0 0 0 5px #f7f0de, 0 0 0 6px var(--rule-soft); }
.brief h2 { margin: .3rem 0 .6rem !important; font-size: clamp(1.7rem, 3vw, 2.2rem) !important; }
.brief .mode-return { margin-top: .4rem; }
#resumo:not(:target) { display: none; }
body:has(#resumo:target) .full-story { display: none; }

.clues { position: relative; margin: 2.4rem 0; padding: 1.5rem clamp(1.1rem, 4vw, 1.8rem) 1rem; background: #f7f0de var(--paper-grain); border: 1px solid var(--rule); rotate: -.4deg; box-shadow: 0 18px 30px -24px #4a361e80; }
.clues::before { content: ""; position: absolute; top: -10px; left: 50%; width: 110px; height: 22px; translate: -50% 0; rotate: 2deg; background: #d9c79cd0; box-shadow: 0 1px 2px #0002; }
.clues h2 { margin: .25rem 0 .7rem !important; font-size: clamp(1.6rem, 3vw, 2.1rem) !important; }
.clues ol { margin: 0; padding: 0; list-style: none; counter-reset: pista; }
.clues li { counter-increment: pista; display: grid; grid-template-columns: 2.2rem 1fr; gap: .2rem .6rem; padding: .8rem 0; border-top: 1px dotted var(--rule); font-size: 1.08rem; line-height: 1.5; }
.clues li::before { content: counter(pista, upper-roman) "."; font: italic 1.15rem/1.4 var(--display); color: var(--rubric); }
.clues strong { display: block; font: 400 1.1rem/1.4 var(--caps); letter-spacing: .03em; font-weight: 400; }

.question { position: relative; margin: 2.6rem 0; padding: 1.8rem clamp(1.2rem, 4vw, 2rem) 1.2rem; background: var(--vellum-light) var(--paper-grain); border: 1px solid var(--rule); box-shadow: inset 0 0 0 5px var(--vellum-light), inset 0 0 0 6px var(--rule-soft); }
.question h2 { margin: .3rem 0 .8rem !important; }
.question summary { position: relative; display: inline-flex; align-items: center; gap: .9rem; min-height: 56px; padding: .4rem 0; font: 400 1.1rem var(--caps); letter-spacing: .04em; color: var(--rubric-deep); }
.question summary::before { content: "L"; display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 47% 53% 50% 48% / 52% 46% 54% 48%; background: radial-gradient(circle at 35% 30%, #c2402c, var(--rubric) 45%, #5e160f 100%); box-shadow: 0 3px 8px #0004, inset 0 0 0 4px #00000022; color: #f2d0bd; font: italic 1.6rem/1 var(--display); transition: rotate .4s, scale .3s; }
.question summary:hover::before { rotate: -14deg; }
.question details[open] summary::before { scale: .85; rotate: -30deg; opacity: .75; }
.question details p { border-top: 1px dotted var(--rule); padding-top: 1rem; }

.sources-list { list-style: none; padding: 0; font-size: 1.04rem; color: var(--ink-soft); }
.sources-list li { margin: .35rem 0; padding-left: 1.6rem; text-indent: -1.6rem; }
.sources-list li::before { content: "❧"; display: inline-block; width: 1.6rem; text-indent: 0; color: var(--rubric); }

.offer-box { position: relative; isolation: isolate; margin: 2.8rem 0; padding: clamp(2rem, 5vw, 2.8rem); color: var(--on-cloth); background: var(--cloth) var(--cloth-grain); }
.offer-box::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--gilt); pointer-events: none; z-index: -1; }
.offer-box::after { content: ""; position: absolute; inset: 13px; border: 1px solid var(--gilt-dim); pointer-events: none; z-index: -1; }
.offer-box .folio { color: var(--gilt-light); }
.offer-box h2 { margin: .4rem 0 .7rem !important; color: var(--vellum-light); }
.case-prompt { margin: 1.1rem 0; padding: 1.1rem 1.3rem 1.1rem 3.2rem; position: relative; background: #f7f0de var(--paper-grain); color: var(--ink); font-style: italic; }
.case-prompt::before { content: "℞"; position: absolute; left: .9rem; top: .7rem; font: normal 1.9rem/1 var(--display); color: var(--rubric); }
.case-prompt p { margin: 0 !important; font-size: 1.08rem; line-height: 1.55; }
.offer-box .cta { margin-top: .4rem; }
.copy-prompt { margin-right: .5rem; }
.copy-status { display: block; font-style: italic; font-size: 1rem; color: var(--gilt-light); }
.copy-status:not(:empty) { margin-top: .5rem; }
.offer-box .offer-meta { margin: .8rem 0 0 !important; font-size: 1rem; font-style: italic; color: var(--on-cloth-soft); }
.note { padding-top: 1.2rem; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: 1.02rem !important; font-style: italic; }
.calc-panel { padding: 1.2rem 1.4rem; background: #f7f0de; border: 1px solid var(--rule); border-left: 3px double var(--rubric); }
.calc-panel a { color: var(--rubric-deep); }

.more { background: var(--vellum-deep) var(--paper-grain); border-top: 1px solid var(--rule); }
.more-grid { min-height: 120px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: 1.8rem; }
.more-grid p { margin: 0; }
.more-grid p a { font: 400 clamp(1.4rem, 2.6vw, 1.9rem)/1.2 var(--display); text-decoration: none; }
.more-grid p a:hover { color: var(--rubric-deep); text-decoration: underline; }
.more .archive-link { color: var(--rubric) !important; border-bottom-color: var(--rule); }
.dossie .foot { padding: 0; }

/* The silk ribbon bookmark marks reading progress */
@supports (animation-timeline: scroll()) {
  .dossie::after {
    content: ""; position: fixed; z-index: 30; top: 0; right: max(10px, calc(50% - 600px));
    width: 18px; height: 100vh; pointer-events: none;
    background: linear-gradient(90deg, #6e1c13, var(--rubric) 30%, #b5402e 50%, var(--rubric) 70%, #6e1c13);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 12px), 0 100%);
    transform-origin: top; scale: 1 0;
    animation: ribbon linear both; animation-timeline: scroll(root);
    filter: drop-shadow(0 2px 2px #0004);
  }
  @keyframes ribbon { from { scale: 1 .02; } to { scale: 1 1; } }
  /* A fita fica atrás do rodapé (que a cobre) e o texto guarda uma folga discreta à direita,
     para a fita não passar por cima das letras no celular nem em telas médias. Em telas largas a fita já fica fora da coluna. */
  .dossie footer, .dossie .foot { position: relative; z-index: 31; }
  .dossie .shell, .dossie .reading { padding-right: 24px; }
  @media (min-width: 1400px) { .dossie .shell, .dossie .reading { padding-right: 0; } }
}

/* ==========================================================================
   OBRIGADO / 404
   ========================================================================== */
.edition-page { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.edition-cover { display: grid; align-items: center; padding-block: clamp(3rem, 7vw, 6rem); }
.edition { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, .62fr); align-items: center; gap: clamp(2rem, 7vw, 6rem); padding-inline: clamp(.5rem, 3vw, 2.5rem); }
.edition h1 { margin: .8rem 0 1.2rem; font-size: clamp(3rem, 7vw, 6rem); line-height: .96; color: var(--vellum-light); }
.edition p { max-width: 48ch; color: var(--on-cloth); font-size: 1.15rem; margin-bottom: .8rem; }
.edition p a { color: var(--gilt-light); }
.first-cases { list-style: none; margin: 1.4rem 0; padding: 0; max-width: 520px; border-top: 1px solid var(--gilt-dim); }
.first-cases li { border-bottom: 1px solid var(--gilt-dim); }
.first-cases a { display: grid; grid-template-columns: 2.4rem 1fr auto; align-items: baseline; gap: .6rem; min-height: 56px; padding: .8rem .2rem; text-decoration: none; font: 400 1.3rem/1.2 var(--display); color: var(--vellum-light); }
.first-cases a:hover { color: var(--gilt-light); }
.first-cases a span { font: italic 1.1rem var(--display); color: var(--gilt); }
.edition-page footer .shell { padding-block: 1.2rem; font-size: 1rem; }
.edition-page footer a { color: var(--gilt-light); }
.cover-404 { text-align: center; }
.cover-404 .shell { display: grid; justify-items: center; }
.cover-404 h1 { margin: .8rem 0 1rem; font-size: clamp(3rem, 8vw, 6.4rem); line-height: .95; color: var(--vellum-light); }
.cover-404 p:not(.folio) { color: var(--on-cloth); font-size: 1.15rem; max-width: 46ch; }
.cover-404 p.numeral { font: italic 400 clamp(5rem, 16vw, 11rem)/1 var(--display); color: var(--gilt); opacity: .9; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .nav nav { display: none; }
  .cover-home .cover-grid, .universe-grid, .douto-grid, .faq-grid, .offer .offer-grid, .archive-feature, .dossie .cover-grid, .edition { grid-template-columns: 1fr; }
  .cameo { width: min(78%, 340px); }
  .page-head { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .case + .case::before { display: none; }
  .case { display: grid; grid-template-columns: minmax(110px, .38fr) 1fr; gap: 1.2rem; align-items: start; }
  .case-body { padding-top: 0; }
  .antagonist { max-width: 360px; }
  .universe-grid > div { order: -1; }
  .dossie .cover-grid > img:not(.leito-cover) { max-width: 260px; }
  .dossie .cover-grid > img.leito-cover { max-width: 460px; }
  .edition figure { max-width: 260px; }
  .ticket { max-width: 440px; }
}
@media (max-width: 640px) {
  body { font-size: 1.125rem; }
  .nav, .mast .shell { min-height: 62px; gap: .8rem; }
  .brand { font-size: 1.35rem; }
  .brand img { width: 34px; height: 34px; }
  .nav-cta { font-size: .9rem; padding: .35rem .65rem .4rem; min-height: 40px; }
  .cover-home .cover-grid, .dossie .cover-grid, .edition { padding-inline: .6rem; }
  .tooled::after { display: none; }
  .signup-forms { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .profile { padding: .6rem .7rem; min-height: 60px; }
  .profile-label { font-size: 1.02rem; }
  .spine .shell { font-size: .95rem; gap: .2rem .9rem; }
  .spine b { width: 20px; }
  .spread { grid-template-columns: 1fr; }
  .spread::after { display: none; }
  .track + .track { border-top: 1px solid var(--rule); }
  .track:last-child .page-no { right: auto; left: clamp(1.4rem, 4.6vw, 4rem); }
  .case { grid-template-columns: 1fr; }
  .case-art { max-width: 260px; }
  .toc a { grid-template-columns: 2.6rem minmax(0, 1fr); padding-inline: 0; }
  .toc-line { display: block; }
  .toc-line::after { display: none; }
  .toc-meta { display: block; margin-top: .25rem; }
  .daily { padding-left: 3.4rem; }
  .sample { rotate: 0deg; }
  .seal { right: -6px; top: -18px; width: 64px; height: 64px; font-size: 1.7rem; }
}
@media (max-width: 380px) {
  .signup-forms { display: block; }
  .signup-forms summary { margin-top: .5rem; }
  .nav-cta span { display: none; }
}

/* Buttons printed on vellum inside a cloth section keep the cloth style */
.on-cloth .ticket .button {
  background: var(--cloth); color: var(--on-cloth); border-color: var(--cloth);
  box-shadow: inset 0 0 0 3px var(--cloth), inset 0 0 0 4px var(--gilt);
}
.on-cloth .ticket .button:hover { background: var(--cloth-deep); color: var(--gilt-light); box-shadow: inset 0 0 0 3px var(--cloth-deep), inset 0 0 0 4px var(--gilt-light); }
.on-cloth .ticket .button span[aria-hidden] { color: var(--gilt-light); }
.coupon-row button { background: transparent; color: var(--rubric-deep); border-color: var(--rubric); box-shadow: none; }
.coupon-row button:hover { background: var(--rubric); color: var(--vellum-light); }
.offer-box .cta { background: var(--gilt); color: var(--cloth-deep); border-color: var(--gilt); box-shadow: inset 0 0 0 3px var(--gilt), inset 0 0 0 4px var(--cloth-deep); }
.offer-box .cta:hover { background: var(--gilt-light); color: var(--cloth-deep); box-shadow: inset 0 0 0 3px var(--gilt-light), inset 0 0 0 4px var(--cloth-deep); }

/* ==========================================================================
   SendFox embed — reescrito no padrão do tratado (sobrepõe estilos inline)
   ========================================================================== */
.signup-body { position: relative; padding: 1.4rem 1.3rem 1rem; background: var(--vellum-light) var(--paper-grain); border: 1px solid var(--gilt); box-shadow: inset 0 0 0 5px var(--vellum-light), inset 0 0 0 6px var(--rule-soft); }
.signup-body::before { content: "Ficha de inscrição"; display: block; margin-bottom: .2rem; font: 400 1rem/1.3 var(--caps); letter-spacing: .05em; color: var(--rubric); }
.sendfox-embed { max-width: none !important; }
.sendfox-embed-card { background: transparent !important; color: var(--ink) !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 0 !important; font-family: var(--text) !important; }
.sendfox-embed-card form { gap: .9rem !important; }
.sendfox-embed-card label { font-family: var(--text) !important; color: var(--ink-soft) !important; }
.sendfox-embed-card form > div:first-child label { font: 400 1rem/1.3 var(--caps) !important; letter-spacing: .04em; color: var(--ink) !important; margin-bottom: .35rem !important; }
.sendfox-embed-card input[type=email] {
  min-height: 50px; padding: .55rem .2rem !important;
  font: 400 1.2rem/1.3 var(--text) !important; color: var(--ink) !important;
  background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--ink) !important; border-radius: 0 !important;
  box-shadow: 0 3px 0 -2px var(--rule-soft);
}
.sendfox-embed-card input[type=email]::placeholder { color: #8f7c62; font-style: italic; }
.sendfox-embed-card input[type=email]:focus { outline: none; border-bottom-color: var(--rubric) !important; box-shadow: 0 2px 0 0 var(--rubric); }
.sendfox-embed-card label:has(input[type=checkbox]) { font-size: .98rem !important; font-style: italic; line-height: 1.45 !important; gap: .6rem !important; }
.sendfox-embed-card input[type=checkbox] { accent-color: var(--rubric) !important; width: 18px; height: 18px; margin-top: .2rem !important; }
.sendfox-embed-card button[type=submit] {
  min-height: 52px; margin-top: .3rem !important; padding: .6rem 1.1rem !important;
  font: 400 1.12rem/1.2 var(--caps) !important; letter-spacing: .05em;
  color: var(--on-cloth) !important; background: var(--cloth) !important;
  border: 1px solid var(--cloth) !important; border-radius: 2px !important;
  box-shadow: inset 0 0 0 3px var(--cloth), inset 0 0 0 4px var(--gilt);
  transition: background-color .2s, color .2s;
}
.sendfox-embed-card button[type=submit]:hover { background: var(--cloth-deep) !important; color: var(--gilt-light) !important; }
.sendfox-embed-card button[type=submit]:focus-visible { outline: 2px solid var(--rubric); outline-offset: 3px; }
.signup-body .hosted-form { font-size: .92rem; }

/* ==========================================================================
   Caso mais recente + trilho do arquivo
   ========================================================================== */
.latest { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(1.6rem, 4.5vw, 4rem); align-items: center; margin-bottom: clamp(3.4rem, 7vw, 5.5rem); }
.latest .plate { display: block; }
.latest .plate img { aspect-ratio: 1200 / 630; }
.latest-copy { position: relative; }
.latest-tag {
  display: inline-block; position: relative; margin-bottom: 1.1rem; padding: .32rem 1.5rem .36rem .9rem;
  font: 400 1rem/1.2 var(--caps); letter-spacing: .05em; color: var(--vellum-light);
  background: linear-gradient(180deg, #a83324, var(--rubric) 55%, var(--rubric-deep));
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 0 100%);
}
.latest-copy h2, .latest-copy h3 { font-size: clamp(2.3rem, 4.4vw, 3.8rem); line-height: 1; margin: .45rem 0 .9rem; }
.latest-dek { font-size: 1.22rem; color: var(--ink-soft); max-width: 40ch; }
.latest-subject { margin-top: 1rem; padding-top: .8rem; border-top: 1px dotted var(--rule); font-style: italic; color: var(--ink); max-width: 44ch; }
.latest-subject span { display: block; font: normal 400 .95rem/1.3 var(--caps); letter-spacing: .04em; color: var(--rubric); }
.latest-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.button.paper { background: transparent; color: var(--cloth); border-color: var(--cloth); box-shadow: none; }
.button.paper:hover { background: #fffaf0b0; color: var(--rubric-deep); border-color: var(--rubric); box-shadow: none; }

.rail-wrap { border-top: 2px solid var(--ink); padding-top: 3px; }
.rail-wrap::before { content: ""; display: block; border-top: 1px solid var(--ink); }
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 0 1.4rem; }
.rail-head h3 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.rail-nav { display: flex; gap: .5rem; }
.rail-nav button {
  width: 46px; height: 46px; display: grid; place-items: center; padding: 0 0 .15rem;
  font: 400 1.7rem/1 var(--display); color: var(--cloth); background: transparent;
  border: 1px solid var(--cloth); border-radius: 50%; box-shadow: inset 0 0 0 3px var(--vellum), inset 0 0 0 4px var(--gilt-dim);
  cursor: pointer; transition: background-color .2s, color .2s, opacity .2s;
}
.rail-nav button:hover:not(:disabled) { background: var(--cloth); color: var(--gilt-light); }
.rail-nav button:disabled { opacity: .3; cursor: default; }

.rail {
  --slip: clamp(250px, 26vw, 300px);
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--slip); gap: clamp(1rem, 2vw, 1.6rem);
  margin: 0; padding: .4rem .2rem 1.6rem; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: .2rem;
  scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
  mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
}
.rail:focus-visible { outline-offset: 2px; }
.rail > li { scroll-snap-align: start; display: flex; }
.slip {
  position: relative; display: grid; grid-template-rows: auto auto 1fr auto; align-content: start; width: 100%;
  padding: .7rem .7rem 1.1rem; text-decoration: none; color: var(--ink);
  background: var(--vellum-light) var(--paper-grain); border: 1px solid var(--rule);
  box-shadow: 0 0 0 4px var(--vellum), 0 0 0 5px var(--rule-soft);
  transition: translate .25s, box-shadow .25s;
}
.slip:hover { translate: 0 -4px; box-shadow: 0 0 0 4px var(--vellum), 0 0 0 5px var(--rubric), 0 18px 28px -18px #4a361e99; }
.slip:hover .slip-title { color: var(--rubric-deep); }
.slip-art { display: block; overflow: hidden; border: 1px solid var(--rule-soft); background: var(--cloth); }
.slip-art img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.slip-num { position: absolute; top: 1.05rem; right: 1.05rem; padding: .05rem .5rem .1rem; font: italic 400 1rem/1.3 var(--display); color: var(--rubric); background: var(--vellum-light); border: 1px solid var(--rule); }
.slip-title { display: block; margin: .9rem .3rem .35rem; font: 400 1.38rem/1.12 var(--display); transition: color .2s; text-wrap: balance; }
.slip-subject { display: block; margin: 0 .3rem; font-style: italic; font-size: 1rem; line-height: 1.4; color: var(--ink-soft); }
.slip-meta { display: block; margin: .9rem .3rem 0; padding-top: .6rem; border-top: 1px dotted var(--rule); font: 400 .9rem/1.3 var(--caps); letter-spacing: .03em; color: var(--rubric); }
.rail-end a {
  display: grid; place-content: center; gap: .3rem; width: 100%; min-height: 100%; padding: 1.5rem; text-align: center; text-decoration: none;
  color: var(--on-cloth); background: var(--cloth) var(--cloth-grain);
  box-shadow: inset 0 0 0 6px var(--cloth), inset 0 0 0 7px var(--gilt), inset 0 0 0 11px var(--cloth), inset 0 0 0 12px var(--gilt-dim);
}
.rail-end span { font: 400 1.7rem/1.1 var(--display); color: var(--vellum-light); }
.rail-end em { font-size: 1rem; color: var(--gilt-light); }
.rail-end a:hover span { color: var(--gilt-light); }

/* Arquivo: o caso mais recente sobe sobre a capa */
.recent-sheet { position: relative; z-index: 1; margin-top: clamp(-2.8rem, -4vw, -1.6rem); padding: clamp(1.4rem, 4vw, 2.6rem); background: var(--vellum-light) var(--paper-grain); border: 1px solid var(--rule); box-shadow: 0 0 0 5px var(--vellum-light), 0 0 0 6px var(--rule-soft), 0 24px 40px -26px #4a361e80; }
.recent-sheet .latest { margin-bottom: 0; }

@media (max-width: 900px) {
  .latest { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rail { --slip: 78vw; mask-image: none; }
  .rail-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) { .slip:hover { translate: none; } }
.plate-caption strong { white-space: nowrap; }

/* Ficha de inscrição: nome da trilha, aceite e campo de e-mail */
#saude .signup-body::before { content: "Ficha de inscrição · Trilha clínica"; }
#entusiasta .signup-body::before { content: "Ficha de inscrição · Trilha de curiosidades"; }
.signup-body::before { padding-bottom: .7rem; margin-bottom: .9rem; border-bottom: 1px dotted var(--rule); }
.sendfox-embed-card input[type=checkbox] {
  appearance: none; -webkit-appearance: none; flex: none !important;
  width: 20px; height: 20px; margin: .18rem 0 0 !important; display: grid; place-items: center;
  background: #fffaf0; border: 1px solid var(--ink); border-radius: 1px; cursor: pointer;
  box-shadow: inset 0 0 0 2px #fffaf0;
  transition: background-color .15s;
}
.sendfox-embed-card input[type=checkbox]:checked { background: var(--rubric) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 6.5' fill='none' stroke='%23f4ecda' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; border-color: var(--rubric-deep); box-shadow: none; }
.sendfox-embed-card input[type=checkbox]:focus-visible { outline: 2px solid var(--rubric); outline-offset: 3px; }
.sendfox-embed-card label:has(input[type=checkbox]:checked) { color: var(--ink) !important; }
