/* Clarity OS — design system · editorial Swiss */
:root {
  /* light (default) — warm paper */
  --bg: #f3eee2;
  --bg-deep: #e9e1cf;
  --bg-elev: #faf6ec;
  --surface: #fffdf6;
  --surface-2: #f8f1de;
  --ink: #181410;
  --ink-soft: #4a423a;
  --ink-mute: #7d736a;
  --hairline: #1814100f;
  --hairline-strong: #18141022;
  --rule: #1814103a;
  --oxblood: #b14a3a;
  --oxblood-deep: #7c2c20;
  --indigo: #2c3a8a;
  --sage: #5e7e63;
  --gold: #b89554;
  --shadow: 0 1px 0 #ffffffcc inset, 0 2px 12px #18141008;
  --radius: 4px;
  --max: 1280px;
  --font-display: "Newsreader", "Source Han Serif SC", Georgia, serif;
  --font-body: "Newsreader", "PingFang SC", "Hiragino Sans GB", system-ui, serif;
  --font-sans: "Public Sans", "PingFang SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

html[data-theme="dark"] {
  --bg: #14110f;
  --bg-deep: #0c0a09;
  --bg-elev: #1c1815;
  --surface: #221d19;
  --surface-2: #2a241f;
  --ink: #f4ecdc;
  --ink-soft: #c5beb1;
  --ink-mute: #807a72;
  --hairline: #ffffff0e;
  --hairline-strong: #ffffff1e;
  --rule: #ffffff34;
  --oxblood: #d97a6a;
  --oxblood-deep: #b8503e;
  --indigo: #8090d4;
  --sage: #98b89c;
  --gold: #d4b87a;
  --shadow: 0 1px 0 #ffffff05 inset, 0 6px 28px #0007;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss02";
  transition: background .25s, color .25s;
}

a { color: var(--oxblood); text-decoration: none; border-bottom: 1px solid var(--rule); transition: color .15s, border-color .15s; }
a:hover { color: var(--indigo); border-bottom-color: var(--indigo); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 36px; }

/* ----- Topbar ----- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--hairline);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 36px; max-width: var(--max); margin: 0 auto;
}
.brand {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--font-display); font-weight: 500;
  font-size: 24px; letter-spacing: -.015em;
  color: var(--ink); border: 0;
}
.brand .num {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-mute); letter-spacing: .04em;
}
.nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.nav a {
  font-size: 12.5px; color: var(--ink-soft); border: 0;
  font-weight: 500; font-family: var(--font-mono); letter-spacing: -.005em;
}
.nav a:hover { color: var(--oxblood); }

.toolbar { display: flex; gap: 10px; align-items: center; }
.lang-toggle, .theme-toggle {
  display: inline-flex; border: 1px solid var(--hairline-strong); border-radius: 999px;
  overflow: hidden; background: var(--surface);
  font-size: 12px; font-weight: 600;
}
.lang-toggle button, .theme-toggle button {
  background: transparent; border: 0; color: var(--ink-soft);
  padding: 6px 14px; cursor: pointer; font: inherit;
  letter-spacing: .02em;
}
.lang-toggle button.active, .theme-toggle button.active {
  background: var(--ink); color: var(--bg);
}

/* ----- Hero ----- */
.hero {
  padding: 100px 0 80px;
  border-bottom: 2px solid var(--ink);
  position: relative; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 80px; align-items: end; }

.hero-meta {
  display: grid; grid-template-columns: 1fr; gap: 24px;
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--ink-mute); letter-spacing: .04em;
  border-top: 1px solid var(--ink); padding-top: 20px;
}
.hero-meta .row { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 6px; border-bottom: 1px dashed var(--hairline-strong); }
.hero-meta .row .l { color: var(--ink-mute); }
.hero-meta .row .v { color: var(--ink); font-weight: 500; }
.hero-meta .row.accent .v { color: var(--oxblood); }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(58px, 9vw, 130px);
  line-height: 0.92;
  letter-spacing: -.035em;
  margin: 0 0 30px;
}
.hero h1 .arrow { color: var(--oxblood); font-style: italic; }
.hero h1 em { font-style: italic; }
.hero h1 .from { color: var(--ink-mute); font-style: italic; }
.hero-lede {
  font-size: 20px; line-height: 1.5; color: var(--ink-soft);
  max-width: 680px; margin-bottom: 36px;
  font-family: var(--font-body);
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 0;
  font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; border: 0; transition: all .15s;
  font-family: var(--font-mono); letter-spacing: .02em;
  text-transform: uppercase;
}
.btn-primary { background: var(--ink); color: var(--bg); border: 1px solid var(--ink); }
.btn-primary:hover { background: var(--oxblood); border-color: var(--oxblood); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
a.btn { border: 1px solid var(--ink); }
a.btn-primary { border: 1px solid var(--ink); }

/* Hero chaos→clarity SVG */
.transform-svg-wrap {
  margin-top: 60px;
  border-top: 1px solid var(--hairline-strong);
  padding-top: 36px;
  display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start;
}
.transform-label {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px;
}
.transform-cap { font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--ink); line-height: 1.3; }
.transform-svg { width: 100%; aspect-ratio: 4.2; max-height: 220px; }

/* ----- Section ----- */
.section { padding: 120px 0; border-bottom: 1px solid var(--rule); position: relative; }
.section.alt { background: var(--bg-elev); }

.section-head {
  display: grid; grid-template-columns: 240px 1fr; gap: 60px;
  margin-bottom: 64px; align-items: start;
  border-top: 2px solid var(--ink); padding-top: 24px;
}
.section-num {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink);
  letter-spacing: .12em; font-weight: 600;
}
.section-num .desc {
  display: block; color: var(--ink-mute); margin-top: 6px;
  font-weight: 400; letter-spacing: .04em; line-height: 1.4;
}
.section-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(40px, 5.5vw, 76px); line-height: 0.98;
  letter-spacing: -.025em; margin: 0 0 20px;
}
.section-title em { font-style: italic; color: var(--oxblood); }
.section-lede {
  font-size: 18px; color: var(--ink-soft); max-width: 700px; line-height: 1.55;
  font-family: var(--font-body);
}

/* ----- Module 1: Awareness ----- */
.awareness-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--ink); }
.awareness-side { padding: 40px; border-right: 1px solid var(--ink); display: flex; flex-direction: column; gap: 28px; }
.awareness-side:last-child { border-right: 0; }
.awareness-block { padding-bottom: 24px; border-bottom: 1px dashed var(--hairline-strong); }
.awareness-block:last-child { border-bottom: 0; padding-bottom: 0; }
.awareness-block .num {
  font-family: var(--font-mono); font-size: 11px; color: var(--oxblood);
  letter-spacing: .12em; margin-bottom: 8px; font-weight: 600;
}
.awareness-block h4 {
  font-family: var(--font-display); font-size: 26px; font-weight: 400;
  margin: 0 0 8px; letter-spacing: -.015em; line-height: 1.05;
}
.awareness-block h4 em { font-style: italic; }
.awareness-block p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); }

.journal-shell { background: var(--surface-2); padding: 40px 36px; }
.journal-shell h3 {
  font-family: var(--font-display); font-size: 28px; font-weight: 400;
  margin: 0 0 4px; letter-spacing: -.015em;
}
.journal-shell .sub {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 28px;
}
.prompt-card {
  background: var(--surface); border: 1px solid var(--ink);
  padding: 30px 32px; min-height: 180px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
}
.prompt-card::before {
  content: "❝"; position: absolute; top: -16px; left: 16px;
  background: var(--surface-2); padding: 0 10px;
  font-family: var(--font-display); font-size: 32px; color: var(--oxblood); line-height: 1;
}
.prompt-text {
  font-family: var(--font-display); font-style: italic;
  font-size: 22px; line-height: 1.4; color: var(--ink); flex: 1;
}
.prompt-tags { display: flex; gap: 8px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11px; }
.prompt-tags .pip {
  padding: 3px 10px; background: var(--surface-2); color: var(--ink-soft);
  border: 1px solid var(--hairline-strong);
}
.prompt-actions { display: flex; gap: 12px; margin-top: 20px; }
.shuffle-btn {
  background: transparent; border: 1px solid var(--ink); padding: 10px 18px;
  font: inherit; font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--ink); cursor: pointer; text-transform: uppercase; letter-spacing: .04em;
  transition: all .15s;
}
.shuffle-btn:hover { background: var(--ink); color: var(--bg); }

/* ----- Module 2: Attention ----- */
.attention-shell { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.diet-card { border: 1px solid var(--ink); }
.diet-row {
  display: grid; grid-template-columns: 220px 1fr 80px 60px;
  align-items: center; gap: 16px;
  padding: 16px 24px; border-bottom: 1px solid var(--hairline-strong);
}
.diet-row:last-child { border-bottom: 0; }
.diet-row .name { font-family: var(--font-display); font-size: 19px; font-weight: 500; letter-spacing: -.005em; }
.diet-bar { height: 4px; background: var(--bg-deep); position: relative; }
.diet-bar .fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--ink);
}
.diet-bar.warn .fill { background: var(--oxblood); }
.diet-row .val { font-family: var(--font-mono); font-size: 12px; color: var(--ink-mute); text-align: right; }
.diet-row .verdict {
  font-family: var(--font-mono); font-size: 10px; color: var(--ink); font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; text-align: center;
  padding: 3px 6px; border: 1px solid var(--ink);
}
.diet-row .verdict.bad { color: var(--oxblood); border-color: var(--oxblood); }
.diet-row .verdict.good { color: var(--sage); border-color: var(--sage); }

.diet-head {
  display: grid; grid-template-columns: 220px 1fr 80px 60px;
  gap: 16px; padding: 14px 24px;
  background: var(--ink); color: var(--bg);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  text-transform: uppercase; font-weight: 600;
}

.recovery-card { border: 1px solid var(--ink); padding: 36px; background: var(--surface); }
.recovery-card h3 {
  font-family: var(--font-display); font-size: 28px; font-weight: 400;
  margin: 0 0 6px; letter-spacing: -.015em;
}
.recovery-card .sub {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 24px;
}
.protocol { display: flex; flex-direction: column; gap: 18px; }
.proto {
  display: grid; grid-template-columns: 50px 1fr;
  gap: 18px; padding: 14px 0; border-top: 1px dashed var(--hairline-strong);
}
.proto:first-child { border-top: 0; padding-top: 4px; }
.proto .day {
  font-family: var(--font-mono); font-size: 11px; color: var(--oxblood);
  letter-spacing: .04em; padding-top: 4px; font-weight: 600;
}
.proto h5 { font-family: var(--font-display); font-size: 19px; font-weight: 500; margin: 0 0 4px; letter-spacing: -.01em; }
.proto p { color: var(--ink-soft); font-size: 14.5px; margin: 0; line-height: 1.55; }

/* ----- Module 3: Emotion ----- */
.emotion-shell { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; }
.cycles-card { border: 1px solid var(--ink); padding: 36px; background: var(--surface); }
.cycles-card h3 { font-family: var(--font-display); font-size: 28px; font-weight: 400; margin: 0 0 6px; letter-spacing: -.015em; }
.cycles-card .sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 22px; }
.cycle-svg { width: 100%; aspect-ratio: 1.6; }

.regulation-side { display: flex; flex-direction: column; gap: 18px; }
.reg-block {
  border: 1px solid var(--ink); padding: 24px 26px; background: var(--surface);
}
.reg-block .badge {
  display: inline-block; padding: 3px 10px; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  margin-bottom: 12px;
}
.reg-block.activate .badge { background: var(--oxblood); color: var(--surface); }
.reg-block.tolerate .badge { background: var(--ink); color: var(--bg); }
.reg-block.deactivate .badge { background: var(--indigo); color: var(--surface); }
.reg-block h5 { font-family: var(--font-display); font-size: 22px; font-weight: 500; margin: 0 0 8px; letter-spacing: -.01em; }
.reg-block p { color: var(--ink-soft); font-size: 14.5px; margin: 0; line-height: 1.6; }

/* ----- Module 4: Habit ----- */
.habit-shell {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 0;
  border: 1px solid var(--ink);
}
.replace-card { padding: 40px; border-right: 1px solid var(--ink); background: var(--surface); }
.replace-card h3 { font-family: var(--font-display); font-size: 30px; font-weight: 400; margin: 0 0 8px; letter-spacing: -.015em; }
.replace-card .sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 26px; }

.swap-row {
  display: grid; grid-template-columns: 1fr 30px 1fr;
  gap: 14px; padding: 16px 0; border-bottom: 1px dashed var(--hairline-strong);
  align-items: start;
}
.swap-row:last-child { border-bottom: 0; }
.swap-row .arrow {
  font-family: var(--font-display); font-size: 22px; color: var(--oxblood);
  text-align: center; padding-top: 2px; font-style: italic;
}
.swap-row .from {
  text-decoration: line-through; text-decoration-color: var(--oxblood);
  text-decoration-thickness: 2px; color: var(--ink-mute); font-style: italic;
}
.swap-row .to { color: var(--ink); font-weight: 500; }
.swap-row .label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; color: var(--ink-mute); display: block; margin-bottom: 4px; text-transform: uppercase; }

.identity-side { padding: 40px; background: var(--bg-elev); }
.identity-side h3 { font-family: var(--font-display); font-size: 30px; font-weight: 400; margin: 0 0 8px; letter-spacing: -.015em; }
.identity-side .sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 24px; }
.id-svg { width: 100%; aspect-ratio: 1.05; max-height: 360px; }
.identity-side p { font-size: 15px; color: var(--ink-soft); line-height: 1.6; margin: 16px 0 0; }

/* ----- Module 5: Cognitive Lab ----- */
.distortion-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0; border: 1px solid var(--ink);
}
.distortion {
  padding: 28px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  background: var(--surface);
}
.distortion:nth-child(3n) { border-right: 0; }
.distortion:nth-last-child(-n+3) { border-bottom: 0; }
.distortion .glyph {
  font-family: var(--font-display); font-style: italic; font-size: 36px;
  color: var(--oxblood); line-height: 1; margin-bottom: 16px;
}
.distortion .name {
  font-family: var(--font-display); font-size: 22px; font-weight: 500;
  margin: 0 0 4px; letter-spacing: -.01em;
}
.distortion .label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em;
  color: var(--ink-mute); text-transform: uppercase; margin-bottom: 14px;
}
.distortion .ex {
  font-style: italic; color: var(--ink); font-family: var(--font-display);
  font-size: 16px; line-height: 1.4; margin: 0 0 12px; padding-left: 14px; border-left: 2px solid var(--oxblood);
}
.distortion .fix { color: var(--ink-soft); font-size: 14px; line-height: 1.55; margin: 0; }
.distortion .fix b { color: var(--ink); font-weight: 600; }

/* ----- Module 6: Discipline ----- */
.discipline-shell {
  border: 1px solid var(--ink); display: grid;
  grid-template-columns: 1fr 1fr;
}
.discipline-svg-card { padding: 40px; border-right: 1px solid var(--ink); background: var(--surface); }
.discipline-svg-card h3 { font-family: var(--font-display); font-size: 28px; font-weight: 400; margin: 0 0 6px; letter-spacing: -.015em; }
.discipline-svg-card .sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 22px; }
.disc-svg { width: 100%; aspect-ratio: 1.5; }

.principles-side { padding: 40px; }
.principles-side h3 { font-family: var(--font-display); font-size: 28px; font-weight: 400; margin: 0 0 6px; letter-spacing: -.015em; }
.principles-side .sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 22px; }
.principle {
  display: grid; grid-template-columns: 32px 1fr;
  gap: 14px; padding: 14px 0;
  border-top: 1px dashed var(--hairline-strong);
}
.principle:first-child { border-top: 0; padding-top: 4px; }
.principle .n {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--oxblood); padding-top: 4px; font-weight: 600;
}
.principle h5 { font-family: var(--font-display); font-size: 19px; font-weight: 500; margin: 0 0 4px; letter-spacing: -.01em; }
.principle p { color: var(--ink-soft); font-size: 14.5px; margin: 0; line-height: 1.55; }

/* ----- Module 7: Direction ----- */
.direction-shell { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.canvas-card { border: 1px solid var(--ink); background: var(--surface); padding: 36px; }
.canvas-card h3 { font-family: var(--font-display); font-size: 28px; font-weight: 400; margin: 0 0 6px; letter-spacing: -.015em; }
.canvas-card .sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 22px; }

.canvas-grid {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 1px; background: var(--ink);
  border: 1px solid var(--ink);
}
.canvas-cell {
  background: var(--surface); padding: 22px; min-height: 130px;
  display: flex; flex-direction: column; gap: 10px;
}
.canvas-cell .axis {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em;
  color: var(--oxblood); text-transform: uppercase; font-weight: 600;
}
.canvas-cell .q {
  font-family: var(--font-display); font-style: italic; font-size: 17px;
  line-height: 1.3; color: var(--ink); margin: 0;
}
.canvas-cell .a {
  font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; margin: 0;
}

.alignment-side h3 { font-family: var(--font-display); font-size: 32px; font-weight: 400; margin: 0 0 8px; letter-spacing: -.02em; }
.alignment-side h3 em { font-style: italic; color: var(--oxblood); }
.alignment-side .sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 22px; }
.alignment-side p { color: var(--ink-soft); font-size: 16px; line-height: 1.65; margin: 0 0 16px; }
.align-quote {
  margin: 24px 0 0; padding: 18px 20px;
  border-left: 3px solid var(--oxblood);
  font-family: var(--font-display); font-size: 22px; font-style: italic;
  line-height: 1.4; color: var(--ink); background: var(--surface);
}

/* ----- Module 8: AI Guide ----- */
.guide {
  border: 1px solid var(--ink); background: var(--surface);
  display: grid; grid-template-columns: 300px 1fr; min-height: 580px;
}
.guide-side {
  background: var(--bg-elev); border-right: 1px solid var(--ink);
  padding: 28px;
}
.guide-side h4 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-mute); margin: 0 0 14px; font-weight: 600;
}
.guide-pill {
  background: transparent; border: 1px solid var(--ink);
  padding: 11px 15px; font: inherit; font-size: 13.5px;
  cursor: pointer; width: 100%; text-align: left; margin-bottom: 8px;
  color: var(--ink); transition: all .15s; line-height: 1.4;
  font-family: var(--font-body);
}
.guide-pill:hover { background: var(--ink); color: var(--bg); }
.guide-main { display: flex; flex-direction: column; }
.guide-stream { flex: 1; padding: 32px; overflow-y: auto; max-height: 580px; }
.msg { margin-bottom: 24px; max-width: 90%; }
.msg.user { margin-left: auto; }
.msg .role {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 6px; font-weight: 600;
}
.msg .bubble {
  background: var(--surface-2); border: 1px solid var(--ink);
  padding: 16px 20px; font-size: 15px; line-height: 1.6;
}
.msg.user .bubble { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.msg .bubble p { margin: 0 0 10px; }
.msg .bubble p:last-child { margin-bottom: 0; }
.msg .bubble strong { color: var(--oxblood); font-weight: 600; }
.msg.user .bubble strong { color: var(--gold); }
.msg .bubble .ask {
  margin: 8px 0 6px; padding: 6px 0 6px 14px;
  border-left: 2px solid var(--oxblood);
  font-family: var(--font-display); font-style: italic;
  font-size: 17px; line-height: 1.4; color: var(--ink);
}
.guide-input {
  border-top: 1px solid var(--hairline-strong); padding: 18px;
  display: flex; gap: 10px; background: var(--bg-elev);
}
.guide-input input {
  flex: 1; border: 1px solid var(--ink); background: var(--surface); color: var(--ink);
  padding: 12px 18px; font: inherit; font-size: 14.5px; font-family: var(--font-body);
}
.guide-input input:focus { outline: 2px solid var(--oxblood); outline-offset: -1px; }
.guide-input input::placeholder { color: var(--ink-mute); }

/* ----- Module 9: Dashboard ----- */
.dash {
  border: 1px solid var(--ink); padding: 40px; background: var(--surface);
}
.dash-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 32px; padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.dash-head h3 { font-family: var(--font-display); font-size: 30px; font-weight: 400; margin: 0 0 4px; letter-spacing: -.02em; }
.dash-head .meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); letter-spacing: .04em; }

.dash-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px;
  background: var(--ink); border: 1px solid var(--ink); margin-bottom: 36px;
}
.dash-cell { background: var(--surface); padding: 20px; }
.dash-cell .k {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em;
  color: var(--ink-mute); text-transform: uppercase; font-weight: 600;
}
.dash-cell .v {
  font-family: var(--font-display); font-size: 36px; font-weight: 400;
  margin: 6px 0 4px; letter-spacing: -.02em; line-height: 1;
}
.dash-cell .v.good { color: var(--sage); }
.dash-cell .v.warn { color: var(--gold); }
.dash-cell .v.alert { color: var(--oxblood); }
.dash-cell .delta { font-size: 11px; color: var(--ink-soft); font-family: var(--font-mono); }
.dash-cell svg.spark { display: block; margin-top: 8px; width: 100%; height: 28px; }

.evolution { width: 100%; aspect-ratio: 2.7; }
.evo-legend { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }
.legend-dot { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot::before { content: ""; width: 12px; height: 2px; background: var(--ink); }
.legend-dot.b::before { background: var(--oxblood); }
.legend-dot.c::before { background: var(--indigo); }
.legend-dot.d::before { background: var(--sage); }

/* ----- Footer ----- */
.footer {
  background: var(--ink); color: var(--bg);
  padding: 80px 0 40px;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 56px; }
.footer h5 {
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: .12em; color: var(--oxblood); margin: 0 0 18px; font-weight: 600;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; font-size: 14px; }
.footer a { color: #cbc5b8; border: 0; }
.footer a:hover { color: var(--oxblood); }
.footer-brand {
  font-family: var(--font-display); font-size: 38px; color: var(--bg); font-weight: 500;
  letter-spacing: -.02em; margin-bottom: 12px; line-height: 1;
}
.footer-brand em { font-style: italic; color: var(--oxblood); }
.footer-tag { color: #968d7e; font-size: 14px; max-width: 320px; line-height: 1.55; font-family: var(--font-body); }
.footer-bottom {
  border-top: 1px solid #ffffff14; padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: #968d7e; font-family: var(--font-mono);
}
.footer-bottom a { color: #968d7e; border: 0; }
.footer-bottom a:hover { color: var(--oxblood); }

/* ----- i18n ----- */
html[data-lang="en"] [lang="zh"] { display: none !important; }
html[data-lang="zh"] [lang="en"] { display: none !important; }
html[data-lang="en"][lang="zh"], html[data-lang="zh"][lang="en"] { display: block !important; }

/* ----- Responsive ----- */
@media (max-width: 1000px) {
  .nav { display: none; }
  .hero { padding: 60px 0 50px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .transform-svg-wrap { grid-template-columns: 1fr; gap: 16px; }
  .section { padding: 80px 0; }
  .section-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 36px; }
  .awareness-grid { grid-template-columns: 1fr; }
  .awareness-side:first-child { border-right: 0; border-bottom: 1px solid var(--ink); }
  .attention-shell, .emotion-shell, .direction-shell { grid-template-columns: 1fr; gap: 24px; }
  .habit-shell { grid-template-columns: 1fr; }
  .replace-card { border-right: 0; border-bottom: 1px solid var(--ink); }
  .distortion-grid { grid-template-columns: 1fr; }
  .distortion { border-right: 0 !important; }
  .distortion:not(:last-child) { border-bottom: 1px solid var(--ink) !important; }
  .discipline-shell { grid-template-columns: 1fr; }
  .discipline-svg-card { border-right: 0; border-bottom: 1px solid var(--ink); }
  .canvas-grid { grid-template-columns: 1fr; }
  .guide { grid-template-columns: 1fr; min-height: 0; }
  .guide-side { border-right: 0; border-bottom: 1px solid var(--ink); }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .toolbar { gap: 6px; }
  .lang-toggle button, .theme-toggle button { padding: 5px 10px; font-size: 11px; }
  .diet-row, .diet-head { grid-template-columns: 100px 1fr 60px 50px; gap: 8px; padding: 12px 14px; }
  .diet-row .name { font-size: 14px; }
}

/* ----- utility ----- */
.fade-in { opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s; }
.fade-in.in { opacity: 1; transform: none; }
