:root {
  --ink: #201a17;
  --muted: #6c625d;
  --paper: #f5f0e6;
  --surface: #fffdf7;
  --red: #8f1d23;
  --red-dark: #651218;
  --gold: #c59a3a;
  --line: #d8cfc2;
  --blue: #174f66;
  --success: #28643e;
  --error: #9a1f1f;
  --shadow: 0 16px 40px rgb(50 35 22 / 10%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgb(143 29 35 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(143 29 35 / 5%) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
}

a {
  color: var(--red-dark);
}

button,
input,
select {
  font: inherit;
}

.parody-banner {
  padding: 0.65rem 1rem;
  color: white;
  background: var(--red-dark);
  text-align: center;
  font-weight: 850;
  letter-spacing: 0.06em;
  font-size: 0.79rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 3px solid var(--red);
  border-radius: 0.25rem 50% 50% 50%;
  background: var(--surface);
  color: var(--red);
  font-family: Georgia, serif;
  font-size: 1.65rem;
  font-weight: 900;
  transform: rotate(-3deg);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.15rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

nav {
  display: flex;
  gap: 1.2rem;
}

nav a {
  color: var(--ink);
  text-underline-offset: 0.35rem;
  text-decoration-thickness: 2px;
}

nav a[aria-current="page"] {
  color: var(--red);
  font-weight: 750;
}

.page {
  width: min(1180px, calc(100% - 2rem));
  min-height: 68vh;
  margin: 2rem auto 5rem;
}

.hero {
  padding: clamp(2.5rem, 8vw, 6.5rem);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background:
    radial-gradient(circle at 85% 20%, rgb(197 154 58 / 18%), transparent 25%),
    linear-gradient(135deg, var(--surface), #f3e5cf);
  box-shadow: var(--shadow);
}

.hero.compact {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--red);
  font-size: 0.77rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  max-width: 15ch;
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 0.98;
}

h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

p {
  line-height: 1.65;
}

.lead {
  max-width: 65ch;
  color: #4d433d;
  font-size: clamp(1.05rem, 2.5vw, 1.32rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.1rem;
  border: 2px solid var(--red);
  border-radius: 0.25rem;
  background: transparent;
  color: var(--red-dark);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--red);
  color: white;
}

.button.primary:hover {
  background: var(--red-dark);
}

.button.large {
  min-height: 3.5rem;
  padding-inline: 1.5rem;
  font-size: 1.05rem;
}

.button.disabled {
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.72;
  pointer-events: none;
}

.microcopy,
.hint,
.footnote {
  color: var(--muted);
  font-size: 0.87rem;
}

.notice,
.panel,
.identity-card,
.feature-grid article,
.stat {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.notice {
  margin-top: 1.25rem;
  padding: 1.5rem;
  border-left: 0.45rem solid var(--gold);
}

.feature-grid,
.stats-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid article {
  padding: 1.5rem;
}

.panel {
  padding: clamp(1.25rem, 4vw, 2.2rem);
  border-radius: 0.35rem;
}

.panel.narrow {
  max-width: 720px;
  margin-inline: auto;
}

.prose {
  max-width: 820px;
  margin-inline: auto;
}

.prose h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.prose p {
  max-width: 72ch;
}

.stack {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

label,
legend {
  font-weight: 750;
}

label .hint {
  display: block;
  margin: 0.25rem 0 0.5rem;
  font-weight: 400;
}

input[type="text"],
select {
  width: 100%;
  min-height: 3.1rem;
  margin-top: 0.45rem;
  padding: 0.7rem 0.8rem;
  border: 2px solid #aa9f91;
  border-radius: 0.25rem;
  background: white;
  color: var(--ink);
}

input:focus,
select:focus,
button:focus,
a:focus {
  outline: 3px solid rgb(23 79 102 / 35%);
  outline-offset: 3px;
}

fieldset {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
}

.radio,
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-weight: 500;
}

.radio input,
.check input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  flex: 0 0 auto;
}

.alert {
  margin: 1rem 0;
  padding: 1rem;
  border-left: 0.4rem solid;
  background: #fff2f2;
}

.alert.error {
  border-color: var(--error);
  color: #681414;
}

.flow-indicator {
  display: grid;
  max-width: 900px;
  margin: 0 auto 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--surface);
}

.flow-indicator span {
  padding: 0.8rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.85rem;
}

.flow-indicator .done {
  color: var(--success);
}

.flow-indicator .current {
  background: var(--red);
  color: white;
  font-weight: 800;
}

.dashboard-heading,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-heading {
  margin-bottom: 1.25rem;
}

.dashboard-heading h1 {
  max-width: 20ch;
  font-size: clamp(2rem, 5vw, 4rem);
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  min-height: 8.5rem;
  padding: 1.2rem;
  border-top: 0.3rem solid var(--red);
}

.stat span,
.identity-label {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat strong {
  font-family: Georgia, serif;
  font-size: 1.45rem;
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.badge {
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: #f3dfb2;
  color: #594311;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.message-list {
  display: grid;
  gap: 0.35rem;
}

.message {
  display: grid;
  gap: 0.8rem;
  padding: 1rem 0;
  grid-template-columns: auto 1fr;
  border-top: 1px solid var(--line);
}

.message p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.status-dot {
  width: 0.7rem;
  height: 0.7rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--red);
}

.task-list {
  display: grid;
  gap: 0.85rem;
  padding-left: 1.35rem;
}

.identity-card {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-left: 0.4rem solid var(--blue);
}

.identity-card code {
  font-size: 0.85rem;
}

.error-code {
  color: var(--red);
  font-weight: 900;
  letter-spacing: 0.1em;
}

.site-footer {
  padding: 2rem 1rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
}

.site-footer p {
  margin: 0.2rem;
}

@media (max-width: 800px) {
  .site-header,
  .dashboard-heading,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  nav {
    flex-wrap: wrap;
  }

  .feature-grid,
  .stats-grid,
  .dashboard-grid,
  .identity-card {
    grid-template-columns: 1fr;
  }

  .flow-indicator {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .page {
    width: min(100% - 1rem, 1180px);
    margin-top: 0.5rem;
  }

  .site-header {
    padding-inline: 0.75rem;
  }

  .parody-banner {
    font-size: 0.68rem;
  }

  .hero,
  .panel {
    padding: 1.15rem;
  }

  .actions {
    display: grid;
  }

  .button {
    width: 100%;
  }
}
