/* =============================================================================
   THE YARDS — the hulls page as a concourse of manufacturers, and each hull as
   its yard's product page. In the game's UI 2 language (js/light.js), dressed
   per yard: every yard keeps the house style the director set for it
   (site.css HOUSE STYLES) and gets its own moving backdrop.

   Motion is transform / opacity / clip only, never stepped. Pixel art (hull
   sprites, the station tiles, the adverts) is never smoothed.
   ========================================================================== */

/* ------------------------------------------------------------ GROUND ---- */
body.ui2 #hulls { padding: 0 0 120px; background: #05080d; }
body.ui2 #hulls::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.5;
  background: url(../assets/yards/floor-wide.png) 0 0 / 178px 152px; image-rendering: pixelated;
  -webkit-mask: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent); mask: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent); }
body.ui2 #hulls::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(80% 70% at 50% 40%, rgba(5, 8, 13, 0.55), rgba(5, 8, 13, 0.94) 80%); }
.yd-concourse { position: relative; z-index: 1; }

/* -------------------------------------------------------------- TOP ----- */
.yd-top { max-width: 1240px; margin: 0 auto; padding: 56px 40px 56px; display: flex; flex-direction: column; gap: 22px; }
.yd-title { font-size: clamp(48px, 5vw + 18px, 110px); }
.yd-title em { color: var(--sun); text-shadow: 0 0 26px rgba(255, 194, 71, 0.4); }
.yd-title .ch { display: inline-block; white-space: pre; animation: ignite 560ms var(--ease-out) both; animation-delay: calc(200ms + var(--i) * 22ms); }
.yd-top .sf-lede { max-width: 48ch; animation: rise 600ms var(--ease-out) both 900ms; }
.yd-top .sf-kicker { animation: rise 500ms var(--ease-out) both 100ms; }
.yd-dir { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.yd-dirkey { --bc: var(--holo); position: relative; padding: 11px 16px 12px; text-decoration: none; clip-path: var(--stair-sm); border: 0; cursor: pointer; min-height: 0;
  font-family: var(--f-label); font-weight: 700; font-size: 15px; letter-spacing: 0.14em; color: var(--ink-2);
  --frame: color-mix(in srgb, var(--bc) 34%, #0a1019); --fill: rgba(8, 13, 22, 0.92);
  transition: color 200ms, box-shadow 200ms, transform 200ms var(--ease-out); animation: pop 420ms var(--ease-out) both; }
.yd-dirkey:nth-child(1) { animation-delay: 1000ms; } .yd-dirkey:nth-child(2) { animation-delay: 1060ms; } .yd-dirkey:nth-child(3) { animation-delay: 1120ms; }
.yd-dirkey:nth-child(4) { animation-delay: 1180ms; } .yd-dirkey:nth-child(5) { animation-delay: 1240ms; } .yd-dirkey:nth-child(6) { animation-delay: 1300ms; } .yd-dirkey:nth-child(7) { animation-delay: 1360ms; }
.yd-dirkey:hover { color: var(--ink); transform: translateY(-2px); }
.yd-dirkey.on { color: var(--bc); --frame: var(--bc); --fill: color-mix(in srgb, var(--bc) 14%, rgba(8, 13, 22, 0.94)); }
.yd-brand[hidden] { display: none !important; }
.yd-brand { padding-top: 5vh; }
.yd-top { padding-bottom: 28px; }
.yd-ticker { margin-bottom: 0; }
.yd-ads { padding: 0; margin: 4vh auto 0; }

/* the ticker: every yard's line, running like a station board */
.yd-ticker { position: relative; overflow: hidden; white-space: nowrap; padding: 12px 0; margin: 88px 0 0;
  background: var(--dither), rgba(6, 10, 18, 0.9);
  font-family: var(--f-label); font-weight: 600; font-size: 18px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.yd-ticker .run { display: inline-flex; animation: np-run 60s linear infinite; }
.yd-ticker span { padding: 0 34px; } .yd-ticker span b { margin-right: 10px; }
.yd-ticker span::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 34px; background: rgba(255, 255, 255, 0.2); transform: rotate(45deg) translateY(-3px); }

/* ------------------------------------------------------------ A YARD ---- */
.yd-brand { --bc: var(--holo); position: relative; isolation: isolate; max-width: 1240px; margin: 0 auto; padding: 12vh 40px 10vh; display: flex; flex-direction: column; gap: 34px; }
.yd-fx { position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; overflow: hidden; pointer-events: none; z-index: -1; }
.yd-pxfx { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.yd-pxbill { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; image-rendering: pixelated; }
.yd-brand > :not(.yd-fx) { position: relative; z-index: 1; }

.yd-mast { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 6px 28px; }
.yd-emblem { grid-row: span 2; height: 96px; width: auto; image-rendering: pixelated; }
.yd-word { margin: 0; grid-column: 1 / -1; font-family: var(--f-display); font-weight: 800; font-size: clamp(64px, 8vw + 10px, 168px); line-height: 0.86;
  letter-spacing: 0.02em; color: var(--bc); text-shadow: 0 0 40px color-mix(in srgb, var(--bc) 35%, transparent); -webkit-text-stroke: 0.6px currentColor; paint-order: stroke fill; }
.yd-emblem + .yd-word { grid-column: 2; }
.yd-word .ch { display: inline-block; white-space: pre; opacity: 0; }
.yd-word.ign .ch { animation: ignite 620ms var(--ease-out) both; animation-delay: calc(var(--i) * 40ms); }
.yd-org { margin: 0; font-family: var(--f-label); font-weight: 600; font-size: 15px; letter-spacing: 0.18em; color: var(--ink-3); }
.yd-stock { margin: 0; justify-self: end; grid-column: -2 / -1; grid-row: 2; display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-label); font-weight: 600; font-size: 15px; letter-spacing: 0.16em; color: var(--ink-2); }
.yd-stock b { color: var(--bc); font-size: 20px; }
.yd-mast > * { opacity: 0; }
.yd-brand.seen .yd-mast > * { opacity: 1; } .yd-brand.seen .yd-org, .yd-brand.seen .yd-stock, .yd-brand.seen .yd-emblem { animation: rise 520ms var(--ease-out) both 300ms; }

/* THE BILLBOARD: the yard's advert for its flagship */
.yd-bill { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; min-height: 480px; clip-path: var(--stair); overflow: hidden;
  --frame: color-mix(in srgb, var(--bc) 38%, #0a1019); background: var(--frame);
  --ground: linear-gradient(120deg, rgba(14, 20, 32, 0.98), rgba(8, 12, 20, 0.98)); }
.yd-billbg { position: absolute; inset: 3px; z-index: 0; clip-path: var(--stair); background: var(--dither), var(--ground); }
.yd-bill::after { content: ''; position: absolute; inset: 3px; z-index: 1; clip-path: var(--stair); pointer-events: none; background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0, 0, 0, 0.16) 3px 4px); }
.yd-billcopy { position: relative; z-index: 2; padding: 52px 48px; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.yd-slogan { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: clamp(44px, 3.4vw + 16px, 86px); line-height: 0.9; text-transform: uppercase; color: var(--ink);
  -webkit-text-stroke: 0.6px currentColor; paint-order: stroke fill; }
.yd-slogan em { font-style: normal; color: var(--bc); text-shadow: 0 0 30px color-mix(in srgb, var(--bc) 40%, transparent); }
.yd-sub { margin: 0; font-family: var(--f-body); font-size: clamp(20px, 0.5vw + 16px, 24px); line-height: 1.34; color: var(--ink-2); max-width: 40ch; }
.yd-cta { --k: var(--bc); align-self: flex-start; text-decoration: none; }
.yd-billart { position: relative; display: grid; place-items: center; min-height: 420px; }
.yd-flag { position: relative; z-index: 2; animation: flag-float 7s ease-in-out infinite; }
.yd-flag img { display: block; max-height: 380px; max-width: 86%; margin: 0 auto; image-rendering: pixelated; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.6)); }
@keyframes flag-float { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-14px) rotate(1.5deg); } }
.yd-flagname { position: absolute; z-index: 3; right: 26px; bottom: 22px; font-family: var(--f-label); font-weight: 700; font-size: 16px; letter-spacing: 0.18em; color: var(--ink); }
.yd-flagname em { font-style: normal; color: var(--bc); margin-left: 8px; font-weight: 600; }
/* arrival: the board scans on from the left, a band of light crosses, the flagship flies in */
.yd-bill { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); }
.yd-brand.seen .yd-bill { animation: bill-in 900ms var(--ease-out) both 250ms; }
@keyframes bill-in { from { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); } to { clip-path: var(--stair); } }
.yd-bill::before { content: ''; position: absolute; z-index: 4; top: -10%; bottom: -10%; left: 0; width: 30%; pointer-events: none; transform: translateX(-150%) skewX(-14deg);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bc) 18%, transparent) 40%, rgba(255, 255, 255, 0.16) 50%, transparent); }
.yd-brand.seen .yd-bill::before { animation: bill-sweep 1200ms var(--ease-out) both 900ms, bill-sweep 1600ms var(--ease-out) 7s infinite; }
@keyframes bill-sweep { to { transform: translateX(460%) skewX(-14deg); } }
.yd-flag { opacity: 0; }
.yd-brand.seen .yd-flag { opacity: 1; animation: flag-in 1100ms var(--ease-out) both 700ms, flag-float 7s ease-in-out 1800ms infinite; }
@keyframes flag-in { from { opacity: 0; transform: translate(120px, 40px) rotate(8deg) scale(0.9); } to { opacity: 1; transform: none; } }
.yd-billcopy > * { opacity: 0; }
.yd-brand.seen .yd-billcopy > * { animation: rise 560ms var(--ease-out) both; }
.yd-brand.seen .yd-slogan { animation-delay: 700ms; } .yd-brand.seen .yd-sub { animation-delay: 900ms; } .yd-brand.seen .yd-cta { animation-delay: 1100ms; }
/* a yard with nothing on the market: a covered shape */
.yd-tarp { position: relative; width: 70%; height: 300px; }
.yd-tarp i { position: absolute; inset: 0; clip-path: polygon(50% 0, 74% 30%, 100% 100%, 0 100%, 26% 30%);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--bc) 18%, transparent) 0 12px, transparent 12px 24px); }
.yd-tarp i:nth-child(2) { inset: 18% 20% 0; opacity: 0.6; animation: tarp 4s ease-in-out infinite; }
.yd-tarp i:nth-child(3) { inset: auto 0 0; height: 6px; clip-path: none; background: repeating-linear-gradient(to right, var(--bc) 0 6px, transparent 6px 9px); }
@keyframes tarp { 50% { opacity: 0.25; } }

/* THE TENETS: what the yard believes, numbered in its colour */
.yd-tenets { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.yd-tenets li { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; clip-path: var(--stair-sm);
  --frame: color-mix(in srgb, var(--bc) 34%, #0a1019); --fill: rgba(8, 13, 22, 0.9); opacity: 0; }
.yd-brand.seen .yd-tenets li { animation: rise 560ms var(--ease-out) both; animation-delay: calc(1200ms + var(--n) * 140ms); }
.yd-tenets b { display: flex; align-items: baseline; gap: 12px; font-family: var(--f-title); font-weight: 700; font-size: 22px; letter-spacing: 0.1em; color: var(--ink); }
.yd-tenets b .lt-num { font-size: 18px; color: var(--bc); }
.yd-tenets span { font-family: var(--f-body); font-size: 19px; line-height: 1.25; color: var(--ink-2); }

/* THE LINEUP: each hull on a pad of hangar floor */
.yd-line { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.yd-card { --lamp: var(--bc); display: block; text-decoration: none; color: inherit; padding: 0 !important; cursor: pointer; }
.yd-card:not(.lt-lit) { opacity: 0; }
.yd-card .lt-stack { display: flex; flex-direction: column; gap: 8px; padding: 0 22px 22px; }
.yd-pad { position: relative; display: grid; place-items: center; height: 210px; margin: 3px -19px 8px; overflow: hidden;
  background: radial-gradient(60% 60% at 50% 55%, color-mix(in srgb, var(--bc) 22%, transparent), transparent 70%), url(../assets/yards/floor-square.png) 0 0 / 98px 98px;
  image-rendering: pixelated;
  clip-path: polygon(0 0, calc(100% - 10px) 0, calc(100% - 10px) 5px, calc(100% - 5px) 5px, calc(100% - 5px) 10px, 100% 10px, 100% 100%, 0 100%); }
.yd-pad::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(8, 12, 20, 0.55), rgba(8, 12, 20, 0.15) 40%, rgba(8, 12, 20, 0.6)); }
.yd-pad img { position: relative; max-height: 170px; max-width: 70%; image-rendering: pixelated; filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.65));
  transition: transform 420ms var(--ease-out); }
.yd-card:hover .yd-pad img { transform: translateY(-10px) scale(1.06); }
.yd-cname { font-family: var(--f-display); font-weight: 800; font-size: 34px; line-height: 0.9; letter-spacing: 0.02em; color: var(--ink); }
.yd-role { font-family: var(--f-label); font-weight: 600; font-size: 14px; letter-spacing: 0.16em; color: var(--bc); }
.yd-cline { font-family: var(--f-body); font-size: 19px; line-height: 1.25; color: var(--ink-2); min-height: 2.5em; }
.yd-stats { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 8px; }
.yd-stat { display: grid; grid-template-columns: 64px 1fr 56px; align-items: center; gap: 10px; font-family: var(--f-label); font-weight: 600; font-size: 13px; letter-spacing: 0.14em; color: var(--ink-3); }
.yd-stat i { font-style: normal; }
.yd-stat b { text-align: right; color: var(--ink); font-size: 16px; }
.yd-stat .lt-rail > i { background: linear-gradient(90deg, color-mix(in srgb, var(--bc) 60%, transparent), var(--bc) 80%, #fff); }
.yd-go { --k: var(--bc); align-self: flex-start; }

/* ------------------------------------------------------------- ADVERTS -- */
.yd-ads { position: relative; z-index: 1; max-width: 1240px; margin: 2vh auto; padding: 0 40px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.yd-adtag { font-family: var(--f-label); font-weight: 600; font-size: 13px; letter-spacing: 0.24em; color: var(--ink-3); }
.yd-adrow { display: flex; gap: 40px; align-items: center; justify-content: center; flex-wrap: wrap; }
.yd-adframe { margin: 0; position: relative; }
.yd-adframe img { display: block; width: calc(var(--w, 1) * 1px); image-rendering: pixelated; }
.yd-adframe:nth-child(1) img { width: auto; height: 300px; } .yd-adframe:nth-child(2) img { width: auto; height: 300px; }
/* a screen on the concourse wall: it flickers on and hums */
.yd-adframe::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.18) 2px 3px);
  animation: ad-hum 5s ease-in-out infinite; }
.yd-adframe img { animation: ad-on 900ms linear both; }
@keyframes ad-on { 0% { opacity: 0; } 20% { opacity: 1; } 28% { opacity: 0.2; } 40% { opacity: 1; } 48% { opacity: 0.5; } 60%, 100% { opacity: 1; } }
@keyframes ad-hum { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* =================================================================== *
 *  THE HOUSES. Each yard's backdrop moves its own way.                 *
 * =================================================================== */

/* ANTWOOD: hazard tape running, a target lock, a red scan */
[data-brand="antwood"] .yd-word { color: #f4f1ee; text-shadow: 0 0 36px rgba(255, 68, 56, 0.45); }
[data-brand="antwood"] .yd-bill { --ground: repeating-linear-gradient(45deg, #15171a 0 22px, #121417 22px 44px); }
@keyframes tape { to { transform: translateX(-50%); } }

/* WATERWORKS: beige plate, light blue, ripples off the hull */
[data-brand="waterworks"] .yd-word { color: #f2ead8; text-shadow: 0 0 36px rgba(127, 211, 255, 0.35); }
[data-brand="waterworks"] .yd-bill { --ground: radial-gradient(ellipse at 66% 46%, #1d2733 0%, #121a22 52%, #0b1015 100%); }
.yd-poster { position: absolute; z-index: 3; left: 24px; top: 24px; width: 186px; image-rendering: pixelated; transform: rotate(-3deg); filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.5)); }

/* VENTURA: chevrons on a conveyor, warning beacons turning */
[data-brand="ventura"] .yd-word { color: #ffb400; transform: skewX(-8deg); transform-origin: left bottom; text-shadow: 0 0 36px rgba(255, 180, 0, 0.4); }
[data-brand="ventura"] .yd-bill { --ground: linear-gradient(rgba(14, 13, 10, 0.94), rgba(14, 13, 10, 0.94)), repeating-linear-gradient(90deg, #1a1811 0 3px, #141209 3px 90px); }
/* the light from lamps you cannot see: a pixel canvas over the board (js/yards.js) */
.yd-shafts { position: absolute; inset: 3px; z-index: 1; width: calc(100% - 6px); height: calc(100% - 6px); pointer-events: none; image-rendering: pixelated; mix-blend-mode: screen; }

/* SAMCO: near-black, crimson, brass hairlines drawing in, a slow sweep of light */
[data-brand="samco"] .yd-word { color: #f6e7c8; font-weight: 500; letter-spacing: 0.28em; text-shadow: 0 0 40px rgba(224, 59, 59, 0.45); }
[data-brand="samco"] .yd-org { color: #c9a24a; letter-spacing: 0.3em; }
[data-brand="samco"] .yd-slogan { font-weight: 500; letter-spacing: 0.06em; }
[data-brand="samco"] .yd-slogan em { color: #e03b3b; }
[data-brand="samco"] .yd-bill { --frame: #c9a24a; --ground: radial-gradient(ellipse at 68% 48%, #1a1113 0%, #100c0d 55%, #080607 100%); }
@keyframes glow { 50% { opacity: 0.4; } }
[data-brand="samco"] .yd-tenets li { --frame: color-mix(in srgb, #c9a24a 55%, #0a1019); }

/* HIROSHI: paper white, lacquer red, the disc rising behind the hull */
[data-brand="hiroshi"] .yd-word { color: #f6f2ee; font-weight: 600; letter-spacing: 0.22em; text-shadow: 0 0 30px rgba(255, 95, 109, 0.3); }
[data-brand="hiroshi"] .yd-bill { --ground: radial-gradient(ellipse at 50% 44%, #1c1a1c 0%, #111011 55%, #0a090a 100%); }

/* SOLARIS: a warm horizon, nothing on it yet */
[data-brand="solaris"] .yd-word { color: #ffb27f; }
[data-brand="solaris"] .yd-bill { min-height: 360px; }

/* JAMILA CREATIONS: one unbroken line, motes of light, nothing serrated */
[data-brand="jamila"] .yd-word { color: #7fffd4; font-weight: 600; letter-spacing: 0.08em; font-size: clamp(52px, 6vw + 10px, 128px); text-shadow: 0 0 40px rgba(127, 255, 212, 0.3); }
[data-brand="jamila"] .yd-bill { --frame: color-mix(in srgb, #7fffd4 60%, #0a1019); }

/* ================================================================= *
 *  ONE HULL: the yard's product page around the viewer               *
 * ================================================================= */
body.ui2 #hull { padding-top: 92px; }
#hullpage { grid-template-columns: minmax(320px, 470px) 1fr; align-items: start; }
#hullpage .hp-fx { position: fixed; inset: 0; width: auto; margin: 0; left: 0; z-index: 0; }
.hp-info { display: flex; flex-direction: column; gap: 16px; padding-bottom: 60px; }
#hullpage .hullinfo::before, #hullpage .hullinfo::after { display: none; }
.hp-back { align-self: flex-start; text-decoration: none; }
.hp-mast { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 16px; clip-path: var(--stair-sm);
  --frame: color-mix(in srgb, var(--bc) 60%, #0a1019); --fill: color-mix(in srgb, var(--bc) 10%, rgba(6, 10, 18, 0.94)); }
.hp-mast .yd-emblem { height: 40px; grid-row: auto; }
.hp-word { font-family: var(--f-display); font-weight: 800; font-size: 30px; line-height: 1; letter-spacing: 0.06em; color: var(--bc); }
.hp-org { font-family: var(--f-label); font-weight: 600; font-size: 13px; letter-spacing: 0.16em; color: var(--ink-3); }
#hullpage h2.hp-name { margin: 6px 0 0; font-family: var(--f-display); font-weight: 800; font-size: clamp(64px, 6vw + 10px, 120px); line-height: 0.86; letter-spacing: 0.02em;
  color: var(--ink); text-shadow: 0 0 40px color-mix(in srgb, var(--bc) 40%, transparent); -webkit-text-stroke: 0.6px currentColor; paint-order: stroke fill; }
.hp-name .ch { display: inline-block; white-space: pre; animation: ignite 620ms var(--ease-out) both; animation-delay: calc(150ms + var(--i) * 45ms); }
.hp-role { margin: 0; display: inline-flex; align-items: center; gap: 12px; font-family: var(--f-label); font-weight: 700; font-size: 16px; letter-spacing: 0.18em; color: var(--bc); }
.hp-line { margin: 0; font-family: var(--f-body); font-size: clamp(22px, 0.6vw + 17px, 27px); line-height: 1.25; color: var(--ink); max-width: 30ch; }
.hp-layers { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-layers .lt-key { --k: var(--bc); }
.hp-layers .hp-rebuild { --k: var(--sun); }
.hp-sheet { --bw: 3px; padding: 18px 20px 20px; }
.hp-sheet .lt-stack { display: flex; flex-direction: column; gap: 10px; }
.hp-sec { margin: 6px 0 0; font-family: var(--f-label); font-weight: 700; font-size: 13px; letter-spacing: 0.22em; color: var(--ink-3); }
.hp-sec:first-child { margin-top: 0; }
.hp-stat { display: grid; grid-template-columns: 92px 1fr 96px; align-items: center; gap: 12px; font-family: var(--f-label); font-weight: 600; font-size: 13px; letter-spacing: 0.14em; color: var(--ink-3); }
.hp-stat b { text-align: right; font-size: 18px; color: var(--ink); white-space: nowrap; }
.hp-stat .lt-rail > i { background: linear-gradient(90deg, color-mix(in srgb, var(--bc) 60%, transparent), var(--bc) 80%, #fff); transition-duration: 1200ms; }
.hp-raw { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; }
.hp-raw div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 6px; box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.06);
  font-family: var(--f-label); font-weight: 600; font-size: 13px; letter-spacing: 0.12em; color: var(--ink-3); }
.hp-raw b { font-size: 17px; color: var(--ink); }
.hp-yard { display: flex; flex-direction: column; gap: 10px; padding: 18px 0 4px; }
.hp-slogan { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 40px; line-height: 0.92; text-transform: uppercase; color: var(--ink); }
.hp-slogan em { font-style: normal; color: var(--bc); }
.hp-sub { margin: 0; font-family: var(--f-body); font-size: 20px; line-height: 1.32; color: var(--ink-2); }
.hp-kin { display: flex; flex-direction: column; gap: 10px; }
.hp-kincard { display: flex; align-items: center; gap: 16px; padding: 10px 14px; text-decoration: none; clip-path: var(--stair-sm);
  --frame: color-mix(in srgb, var(--bc) 34%, #0a1019); --fill: rgba(8, 13, 22, 0.92); transition: transform 240ms var(--ease-out); }
.hp-kincard:hover { --frame: var(--bc); }
.hp-kincard:hover { transform: translateX(6px); }
.hp-kincard img { height: 64px; width: 64px; object-fit: contain; image-rendering: pixelated; }
.hp-kincard span { display: flex; flex-direction: column; font-family: var(--f-title); font-weight: 700; font-size: 22px; letter-spacing: 0.08em; color: var(--ink); }
.hp-kincard em { font-style: normal; font-family: var(--f-label); font-weight: 600; font-size: 13px; letter-spacing: 0.16em; color: var(--bc); }
.hp-info > * { opacity: 0; }
#hullpage.in .hp-info > * { animation: rise 520ms var(--ease-out) both; }
#hullpage.in .hp-info > :nth-child(2) { animation-delay: 60ms; } #hullpage.in .hp-info > :nth-child(3) { animation-delay: 0ms; }
#hullpage.in .hp-info > :nth-child(4) { animation-delay: 500ms; } #hullpage.in .hp-info > :nth-child(5) { animation-delay: 650ms; }
#hullpage.in .hp-info > :nth-child(6) { animation-delay: 780ms; } #hullpage.in .hp-info > :nth-child(7) { animation: none; opacity: 1; }
#hullpage.in .hp-info > :nth-child(8) { animation-delay: 1300ms; } #hullpage.in .hp-info > :nth-child(9) { animation-delay: 1450ms; }
#hullpage .hp-sheet:not(.lt-lit) { opacity: 0; }
body.ui2 .stagehint { font-family: var(--f-label); font-weight: 600; font-size: 13px; letter-spacing: 0.18em; color: var(--ink-3); }

/* -------------------------------------------------------------- PHONE --- */
@media (max-width: 980px) {
  .yd-top { padding: 36px 16px 24px; }
  .yd-ticker { margin-top: 104px; }
  .yd-dir { gap: 6px; } .yd-dirkey { font-size: 13px; padding: 7px 10px 8px; }
  .yd-brand { padding: 9vh 16px 7vh; gap: 24px; }
  .yd-mast { grid-template-columns: 1fr; }
  .yd-emblem + .yd-word { grid-column: 1; } .yd-emblem { height: 64px; grid-row: auto; }
  .yd-stock { justify-self: start; grid-column: 1; grid-row: auto; }
  .yd-bill { grid-template-columns: 1fr; min-height: 0; }
  .yd-billart { min-height: 280px; order: -1; } .yd-flag img { max-height: 240px; }
  .yd-billcopy { padding: 24px 22px 30px; }
  .yd-tenets { grid-template-columns: 1fr; }
  .yd-poster { width: 124px; left: 12px; top: 12px; }
  .yd-adframe:nth-child(1) img, .yd-adframe:nth-child(2) img { height: 200px; }
  .yd-adrow { gap: 18px; }
  #hullpage { grid-template-columns: 1fr; }
  #hullpage h2.hp-name { font-size: 56px; }
  .hp-stat { grid-template-columns: 84px 1fr 86px; }
  .hp-ghost { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .yd-ticker .run, .yd-flag, .yd-adframe::after, .yd-adframe img { animation: none !important; }
  .yd-bill { clip-path: var(--stair) !important; animation: none !important; }
  .yd-flag, .yd-billcopy > *, .yd-tenets li, .yd-mast > *, .hp-info > *, .yd-word .ch { opacity: 1 !important; animation: none !important; }
}

/* the yard's name, huge and faint behind the hull: the stage is their showroom */
.hp-ghost { position: fixed; z-index: 0; left: 0; bottom: 0; width: 100vw; height: auto; pointer-events: none; image-rendering: pixelated; opacity: 1; }
#hullpage.in .hp-ghost { animation: ghost-in 1400ms var(--ease-out) both; }
@keyframes ghost-in { from { opacity: 0; transform: translateX(8vw); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------- FRAMES ---
   ONE BORDER EVERYWHERE (owner, 2026-10-23): every framed shape on these
   pages wears a single 3px outline that follows its stair cut, drawn as the
   frame colour behind a fill cut by the same stair 3px further in. Never an
   inset box-shadow (a clip cuts it off at the corner) and never a lone
   coloured edge. */
.yd-dirkey, .yd-tenets li, .hp-mast, .hp-kincard { position: relative; background: var(--frame); clip-path: var(--stair-sm); isolation: isolate; }
.yd-dirkey::before, .yd-tenets li::before, .hp-mast::before, .hp-kincard::before { content: ''; position: absolute; inset: 3px; z-index: -1;
  clip-path: var(--stair-sm); background: var(--dither), var(--fill); transition: background 200ms; }
.yd-dirkey { transition: color 200ms, transform 200ms var(--ease-out); }


/* =============================================================== PHONES === */
@media (max-width: 760px) {
  #hulls .yd-dirkey { min-height: 44px !important; font-size: 15px; padding: 10px 12px 11px; }
  .yd-stat { font-size: 14px; grid-template-columns: 64px 1fr 56px; }
  #stands .yd-go { font-size: 14px; min-height: 44px; }
  .yd-adtag { font-size: 14px; }
  /* the two adverts sit side by side instead of stacking down two screens */
  .yd-adrow { flex-wrap: nowrap; gap: 14px; }
  .yd-adframe:nth-child(1) img, .yd-adframe:nth-child(2) img { height: auto; width: auto; max-height: 190px; max-width: 100%; }
  .yd-adframe { flex: 0 1 auto; min-width: 0; }
  #hullpage .hp-back { min-height: 44px; font-size: 14px; }
  #hullpage .hp-rebuild { min-height: 44px !important; font-size: 14px; }
  .hp-org, .hp-sec, .hp-stat, .hp-raw div, .hp-kincard em { font-size: 14px; }
  /* the hint belongs to the stage band; it no longer floats over the specs */
  body.ui2 .stagehint { z-index: 0; font-size: 14px; }
  body.ui2 #hullpage .hullinfo { z-index: 2; }
  body.ui2 #hull { padding-bottom: 0; }
  /* the content ground runs to the foot of the screen: no band of stage below it at the end */
  #hullpage .hp-info { padding-bottom: 90px; min-height: 100svh; }
}
/* the old CSS ring behind Hiroshi hulls was a smooth vector circle; the viewer draws the yard's own pixel stand */
body.ui2 [data-brand="hiroshi"] .hall::before { display: none; }
