/* ==========================================================================
   DefensiveAI — design system
   Near-black base, warm off-white text, one muted phosphor-green accent.
   No gradients. No imagery. Strict grid. One reveal on the homepage hero.

   NOTE: after editing this file, bump the ?v= cache-buster on `cssUrl` in
   website.yaml. It is hand-maintained; nothing bumps it automatically.
   ========================================================================== */

/* ----------------------------------------------------------------- font --
   Inter, self-hosted so rendering is identical on every visitor's OS rather
   than falling back to whatever grotesk that machine happens to have.
   Variable (roman + italic), SIL Open Font License 1.1 — the license ships
   alongside the files at /assets/fonts/OFL.txt. The system stack below is
   kept as a fallback for the window before the font loads and for clients
   that refuse woff2.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "InterVariable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/InterVariable.woff2") format("woff2");
}

@font-face {
  font-family: "InterVariable";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/InterVariable-Italic.woff2") format("woff2");
}

:root {
  /* Base */
  --bg:        #0a0c0b;
  --bg-2:      #0e1211;
  --bg-3:      #121816;
  --line:      #1c2321;
  --line-2:    #29332f;

  /* Text */
  --text:      #e9e6df;
  --text-2:    #a6ada7;
  --text-3:    #767d77;

  /* Accent — muted phosphor green. The only hue on the site. */
  --accent:    #7fd1a4;
  --accent-2:  #a9e6c4;
  --accent-dim:#3c6a51;
  --accent-wash: rgba(127, 209, 164, 0.07);

  /* Type */
  --sans: "InterVariable", "Inter", ui-sans-serif, system-ui, -apple-system,
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  /* Grid */
  --wrap:      1120px;
  --prose:     40rem;
  --gutter:    24px;
  --rule:      1px solid var(--line);
}

/* --------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }

hr {
  border: 0;
  border-top: var(--rule);
  margin: 3rem 0;
}

::selection { background: var(--accent-dim); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------------------------------------------------------------- type -- */

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.08;
  margin: 0;
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 1.5rem + 2.5vw, 3.45rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.15vw, 2.05rem); }
h3 { font-size: 1.22rem; letter-spacing: -0.018em; line-height: 1.25; }
h4 { font-size: 1rem; letter-spacing: -0.01em; }

p { margin: 0 0 1.15em; }

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  border-bottom: 1px solid var(--accent-dim);
  transition: color .12s linear, border-color .12s linear;
}
a:hover { color: var(--accent-2); border-bottom-color: var(--accent); }

strong { font-weight: 650; color: var(--text); }
em { font-style: italic; }

small { font-size: .82rem; }

code, kbd, samp, pre {
  font-family: var(--mono);
  font-size: .87em;
  font-variant-ligatures: none;
}

code {
  background: var(--bg-3);
  border: var(--rule);
  border-radius: 2px;
  padding: 0.1em 0.36em;
  color: var(--accent-2);
}

pre {
  background: var(--bg-2);
  border: var(--rule);
  border-left: 2px solid var(--accent-dim);
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  line-height: 1.55;
  color: var(--text-2);
  margin: 1.6rem 0;
}
pre code { background: none; border: 0; padding: 0; color: inherit; }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
  display: block;
}

.lede {
  font-size: clamp(1.08rem, 1rem + 0.42vw, 1.3rem);
  line-height: 1.55;
  color: var(--text-2);
  letter-spacing: -0.008em;
  max-width: 44rem;
}

.more { margin-top: 1.75rem; }
.mt-lg { margin-top: 2.5rem; }
.measure { max-width: 44rem; }
.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;
}
.muted { color: var(--text-2); }
.dim   { color: var(--text-3); }

/* -------------------------------------------------------------- layout -- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose { max-width: var(--prose); }
.prose h2 { margin-top: 3.2rem; margin-bottom: 1rem; }
.prose h3 { margin-top: 2.4rem; margin-bottom: .7rem; }
.prose > p:first-child { margin-top: 0; }
.prose ul, .prose ol { margin: 0 0 1.3em; padding-left: 1.15rem; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--accent-dim); }

.section {
  padding-block: clamp(3.5rem, 2rem + 5.5vw, 6.5rem);
  border-top: var(--rule);
}
.section--tight { padding-block: clamp(2.75rem, 2rem + 3vw, 4.25rem); }
.section--flush { border-top: 0; }

.section-head { margin-bottom: 2.75rem; max-width: 46rem; }
.section-head h2 { margin-bottom: 1rem; }
.section-head p:last-child { margin-bottom: 0; }

.grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: var(--rule);
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid > * { background: var(--bg); padding: 1.85rem 1.75rem; }

@media (max-width: 860px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: start;
}
.split--hero {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: center;
}
@media (max-width: 900px) { .split, .split--hero { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------- header -- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: var(--rule);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  border: 0;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.06rem;
  white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand .mark { width: 18px; height: 18px; color: var(--accent); flex: none; }
.brand b { font-weight: 800; }
.brand span { font-weight: 400; color: var(--text-2); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.45rem;
  margin-left: auto;
  font-size: .93rem;
}
.site-nav a {
  color: var(--text-2);
  border: 0;
  padding-block: .35rem;
  letter-spacing: -0.005em;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -1px 0 var(--accent); }

/* the CTA in the nav is a button first, a nav link second */
.site-nav .btn {
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: .52rem 1rem;
  margin-left: .35rem;
}
.site-nav .btn:hover { color: var(--accent-2); border-color: var(--accent); background: var(--accent-wash); }

@media (max-width: 900px) {
  .site-head .wrap { flex-wrap: wrap; min-height: 0; padding-block: .8rem; gap: .75rem; }
  .site-nav {
    width: 100%;
    margin-left: 0;
    gap: 1.1rem;
    flex-wrap: wrap;
    row-gap: .6rem;
    font-size: .88rem;
  }
  .site-nav .btn { margin-left: auto; margin-top: .1rem; }
}

/* ------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -0.008em;
  padding: .62rem 1.15rem;
  border: 1px solid var(--accent-dim);
  border-radius: 2px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s linear, border-color .12s linear, color .12s linear;
}
.btn:hover { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-2); }

.btn--solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #07110c;
}
.btn--solid:hover { background: var(--accent-2); border-color: var(--accent-2); color: #07110c; }

.btn--ghost { border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--text-3); background: var(--bg-2); color: var(--text); }

.btn--lg { font-size: 1rem; padding: .8rem 1.5rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

.arrow-link {
  display: inline-flex;
  align-items: baseline;
  gap: .45rem;
  font-weight: 550;
  border: 0;
  box-shadow: inset 0 -1px 0 var(--accent-dim);
}
.arrow-link:hover { box-shadow: inset 0 -1px 0 var(--accent); }
.arrow-link::after { content: "\2192"; font-family: var(--mono); }

/* ------------------------------------------------------------ download --
   The /tool download control is a native <details> disclosure styled as a
   solid button: it sits and reads like a real download, and the inline
   reveal needs no JavaScript. Until public builds exist, opening it is the
   whole behaviour.
   -------------------------------------------------------------------------- */

.download { margin: 2rem 0 .85rem; }

.download > summary {
  display: inline-flex;
  list-style: none;
}
.download > summary::-webkit-details-marker { display: none; }
.download > summary::marker { content: ""; }
.download > summary:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.download-reveal {
  margin: 1.15rem 0 0;
  padding: .85rem 1.1rem;
  max-width: 34rem;
  border-left: 2px solid var(--accent-dim);
  background: var(--accent-wash);
  color: var(--text-2);
}

.download-note {
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .01em;
  color: var(--text-3);
  margin: 0;
}

/* ---------------------------------------------------------------- hero -- */

.hero {
  border-bottom: var(--rule);
  padding-block: clamp(3.25rem, 2rem + 6vw, 6rem) clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
}
.hero h1 { margin-bottom: 1.5rem; max-width: 17ch; }
.hero .lede { margin-bottom: 2rem; }
.hero .actions { margin-bottom: 0; }

.hero-tag {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 1.5rem;
}
.hero-tag b { color: var(--accent); font-weight: 500; }

/* -------------------------------------------------- decomposition tree -- */

.tree {
  width: 100%;
  color: #38453f;
}
.tree .t-line  { stroke: currentColor; stroke-width: 1; fill: none; }
.tree .t-node  { fill: var(--bg-3); stroke: #4a5a53; stroke-width: 1; }
.tree .t-node-root { fill: var(--bg-3); stroke: var(--accent); }
.tree .t-node-hit  { fill: var(--accent-wash); stroke: var(--accent); }
.tree .t-tick  { fill: var(--line-2); }
.tree .t-tick-hit { fill: var(--accent); }
.tree .t-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  fill: var(--text-3);
  text-transform: uppercase;
}
.tree .t-label-strong { fill: var(--text-2); }
.tree .t-label-accent { fill: var(--accent); }
.tree .t-up { stroke: var(--accent); stroke-opacity: .55; stroke-width: 1; fill: none; }

.tree-frame {
  border: var(--rule);
  background:
    linear-gradient(var(--bg-2), var(--bg-2));
  padding: 1.5rem 1.25rem 1.1rem;
  position: relative;
}
.tree-frame figcaption {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 1.1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* the single permitted reveal: homepage hero only */
.reveal .t-col { opacity: 0; animation: tree-in .5s ease-out forwards; }
.reveal .t-col-0 { animation-delay: .05s; }
.reveal .t-col-1 { animation-delay: .22s; }
.reveal .t-col-2 { animation-delay: .39s; }
.reveal .t-col-3 { animation-delay: .56s; }
.reveal .t-col-4 { animation-delay: .73s; }

@keyframes tree-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .reveal .t-col { opacity: 1; animation: none; }
}

/* ------------------------------------------------------- document rail -- */

.doc {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: start;
}
.toc { position: sticky; top: 92px; }
.toc h4 {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
  margin: 0 0 .9rem;
  padding-bottom: .7rem;
  border-bottom: var(--rule);
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { margin-bottom: .55rem; counter-increment: toc; display: flex; gap: .55rem; }
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--accent-dim);
  padding-top: .18rem;
}
.toc a { color: var(--text-2); border: 0; font-size: .875rem; line-height: 1.4; }
.toc a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .doc { grid-template-columns: 1fr; }
  .toc { position: static; }
  .toc ol { columns: 2; column-gap: 1.5rem; }
}

.doc-section { margin-bottom: 3.25rem; }
.doc-section:last-child { margin-bottom: 0; }
.doc-section h2 { margin: 0 0 1rem; scroll-margin-top: 92px; }
.doc-section h3 { margin: 2rem 0 .6rem; }
.doc-section p:last-child { margin-bottom: 0; }
.doc-section ul { padding-left: 1.15rem; margin-bottom: 1.3em; }
.doc-section li { margin-bottom: .55em; color: var(--text-2); }
.doc-section li::marker { color: var(--accent-dim); }

/* --------------------------------------------------------------- cards -- */

.card h3 { margin-bottom: .55rem; }
.card p { color: var(--text-2); margin-bottom: 0; }
.card p + p { margin-top: .9rem; }
.card .price {
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: .9rem;
  display: block;
}
.card .card-foot { margin-top: 1.25rem; }

.steps { counter-reset: step; }
.steps .step { position: relative; }
.steps .step .num {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  display: block;
  margin-bottom: .85rem;
}
.steps .step h3 { margin-bottom: .55rem; }
.steps .step p { color: var(--text-2); margin-bottom: 0; }

.price-line {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: -.35rem 0 1.1rem;
}
.for-line { color: var(--text-2); }
.for-line span {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-right: .5rem;
}

.terms { margin: 0; }
.terms dt {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 1.15rem;
  border-top: var(--rule);
  margin-bottom: .5rem;
}
.terms dt:first-child { padding-top: 0; border-top: 0; }
.terms dd { margin: 0 0 1.15rem; color: var(--text-2); }

/* -------------------------------------------------------------- quotes -- */

.incident {
  border-left: 2px solid var(--accent-dim);
  padding: .2rem 0 .2rem 1.75rem;
  max-width: 42rem;
}
.incident p { color: var(--text); }
.incident p:last-child { margin-bottom: 0; }
.incident .kicker {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1rem;
}

blockquote {
  margin: 1.75rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent-dim);
  color: var(--text);
  font-size: 1.05rem;
}
blockquote p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- table -- */

.table-wrap { overflow-x: auto; border: var(--rule); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  min-width: 34rem;
}
thead th {
  text-align: left;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
  padding: .95rem 1.15rem;
  border-bottom: var(--rule);
  background: var(--bg-2);
}
tbody td { padding: .95rem 1.15rem; border-bottom: var(--rule); color: var(--text-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody td:first-child { color: var(--text); }
td.num, th.num { font-family: var(--mono); color: var(--text); letter-spacing: 0.02em; }

/* -------------------------------------------------------------- people -- */

.person { display: flex; gap: 1.25rem; align-items: flex-start; }
.person .portrait {
  width: 84px;
  height: 84px;
  flex: none;
  border: var(--rule);
  background: var(--bg-3);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  color: var(--accent-dim);
}
.person .role {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: .2rem 0 .7rem;
}
.person h3 { margin: 0; }

.people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: var(--rule);
}
.people > * { background: var(--bg); padding: 2.25rem 2rem; }
@media (max-width: 860px) { .people { grid-template-columns: 1fr; } }

.person--lg { gap: 1.75rem; }
.person--lg h2 { font-size: 1.45rem; }
.portrait--lg { width: 132px; height: 132px; font-size: 2rem; }
@media (max-width: 620px) {
  .person--lg { flex-direction: column; gap: 1.25rem; }
  .portrait--lg { width: 104px; height: 104px; }
}

/* ----------------------------------------------------------------- cta -- */

.cta {
  border-top: var(--rule);
  background: var(--bg-2);
}
.cta .wrap {
  padding-block: clamp(3rem, 2rem + 3.5vw, 4.5rem);
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cta h2 { max-width: 20ch; }
.cta p { color: var(--text-2); margin: .8rem 0 0; max-width: 42ch; }

/* -------------------------------------------------------------- articles */

.article-list { border-top: var(--rule); }
.article-item {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 1.9rem;
  border-bottom: var(--rule);
  align-items: baseline;
}
.article-item time {
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: 0.1em;
  color: var(--text-3);
  text-transform: uppercase;
}
.article-item h3 { margin-bottom: .45rem; }
.article-item h3 a { color: var(--text); border: 0; }
.article-item h3 a:hover { color: var(--accent); }
.article-item p { color: var(--text-2); margin: 0; max-width: 46rem; }

@media (max-width: 700px) {
  .article-item { grid-template-columns: 1fr; gap: .5rem; }
}

.page-head {
  padding-block: clamp(3rem, 2rem + 4vw, 5rem) clamp(2rem, 1.5rem + 2vw, 3rem);
  border-bottom: var(--rule);
}
.page-head h1 { margin-bottom: 1.25rem; }
.page-head .lede:last-child { margin-bottom: 0; }

.article-meta {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1.4rem;
}

.checklist {
  border: var(--rule);
  border-left: 2px solid var(--accent-dim);
  background: var(--bg-2);
  padding: 1.5rem 1.6rem;
  margin: 2rem 0;
}
.checklist h4 {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .9rem;
}
.checklist ul { margin: 0; padding-left: 1.1rem; }
.checklist li { color: var(--text-2); margin-bottom: .55rem; }
.checklist li:last-child { margin-bottom: 0; }
.checklist p:last-child { margin-bottom: 0; }

.article-body .prose > :first-child { margin-top: 0; }
.article-foot {
  margin-top: 3.25rem;
  padding-top: 1.5rem;
  border-top: var(--rule);
  font-size: .9rem;
}
.article-meta a { color: var(--text-3); border: 0; }
.article-meta a:hover { color: var(--accent); }

.brand-text { letter-spacing: -0.03em; }

/* ---------------------------------------------------------------- form -- */

.form { max-width: 34rem; }
.field { margin-bottom: 1.35rem; }
.field label {
  display: block;
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: -0.004em;
  margin-bottom: .45rem;
  color: var(--text);
}
.field .hint { display: block; font-weight: 400; color: var(--text-3); font-size: .8rem; margin-top: .2rem; }

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  background: var(--bg-2);
  border: var(--rule);
  border-radius: 2px;
  padding: .66rem .8rem;
  transition: border-color .12s linear, background .12s linear;
  appearance: none;
}
.field textarea { min-height: 7rem; resize: vertical; line-height: 1.55; }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%),
                    linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent-dim);
  background: var(--bg-3);
  outline: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #b46a6a; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-panel {
  border: var(--rule);
  border-top: 2px solid var(--accent-dim);
  background: var(--bg-2);
  padding: 1.75rem 1.6rem;
}
.panel-title {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin: 0 0 1.1rem;
}
.next-steps {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  counter-reset: nstep;
}
.next-steps li {
  counter-increment: nstep;
  display: flex;
  gap: .75rem;
  padding-bottom: .85rem;
  margin-bottom: .85rem;
  border-bottom: var(--rule);
  color: var(--text-2);
}
.next-steps li:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.next-steps li::before {
  content: counter(nstep, decimal-leading-zero);
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--accent-dim);
  padding-top: .2rem;
}

.form-note { font-size: .84rem; color: var(--text-3); margin-top: 1rem; }

.form-status {
  border: var(--rule);
  border-left: 2px solid var(--line-2);
  background: var(--bg-2);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.form-status p:last-child { margin-bottom: 0; }
.form-status--ok { border-left-color: var(--accent); }
.form-status--err { border-left-color: #b46a6a; }
.form-status h3 { font-size: 1.05rem; margin-bottom: .4rem; }

[hidden] { display: none !important; }

/* ----------------------------------------------------------------- 404 -- */

.page-404 { padding-block: clamp(4rem, 3rem + 6vw, 8rem); }
.page-404 .code {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.page-404 h1 { margin-bottom: 1.25rem; }

/* -------------------------------------------------------------- footer -- */

.site-foot {
  border-top: var(--rule);
  background: var(--bg-2);
  padding-block: 3.25rem 2.5rem;
  font-size: .9rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .foot-grid { grid-template-columns: 1fr; } }

.foot-grid h4 {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
  margin: 0 0 .9rem;
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: .5rem; }
.foot-grid a { color: var(--text-2); border: 0; }
.foot-grid a:hover { color: var(--accent); }

.foot-tagline { color: var(--text-2); max-width: 26rem; margin: 0 0 1rem; }
.foot-brand { font-weight: 800; letter-spacing: -0.03em; color: var(--text); font-size: 1.02rem; display: block; margin-bottom: .75rem; }

.foot-bottom {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-3);
  font-size: .82rem;
}

/* --------------------------------------------------------------- print -- */

@media print {
  :root { --text: #111; --text-2: #333; --text-3: #555; --line: #ccc; --line-2: #bbb; --accent: #1b6b42; --accent-dim: #1b6b42; }
  body { background: #fff; color: #111; font-size: 11pt; line-height: 1.45; }
  .site-head, .site-foot, .cta, .tree-frame, .actions, .btn, .form { display: none !important; }
  .section, .page-head, .hero { border: 0; padding-block: 0 1.25rem; }
  a { color: #111; border: 0; }
  .prose a::after { content: " (" attr(href) ")"; font-family: var(--mono); font-size: .8em; color: #555; word-break: break-all; }
  .grid { border-color: #ccc; }
  .grid > * { background: #fff; }
  h1, h2, h3 { page-break-after: avoid; }
  .checklist, .incident, blockquote, table { page-break-inside: avoid; }
}
