/* World Model Readiness · StrongMocha House System v2 — ALMANAC register
   (~/Dev/newdesign/house-system, DESIGN.md). This surface is the Almanac:
   report cards, public data, test data. Gelasio does all the talking; Lato
   only as small caps labels; structure is rules and hairlines (Law III) —
   no shadows, no gradients, radius 0 (chips <=4px). Property: Thorsten
   Meyer AI, N°001, SM/TMA, endorsement level: independent. */

/* Legacy aliases so existing utility classes keep resolving. */
.reg-almanac {
  --bg: var(--paper);
  --bg-soft: var(--card);
  --surface: var(--card);
  --ink-soft: var(--ink);
  --danger: #8E2424;      /* oxide — also the required-marker red */
  --warn: var(--grade-caution);
}

html { background: #F7F5E7; }
body {
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.25; }
.font-display { font-family: var(--font-display); font-weight: 600; letter-spacing: 0; }

.prose-narrow { max-width: var(--measure-max); }
.prose-narrow em, .caption { font-style: italic; }

/* Labels: Lato small caps, never above 13px (the almanac's filing clerk). */
.kicker {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--group-accent-ink);
}
.meta {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--label-ink);
}

/* Big figures: Gelasio, tabular. (Replaces the v1 dot-matrix numerals.) */
.dot-num {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
}

/* Wordmark: the child name leads (Law II); no group device above the fold. */
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}

main a:not([class]) { color: var(--group-accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a { text-underline-offset: 3px; }

::selection { background: #E7E9C9; }
:focus-visible { outline: 2px solid var(--group-accent); outline-offset: 2px; }

/* ----- buttons: solid grade-block voice / quiet ruled secondary ---------- */

.btn-primary, .btn-secondary {
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 22px;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn-primary {
  background: var(--group-accent);
  color: var(--group-accent-contrast);
  border: 1px solid var(--group-accent);
}
.btn-primary:hover { background: var(--group-accent-ink); border-color: var(--group-accent-ink); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-secondary:hover { background: var(--card); }

/* ----- ledger cards: card paper, 2px ink top rule, hairline frame -------- */

.field-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 2px solid var(--ink);
  border-radius: 0;
  padding: 28px 28px 24px;
}
.field-card + .field-card { margin-top: 32px; }

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

.likert-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 16px;
  border: 1px solid var(--line-mid);
}
@media (max-width: 640px) {
  .likert-scale { grid-template-columns: repeat(2, 1fr); }
  .likert-scale > :last-child { grid-column: 1 / -1; }
}
.likert-option {
  border-right: 1px solid var(--line-mid);
  border-bottom: 1px solid var(--line-mid);
  background: var(--card);
  padding: 12px 10px;
  min-height: 44px;
  cursor: pointer;
  text-align: center;
  transition: background var(--dur) var(--ease);
  user-select: none;
  margin: -1px 0 0 -1px;
}
.likert-option:hover { background: #F1EDD8; }
.likert-option.is-selected {
  background: var(--group-accent);
  color: #fff;
}
.likert-option .rank {
  display: block;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: 24px;
}
.likert-option .mini {
  display: block;
  font-family: var(--font-label);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.35;
  margin-top: 6px;
  opacity: .85;
}

.arch-option {
  border: 1px solid var(--line-mid);
  border-radius: 0;
  padding: 18px;
  cursor: pointer;
  background: var(--card);
  transition: background var(--dur) var(--ease);
}
.arch-option:hover { background: #F1EDD8; }
.arch-option.is-selected { border: 1.5px solid var(--ink); background: var(--paper); }
.arch-option.is-selected h4::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--group-accent);
  margin-right: 8px;
}
.arch-option h4 { font-weight: 600; margin-bottom: 4px; }
.arch-option p { font-size: 13.5px; color: var(--muted); margin: 0; font-style: italic; }

textarea.short-text,
input[type="email"], input[type="text"], select {
  width: 100%;
  border: 1px solid var(--line-mid);
  border-radius: 0;
  padding: 12px 14px;
  font: inherit;
  background: var(--paper);
  min-height: 44px;
}
textarea.short-text { min-height: 72px; resize: vertical; }
textarea.short-text:focus, input[type="email"]:focus, input[type="text"]:focus, select:focus {
  outline: 2px solid var(--group-accent);
  outline-offset: -1px;
}

/* Progress: the Almanac bench-track. */
.progress-bar {
  position: relative;
  height: 14px;
  background: #F1EDD8;
  border: 1px solid var(--line-mid);
  border-radius: 0;
  overflow: hidden;
}
.progress-bar > span {
  position: absolute;
  inset: 2px auto 2px 2px;
  max-width: calc(100% - 4px);
  background: var(--group-accent);
  transition: width .4s var(--ease);
}

.q-hint {
  font-size: 13.5px;
  font-style: italic;
  color: var(--muted);
  margin-top: 6px;
}

.error-note {
  border: 1px solid var(--danger);
  border-radius: 0;
  background: var(--card);
  color: var(--danger);
  padding: 12px 14px;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: .06em;
}

.success-state {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 2px solid var(--ink);
  border-radius: 0;
  padding: 40px 32px;
}

/* Tier verdicts as grade blocks (the register's signature). */
.tier-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 0;
  font-family: var(--font-display);
  font-size: 13px;
  color: #fff;
}
.tier-not_ready { background: var(--grade-neutral); }
.tier-premature { background: var(--grade-caution); }
.tier-pilot     { background: var(--group-accent); }
.tier-scale     { background: var(--group-accent-ink); }

/* ----- header & footer ---------------------------------------------------- */

.site-header { background: var(--paper); }
.site-header nav a {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--label-ink);
  text-decoration: none;
}
.site-header nav a:hover { color: var(--group-accent-ink); }

/* Footer: cream ledger band. Independent endorsement: registry code +
   grade-block mark + attribution live here and nowhere else. */
.site-footer {
  background: var(--card);
  border-top: 2px solid var(--ink);
  color: var(--muted);
}
.site-footer nav a {
  color: var(--label-ink);
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-footer nav a:hover { color: var(--group-accent-ink); }
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}
.registry-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--label-ink);
}
.registry-line .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: var(--group-accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

/* Stat row with hairline separators (report-card anatomy, reused on pages). */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat-row > div { padding: 18px 20px; border-left: 1px solid var(--line-mid); }
.stat-row > div:first-child { border-left: none; }
@media (max-width: 640px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat-row > div { border-left: none; border-top: 1px solid var(--line-mid); }
  .stat-row > div:nth-child(-n+2) { border-top: none; }
}
