/* Juego de planos: portafolio de Steven Correa */

@font-face {
  font-family: "Osifont";
  src: url("../fonts/osifont.woff") format("woff");
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

:root {
  --mat: #255a43;
  --mat-deep: #1d4a37;
  --mat-line: rgba(214, 236, 206, 0.12);
  --mat-line-5: rgba(214, 236, 206, 0.24);
  --mat-ink: #e3eee6;
  --paper: #f3f5f4;
  --paper-2: #e9edeb;
  --ink: #2b2f8f;
  --ink-2: #4f539e;
  --rule: rgba(43, 47, 143, 0.32);
  --rule-2: rgba(43, 47, 143, 0.16);
  --hi: #ffe14d;
  --hi-a: rgba(255, 225, 77, 0.9);
  --red: #c9262a;
  --tape: rgba(232, 222, 186, 0.8);

  --letter: "Osifont", "Archivo", system-ui, sans-serif;
  --text: "Archivo", system-ui, sans-serif;
  --code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --mat-gap: 26px;
  --frame-inset: 20px;
  --pad: 34px;
  --tb-w: 316px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--paper-2) var(--mat-deep);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* language switch: only the active language is rendered */
html[lang="es"] [lang="en"]:not(html),
html[lang="en"] [lang="es"]:not(html) { display: none !important; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--mat);
  font-variant-numeric: tabular-nums;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--mat) url("../mat.svg") left bottom / cover no-repeat;
}

::selection { background: var(--hi); color: var(--ink); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 3px;
}
.rail a:focus-visible { outline-color: var(--paper); }

h1, h2, h3, h4, p, ol, ul, dl, dd, figure, table { margin: 0; }
ol, ul { padding: 0; list-style: none; }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--letter);
  padding: 10px 14px;
}
.skip:focus { top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- rail: sheet numbers + language ---------- */

.rail {
  position: fixed;
  right: 12px;
  top: var(--mat-gap);
  z-index: 20;
  width: 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--letter);
}
.rail a {
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--mat-ink);
  font-size: 15px;
  text-decoration: none;
  border: 1px solid rgba(227, 238, 230, 0.35);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.rail a:hover { background: rgba(243, 245, 244, 0.14); }
.rail a[aria-current="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.rail hr { width: 100%; border: 0; border-top: 1px solid rgba(227, 238, 230, 0.35); margin: 6px 0; }
.rail .rail-lang a[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---------- sheet ---------- */

main { padding: var(--mat-gap) calc(var(--mat-gap) + 38px) var(--mat-gap) var(--mat-gap); display: grid; gap: var(--mat-gap); }

.sheet {
  position: relative;
  background: var(--paper);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.18), 0 16px 32px -14px rgba(0, 0, 0, 0.5);
  padding: var(--frame-inset);
  scroll-margin-top: var(--mat-gap);
}
.sheet-0 { min-height: calc(100vh - 2 * var(--mat-gap)); min-height: calc(100svh - 2 * var(--mat-gap)); display: flex; }

.tape { position: absolute; top: -9px; width: 86px; height: 26px; background: var(--tape); mix-blend-mode: multiply; pointer-events: none; }
.tape-l { left: -22px; transform: rotate(-38deg); }
.tape-r { right: -22px; transform: rotate(38deg); }

.zones { position: absolute; inset: 0; pointer-events: none; font-family: var(--letter); font-size: 13px; color: var(--ink-2); }
.zones span { position: absolute; line-height: 1; }
.zones .zt { top: 4px; transform: translateX(-50%); }
.zones .zb { bottom: 3px; transform: translateX(-50%); }
.zones .zl { left: 6px; transform: translateY(-50%); }
.zones .zr { right: 6px; transform: translateY(-50%); }
.zones .tick-x { position: absolute; width: 1px; height: var(--frame-inset); background: var(--ink); opacity: 0.6; }
.zones .tick-y { position: absolute; height: 1px; width: var(--frame-inset); background: var(--ink); opacity: 0.6; }

.frame {
  position: relative;
  border: 2px solid var(--ink);
  width: 100%;
}
.sheet-0 .frame { display: grid; grid-template-columns: minmax(0, 1fr) var(--tb-w); }

/* ---------- lettering ---------- */

.lettering { font-family: var(--letter); font-weight: 400; letter-spacing: 0.01em; }

.cover-name {
  font-family: var(--letter);
  font-weight: 400;
  font-size: clamp(46px, 6.4vw, 96px);
  line-height: 0.86;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.role-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; }
.role-line .role { font-family: var(--letter); font-size: clamp(22px, 2.1vw, 30px); line-height: 1.1; white-space: nowrap; }
.role-line p { font-size: 16px; line-height: 1.45; max-width: 60ch; flex: 1 1 360px; min-width: 0; }

.hl {
  background-image: linear-gradient(transparent 14%, var(--hi-a) 14%, var(--hi-a) 88%, transparent 88%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 3px;
  margin: 0 -3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.plot-ready .sheet:not(.plotted) .hl { background-size: 0% 100%; }
.plot-ready .hl { transition: background-size 0.7s var(--ease) 0.5s; }

.was { color: var(--red); text-decoration: line-through; text-decoration-thickness: 1px; }

/* ---------- cover: main field ---------- */

.quick-contact { display: none; }

.cover-main { padding: 26px var(--pad) 10px; display: flex; flex-direction: column; min-width: 0; }

.index { margin-top: 20px; border-top: 2px solid var(--ink); flex: 1; display: flex; flex-direction: column; }
.index-head,
.index-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 338px 160px; align-items: center; }
.index-head { font-family: var(--letter); font-size: 13px; color: var(--ink-2); padding: 7px 0 6px; border-bottom: 1px solid var(--ink); }
.index ol { flex: 1; display: flex; flex-direction: column; }
.index li { flex: 1; display: flex; border-bottom: 1px solid var(--rule); }
.index li:last-child { border-bottom: 0; }
.index-row { flex: 1; min-height: 76px; padding: 6px 0; text-decoration: none; color: var(--ink); transition: background-color 0.25s var(--ease); }
.index-row:hover { background: rgba(43, 47, 143, 0.045); }
.index-row:hover .bubble { background: var(--ink); color: var(--paper); }
.index-row:hover .bubble i { border-color: var(--paper); }
.index-row .name { font-family: var(--letter); font-size: 27px; line-height: 1; display: block; }
.index-row .desc { font-size: 14px; line-height: 1.3; color: var(--ink-2); margin-top: 4px; display: block; max-width: 50ch; padding-right: 12px; }
.index-row .status { font-family: var(--letter); font-size: 14px; line-height: 1.25; border-left: 1px solid var(--rule); padding-left: 12px; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.index-row .status small { display: block; font-family: var(--text); font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.index-row svg { width: 100%; max-width: 320px; height: auto; overflow: visible; }

.bubble {
  width: 42px; height: 42px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: grid;
  grid-template-rows: 1fr 1fr;
  font-family: var(--letter);
  font-size: 15px;
  text-align: center;
  line-height: 20px;
  overflow: hidden;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.bubble i { font-style: normal; border-bottom: 1.5px solid var(--ink); }

/* ---------- title block (cover, vertical) ---------- */

.tb { border-left: 2px solid var(--ink); display: flex; flex-direction: column; font-size: 13px; }
.cell { border-bottom: 1px solid var(--ink); padding: 8px 14px 10px; }
.cell:last-child { border-bottom: 0; }
.cell-label { display: block; font-family: var(--letter); font-size: 12px; line-height: 1.3; color: var(--ink-2); margin-bottom: 5px; letter-spacing: 0.02em; }
.cell .val { font-family: var(--letter); font-size: 19px; line-height: 1.25; }
.cell p { font-size: 13px; line-height: 1.38; }
.cell p + p { margin-top: 3px; }
.tb .grow { flex: 1; }

.cta {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper);
  font-family: var(--letter); font-size: 20px; line-height: 1.1;
  padding: 12px 14px; margin: 2px 0 8px;
  text-decoration: none;
  transition: background-color 0.25s var(--ease);
}
.cta:hover { background: #1f2270; }
.cta svg { flex: none; }
.links a { display: flex; justify-content: space-between; align-items: center; font-family: var(--letter); font-size: 15px; text-decoration: none; padding: 5px 0; border-bottom: 1px solid var(--rule); }
.links a:last-child { border-bottom: 0; }
.links a:hover { text-decoration: underline; }
.links svg, .cta svg { width: 14px; height: 14px; }

.revs { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.revs td { padding: 3px 4px 3px 0; border-bottom: 1px solid var(--rule); vertical-align: top; line-height: 1.3; }
.revs tr:last-child td { border-bottom: 0; }
.revs td:first-child { font-family: var(--letter); font-size: 14px; width: 22px; }
.revs td:nth-child(2) { font-family: var(--letter); font-size: 14px; width: 42px; }

.lang-switch { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--ink); }
.lang-switch a { font-family: var(--letter); font-size: 17px; text-align: center; padding: 7px 0; text-decoration: none; transition: background-color 0.25s var(--ease), color 0.25s var(--ease); }
.lang-switch a:hover { background: rgba(43, 47, 143, 0.08); }
.lang-switch a[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.meta { display: grid; grid-template-columns: 1fr 1fr 92px; padding: 0; }
.meta > div { padding: 6px 10px; border-right: 1px solid var(--ink); }
.meta > div:nth-child(3) { border-right: 0; }
.meta > .r2 { border-top: 1px solid var(--ink); }
.meta .cell-label { margin-bottom: 2px; font-size: 12px; }
.meta .v { font-family: var(--letter); font-size: 15px; line-height: 1.15; }
.meta .sheet-no { grid-row: span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 0; }
.meta .sheet-no .v { font-size: 48px; line-height: 0.95; }

/* ---------- project sheets ---------- */

.sheet-body {
  padding: 26px var(--pad) var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  grid-template-areas:
    "head head"
    "draw side";
  gap: 26px 40px;
}
.sheet-head { grid-area: head; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 28px; align-items: end; border-bottom: 2px solid var(--ink); padding-bottom: 18px; }
.sheet-title { font-family: var(--letter); font-weight: 400; font-size: clamp(40px, 5vw, 72px); line-height: 0.9; letter-spacing: 0.01em; }
.sheet-sub { font-family: var(--letter); font-size: clamp(18px, 1.7vw, 24px); line-height: 1.15; }
.lede { font-size: 17px; line-height: 1.5; max-width: 62ch; grid-column: 1 / -1; margin-top: 10px; }

.draw { grid-area: draw; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.side { grid-area: side; min-width: 0; display: flex; flex-direction: column; gap: 22px; }

.view { margin: 0; }
.view svg { width: 100%; height: auto; display: block; overflow: visible; }
.pan { position: relative; }
.view figcaption { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-family: var(--letter); font-size: 15px; line-height: 1.3; }
.view figcaption .bubble { width: 38px; height: 38px; font-size: 14px; line-height: 18px; flex: none; }
.view figcaption small { display: block; font-family: var(--text); font-size: 13px; line-height: 1.4; color: var(--ink-2); margin-top: 2px; }

/* SVG drawing vocabulary */
.dw text { font-family: var(--letter); fill: var(--ink); font-size: 13px; }
.dw .t-s { font-size: 12px; fill: var(--ink-2); }
.dw .t-l { font-size: 16px; }
.dw .t-red { fill: var(--red); }
.dw .ln, .dw .bx { stroke: var(--ink); stroke-width: 1.2; fill: none; }
.dw .bx { fill: var(--paper); }
.dw .thick { stroke-width: 2; }
.dw .thin { stroke-width: 0.8; }
.dw .ctr { stroke: var(--ink); stroke-width: 0.9; fill: none; stroke-dasharray: 14 4 2 4; opacity: 0.8; }
.dw .red { stroke: var(--red); }
.dw .fill-ink { fill: var(--ink); }
.dw .fill-red { fill: var(--red); }
.dw .hatch { fill: url(#hatch); }
.dw .hl-r { fill: var(--hi-a); }
.dw .faint { stroke: var(--ink); stroke-width: 0.9; fill: none; opacity: 0.4; }

.balloon { cursor: default; }
.balloon circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.2; transition: fill 0.2s var(--ease); }
.balloon text { font-size: 12px; text-anchor: middle; dominant-baseline: central; }
.balloon.is-hl circle { fill: var(--hi); }
.balloon:focus-visible { outline: none; }
.balloon:focus-visible circle { stroke: var(--ink); stroke-width: 2.4; }

/* parts list */
.block-title { font-family: var(--letter); font-size: 15px; line-height: 1.3; padding-bottom: 6px; border-bottom: 2px solid var(--ink); display: flex; justify-content: space-between; gap: 12px; }
.block-title span:last-child { color: var(--ink-2); font-size: 13px; }

.bom { width: 100%; border-collapse: collapse; font-size: 14px; }
.bom th { font-family: var(--letter); font-weight: 400; font-size: 12.5px; color: var(--ink-2); text-align: left; padding: 6px 6px 4px 0; border-bottom: 1px solid var(--ink); }
.bom td { padding: 6px 6px 6px 0; border-bottom: 1px solid var(--rule); vertical-align: top; line-height: 1.35; transition: background-color 0.2s var(--ease); }
.bom td:first-child { font-family: var(--letter); font-size: 15px; width: 30px; text-align: center; padding-right: 0; }
.bom td:nth-child(2) { font-family: var(--letter); font-size: 15px; width: 42%; }
.bom tr.is-hl td { background: var(--hi-a); }

.notes { counter-reset: n; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.45; }
.notes li { counter-increment: n; display: grid; grid-template-columns: 26px minmax(0, 1fr); }
.notes li::before { content: counter(n) "."; font-family: var(--letter); font-size: 15px; }

.revcloud {
  position: relative;
  border: 1.5px solid var(--red);
  margin: 8px;
  padding: 14px 16px 14px 52px;
  color: var(--red);
  font-size: 14px;
  line-height: 1.4;
}
.revcloud .delta { position: absolute; left: 14px; top: 14px; width: 26px; height: 24px; }
.revcloud.has-cloud { border-color: transparent; }
.revcloud .cloud { position: absolute; left: -9px; top: -9px; overflow: visible; pointer-events: none; }
.revcloud .cloud path { fill: none; stroke: var(--red); stroke-width: 1.5; stroke-linejoin: round; }
.revcloud b { font-family: var(--letter); font-weight: 400; font-size: 15px; display: block; }

/* horizontal title block (ISO 7200) */
.tbh { margin-top: auto; border: 2px solid var(--ink); display: grid; grid-template-columns: 1fr 1fr 86px; font-size: 13px; }
.tbh > div { padding: 6px 10px 8px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); min-width: 0; }
.tbh > .wide { grid-column: 1 / 3; }
.tbh > .no { grid-column: 3; grid-row: 1 / 3; border-right: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tbh > .no .v { font-size: 40px; line-height: 0.95; }
.tbh > .last { border-bottom: 0; }
.tbh > .full { grid-column: 1 / -1; border-right: 0; }
.tbh .cell-label { font-size: 12px; margin-bottom: 2px; }
.tbh .v { font-family: var(--letter); font-size: 16px; line-height: 1.3; }
.tbh .v a { text-decoration: underline; }
.tbh .status-v { font-size: 18px; }

/* schedule table (ControlTurnos) */
.schedule-wrap { overflow-x: auto; }
.schedule { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; }
.schedule caption { caption-side: top; text-align: left; font-family: var(--letter); font-size: 15px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.schedule caption small { font-family: var(--text); color: var(--ink-2); font-size: 12.5px; margin-left: 8px; }
.schedule th, .schedule td { border: 1px solid var(--rule); padding: 6px 4px; text-align: center; font-family: var(--letter); font-weight: 400; }
.schedule thead th { font-size: 12.5px; color: var(--ink-2); border-bottom: 1px solid var(--ink); }
.schedule tbody th { text-align: left; font-size: 14px; padding-left: 6px; }
.schedule td.shift { font-size: 15px; }
.schedule td.off { color: var(--ink-2); background: repeating-linear-gradient(45deg, transparent 0 5px, var(--rule-2) 5px 6px); }
.schedule td.calc { background: rgba(43, 47, 143, 0.05); }
.schedule td.calc.over { background: var(--hi-a); }
.schedule .sep { border-left: 2px solid var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.legend b { font-family: var(--letter); font-weight: 400; color: var(--ink); }

/* code (course) */
.code {
  margin: 0;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 14px 16px;
  font-family: var(--code);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  overflow-x: auto;
  tab-size: 4;
}
.code .c { color: var(--ink-2); font-style: italic; }
.code .k { font-weight: 700; }

/* career / skills */
.revtable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.revtable th { font-family: var(--letter); font-weight: 400; font-size: 12.5px; color: var(--ink-2); text-align: left; padding: 6px 10px 4px 0; border-bottom: 1px solid var(--ink); }
.revtable td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; line-height: 1.4; }
.revtable td:first-child { font-family: var(--letter); font-size: 20px; width: 34px; }
.revtable td:nth-child(2) { font-family: var(--letter); font-size: 15px; white-space: nowrap; width: 150px; }
.revtable .what { font-family: var(--letter); font-size: 17px; display: block; line-height: 1.3; margin-bottom: 2px; }

.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.skills div { border-bottom: 1px solid var(--rule); padding: 8px 0; }
.skills dt { font-family: var(--letter); font-size: 14px; color: var(--ink-2); }
.skills dd { font-size: 14.5px; line-height: 1.4; }

.edu li { padding: 8px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; font-size: 14.5px; line-height: 1.35; }
.edu li b { font-family: var(--letter); font-weight: 400; font-size: 16px; display: block; }
.edu li span:last-child { font-family: var(--letter); font-size: 14px; white-space: nowrap; }

.close-row { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 26px 40px; align-items: end; }
.close-row .tbh { margin-top: 0; }
.close { border: 2px solid var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.close-main { padding: 18px 20px 20px; border-right: 1px solid var(--ink); }
.close-main .mail { display: inline-block; font-family: var(--letter); font-size: clamp(22px, 3.1vw, 44px); line-height: 1.05; text-decoration: none; overflow-wrap: anywhere; margin-top: 6px; }
.close-main .mail:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.close-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--letter); font-size: 16px; line-height: 1;
  padding: 11px 14px; min-height: 44px;
  border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: #1f2270; }
.btn svg { width: 14px; height: 14px; }
.btn[data-state="done"] { background: var(--hi); color: var(--ink); border-color: var(--ink); }
.close-status { padding: 18px 20px; display: flex; flex-direction: column; justify-content: center; min-width: 210px; }
.close-status .v { font-family: var(--letter); font-size: 18px; line-height: 1.25; }

.colophon { font-size: 12.5px; color: var(--mat-ink); padding: 4px 4px 0; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
.colophon a { color: var(--mat-ink); }

/* ---------- motion: plotter pen ---------- */
.plot-ready .sheet.plotted .pl { transition: stroke-dashoffset 1.1s var(--ease); transition-delay: var(--d, 0s); }

.underlay .sheet .view svg,
.underlay .sheet .index svg,
.underlay .sheet .tbh { transition: opacity 0.6s var(--ease); }
@media (min-width: 861px) {
  .underlay .sheet:not(.is-current) .view svg,
  .underlay .sheet:not(.is-current) .index svg { opacity: 0.5; }
  .underlay .sheet:not(.is-current) .tbh { opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
  .plot-ready .sheet .pl { stroke-dashoffset: 0 !important; transition: none !important; }
  .plot-ready .hl { background-size: 100% 100% !important; transition: none !important; }
  .underlay .sheet:not(.is-current) .view svg,
  .underlay .sheet:not(.is-current) .index svg,
  .underlay .sheet:not(.is-current) .tbh { opacity: 1; }
}

/* ---------- responsive ---------- */

@media (max-width: 1280px) {
  .index-head, .index-row { grid-template-columns: 58px minmax(0, 1fr) 290px 140px; }
  :root { --tb-w: 292px; }
}

@media (max-width: 1100px) {
  .sheet-0 .frame { grid-template-columns: 1fr; }
  .tb { border-left: 0; border-top: 2px solid var(--ink); display: grid; grid-template-columns: 1fr 1fr; }
  .tb .cell { border-right: 1px solid var(--ink); }
  .tb .cell:nth-child(2n) { border-right: 0; }
  .tb .meta { grid-column: 1 / -1; border-right: 0; }
  .sheet-0 { min-height: 0; }
  .sheet-body { grid-template-columns: 1fr; grid-template-areas: "head" "draw" "side"; }
  .quick-contact { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: stretch; }
  .quick-contact .cta { margin: 0; flex: 1 1 220px; }
}

@media (max-width: 860px) {
  :root { --mat-gap: 10px; --frame-inset: 10px; --pad: 18px; }
  main { padding: var(--mat-gap) var(--mat-gap) calc(60px + var(--mat-gap)); }
  .zones { display: none; }
  .tape { display: none; }
  .rail {
    top: auto; bottom: 0; left: 0; right: 0; width: auto;
    flex-direction: row; gap: 3px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--mat-deep); border-top: 1px solid rgba(227, 238, 230, 0.25);
    overflow-x: auto;
  }
  .rail a { flex: 1 1 0; min-width: 0; height: 44px; font-size: 14px; }
  .rail hr { width: 1px; height: auto; flex: none; border-top: 0; border-left: 1px solid rgba(227, 238, 230, 0.35); margin: 0 2px; }
  .rail .rail-lang { display: contents; }
  .cover-main { padding: 20px var(--pad) 0; }
  .index-head { display: none; }
  .index-row { grid-template-columns: 50px minmax(0, 1fr); grid-template-areas: "b n" "b d" ". s"; row-gap: 8px; padding: 14px 0; }
  .index-row > .bubble { grid-area: b; align-self: start; }
  .index-row > .ident { grid-area: n; }
  .index-row > svg { grid-area: d; max-width: 100%; }
  .index-row .dw text { font-size: 15px; }
  .index-row .dw .t-s { font-size: 14px; }
  .index-row .dw .t-l { font-size: 17px; }
  .index-row > .status { grid-area: s; border-left: 0; padding-left: 0; flex-direction: row; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: flex-start; }
  .index-row > .status small { margin-top: 0; }
  .tb { grid-template-columns: 1fr; }
  .tb .cell { border-right: 0; }
  .sheet-head { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .close-row { grid-template-columns: 1fr; }
  .close { grid-template-columns: 1fr; }
  .close-status { min-width: 0; }
  .pan { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; padding-bottom: 4px; }
  .pan svg { min-width: 640px; }
  .view:has(.pan)::before { display: block; font-family: var(--letter); font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
  html[lang="es"] .view:has(.pan)::before { content: "Desliza para ver el plano completo \2192"; }
  html[lang="en"] .view:has(.pan)::before { content: "Swipe to see the whole drawing \2192"; }
  .close-main { border-right: 0; border-bottom: 1px solid var(--ink); }
  .revtable td:nth-child(2) { white-space: normal; width: 96px; }
  .tbh { grid-template-columns: 1fr 1fr 70px; }
  .tbh > .no .v { font-size: 32px; }
}

@media print {
  body { background: none; }
  body::before { display: none; }
  .rail, .tape, .skip { display: none; }
  main { padding: 0; gap: 0; }
  .sheet { box-shadow: none; break-after: page; }
}
