/* ═══════════════════════════════════════════════════════════════
   Sub-pages — Experiments / Cambium / Archive and their detail pages
   Reuses tokens, header and fonts from styles.css
   ═══════════════════════════════════════════════════════════════ */

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 118px 40px 96px;
}

/* ── page intro (kicker + title + lead) ── */
.page-intro { margin-bottom: 44px; }

.page-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.page-back:hover { color: var(--ink); transform: translateX(-3px); }

.page-kicker {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--soft);
}

.page-intro h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-intro > p {
  margin: 0;
  max-width: 560px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

/* ── page-level toolbar (sort / search) ── */
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.page-toolbar .pt-right { display: flex; align-items: center; gap: 20px; }

/* ═══ Experiments gallery ═══ */

.xp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.xp-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out);
}
.xp-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(147, 165, 143, 0.35);
}

.xp-thumb {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: rgba(255, 255, 255, 0.8);
}
.xp-thumb--image {
  overflow: hidden;
  background: #e7e8e2;
}
.xp-thumb--image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 48% 48%;
  transition: transform 360ms var(--ease-out);
}
.xp-card:hover .xp-thumb--image img { transform: scale(1.025); }
.xp-thumb--top img { object-position: center 12%; }
.xp-thumb--henshin { background: #0a0f10; }
.xp-thumb--henshin img {
  object-fit: contain;
  object-position: center;
}
.xp-thumb--map img { object-position: center 58%; }
.xp-thumb--typing img { object-position: center 45%; }
.xp-thumb--spire img { object-position: center 16%; }
.xp-thumb--resume img { object-position: center 8%; }
.xp-thumb--filler img { object-position: center 8%; }
.xp-thumb--mint  { background: linear-gradient(150deg, #d3e4cf, #a9c4a3); }
.xp-thumb--dark  { background: linear-gradient(150deg, #2b3128, #14170f); color: rgba(255,255,255,0.55); }
.xp-thumb--night { background: radial-gradient(circle at 60% 40%, #3a4a32, #14170f 70%); color: var(--accent); }
.xp-thumb--paper { background: linear-gradient(150deg, #efeee7, #dcdbd1); color: #9aa093; }
.xp-thumb--sage  { background: linear-gradient(150deg, #c7d6bf, #93a58f); }
.xp-thumb--warm  { background: linear-gradient(150deg, #e7ddc9, #cbb68f); color: #fff; }

.xp-card-body { padding: 18px 20px 22px; }
.xp-status {
  display: inline-flex !important;
  align-items: center;
  width: fit-content;
  margin-bottom: 9px;
  color: #52604f !important;
  font-family: var(--mono);
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.xp-status::before {
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #95a890;
  content: "";
}
.xp-status--usable::before { background: #4e8961; }
.xp-status--building::before { background: #b18b52; }
.xp-card-body strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 5px;
}
.xp-card-body span { font-size: 13px; color: var(--muted); }

.xp-card--more {
  border-style: dashed;
  background: transparent;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: var(--muted);
  font-size: 13px;
}
.xp-more-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  color: var(--soft);
  opacity: 0.72;
}
.xp-more-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ═══ Cambium — list + evolution timeline ═══ */

.cb-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 60px;
  align-items: start;
}

.cb-list { display: flex; flex-direction: column; gap: 14px; }

.cb-loading {
  min-height: 238px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.45);
}
.cb-loading span {
  display: block;
  margin-bottom: 24px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.cb-loading i,
.thought-loading i {
  display: block;
  overflow: hidden;
  position: relative;
  height: 12px;
  margin-top: 14px;
  border-radius: 3px;
  background: rgba(26, 29, 27, 0.07);
}
.cb-loading i::after,
.thought-loading i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  transform: translateX(-100%);
  animation: cambium-loading 1.4s ease-in-out infinite;
}
.cb-loading i:nth-of-type(1) { width: 52%; height: 18px; }
.cb-loading i:nth-of-type(2) { width: 88%; }
.cb-loading i:nth-of-type(3) { width: 70%; }

.cb-article {
  position: relative;
  display: block;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.cb-article:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(147, 165, 143, 0.3);
}
.cb-article--accent { background: #fdf9ec; border-color: rgba(147, 165, 143, 0.25); }

.cb-article-meta {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.cb-article h3 {
  margin: 0 0 12px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding-right: 28px;
}
.cb-article p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: #3a3f36;
}
.cb-article-arrow {
  position: absolute;
  top: 26px;
  right: 26px;
  color: var(--muted);
  transition: transform 200ms var(--ease-spring);
}
.cb-article:hover .cb-article-arrow { transform: translate(3px, -3px); color: var(--soft); }

.cb-more {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 200ms var(--ease-out);
}
.cb-more:hover { color: var(--ink); }

.cb-source-note {
  margin: 16px 2px 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.cb-empty {
  padding: 42px 28px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
}
.cb-empty strong { display: block; margin-bottom: 8px; color: var(--ink); }
.cb-empty p { margin: 0; font-size: 13px; }
.cb-empty--error { border-style: solid; }

@keyframes cambium-loading {
  to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .cb-loading i::after,
  .thought-loading i::after { animation: none; }
}

/* "关于 Cambium" 侧栏说明 */
.cb-about p {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
}

.cb-about .cb-hand {
  font-family: var(--handwriting);
  font-size: 19px;
  color: var(--soft);
  margin-top: 18px;
}

/* evolution timeline */
.cb-side-title {
  margin: 0 0 24px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--soft);
}

.cb-timeline { position: relative; padding-left: 22px; }
.cb-timeline::before {
  content: '';
  position: absolute;
  left: 3px; top: 4px; bottom: 4px;
  width: 1px;
  background: var(--line);
}
.cb-tl-item { position: relative; padding-bottom: 30px; }
.cb-tl-item:last-child { padding-bottom: 0; }
.cb-tl-item::before {
  content: '';
  position: absolute;
  left: -22px; top: 4px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--soft);
  box-shadow: 0 0 0 4px var(--paper);
}
.cb-tl-date { font-family: var(--mono); font-size: 12px; color: var(--soft); }
.cb-tl-note { margin: 5px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* ═══ Cambium article — reading mode ═══ */

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 60px;
  max-width: 1000px;
  margin: 0 auto;
  align-items: start;
}

.article-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}
.article-tools { display: flex; align-items: center; gap: 16px; color: var(--muted); }
.article-tools button {
  border: none; background: transparent; cursor: pointer;
  font-size: 15px; color: var(--muted);
  transition: color 200ms var(--ease-out);
}
.article-tools button:hover { color: var(--ink); }

.article-title {
  margin: 0 0 16px;
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.article-tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(147, 165, 143, 0.14);
  color: var(--soft);
  font-weight: 700;
}
.article-lead {
  margin: 0 0 40px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--muted);
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.article-body h2 {
  margin: 40px 0 18px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  scroll-margin-top: 100px;
}
.article-body h2 .sec-n { font-family: var(--mono); color: var(--soft); margin-right: 10px; font-size: 16px; }
.article-body p { margin: 0 0 18px; font-size: 16px; line-height: 1.9; color: #2a2f26; }
.article-body ol, .article-body ul { margin: 0 0 18px; padding-left: 22px; }
.article-body ol li, .article-body ul li { font-size: 16px; line-height: 1.9; color: #2a2f26; }
.article-body blockquote {
  margin: 28px 0;
  padding: 6px 0 6px 20px;
  border-left: 3px solid var(--soft);
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}
.article-body a { color: var(--ink); text-decoration-color: var(--soft); text-underline-offset: 3px; }
.article-body code {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
  font-family: var(--mono);
  font-size: 0.9em;
}

.article-loading,
.article-error {
  padding: 48px 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.article-error { color: #8c4d44; }

.article-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 8px 0 24px;
}
.app-icon { text-align: center; font-size: 10px; color: var(--muted); font-family: var(--mono); }
.app-icon i {
  display: block;
  width: 46px; height: 46px;
  margin: 0 auto 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.7);
  font-size: 20px; font-style: normal;
  display: flex; align-items: center; justify-content: center;
}

.article-foot {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.article-foot button {
  border: none; background: transparent; cursor: pointer;
  font-size: 17px; color: var(--muted);
  transition: color 200ms var(--ease-out);
}
.article-foot button:hover { color: var(--ink); }

/* right rail: On this page / evolution */
.article-rail { position: sticky; top: 104px; }
.article-rail h4 {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.toc-link {
  display: block;
  padding: 6px 0 6px 14px;
  border-left: 2px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.toc-link:hover { color: var(--ink); }
.toc-link.active { color: var(--ink); border-color: var(--soft); font-weight: 600; }
.toc-num { font-family: var(--mono); color: var(--soft); margin-right: 8px; }

/* evolution variant in the rail */
.article-rail .cb-timeline { margin-top: 4px; }
.article-rail-more {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}
.article-rail-more:hover { color: var(--ink); }

/* ═══ Archive — folder library ═══ */

.ar-folders {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.ar-folder {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.ar-folder:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(147, 165, 143, 0.3);
}

.ar-folder-ic {
  width: 52px; height: 40px;
  border-radius: 5px 10px 5px 5px;
  background: linear-gradient(160deg, #cbdc93, #9fb76a);
  position: relative;
}
.ar-folder-ic::before {
  content: '';
  position: absolute;
  top: -6px; left: 0;
  width: 22px; height: 7px;
  border-radius: 3px 7px 0 0;
  background: inherit;
}
.arf--2 { background: linear-gradient(160deg, #c4d0a8, #8fa078); }
.arf--3 { background: linear-gradient(160deg, #d4c898, #b0a070); }
.arf--4 { background: linear-gradient(160deg, #c2cbb4, #97a487); }
.arf--evolution { background: linear-gradient(160deg, #b8c5bb, #6f8475); }

.ar-folder strong { font-size: 15px; font-weight: 700; }
.ar-folder small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); font-family: var(--mono); }

.ar-folder--visual {
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.ar-folder-cover {
  display: block;
  width: 100%;
  aspect-ratio: 7 / 6;
  object-fit: contain;
  background: #f5f4ef;
  border-bottom: 1px solid var(--line);
}
.ar-folder-copy {
  min-width: 0;
  padding: 16px 18px 18px;
}
.ar-folder-copy strong,
.ar-folder-copy small {
  overflow-wrap: anywhere;
}

.ar-folder--more {
  border-style: dashed;
  background: transparent;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}
.ar-folder--more span:first-child { font-size: 22px; opacity: 0.6; }

/* preview side panel (on library page, optional) */
.ar-with-panel { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }

.ar-panel {
  position: sticky;
  top: 104px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  padding: 22px;
}
.ar-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ar-panel-head strong { font-size: 15px; font-weight: 700; }
.ar-panel-head button { border: none; background: transparent; cursor: pointer; color: var(--muted); font-size: 15px; }
.ar-panel-sub { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 18px; }
.ar-panel-list { display: flex; flex-direction: column; }
.ar-panel-file {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.ar-panel-file .fi { width: 22px; text-align: center; color: var(--soft); }
.ar-panel-file strong { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.ar-panel-file small { font-size: 11px; color: var(--muted); }
.ar-panel-viewall {
  display: block;
  margin-top: 18px;
  padding: 11px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: var(--ink); text-decoration: none;
  transition: border-color 200ms var(--ease-out), background 200ms var(--ease-out);
}
.ar-panel-viewall:hover { border-color: rgba(147,165,143,0.4); background: rgba(197,255,87,0.06); }

/* ═══ Archive folder — file list ═══ */

.ar-tabs { display: flex; gap: 24px; margin: 4px 0 8px; }
.ar-tab {
  padding-bottom: 10px;
  font-size: 13px; color: var(--muted);
  cursor: pointer; text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.ar-tab:hover { color: var(--ink); }
.ar-tab.active { color: var(--ink); font-weight: 600; border-color: var(--soft); }

.ar-view-toggle { display: flex; gap: 6px; color: var(--muted); }
.ar-view-toggle button { border: none; background: transparent; cursor: pointer; color: inherit; font-size: 14px; padding: 4px 6px; border-radius: 4px; }
.ar-view-toggle button.active { color: var(--ink); background: rgba(0,0,0,0.05); }

.ar-table { width: 100%; }
.ar-table-head, .ar-row {
  display: grid;
  grid-template-columns: 1fr 120px 130px 90px;
  gap: 16px;
  align-items: center;
}
.ar-table-head {
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.ar-row {
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 160ms var(--ease-out);
}
.ar-row:hover { background: rgba(255,255,255,0.65); }
.ar-name { display: flex; align-items: center; gap: 12px; }
.ar-name .fi { width: 22px; text-align: center; color: var(--soft); font-size: 15px; }
.ar-name strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.ar-cell { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ═══ File preview ═══ */

.fp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.6);
  margin-bottom: 20px;
}
.fp-toolbar .fp-name { font-weight: 600; font-size: 14px; }
.fp-toolbar .fp-ctrls { display: flex; align-items: center; gap: 18px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.fp-toolbar .fp-ctrls button { border: none; background: transparent; cursor: pointer; color: var(--muted); font-size: 15px; }
.fp-toolbar .fp-ctrls button:hover { color: var(--ink); }

.fp-layout { display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: start; }
.fp-thumbs { display: flex; flex-direction: column; gap: 12px; }
.fp-thumb {
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: border-color 200ms var(--ease-out);
}
.fp-thumb.active { border-color: var(--soft); box-shadow: 0 0 0 2px rgba(147,165,143,0.25); }

.fp-page {
  aspect-ratio: 3 / 4;
  max-width: 720px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 64px 56px;
  overflow: hidden;
}
.fp-doc-title { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.fp-doc-sub { font-size: 18px; color: var(--muted); margin-top: 6px; }
.fp-doc-lead { font-size: 14px; color: #3a3f36; margin-top: 20px; }
.fp-doc-meta { margin-top: 40px; font-family: var(--mono); font-size: 12px; color: var(--muted); line-height: 2; }

/* ═══ Case study (flagship project) ═══ */

.cs-oneliner {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.7;
  color: #2a2f26;
  max-width: 680px;
}
.cs-oneliner em { font-style: italic; color: var(--soft); }

.cs-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cs-point {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.5);
}
.cs-point strong { display: block; font-size: 14px; margin-bottom: 6px; }
.cs-point span { font-size: 13.5px; color: var(--muted); line-height: 1.65; }

/* architecture diagram — layered flow */
.cs-flow { display: flex; flex-direction: column; align-items: center; margin: 10px 0; }
.cs-node {
  width: 100%; max-width: 660px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.6);
  text-align: center;
}
.cs-node-t { font-weight: 700; font-size: 14px; }
.cs-node-d { margin-top: 4px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.cs-arrow { color: var(--muted); font-size: 16px; line-height: 1; padding: 9px 0; text-align: center; }
.cs-arrow small { display: block; font-family: var(--mono); font-size: 10.5px; margin-top: 2px; }

.cs-layer { width: 100%; max-width: 660px; border-radius: 12px; padding: 12px; }
.cs-layer--llm { background: rgba(147, 165, 143, 0.12); border: 1px solid rgba(147, 165, 143, 0.32); }
.cs-layer--det { background: rgba(26, 29, 27, 0.045); border: 1px solid var(--line); }
.cs-layer-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 2px 6px 10px;
}
.cs-layer--llm .cs-layer-label { color: var(--soft); }
.cs-layer--det .cs-layer-label { color: var(--ink); }
.cs-layer .cs-node { background: rgba(255, 255, 255, 0.7); }
.cs-layer .cs-node + .cs-node { margin-top: 8px; }

/* horizontal node row (e.g. the 4-table data layer) */
.cs-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.cs-row .cs-node { margin-top: 0 !important; padding: 12px 10px; }
.cs-layer-cap { margin: 10px 6px 2px; font-size: 12px; line-height: 1.55; color: var(--muted); }

/* three-act growth narrative */
.acts { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.act {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 26px 22px 84px;
  background: rgba(255, 255, 255, 0.5);
}
.act-n {
  position: absolute;
  left: 24px; top: 22px;
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--soft);
  opacity: 0.5;
}
.act h3 { margin: 0 0 10px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.act p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.8; color: #3a3f36; }
.act ul { margin: 6px 0 0; padding-left: 18px; }
.act li { font-size: 14px; line-height: 1.75; color: var(--muted); }
.act--key {
  background: #fdf9ec;
  border-color: rgba(147, 165, 143, 0.35);
}
.act--key .act-n { color: var(--soft); opacity: 1; }
.act-quote {
  margin-top: 12px;
  padding: 12px 16px;
  border-left: 3px solid var(--soft);
  background: rgba(147, 165, 143, 0.08);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

/* stat cards */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
.cs-stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.5);
}
.cs-stat strong {
  display: block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cs-stat span { display: block; margin-top: 5px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* difficulty table */
.cs-table-wrap {
  max-width: 100%;
  margin-top: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
.cs-table { width: 100%; min-width: 620px; border-collapse: collapse; }
.cs-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.cs-table td {
  padding: 14px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #2a2f26;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.cs-table td:first-child { font-weight: 700; color: var(--ink); white-space: nowrap; }
.cs-table tr:hover td { background: rgba(255, 255, 255, 0.5); }

/* ── Cultural probe gallery (sub-page) ── */
.probe-figs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 8px 0;
}
.probe-figs.one { grid-template-columns: 1fr; max-width: 720px; }
.probe-fig {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
}
.probe-fig img { width: 100%; height: 280px; object-fit: cover; display: block; }
.probe-fig.tall img { height: 360px; }
.probe-fig.natural img { height: auto; object-fit: contain; background: #fff; }
.probe-fig figcaption { padding: 12px 16px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.probe-fig figcaption strong { display: block; color: var(--ink); margin-bottom: 3px; font-weight: 600; }
.probe-video {
  width: auto;
  height: min(68vh, 680px);
  max-width: 100%;
  aspect-ratio: 662 / 1344;
  margin: 18px auto 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: block;
  object-fit: contain;
  background: #000;
}

.case-demo-video {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  margin: 18px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  object-fit: contain;
  background: #10110f;
}

/* ── Experiment detail pages ── */
.experiment-page { max-width: 1040px; }
.experiment-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.experiment-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease;
}
.experiment-link:hover {
  border-color: rgba(73, 96, 68, 0.38);
  background: rgba(255, 255, 255, 0.68);
}
.experiment-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.experiment-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
}
.experiment-figure--wide { grid-column: 1 / -1; }
.experiment-figure img {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
}
.experiment-figure figcaption {
  padding: 13px 16px 15px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.experiment-figure figcaption strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-weight: 600;
}
.experiment-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.experiment-video-item {
  min-width: 0;
  margin: 0;
}
.experiment-video {
  width: 100%;
  max-height: 68vh;
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  object-fit: contain;
  background: #10110f;
}
.experiment-video-item figcaption {
  padding: 10px 2px 0;
  color: var(--muted);
  font-size: 12px;
}
.experiment-video-feature {
  max-width: 620px;
  margin: 20px auto 0;
}
.experiment-video--feature {
  aspect-ratio: 676 / 720;
  max-height: none;
  border-radius: 8px;
}
.experiment-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 28px 0 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.experiment-fact {
  min-width: 0;
  padding: 17px 18px 18px 0;
}
.experiment-fact + .experiment-fact {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.experiment-fact strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}
.experiment-fact span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.experiment-copy { max-width: 760px; }
.experiment-note {
  max-width: 760px;
  margin: 18px 0 0;
  padding: 13px 16px;
  border-left: 3px solid var(--soft);
  background: rgba(147, 165, 143, 0.08);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.experiment-figure--poster {
  max-width: 760px;
  margin: 20px auto 0;
}
.experiment-figure--portrait {
  max-width: 560px;
  margin: 20px auto 0;
}
.experiment-gallery--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.experiment-method {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
  counter-reset: method;
}
.experiment-method div {
  min-width: 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  counter-increment: method;
}
.experiment-method div::before {
  content: "0" counter(method);
  display: block;
  margin-bottom: 10px;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 11px;
}
.experiment-method strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}
.experiment-method p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.experiment-live-shell {
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9ff;
}
.experiment-live-frame {
  width: 100%;
  height: min(72vh, 680px);
  min-height: 560px;
  display: block;
  border: 0;
}

/* ── Personal site evolution archive ── */
.evolution-page { max-width: 1120px; }
.evolution-thesis {
  max-width: 820px;
  margin: 8px 0 64px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: clamp(19px, 2.3vw, 28px);
  font-weight: 600;
  line-height: 1.5;
}
.evolution-phase {
  padding: 68px 0 72px;
  border-top: 1px solid var(--line);
}
.evolution-phase-head {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 28px;
}
.evolution-phase-no {
  color: var(--soft);
  font-family: var(--mono);
  font-size: 30px;
  line-height: 1;
}
.evolution-phase-date {
  margin: 0 0 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.evolution-phase h2 {
  margin: 0;
  font-size: clamp(25px, 3.2vw, 40px);
  letter-spacing: 0;
}
.evolution-visual {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f6f2;
}
.evolution-visual img {
  display: block;
  width: 100%;
  height: auto;
}
.evolution-visual figcaption {
  padding: 12px 16px 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}
.evolution-reasoning {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.evolution-reasoning > div {
  min-width: 0;
  padding: 22px 22px 24px 0;
}
.evolution-reasoning > div + div {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}
.evolution-reasoning strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}
.evolution-reasoning p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}
.evolution-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* ── Service-design portfolio boards ── */
.sd-page {
  max-width: 1320px;
}
.sd-hero {
  max-width: 760px;
}
.sd-role-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: baseline;
  margin: -12px 0 42px;
  padding: 16px 20px;
  border-left: 3px solid var(--soft);
  background: rgba(255, 255, 255, 0.52);
}
.sd-role-strip strong {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  white-space: nowrap;
}
.sd-role-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.sd-story {
  display: grid;
  gap: 26px;
}
.sd-chapter {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 10px 26px rgba(26, 29, 27, 0.055);
}
.sd-chapter:nth-child(even) {
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
}
.sd-chapter:nth-child(even) .sd-chapter-copy { order: 2; }
.sd-chapter:nth-child(even) .sd-chapter-visual { order: 1; }
.sd-chapter-copy {
  min-width: 0;
  padding: 34px 32px;
}
.sd-chapter-kicker {
  margin: 0 0 13px;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.sd-chapter h2 {
  margin: 0 0 13px;
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: -0.025em;
  line-height: 1.18;
}
.sd-chapter-summary {
  margin: 0;
  color: #3a3f36;
  font-size: 14px;
  line-height: 1.8;
}
.sd-chapter-points {
  display: grid;
  gap: 0;
  margin: 22px 0 24px;
  padding: 0;
  list-style: none;
}
.sd-chapter-points li {
  position: relative;
  padding: 11px 0 11px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.sd-chapter-points li::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--soft);
}
.sd-chapter-points strong {
  color: var(--ink);
  font-weight: 700;
}
.sd-board-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  text-decoration: none;
}
.sd-board-source:hover { color: var(--soft); }
.sd-chapter-visual {
  margin: 0;
  overflow: hidden;
  align-self: stretch;
  border-left: 1px solid var(--line);
  background: #fff;
}
.sd-chapter:nth-child(even) .sd-chapter-visual {
  border-right: 1px solid var(--line);
  border-left: 0;
}
.sd-chapter-visual a {
  display: block;
  overflow: hidden;
}
.sd-chapter-visual img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 320ms var(--ease-out);
}
.sd-chapter-visual a:hover img { transform: scale(1.012); }
.sd-chapter-visual figcaption {
  padding: 13px 16px 15px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}
.sd-originals {
  margin-top: 56px;
}
.sd-originals-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}
.sd-originals-kicker {
  margin: 0 0 7px;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sd-originals h2 {
  margin: 0;
  font-size: clamp(22px, 2.3vw, 30px);
  letter-spacing: -0.025em;
}
.sd-originals-note {
  margin: 0 0 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}
.sd-originals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.sd-original-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  text-decoration: none;
}
.sd-original-card img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--line);
  transition: transform 260ms var(--ease-out);
}
.sd-original-card:hover img { transform: scale(1.012); }
.sd-original-card span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px 13px;
}
.sd-original-card b {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.sd-original-card em {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
}

/* ── Case-page bottom nav (keep the recruiter moving) ── */
.case-next {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin: 64px 0 8px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
}

.case-next-label {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.case-next a.case-next-proj {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  transition: color 200ms var(--ease-out);
}

.case-next a.case-next-proj:hover { color: var(--soft); }

.case-next-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.case-next-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 24px rgba(26, 29, 27, 0.18);
}

@media (max-width: 640px) {
  .case-next { grid-template-columns: 1fr; }
  .sd-role-strip {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 30px;
  }
  .sd-chapter,
  .sd-chapter:nth-child(even) {
    grid-template-columns: 1fr;
  }
  .sd-chapter:nth-child(even) .sd-chapter-copy,
  .sd-chapter:nth-child(even) .sd-chapter-visual {
    order: initial;
  }
  .sd-chapter-copy { padding: 28px 24px; }
  .sd-chapter-visual,
  .sd-chapter:nth-child(even) .sd-chapter-visual {
    border-top: 1px solid var(--line);
    border-right: 0;
    border-left: 0;
  }
  .sd-originals { margin-top: 40px; }
  .sd-originals-head {
    display: block;
  }
  .sd-originals-note { margin-top: 8px; }
  .sd-originals-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .sd-original-card span {
    display: block;
    padding: 9px 9px 10px;
  }
  .sd-original-card em {
    display: block;
    margin-top: 4px;
  }
}

/* ── Responsive ── */
@media (max-width: 1000px) {
  .cb-layout, .article-layout, .ar-with-panel { grid-template-columns: 1fr; gap: 40px; }
  .article-rail, .ar-panel { position: static; }
  .xp-grid { grid-template-columns: 1fr 1fr; }
  .ar-folders { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
  .page { padding: 132px 22px 72px; }
  .xp-grid, .ar-folders { grid-template-columns: 1fr 1fr; }
  .experiment-gallery { grid-template-columns: 1fr; }
  .experiment-gallery--three { grid-template-columns: 1fr; }
  .experiment-figure--wide { grid-column: auto; }
  .experiment-video-grid { grid-template-columns: 1fr; }
  .experiment-facts { grid-template-columns: 1fr 1fr; }
  .experiment-fact:nth-child(3) {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .experiment-fact:nth-child(4) { border-top: 1px solid var(--line); }
  .experiment-method { grid-template-columns: 1fr 1fr; }
  .experiment-video {
    width: min(100%, 430px);
    margin-inline: auto;
  }
  .experiment-live-frame {
    height: 500px;
    min-height: 500px;
  }
  .evolution-phase { padding: 50px 0 56px; }
  .evolution-phase-head { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; }
  .evolution-phase-no { font-size: 21px; }
  .evolution-reasoning { grid-template-columns: 1fr; }
  .evolution-reasoning > div,
  .evolution-reasoning > div + div {
    padding: 17px 0 19px;
    border-left: 0;
  }
  .evolution-reasoning > div + div { border-top: 1px solid var(--line); }
  .evolution-gallery { grid-template-columns: 1fr; }
  .probe-video { height: min(66vh, 590px); }
  .ar-folder { padding: 16px; }
  .ar-folder--visual { padding: 0; }
  .ar-folder-copy { padding: 13px 14px 15px; }
  .ar-folder-copy strong { font-size: 13px; }
  .ar-folder-copy small { font-size: 10.5px; line-height: 1.45; }
  .sd-gallery { gap: 22px; }
  .fp-layout { grid-template-columns: 1fr; }
  .fp-thumbs { flex-direction: row; overflow-x: auto; }
  .fp-thumb { width: 84px; flex: 0 0 auto; }
  .ar-table-head, .ar-row { grid-template-columns: 1fr 80px; }
  .ar-table-head span:nth-child(2), .ar-row .ar-cell:nth-child(2),
  .ar-table-head span:nth-child(3), .ar-row .ar-cell:nth-child(3) { display: none; }
}

@media (max-width: 480px) {
  .page {
    padding: 124px 16px 64px;
  }

  .xp-grid,
  .ar-folders {
    grid-template-columns: 1fr;
  }

  .experiment-facts,
  .experiment-method,
  .cs-two {
    grid-template-columns: 1fr;
  }

  .experiment-fact,
  .experiment-fact + .experiment-fact {
    padding: 14px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .experiment-fact:first-child {
    border-top: 0;
  }

  .cs-table {
    min-width: 560px;
  }

  .cs-table th,
  .cs-table td {
    padding-inline: 10px;
  }
}
