/* ------------------------------------------------------------------
   t420.dev — Figure 1: isometric ThinkPad T420 cutaway (anatomy skill).
   Port of the skill's ISO_CSS, scoped to .t4-figure and tuned to the
   site's stage palette. No layout is defined for the hero here; see
   thinkpad.css for the .hero grid.
   ------------------------------------------------------------------ */

.t4-figure {
  /* stage palette, mapped from the site tokens */
  --anatomy-page: transparent;
  --anatomy-card: #101012;
  --anatomy-text: #9b978f;
  --anatomy-strong: #f2f0ec;
  --anatomy-muted: #6b6760;

  --anatomy-paper: #101012;
  --anatomy-face: #1b1b1f;
  --anatomy-top: #1e1e22;
  --anatomy-shade-0: #0d0d0f;
  --anatomy-shade-1: #111113;
  --anatomy-shade-2: #151518;
  --anatomy-shade-3: #19191d;
  --anatomy-lit-top: #2b2b31;
  --anatomy-lit-shade: #212126;

  --anatomy-hi: #c9c5bd;
  --anatomy-mid: #7c786f;
  --anatomy-lo: #4a4741;
  --anatomy-faint: #2e2c28;
  --anatomy-lit: #ffffff;
  --anatomy-halo: #000000;
  --anatomy-halo-opacity: 0.75;
  --anatomy-dot: #f2f0ec;
  --anatomy-red: #ff655b;
  --anatomy-green: #7ad48a;
  --anatomy-blue: #7aa2ff;

  --anatomy-weight: 0.6px;
  --anatomy-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --anatomy-mono: var(--font-mono);

  margin: 0;
  width: 100%;
  max-width: 100%;
}

.t4-figure .iso-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.t4-figure .iso-svg path,
.t4-figure .iso-svg circle {
  vector-effect: non-scaling-stroke;
}

.t4-figure .iso-fill { fill: var(--anatomy-paper); stroke: none; }
.t4-figure .iso-solid[data-lit] > .iso-fill { fill: var(--anatomy-face); }

.t4-figure .iso-shade,
.t4-figure .iso-top { stroke: none; }
.t4-figure .iso-shade[data-shade="0"] { fill: var(--anatomy-shade-0); }
.t4-figure .iso-shade[data-shade="1"] { fill: var(--anatomy-shade-1); }
.t4-figure .iso-shade[data-shade="2"] { fill: var(--anatomy-shade-2); }
.t4-figure .iso-shade[data-shade="3"] { fill: var(--anatomy-shade-3); }
.t4-figure .iso-top { fill: var(--anatomy-top); }
.t4-figure .iso-solid[data-lit] > .iso-top { fill: var(--anatomy-lit-top); }
.t4-figure .iso-solid[data-lit] > .iso-shade { fill: var(--anatomy-lit-shade); }

.t4-figure .iso-solid[data-seamless] > .iso-shade,
.t4-figure .iso-solid[data-seamless] > .iso-top {
  stroke-width: 0.4;
  stroke-linejoin: round;
}
.t4-figure .iso-solid[data-seamless] > .iso-shade[data-shade="0"] { stroke: var(--anatomy-shade-0); }
.t4-figure .iso-solid[data-seamless] > .iso-shade[data-shade="1"] { stroke: var(--anatomy-shade-1); }
.t4-figure .iso-solid[data-seamless] > .iso-shade[data-shade="2"] { stroke: var(--anatomy-shade-2); }
.t4-figure .iso-solid[data-seamless] > .iso-shade[data-shade="3"] { stroke: var(--anatomy-shade-3); }
.t4-figure .iso-solid[data-seamless] > .iso-top { stroke: var(--anatomy-top); }
.t4-figure .iso-solid[data-seamless][data-lit] > .iso-top { stroke: var(--anatomy-lit-top); }
.t4-figure .iso-solid[data-seamless][data-lit] > .iso-shade { stroke: var(--anatomy-lit-shade); }

.t4-figure .iso-solid[data-lit] > .iso-edge { stroke: var(--anatomy-lit); }

.t4-figure .iso-halo {
  fill: var(--anatomy-halo);
  stroke: none;
  filter: blur(9px);
  opacity: var(--anatomy-halo-opacity);
  transform: translateY(3px);
}

.t4-figure .iso-line {
  fill: none;
  stroke: var(--anatomy-lo);
  stroke-width: var(--anatomy-weight);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.t4-figure .iso-line[data-tone="hi"] { stroke: var(--anatomy-hi); }
.t4-figure .iso-line[data-tone="mid"] { stroke: var(--anatomy-mid); }
.t4-figure .iso-line[data-tone="lo"] { stroke: var(--anatomy-lo); }
.t4-figure .iso-line[data-tone="faint"] { stroke: var(--anatomy-faint); }
.t4-figure .iso-line[data-tone="lit"] { stroke: var(--anatomy-lit); }
.t4-figure .iso-line[data-tone="red"] { stroke: var(--anatomy-red); }
.t4-figure .iso-line[data-tone="green"] { stroke: var(--anatomy-green); }
.t4-figure .iso-line[data-tone="blue"] { stroke: var(--anatomy-blue); }

.t4-figure .iso-dots circle {
  fill: var(--anatomy-dot);
  stroke: none;
  opacity: 0.32;
}
.t4-figure .iso-dots[data-tone="hi"] circle { opacity: 0.85; }
.t4-figure .iso-dots[data-tone="mid"] circle { opacity: 0.45; }
.t4-figure .iso-dots[data-tone="lo"] circle { opacity: 0.22; }
.t4-figure .iso-dots[data-tone="faint"] circle { opacity: 0.12; }

.t4-figure .iso-face-text {
  fill: var(--anatomy-mid);
  font-family: var(--anatomy-mono);
  letter-spacing: 0.04em;
}
.t4-figure .iso-face-text[data-tone="hi"] { fill: var(--anatomy-hi); }
.t4-figure .iso-face-text[data-tone="lo"] { fill: var(--anatomy-lo); }
.t4-figure .iso-face-text[data-tone="faint"] { fill: var(--anatomy-faint); }

/* ---------- plate ---------- */

.t4-figure .iso-plate {
  position: relative;
  padding: 54px 26px 46px;
  border-radius: 3px;
  background:
    radial-gradient(120% 90% at 50% 0%, #17171b 0%, #101012 52%, #0c0c0e 100%);
  box-shadow:
    0 0 0 1px var(--line-strong),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.04),
    0 30px 70px -40px #000;
  --anatomy-paper: var(--anatomy-card);
}

.t4-figure .iso-plate-corners {
  position: absolute;
  inset: 17px 20px;
  pointer-events: none;
}

.t4-figure .iso-plate-corner {
  position: absolute;
  color: var(--anatomy-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.t4-figure .iso-plate-corner[data-corner="fig"] {
  top: 0;
  left: 0;
  color: var(--anatomy-text);
}
.t4-figure .iso-plate-corner[data-corner="title"] {
  top: 0;
  right: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.t4-figure .iso-plate-corner[data-corner="hint"] {
  bottom: 0;
  left: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--anatomy-muted);
}
.t4-figure .iso-plate-corner[data-corner="readout"] {
  right: 0;
  bottom: 0;
  max-width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--red-ink);
  font-variant-numeric: tabular-nums;
}

.t4-figure .t4-stage {
  position: relative;
  outline: none;
  border-radius: 2px;
}
.t4-figure .t4-stage:focus-visible {
  outline: 2px solid var(--red-ink);
  outline-offset: 6px;
}

.t4-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

@media (max-width: 640px) {
  .t4-figure .iso-plate { padding: 46px 10px 54px; }
  .t4-figure .iso-plate-corners { inset: 15px 12px; }
  .t4-figure .iso-plate-corner { font-size: 9.5px; }
  .t4-figure .iso-plate-corner[data-corner="hint"] { display: none; }
  .t4-figure .iso-plate-corner[data-corner="readout"] {
    max-width: 100%;
    bottom: 0;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .t4-figure .t4-cursor,
  .t4-figure .t4-part[data-part="fan"] [data-rotor] { animation: none; }
  .t4-figure .t4-part { transition: none; }
}
