:root {
  --bg: #edf2f7;
  --bg-strong: #e5ebf1;
  --surface: #ffffff;
  --surface-strong: #f7f9fb;
  --border: #d4dde7;
  --text: #17212b;
  --muted: #546272;
  --ink: #18344d;
  --ink-soft: #45607a;
  --accent: #204b73;
  --accent-soft: #dfe8f1;
  --mint: #9db4c8;
  --mint-deep: #204b73;
  --shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --page-width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
}

a {
  color: var(--ink);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.94em;
  padding: 0.08em 0.34em;
  border-radius: 6px;
  background: var(--accent-soft);
}

.backdrop {
  display: none;
}

.backdrop-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(11, 60, 73, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 60, 73, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.16), transparent 78%);
}

.backdrop-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.7;
}

.orb-a {
  top: -110px;
  left: -40px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(144, 211, 195, 0.7), rgba(144, 211, 195, 0));
}

.orb-b {
  right: -60px;
  top: 160px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(243, 192, 109, 0.48), rgba(243, 192, 109, 0));
}

.page-shell {
  position: relative;
  width: min(calc(100% - 32px), var(--page-width));
  margin: 0 auto;
  padding: 36px 0 52px;
}

.hero,
.panel {
  animation: none;
}

.hero {
  max-width: none;
  margin-bottom: 24px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.hero-brand {
  display: grid;
  gap: 6px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.quiz-panel .panel-kicker,
.result-panel > .panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(15, 35, 54, 0.2);
  border-radius: 999px;
  background: linear-gradient(180deg, #1f4a72 0%, #173a5d 100%);
  color: #ffffff;
  font-size: 0.86rem;
  letter-spacing: 0.09em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 18px rgba(24, 52, 77, 0.12);
}

.site-domain {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.hero h1 {
  margin: 0;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  font-size: clamp(2.7rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  max-width: none;
  white-space: nowrap;
  color: var(--ink);
}

.hero-copy {
  margin: 16px 0 0;
  max-width: 82ch;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.language-picker {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.language-label {
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.language-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.lang-button {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.lang-button:hover {
  border-color: var(--ink-soft);
  background: var(--surface-strong);
}

.lang-button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-meta span {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.trust-banner {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 10px 18px;
  align-items: start;
  margin-top: 22px;
  width: 100%;
  max-width: none;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.trust-banner p {
  margin: 0;
}

.trust-banner p:first-child {
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.trust-banner p:last-child {
  color: var(--muted);
  line-height: 1.7;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.info-stack {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.guide-links-home {
  margin-top: 22px;
}

.guide-links-header {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.guide-links-header h2 {
  margin: 0;
  font-size: 1.42rem;
  line-height: 1.25;
}

.guide-links-copy {
  margin: 0;
  max-width: 72ch;
  color: var(--muted);
  line-height: 1.7;
}

.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.guide-card {
  display: grid;
  gap: 8px;
  padding: 22px 24px;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.guide-card:hover {
  border-color: var(--ink-soft);
  transform: translateY(-2px);
}

.guide-card h3 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.35;
  color: var(--ink);
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.guide-page .page-shell {
  width: min(calc(100% - 32px), 980px);
}

.guide-page .hero {
  margin-bottom: 18px;
}

.guide-actions {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.guide-page .hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  white-space: normal;
}

.breadcrumb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.breadcrumb-row a {
  color: var(--ink-soft);
  text-decoration: none;
}

.breadcrumb-row a:hover {
  text-decoration: underline;
}

.guide-stack {
  display: grid;
  gap: 18px;
}

.guide-panel {
  padding: 24px 26px;
}

.guide-panel h2 {
  margin: 0 0 14px;
  font-size: 1.34rem;
  line-height: 1.25;
}

.guide-panel h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  line-height: 1.35;
}

.guide-panel p,
.guide-panel li {
  color: var(--muted);
  line-height: 1.72;
}

.guide-panel p {
  margin: 0;
}

.guide-summary-list,
.guide-link-list {
  margin: 0;
  padding-left: 18px;
}

.guide-summary-list li + li,
.guide-link-list li + li {
  margin-top: 8px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.guide-callout {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
}

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

.guide-table th {
  font-size: 0.94rem;
  color: var(--ink);
}

.guide-table td {
  color: var(--muted);
  line-height: 1.6;
}

.seo-panel {
  padding: 24px 26px;
}

.seo-panel h2 {
  margin: 0 0 14px;
  font-size: 1.34rem;
  line-height: 1.25;
}

.seo-copy {
  display: grid;
  gap: 14px;
}

.seo-copy p,
.faq-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.faq-list {
  display: grid;
  gap: 16px;
}

.faq-item {
  display: grid;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.faq-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.faq-item h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.35;
}

.faq-more {
  margin: 18px 0 0;
}

.site-footer {
  margin-top: 22px;
  padding: 20px 0 8px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
  gap: 18px 28px;
  align-items: start;
}

.footer-identity,
.footer-contact {
  display: grid;
  gap: 8px;
}

.footer-brand {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.footer-copy,
.footer-meta,
.footer-bottom {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.footer-copy {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.footer-meta {
  font-size: 0.94rem;
}

.footer-contact {
  justify-items: start;
}

.footer-meta a {
  color: inherit;
  text-decoration: none;
}

.footer-meta a:hover {
  text-decoration: underline;
}

.footer-bottom {
  font-size: 0.92rem;
}

.info-panel {
  padding: 24px 26px;
}

.info-panel h2 {
  margin: 0 0 14px;
  font-size: 1.34rem;
  line-height: 1.25;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.quiz-panel {
  padding: 28px;
}

.result-panel {
  position: sticky;
  top: 18px;
  overflow: hidden;
  padding: 26px;
  border-color: #c2d2e1;
  box-shadow: 0 18px 36px rgba(24, 52, 77, 0.09);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.result-panel.is-pending-state {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fb 100%);
}

.result-panel.is-ready {
  border-color: #89a7c3;
  background: linear-gradient(180deg, #f9fcff 0%, #eef5fb 100%);
  box-shadow:
    0 22px 40px rgba(24, 52, 77, 0.13),
    0 0 0 2px rgba(32, 75, 115, 0.08);
}

.result-panel.is-ready::before {
  content: "";
  display: block;
  height: 4px;
  margin: -26px -26px 18px;
  border-radius: calc(var(--radius-xl) - 1px) calc(var(--radius-xl) - 1px) 0 0;
  background: linear-gradient(90deg, #1d4a73 0%, #4f7294 100%);
}

.result-panel.is-external-state {
  border-color: #9cb0c5;
  background: linear-gradient(180deg, #f8fbfe 0%, #edf3f8 100%);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header h2,
.result-panel h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
}

.result-panel > .panel-kicker {
  display: flex;
  width: fit-content;
  margin-bottom: 14px;
}

.ghost-button {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.ghost-button:hover {
  border-color: var(--ink-soft);
  background: var(--surface-strong);
}

.progress-row {
  margin-bottom: 24px;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(24, 52, 77, 0.08);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 220ms ease;
}

.progress-row p {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

form {
  display: grid;
  gap: 18px;
}

.question-block,
.info-banner {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  padding: 20px;
  transition: opacity 200ms ease, transform 200ms ease;
}

.question-block.is-current {
  border-color: #8aa7c2;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5fb 100%);
  box-shadow:
    0 0 0 2px rgba(32, 75, 115, 0.08),
    0 16px 28px rgba(24, 52, 77, 0.08);
}

.question-block.is-current legend {
  background: linear-gradient(180deg, #dbe8f4 0%, #cedfed 100%);
  color: #102b44;
}

.question-block legend {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #eef4fa 0%, #e5edf6 100%);
  color: var(--ink);
  font-weight: 800;
  font-size: 1.08rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.question-hint,
.source-footnote,
.result-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.option-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 14px;
}

.option-grid.two-up {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.choice-card,
.toggle-pill {
  position: relative;
  display: block;
  cursor: pointer;
}

.choice-card input,
.toggle-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.choice-card:hover .choice-card-body,
.toggle-pill:hover span {
  border-color: var(--ink-soft);
}

.choice-card:has(input:checked) .choice-card-body {
  border-color: var(--accent);
  background: #f2f6fa;
  box-shadow: inset 0 0 0 1px rgba(32, 75, 115, 0.08);
}

.choice-title {
  font-weight: 700;
  line-height: 1.45;
}

.choice-copy {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.toggle-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.toggle-pill:has(input:checked) span {
  border-color: var(--accent);
  background: #f2f6fa;
  color: var(--ink);
}

.info-banner {
  color: var(--ink);
  background: #eef4f8;
  border-left: 4px solid var(--accent);
  line-height: 1.7;
}

.is-hidden {
  display: none;
}

.result-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 156px;
  max-width: 100%;
  padding: 18px 24px;
  margin: 10px 0 16px;
  border-radius: 14px;
  background: var(--ink);
  color: #ffffff;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.result-code.is-long-label {
  min-width: 0;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.25;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
}

.result-code.is-pending {
  background: #8b98a5;
  color: #ffffff;
}

.result-code.is-external {
  background: #405467;
}

.trail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 20px;
}

.trail-list span {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.result-section + .result-section {
  margin-top: 22px;
}

.result-section h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.detail-list,
.source-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.75;
}

.detail-list li + li,
.source-list li + li {
  margin-top: 8px;
}

.source-footnote {
  margin-top: 12px;
  font-size: 0.88rem;
}

.noscript-banner {
  margin: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #eef4f8;
  color: var(--ink);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .seo-grid {
    grid-template-columns: 1fr;
  }

  .guide-card-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .result-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--page-width));
    padding-top: 24px;
  }

  .hero h1 {
    max-width: none;
    white-space: normal;
    font-size: clamp(2.2rem, 12vw, 3.2rem);
  }

  .hero-top {
    flex-direction: column;
  }

  .trust-banner {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .language-picker,
  .language-buttons {
    justify-items: start;
    justify-content: flex-start;
  }

  .quiz-panel,
  .info-panel,
  .seo-panel,
  .result-panel {
    padding: 20px;
    border-radius: 24px;
  }

  .panel-header {
    flex-direction: column;
  }

  .toggle-row {
    flex-direction: column;
  }

  .toggle-pill span {
    width: 100%;
    justify-content: flex-start;
  }
}
