/* ==========================================================================
   工巧 · 建筑与遗产设计 (arch.gqming.com)
   严格遵循 .stitch/DESIGN.md（taste-design 语义设计规范，方案 A 法务隔离版）
   单一主色：工巧墨玉青 #0F766E | 暖象牙石 × 曜石炭灰
   无纯黑、无霓虹、无渐变标题、无 Emoji、仅 transform / opacity 硬件加速动效
   ========================================================================== */

:root {
  --canvas: #f7f6f2;
  --paper: #ffffff;
  --stone: #eeede7;
  --dark: #121417;
  --dark-surface: #1a1e24;
  --dark-elevated: #21262e;

  --ink: #18181b;
  --ink-2: #52525b;
  --ink-muted: #71717a;
  --ink-on-dark: #f7f6f2;
  --ink-on-dark-2: #a1a1aa;

  --line: rgba(24, 24, 27, 0.10);
  --line-strong: rgba(24, 24, 27, 0.20);
  --line-dark: rgba(247, 246, 242, 0.12);
  --line-dark-strong: rgba(247, 246, 242, 0.25);

  --accent: #0f766e;
  --accent-hover: #115e59;
  --accent-on-dark: #2dd4bf;
  --accent-tint: rgba(15, 118, 110, 0.065);
  --accent-tint-strong: rgba(15, 118, 110, 0.125);
  --accent-border: rgba(15, 118, 110, 0.28);
  --focus-ring: 0 0 0 3px rgba(15, 118, 110, 0.16);

  --r-btn: 10px;
  --r-md: 16px;
  --shadow-card: 0 22px 46px -26px rgba(24, 24, 27, 0.14);

  --font-display: "Instrument Serif", "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-sans: "Outfit", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
  --space-section: clamp(4.5rem, 8vw, 7rem);
}

html[lang="zh-Hant"] {
  --font-display: "Instrument Serif", "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --font-sans: "Outfit", -apple-system, BlinkMacSystemFont, "PingFang TC", "Hiragino Sans CNS",
    "Microsoft JhengHei", "PingFang SC", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-2);
  background: var(--canvas);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Fixed subtle uncoated-paper grain (taste-design: fixed pseudo-element only) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.024;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.24;
  margin: 0;
}

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.section-dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--accent-on-dark); }

.container {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 28px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: var(--ink-on-dark);
  padding: 10px 16px;
  border-radius: var(--r-btn);
  z-index: 200;
}
.skip-link:focus { top: 12px; }

/* ---------- Perpetual Micro-Motion & Scroll Reveal (GPU transform + opacity only) ---------- */
@keyframes jade-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.32); opacity: 0.48; }
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: jade-pulse 3.2s ease-in-out infinite;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.68s var(--spring), transform 0.68s var(--spring);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 248, 246, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 70px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand svg { width: 34px; height: 34px; transition: transform 0.35s var(--spring); }
.brand:hover svg { transform: translateY(-1px); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.12rem; color: var(--ink); letter-spacing: 0.04em; }
.brand-text small { font-size: 0.7rem; color: var(--ink-muted); letter-spacing: 0.08em; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a {
  padding: 10px 14px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 8px;
  transition: color 0.25s var(--spring), background 0.25s var(--spring);
}
.site-nav a:hover { color: var(--accent); background: var(--accent-tint); }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-btn);
  overflow: hidden;
  flex-shrink: 0;
}
.lang-switch a {
  min-width: 44px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: background 0.2s var(--spring), color 0.2s var(--spring);
}
.lang-switch a + a { border-left: 1px solid var(--line-strong); }
.lang-switch a[aria-current="true"] { background: var(--ink); color: var(--ink-on-dark); }
.lang-switch a:not([aria-current="true"]):hover { color: var(--accent); background: var(--accent-tint); }

.nav-toggle {
  display: none;
  margin-left: auto;
  min-height: 44px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-btn);
  cursor: pointer;
  font-weight: 600;
}

/* ---------- Buttons & Links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 26px;
  border-radius: var(--r-btn);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  transition: background 0.25s var(--spring), color 0.25s var(--spring), border-color 0.25s var(--spring), transform 0.2s var(--spring);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--ink); color: var(--ink-on-dark); }
.btn-secondary:hover { background: #2a2a30; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.section-dark .btn-ghost { color: var(--ink-on-dark); border-color: var(--line-dark-strong); }
.section-dark .btn-ghost:hover { border-color: var(--accent-on-dark); color: var(--accent-on-dark); }

.text-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  padding: 6px 0;
}
.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 1px;
  background: var(--accent-border);
  transform-origin: left;
  transition: transform 0.35s var(--spring), background 0.25s var(--spring);
}
.text-link:hover { color: var(--accent-hover); }
.text-link:hover::after { background: var(--accent-hover); transform: scaleX(1.04); }
.section-dark .text-link { color: var(--accent-on-dark); }
.section-dark .text-link::after { background: rgba(45, 212, 191, 0.35); }

/* ---------- Architectural Plate Frame ---------- */
.plate-frame {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--stone);
}
.plate-frame img {
  width: 100%;
  transition: transform 0.75s var(--spring);
}
a.plate-frame:hover img,
.works-lead a:hover .plate-frame img,
.spread-media:hover .plate-frame img {
  transform: scale(1.022);
}

/* ---------- Sections ---------- */
.section { padding: var(--space-section) 0; }
.section-dark {
  background-color: var(--dark);
  background-image:
    linear-gradient(to right, rgba(248, 248, 246, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(248, 248, 246, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  color: var(--ink-on-dark-2);
}
.section-dark h2, .section-dark h3 { color: var(--ink-on-dark); }
.section-stone { background: var(--stone); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: clamp(2.2rem, 4.5vw, 3.8rem);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.section-dark .section-head { border-bottom-color: var(--line-dark); }
.section-head h2 { font-size: clamp(1.75rem, 3.2vw, 2.55rem); }
.section-head p { margin: 0; max-width: 62ch; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--accent);
}
.eyebrow::after {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent-border);
}
.section-dark .eyebrow { color: var(--accent-on-dark); }
.section-dark .eyebrow::after { background: rgba(45, 212, 191, 0.4); }

/* ---------- Hero (Eastern Architectural Monograph Composition) ---------- */
.hero {
  padding: clamp(3rem, 6.5vw, 5.5rem) 0 var(--space-section);
  border-bottom: 1px solid var(--line);
}
.hero-shell {
  display: grid;
  grid-template-columns: 44px minmax(0, 5.2fr) minmax(0, 6.8fr);
  gap: clamp(1.75rem, 4vw, 4rem);
  align-items: center;
}
.vertical-epigraph {
  writing-mode: vertical-rl;
  text-orientation: upright;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 0.94rem;
  letter-spacing: 0.34em;
  color: var(--ink-muted);
  user-select: none;
}
.vertical-epigraph::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
html[lang="en"] .vertical-epigraph {
  text-orientation: mixed;
  letter-spacing: 0.18em;
  font-size: 0.82rem;
  font-family: var(--font-mono);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 3.7vw, 3.55rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: 0.02em;
  text-wrap: balance;
  margin-bottom: 24px;
}
html[lang="en"] .hero h1 {
  font-size: clamp(2.5rem, 4.4vw, 3.9rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.06;
}
.section-head h2, .page-head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
html[lang="en"] .section-head h2, html[lang="en"] .page-head h1 {
  font-weight: 400;
  letter-spacing: -0.01em;
}
.hero .lede { font-size: 1.04rem; max-width: 46ch; color: var(--ink-2); }
.hero blockquote {
  margin: 26px 0 28px;
  padding: 6px 0 6px 18px;
  border-left: 2px solid var(--accent);
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  max-width: 46ch;
}
.hero blockquote cite {
  display: block;
  margin-top: 6px;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 8px; }
.badge-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 7px 14px;
  border: 1px solid var(--accent-border);
  background: var(--accent-tint);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}
.badge-line::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: jade-pulse 3.2s ease-in-out infinite;
}

/* Matted Architectural Plate with CAD Corner Ticks */
.plate-mat {
  display: block;
  width: 100%;
  position: relative;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.plate-mat::before,
.plate-mat::after {
  content: "+";
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.7;
  pointer-events: none;
}
.plate-mat::before { top: 4px; left: 6px; }
.plate-mat::after { bottom: 4px; right: 6px; }

.hero-figure .plate-frame img { aspect-ratio: 16 / 10; object-fit: cover; }
.hero-figure figcaption, .figcap {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.plate-tag { color: var(--accent); flex-shrink: 0; }

/* Pain-Point Direct Router Strip (Minimalist Architectural Hairline Bar) */
.pain-router {
  margin-top: clamp(2.4rem, 4.5vw, 3.6rem);
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.pain-router-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.pain-router-label {
  color: var(--accent);
}
.pain-router-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pain-route {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 20px;
  gap: 6px 12px;
  align-items: start;
  padding: 20px 22px 20px 0;
  border-right: 1px solid var(--line);
  margin-right: 22px;
  transition: color 0.25s var(--spring), transform 0.25s var(--spring);
}
.pain-route:last-child {
  border-right: 0;
  margin-right: 0;
  padding-right: 0;
}
.pain-route .idx { color: var(--accent); padding-top: 3px; }
.pain-route strong {
  display: block;
  font-size: 0.98rem;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
  transition: color 0.25s var(--spring);
}
.pain-route span.route-sub {
  display: block;
  margin-top: 5px;
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.5;
}
.pain-route .route-arrow {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.92rem;
  padding-top: 2px;
  transition: transform 0.25s var(--spring);
}
.pain-route:hover strong { color: var(--accent); }
.pain-route:hover .route-arrow { transform: translateX(4px); }

/* ---------- Services (Architectural Line-Drawing Monograph Rows) ---------- */
.service-row {
  display: grid;
  grid-template-columns: 56px 156px minmax(0, 3.6fr) minmax(0, 5.4fr) auto;
  gap: 24px 32px;
  align-items: center;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  transition: border-color 0.3s var(--spring);
}
.service-row:hover { border-top-color: var(--accent-border); }
.service-row:last-child { border-bottom: 1px solid var(--line); }
.service-row .idx { color: var(--accent); }
.service-diagram {
  width: 156px;
  height: 98px;
  padding: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.45s var(--spring), border-color 0.35s var(--spring);
}
.service-row:hover .service-diagram {
  transform: translateY(-2px);
  border-color: var(--accent-border);
}
.service-diagram svg { width: 100%; height: 100%; }
.service-row h3 { font-size: 1.3rem; }
.service-row p { margin: 0 0 12px; max-width: 56ch; }
.service-row ul { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.86rem; color: var(--ink-muted); }
.service-row ul li::before { content: "·"; margin-right: 6px; color: var(--accent); }
.service-row .go { align-self: center; }

/* ---------- Works & Prior-Practice Ledger ---------- */
.works-lead {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.75rem, 4.5vw, 3.75rem);
  align-items: end;
  margin-bottom: 48px;
}
.works-lead > a { display: block; width: 100%; }
.works-lead .plate-frame img { aspect-ratio: 16 / 10; object-fit: cover; }
.works-lead h3 { font-size: clamp(1.5rem, 2.5vw, 2.05rem); margin: 12px 0 14px; }

.prior-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px 28px;
  align-items: start;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  transition: border-color 0.25s var(--spring);
}
.prior-row:hover { border-top-color: var(--accent-border); }
.prior-row:last-child { border-bottom: 1px solid var(--line); }
.prior-row .idx { color: var(--accent); padding-top: 4px; }
.prior-row h3 { font-size: 1.1rem; line-height: 1.38; }
.prior-row .meta { font-size: 0.87rem; color: var(--ink-muted); margin: 5px 0 0; max-width: 68ch; }
.prior-row .tag-col { justify-self: end; }

.tag {
  display: inline-block;
  padding: 4px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.76rem;
  color: var(--ink-2);
  white-space: nowrap;
}
.tag-accent { border-color: var(--accent-border); color: var(--accent); background: var(--accent-tint); }

.note-box {
  margin-top: 36px;
  padding: 24px 28px;
  border: 1px solid var(--accent-border);
  background: var(--paper);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  font-size: 0.94rem;
  box-shadow: var(--shadow-card);
}
.note-box strong { color: var(--ink); display: block; margin-bottom: 8px; }
.note-box p:last-child { margin-bottom: 0; }

/* ---------- Steps & Principles (Dark Monograph Grid) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-dark); }
.steps li { padding: 30px 26px 10px 0; border-right: 1px solid var(--line-dark); margin-right: 26px; }
.steps li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.steps .idx { color: var(--accent-on-dark); display: block; margin-bottom: 16px; }
.steps h3 { font-size: 1.14rem; margin-bottom: 10px; }
.steps p { font-size: 0.93rem; margin: 0; line-height: 1.68; }
.boundary-line { margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line-dark); color: var(--ink-on-dark); max-width: 80ch; }

/* ---------- Assessor (Composed 4-Slot Specification Sheet) ---------- */
.assessor { display: grid; grid-template-columns: minmax(0, 5.2fr) minmax(0, 6.8fr); gap: clamp(1.75rem, 4.5vw, 3.75rem); align-items: start; }
.assessor fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.assessor legend { font-weight: 700; color: var(--ink); padding: 0; margin-bottom: 10px; font-size: 0.96rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-btn);
  background: var(--paper);
  font-size: 0.92rem;
  transition: border-color 0.2s var(--spring), background 0.2s var(--spring), color 0.2s var(--spring), transform 0.15s var(--spring);
}
.chip:hover span { border-color: var(--accent-border); }
.chip input:checked + span { border-color: var(--accent); background: var(--accent-tint-strong); color: var(--accent); font-weight: 600; }
.chip input:focus-visible + span { box-shadow: var(--focus-ring); }

.assess-result {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(24px, 3vw, 34px);
  box-shadow: var(--shadow-card);
}
.assess-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.assess-header h3 { font-size: 1.18rem; display: inline-flex; align-items: center; gap: 10px; }
.assess-count { color: var(--accent); }
.assess-progress { border-top: 1px solid var(--line); margin: 16px 0 18px; }
.assess-slot {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.assess-slot .mono { color: var(--ink-muted); }
.assess-slot .slot-val { font-size: 0.86rem; color: var(--ink-muted); }
.assess-slot.is-done .mono,
.assess-slot.is-done .slot-val { color: var(--accent); font-weight: 600; }

.assess-result h4 { font-size: 0.92rem; margin: 22px 0 8px; color: var(--accent); }
.assess-result ul.assess-list { border-top: 1px solid var(--line); }
.assess-result ul.assess-list li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.93rem; }
.assess-result .fine { margin: 18px 0 0; font-size: 0.82rem; color: var(--ink-muted); }
.assess-result .btn { margin-top: 20px; }

/* ---------- Lineage ---------- */
.lineage { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.75rem, 4.5vw, 4rem); }
.lineage ul { margin: 16px 0 0; }
.lineage li { padding: 14px 0; border-top: 1px solid var(--line); }
.lineage li:last-child { border-bottom: 1px solid var(--line); }
.lineage li strong { color: var(--ink); }
.sister-link {
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--r-md);
  align-self: start;
  box-shadow: var(--shadow-card);
}
.sister-link h3 { font-size: 1.1rem; margin-bottom: 8px; }

/* ---------- Details / FAQ ---------- */
.faq details { border-top: 1px solid var(--line); padding: 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 44px 22px 0;
  position: relative;
  color: var(--ink);
  font-weight: 600;
  min-height: 48px;
  transition: color 0.2s var(--spring);
}
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 17px;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--accent);
}
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 0 24px; max-width: 74ch; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.75rem, 4.5vw, 4rem); align-items: start; }
.mail-box {
  margin-top: 24px;
  padding: 20px 22px;
  border: 1px solid var(--line-dark-strong);
  background: rgba(26, 30, 36, 0.72);
  border-radius: var(--r-md);
}
.mail-box .mono { color: var(--accent-on-dark); }
.mail-addr { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; font-size: 1.25rem; color: var(--ink-on-dark); font-weight: 600; word-break: break-all; }
.copy-btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--r-btn);
  border: 1px solid var(--line-dark-strong);
  background: transparent;
  color: var(--ink-on-dark);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.2s var(--spring), color 0.2s var(--spring), transform 0.15s var(--spring);
}
.copy-btn:hover { border-color: var(--accent-on-dark); color: var(--accent-on-dark); }
.copy-btn:active { transform: translateY(1px); }
.copy-status { min-height: 1.4em; margin: 8px 0 0; font-size: 0.85rem; color: var(--accent-on-dark); }
.note-dark { margin-top: 18px; font-size: 0.9rem; }

.form-card { background: var(--paper); border-radius: var(--r-md); padding: clamp(24px, 3vw, 38px); color: var(--ink-2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label, .field .label { display: block; margin-bottom: 6px; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-btn);
  transition: border-color 0.2s var(--spring), box-shadow 0.2s var(--spring);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.field.has-error input, .field.has-error textarea { border-color: #b4443c; }
.field .err { display: none; margin-top: 4px; font-size: 0.82rem; color: #b4443c; }
.field.has-error .err { display: block; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; margin: 14px 0 0; font-size: 0.92rem; }
.form-status.is-ok { color: var(--accent); }
.form-status.is-err { color: #b4443c; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--ink-on-dark-2); padding: 60px 0 40px; border-top: 1px solid var(--line-dark); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); gap: 36px 48px; }
.site-footer h3 { font-size: 0.82rem; color: var(--ink-on-dark); margin-bottom: 12px; font-family: var(--font-mono); letter-spacing: 0.06em; font-weight: 500; }
.site-footer li { padding: 4px 0; }
.site-footer a:hover { color: var(--accent-on-dark); }
.footer-note { margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--line-dark); font-size: 0.82rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-philo { color: var(--ink-on-dark); max-width: 46ch; margin-top: 14px; font-size: 0.93rem; }

/* ---------- Inner pages ---------- */
.page-head { padding: clamp(2.8rem, 5.5vw, 4.4rem) 0 clamp(2rem, 3.5vw, 2.8rem); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; max-width: 24ch; }
html[lang="en"] .page-head h1 { max-width: 28ch; }
.page-head .lede { margin: 18px 0 0; max-width: 68ch; font-size: 1.06rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 18px; font-size: 0.84rem; color: var(--ink-muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 10px; color: var(--line-strong); }
.breadcrumb a:hover { color: var(--accent); }
.meta-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

.gallery { margin-top: 38px; }
.gallery-tabs { display: none; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.js .gallery-tabs { display: flex; }
.gallery-tab {
  min-height: 44px;
  padding: 0 18px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ink-2);
  cursor: pointer;
  font-weight: 600;
  margin-bottom: -1px;
  transition: color 0.2s var(--spring), border-color 0.2s var(--spring);
}
.gallery-tab:hover { color: var(--accent); }
.gallery-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.gallery-panel + .gallery-panel { margin-top: 36px; }
.gallery-panel .layer-title { font-size: 0.82rem; color: var(--accent); margin-bottom: 12px; display: block; }
.js .gallery-panel .layer-title { display: none; }
.gallery-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px; }
.gallery-grid figure { grid-column: span 6; }
.gallery-grid figure:first-child:nth-last-child(n + 2) { grid-column: span 8; }
.gallery-grid figure:nth-child(2):nth-last-child(n + 1) { grid-column: span 4; }
.gallery-grid figure:only-child { grid-column: 1 / -1; }
.gallery-grid img { width: 100%; height: auto; max-height: 620px; object-fit: cover; border: 1px solid var(--line-strong); background: var(--stone); }

.project-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); margin-top: 56px; align-items: start; }
.spec { margin: 0; border-top: 1px solid var(--line-strong); }
.spec div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec dt { font-size: 0.86rem; color: var(--ink-muted); font-weight: 600; }
.spec dd { margin: 0; color: var(--ink); font-size: 0.95rem; }
.spec-title { font-size: 0.82rem; color: var(--accent); margin-bottom: 12px; display: block; }

.prose { max-width: 66ch; }
.prose h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin: 2.4em 0 0.7em; padding-top: 0.2em; }
.prose h3 { font-size: 1.15rem; margin: 1.8em 0 0.5em; }
.prose p { margin-bottom: 1.1em; }
.prose ul, .prose ol { margin: 0 0 1.3em; padding-left: 0; }
.prose ul li, .prose ol li { position: relative; padding: 6px 0 6px 1.6em; }
.prose ul li::before { content: ""; position: absolute; left: 0.2em; top: 1.1em; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.prose ol { counter-reset: n; }
.prose ol li { counter-increment: n; }
.prose ol li::before { content: counter(n); position: absolute; left: 0; top: 0.5em; font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); }
.prose .note { margin: 1.6em 0; padding: 16px 20px; border-left: 2px solid var(--accent); background: var(--accent-tint); color: var(--ink); }
.table-wrap { overflow-x: auto; margin: 1.6em 0; border-top: 1px solid var(--line-strong); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 520px; }
.table-wrap caption { text-align: left; padding: 10px 0; font-size: 0.84rem; color: var(--ink-muted); }
.table-wrap th { text-align: left; background: var(--stone); color: var(--ink); padding: 10px 14px; border-bottom: 1px solid var(--line-strong); font-weight: 700; }
.table-wrap td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap th:first-child, .table-wrap td:first-child { min-width: 7.5em; }

.page-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(2rem, 5vw, 5rem); padding: 48px 0 var(--space-section); align-items: start; }
.aside { position: sticky; top: 92px; }
.aside h2 { font-size: 0.82rem; font-family: var(--font-mono); font-weight: 500; color: var(--accent); margin-bottom: 10px; letter-spacing: 0.05em; }
.aside ul { border-top: 1px solid var(--line); margin-bottom: 28px; }
.aside li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.aside a:hover { color: var(--accent); }
.aside-cta {
  padding: 20px 22px;
  margin-bottom: 28px;
  background: var(--paper);
  border: 1px solid var(--accent-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
}
.aside-cta strong { display: block; color: var(--ink); font-size: 0.98rem; margin-bottom: 6px; }
.aside-cta p { font-size: 0.86rem; color: var(--ink-2); margin: 0 0 14px; line-height: 1.55; }
.aside-cta .btn { width: 100%; min-height: 42px; font-size: 0.9rem; }
.cta-band { margin-top: 56px; padding: 32px; border: 1px solid var(--accent-border); background: var(--accent-tint); border-radius: var(--r-md); }
.cta-band h2 { font-size: 1.3rem !important; margin: 0 0 8px !important; padding: 0 !important; }

/* ---------- Archive spreads ---------- */
.spread { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: 44px 0; border-top: 1px solid var(--line); }
.spread:first-child { border-top: 0; padding-top: 8px; }
.spread:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.spread:nth-child(even) .spread-media { order: 2; }
.spread-media { display: block; width: 100%; }
.spread-media .plate-frame img { aspect-ratio: 16 / 10; object-fit: cover; }
.spread h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 8px 0 12px; }
.spread .meta-strip { margin: 14px 0 18px; }

.list-index { border-top: 1px solid var(--line); }
.list-index a { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 18px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: baseline; transition: border-color 0.25s var(--spring); }
.list-index a:hover { border-bottom-color: var(--accent-border); }
.list-index a:hover h2 { color: var(--accent); }
.list-index h2 { font-size: 1.24rem; transition: color 0.25s var(--spring); }
.list-index p { margin: 6px 0 0; font-size: 0.93rem; max-width: 68ch; }
.list-index .idx { color: var(--accent); }

.pager { display: flex; justify-content: space-between; gap: 20px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.93rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .site-nav a { padding: 10px 10px; font-size: 0.88rem; }
  .hero-shell { grid-template-columns: minmax(0, 5.2fr) minmax(0, 6.8fr); }
  .vertical-epigraph { display: none; }
  .service-row { grid-template-columns: 48px minmax(0, 4fr) minmax(0, 6fr) auto; }
  .service-diagram { display: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li:nth-child(2) { border-right: 0; margin-right: 0; }
  .steps li:nth-child(n + 3) { border-top: 1px solid var(--line-dark); }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 28px 18px;
    background: var(--canvas);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; min-height: 48px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .header-inner { gap: 12px; }
  .hero-shell, .section-head, .works-lead, .assessor, .lineage, .contact, .project-body, .page-grid, .spread, .spread:nth-child(even), .footer-grid { grid-template-columns: 1fr; }
  .pain-router-grid { grid-template-columns: 1fr; }
  .pain-route { border-right: 0; margin-right: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .pain-route:last-child { border-bottom: 0; }
  .spread:nth-child(even) .spread-media { order: 0; }
  .plate-mat { padding: 10px; }
  .service-row { grid-template-columns: 44px minmax(0, 1fr); gap: 12px 16px; }
  .service-row > :nth-child(4), .service-row > .go { grid-column: 2; }
  .service-row > .go { justify-self: start; width: fit-content; }
  .prior-row { grid-template-columns: 40px minmax(0, 1fr); gap: 8px 14px; }
  .prior-row .tag-col { grid-column: 2; justify-self: start; margin-top: 4px; }
  .aside { position: static; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li:nth-child(2) { border-right: 0; margin-right: 0; padding-right: 0; }
  .steps li + li { border-top: 1px solid var(--line-dark); }
  .gallery-grid figure, .gallery-grid figure:first-child:nth-last-child(n + 2), .gallery-grid figure:nth-child(2):nth-last-child(n + 1) { grid-column: 1 / -1; }
  .spec div { grid-template-columns: 1fr; gap: 2px; }
  .brand-text small { display: none; }
  .tag { white-space: normal; line-height: 1.4; }
  .list-index a { grid-template-columns: 38px minmax(0, 1fr); gap: 8px 14px; }
  .list-index a > :last-child { grid-column: 2; }
  .pager { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::after { display: none; }
  .live-dot, .badge-line::before { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
