/* ==========================================================================
   SystemFromScratch® — home page layers and robot case study
   Loaded after style.css; uses its tokens.
   ========================================================================== */

:root {
  --warn: #f0b43c;
  --accent-glow: rgba(47, 140, 255, 0.55);
}

.mono {
  font-family: var(--font-mono);
}

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Status badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 3px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.badge-sim { color: var(--success); }
.badge-hw { color: var(--warn); }
.badge-opt { color: var(--accent); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ---------- Hero (home and robot) ---------- */

.story-hero {
  padding: 80px 0 48px;
}

.story-hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.story-hero h1 {
  margin: 18px 0 20px;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.story-hero h1 .accent {
  color: var(--accent);
}

.story-hero .lead {
  max-width: 560px;
  font-size: 19px;
  color: var(--text-muted);
}

.story-hero .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 32px;
}

.hero-stats div {
  display: flex;
  flex-direction: column;
}

.hero-stats strong {
  font-size: 26px;
  line-height: 1.2;
}

.hero-stats span {
  font-size: 13px;
  color: var(--text-muted);
}

.stage {
  position: relative;
  border-radius: 16px;
  background: radial-gradient(circle at 42% 55%, #0d2547 0%, var(--bg) 68%);
}

/* ---------- Proof strip and industries ---------- */

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.proof-strip div {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  background: var(--bg-alt);
}

.proof-strip strong {
  font-size: 24px;
  line-height: 1.25;
}

.proof-strip span {
  font-size: 13px;
  color: var(--text-muted);
}

.industries {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.industries > span {
  margin-right: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.industries ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.industries li {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
}

/* ---------- Problems ---------- */

.problems-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.problem-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
}

.problem-card h3 {
  font-size: 18px;
  line-height: 1.35;
}

.problem-card p {
  font-size: 15px;
  color: var(--text-muted);
}

.problem-card .layer-ref {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
}

/* ---------- Layer stack illustration ---------- */

.layer-stack {
  display: block;
  width: 100%;
  height: auto;
}

.layer-stack .ls-top {
  fill: #0f2140;
  stroke: #2a4a7a;
  stroke-width: 2;
  stroke-linejoin: round;
  transition: fill 0.25s, stroke 0.25s;
}

.layer-stack .ls-side { fill: #0b1a33; transition: fill 0.25s; }
.layer-stack .ls-side2 { fill: #081427; transition: fill 0.25s; }
.layer-stack .ls-tick { stroke: #2a4a7a; stroke-width: 1.5; }

.layer-stack text {
  font-family: var(--font-mono);
  font-size: 17px;
  fill: var(--text-muted);
  transition: fill 0.25s;
}

.layer-stack .is-on .ls-top { fill: var(--accent-glow); stroke: #5ea6ff; }
.layer-stack .is-on .ls-side { fill: var(--accent-strong); }
.layer-stack .is-on .ls-side2 { fill: #13519f; }
.layer-stack .is-on .ls-tick { stroke: #5ea6ff; }
.layer-stack .is-on text { fill: var(--text); }

/* ---------- Layer explorer (home and robot) ---------- */

.explorer {
  display: grid;
  grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.layer-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.layer-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.layer-tab:hover {
  border-color: var(--border-strong);
}

.layer-tab[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.layer-tab .num {
  width: 26px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}

.layer-tab[aria-selected="true"] .num {
  color: var(--accent);
}

.layer-tab .name {
  display: flex;
  flex: 1;
  flex-direction: column;
  font-size: 15px;
  font-weight: 600;
}

.layer-tab .name small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}

.layer-tab:focus-visible,
.arch-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.layer-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
}

.layer-panel[hidden] {
  display: none;
}

.layer-panel .panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.layer-panel h3 {
  font-size: 28px;
}

.layer-panel .for-you {
  font-size: 17px;
}

.panel-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.panel-label.muted {
  color: var(--text-muted);
}

.panel-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.panel-block p {
  font-size: 15px;
  color: var(--text-muted);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-list li {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 12px;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-list a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}

.link-list a:hover {
  border-color: var(--accent);
}

.service-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(47, 140, 255, 0.08);
  font-size: 14px;
}

.layer-display {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
}

.layer-display .layer-panel {
  border: 0;
  border-radius: 0;
  background: none;
}

.layer-display .layer-panel .service-line {
  margin-top: auto;
}

.layer-display .panel-art {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at 50% 55%, #0d2547 0%, var(--bg-alt) 70%);
}

/* ---------- CRA (home) ---------- */

.cra-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.cra-grid h2 {
  margin: 12px 0 16px;
  font-size: clamp(26px, 3vw, 36px);
}

.cra-grid p {
  margin-bottom: 24px;
  font-size: 17px;
  color: var(--text-muted);
}

.cra-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cra-tiles div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.cra-tiles div.is-now {
  border-color: var(--warn);
}

.cra-tiles strong {
  font-size: 20px;
}

.cra-tiles span {
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- Library and work cards ---------- */

.lib-grid,
.work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.work-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  color: var(--text);
}

.link-card:hover {
  color: var(--text);
}

.link-card .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.link-card .meta.is-stable {
  color: var(--success);
}

.link-card h3 {
  font-size: 19px;
  line-height: 1.3;
}

.link-card p {
  font-size: 14px;
  color: var(--text-muted);
}

.link-card .more {
  margin-top: auto;
  padding-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.featured-case {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--accent);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
}

.featured-case:hover {
  color: var(--text);
  box-shadow: 0 24px 60px -30px rgba(47, 140, 255, 0.55);
}

.featured-case .stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  border-radius: 0;
  background: radial-gradient(circle at 40% 55%, #123462 0%, var(--bg-alt) 70%);
}

.featured-case .stage img {
  width: 100%;
  max-width: 560px;
  height: auto;
}

.stage-chips {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stage-chips span {
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: rgba(10, 22, 40, 0.92);
  font-family: var(--font-mono);
  font-size: 12px;
}

.featured-case .case-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 40px;
}

.featured-case h3 {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
}

.featured-case p {
  font-size: 17px;
  color: var(--text-muted);
}

.case-numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.case-numbers strong {
  display: block;
  font-size: 22px;
}

.case-numbers span {
  font-size: 13px;
  color: var(--text-muted);
}

.featured-case .btn {
  align-self: flex-start;
}

/* ---------- About + contact (home) ---------- */

.about-contact {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.about-contact h2 {
  margin: 12px 0 14px;
  font-size: clamp(26px, 3vw, 32px);
}

.about-contact p {
  margin-bottom: 12px;
  color: var(--text-muted);
}

.about-contact p strong {
  color: var(--text);
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
}

.contact-card h3 {
  font-size: 22px;
}

.contact-card .btn {
  align-self: flex-start;
}

.contact-card .address {
  font-family: var(--font-mono);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.contact-card .row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
}

/* ---------- Robot stage overlay ---------- */

.robot-stage {
  padding: 16px;
  border: 1px solid var(--border);
}

.robot-stage .stage-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.robot-stage .stage-bar strong {
  font-weight: 400;
  color: var(--text);
}

.arm-frame {
  position: relative;
  aspect-ratio: 1100 / 1000;
}

.arm-frame img,
.arm-frame svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.arm-frame img {
  object-fit: contain;
  transition: opacity 0.2s;
}

.arm-frame .wire {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.3s;
}

.arm-frame .wire-star { stroke-width: 3; stroke-dasharray: 10 8; }
.arm-frame .wire-chain { stroke-width: 6; }
.arm-frame[data-arch="A"] .wire-chain,
.arm-frame[data-arch="B"] .wire-star,
.arm-frame[data-arch="C"] .wire-star { opacity: 0; }
.arm-frame[data-arch="C"] .wire-chain { stroke: var(--warn); }

.arm-frame .joint {
  fill: var(--accent);
  opacity: 0;
  transition: opacity 0.25s;
}

.arm-frame[data-parts~="motor"] .joint { opacity: 1; }

.arm-frame .box {
  fill: #0f2140;
  stroke: #2a4a7a;
  stroke-width: 3;
  transition: fill 0.25s, stroke 0.25s;
}

.arm-frame[data-parts~="ctrl"] .box-ctrl,
.arm-frame[data-parts~="pc"] .box-pc {
  fill: rgba(47, 140, 255, 0.3);
  stroke: var(--accent);
}

.arm-frame .label {
  font-family: var(--font-mono);
  font-size: 22px;
  fill: var(--text-muted);
}

.stage-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.stage-pills span {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* ---------- Signal path, architectures, Doppelstep ---------- */

.path-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.path-step {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s;
}

.path-step.is-on {
  border-color: var(--accent);
}

.path-step .mono {
  font-size: 12px;
  color: var(--accent);
}

.path-step strong {
  font-size: 15px;
}

.path-step span:last-child {
  font-size: 13px;
  color: var(--text-muted);
}

.packet-line {
  margin-top: 16px;
  padding: 12px 16px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-alt);
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
  color: var(--text-muted);
}

.shots-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 40px 0 16px;
}

.shots-head h3 {
  font-size: 22px;
}

.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.shots figure {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.shots img {
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 700;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.shots figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shots figcaption .mono {
  font-size: 12px;
  color: var(--accent);
}

.shots figcaption strong {
  font-size: 15px;
}

.shots figcaption span:last-child {
  font-size: 13px;
  color: var(--text-muted);
}

.source-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.arch-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.arch-tab {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.arch-tab[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.arch-body {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: start;
}

.arch-figure {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  margin: 0;
}

.arch-side {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.arch-legend {
  gap: 14px;
  font-size: 12.5px;
}

.arch-legend .sw {
  width: 22px;
  height: 0;
  border-radius: 0;
  border-top: 3px solid var(--accent);
  opacity: 0.35;
  transition: opacity 0.2s;
}

.arch-legend .sw-star { border-top-style: dashed; }
.arch-legend .sw-can { border-top-color: var(--warn); }

[data-arch="A"] .arch-legend .sw-star,
[data-arch="B"] .arch-legend .sw-bus,
[data-arch="C"] .arch-legend .sw-can {
  opacity: 1;
}

.arch-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.arch-panel[hidden] {
  display: none;
}

.arch-panel h3 {
  font-size: 26px;
}

.arch-panel p {
  color: var(--text-muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.arch-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14px;
}

.arch-table th,
.arch-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.arch-table thead th {
  background: var(--surface);
  font-weight: 600;
  color: var(--text-muted);
}

.arch-table tbody tr {
  border-top: 1px solid var(--border);
}

.arch-table tbody th {
  font-weight: 500;
}

.arch-table td {
  color: var(--text-dim);
  transition: color 0.2s;
}

.arch-table[data-arch="A"] td:nth-child(2),
.arch-table[data-arch="B"] td:nth-child(3),
.arch-table[data-arch="C"] td:nth-child(4),
.arch-table[data-arch="A"] thead th:nth-child(2),
.arch-table[data-arch="B"] thead th:nth-child(3),
.arch-table[data-arch="C"] thead th:nth-child(4) {
  color: var(--text);
}

.dopp-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 40px;
  align-items: center;
}

.dopp-top h2 {
  margin: 14px 0 16px;
  font-size: clamp(26px, 3vw, 36px);
}

.dopp-top p {
  font-size: 17px;
  color: var(--text-muted);
}

.dopp-art {
  display: block;
  width: 100%;
  height: auto;
}

.dopp-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.mini-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.mini-stats strong {
  font-size: 20px;
}

.mini-stats span {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-sm {
  padding: 10px 16px;
  font-size: 14px;
}

.dopp-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.dopp-bottom figure {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.dopp-bottom figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.dopp-bottom figcaption {
  font-size: 13px;
  color: var(--text-muted);
}

.status-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.status-card ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-card li {
  display: flex;
  gap: 10px;
  font-size: 14px;
}

.status-card li::before {
  flex: 0 0 14px;
  font-weight: 700;
}

.status-card .done li::before { content: "\2713"; color: var(--success); }
.status-card .next li::before { content: "\25CB"; color: var(--warn); }
.status-card .panel-label.done-label { color: var(--success); }
.status-card .panel-label.next-label { color: var(--warn); }

.status-card .next-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.evidence-grid div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.evidence-grid strong {
  font-size: 30px;
  line-height: 1.2;
}

.evidence-grid span {
  font-size: 14px;
  color: var(--text-muted);
}

.attribution {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .problems-grid,
  .lib-grid,
  .evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .path-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 900px) {
  .story-hero .container,
  .explorer,
  .layer-display,
  .cra-grid,
  .featured-case,
  .about-contact,
  .arch-body,
  .dopp-top,
  .dopp-bottom {
    grid-template-columns: minmax(0, 1fr);
  }

  .work-grid,
  .shots {
    grid-template-columns: minmax(0, 1fr);
  }

  .proof-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-case .stage {
    min-height: 0;
  }

  .arch-figure {
    position: static;
  }

  .layer-display .panel-art {
    display: none;
  }

  .layer-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .story-hero {
    padding-top: 48px;
  }

  .problems-grid,
  .lib-grid,
  .evidence-grid,
  .path-steps,
  .layer-tabs,
  .cra-tiles {
    grid-template-columns: minmax(0, 1fr);
  }

  .featured-case .case-text,
  .layer-panel {
    padding: 22px;
  }

}

/* ---------- Article cards: main button (articles.html) ---------- */

.article-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin-top: auto;
  padding-top: 20px;
}

.article-actions .project-links {
  margin-top: 0;
  padding-top: 0;
}

.link-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

.link-card p {
  margin-bottom: 8px;
}
