/*
  Defabuse — the page's own components: the notice sheet and everything the
  visitor reads on their way down it. Shared tokens and page chrome live in
  base.css.
*/

/* ── The notice sheet: the hero, dressed as the artifact ───────────────── */
.hero {
  padding: clamp(2.25rem, 5vw, 3.75rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.sheet {
  position: relative;
  isolation: isolate;
  background: var(--sheet);
  border: 1px solid var(--rule-2);
  border-top: 3px solid var(--ink);
  padding: clamp(1.75rem, 4.5vw, 3.25rem);
  box-shadow: 0 1px 2px rgba(16, 22, 28, 0.05), 0 12px 32px -18px rgba(16, 22, 28, 0.28);
}

/* Paper stock. The whole page argues that this is a document; letting the
   sheet carry an actual grain makes that argument materially rather than
   only typographically. Kept faint — it should be felt, not noticed. */
.sheet::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('../img/paper.jpg') center / cover no-repeat;
  mix-blend-mode: multiply;
  opacity: 0.55;
  pointer-events: none;
}

.sheet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem;
  min-width: 0;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.sheet-head p {
  font-family: var(--font-mono);
  font-size: 0.688rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}

.seal {
  margin-left: auto;
  flex-shrink: 0;
  width: 86px;
  height: 86px;
  color: var(--seal);
  opacity: 0.9;
  transform: rotate(-8deg);
}

.hero h1 {
  font-size: clamp(1.85rem, 4.6vw, 3.05rem);
  max-width: 20ch;
  margin-bottom: 1.1rem;
}

.hero-lede {
  color: var(--ink-2);
  font-size: clamp(1rem, 1.6vw, 1.075rem);
  max-width: 54ch;
}

/* ── Reference decoder: the signature instrument ───────────────────────── */
.decoder {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--rule);
}

.decoder-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.688rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 0.6rem;
}

.decoder-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 34rem;
}

.decoder-row input {
  flex: 1 1 15rem;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.04em;
  padding: 0.72rem 0.9rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: 2px;
}

.decoder-row input::placeholder {
  color: var(--ink-3);
}

.decoder-row input:focus {
  background: var(--sheet);
  border-color: var(--seal);
  outline: none;
}

.decoder-row button {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.72rem 1.5rem;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.decoder-row button:hover {
  background: var(--seal);
  border-color: var(--seal);
}

.verdict {
  margin-top: 1.1rem;
  padding-left: 0.95rem;
  border-left: 2px solid var(--rule-2);
  max-width: 44rem;
}

.verdict[hidden] {
  display: none;
}

.verdict.is-valid {
  border-left-color: var(--ok);
}

.verdict.is-invalid {
  border-left-color: var(--seal);
}

.verdict-line {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.verdict dl {
  margin: 0.6rem 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.verdict dt {
  color: var(--ink-3);
}

.verdict dd {
  margin: 0;
}

.verdict-note {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

/* ── Section header: heading and its lede sit as a pair, so the measure
      constraint reads as an editorial column rather than a stranded block. ─ */
.band-head {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 0 clamp(2rem, 5vw, 4.5rem);
  align-items: end;
  margin-bottom: 2.25rem;
}

.band-head .eyebrow {
  grid-column: 1 / -1;
}

.band-lede {
  color: var(--ink-2);
  padding-bottom: 0.3rem;
}

@media (max-width: 820px) {
  .band-head {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .band-lede {
    padding-bottom: 0;
  }
}

/* ── Letterhead: the document's own particulars ────────────────────────── */
.letterhead {
  margin: 0;
  flex: 1 1 18rem;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem clamp(1.75rem, 4vw, 3.25rem);
}

.letterhead > div {
  min-width: 0;
}

.letterhead dt {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.letterhead dd {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  color: var(--ink);
}

.letterhead .mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}
