:root {
  --page: #f6f8fc;
  --surface: #ffffff;
  --ink: #071734;
  --muted: #4d5b73;
  --line: #d9e1ef;
  --line-soft: #edf1f7;
  --blue: #0757d8;
  --blue-dark: #053b95;
  --green: #168c55;
  --navy: #071734;
  --shadow: 0 12px 30px rgba(19, 35, 70, 0.08);
  --radius: 8px;
  --font-head: "Aptos Display", "Segoe UI", sans-serif;
  --font-body: "Aptos", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line-soft);
}

.shell-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-badge {
  display: none;
}

.brand-copy strong {
  display: block;
  font-family: var(--font-head);
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
}

.brand-copy small {
  display: none;
}

.nav-list,
.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a,
.footer-links a {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.button-primary {
  background: var(--blue);
  color: #fff;
}

.button-primary:hover {
  background: var(--blue-dark);
  color: #fff;
  text-decoration: none;
}

.button-secondary,
.button-outline,
.button-ghost {
  background: #fff;
  color: var(--blue);
  border-color: var(--line);
}

.button-block {
  width: 100%;
}

.button-small {
  min-height: 36px;
  padding: 0 14px;
}

.page-hero {
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
  padding: 28px 0 38px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumbs a {
  color: var(--blue);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
  gap: 54px;
  align-items: center;
}

.resource-page:not(.resource-type-money) .hero-layout {
  display: block;
  max-width: 760px;
}

.hero-main h1 {
  margin: 0 0 14px;
  max-width: 760px;
  font-family: var(--font-head);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: 0;
}

.resource-page:not(.resource-type-money) .hero-main h1 {
  font-size: clamp(32px, 4vw, 44px);
}

.hero-summary {
  max-width: 650px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-note,
.microcopy,
.privacy-note {
  color: var(--muted);
  font-size: 12px;
  margin: 10px 0 0;
}

.result-preview {
  position: relative;
}

.status-card,
.certificate-hero-card,
.article-panel,
.rail-card,
.resource-card,
.step-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.certificate-hero-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  background:
    radial-gradient(circle at 18% 10%, rgba(37, 99, 235, 0.10), transparent 26rem),
    #fff;
}

.certificate-hero-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 8px);
  box-shadow: 0 18px 42px rgba(15, 32, 66, 0.12);
}

.certificate-result-card {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  max-width: 300px;
  padding: 16px 18px;
  border: 1px solid rgba(181, 195, 215, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 54px rgba(15, 32, 66, 0.18);
  backdrop-filter: blur(12px);
}

.certificate-result-card h2 {
  margin: 0 0 3px;
  font-size: 28px;
}

.certificate-result-card p {
  margin: 0;
}

.status-card {
  padding: 22px;
}

.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e7f7ee;
  color: var(--green);
  font-weight: 800;
}

.status-label {
  margin: 16px 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-card h2 {
  margin: 0 0 6px;
  font-size: 26px;
}

.status-card ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.status-card li {
  position: relative;
  padding-left: 20px;
  margin: 8px 0;
  font-size: 13px;
}

.status-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.trust-band {
  background: #fff;
  padding: 30px 0;
  border-bottom: 1px solid var(--line-soft);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.trust-item {
  text-align: center;
}

.trust-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.trust-item strong {
  display: block;
  font-size: 13px;
}

.trust-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.page-content {
  padding: 34px 0;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}

.coi-page-type-hub .content-layout {
  display: block;
  max-width: 860px;
}

.article-panel {
  padding: 28px;
}

.action-rail {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 16px;
}

.rail-card {
  padding: 20px;
}

.rail-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.2;
}

.rail-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.upload-drop,
.pseudo-upload {
  display: grid;
  place-items: center;
  min-height: 118px;
  margin: 16px 0;
  padding: 18px;
  border: 1px dashed #aab9d2;
  border-radius: var(--radius);
  background: #f8fbff;
  color: var(--blue);
  text-align: center;
}

.upload-drop span,
.pseudo-upload span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e8f0ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.upload-drop strong,
.pseudo-upload strong {
  color: var(--blue);
  font-size: 13px;
}

.upload-drop small,
.pseudo-upload small {
  color: var(--muted);
  font-size: 11px;
}

.prose > h1:first-child {
  display: none;
}

.prose h2,
.prose h3,
.prose h4 {
  margin: 30px 0 12px;
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: 0;
}

.prose h2 {
  font-size: 24px;
}

.prose h3 {
  font-size: 18px;
}

.prose p,
.prose ul,
.prose ol,
.prose table {
  margin: 0 0 16px;
}

.prose ul,
.prose ol {
  padding-left: 20px;
}

.prose li {
  margin: 6px 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.prose th,
.prose td {
  padding: 13px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: #f8fbff;
  font-weight: 800;
}

.prose blockquote {
  margin: 22px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--blue);
  background: #f8fbff;
}

.how-section,
.resource-grid-section {
  padding: 28px 0;
}

.how-section h2,
.section-heading h2 {
  margin: 0 0 20px;
  font-family: var(--font-head);
  font-size: 26px;
  letter-spacing: 0;
}

.step-grid,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.step-card,
.resource-card {
  padding: 20px;
}

.step-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.step-card h3,
.resource-card h3 {
  margin: 12px 0 8px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.resource-card {
  display: block;
  color: var(--ink);
}

.step-card p,
.resource-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 36px;
  background: #fff;
  border-top: 1px solid var(--line-soft);
  padding: 32px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 32px;
}

.footer-brand {
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
}

.footer-copy,
.footer-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.coi-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 70;
}

.coi-modal.is-open {
  display: block;
}

.coi-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 23, 52, 0.55);
}

.coi-modal-panel {
  position: relative;
  width: min(720px, calc(100% - 32px));
  margin: 48px auto;
  padding: 26px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(7, 23, 52, 0.28);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.modal-copy h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.modal-copy p {
  margin: 0;
  color: var(--muted);
}

.lead-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.lead-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.lead-form input,
.lead-form select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
}

.checkbox-row,
.pseudo-upload,
.lead-form .button,
.form-status,
.privacy-note {
  grid-column: 1 / -1;
}

.checkbox-row {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
}

.checkbox-row input {
  width: auto;
  min-height: auto;
  margin-top: 4px;
}

.form-status {
  margin: 0;
  color: var(--green);
  min-height: 18px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 960px) {
  .shell-header {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .site-nav {
    width: 100%;
    order: 3;
  }

  .nav-list {
    gap: 16px;
  }

  .hero-layout,
  .content-layout,
  .footer-grid,
  .lead-form {
    grid-template-columns: 1fr;
  }

  .action-rail {
    position: static;
  }

  .result-preview,
  .trust-grid,
  .step-grid,
  .resource-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 1180px);
  }

  .page-hero {
    padding: 22px 0 30px;
  }

  .hero-main h1 {
    font-size: 34px;
  }

  .hero-actions {
    display: grid;
  }

  .result-preview,
  .trust-grid,
  .step-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .certificate-result-card {
    left: 20px;
    right: 20px;
    bottom: 20px;
    max-width: none;
  }

  .article-panel,
  .rail-card,
  .coi-modal-panel {
    padding: 18px;
  }
}
