@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Newsreader:ital,opsz,wght@1,6..72,500;1,6..72,600&display=swap');

:root {
  --canvas: #f6f1e7;
  --paper: #fffdf8;
  --paper-strong: #ffffff;
  --ink: #182018;
  --muted: #687067;
  --line: #dcd7cc;
  --green: #21543a;
  --green-soft: #dbe8da;
  --copper: #b1542c;
  --copper-soft: #f3ded0;
  --violet: #65549b;
  --violet-soft: #e8e2f5;
  --blue: #356183;
  --blue-soft: #dce9f0;
  --gold: #9d721d;
  --gold-soft: #f1e5c4;
  --rose: #9e4e59;
  --rose-soft: #f2dfe2;
  --radius: 18px;
  --shadow: 0 16px 40px rgba(42, 38, 28, 0.08);
  --sidebar-width: 268px;
  --sidebar-collapsed: 82px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: 'Manrope', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-width);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  background: #173d2c;
  color: #f8f4ea;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition: width 180ms ease, transform 180ms ease;
}
.brand-row { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; flex: 1; }
.brand-mark {
  width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center;
  color: #173d2c; background: #f0cf78; border: 1px solid rgba(255,255,255,.22);
  border-radius: 13px 13px 13px 4px; font-family: 'Newsreader', serif; font-size: 25px; font-style: italic; font-weight: 600;
}
.brand-copy { display: grid; line-height: 1.1; white-space: nowrap; overflow: hidden; }
.brand-copy strong { font-size: 14px; letter-spacing: .02em; }
.brand-copy small { margin-top: 5px; color: #aebdaf; font-family: 'DM Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .13em; }
.collapse-button, .mobile-menu {
  border: 0; cursor: pointer; color: inherit; background: transparent;
}
.collapse-button {
  width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; font-size: 22px;
}
.nav-list { display: grid; gap: 7px; margin-top: 36px; }
.nav-item {
  min-height: 48px; display: grid; grid-template-columns: 28px 1fr 8px; align-items: center; gap: 9px;
  padding: 0 13px; color: #c8d1c9; text-decoration: none; border: 1px solid transparent; border-radius: 12px;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.12); }
.nav-icon { width: 28px; text-align: center; font-size: 19px; }
.nav-label { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-copper { background: #f28a59; } .dot-violet { background: #b9a7ef; } .dot-blue { background: #8dc4e9; }
.dot-green { background: #84d194; } .dot-gold { background: #f0cf78; } .dot-rose { background: #e99da7; }
.sidebar-note {
  margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 14px 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); border-radius: 12px; overflow: hidden;
}
.sidebar-note div { display: grid; white-space: nowrap; }
.sidebar-note strong { font-size: 12px; }
.sidebar-note small { margin-top: 3px; color: #aebdaf; font-size: 10px; }

body.nav-collapsed .sidebar { width: var(--sidebar-collapsed); }
body.nav-collapsed .brand-copy,
body.nav-collapsed .nav-label,
body.nav-collapsed .nav-dot,
body.nav-collapsed .sidebar-note div { opacity: 0; width: 0; pointer-events: none; }
body.nav-collapsed .collapse-button { position: absolute; left: 66px; top: 32px; color: var(--green); background: var(--paper); border-color: var(--line); transform: rotate(180deg); }
body.nav-collapsed .nav-item { grid-template-columns: 1fr; padding: 0; place-items: center; }
body.nav-collapsed .sidebar-note { justify-content: center; padding-inline: 0; }
body.nav-collapsed .main-content { margin-left: var(--sidebar-collapsed); }

.main-content { margin-left: var(--sidebar-width); min-width: 0; transition: margin-left 180ms ease; }
.topbar {
  height: 76px; padding: 0 clamp(24px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 30; background: rgba(246, 241, 231, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
}
.mobile-menu { display: none; font-size: 21px; }
.eyebrow { display: flex; gap: 10px; align-items: center; font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.eyebrow span { width: 22px; height: 1px; background: var(--copper); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.print-button { display: flex; gap: 7px; align-items: center; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); cursor: pointer; font-size: 12px; font-weight: 600; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; background: var(--copper); color: white; border-radius: 11px 11px 11px 4px; font-size: 11px; font-weight: 800; }

.section { scroll-margin-top: 76px; padding: clamp(70px, 9vw, 126px) clamp(24px, 5vw, 76px); }
.hero { min-height: calc(100vh - 76px); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); align-items: center; gap: clamp(42px, 7vw, 110px); }
.kicker { margin: 0 0 18px; color: var(--copper); font-family: 'DM Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: .13em; }
.kicker span { color: var(--line); }
h1, h2, h3, p { text-wrap: pretty; }
h1 { margin: 0; max-width: 770px; font-size: clamp(54px, 7vw, 98px); line-height: .92; letter-spacing: -.065em; }
h1 em { color: var(--copper); font-family: 'Newsreader', serif; font-weight: 500; }
.hero-summary { max-width: 660px; margin: 30px 0 0; color: var(--muted); font-size: clamp(16px, 1.6vw, 20px); line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 18px; border: 1px solid transparent; border-radius: 12px; text-decoration: none; cursor: pointer; font-size: 13px; font-weight: 700; transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--green); color: #fff; box-shadow: 0 10px 24px rgba(33,84,58,.18); }
.button.primary:hover { background: #173d2c; }
.button.secondary { background: var(--paper); color: var(--ink); border-color: var(--line); }
.button.full { width: 100%; }
.briefing-card { background: var(--paper-strong); border: 1px solid var(--line); border-radius: 26px 26px 26px 8px; box-shadow: var(--shadow); overflow: hidden; }
.briefing-card-head { min-height: 66px; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.briefing-card-head span { font-size: 13px; font-weight: 800; }
.briefing-card-head strong { color: var(--copper); font-family: 'DM Mono', monospace; font-size: 11px; }
.briefing-card ol { margin: 0; padding: 8px 24px 20px; list-style: none; }
.briefing-card li { min-height: 76px; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); }
.briefing-card li:last-child { border-bottom: 0; }
.briefing-card li > span { color: var(--copper); font-family: 'DM Mono', monospace; font-size: 11px; }
.briefing-card li div { display: grid; gap: 4px; }
.briefing-card li strong { font-size: 13px; }
.briefing-card li small { color: var(--muted); font-size: 11px; }
.briefing-card time { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; }
.signal-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 clamp(24px, 5vw, 76px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.signal-strip div { padding: 24px 28px; display: grid; gap: 5px; border-right: 1px solid var(--line); }
.signal-strip div:last-child { border-right: 0; }
.signal-strip strong { color: var(--green); font-family: 'Newsreader', serif; font-size: 32px; font-style: italic; }
.signal-strip span { color: var(--muted); font-size: 11px; }

.news-section { border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 38px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .75fr); gap: 48px; align-items: end; }
.section-heading > div { position: relative; }
.section-emoji { position: absolute; left: -44px; top: 0; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); }
.section-heading h2, .tool-intro h2 { max-width: 740px; margin: 0; font-size: clamp(36px, 4.5vw, 62px); line-height: 1.02; letter-spacing: -.045em; }
.section-intro { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.news-grid.two-column { grid-template-columns: repeat(2, 1fr); }
.news-card { min-height: 370px; padding: 25px; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c9c1b3; }
.news-card.featured { border-top: 5px solid var(--violet); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tag { padding: 6px 8px; background: var(--violet-soft); color: var(--violet); border-radius: 7px; font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 500; letter-spacing: .08em; }
.card-meta time { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; }
.news-card h3 { margin: 23px 0 12px; font-size: 22px; line-height: 1.18; letter-spacing: -.025em; }
.news-card > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.news-card > a { margin-top: auto; padding-top: 22px; color: var(--green); font-size: 12px; font-weight: 800; text-decoration: none; }
.news-card > a:hover { text-decoration: underline; }
.takeaway { margin: 20px 0 0; padding: 15px; background: #f0eee8; border-radius: 12px; }
.takeaway strong { display: block; margin-bottom: 5px; color: var(--copper); font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.takeaway p { margin: 0; font-size: 12px; line-height: 1.55; }
[data-accent="blue"] .tag { color: var(--blue); background: var(--blue-soft); }
[data-accent="blue"] .kicker { color: var(--blue); }
[data-accent="green"] .tag { color: var(--green); background: var(--green-soft); }
[data-accent="green"] .kicker { color: var(--green); }
.three-tight .news-card { min-height: 310px; }
.field-note { margin-top: 18px; padding: 22px 24px; display: flex; gap: 16px; align-items: flex-start; background: var(--green-soft); border: 1px solid #c4d8c4; border-radius: var(--radius); }
.field-note > span { font-size: 25px; }
.field-note strong { font-size: 13px; }
.field-note p { margin: 5px 0 0; color: #31523d; font-size: 13px; line-height: 1.6; }

.tool-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 8vw, 120px); align-items: start; padding-block: clamp(48px, 5vw, 76px); background: #ece5d7; border-top: 1px solid var(--line); }
.tool-intro { position: sticky; top: 120px; }
.tool-intro > p:not(.kicker) { max-width: 520px; color: var(--muted); line-height: 1.8; }
.tool-promise { margin-top: 28px; display: flex; gap: 10px; align-items: center; color: var(--green); font-size: 12px; font-weight: 700; }
.tool-promise span { width: 24px; height: 24px; display: grid; place-items: center; background: var(--green-soft); border-radius: 50%; }
.tool-panel { padding: clamp(24px, 4vw, 42px); background: var(--paper); border: 1px solid var(--line); border-radius: 24px 24px 24px 8px; box-shadow: var(--shadow); }
.tool-panel form, .comment-form { display: grid; gap: 20px; }
label { display: grid; gap: 8px; color: var(--ink); font-size: 12px; font-weight: 800; }
[hidden] { display: none !important; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); padding: 13px 14px; font-size: 13px; outline: none; }
textarea { resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(33,84,58,.1); }
.action-output { margin-top: 22px; padding: 22px; background: var(--green-soft); border: 1px solid #c4d8c4; border-radius: 14px; }
.action-output h3 { margin: 0 0 5px; font-size: 21px; }
.action-output > p { margin: 0 0 18px; color: #31523d; font-size: 12px; }
.action-output ol { margin: 0; padding-left: 22px; display: grid; gap: 11px; }
.action-output li { padding-left: 5px; font-size: 13px; line-height: 1.5; }
.output-actions { margin-top: 18px; display: flex; gap: 8px; }
.output-actions button { border: 1px solid #a9c2ad; border-radius: 9px; background: #fff; padding: 8px 11px; color: var(--green); cursor: pointer; font-size: 11px; font-weight: 800; }

.discussion-section { border-top: 1px solid var(--line); }
.section-heading.compact { margin-bottom: 32px; }
.discussion-layout { display: grid; grid-template-columns: .78fr 1.22fr; gap: 18px; align-items: start; }
.comment-form, .comment-feed { padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.identity-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.identity-choice { display: flex; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; }
.identity-choice:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.identity-choice input { width: auto; margin: 0; accent-color: var(--green); }
.honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.comment-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comment-submit-row small { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; }
.form-status { min-height: 18px; margin: -8px 0 0; color: var(--muted); font-size: 11px; }
.form-status.error { color: #a33a2e; }
.form-status.success { color: var(--green); }
.comment-feed-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.comment-feed-head > div { display: grid; gap: 3px; }
.comment-feed-head strong { font-size: 14px; }
.comment-feed-head small { color: var(--muted); font-size: 10px; }
.comment-feed-head button { border: 0; background: transparent; color: var(--green); cursor: pointer; font-size: 11px; font-weight: 800; }
.comments-list { min-height: 180px; max-height: 540px; overflow: auto; }
.comment { padding: 18px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comment-author { display: flex; gap: 9px; align-items: center; }
.comment-author span { width: 30px; height: 30px; display: grid; place-items: center; background: var(--rose-soft); color: var(--rose); border-radius: 9px 9px 9px 3px; font-size: 10px; font-weight: 800; }
.comment-author strong { font-size: 12px; }
.comment time { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; }
.comment p { margin: 10px 0 0 39px; color: #3e483f; font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-comments { min-height: 180px; display: grid; place-items: center; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.7; }

footer { padding: 34px clamp(24px, 5vw, 76px); display: flex; justify-content: space-between; gap: 30px; background: #173d2c; color: #f8f4ea; }
footer div { display: grid; gap: 5px; }
footer strong { font-size: 13px; }
footer span, footer p { margin: 0; color: #b8c7bc; font-size: 10px; line-height: 1.6; }

:focus-visible { outline: 3px solid #df9d62; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .briefing-card { max-width: 720px; }
  .news-grid, .three-tight { grid-template-columns: 1fr 1fr; }
  .news-card.featured { grid-column: 1 / -1; }
  .tool-section, .discussion-layout { grid-template-columns: 1fr; }
  .tool-intro { position: static; }
}

@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); width: min(88vw, 310px); box-shadow: 20px 0 60px rgba(0,0,0,.25); }
  body.mobile-nav-open .sidebar { transform: translateX(0); }
  body.nav-collapsed .sidebar { width: min(88vw, 310px); }
  body.nav-collapsed .brand-copy, body.nav-collapsed .nav-label, body.nav-collapsed .nav-dot, body.nav-collapsed .sidebar-note div { opacity: 1; width: auto; pointer-events: auto; }
  body.nav-collapsed .nav-item { grid-template-columns: 28px 1fr 8px; padding: 0 13px; place-items: initial; }
  body.nav-collapsed .collapse-button { position: static; color: inherit; background: transparent; border-color: rgba(255,255,255,.14); transform: none; }
  .main-content, body.nav-collapsed .main-content { margin-left: 0; }
  .topbar { padding-inline: 18px; }
  .mobile-menu { display: block; }
  .eyebrow { display: none; }
  .hero { padding-top: 54px; }
  h1 { font-size: clamp(48px, 15vw, 72px); }
  .signal-strip { grid-template-columns: 1fr 1fr; }
  .signal-strip div:nth-child(2) { border-right: 0; }
  .signal-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section-heading { grid-template-columns: 1fr; gap: 18px; }
  .section-emoji { position: static; margin-bottom: 12px; }
  .news-grid, .news-grid.two-column, .three-tight { grid-template-columns: 1fr; }
  .news-card.featured { grid-column: auto; }
  .identity-row { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}

@media print {
  .sidebar, .topbar, .hero-actions, .tool-section, .comment-form, .comment-feed-head button { display: none !important; }
  .main-content { margin: 0 !important; }
  .section { padding: 36px; break-inside: avoid; }
  .hero { min-height: auto; }
  .news-card { break-inside: avoid; min-height: 0; }
  body { background: white; }
}
