:root {
  color-scheme: light;
  --forest-950: #0e1b15;
  --forest-900: #14241c;
  --forest-800: #1d3026;
  --moss-700: #4f765a;
  --moss-600: #6ea67e;
  --moss-300: #b7c9a5;
  --brass-500: #d5a45a;
  --brass-300: #e6c58a;
  --rust-500: #b36f45;
  --paper-50: #fff8ea;
  --paper-100: #f7ecd5;
  --paper-200: #f1e5d0;
  --paper-300: #dfd0ad;
  --ink-900: #1d211b;
  --ink-700: #343b31;
  --ink-500: #566052;
  --line: rgba(29, 33, 27, 0.28);
  --line-strong: rgba(29, 33, 27, 0.84);
  --shadow-hard: 8px 8px 0 rgba(29, 33, 27, 0.84);
  --shadow-soft: 0 30px 90px rgba(0, 0, 0, 0.22);
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink-900);
  background:
    radial-gradient(circle at 18% 4%, rgba(213, 164, 90, 0.22), transparent 28rem),
    linear-gradient(180deg, var(--forest-950) 0, var(--forest-900) 34rem, var(--moss-700) 54rem, var(--paper-200) 72rem, var(--paper-200) 100%);
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 248, 234, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 248, 234, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mix-blend-mode: screen;
  opacity: 0.55;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover { color: var(--moss-700); }

img, svg { display: block; max-width: 100%; }

::selection {
  background: var(--brass-300);
  color: var(--ink-900);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 30;
  transform: translateY(-140%);
  background: var(--paper-50);
  color: var(--ink-900);
  border: 2px solid var(--ink-900);
  padding: 10px 14px;
}

.skip-link:focus { transform: translateY(0); }

.wrap {
  width: min(var(--max), calc(100% - 38px));
  margin-inline: auto;
}

.site-header {
  padding: 22px 0 10px;
  color: var(--paper-200);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  color: var(--paper-200);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(18px, 2.4vw, 25px);
  letter-spacing: 0;
  text-decoration: none;
}

.brand:hover { color: var(--paper-50); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(241, 229, 208, 0.24);
  background: rgba(255, 248, 234, 0.08);
}

.brand-mark img { width: 35px; height: 35px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid transparent;
  color: rgba(241, 229, 208, 0.82);
  text-decoration: none;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.04em;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] {
  border-color: rgba(241, 229, 208, 0.22);
  background: rgba(255, 248, 234, 0.08);
  color: var(--paper-50);
  outline: none;
}

.hero {
  color: var(--paper-200);
  padding: 54px 0 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.78fr);
  gap: 40px;
  align-items: center;
}

.page-hero {
  color: var(--paper-200);
  padding: 56px 0 34px;
}

.page-hero h1 {
  max-width: 980px;
  margin: 0;
}

.kicker {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--brass-300);
  font-size: 13px;
  font-weight: 860;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 42px;
  height: 2px;
  background: var(--brass-500);
}

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; }

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(58px, 10vw, 116px);
  line-height: 0.88;
  letter-spacing: 0;
  text-wrap: balance;
}

.lead {
  max-width: 720px;
  margin: 26px 0 0;
  color: #d7decf;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.48;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(241, 229, 208, 0.34);
  background: rgba(255, 248, 234, 0.08);
  color: var(--paper-50);
  font-weight: 820;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 248, 234, 0.14);
  color: var(--paper-50);
  outline: 2px solid rgba(213, 164, 90, 0.36);
  outline-offset: 2px;
}

.btn.paper {
  background: var(--paper-50);
  color: var(--ink-900);
  border-color: var(--paper-50);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.28);
}

.terminal-card {
  border: 1px solid rgba(241, 229, 208, 0.26);
  background: rgba(21, 36, 29, 0.50);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.terminal {
  background: #101c16;
  border: 1px solid rgba(241, 229, 208, 0.18);
  color: #d7ecd9;
  font: 13px/1.58 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.termbar {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid rgba(241, 229, 208, 0.15);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rust-500);
}

.dot:nth-child(2) { background: var(--brass-500); }
.dot:nth-child(3) { background: var(--moss-600); }

pre {
  margin: 0;
  padding: 20px;
  overflow: auto;
  white-space: pre-wrap;
}

.cmd { color: var(--brass-300); }
.ok { color: #98d9a7; }
.warn { color: #f1c47a; }
.dim { color: #8fa294; }

.bridge {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
  color: var(--paper-200);
}

.bridge-card {
  border: 1px solid rgba(241, 229, 208, 0.22);
  background: rgba(255, 248, 234, 0.10);
  backdrop-filter: blur(8px);
  padding: 15px;
}

.bridge-card strong {
  display: block;
  margin-bottom: 4px;
}

.bridge-card span {
  color: #d3dbce;
  font-size: 13px;
  line-height: 1.45;
}

.paper-shell {
  margin-top: 42px;
  background: rgba(255, 248, 234, 0.80);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-hard);
  backdrop-filter: blur(3px);
}

.mast {
  padding: 24px;
  border-bottom: 4px double var(--ink-900);
  display: grid;
  grid-template-columns: 156px 1fr 156px;
  gap: 20px;
  align-items: center;
}

.mast.plain {
  grid-template-columns: 1fr;
}

.stamp {
  border: 1px solid var(--ink-900);
  padding: 12px;
  text-align: center;
  font: 900 11px/1.35 ui-sans-serif, system-ui;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moss-700);
}

.mast h2 {
  margin: 0;
  text-align: center;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mast p {
  text-align: center;
  color: #4c5248;
  margin: 9px auto 0;
  max-width: 720px;
  line-height: 1.5;
}

.ledger-content,
.policy-body {
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.policy-body {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.55fr);
}

.article {
  border-right: 1px solid var(--line);
  padding-right: 28px;
}

.article h2,
.section-head h2,
.body-copy h2 {
  font-size: clamp(38px, 5.5vw, 68px);
  line-height: 0.94;
  letter-spacing: 0;
  margin: 8px 0 16px;
  text-wrap: balance;
}

.article p,
.body-copy p {
  color: #454d42;
  font-size: 18px;
  line-height: 1.6;
}

.columns {
  columns: 2 260px;
  column-gap: 30px;
}

.columns p {
  break-inside: avoid;
  margin-top: 0;
}

.single-copy {
  max-width: 760px;
}

.single-copy p {
  margin: 0 0 18px;
}

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

.fit-heading {
  font-size: clamp(34px, 4.4vw, 54px) !important;
}

.side-stack {
  display: grid;
  gap: 16px;
  align-content: start;
}

.box,
.mini-ledger {
  border: 1px solid var(--ink-900);
  background: var(--paper-50);
}

.box { padding: 17px; }

.box h3,
.mini-ledger h3 {
  margin: 0 0 10px;
  font-size: 25px;
  line-height: 1;
}

.mini-ledger h3 {
  padding: 17px;
  border-bottom: 1px solid var(--ink-900);
  font-size: 28px;
}

.box p {
  margin: 0;
  color: #4b5549;
  line-height: 1.5;
}

.row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 13px 0;
}

.mini-ledger .row { margin: 0 17px; }
.row:first-of-type { border-top: 0; }

.code,
.label {
  font: 800 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--rust-500);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.row strong { display: block; }

.row span {
  display: block;
  color: var(--ink-500);
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.4;
}

.section {
  padding: 78px 0 0;
}

.page-section {
  padding: 26px 0 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 26px;
  border-bottom: 2px solid rgba(29, 33, 27, 0.8);
  margin-bottom: 22px;
  padding-bottom: 12px;
}

.section-head h2 { margin: 0; }

.section-head p {
  max-width: 500px;
  color: var(--ink-500);
  margin: 0;
  line-height: 1.5;
}

.tools,
.policy-grid,
.contact-grid {
  display: grid;
  border: 1px solid var(--ink-900);
  background: rgba(255, 248, 234, 0.80);
  box-shadow: var(--shadow-hard);
}

.tools { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.policy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.contact-grid { grid-template-columns: 1.1fr 0.9fr; }
.contact-grid.in-shell {
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  box-shadow: none;
  background: transparent;
}

.contact-grid.in-shell .contact-card {
  background: var(--paper-50);
}

.tool,
.policy-card,
.contact-card {
  padding: 20px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 240px;
}

.tool { min-height: 280px; }

.tool:last-child,
.policy-card:last-child,
.contact-card:last-child { border-right: 0; }

.tool h3,
.policy-card h3,
.contact-card h3 {
  font-size: 28px;
  line-height: 0.95;
  margin: 0;
}

.policy-card h3,
.contact-card h3 { font-size: 32px; }

.tool p,
.policy-card p,
.contact-card p {
  margin: 0;
  color: #4b5549;
  font-size: 15px;
  line-height: 1.52;
}

.tool a,
.policy-card a,
.contact-card a {
  margin-top: auto;
  font-weight: 850;
  color: var(--ink-900);
}

.tool:hover,
.policy-card:hover,
.contact-card:hover {
  background: rgba(255, 248, 234, 0.96);
}

.note-list {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.note-list li {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: #454d42;
  line-height: 1.55;
}

.note-list strong {
  display: block;
  color: var(--ink-900);
  margin-bottom: 3px;
}

.mail-route {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.mail-route:first-child { border-top: 0; }

.mail-route code {
  color: var(--rust-500);
  font: 800 13px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.mail-route p {
  margin: 4px 0 0;
  color: #4b5549;
  line-height: 1.48;
}

.dark-strip {
  margin-top: 78px;
  color: var(--paper-200);
  background: var(--forest-900);
  border: 1px solid rgba(241, 229, 208, 0.28);
  box-shadow: var(--shadow-soft);
  padding: clamp(24px, 5vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 30px;
  align-items: center;
}

.dark-strip h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 0.92;
  letter-spacing: 0;
}

.dark-strip p {
  color: #d3dbce;
  line-height: 1.55;
  max-width: 690px;
}

.dark-strip .terminal-card {
  box-shadow: none;
  padding: 12px;
}

.site-footer {
  border-top: 1px solid rgba(29, 33, 27, 0.22);
  margin-top: 42px;
  padding: 28px 0 46px;
  color: #566052;
  font-size: 14px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-grid a { font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 1100px) {
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .policy-grid { grid-template-columns: 1fr; }
  .tool,
  .policy-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .tool:last-child,
  .policy-card:last-child { border-bottom: 0; }
  .tool:nth-child(odd) { border-right: 1px solid var(--line); }
}

@media (max-width: 880px) {
  .nav { align-items: flex-start; }
  .nav-links { display: none; }
  .hero-grid,
  .ledger-content,
  .policy-body,
  .contact-grid,
  .dark-strip {
    grid-template-columns: 1fr;
  }
  .article {
    border-right: 0;
    padding-right: 0;
  }
  .mast { grid-template-columns: 1fr; }
  .stamp { display: none; }
  .bridge { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .section-head p { margin-top: 10px; }
  .contact-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .contact-card:last-child { border-bottom: 0; }
  .mail-route { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .wrap { width: min(var(--max), calc(100% - 26px)); }
  .hero { padding-top: 34px; }
  h1 { font-size: clamp(52px, 17vw, 82px); }
  .paper-shell,
  .tools,
  .policy-grid,
  .contact-grid {
    box-shadow: 5px 5px 0 rgba(29, 33, 27, 0.84);
  }
  .ledger-content,
  .mast,
  .policy-body { padding: 20px; }
  .columns { columns: 1; }
  .tools { grid-template-columns: 1fr; }
  .tool,
  .tool:nth-child(odd) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .tool:last-child { border-bottom: 0; }
  .row { grid-template-columns: 1fr; }
  .section,
  .page-section,
  .dark-strip { margin-top: 58px; }
  .section { padding-top: 58px; }
}
