:root {
  --ink: #111b22;
  --muted: #5c6972;
  --paper: #f7f8f6;
  --surface: #ffffff;
  --surface-2: #eef2ef;
  --line: #dce2de;
  --brand: #0b6e4f;
  --brand-dark: #084c38;
  --accent: #ef8354;
  --blue: #2f6fed;
  --yellow: #f2c14e;
  --max: 1180px;
  --shadow: 0 12px 32px rgba(17, 27, 34, 0.08);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }

.container { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.narrow { width: min(760px, calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 200; top: 8px; left: 8px; padding: 10px 14px; transform: translateY(-160%); background: var(--ink); color: #fff; }
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(220, 226, 222, 0.9);
  background: rgba(247, 248, 246, 0.96);
  backdrop-filter: blur(12px);
}

.nav-wrap { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 850; font-size: 20px; line-height: 1; }
.brand-mark { display: grid; width: 30px; height: 30px; grid-template-columns: 1fr 1fr; gap: 3px; transform: rotate(4deg); }
.brand-mark i { display: block; background: var(--brand); }
.brand-mark i:nth-child(2) { background: var(--accent); }
.brand-mark i:nth-child(3) { background: var(--yellow); }
.brand-mark i:nth-child(4) { background: var(--blue); }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { padding: 10px 12px; border-radius: 6px; color: #35434b; font-size: 14px; font-weight: 700; }
.main-nav a:hover, .main-nav a:focus-visible, .main-nav a.active { background: var(--surface-2); color: var(--brand-dark); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--surface); }
.menu-toggle { display: none; }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 10px 17px; border: 1px solid transparent; border-radius: 6px; background: var(--brand); color: #fff; font-weight: 780; cursor: pointer; }
.button:hover { background: var(--brand-dark); }
.button.secondary { border-color: var(--line); background: var(--surface); color: var(--ink); }
.button.secondary:hover { border-color: #bfc8c2; background: var(--surface-2); }
.button.dark { background: var(--ink); }
.button.small { min-height: 36px; padding: 7px 12px; font-size: 13px; }
.button svg, .icon-btn svg { width: 18px; height: 18px; }

.ticker { border-bottom: 1px solid var(--line); background: var(--surface); }
.ticker-inner { display: flex; min-height: 39px; align-items: center; gap: 18px; overflow: hidden; white-space: nowrap; font-size: 13px; }
.ticker-label { padding-right: 16px; border-right: 1px solid var(--line); color: var(--brand); font-weight: 850; text-transform: uppercase; }
.ticker a { color: var(--muted); }
.ticker a:hover { color: var(--ink); }

.hero { padding: 42px 0 34px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.75fr); gap: 32px; align-items: end; }
.hero-kicker, .eyebrow { margin: 0 0 12px; color: var(--brand); font-size: 12px; font-weight: 850; letter-spacing: 1.2px; text-transform: uppercase; }
.hero h1 { max-width: 790px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 6vw, 76px); font-weight: 600; line-height: 0.98; letter-spacing: 0; }
.hero-summary { margin: 18px 0 0; max-width: 700px; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-note { padding: 21px 0 4px 24px; border-left: 3px solid var(--accent); }
.hero-note strong { display: block; margin-bottom: 5px; font-family: Georgia, serif; font-size: 21px; }
.hero-note p { margin: 0; color: var(--muted); font-size: 14px; }

.lead-story { position: relative; display: block; height: 470px; overflow: hidden; isolation: isolate; background: #10181d; }
.lead-story > img { width: 100%; height: 100%; object-fit: cover; opacity: 0.69; }
.lead-story::after { position: absolute; inset: 35% 0 0; content: ""; background: linear-gradient(180deg, transparent, rgba(9, 15, 18, 0.95)); }
.lead-copy { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; max-width: 800px; padding: 36px; color: #fff; }
.lead-copy .tag { background: var(--yellow); color: var(--ink); }
.lead-copy h2 { margin: 13px 0 9px; font-family: Georgia, serif; font-size: clamp(29px, 4vw, 46px); line-height: 1.06; letter-spacing: 0; }
.lead-copy p { max-width: 680px; margin: 0; color: #dce4e0; }

.section { padding: 66px 0; }
.section.compact { padding: 44px 0; }
.section.alt { background: var(--surface-2); }
.section.dark { background: var(--ink); color: #fff; }
.section-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.section.dark .section-header { border-color: #3b474e; }
.section-title { margin: 0; font-family: Georgia, serif; font-size: clamp(28px, 4vw, 40px); font-weight: 600; line-height: 1.1; letter-spacing: 0; }
.section-subtitle { max-width: 520px; margin: 6px 0 0; color: var(--muted); }
.section.dark .section-subtitle { color: #b9c2c6; }
.text-link { display: inline-flex; align-items: center; gap: 5px; color: var(--brand); font-size: 14px; font-weight: 800; white-space: nowrap; }
.section.dark .text-link { color: #75d9b6; }
.text-link:hover { gap: 9px; }

.news-grid { display: grid; grid-template-columns: 1.15fr 0.85fr 0.85fr; gap: 22px; }
.story-card { min-width: 0; }
.story-card .story-image { overflow: hidden; aspect-ratio: 16 / 10; margin-bottom: 17px; background: #dce2de; }
.story-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 280ms ease; }
.story-card:hover img { transform: scale(1.025); }
.story-card h3 { margin: 8px 0 7px; font-family: Georgia, serif; font-size: 24px; line-height: 1.2; letter-spacing: 0; }
.story-card.feature h3 { font-size: 30px; }
.story-card p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.story-meta { display: flex; flex-wrap: wrap; gap: 8px; color: #718089; font-size: 12px; }
.tag { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border-radius: 4px; background: #dceee7; color: var(--brand-dark); font-size: 11px; font-weight: 850; letter-spacing: 0.5px; text-transform: uppercase; }
.tag.orange { background: #fce4d8; color: #a23f16; }
.tag.blue { background: #e1e9fb; color: #234f9f; }
.tag.yellow { background: #fff1bf; color: #745600; }

.quick-list { border-top: 3px solid var(--ink); }
.quick-item { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.quick-item .num { color: var(--accent); font-family: Georgia, serif; font-size: 26px; }
.quick-item h3 { margin: 0 0 4px; font-size: 16px; line-height: 1.35; }
.quick-item p { margin: 0; color: var(--muted); font-size: 13px; }

.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tool-card { display: flex; min-width: 0; flex-direction: column; min-height: 235px; padding: 20px; border: 1px solid var(--line); border-top: 4px solid var(--tool-color, var(--brand)); background: var(--surface); }
.tool-icon { display: grid; width: 42px; height: 42px; place-items: center; margin-bottom: 30px; border-radius: 6px; background: var(--surface-2); color: var(--tool-color, var(--brand)); }
.tool-icon svg { width: 21px; height: 21px; }
.tool-card h3 { margin: 0 0 6px; font-size: 17px; }
.tool-card p { margin: 0; color: var(--muted); font-size: 13px; }
.tool-card .tool-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.guide-band { display: grid; grid-template-columns: 0.85fr 1.15fr; min-height: 390px; background: #d9e7e1; }
.guide-band img { width: 100%; height: 100%; object-fit: cover; }
.guide-content { display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 6vw, 70px); }
.guide-content h2 { max-width: 600px; margin: 0 0 14px; font-family: Georgia, serif; font-size: clamp(32px, 5vw, 53px); line-height: 1.03; letter-spacing: 0; }
.guide-content p { max-width: 600px; color: #41514a; }

.community-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.thread-list { background: #17232a; border-top: 4px solid var(--accent); }
.thread { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 18px 20px; border-bottom: 1px solid #344047; }
.avatar { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: #e7f4ef; color: var(--brand-dark); font-size: 13px; font-weight: 850; }
.thread h3 { margin: 0 0 3px; font-size: 15px; line-height: 1.3; }
.thread p { margin: 0; color: #9eaaaf; font-size: 12px; }
.reply-count { color: #9eaaaf; font-size: 12px; text-align: right; }
.principles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.principle { padding: 20px; border: 1px solid #36434a; background: #17232a; }
.principle svg { width: 22px; color: #75d9b6; }
.principle h3 { margin: 16px 0 5px; font-size: 16px; }
.principle p { margin: 0; color: #aeb8bc; font-size: 13px; }

.newsletter { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 45px; border-top: 5px solid var(--yellow); background: var(--surface); box-shadow: var(--shadow); }
.newsletter h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(28px, 4vw, 41px); line-height: 1.1; }
.newsletter p { margin: 9px 0 0; color: var(--muted); }
.form-row { display: flex; gap: 8px; }
.input { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid #bfc9c3; border-radius: 5px; background: #fff; color: var(--ink); }
.input:focus { outline: 3px solid rgba(47, 111, 237, 0.18); border-color: var(--blue); }
.form-note, .form-message { margin-top: 8px; color: var(--muted); font-size: 11px; }
.form-message.success { color: var(--brand); font-weight: 700; }

.ad-slot { display: grid; min-height: 100px; place-items: center; border: 1px dashed #bec7c1; background: #f0f2ef; color: #8a9690; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
.ad-slot.leaderboard { min-height: 110px; margin: 20px auto; }
.ad-slot.article-ad { min-height: 250px; }

.page-hero { padding: 58px 0 40px; border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 850px; margin: 0; font-family: Georgia, serif; font-size: clamp(42px, 7vw, 68px); font-weight: 600; line-height: 1; letter-spacing: 0; }
.page-hero p { max-width: 660px; margin: 18px 0 0; color: var(--muted); font-size: 18px; }
.filter-bar { display: flex; gap: 8px; overflow-x: auto; padding: 20px 0; scrollbar-width: none; }
.filter-btn { min-height: 38px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 750; white-space: nowrap; cursor: pointer; }
.filter-btn.active, .filter-btn:hover { border-color: var(--ink); background: var(--ink); color: #fff; }

.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 22px; }
.archive-grid .story-card { border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.archive-grid .story-card h3 { font-size: 22px; }
.search-box { position: relative; width: min(360px, 100%); }
.search-box svg { position: absolute; top: 50%; left: 12px; width: 18px; transform: translateY(-50%); color: var(--muted); }
.search-box input { padding-left: 40px; }

.directory-layout { display: grid; grid-template-columns: 240px 1fr; gap: 36px; }
.sidebar { position: sticky; top: 98px; align-self: start; }
.sidebar h2 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; }
.category-list { display: grid; gap: 4px; }
.category-list button { display: flex; justify-content: space-between; padding: 9px 10px; border: 0; border-left: 3px solid transparent; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.category-list button:hover, .category-list button.active { border-left-color: var(--brand); background: var(--surface-2); color: var(--ink); }
.directory-tools { grid-template-columns: repeat(3, 1fr); }
.disclosure { padding: 14px 16px; border-left: 3px solid var(--yellow); background: #fff8dd; color: #64551d; font-size: 13px; }

.article-hero { padding: 60px 0 30px; }
.article-hero h1 { max-width: 990px; margin: 12px 0 18px; font-family: Georgia, serif; font-size: clamp(39px, 7vw, 70px); font-weight: 600; line-height: 1.02; letter-spacing: 0; }
.article-dek { max-width: 780px; margin: 0 0 22px; color: var(--muted); font-size: 20px; }
.byline { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: var(--muted); font-size: 13px; }
.byline strong { color: var(--ink); }
.article-cover { width: min(1240px, calc(100% - 40px)); height: min(62vw, 620px); margin: 15px auto 0; object-fit: cover; }
.article-caption { width: min(1240px, calc(100% - 40px)); margin: 7px auto 0; color: #76827b; font-size: 11px; }
.article-layout { display: grid; grid-template-columns: 160px minmax(0, 720px) 260px; gap: 34px; justify-content: center; padding: 54px 0; }
.share-tools { position: sticky; top: 105px; align-self: start; }
.share-tools p { margin: 0 0 10px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.share-list { display: flex; gap: 7px; }
.article-body { min-width: 0; font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.78; }
.article-body > p:first-of-type::first-letter { float: left; margin: 8px 9px 0 0; color: var(--brand); font-size: 69px; line-height: 0.7; }
.article-body h2 { margin: 46px 0 13px; font-size: 32px; line-height: 1.2; letter-spacing: 0; }
.article-body h3 { margin: 32px 0 10px; font-size: 23px; letter-spacing: 0; }
.article-body blockquote { margin: 35px 0; padding: 6px 0 6px 25px; border-left: 4px solid var(--accent); color: #33433b; font-size: 24px; line-height: 1.45; }
.article-body ul, .article-body ol { padding-left: 24px; }
.article-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.key-box { margin: 34px 0; padding: 22px; border-top: 4px solid var(--brand); background: var(--surface-2); font-family: Inter, sans-serif; font-size: 15px; }
.key-box h3 { margin: 0 0 9px; }
.article-aside { align-self: start; }
.article-aside .aside-box { margin-bottom: 18px; padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.aside-box h3 { margin: 0 0 8px; font-size: 14px; }
.aside-box p { margin: 0; color: var(--muted); font-size: 12px; }

.content-page { padding: 60px 0 80px; }
.content-page h1 { margin: 0 0 12px; font-family: Georgia, serif; font-size: clamp(39px, 6vw, 58px); letter-spacing: 0; }
.content-page h2 { margin: 42px 0 10px; font-family: Georgia, serif; font-size: 28px; letter-spacing: 0; }
.content-page h3 { margin-top: 28px; }
.content-page p, .content-page li { color: #45535b; }
.content-page .updated { margin-bottom: 34px; color: var(--muted); font-size: 13px; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 38px 0; }
.value-item { padding: 22px; border-top: 4px solid var(--accent); background: var(--surface); }
.value-item h3 { margin: 0 0 8px; }
.value-item p { margin: 0; font-size: 14px; }
.contact-form { display: grid; gap: 14px; margin-top: 26px; }
.contact-form label { font-size: 13px; font-weight: 750; }
.contact-form textarea { min-height: 150px; resize: vertical; }

.site-footer { padding: 58px 0 24px; border-top: 1px solid #3b474e; background: var(--ink); color: #eaf0ed; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 0.7fr); gap: 40px; }
.footer-brand p { max-width: 360px; color: #aeb9bd; font-size: 13px; }
.footer-col h2 { margin: 0 0 12px; color: #fff; font-size: 12px; letter-spacing: 0.8px; text-transform: uppercase; }
.footer-col a { display: block; padding: 4px 0; color: #afbabf; font-size: 13px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 44px; padding-top: 18px; border-top: 1px solid #344148; color: #89969c; font-size: 11px; }

.empty-state { display: none; grid-column: 1 / -1; padding: 40px; border: 1px solid var(--line); text-align: center; }
.hidden { display: none !important; }
.reveal { opacity: 1; transform: none; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .main-nav { position: fixed; inset: 73px 0 auto; display: none; padding: 18px 20px 24px; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
  .main-nav.open { display: grid; }
  .main-nav a { padding: 13px 10px; font-size: 16px; }
  .menu-toggle { display: inline-grid; }
  .nav-actions .button { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-note { max-width: 600px; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .news-grid .feature { grid-column: 1 / -1; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: minmax(0, 720px) 230px; }
  .share-tools { display: none; }
  .directory-tools { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .container, .narrow { width: min(100% - 28px, var(--max)); }
  .nav-wrap { min-height: 64px; }
  .main-nav { top: 65px; }
  .brand small { display: none; }
  .ticker-inner { gap: 12px; }
  .hero { padding-top: 30px; }
  .hero h1 { font-size: 46px; }
  .lead-story { height: 500px; }
  .lead-copy { padding: 23px; }
  .lead-copy h2 { font-size: 32px; }
  .section { padding: 48px 0; }
  .section-header { align-items: start; flex-direction: column; }
  .news-grid, .community-grid { grid-template-columns: 1fr; }
  .news-grid .feature { grid-column: auto; }
  .story-card.feature h3 { font-size: 25px; }
  .tools-grid, .directory-tools { grid-template-columns: 1fr 1fr; }
  .guide-band { grid-template-columns: 1fr; }
  .guide-band img { height: 300px; }
  .newsletter { grid-template-columns: 1fr; padding: 28px 22px; }
  .form-row { flex-direction: column; }
  .archive-grid { grid-template-columns: 1fr 1fr; }
  .directory-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .category-list { display: flex; overflow-x: auto; }
  .category-list button { flex: 0 0 auto; border-left: 0; border-bottom: 3px solid transparent; }
  .category-list button.active { border-bottom-color: var(--brand); }
  .article-cover { width: 100%; height: 58vw; }
  .article-caption { width: calc(100% - 28px); }
  .article-layout { grid-template-columns: 1fr; padding-top: 38px; }
  .article-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .values-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 500px) {
  .hero h1 { font-size: 40px; }
  .hero-summary { font-size: 16px; }
  .lead-story { height: 470px; }
  .tools-grid, .directory-tools, .archive-grid, .principles, .article-aside { grid-template-columns: 1fr; }
  .tool-card { min-height: 210px; }
  .guide-band img { height: 245px; }
  .thread { grid-template-columns: 38px 1fr; }
  .reply-count { display: none; }
  .article-body { font-size: 18px; }
  .page-hero { padding-top: 42px; }
  .page-hero h1 { font-size: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
