/* ---------------------------------------------------------------------------
   Fine Intake — editorial legal-document styling.

   Palette and typographic treatment follow the Circles conference template
   reference: off-white paper, deep plum, a single teal accent, wide-tracked
   uppercase labels over a quiet serif. Hairlines instead of boxes, whitespace
   instead of shadow.
   --------------------------------------------------------------------------- */

:root {
  --paper: #f8f8f8;
  --paper-raised: #ffffff;
  --ink: #181515;
  --ink-soft: #5d5453;
  --ink-faint: #6b6462;
  --plum: #743d67;
  --plum-deep: #562c4d;
  --rose: #7a5f58;
  --teal: #257a71;
  --hairline: rgba(24, 21, 21, 0.14);
  --hairline-soft: rgba(24, 21, 21, 0.08);
  --plum-wash: #f0e8ee;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --track-label: 0.22em;
  --track-button: 0.16em;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--plum); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--plum-deep); }

.wrap { width: 100%; max-width: 1060px; margin: 0 auto; padding: 0 28px; }
.wrap--narrow { max-width: 720px; }
.wrap--wide { max-width: 1240px; }

/* --- utilities ----------------------------------------------------------- */

.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: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 12px 18px;
  background: var(--plum);
  color: #fff;
  font-size: 11px;
  letter-spacing: var(--track-button);
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Visible focus for everything keyboard reachable. The brand plum is 7.59:1 on
   paper, so a 2px outline clears the 3:1 minimum for non-text contrast. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 2px;
}

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

.eyebrow {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--plum);
  margin: 0 0 18px;
}
.eyebrow--teal { color: var(--teal); }
.eyebrow--faint { color: var(--ink-faint); }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.14;
  letter-spacing: -0.012em;
  margin: 0 0 22px;
  max-width: 24ch;
}

.display--caps {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(20px, 3.2vw, 34px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  line-height: 1.5;
  margin: 0;
}

.lede {
  font-family: var(--serif);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 30px;
}

h2.section {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(23px, 2.6vw, 30px);
  line-height: 1.25;
  margin: 0 0 14px;
}

.prose p { margin: 0 0 16px; max-width: 66ch; color: var(--ink-soft); }
.prose strong { color: var(--ink); font-weight: 600; }

.small { font-size: 13.5px; color: var(--ink-soft); }
.tiny { font-size: 12px; color: var(--ink-faint); }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0; }

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

.masthead {
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
}
.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 78px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.wordmark {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: var(--ink);
}
.wordmark__name {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}
.wordmark__sub {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.nav a,
.nav button {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  background: none;
  border: 0;
  /* 24x24 minimum target (WCAG 2.5.8): the label itself is short, so the
     padding does the work rather than the type size. */
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 6px 2px;
  cursor: pointer;
}
.nav a:hover,
.nav button:hover { color: var(--plum); }
.nav a.is-current { color: var(--ink); border-bottom: 1px solid var(--plum); padding-bottom: 3px; }
.nav__who {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  text-transform: none;
}

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

.hero {
  background: var(--plum);
  color: #fff;
  padding: clamp(48px, 8vw, 92px) 0;
}
.hero .eyebrow { color: rgba(255, 255, 255, 0.72); }
.hero .display { color: #fff; max-width: 26ch; }
.hero .lede { color: rgba(255, 255, 255, 0.82); }
.hero__meta {
  display: flex;
  gap: 40px;
  margin-top: 42px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  flex-wrap: wrap;
}
.hero__stat { min-width: 120px; }
.hero__stat b {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.hero__stat span {
  font-size: 10px;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}
.hero--teal { background: var(--teal); }
.hero--quiet {
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
  padding: clamp(36px, 5vw, 60px) 0;
}
.hero--quiet .display { color: var(--ink); }
.hero--quiet .lede { color: var(--ink-soft); }
.hero--quiet .eyebrow { color: var(--plum); }

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

.section-block { padding: clamp(44px, 6vw, 76px) 0; border-bottom: 1px solid var(--hairline-soft); }
.section-block:last-of-type { border-bottom: 0; }
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: start;
}
.stack > * + * { margin-top: 22px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.row--between { justify-content: space-between; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 26px 46px;
  border-left: 1px solid var(--hairline);
  margin-left: 9px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: -11px;
  top: -2px;
  width: 22px;
  height: 22px;
  background: var(--paper);
  color: var(--plum);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 22px;
  text-align: center;
  letter-spacing: 0.04em;
}
.steps h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  margin: 0 0 6px;
}
.steps p { margin: 0; color: var(--ink-soft); font-size: 14.5px; max-width: 46ch; }

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

.card {
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  padding: clamp(22px, 3.4vw, 34px);
}
.card--flat { background: transparent; }
.card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.note {
  border-left: 2px solid var(--plum);
  background: var(--plum-wash);
  padding: 16px 20px;
  font-size: 14px;
  color: var(--ink-soft);
}
.note--teal { border-left-color: var(--teal); background: rgba(47, 146, 136, 0.07); }
.note--warn { border-left-color: #a8571f; background: rgba(168, 87, 31, 0.08); }

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

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: var(--track-button);
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  padding: 16px 30px;
  border: 1px solid var(--plum);
  background: var(--plum);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--plum-deep); border-color: var(--plum-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: rgba(24, 21, 21, 0.32); }
.btn--ghost:hover { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--light { background: #fff; color: var(--plum); border-color: #fff; }
.btn--light:hover { background: rgba(255, 255, 255, 0.88); color: var(--plum-deep); border-color: #fff; }
.btn--small { padding: 11px 18px; font-size: 9.5px; }
.btn--block { display: block; width: 100%; }
.btn--link {
  background: none; border: 0; padding: 0; color: var(--plum);
  text-transform: none; letter-spacing: 0; font-size: 13px; text-decoration: underline;
}

/* --- forms --------------------------------------------------------------- */

.form-row { margin-bottom: 26px; }
label, .label {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 9px;
}
.input,
input[type="text"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="datetime-local"],
input[type="number"],
textarea,
select {
  display: block;
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid rgba(24, 21, 21, 0.22);
  border-radius: 0;
  padding: 13px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input--mono,
textarea {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.65;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--plum);
  box-shadow: 0 0 0 3px rgba(116, 61, 103, 0.28);
}
textarea { resize: vertical; min-height: 140px; }
.helptext, .help { display: block; font-size: 12.5px; color: var(--ink-faint); margin-top: 7px; }
.errorlist {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  font-size: 12.5px;
  color: #9c2f2f;
}
.field--error input,
.field--error textarea,
.field--error select { border-color: #9c2f2f; }

.radio-group { display: grid; gap: 10px; }
.radio-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(24, 21, 21, 0.18);
  background: var(--paper-raised);
  cursor: pointer;
}
.radio-row:hover { border-color: rgba(24, 21, 21, 0.36); }
.radio-row:focus-within { outline: 2px solid var(--plum); outline-offset: 2px; }
.radio-row input[type="radio"] {
  /* 24x24 target (WCAG 2.5.8) */
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--plum);
  flex: 0 0 auto;
}
.radio-row span { font-size: 14.5px; color: var(--ink); }

.check-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--plum-wash);
  border: 1px solid rgba(116, 61, 103, 0.18);
}
.check-row input[type="checkbox"] {
  /* 24x24 target (WCAG 2.5.8) */
  margin: 0;
  accent-color: var(--plum);
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}
.check-row:focus-within { outline: 2px solid var(--plum); outline-offset: 2px; }
.check-row label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  line-height: 1.55;
}

/* --- tables / lists ------------------------------------------------------ */

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0 14px 12px 0;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
table.data td {
  padding: 14px 14px 14px 0;
  border-bottom: 1px solid var(--hairline-soft);
  vertical-align: top;
}
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { font-family: var(--mono); font-size: 12.5px; }

.list-reset { list-style: none; padding: 0; margin: 0; }
.record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline-soft);
  align-items: start;
}
.record:first-child { border-top: 1px solid var(--hairline); }
.record__ref {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--plum);
  margin: 0 0 6px;
}
.record__title { font-family: var(--serif); font-size: 18px; margin: 0 0 4px; }
.record__meta { font-size: 12.5px; color: var(--ink-faint); }

/* --- status pills -------------------------------------------------------- */

.pill {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.pill--verified { color: var(--teal); }
.pill--needs_review { color: var(--plum); }
.pill--rejected { color: #9c2f2f; }
.pill--needs_info { color: var(--rose); }
.pill--parsed { color: var(--ink-faint); }
.pill--open { color: var(--ink-faint); }

/* --- data display -------------------------------------------------------- */

.kv { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 2px 26px; margin: 0; }
.kv dt {
  font-size: 9.5px;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.kv dd {
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 15px;
  word-break: break-word;
}
.kv dd.empty { color: var(--ink-faint); font-style: italic; }

.raw-message {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  padding: 20px;
  margin: 0;
  color: var(--ink);
}

.hash {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-soft);
  word-break: break-all;
  line-height: 1.5;
}

/* --- messages ------------------------------------------------------------ */

.flash { padding: 0; }
.flash__item {
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 14px;
  border-left: 2px solid var(--teal);
  background: rgba(47, 146, 136, 0.08);
  color: var(--ink);
}
.flash__item--error { border-left-color: #9c2f2f; background: rgba(156, 47, 47, 0.07); }
.flash__item--warning { border-left-color: #a8571f; background: rgba(168, 87, 31, 0.08); }

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

.footer {
  border-top: 1px solid var(--hairline);
  margin-top: 60px;
  padding: 40px 0 56px;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-faint);
}
.footer a { color: var(--ink-soft); }
.footer__col { max-width: 34ch; }
.footer__label {
  font-size: 9.5px;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 8px;
}

/* --- search -------------------------------------------------------------- */

.search { display: flex; gap: 10px; align-items: center; }
.search .input { min-width: 220px; width: auto; }

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dt { padding-bottom: 0; border-bottom: 0; }
  .kv dd { padding-top: 3px; }
}

@media (max-width: 620px) {
  .wrap { padding: 0 20px; }
  .masthead__inner { min-height: 0; padding-block: 18px; gap: 16px; }
  .nav { gap: 20px; }
  .record { grid-template-columns: minmax(0, 1fr); }
  .hero__meta { gap: 26px; }
  .search { flex-wrap: wrap; }
  .search .input { min-width: 0; width: 100%; }
  .btn { width: 100%; }
  .row .btn { width: auto; }
}

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

/* Exhibits get printed: drop the furniture, keep the record. */
@media print {
  :root { --paper: #fff; --ink: #000; --ink-soft: #000; --ink-faint: #333; }
  body { font-size: 11pt; }
  .masthead,
  .footer,
  .nav,
  .skip-link,
  .flash,
  .search,
  .btn,
  form {
    display: none !important;
  }
  .hero,
  .hero--quiet { background: #fff !important; color: #000 !important; padding: 0 0 12pt; border-bottom: 1px solid #000; }
  .hero .display,
  .hero .lede,
  .hero .eyebrow { color: #000 !important; }
  .wrap { max-width: none; padding: 0; }
  .card { border: 1px solid #999; break-inside: avoid; page-break-inside: avoid; margin-bottom: 10pt; }
  .raw-message { border: 1px solid #999; white-space: pre-wrap; }
  .hash { color: #333; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; }
  .section-block { padding: 12pt 0; }
}
