:root {
  color-scheme: dark;
  --signal: #ffd318;
  --signal-soft: rgba(255, 211, 24, .09);
  --bg: #050505;
  --panel: #0d0d0c;
  --panel-raised: #121210;
  --text: #f4f4ef;
  --muted: #9d9d95;
  --faint: #6f6f69;
  --line: #292926;
  --line-strong: #3a3a34;
  --good: #b9d98a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 78% 6%, rgba(255, 211, 24, .055), transparent 26rem),
    var(--bg);
  color: var(--text);
  font: 15px/1.68 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

html[lang="zh-Hant"] body,
html[lang="zh-Hans"] body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.78;
}

html[lang="zh-Hans"] body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

button { font: inherit; }

[hidden] { display: none !important; }

.page-shell {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--signal);
  font-size: 14px;
  font-weight: 790;
  letter-spacing: -.015em;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 17px;
}

.header-link {
  color: var(--muted);
  font-size: 11px;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font-size: 10px;
}

.language-option {
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .025em;
}

.language-option[aria-pressed="true"] {
  color: var(--signal);
  text-decoration: underline;
  text-decoration-color: rgba(255, 211, 24, .42);
  text-underline-offset: 4px;
}

.language-option:hover { color: var(--text); }

.language-option:focus-visible,
a:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--signal);
  outline-offset: 4px;
}

.philosophy { padding-bottom: 54px; }

.hero {
  max-width: 920px;
  padding: 84px 0 58px;
}

.eyebrow,
.tradition,
.practice-label,
.checklist-time {
  margin: 0;
  color: var(--signal);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 14px 0 0;
  font-size: clamp(62px, 12vw, 116px);
  font-weight: 820;
  line-height: .94;
  letter-spacing: -.062em;
}

.hero h1 span { color: var(--signal); }

.hero-statement {
  max-width: 820px;
  margin: 28px 0 0;
  color: var(--text);
  font-size: clamp(27px, 4.6vw, 43px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.04em;
}

.hero-statement span { color: var(--signal); }

.hero-copy {
  max-width: 720px;
  margin: 18px 0 0;
  color: #c3c3bb;
  font-size: clamp(17px, 2.1vw, 21px);
  line-height: 1.55;
  letter-spacing: -.018em;
}

.tldr {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 211, 24, .38);
  border-radius: 18px;
  padding: clamp(24px, 4vw, 40px);
  background:
    linear-gradient(140deg, rgba(255, 211, 24, .085), transparent 44%),
    var(--panel);
}

.tldr::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--signal);
  content: "";
}

.tldr-heading h2 {
  max-width: 820px;
  margin: 9px 0 0;
  color: var(--signal);
  font-size: clamp(25px, 4.2vw, 42px);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 34px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.principle {
  min-width: 0;
  padding: 20px 18px 19px 0;
}

.principle + .principle {
  border-left: 1px solid var(--line-strong);
  padding-left: 18px;
}

.principle-word {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.principle p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.58;
}

.desk-mantra {
  max-width: 880px;
  margin: 30px 0 0;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: clamp(20px, 2.9vw, 28px);
  line-height: 1.42;
  letter-spacing: -.022em;
}

.chinese-edition .desk-mantra,
.chinese-edition .pull-quote {
  font-family: "Songti TC", "Noto Serif TC", "PMingLiU", serif;
  letter-spacing: .01em;
}

.chinese-edition[lang="zh-Hans"] .desk-mantra,
.chinese-edition[lang="zh-Hans"] .pull-quote {
  font-family: "Songti SC", "Noto Serif SC", SimSun, serif;
}

.nonnegotiables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 30px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.nonnegotiables li {
  position: relative;
  padding-left: 18px;
  color: #c1c1ba;
  font-size: 13px;
}

.nonnegotiables li::before {
  position: absolute;
  top: .72em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
  content: "";
}

.tldr-close {
  margin: 27px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 23px;
  color: var(--text);
  font-size: 14px;
  font-weight: 720;
}

.scope-note {
  max-width: 790px;
  margin: 27px auto 0;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.65;
  text-align: center;
}

.scope-note strong { color: var(--muted); }

.scope-note.compact { margin-top: 25px; }

.philosophy-section {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  padding-top: 54px;
}

.section-heading {
  display: grid;
  max-width: 820px;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.section-number {
  padding-top: 2px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .12em;
}

.tradition { margin-bottom: 8px; }

.section-heading h2,
.closing h2 {
  margin: 0;
  font-size: clamp(31px, 5vw, 49px);
  line-height: 1.07;
  letter-spacing: -.046em;
}

.section-intro,
.prose {
  max-width: 770px;
  margin: 28px 0 0 56px;
}

.section-intro {
  color: #c4c4bc;
  font-size: 17px;
  line-height: 1.65;
}

.prose p {
  margin: 0 0 17px;
  color: #c4c4bd;
  font-size: 16px;
}

.prose p:last-child { margin-bottom: 0; }

.prose em { color: var(--text); }

.practice-card {
  max-width: 770px;
  margin: 30px 0 0 56px;
  border-left: 3px solid var(--signal);
  padding: 18px 21px;
  background: var(--signal-soft);
}

.practice-card p:last-child {
  margin: 7px 0 0;
  color: #dbdbd4;
  font-size: 15px;
}

.marks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
}

.mark-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 25px;
  background: var(--panel);
}

.mark-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.mark-heading span {
  color: var(--signal);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
}

.mark-card h3,
.paired-practices h3,
.virtue-grid h3,
.emotion-grid h3,
.checklist-grid h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -.018em;
}

.mark-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.mark-card .attachment {
  color: var(--text);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: 18px;
  font-style: italic;
}

.chinese-edition .mark-card .attachment {
  font-family: "Songti TC", "Noto Serif TC", "PMingLiU", serif;
  font-style: normal;
}

.mark-card .antidote { color: #bdbdb5; }
.mark-card .antidote strong { color: var(--good); }

.pull-quote {
  max-width: 830px;
  margin: 42px 0 0 56px;
  border: 0;
  padding: 0;
  color: var(--signal);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: clamp(25px, 3.8vw, 38px);
  line-height: 1.26;
  letter-spacing: -.03em;
}

.reframe-list {
  max-width: 860px;
  margin: 35px 0 0 56px;
  border-top: 1px solid var(--line);
}

.reframe-list div {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.reframe-list dt {
  color: var(--text);
  font-size: 13px;
  font-weight: 780;
}

.reframe-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.paired-practices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
}

.paired-practices > div {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 25px;
  background: var(--panel);
}

.paired-practices h3 { margin-top: 8px; }

.paired-practices p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.virtue-grid,
.emotion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 34px;
  background: var(--line);
}

.virtue-grid > div,
.emotion-grid > div {
  min-height: 176px;
  padding: 23px;
  background: var(--panel);
}

.virtue-grid h3,
.emotion-grid h3 { color: var(--signal); }

.virtue-grid p,
.emotion-grid p {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.emotion-path {
  display: flex;
  margin: 33px 0 0 56px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.emotion-path i {
  color: var(--faint);
  font-style: normal;
}

.emotion-path strong { color: var(--signal); }

.risk-formula {
  display: grid;
  max-width: 870px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 34px 0 0 56px;
  background: var(--line-strong);
}

.risk-formula span {
  padding: 24px;
  background: var(--panel-raised);
  color: var(--signal);
  font: 760 clamp(15px, 2.2vw, 20px)/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -.03em;
  text-align: center;
}

.formula-note {
  max-width: 820px;
  margin: 13px 0 0 56px;
  color: var(--faint);
  font-size: 10px;
}

.risk-contract {
  max-width: 820px;
  margin: 34px 0 0 56px;
  padding: 0;
  counter-reset: risk-step;
  list-style: none;
}

.risk-contract li {
  position: relative;
  min-height: 42px;
  margin-top: 8px;
  padding: 10px 0 10px 48px;
  color: #bcbcb5;
  counter-increment: risk-step;
}

.risk-contract li::before {
  position: absolute;
  top: 7px;
  left: 0;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--signal);
  content: counter(risk-step, decimal-leading-zero);
  font-size: 9px;
  font-weight: 800;
}

.risk-contract strong { color: var(--text); }

.outcome-table-wrap {
  margin-top: 34px;
  overflow-x: auto;
}

.outcome-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: var(--panel);
  font-size: 13px;
}

.outcome-table th,
.outcome-table td {
  border: 1px solid var(--line);
  padding: 18px;
  text-align: left;
  vertical-align: top;
}

.outcome-table thead th {
  color: var(--faint);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.outcome-table tbody th {
  width: 150px;
  color: var(--signal);
  font-size: 11px;
}

.outcome-table td { color: var(--muted); }
.outcome-table td strong { color: var(--text); }

.streaks { margin-top: 14px; }

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.checklist-grid section {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 25px;
  background: var(--panel);
}

.checklist-grid h3 {
  margin-top: 8px;
  font-size: 20px;
}

.checklist-grid ul {
  margin: 19px 0 0;
  padding: 0;
  list-style: none;
}

.checklist-grid li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
}

.checklist-grid li + li { margin-top: 11px; }

.checklist-grid li::before {
  position: absolute;
  top: .33em;
  left: 0;
  width: 8px;
  height: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  content: "";
}

.closing {
  margin-top: 82px;
  border: 1px solid rgba(255, 211, 24, .34);
  border-radius: 18px;
  padding: clamp(28px, 5vw, 54px);
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 211, 24, .1), transparent 19rem),
    var(--panel);
}

.closing h2 {
  max-width: 860px;
  margin-top: 10px;
  color: var(--signal);
}

.closing > p:not(.eyebrow):not(.closing-chinese) {
  max-width: 800px;
  margin: 25px 0 0;
  color: #c5c5be;
  font-size: 16px;
}

.closing .closing-mantra {
  color: var(--text) !important;
  font-weight: 750;
}

.closing-chinese {
  margin: 25px 0 0;
  color: var(--signal);
  font-family: "Songti TC", "Noto Serif TC", "PMingLiU", serif;
  font-size: clamp(21px, 3vw, 30px);
  letter-spacing: .09em;
}

.chinese-edition[lang="zh-Hans"] .closing-chinese {
  font-family: "Songti SC", "Noto Serif SC", SimSun, serif;
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 22px 0 45px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .035em;
  opacity: .55;
}

@media (max-width: 820px) {
  .principle-grid { grid-template-columns: repeat(2, 1fr); }
  .principle:nth-child(3) { border-left: 0; border-top: 1px solid var(--line-strong); }
  .principle:nth-child(4) { border-top: 1px solid var(--line-strong); }
  .virtue-grid,
  .emotion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checklist-grid { grid-template-columns: 1fr; }
  .checklist-grid section { padding: 23px; }
}

@media (max-width: 620px) {
  .page-shell { width: min(100% - 28px, 1040px); }
  .site-header { min-height: 60px; }
  .brand img { width: 34px; height: 34px; }
  .brand span,
  .header-link { display: none; }
  .hero { padding: 52px 0 38px; }
  .hero h1 { font-size: clamp(56px, 18vw, 72px); }
  .hero-statement { margin-top: 23px; font-size: 29px; }
  .hero-copy { margin-top: 16px; font-size: 16px; }
  .tldr { border-radius: 14px; padding: 25px 20px; }
  .principle-grid { grid-template-columns: 1fr; margin-top: 25px; }
  .principle { padding: 17px 0; }
  .principle + .principle { border-top: 1px solid var(--line-strong); border-left: 0; padding-left: 0; }
  .nonnegotiables { grid-template-columns: 1fr; gap: 10px; }
  .philosophy-section { margin-top: 55px; padding-top: 40px; }
  .section-heading { grid-template-columns: 32px minmax(0, 1fr); gap: 8px; }
  .section-heading h2,
  .closing h2 { font-size: clamp(30px, 9.5vw, 40px); }
  .section-intro,
  .prose,
  .practice-card,
  .pull-quote,
  .reframe-list,
  .emotion-path,
  .risk-formula,
  .formula-note,
  .risk-contract { margin-left: 0; }
  .section-intro { font-size: 15px; }
  .marks-grid,
  .paired-practices,
  .virtue-grid,
  .emotion-grid,
  .risk-formula { grid-template-columns: 1fr; }
  .mark-card,
  .paired-practices > div,
  .virtue-grid > div,
  .emotion-grid > div { padding: 21px; }
  .virtue-grid > div,
  .emotion-grid > div { min-height: 0; }
  .reframe-list div { grid-template-columns: 1fr; gap: 5px; }
  .emotion-path { flex-wrap: wrap; gap: 8px; }
  .risk-formula span { padding: 19px 14px; }
  .outcome-table-wrap { margin-right: -14px; padding-right: 14px; }
  .closing { margin-top: 62px; border-radius: 14px; }
  .closing-chinese { line-height: 1.65; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  :root {
    color-scheme: light;
    --bg: #fff;
    --panel: #fff;
    --panel-raised: #fff;
    --text: #111;
    --muted: #444;
    --faint: #666;
    --line: #ccc;
    --line-strong: #aaa;
    --signal: #765f00;
    --signal-soft: #faf4d7;
    --good: #3d5b19;
  }
  body { background: #fff; }
  .site-header,
  .page-footer { display: none; }
  .hero { padding-top: 24px; }
  .philosophy-section,
  .mark-card,
  .paired-practices > div,
  .checklist-grid section,
  .closing { break-inside: avoid; }
}
