:root {
  --paper: #f7f5ef;
  --surface: #eeece4;
  --ink: #20231f;
  --muted: #6e726a;
  --line: #dcd9cf;
  --green: #37594a;
  --green-soft: #dce5dd;
  --clay: #b85f43;
  --clay-soft: #eeddd5;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.site-header, main, footer { width: min(1160px, calc(100% - 56px)); margin-inline: auto; }

.site-header { min-height: 86px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 720; letter-spacing: -.025em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--paper); background: var(--green); font: 600 17px/1 Georgia, serif; }
nav { display: flex; align-items: center; gap: 8px; }
nav a { padding: 9px 14px; border-radius: 999px; color: var(--muted); font-size: 14px; text-decoration: none; transition: color .18s ease, background .18s ease; }
nav a:hover { color: var(--ink); background: var(--surface); }
nav a.active { color: var(--paper); background: var(--green); }

.eyebrow { margin: 0 0 18px; color: var(--clay); font: 700 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .18em; }
.hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 80px; align-items: end; padding: 112px 0 96px; }
.hero h1 { margin: 0; max-width: 780px; font: 500 clamp(58px, 7.2vw, 92px)/1.02 Georgia, "Noto Serif SC", "Songti SC", serif; letter-spacing: -.055em; }
.hero-side { padding-bottom: 8px; }
.intro { margin: 0 0 30px; color: var(--muted); font-size: 17px; line-height: 1.85; }
.primary-link { display: inline-flex; align-items: center; gap: 24px; padding: 12px 18px; border-radius: 999px; color: white; background: var(--green); font-size: 14px; text-decoration: none; transition: gap .18s ease, background .18s ease; }
.primary-link:hover { gap: 30px; background: #294538; }

.article-section { padding: 76px 0 112px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 36px; }
.section-heading .eyebrow { margin-bottom: 10px; }
.section-heading h2 { margin: 0; font: 500 40px/1.1 Georgia, "Noto Serif SC", serif; }
.category-nav { display: flex; gap: 6px; }
.category-nav a { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; text-decoration: none; }
.category-nav a:hover { color: var(--green); border-color: var(--green); }
.category-nav span { color: #9b9e97; font: 11px/1 ui-monospace, monospace; }

.lead-story { margin-bottom: 22px; border-radius: 24px; overflow: hidden; background: #e9e9df; }
.lead-story-link { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 420px; text-decoration: none; }
.lead-visual { position: relative; min-height: 420px; overflow: hidden; }
.analog-visual { display: grid; place-items: center; color: #eae8df; background: #30473d; }
.analog-visual span { position: absolute; border: 1px solid rgba(234,232,223,.18); border-radius: 50%; }
.analog-visual span:nth-child(1) { width: 140px; height: 140px; }
.analog-visual span:nth-child(2) { width: 260px; height: 260px; }
.analog-visual span:nth-child(3) { width: 410px; height: 410px; }
.analog-visual b { position: relative; z-index: 1; padding: 13px 17px; border: 1px solid #df8a69; border-radius: 999px; color: #f0a486; font: 700 13px/1 ui-monospace, monospace; letter-spacing: .15em; }
.lead-copy { display: flex; flex-direction: column; justify-content: center; padding: 54px; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; color: var(--muted); font: 11px/1.4 ui-monospace, monospace; }
.tag { padding: 5px 9px; border-radius: 999px; font: 700 11px/1 ui-sans-serif, system-ui, sans-serif; }
.tag.life { color: #7a3a29; background: var(--clay-soft); }
.tag.tech { color: #29493b; background: var(--green-soft); }
.tag.note { color: #5d5c57; background: #e5e2d9; }
.lead-copy h3 { margin: 22px 0 16px; font: 500 clamp(32px, 3.3vw, 47px)/1.2 Georgia, "Noto Serif SC", serif; letter-spacing: -.035em; }
.lead-copy p { margin: 0; color: var(--muted); line-height: 1.8; }
.read-more { display: inline-flex; align-items: center; gap: 12px; margin-top: 32px; color: var(--green); font-size: 14px; }
.read-more b { font-weight: 400; transition: transform .18s ease; }
.lead-story-link:hover .read-more b { transform: translateX(5px); }

.story-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
.story-list article { border-bottom: 1px solid var(--line); }
.story-list article:nth-child(-n+2) { border-top: 1px solid var(--line); }
.story-list a { position: relative; display: block; min-height: 196px; padding: 26px 54px 24px 4px; text-decoration: none; }
.story-list h3 { margin: 16px 0 8px; max-width: 470px; font: 500 24px/1.34 Georgia, "Noto Serif SC", serif; transition: color .18s ease; }
.story-list p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.story-arrow { position: absolute; right: 8px; top: 50%; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--green); transform: translateY(-50%); transition: color .18s ease, background .18s ease; }
.story-list a:hover h3 { color: var(--green); }
.story-list a:hover .story-arrow { color: white; background: var(--green); border-color: var(--green); }

footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 0 42px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }
footer p { margin: 0; }
footer p:nth-child(2) { text-align: center; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--green); }

/* Archive */
.archive-page { padding: 96px 0 130px; }
.archive-hero { display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 80px; padding-bottom: 64px; }
.archive-hero h1 { margin: 0; font: 500 clamp(60px, 8vw, 100px)/1 Georgia, "Noto Serif SC", serif; letter-spacing: -.055em; }
.archive-hero > p { max-width: 500px; margin: 0 0 8px; color: var(--muted); font-size: 17px; line-height: 1.85; }
.archive-tabs { justify-content: flex-start; gap: 10px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.archive-tabs a { display: inline-flex; gap: 9px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; }
.archive-tabs a:hover { color: white; background: var(--green); border-color: var(--green); }
.archive-tabs span { color: var(--muted); font: 11px/1 ui-monospace, monospace; }
.archive-tabs a:hover span { color: #d9e4dc; }
.archive-category { padding: 72px 0 10px; scroll-margin-top: 24px; }
.archive-category-title { display: grid; grid-template-columns: 54px 200px 1fr; align-items: baseline; gap: 20px; margin-bottom: 22px; }
.archive-category-title p { margin: 0; color: var(--clay); font: 700 11px/1 ui-monospace, monospace; }
.archive-category-title h2 { margin: 0; font: 500 40px/1.1 Georgia, "Noto Serif SC", serif; }
.archive-category-title span { color: var(--muted); font-size: 14px; }
.archive-list { border-top: 1px solid var(--ink); }
.archive-list > a { display: grid; grid-template-columns: 130px 1fr 54px; gap: 24px; align-items: center; padding: 25px 8px; border-bottom: 1px solid var(--line); text-decoration: none; }
.archive-list time { color: var(--muted); font: 11px/1 ui-monospace, monospace; }
.archive-list h3 { margin: 0 0 6px; font: 500 23px/1.35 Georgia, "Noto Serif SC", serif; transition: color .18s ease; }
.archive-list p { margin: 0; color: var(--muted); font-size: 14px; }
.archive-list > a > b { color: var(--muted); font: 10px/1 ui-monospace, monospace; text-align: right; }
.archive-list > a:hover h3 { color: var(--green); }

/* Article */
.article-page { max-width: 980px; padding: 62px 0 120px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 58px; color: var(--muted); font-size: 13px; text-decoration: none; }
.back-link:hover { color: var(--green); }
.article-header { max-width: 980px; }
.article-header .card-meta { margin-bottom: 24px; }
.article-header h1 { margin: 0; font: 500 clamp(46px, 5.5vw, 64px)/1.12 Georgia, "Noto Serif SC", "Songti SC", serif; letter-spacing: -.035em; }
.article-lead { max-width: 720px; margin: 28px 0 0; color: var(--muted); font-size: 19px; line-height: 1.8; }
.cover-figure, .lifestyle-hero, .guardrail-visual { margin: 50px 0 0; border-radius: 18px; overflow: hidden; }
.cover-figure img { display: block; width: 100%; height: min(540px, 58vw); object-fit: cover; }
.cover-figure figcaption { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.article-body { max-width: 700px; margin: 66px auto 0; font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: 18px; line-height: 1.95; }
.article-body p { margin: 0 0 25px; }
.article-body h2 { margin: 64px 0 20px; font-size: 29px; line-height: 1.35; letter-spacing: -.02em; }
.article-body h3 { margin: 38px 0 12px; font-size: 21px; line-height: 1.45; }
.article-body li { margin-bottom: 10px; }
.article-body a { color: var(--green); text-decoration: none; border-bottom: 1px solid #aebdb5; }
.article-body a:hover { color: var(--clay); border-color: var(--clay); }
.article-kicker { padding: 24px 26px; border-radius: 12px; background: var(--surface); font-size: 20px; line-height: 1.75; }
.article-body blockquote { margin: 42px 0; padding: 24px 28px; border-left: 3px solid var(--clay); background: var(--surface); font-size: 20px; }
.article-body code { padding: 2px 6px; border-radius: 4px; background: var(--surface); font: .85em/1.4 ui-monospace, monospace; }
.article-body pre { overflow-x: auto; margin: 32px 0; padding: 24px; border-radius: 12px; color: #eeeee8; background: #252c27; line-height: 1.65; }
.article-body pre code { padding: 0; color: inherit; background: transparent; }
.article-body ol, .article-body ul { padding-left: 24px; }
.callout { margin: 46px 0; padding: 26px 28px; border-radius: 12px; background: var(--green-soft); }
.callout strong { color: var(--green); font: 700 11px/1.2 ui-monospace, monospace; letter-spacing: .12em; }
.callout p { margin: 12px 0 0; }
.sources { margin-top: 76px; padding-top: 24px; border-top: 1px solid var(--line); }
.sources h2 { margin-top: 0; font-size: 23px; }
.sources ul { display: grid; gap: 10px; padding: 0; list-style: none; color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 13px; line-height: 1.65; }
.sources li { margin: 0; padding: 14px 16px; border-radius: 10px; background: var(--surface); }
.sources a { color: var(--ink); border: 0; font-weight: 650; }
.sources a:hover { color: var(--green); }
.table-wrap { overflow-x: auto; margin: 32px 0 44px; }
table { width: 100%; min-width: 650px; border-collapse: collapse; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 14px; line-height: 1.6; }
th, td { padding: 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: white; background: var(--green); font-size: 12px; }

/* Article diagrams */
.concept-flow, .cost-formula { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 11px; margin: 38px 0; padding: 26px; border-radius: 14px; background: var(--surface); font-family: ui-monospace, monospace; }
.concept-flow span, .cost-formula span { padding: 8px 11px; border: 1px solid #bbbdb6; border-radius: 7px; background: var(--paper); font-size: 12px; }
.concept-flow b, .cost-formula b { color: var(--clay); }
.agent-loop { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 38px 0; padding: 30px 18px; border-radius: 18px; color: white; background: var(--green); font-family: ui-monospace, monospace; }
.agent-loop span { padding: 7px 11px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; }
.agent-loop i { color: #f0a486; font-style: normal; }
.guardrail-visual { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); }
.guardrail-visual div { min-height: 145px; display: flex; flex-direction: column; justify-content: space-between; padding: 19px; background: var(--surface); }
.guardrail-visual div:nth-of-type(even) { background: #e5e1d7; }
.guardrail-visual b { color: var(--clay); font: 700 11px/1 ui-monospace, monospace; }
.guardrail-visual span { font: 500 16px/1.35 Georgia, serif; }
.guardrail-visual i { display: none; }
.analog-article-visual { display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr; min-height: 220px; background: var(--surface); }
.analog-article-visual > div { display: flex; flex-direction: column; justify-content: space-between; padding: 28px; }
.analog-article-visual b { color: var(--clay); font: 500 48px/1 Georgia, serif; }
.analog-article-visual span { max-width: 130px; font-size: 14px; line-height: 1.5; }
.analog-article-visual i { background: var(--line); }
.route-article-visual, .cooling-article-visual { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 210px; padding: 28px; background: var(--green-soft); }
.route-article-visual span { display: flex; flex-direction: column; gap: 8px; min-width: 125px; padding: 17px; border: 1px solid var(--green); border-radius: 9px; background: rgba(247,245,239,.7); font-size: 13px; }
.route-article-visual b { font: 500 21px/1.2 Georgia, serif; }
.route-article-visual i { width: 30px; height: 1px; background: var(--green); }
.cooling-article-visual { background: var(--clay-soft); }
.cooling-article-visual span, .cooling-article-visual b { padding: 12px 17px; border: 1px solid var(--ink); border-radius: 8px; background: var(--paper); font: 600 13px/1 ui-monospace, monospace; }
.cooling-article-visual b { color: white; background: var(--clay); border-color: var(--clay); }
.cooling-article-visual i { color: var(--clay); font-style: normal; }
.route-formula, .spending-zones { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 34px 0; border-radius: 14px; overflow: hidden; background: var(--line); }
.route-formula div, .spending-zones div { min-height: 140px; padding: 22px; background: var(--surface); }
.route-formula div { display: grid; gap: 9px; }
.route-formula b, .spending-zones b { color: var(--clay); font: 700 11px/1 ui-monospace, monospace; }
.route-formula span, .spending-zones b, .spending-zones span { display: block; }
.route-formula small, .spending-zones span { color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 13px; line-height: 1.6; }
.spending-zones { grid-template-columns: repeat(3, 1fr); }
.spending-zones b { margin-bottom: 16px; }

/* About */
.about-page { padding: 104px 0 140px; }
.about-page h1 { margin: 0; padding-bottom: 56px; border-bottom: 1px solid var(--line); font: 500 clamp(54px, 7vw, 84px)/1 Georgia, "Noto Serif SC", serif; letter-spacing: -.05em; }
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 100px; padding-top: 56px; }
.about-lead { margin: 0; font: 500 29px/1.55 Georgia, "Noto Serif SC", serif; }
.about-copy { color: var(--muted); font-size: 16px; line-height: 1.9; }
.about-copy p:first-child { margin-top: 0; }
.contact-link { display: inline-flex; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--green); text-decoration: none; }
.contact-link:hover { color: white; background: var(--green); border-color: var(--green); }

@media (max-width: 800px) {
  .site-header, main, footer { width: min(100% - 32px, 1160px); }
  .site-header { min-height: 74px; }
  .brand span:last-child { display: none; }
  nav { gap: 2px; }
  nav a { padding: 8px 9px; }
  .hero { grid-template-columns: 1fr; gap: 34px; padding: 78px 0 70px; }
  .hero h1 { font-size: clamp(48px, 14vw, 68px); }
  .hero-side { max-width: 560px; }
  .article-section { padding: 60px 0 84px; }
  .section-heading { display: block; }
  .category-nav { margin-top: 22px; overflow-x: auto; }
  .lead-story-link { grid-template-columns: 1fr; }
  .lead-visual { min-height: 240px; }
  .lead-copy { padding: 32px 26px 36px; }
  .story-list { grid-template-columns: 1fr; }
  .story-list article:nth-child(2) { border-top: 0; }
  .story-list a { min-height: 0; padding: 24px 48px 24px 2px; }
  .story-list h3 { font-size: 22px; }
  footer p:nth-child(2) { display: none; }
  .archive-page { padding: 72px 0 96px; }
  .archive-hero { grid-template-columns: 1fr; gap: 28px; padding-bottom: 44px; }
  .archive-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .archive-category { padding-top: 58px; }
  .archive-category-title { grid-template-columns: 34px 1fr; gap: 10px; }
  .archive-category-title span { grid-column: 2; }
  .archive-list > a { grid-template-columns: 1fr auto; gap: 12px; padding: 22px 2px; }
  .archive-list time { grid-column: 1 / -1; }
  .archive-list h3 { font-size: 21px; }
  .article-page { padding-top: 44px; }
  .back-link { margin-bottom: 44px; }
  .article-header h1 { font-size: clamp(41px, 12vw, 58px); }
  .article-lead { font-size: 17px; }
  .cover-figure, .lifestyle-hero, .guardrail-visual { margin-top: 38px; border-radius: 13px; }
  .article-body { margin-top: 50px; font-size: 17px; }
  .article-body h2 { margin-top: 54px; font-size: 26px; }
  .article-kicker { padding: 22px; font-size: 18px; }
  .concept-flow, .cost-formula { padding: 22px 14px; gap: 8px; }
  .agent-loop { flex-wrap: wrap; }
  .guardrail-visual { grid-template-columns: repeat(2, 1fr); }
  .guardrail-visual div { min-height: 118px; }
  .analog-article-visual { grid-template-columns: 1fr; }
  .analog-article-visual > div { min-height: 126px; }
  .analog-article-visual i { height: 1px; }
  .route-article-visual, .cooling-article-visual { flex-wrap: wrap; gap: 9px; min-height: 0; padding: 24px 14px; }
  .route-article-visual span { min-width: calc(50% - 20px); }
  .route-article-visual i { width: 12px; }
  .route-formula, .spending-zones { grid-template-columns: 1fr; }
  .about-page { padding: 76px 0 100px; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; padding-top: 42px; }
}
