/* Field Note — hornbeckco.com
   Plain CSS, no build step. Two typefaces: Fraunces (text and display), IBM Plex Mono (labels and sources). */

:root {
  --paper: #f4f0e6;
  --paper-2: #ebe5d6;
  --ink: #16140f;
  --ink-2: #4a463d;
  --rule: #c9c1ae;
  --flag: #e2491b;      /* surveyor's flag: marks and large type only */
  --flag-ink: #a8300d;  /* the same orange, dark enough for small text */
  --field: #24443a;
  --grid: rgba(22, 20, 15, 0.055);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  --measure: 62ch;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

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

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.06rem, 0.98rem + 0.35vw, 1.22rem);
  line-height: 1.55;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-color: var(--flag); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { color: var(--flag-ink); }
:focus-visible { outline: 3px solid var(--flag); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; font-family: var(--mono); font-size: 0.85rem; z-index: 10; }
.skip:focus { left: var(--gutter); top: 0.5rem; }
.skip:hover { color: var(--paper); }

.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- labels ---------- */
.mono, .label, nav a, .tag, .price, .ledger th, .meta { font-family: var(--mono); }
.label {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 0.6em;
}
.label::before { content: ""; width: 0.6em; height: 0.6em; background: var(--flag); display: inline-block; }

/* ---------- header ---------- */
.masthead { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1.4rem 0 1.1rem; border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.wordmark { font-size: 1.55rem; font-weight: 600; font-style: italic; letter-spacing: -0.01em; text-decoration: none; line-height: 1; }
.wordmark.co { font-style: normal; letter-spacing: -0.02em; }
.brand { margin: 0; display: flex; align-items: baseline; gap: 0.8em; flex-wrap: wrap; }
.byline { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; }
.byline:hover { color: var(--flag-ink); }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(0.9rem, 2.5vw, 1.8rem); flex-wrap: wrap; }
nav a { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; padding: 0.35rem 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current="page"] { border-bottom-color: var(--flag); color: var(--ink); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: end; padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero h1 {
  font-size: clamp(2.5rem, 1.3rem + 5.4vw, 5.6rem);
  line-height: 0.98; letter-spacing: -0.025em; font-weight: 600; margin: 0.9rem 0 1.4rem;
  font-variation-settings: "WONK" 1;
}
.hero h1 em { font-style: italic; font-weight: 400; position: relative; white-space: nowrap; }
.hero h1 em svg { position: absolute; left: -2%; bottom: -0.16em; width: 104%; height: 0.32em; overflow: visible; }
.hero h1 em path { fill: none; stroke: var(--flag); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 620; stroke-dashoffset: 620; animation: draw 0.9s 0.55s cubic-bezier(0.6, 0, 0.2, 1) forwards; }
.lede { max-width: 34ch; font-size: 1.22em; line-height: 1.4; color: var(--ink-2); margin: 0 0 1.8rem; }
.lede strong { color: var(--ink); font-weight: 600; }

.actions { display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: center; }
.btn { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; padding: 0.95rem 1.25rem; border: 2px solid var(--ink); display: inline-block; transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease; }
.btn-solid { background: var(--ink); color: var(--paper); box-shadow: 5px 5px 0 var(--flag); }
.btn-solid:hover { color: var(--paper); transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--flag); }
.btn-line:hover { background: var(--ink); color: var(--paper); }

/* ---------- specimen claim card ---------- */
.specimen { position: relative; background: #fbf9f3; border: 1.5px solid var(--ink); padding: 1.3rem 1.3rem 1.1rem; transform: rotate(1.4deg); box-shadow: 10px 12px 0 rgba(22, 20, 15, 0.12); transition: transform 0.25s ease; }
.specimen:hover { transform: rotate(0deg); }
.specimen::before { content: ""; position: absolute; top: -0.75rem; left: 50%; width: 5.5rem; height: 1.5rem; background: rgba(226, 73, 27, 0.78); transform: translateX(-50%) rotate(-3deg); }
.specimen h2 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; margin: 0.3rem 0 0.9rem; color: var(--ink-2); }
.specimen dl { margin: 0; display: grid; grid-template-columns: 5.2rem 1fr; gap: 0.5rem 0.8rem; font-family: var(--mono); font-size: 0.8rem; line-height: 1.45; }
.specimen dt { color: var(--flag-ink); }
.specimen dd { margin: 0; overflow-wrap: anywhere; }
.specimen dd.quote { font-family: var(--serif); font-size: 1.12rem; line-height: 1.3; font-style: italic; }
.specimen p { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-2); margin: 1rem 0 0; padding-top: 0.7rem; border-top: 1px dashed var(--rule); }

/* ---------- sections ---------- */
section { padding: clamp(2.5rem, 6vw, 4.8rem) 0; border-top: 1px solid var(--rule); }
.sec { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: clamp(1rem, 4vw, 3rem); }
.sec > header .num { font-family: var(--mono); font-size: 0.78rem; color: var(--flag-ink); display: block; margin-bottom: 0.4rem; }
.sec h2 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.9rem); line-height: 1.05; letter-spacing: -0.02em; font-weight: 600; margin: 0 0 1.1rem; max-width: 22ch; }
:where(.sec) p { max-width: var(--measure); margin: 0 0 1.05em; }
.sec p.after-box { margin-top: 1.4rem; }
.sec p.big { font-size: 1.2em; line-height: 1.42; }

/* ---------- the swap test (dark band) ---------- */
.band { background: var(--ink); color: var(--paper); border-top: 0; background-image: linear-gradient(rgba(244, 240, 230, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(244, 240, 230, 0.05) 1px, transparent 1px); background-size: 28px 28px; }
.band .label, .band .sec > header .num { color: #d8d1c0; }
.band .sec > header .num { color: #ff8a63; }
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.6rem 0 1.4rem; }
.chip { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em; background: transparent; color: var(--paper); border: 1.5px solid #8c8676; padding: 0.6rem 0.9rem; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--flag); border-color: var(--flag); color: #16140f; font-weight: 600; }
.chip:hover { border-color: var(--paper); }
.swap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.line { border: 1.5px solid #6c675a; padding: 1.3rem 1.3rem 1.1rem; }
.line .sentence { margin: 0 0 1rem; max-width: none; font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem); line-height: 1.22; letter-spacing: -0.01em; }
.line .co { color: #ff8a63; font-style: italic; }
.verdict { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; display: flex; flex-wrap: wrap; gap: 0.5em 0.7em; align-items: baseline; margin: 0; }
.verdict b { padding: 0.15rem 0.5rem; font-weight: 600; white-space: nowrap; }
.verdict.no b { background: #5a2416; color: #ffd9cc; }
.verdict.yes b { background: #cfe6c9; color: #16321f; }
.fine { font-family: var(--mono); font-size: 0.72rem; color: #b9b2a2; margin-top: 1.2rem; }

/* ---------- ledger tables ---------- */
.ledger { width: 100%; border-collapse: collapse; margin-top: 0.6rem; }
.ledger th { text-align: left; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; color: var(--ink-2); padding: 0 1rem 0.6rem 0; border-bottom: 2px solid var(--ink); }
.ledger td { padding: 0.95rem 1rem 0.95rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger td:first-child { font-family: var(--mono); font-size: 0.86rem; white-space: nowrap; color: var(--flag-ink); padding-top: 1.15rem; }
.ledger tr:last-child td { border-bottom: 2px solid var(--ink); }

.rule-list { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1.5px solid var(--ink); background: #fbf9f3; }
.rule-list li { padding: 1rem 1.1rem 1.1rem; border-right: 1px solid var(--rule); }
.rule-list li:last-child { border-right: 0; }
.rule-list.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rule-list b { display: block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--flag-ink); font-weight: 500; margin-bottom: 0.35rem; }

/* ---------- pricing ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1.5px solid var(--ink); background: #fbf9f3; margin-top: 0.8rem; }
.tier { padding: 1.5rem 1.4rem 1.6rem; border-right: 1px solid var(--rule); display: flex; flex-direction: column; }
.tier:last-child { border-right: 0; }
.tier h3 { font-size: 1.9rem; font-weight: 600; letter-spacing: -0.02em; margin: 0; line-height: 1; }
.price { font-size: 0.9rem; margin: 0.7rem 0 1.1rem; padding-bottom: 1rem; border-bottom: 1px dashed var(--rule); }
.price b { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.tier ul { list-style: none; margin: 0; padding: 0; font-size: 0.97em; line-height: 1.4; }
.tier li { padding: 0.42rem 0 0.42rem 1.3rem; position: relative; }
.tier li::before { content: "+"; position: absolute; left: 0; font-family: var(--mono); color: var(--flag-ink); }
.tier .incl { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--ink-2); margin: 0 0 0.5rem; }
.terms { font-family: var(--mono); font-size: 0.8rem; line-height: 1.6; color: var(--ink-2); max-width: 78ch; margin-top: 1.3rem; }
.terms b { color: var(--ink); font-weight: 600; }

/* ---------- start ---------- */
.steps { list-style: none; counter-reset: step; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 0.8rem; }
.steps li::before { content: "0" counter(step); display: block; font-size: 3rem; line-height: 1; font-weight: 300; font-style: italic; color: var(--flag); margin-bottom: 0.5rem; }
.steps b { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.callout { margin-top: 2.2rem; padding: 1.4rem 1.5rem; border: 1.5px solid var(--ink); background: var(--paper-2); display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.callout p { margin: 0; font-size: 1.15em; max-width: 36ch; }

/* ---------- notes index and note pages ---------- */
.page-head { padding: clamp(2rem, 6vw, 4rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.page-head h1 { font-size: clamp(2.2rem, 1.4rem + 4vw, 4.4rem); line-height: 1; letter-spacing: -0.025em; font-weight: 600; margin: 0.8rem 0 1rem; max-width: 18ch; }
.page-head p { max-width: var(--measure); color: var(--ink-2); font-size: 1.15em; margin: 0; }
.notes { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.notes li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: clamp(1rem, 4vw, 3rem); padding: 1.4rem 0; border-bottom: 1px solid var(--rule); }
.notes .meta { font-size: 0.78rem; color: var(--ink-2); padding-top: 0.45rem; }
.notes h2 { font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 0.4rem; font-weight: 600; }
.notes h2 a { text-decoration: none; }
.notes h2 a:hover { text-decoration: underline; text-decoration-color: var(--flag); }
.notes p { margin: 0; color: var(--ink-2); max-width: var(--measure); }
.pending { color: var(--ink-2); }

article.note { padding: clamp(2rem, 6vw, 4rem) 0; }
article.note .head { max-width: 46rem; }
article.note h1 { font-size: clamp(2rem, 1.3rem + 3.4vw, 3.8rem); line-height: 1.02; letter-spacing: -0.025em; font-weight: 600; margin: 0.8rem 0 1.2rem; }
article.note .answer { font-size: 1.25em; line-height: 1.4; border-left: 5px solid var(--flag); padding: 0.2rem 0 0.2rem 1.1rem; margin: 0 0 2rem; max-width: 40rem; }
article.note .body { max-width: 40rem; }
article.note .body h2 { font-size: 1.6rem; line-height: 1.12; letter-spacing: -0.015em; margin: 2.2rem 0 0.7rem; }
article.note .body sup a { font-family: var(--mono); font-size: 0.72em; text-decoration: none; color: var(--flag-ink); padding: 0 0.15em; }
.sources { max-width: 46rem; margin-top: 3rem; border-top: 2px solid var(--ink); padding-top: 1rem; }
.sources h2 { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; color: var(--ink-2); margin: 0 0 0.8rem; }
.sources ol { margin: 0; padding-left: 1.4rem; font-family: var(--mono); font-size: 0.8rem; line-height: 1.5; }
.sources li { margin-bottom: 0.7rem; overflow-wrap: anywhere; }
.sources q { font-family: var(--serif); font-size: 1.15em; font-style: italic; }

/* ---------- footer ---------- */
footer { border-top: 2px solid var(--ink); padding: 1.6rem 0 2.4rem; font-family: var(--mono); font-size: 0.78rem; color: var(--ink-2); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
footer p { margin: 0; }

/* ---------- load-in ---------- */
/* The resting state is the plain stylesheet: if the animation never runs, everything is still visible. */
.reveal { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.d1 { animation-delay: 0.08s; } .d2 { animation-delay: 0.2s; } .d3 { animation-delay: 0.34s; } .d4 { animation-delay: 0.5s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* the tilted card keeps its tilt after rising */
.specimen.reveal { animation-name: rise-tilt; }
@keyframes rise-tilt { from { opacity: 0; transform: translateY(18px) rotate(4deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .specimen.reveal { animation: none; opacity: 1; transform: none; }
  .specimen { transform: none; }
  .hero h1 em path { animation: none; stroke-dashoffset: 0; }
  .btn, .specimen { transition: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .specimen { max-width: 30rem; }
  .tiers, .steps { grid-template-columns: 1fr; }
  .tier { border-right: 0; border-bottom: 1px solid var(--rule); }
  .tier:last-child { border-bottom: 0; }
  .rule-list, .rule-list.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-list li:nth-child(2) { border-right: 0; }
  .rule-list li:nth-child(-n + 2) { border-bottom: 1px solid var(--rule); }
  .swap { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sec, .notes li { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
  .callout .btn { max-width: 100%; padding-inline: 0.8rem; letter-spacing: 0.02em; overflow-wrap: anywhere; }
  .hero h1 em { white-space: normal; }
  .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; }
  .ledger thead { position: absolute; left: -999px; }
  .ledger td { border-bottom: 0; padding: 0.2rem 0; }
  .ledger td:first-child { padding-top: 1rem; }
  .ledger tr { border-bottom: 1px solid var(--rule); padding-bottom: 0.9rem; }
  .ledger tr:last-child { border-bottom: 2px solid var(--ink); }
  .ledger tr:last-child td { border-bottom: 0; }
  .rule-list, .rule-list.three { grid-template-columns: 1fr; }
  .rule-list li { border-right: 0; border-bottom: 1px solid var(--rule); }
  .rule-list li:last-child { border-bottom: 0; }
  .callout { flex-direction: column; align-items: flex-start; }
}

@media print {
  body { background: #fff; }
  .band { background: #fff; color: #000; }
  .band .label, .band .sec > header .num, .line .co, .fine { color: #000; }
  .btn-solid, .verdict.no b, .verdict.yes b { background: none; color: #000; box-shadow: none; }
  .line { border-color: #000; }
  .reveal, .specimen.reveal { animation: none; opacity: 1; transform: none; }
  nav, .actions, .chips, .skip { display: none; }
}
