:root {
  color-scheme: light;
  --paper: #f8f6ef;
  --ink: #172a35;
  --muted: #505b5d;
  --accent: #816435;
  --rule: #c9c6b9;
  --serif: Baskerville, "Baskerville Old Face", "Baskerville MT", Georgia, serif;
  --sans: "DM Sans", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box }
html { scroll-behavior: smooth }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.55 var(--sans) }
h1,h2,h3,p,figure { margin: 0 }
h1,h2,h3,.brand { font-family: var(--serif); font-weight: 400 }
a { color: inherit; text-decoration: none }
a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible { outline: 3px solid #b58735; outline-offset: 4px }
section[id] { scroll-margin-top: 20px }
.shell { width: min(89%, 1330px); margin-inline: auto }
.skip { position: absolute; z-index: 4; top: -5rem; background: var(--paper); padding: .8rem }
.skip:focus { top: 0 }
.masthead { display: flex; align-items: center; gap: 2.5rem; padding-block: 1.45rem; border-bottom: 1px solid var(--rule) }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.75rem; line-height: 1; letter-spacing: .045em; white-space: nowrap }
.seal { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid currentColor; font-size: 1.42rem; letter-spacing: -.07em; padding-right: .08em; color: var(--accent); outline: 1px solid currentColor; outline-offset: -4px }
.masthead nav { margin-left: auto; display: flex; gap: clamp(1rem, 2.5vw, 2.7rem) }
.masthead nav a,.outline,footer a:not(.brand) { font-size: .94rem }
.masthead nav a:hover,footer a:hover { text-decoration: underline; text-underline-offset: 5px }
.outline,.button { display: inline-flex; align-items: center; justify-content: center; font: 600 .94rem/1.2 var(--sans); padding: .8rem 1.35rem; border: 1px solid var(--ink); transition: background .15s, color .15s }
.outline:hover,.button { background: var(--ink); color: var(--paper) }
.hero { display: grid; grid-template-columns: 1fr 1.03fr; gap: clamp(2.25rem, 5vw, 6.5rem); align-items: center; padding-block: clamp(2rem, 3.8vw, 4.25rem) }
.hero-copy { padding-bottom: 1.5rem }
.kicker,.category,.cover figcaption span,.status { text-transform: uppercase; letter-spacing: .14em; font: 600 .8rem/1.5 var(--sans); letter-spacing: .14em }
.kicker { display: flex; align-items: center; gap: .8rem; color: var(--accent) }
.kicker span { width: 2.2rem; height: 1px; background: currentColor }
h1 { font-size: clamp(4.1rem, 6.8vw, 7.5rem); letter-spacing: -.057em; line-height: .94; margin-block: 1.6rem }
h1 em,h2 em { font-family: Georgia, serif; font-weight: 400; color: #806437; letter-spacing: -.065em }
.intro { color: var(--muted); font-size: clamp(1.05rem,1.36vw,1.24rem); line-height: 1.55; max-width: 36rem }
.hero-copy .intro { max-width: 31rem }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.8rem }
.button { cursor: pointer; min-height: 46px; border-radius: 0 }
.button:hover { background: #344957 }
.text-link,.read { font-size: .94rem; font-weight: 600; border-bottom: 1px solid #a99776; padding-block: .18rem }
.text-link:hover,.story:hover .read { color: var(--accent); border-color: currentColor }
.cover img { display: block; width: 100%; height: clamp(345px, 31vw, 492px); object-fit: cover; object-position: 50% 54%; background: #c8bb9f }
.cover figcaption { display: flex; align-items: center; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--rule); margin-top: .55rem; padding-top: .35rem }
.cover figcaption span { font-size: .72rem }
.cover figcaption i { font-family: Georgia,serif; font-size: .94rem }
.journal { background: #162a36; color: #f6f3e9; padding-block: clamp(2.5rem,4.3vw,4.8rem) }
.journal .kicker { color: #ddc18b }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin: .7rem 0 1.9rem }
h2 { font-size: clamp(2.75rem,4.5vw,5rem); line-height: 1.02; letter-spacing: -.047em }
.section-heading p { color: #d3d8d5; font-size: 1rem; line-height: 1.45 }
.stories { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(1rem,2vw,2rem) }
.story { display: flex; flex-direction: column; align-items: start; border-top: 1px solid #627078; padding-top: .6rem }
.print { width: 100%; aspect-ratio: 2.15; overflow: hidden; position: relative; isolation: isolate }
.print i { position: absolute; inset: 0; transition: transform .3s }
.story:hover .print i { transform: scale(1.04) }
.window { background: #bda780 }
.window i { background: repeating-radial-gradient(ellipse at 50% 100%, transparent 0 6px,#354344 7px 8px,transparent 9px 12px); inset: 12% 14% -10%; border-radius: 50% 50% 0 0 }
.orbit { background: #96a6a2 }
.orbit i { background: repeating-radial-gradient(ellipse at 32% 50%,transparent 0 5px,#344b52 6px 7px,transparent 8px 11px); inset: -42% 6% -50% 12%; transform: rotate(-18deg); border-radius: 50% }
.fold { background: #be987f }
.fold i { background: repeating-linear-gradient(55deg,transparent 0 6px,#60483b 7px 8px,transparent 9px 12px); inset: -2% 10%; clip-path: polygon(0 100%,38% 0,52% 55%,66% 16%,100% 100%) }
.steps { background: #c5bc9f }
.steps i { background: repeating-linear-gradient(0deg,#465349 0 2px,transparent 2px 8px); inset: 8% 10% 0; clip-path: polygon(0 95%,14% 95%,14% 77%,30% 77%,30% 59%,45% 59%,45% 40%,60% 40%,60% 20%,75% 20%,75% 0,100% 0,100% 100%,0 100%) }
.category { color: #ddc18b; margin-block: 1.05rem .35rem }
.story h3 { font-size: clamp(1.5rem,2.05vw,2.15rem); letter-spacing: -.025em; line-height: 1.12; margin-bottom: 1.1rem }
.read { margin-top: auto; font-weight: 400; color: #eee6d4 }
.story:hover .read { color: white }
.spread { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 7vw, 8rem); padding-block: clamp(3rem,6vw,6.5rem) }
.spread .kicker { margin-bottom: 1.25rem }
.spread .intro { margin-top: 1.1rem }
.body-copy { align-self: center; max-width: 39rem; font-size: 1.08rem; color: var(--muted) }
.body-copy > * + * { margin-top: 1rem }
.body-copy .text-link { display: inline-block; color: var(--ink) }
.status { color: var(--accent) }
.school { background: #eae8df }
details { border-block: 1px solid var(--rule); padding-block: .7rem }
summary { cursor: pointer; color: var(--ink); font-weight: 600 }
details p, details ol { margin-block: 1rem .3rem }
li + li { margin-top: .45rem }
.field { display: flex; margin-top: .4rem }
input { min-width: 0; width: 100%; font: inherit; border: 1px solid var(--rule); padding: .65rem .75rem; background: #fffdf6; color: var(--ink); border-radius: 0 }
label { font-size: .94rem; color: var(--ink); font-weight: 600 }
.field .button { flex-shrink: 0 }
#confirmacion:not(:empty) { border-left: 2px solid var(--accent); padding-left: .8rem; color: var(--ink) }
footer { background: #162a36; color: var(--paper) }
footer .shell { padding-block: 2rem; display: flex; align-items: center; gap: 1.6rem }
footer .seal { color: #dac093 }
footer .shell > span { color: #c8cfca; font-size: .9rem }
footer .shell > a:last-child { margin-left: auto }
.essay { width: min(90%, 700px); margin: 3.5rem auto 5rem }
.essay h1 { font-size: clamp(3rem,5.8vw,5.4rem); line-height: 1.02 }
.essay .lead { font: italic 1.48rem/1.45 var(--serif); color: var(--muted); border-bottom: 1px solid var(--rule); padding-bottom: 1.5rem }
.essay article > p:not(.kicker,.lead) { font: 1.23rem/1.65 Georgia,serif; margin-top: 1.3rem }
.essay aside { background: #ebe7db; padding: 1.4rem; margin: 2rem 0 }
.essay aside h2 { font: 600 1rem var(--sans); letter-spacing: normal; margin-bottom: .5rem }
@media(max-width: 900px) {
  .masthead { gap: 1.5rem }
  .stories { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 2rem }
  .actions { gap: 1rem }
}
@media(max-width: 760px) {
  .shell { width: 89% }
  .masthead { flex-wrap: wrap; justify-content: space-between; padding-block: 1rem .7rem; gap: .75rem }
  .masthead nav { order: 3; width: 100%; margin: 0; justify-content: space-between; gap: .6rem }
  .masthead nav a { padding-block: .3rem }
  .outline { padding: .6rem .95rem }
  .hero,.spread { grid-template-columns: 1fr; gap: 1.8rem }
  .hero { padding-block: 2.1rem 1.5rem }
  .hero-copy { padding: 0 }
  h1 { font-size: clamp(3.6rem,11vw,5.7rem); margin-block: 1.1rem }
  .actions { margin-top: 1.3rem }
  .cover img { height: auto; aspect-ratio: 1.65 }
  .section-heading { display: block }
  .section-heading p { margin-top: .8rem }
  .section-heading br { display: none }
  .spread { padding-block: 3rem }
  footer .shell { flex-wrap: wrap; gap: 1rem }
  footer .shell > span { display: none }
}
@media(max-width: 440px) {
  .stories { gap: 1.6rem .85rem }
  .print { aspect-ratio: 1.55 }
  .story h3 { font-size: 1.45rem }
  .category { font-size: .72rem; letter-spacing: .08em }
  .field { flex-direction: column; gap: .55rem }
}
@media(prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  *,*::before,*::after { transition: none !important }
}

.masthead [aria-current] { text-decoration: underline; text-underline-offset: .42em }
.outline[aria-current] { background: var(--ink); color: var(--paper) }
.interior { min-height: 100vh; display: flex; flex-direction: column }
.section-page { flex: 1 }
.section-page h1 { font-size: clamp(3.15rem, 5.7vw, 6.25rem); line-height: 1.01; margin-block: .85rem 1rem }
.section-page .journal { min-height: 70vh }
.section-page .section-heading h1 { margin: 0 }
.story h2 { font-size: clamp(1.5rem,2.05vw,2.15rem); line-height: 1.12; letter-spacing: -.025em; margin-bottom: 1.1rem }
.photo-frame { overflow: hidden }
.begin { gap: .55rem }
.begin span { font-size: 1.35rem; line-height: .8 }
.walkthrough { background: #162a36; color: var(--paper); padding-block: clamp(3rem,5vw,5.5rem) }
.case-intro { padding-bottom: 2rem; border-bottom: 1px solid #63737a }
.case-intro .kicker,.board-label,.step-label { color: #e1c495 }
.case-intro h2 { margin-block: .75rem }
.case-intro h2 em { color: #e1c495 }
.case-intro > p:last-child { color: #dbded8; font-size: 1.09rem }
.case-layout { display: grid; grid-template-columns: .85fr 1fr; gap: clamp(3rem,8vw,9rem); align-items: start }
.case-board { position: sticky; top: 8vh; margin-top: 2.6rem }
.board-label,.step-label { font-size: .83rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600 }
.case-nav { display: flex; flex-wrap: wrap; gap: .4rem 1.05rem; padding-block: .9rem; border-top: 1px solid #67777c }
.case-nav a { color: #cdd4d4; font-size: .92rem; padding-block: .35rem; border-bottom: 2px solid transparent }
.case-nav a:is(:hover,[aria-current]) { color: #f1d7a8; border-color: currentColor }
.case-step { min-height: min(65vh,40rem); padding-block: clamp(2.5rem,5vw,5rem); border-bottom: 1px solid #586970; scroll-margin-top: 6vh }
.case-step:last-child { border: 0 }
.step-label span { border-left: 1px solid #a3967d; padding-left: .85rem; margin-left: .6rem }
.case-step h3 { margin: .8rem 0 1.05rem; font-size: clamp(2.2rem,3.6vw,4.1rem); line-height: 1.03; letter-spacing: -.04em }
.case-step > p:not(.step-label) { max-width: 41rem; margin-top: .8rem; color: #dce1de; font-size: 1.09rem }
.case-step > p.case-question { color: #edcf9c; font: italic 1.45rem/1.36 var(--serif); padding-left: 1rem; border-left: 2px solid #c9ab76; margin-block: 1.4rem 0 }
.case-plate { padding: clamp(1.2rem,2.4vw,2.6rem); background: #e2d5b9; color: #20313a; background-image: linear-gradient(#182d3610 1px,transparent 1px),linear-gradient(90deg,#182d3610 1px,transparent 1px); background-size: 1.2rem 1.2rem; }
.plate-title { font: italic clamp(1.65rem,2.6vw,2.75rem)/1.12 var(--serif); padding-bottom: .9rem; border-bottom: 1px solid #7d8179 }
.lane { display: grid; grid-template-columns: minmax(6.6rem,.85fr) 1fr; gap: .25rem 1rem; align-items: center; padding-top: 1.15rem }
.desk { border: 1px solid #415456; background: #f5eddd; font: 600 .9rem/1.25 var(--sans); text-align: center; padding: .65rem .25rem }
.queue { display: flex; flex-wrap: wrap; gap: .37rem }
.queue i { display: block; width: .9rem; height: .9rem; border-radius: 50%; background: #385357; border: 1px solid #283f42 }
.lane + .lane .queue i { background: #976c40; border-color: #705233 }
.lane > span { grid-column: 2; font-size: .81rem }
.case-step .case-plate { margin-block: 1.3rem }
#scene-display:not(:empty) { margin-block: 1rem .75rem }
.has-board .case-step .case-plate { display: none }
.onwards { align-items: center }
@media(max-width: 760px), (max-height: 540px) {
  .case-layout { display: block }
  .case-board { position: static; margin-top: .8rem }
  .case-board .board-label,#scene-display { display: none }
  .case-nav { border-top: 0; padding: .25rem 0 .7rem; gap: .35rem .8rem }
  .case-step { min-height: auto; padding-block: 2.1rem }
  .has-board .case-step .case-plate { display: block }
  .section-page .spread { gap: 1rem }
}
@media(prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto }
  ::view-transition-group(root) { animation-duration: 260ms }
  .hero-copy { animation: arrive .65s both }
  .photo-frame img { animation: open-frame 1s both }
  .begin span { animation: hint 1.7s ease-in-out 2 }
  .enters { animation: arrive .6s ease-out both }
  #scene-display .case-plate { animation: turn-page .4s ease-out both }
  @keyframes arrive { from { opacity: .18; transform: translateY(18px) } to { opacity: 1; transform: translateY(0) } }
  @keyframes open-frame { from { transform: scale(1.055) } to { transform: scale(1) } }
  @keyframes hint { 50% { transform: translateY(3px) } }
  @keyframes turn-page { from { opacity: .45; transform: translateX(-8px) } to { opacity: 1; transform: translateX(0) } }
}
