/* ==========================================================================
   Magalhães Advocacia — Salas da Biblioteca (andar 23)  ·  artigos v2.1 (light)
   Each article is a ROOM in the tower at night. Shared chrome (header, HUD,
   rail, doors, footer) and primitives (.glass .btn .eyebrow .h-display .lead
   .wrap .cite) come from shell.css — this file only styles the room itself.
   Consumes tokens.css; defines no :root tokens, only local derived vars.

   Weight budget: no backdrop-filter, no mix-blend-mode, no big blurred
   shadows on large panels, no infinite animations, short intros (<= 1s).
   ========================================================================== */

.room, .rooms {
  --read-ink: rgba(240, 232, 217, .9);   /* body copy: a touch softer than --text for long night reading */
  --room-pad: clamp(20px, 4vw, 64px);
  --scroll-off: calc(var(--header-h) + 28px);
  position: relative;
  z-index: 1;
}

/* in-page targets clear the fixed header even without Lenis */
.room .sec h2, .room .notes li, .room .fn a, .room .summary, .room [id] { scroll-margin-top: var(--scroll-off); }

/* ==========================================================================
   1. The door  —  hero: plate, eyebrow, title, dek, meta   (<= ~65vh on desktop)
   ========================================================================== */
.door {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: calc(var(--header-h) + clamp(4px, 1.6vw, 22px)) 0 clamp(20px, 3vw, 40px);
}
/* a soft warm lamp + a scrim so type never fights the city (static, no filters) */
.door::before {
  content: "";
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(48% 62% at 14% 8%, rgba(242, 182, 90, .09), transparent 66%),
    linear-gradient(90deg, rgba(10, 11, 17, .84), rgba(10, 11, 17, .62) 56%, rgba(10, 11, 17, .16) 100%),
    linear-gradient(180deg, rgba(10, 11, 17, .28), transparent 24%, transparent 74%, rgba(10, 11, 17, .4));
}
.door__in { position: relative; }
/* the room number on the wall — kept inside the content column (never under the tower rail) */
.door__no {
  position: absolute; z-index: -1;
  right: var(--gutter);
  top: 6px;
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(112px, 15vw, 236px);
  line-height: .8;
  letter-spacing: -.012em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(240, 232, 217, .1);
  /* the room's light switches on: a warm band sweeps through the outlined numeral once */
  background: linear-gradient(100deg, transparent 38%, rgba(255, 212, 138, .2) 48%, rgba(242, 182, 90, .07) 54%, transparent 64%) no-repeat;
  background-size: 260% 100%;
  background-position: 115% 0;
  -webkit-background-clip: text; background-clip: text;
  pointer-events: none; user-select: none;
}
.room.is-lit .door__no { animation: no-sweep 1.6s var(--ease-out) .35s 1 both; }
@keyframes no-sweep { from { background-position: 115% 0; } to { background-position: -15% 0; } }
@media (min-width: 1100px) { .door__no { right: calc(var(--gutter) + var(--rail-w)); } }

.crumbs { margin: 0 0 clamp(8px, 1.2vw, 14px); }
.crumbs ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center;
  font-family: var(--f-mono); font-size: var(--fs-mono); font-weight: 400;
  letter-spacing: .08em; text-transform: uppercase; line-height: 1.4;
  color: var(--text-2);
}
.crumbs li:not(:last-child)::after { content: "/"; margin: 0 10px; color: var(--brass); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; color: var(--text-2); text-decoration: none; transition: color .2s var(--ease-out); }
.crumbs a:hover { color: var(--lamp-2); }
.crumbs [aria-current] { color: var(--text); }

/* ---- the room plate: engraved brass with a lit reading slot (sits on the eyebrow's line) ---- */
.plate {
  position: relative;
  display: inline-flex; flex-direction: column; gap: 8px; vertical-align: middle;
  margin: 0 22px 12px 0;
  padding: 10px 28px 9px;
  max-width: 100%;
  border-radius: 3px;
  overflow: hidden;
  color: #261a07;
  background:
    linear-gradient(180deg, rgba(255, 246, 220, .28), rgba(255, 246, 220, 0) 42%),
    linear-gradient(180deg, #d6b774 0%, #c4a05e 46%, #a47d3c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 214, .5),
    inset 0 -1px 0 rgba(60, 40, 8, .5),
    0 0 0 1px rgba(0, 0, 0, .5),
    0 6px 14px -8px rgba(0, 0, 0, .8);
}
/* screws */
.plate::before, .plate::after {
  content: ""; position: absolute; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff2cd, #94733a 58%, #4a3612);
  box-shadow: inset 0 0 0 1px rgba(40, 26, 4, .4);
}
.plate::before { left: 9px; }
.plate::after { right: 9px; }
.plate__txt {
  position: relative;
  font-size: 12px; font-weight: 500; letter-spacing: .16em; line-height: 1.35;
  text-shadow: 0 1px 0 rgba(255, 240, 200, .45);          /* engraved */
}
.plate__txt b { font-weight: 500; letter-spacing: .2em; }
.plate__bar, .floors__bar, .toc-m__bar {
  position: relative; display: block; height: 3px; border-radius: 2px; overflow: hidden;
  background: rgba(36, 24, 4, .55);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .6);
}
.plate__bar i, .floors__bar i, .toc-m__bar i {
  position: absolute; inset: 0; display: block;
  background: linear-gradient(90deg, #ff9d1c, #ffd98a 70%, #fff3cc);
  box-shadow: 0 0 6px rgba(255, 190, 80, .6);
  transform-origin: 0 50%; transform: scaleX(0);
}
/* one short sweep of light across the plate when the room opens (runs once, composited) */
.plate__shine {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .5) 50%, transparent 62%);
  transform: translateX(-120%);
}
.room.is-lit .plate__shine { animation: plate-shine .9s var(--ease-out) .15s 1 both; }
@keyframes plate-shine { from { transform: translateX(-120%); } to { transform: translateX(120%); } }

.door .eyebrow { margin-bottom: 12px; vertical-align: middle; }

.door__title {
  margin: 0;
  max-width: 17em;
  font-size: clamp(32px, 4.5vw, 68px);
  line-height: 1.05;
  letter-spacing: -.01em;
  text-wrap: balance;
  text-shadow: 0 1px 18px rgba(5, 6, 11, .6);
}
.door__title em { font-style: italic; color: var(--lamp); }

.door__dek {
  max-width: 38em;
  margin: clamp(12px, 1.4vw, 20px) 0 0;
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.5;
  color: rgba(240, 232, 217, .88);
  text-shadow: 0 1px 10px rgba(5, 6, 11, .8);
  text-wrap: pretty;
}

.door__meta {
  position: relative;
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  margin-top: clamp(16px, 1.8vw, 24px); padding-top: 14px;
  color: var(--text-2);
}
.door__meta::before {
  content: ""; position: absolute; left: 0; top: 0; width: min(100%, 480px); height: 1px;
  background: linear-gradient(90deg, var(--lamp), var(--brass) 34%, transparent);
  transform-origin: 0 50%;
}
.door__meta span::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 10px 2px 0; background: var(--brass); transform: rotate(45deg); }
html.has-motion .room:not(.is-lit) .door__meta::before { transform: scaleX(0); }
.room.is-lit .door__meta::before { animation: meta-draw .8s var(--ease-out) .2s both; }
@keyframes meta-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ==========================================================================
   2. The room: elevator floor list (left) + reading glass (right)
   ========================================================================== */
.room__layout {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding-block: 0 clamp(36px, 4.5vw, 64px);
}

/* ---- floor list ---- */
.floors { display: none; }
.floors__list { list-style: none; margin: 0; padding: 0; counter-reset: fl; }
.floors__list li { position: relative; margin: 0; }
/* the shaft: a segment from this button's centre to the next one's; lights up as you read past it */
.floors__list li:not(:last-child)::before {
  content: ""; position: absolute; left: 14.5px; top: 22px; height: 100%; width: 1px; z-index: 0;
  background:
    linear-gradient(var(--lamp), var(--lamp)) top left / 1px calc(var(--f, 0) * 100%) no-repeat,
    var(--line-2);
}
.floors__list li.is-past:not(:last-child)::before { --f: 1; }

.floors__list a {
  position: relative; z-index: 1;
  display: flex; align-items: flex-start; gap: 12px;
  min-height: 44px; padding: 7px 6px 7px 0;
  color: var(--text-2);
  font-size: 14.5px; line-height: 1.35; text-decoration: none;
  transition: color .2s var(--ease-out);
}
.floors__txt { padding-top: 4px; }
.floors__btn {
  flex: none; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .02em; line-height: 1; color: var(--brass-2);
  border: 1px solid rgba(201, 162, 94, .4);
  background: radial-gradient(circle at 35% 28%, rgba(255, 244, 214, .12), rgba(10, 11, 17, .9) 62%);
  transition: color .25s var(--ease-out), background .25s var(--ease-out), border-color .25s var(--ease-out), box-shadow .3s var(--ease-out);
}
.floors__list a:hover { color: var(--text); }
.floors__list a:hover .floors__btn { border-color: var(--lamp); }
.floors__list .is-past .floors__btn { color: var(--lamp); border-color: var(--brass); }
.floors__list a.is-active { color: var(--text); }
.floors__list a.is-active .floors__btn {
  color: #1c1305; border-color: var(--lamp-2);
  background: radial-gradient(circle at 35% 28%, #fff0c4, var(--lamp-2) 38%, var(--lamp) 100%);
  box-shadow: 0 0 0 3px rgba(242, 182, 90, .1), 0 0 10px rgba(242, 182, 90, .45);
}

/* mobile / tablet: collapsible panel at the top of the reading glass */
.toc-m {
  margin: 0 0 clamp(20px, 3vw, 28px);
  border: 1px solid var(--line); border-radius: var(--radius-2);
  background: rgba(10, 11, 17, .4);
}
.toc-m summary {
  list-style: none; display: flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 0 16px; cursor: pointer; color: var(--text);
}
.toc-m summary::-webkit-details-marker { display: none; }
.toc-m__lbl { color: var(--brass-2); }
.toc-m__bar { flex: 1; max-width: 160px; margin-left: auto; }
.toc-m__ico, .faq__ico { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(201, 162, 94, .45); background: radial-gradient(circle at 35% 28%, rgba(255, 244, 214, .1), rgba(10, 11, 17, .9) 62%); transition: background .25s var(--ease-out), border-color .25s, box-shadow .3s var(--ease-out); }
.toc-m__ico::before, .toc-m__ico::after, .faq__ico::before, .faq__ico::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; margin: -.75px 0 0 -5.5px; background: var(--brass-2);
  transition: transform .25s var(--ease-out), opacity .2s, background .2s;
}
.toc-m__ico::after, .faq__ico::after { transform: rotate(90deg); }
details[open] > summary > .toc-m__ico::after, details[open] > summary > .faq__ico::after { transform: rotate(0deg); opacity: 0; }
details[open] > summary > .faq__ico, details[open] > summary > .toc-m__ico {
  background: radial-gradient(circle at 35% 28%, #fff0c4, var(--lamp-2) 38%, var(--lamp) 100%); border-color: var(--lamp-2);
  box-shadow: 0 0 8px rgba(242, 182, 90, .4);
}
details[open] > summary > .faq__ico::before, details[open] > summary > .toc-m__ico::before { background: #1c1305; }
.toc-m .floors__list { padding: 2px 16px 12px; }

/* ---- the reading glass: a plain translucent panel (no blur, no big shadow) ---- */
.reading {
  position: relative;
  min-width: 0;
  padding: clamp(20px, 3vw, 44px) var(--room-pad) clamp(24px, 3.4vw, 48px);
  border-radius: var(--radius-2);
  color: var(--read-ink);
  font-size: 17px; line-height: 1.72;
  background: rgba(14, 16, 25, .72);
  border: 1px solid rgba(240, 214, 160, .09);
}
.reading p { margin: 0 0 1.2em; text-wrap: pretty; }
.reading strong { color: var(--text); font-weight: 600; }
.reading a:not(.btn):not(.fn-back):not([data-toc-link]) {
  color: var(--lamp); text-decoration: underline; text-decoration-thickness: 1px;
  text-decoration-color: rgba(242, 182, 90, .4); text-underline-offset: .22em;
  transition: color .2s, text-decoration-color .2s;
}
.reading a:not(.btn):not(.fn-back):not([data-toc-link]):hover { color: var(--lamp-2); text-decoration-color: currentColor; }
.reading em { font-style: italic; }

/* drop cap: Fraunces, faintly lit */
.dropcap::first-letter {
  float: left;
  font-family: var(--f-display); font-weight: 400;
  font-size: 5.1em; line-height: .78;
  padding: .06em .1em 0 0; margin-right: .02em;
  color: var(--lamp);
  text-shadow: 0 0 .3em rgba(242, 182, 90, .32);
}

.cite, .reading .cite { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .02em; color: var(--brass-2); }

/* ---- Em resumo: a lit, brass-framed panel ---- */
.summary {
  position: relative;
  margin: 0 0 clamp(26px, 3.4vw, 44px);
  padding: clamp(18px, 2.2vw, 26px) clamp(18px, 2.6vw, 30px) clamp(16px, 2vw, 22px);
  border: 1px solid rgba(224, 192, 132, .38);
  border-radius: var(--radius-2);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(242, 182, 90, .11), transparent 62%),
    rgba(10, 11, 17, .32);
  box-shadow: inset 0 0 0 1px rgba(10, 11, 17, .5);
}
.summary__title {
  display: flex; align-items: center; gap: 12px; margin: 0 0 12px; color: var(--brass-2);
}
.summary__title::before {                      /* a bulb that switches on (flickers once) when the panel arrives */
  content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--lamp-2); box-shadow: 0 0 8px 1px rgba(242, 182, 90, .55);
}
html.has-motion .summary:not(.is-on) .summary__title::before,
html.has-motion .cta:not(.is-on) .cta__call::before { background: rgba(255, 212, 138, .14); box-shadow: none; }
.summary.is-on .summary__title::before, .cta.is-on .cta__call::before { animation: bulb .9s steps(1, end) .25s 1 both; }
@keyframes bulb {
  0%   { background: rgba(255, 212, 138, .14); box-shadow: none; }
  18%  { background: var(--lamp-2); box-shadow: 0 0 8px 1px rgba(242, 182, 90, .55); }
  30%  { background: rgba(255, 212, 138, .2); box-shadow: none; }
  44%  { background: var(--lamp-2); box-shadow: 0 0 6px 1px rgba(242, 182, 90, .4); }
  52%  { background: rgba(255, 212, 138, .3); box-shadow: none; }
  64%, 100% { background: var(--lamp-2); box-shadow: 0 0 8px 1px rgba(242, 182, 90, .55); }
}
.summary ul { list-style: none; margin: 0; padding: 0; }
.summary li { position: relative; padding-left: 24px; margin: 0 0 .7em; font-size: 16.5px; line-height: 1.58; color: var(--text); }
.summary li:last-child { margin-bottom: 0; }
.summary li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 6px; height: 6px; background: var(--lamp); transform: rotate(45deg); }

/* ---- sections ---- */
.sec { margin-top: clamp(34px, 4.2vw, 56px); padding-top: clamp(20px, 2.6vw, 30px); border-top: 1px solid var(--line); }
.summary + .sec { margin-top: 0; padding-top: 0; border-top: 0; }
.sec h2 {
  position: relative;
  margin: 0 0 clamp(14px, 1.8vw, 22px);
  padding-right: 48px;
  font-family: var(--f-display); font-weight: 400; color: var(--text);
  font-size: clamp(26px, 3vw, 38px); line-height: 1.12; letter-spacing: -.006em;
  text-wrap: balance;
}
.sec h2::after {
  content: ""; display: block; width: 88px; height: 2px; margin-top: 14px;
  background: linear-gradient(90deg, var(--lamp), var(--brass) 60%, rgba(201, 162, 94, 0));
  transform-origin: 0 50%; transform: scaleX(.5);
  transition: transform .7s var(--ease-out);
}
.sec-no { display: block; margin-bottom: 10px; color: var(--brass-2); font-weight: 500; letter-spacing: .14em; transition: color .4s var(--ease-out), text-shadow .4s var(--ease-out); }
/* the section being read is the lit floor: § turns to lamp light and its rule runs out */
.sec.is-current .sec-no { color: var(--lamp-2); text-shadow: 0 0 12px rgba(242, 182, 90, .45); }
.sec.is-current h2::after { transform: scaleX(1); }
.sec-title { display: block; }

.h-link {
  position: absolute; right: -6px; bottom: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 0; border-radius: 50%; color: var(--text-2); cursor: pointer;
  opacity: 0; transition: opacity .2s, color .2s, background .2s;
}
.sec h2:hover .h-link, .h-link:focus-visible { opacity: 1; }
.h-link:hover { color: var(--lamp); background: var(--lamp-dim); }
@media (hover: none) { .h-link { opacity: .6; } }

/* ---- lists ---- */
.list { list-style: none; margin: 0 0 1.3em; padding: 0; }
.list li { position: relative; padding-left: 26px; margin: 0 0 .7em; }
.list li::before { content: ""; position: absolute; left: 0; top: .95em; width: 12px; height: 1px; background: var(--brass); }
.list--check li::before {
  top: .42em; width: 17px; height: 17px; border: 1.5px solid var(--brass); border-radius: 4px; background: rgba(10, 11, 17, .5);
  transition: border-color .3s var(--ease-out), background .3s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 50ms);
}
.list--check li::after {
  content: ""; position: absolute; left: 5.5px; top: .6em; width: 6px; height: 10px;
  border: solid var(--lamp); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transform-origin: 70% 70%;
  transition: transform .3s var(--ease-out); transition-delay: calc(var(--i, 0) * 50ms + 80ms);
}
.list--check.is-lit li::before { border-color: var(--lamp); background: var(--lamp-dim); }
.list--check.is-lit li::after { transform: rotate(45deg) scale(1); }

/* steps: elevator buttons that light one after another */
.steps { list-style: none; margin: 0 0 1.4em; padding: 0; counter-reset: step; }
.steps li { position: relative; counter-increment: step; margin: 0 0 1.2em; padding: 0 0 .3em 62px; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: -.1em; z-index: 1;
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  font-family: var(--f-mono); font-size: 13px; font-weight: 500; letter-spacing: .02em; color: var(--brass-2);
  border: 1px solid rgba(201, 162, 94, .45);
  background: radial-gradient(circle at 35% 28%, rgba(255, 244, 214, .12), rgba(10, 11, 17, .92) 62%);
  transition: color .3s var(--ease-out), background .3s var(--ease-out), border-color .3s var(--ease-out), box-shadow .35s var(--ease-out);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 20.5px; top: 46px; bottom: -1.2em; width: 1px;
  background: linear-gradient(var(--lamp), var(--lamp)) top left / 1px 0 no-repeat, var(--line-2);
  transition: background-size .5s var(--ease-io) .1s;
}
.steps li.is-lit::before {
  color: #1c1305; border-color: var(--lamp-2);
  background: radial-gradient(circle at 35% 28%, #fff0c4, var(--lamp-2) 38%, var(--lamp) 100%);
  box-shadow: 0 0 0 3px rgba(242, 182, 90, .1), 0 0 12px rgba(242, 182, 90, .4);
}
.steps li.is-lit:not(:last-child)::after { background-size: 1px 100%; }

/* ---- pull quote: lit on scroll by data-light ---- */
.pull {
  position: relative;
  margin: clamp(26px, 3.4vw, 42px) 0;
  padding: clamp(14px, 2.2vw, 24px) 0 clamp(14px, 2.2vw, 24px) clamp(20px, 2.8vw, 34px);
  border-left: 2px solid var(--brass);
  background: radial-gradient(ellipse 72% 44% at 0% 50%, rgba(242, 182, 90, .07), rgba(242, 182, 90, 0) 100%);
}
.pull::before {
  content: "“"; position: absolute; left: clamp(10px, 1.6vw, 20px); top: -.34em; z-index: -1;
  font-family: var(--f-display); font-size: clamp(90px, 11vw, 140px); line-height: 1;
  color: rgba(242, 182, 90, .08); pointer-events: none; user-select: none;
}
.reading .pull p {
  margin: 0; max-width: 24em;
  font-family: var(--f-display); font-weight: 300; font-style: normal;
  font-size: clamp(24px, 2.7vw, 34px); line-height: 1.26; letter-spacing: -.006em;
  color: var(--text); text-wrap: balance;
}
.reading .pull em { font-style: italic; color: var(--lamp); }

/* ---- footnotes ---- */
.fn { font-size: 1em; line-height: 0; vertical-align: baseline; }
.fn a {
  position: relative; top: -.55em; margin-left: 1px; padding: 3px 4px; border-radius: 3px;
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; line-height: 1; letter-spacing: 0;
  color: var(--lamp) !important; text-decoration: none !important;
}
.fn a::after { content: ""; position: absolute; inset: -16px -15px; }   /* hit area >= 44px */
.fn a:hover { background: var(--lamp-dim); }
.fn a:target, .notes li:target, .fn a.is-hit, .notes li.is-hit { background: var(--lamp-dim); }
.notes li.is-hit, .fn a.is-hit { animation: hit 1.6s var(--ease-out) both; }
@keyframes hit { 0% { background: rgba(242, 182, 90, .3); } 100% { background: var(--lamp-dim); } }

.notes { margin: 0; padding-left: 1.8em; list-style: decimal; font-size: 15px; line-height: 1.62; color: var(--text-2); }
.notes li { margin: 0 0 .8em; padding-left: 4px; border-radius: 3px; }
.notes li::marker { font-family: var(--f-mono); font-size: 12px; color: var(--brass-2); }
.fn-back { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: -10px 0; padding: 0 8px; color: var(--lamp); text-decoration: none; font-family: var(--f-mono); border-radius: 3px; }
.fn-back:hover { background: var(--lamp-dim); }
.notes__aside { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.6; color: var(--text-2); }

/* signature */
.sign { margin-top: clamp(28px, 3.6vw, 44px); padding-top: 18px; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
.sign p { margin: 0 0 .4em; }
.sign__who strong { color: var(--text); font-weight: 600; }

/* ---- mid-article call card ---- */
.cta {
  position: relative;
  margin: clamp(28px, 3.6vw, 44px) 0 0;
  padding: clamp(20px, 2.6vw, 32px);
  border: 1px solid rgba(242, 182, 90, .3);
  border-radius: var(--radius-2);
  line-height: 1.6;
  background:
    radial-gradient(90% 140% at 0% 0%, rgba(242, 182, 90, .11), transparent 62%),
    rgba(8, 9, 15, .5);
}
.cta__kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; color: var(--brass-2); }
.cta__call {
  position: relative; flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--brass); background: radial-gradient(circle at 35% 28%, rgba(255, 244, 214, .16), rgba(10, 11, 17, .9) 62%);
}
.cta__call::before {                           /* lit call button (static) */
  content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--lamp-2);
  box-shadow: 0 0 7px 1px rgba(242, 182, 90, .55);
}
.cta__title {
  margin: 0 0 10px; font-family: var(--f-display); font-weight: 400; color: var(--text);
  font-size: clamp(24px, 2.5vw, 32px); line-height: 1.14; letter-spacing: -.006em;
}
.cta__title em { color: var(--lamp); font-style: italic; }
.reading .cta__text { margin: 0 0 20px; max-width: 46em; font-size: 16.5px; line-height: 1.6; color: var(--text-2); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta__actions .btn { white-space: normal; line-height: 1.2; padding-block: 12px; }

/* ---- FAQ ---- */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 60px; padding: 12px 0; cursor: pointer;
  font-family: var(--f-display); font-weight: 400; color: var(--text);
  font-size: clamp(18px, 1.7vw, 21px); line-height: 1.3;
  transition: color .2s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--lamp-2); }
.faq__a { padding: 0 54px 18px 0; color: var(--read-ink); }
.reading .faq__a p { margin: 0; max-width: 56em; }
.faq__item[open] .faq__a { animation: rise .3s var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   3. "Outras salas da Biblioteca" (the concrete slab above is the shell's .slab)
   ========================================================================== */
.rooms { padding: clamp(40px, 5.2vw, 76px) 0 clamp(48px, 6vw, 88px); }
.rooms__title { margin: 0; max-width: 14em; font-size: clamp(30px, 4vw, 56px); line-height: 1.06; letter-spacing: -.01em; text-wrap: balance; }
.rooms__title em { font-style: italic; color: var(--lamp); }
.rooms__grid { list-style: none; margin: clamp(22px, 3vw, 36px) 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.rooms__grid > li { display: flex; }
.rooms__all { margin: clamp(20px, 2.6vw, 32px) 0 0; }

/* door cards: the leaf swings open on hover/focus and the room's light spills out */
.door-card {
  position: relative; display: flex; flex-direction: column; flex: 1; gap: 12px;
  padding: 20px 20px 18px;
  border-radius: var(--radius-2);
  background: rgba(16, 18, 28, .72);
  color: var(--text); text-decoration: none;
  transition: transform .25s var(--ease-out), border-color .2s;
}
.door-card__top { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 2px; }
.door-card__frame {
  position: relative; flex: none; display: block; width: 62px; height: 92px;
  perspective: 480px;
  border: 2px solid rgba(201, 162, 94, .5); border-bottom-width: 0; border-radius: 3px 3px 0 0;
  background: #08090d;
  transition: background .3s var(--ease-out);
}
.door-card__leaf {
  position: absolute; inset: 0; display: block;
  background: linear-gradient(90deg, #30323c, #23252d);
  border-right: 1px solid rgba(0, 0, 0, .55);
  transform-origin: 0 50%;
  transition: transform .45s var(--ease-out);
  backface-visibility: hidden;
}
.door-card__leaf::before { /* inset panels */
  content: ""; position: absolute; inset: 20px 8px 8px;
  border: 1px solid rgba(240, 232, 217, .1); border-radius: 2px;
}
.door-card__leaf::after { /* brass handle */
  content: ""; position: absolute; right: 6px; top: 58%; width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff2cd, #b08a46 60%, #5b4416);
}
.door-card__no {
  position: absolute; left: 50%; top: 5px; transform: translateX(-50%);
  padding: 2px 5px 1px; border-radius: 1px;
  font-style: normal; font-size: 8.5px; letter-spacing: .08em; color: #261a07;
  background: linear-gradient(180deg, #dcbd7c, #b08a46);
}
.door-card__id { display: flex; flex-direction: column; gap: 6px; padding-bottom: 4px; min-width: 0; }
.door-card__room { color: var(--brass-2); }
.door-card__cat { color: var(--text-2); letter-spacing: .06em; }
.door-card__title {
  font-family: var(--f-display); font-weight: 400; color: var(--text);
  font-size: clamp(21px, 2vw, 25px); line-height: 1.18; letter-spacing: -.006em; text-wrap: balance;
}
.door-card__title em { font-style: italic; color: var(--lamp); }
.door-card__txt { font-size: 15.5px; line-height: 1.55; color: var(--text-2); }
.door-card__go { margin-top: auto; padding-top: 6px; color: var(--lamp); }
.door-card__go i { display: inline-block; font-style: normal; transition: transform .2s var(--ease-out); }

/* entering view: each door comes ajar in turn and a sliver of the room's light spills out */
.door-card.is-on .door-card__leaf { transform: rotateY(-30deg); transition: transform 1.1s var(--ease-out) calc(var(--i, 0) * 140ms + 150ms); }
.door-card.is-on .door-card__frame {
  background: linear-gradient(180deg, rgba(255, 224, 160, .32), rgba(242, 182, 90, .62));
  box-shadow: -10px 0 22px -12px rgba(242, 182, 90, .5);
  transition: background .8s var(--ease-out) calc(var(--i, 0) * 140ms + 300ms), box-shadow .8s var(--ease-out) calc(var(--i, 0) * 140ms + 300ms);
}
@media (hover: hover) {
  .door-card:hover { transform: translateY(-3px); border-color: rgba(242, 182, 90, .4); }
}
.door-card:hover .door-card__leaf, .door-card:focus-visible .door-card__leaf { transform: rotateY(-74deg); transition-delay: 0s; transition-duration: .45s; }
.door-card:hover .door-card__frame, .door-card:focus-visible .door-card__frame,
.door-card.is-settled .door-card__leaf, .door-card.is-settled .door-card__frame { transition-delay: 0s; }
.door-card.is-settled .door-card__leaf { transition-duration: .45s; }
.door-card:hover .door-card__frame, .door-card:focus-visible .door-card__frame {
  background: linear-gradient(180deg, rgba(255, 224, 160, .5), rgba(242, 182, 90, .9));
}
.door-card:hover .door-card__go i, .door-card:focus-visible .door-card__go i { transform: translateX(4px); }
.door-card:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }

/* ==========================================================================
   4. Toast
   ========================================================================== */
.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); z-index: 130;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 12px 18px 12px 16px; border-radius: var(--radius);
  background: var(--bg-2); color: var(--text);
  border: 1px solid rgba(242, 182, 90, .4); border-left-width: 3px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .05em;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .8);
  transition: opacity .2s var(--ease-out), transform .3s var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   5. Breakpoints
   ========================================================================== */
@media (min-width: 640px) {
  .reading { font-size: 17.5px; }
  .rooms__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .reading { font-size: 18px; line-height: 1.74; }
  .rooms__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .room__layout { grid-template-columns: clamp(196px, 17vw, 244px) minmax(0, 900px); column-gap: clamp(24px, 3vw, 56px); align-items: start; }
  .floors { display: block; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
  .floors__nav { background: rgba(16, 18, 28, .72); padding: 16px 14px 10px 14px; border-radius: var(--radius-2); max-height: calc(100vh - var(--header-h) - 56px); overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
  .toc-m { display: none; }
}
.floors__plate { display: grid; gap: 8px; margin: 0 0 14px; }
.floors__room { color: var(--brass-2); letter-spacing: .16em; }
.floors__bar { height: 3px; background: rgba(0, 0, 0, .5); }
.floors__title { margin: 0 0 6px; color: var(--text-2); }

@media (max-width: 639px) {
  .door { padding-top: calc(var(--header-h) + 2px); }
  .door__no { top: 74px; right: var(--gutter); font-size: clamp(96px, 30vw, 150px); }
  .reading { margin-inline: -8px; padding-inline: 18px; }
  .cta { padding: 20px 16px; }
  .plate { margin-right: 0; padding-inline: 24px; }
  .plate__txt { font-size: 11px; letter-spacing: .12em; }
  .summary li { font-size: 16px; }
  .cta__actions .btn { width: 100%; }
  .h-link { right: -10px; }
  .door-card__frame { width: 56px; height: 86px; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  .sec h2 { padding-right: 34px; }
  .plate__txt { letter-spacing: .1em; }
}

/* ==========================================================================
   6. Motion preferences, no-JS, print
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .room *, .room *::before, .room *::after, .rooms *, .rooms *::before, .rooms *::after, .toast {
    animation: none !important; transition: none !important;
  }
  .door__no { transform: none !important; }
  .plate__shine { display: none; }
  .door-card:hover { transform: none; }
}

@media print {
  .door::before, .door__no, .plate__shine, .floors, .toc-m, .cta, .rooms, .slab, .h-link, .toast { display: none !important; }
  .door { padding-top: 0; }
  .reading { background: none; border: 0; color: #000; padding: 0; }
  .reading *, .door__title, .door__dek, .door__meta, .crumbs * { color: #000 !important; text-shadow: none !important; }
  .plate { color: #000; background: none; box-shadow: none; border: 1px solid #000; }
}
