:root {
  color-scheme: light;
  --text: #171717;
  --muted: #606060;
  --line: #dedad2;
  --soft: #f7f5f0;
  --soft-2: #fbfaf7;
  --red: #c53a36;
  --red-dark: #a82d2a;
  --amber: #aa6a10;
  --blue: #315f93;
  --green: #28715f;
  --black: #111;
  --white: #fff;
  --shadow: 0 18px 42px rgba(23, 23, 23, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: var(--black);
  border-radius: 6px;
  font-family: Georgia, serif;
}

.nav-links {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a,
.header-contact {
  text-decoration: none;
}

.header-contact {
  padding: 8px 14px;
  color: #fff;
  background: var(--black);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
}

.hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: center;
  min-height: min(calc(100vh - 64px), 780px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 24px;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font-size: 56px;
  line-height: 1.08;
  letter-spacing: 0;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  max-width: 720px;
  margin: 24px 0 0;
  font-size: 22px;
  font-weight: 800;
}

.context {
  max-width: 740px;
  margin: 16px 0 0;
  color: var(--muted);
}

.hero-actions,
.panel-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
}

.btn.primary {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

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

.btn.secondary {
  color: var(--text);
  background: #fff;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.trust-row span,
.artifact-chip {
  min-height: 36px;
  padding: 7px 11px;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.notice,
.microcopy {
  color: var(--muted);
  font-size: 13px;
}

.maker-panel {
  width: 100%;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.panel-top h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.3;
}

.question-count {
  display: inline-grid;
  min-width: 58px;
  min-height: 38px;
  place-items: center;
  color: #fff;
  background: var(--black);
  border-radius: 8px;
  font-weight: 900;
}

.panel-guide,
.question-help {
  color: var(--muted);
}

.progress-track {
  height: 8px;
  margin: 22px 0;
  overflow: hidden;
  background: var(--soft);
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--red);
  transition: width 180ms ease;
}

.option-list {
  display: grid;
  gap: 10px;
}

.option-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 14px 16px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.option-button::after {
  content: "";
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-radius: 50%;
}

.option-button.selected {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
}

.option-button.selected::after {
  background: radial-gradient(circle at center, var(--red) 0 42%, transparent 44%);
  border-color: var(--red);
}

.result-section,
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 24px;
}

.muted-section {
  max-width: none;
  background: var(--soft-2);
}

.muted-section > * {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.section-heading {
  max-width: 900px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.22;
}

.section-heading p:not(.eyebrow) {
  margin: 16px 0 0;
  color: var(--muted);
  white-space: nowrap;
}

.result-placeholder {
  max-width: 820px;
  margin: 0 auto;
  padding: 26px;
  color: var(--muted);
  background: var(--soft-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-content {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.result-header {
  min-width: 0;
  padding: 28px;
  background: var(--black);
  color: #fff;
  border-radius: 8px;
}

.result-header h3 {
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
}

.result-header p {
  margin: 12px 0 0;
  color: #e8e8e8;
}

.result-grid,
.artifact-grid,
.answer-grid,
.policy-grid,
.reference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

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

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

.result-card,
.artifact-card,
.answer-grid article,
.reference-grid article {
  min-width: 0;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-card h4,
.artifact-card h3,
.answer-grid h3,
.reference-grid h3 {
  margin: 12px 0 8px;
  font-size: 21px;
  line-height: 1.35;
}

.result-card p,
.artifact-card p,
.answer-grid p,
.reference-grid p {
  margin: 0;
  color: var(--muted);
}

.result-card ul,
.draft-box ul,
.draft-box ol {
  margin: 10px 0 0;
  padding-left: 1.4em;
}

.draft-box {
  min-width: 0;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.draft-box h3 {
  margin: 0 0 16px;
  font-size: 28px;
}

.draft-box p {
  margin: 8px 0;
}

.draft-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.draft-meta p {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  background: var(--soft-2);
}

.draft-meta strong {
  color: var(--muted);
}

.chapter-title {
  margin: 30px 0 12px;
  padding: 12px 14px;
  color: #fff;
  background: var(--black);
  border-radius: 8px;
  font-size: 18px;
}

.policy-article {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.policy-article h5 {
  margin: 0 0 10px;
  font-size: 20px;
}

.policy-article p {
  position: relative;
  margin: 8px 0;
  padding-left: 34px;
}

.clause-number {
  position: absolute;
  left: 0;
  top: 0.1em;
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.draft-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.draft-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
}

.draft-table th,
.draft-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.draft-table th {
  background: var(--soft);
  font-weight: 900;
}

.draft-table tr:last-child td {
  border-bottom: 0;
}

.policy-grid > div {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.policy-grid strong {
  font-size: 18px;
}

.policy-grid span {
  color: var(--muted);
}

.status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 4px 9px;
  color: #fff;
  background: var(--blue);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}

.status.red {
  background: var(--red);
}

.status.amber {
  background: var(--amber);
}

.status.blue {
  background: var(--blue);
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}

details {
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

summary {
  cursor: pointer;
  font-weight: 900;
}

details p {
  margin: 10px 0 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 24px;
  color: var(--muted);
  background: var(--soft);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 4px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 14px;
}

.simple-page {
  background: var(--soft-2);
}

.not-found {
  max-width: 720px;
  margin: 80px auto;
  padding: 32px;
}

@media (max-width: 980px) {
  .hero,
  .result-grid,
  .answer-grid,
  .policy-grid,
  .reference-grid,
  .artifact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 44px;
  }

  .section-heading p:not(.eyebrow) {
    white-space: normal;
  }
}

@media (max-width: 720px) {
  .site-header {
    height: auto;
    min-height: 64px;
    padding: 12px 16px;
  }

  .nav-links {
    display: none;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .lead {
    font-size: 19px;
  }

  .maker-panel {
    padding: 20px;
  }

  .panel-top h2 {
    font-size: 24px;
  }

  .section-heading h2 {
    font-size: 30px;
  }

  .result-section,
  .section {
    padding: 54px 18px;
  }

  .site-footer {
    display: grid;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .draft-meta {
    grid-template-columns: 1fr;
  }

  .draft-meta p {
    grid-template-columns: 92px 1fr;
  }

  .draft-table {
    min-width: 540px;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  body {
    font-size: 11pt;
  }

  .site-header,
  .hero,
  .result-section .section-heading,
  .section,
  .site-footer,
  .result-actions {
    display: none !important;
  }

  .result-section {
    max-width: none;
    padding: 0;
  }

  .result-content {
    display: block;
  }

  .draft-box,
  .result-card,
  .result-header {
    break-inside: avoid;
    box-shadow: none;
  }
}
