:root {
  --bg: #dee7f9;
  --surface: #ffffff;
  --ink: #333333;
  --ink-soft: #555555;
  --ink-muted: #6b7a99;
  --line: rgba(51, 71, 142, 0.15);
  --line-strong: rgba(51, 71, 142, 0.25);
  --panel: rgba(255, 255, 255, 0.97);
  --primary: #33478e;
  --primary-hover: #3d54a3;
  --accent: #1176d4;
  --accent-soft: rgba(17, 118, 212, 0.08);
  --warn: #a35a00;
  --warn-bg: #fff8ef;
  --danger: #b02323;
  --footer-bg: #1f266b;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.reveal {
  animation: revealUp 0.5s ease both;
}

.delay-1 {
  animation-delay: 0.06s;
}

.delay-2 {
  animation-delay: 0.12s;
}

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

/* --- Typography --- */

h1,
h2,
h3 {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  letter-spacing: 0.01em;
}

h1 {
  margin-top: 10px;
  font-size: clamp(26px, 4.8vw, 38px);
  line-height: 1.3;
  color: var(--primary);
}

h2 {
  font-size: 21px;
  margin-bottom: 8px;
  color: var(--primary);
}

h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

/* --- Panel --- */

.panel {
  margin-top: 16px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* --- Site Nav --- */

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background: #1f266b;
}

.site-nav-brand {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.site-nav-brand:hover {
  opacity: 0.9;
}

.site-nav-link {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav-link:hover {
  color: #ffffff;
}

/* --- Hero --- */

.hero {
  margin-top: 0;
  padding: 32px 28px;
}

.hero-grid {
  display: block;
}

.eyebrow {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.lead {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.8;
}

.section-lead {
  margin: 0 0 14px;
  color: var(--ink-soft);
}

/* --- Trust Chips --- */

.trust-chips {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
}

/* --- Hero Form --- */

.hero-form {
  margin-top: 20px;
  display: flex;
  gap: 8px;
}

.hero-form input {
  flex: 1;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s;
}

.hero-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(17, 118, 212, 0.15);
}

.hero-form input::placeholder {
  color: var(--ink-muted);
  font-size: 13px;
}

/* --- Extended Hero Form --- */
.hero-form-extended {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-query {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

.hero-form-extended input {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s;
}

.hero-form-extended input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(17, 118, 212, 0.15);
}

.hero-form-extended input::placeholder {
  color: var(--ink-muted);
  font-size: 13px;
}

.btn-text {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-text:hover {
  color: var(--primary);
}

.extra-fields {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.extra-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

.extra-fields select {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
}

.extra-fields select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(17, 118, 212, 0.15);
}

/* --- Sample Card --- */

/* --- Buttons --- */

.btn {
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, box-shadow 0.15s;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
  filter: brightness(1.15);
}

/* --- Loading Spinner --- */

.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}

.btn-loading::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.btn-ghost {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover {
  background: var(--bg);
}

/* --- Info Cards --- */

.triple-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
}

.info-icon {
  margin-bottom: 10px;
  color: var(--accent);
}

.info-card p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* --- Expert --- */

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

.expert-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
}

.expert-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 50%;
  color: var(--ink-soft);
}

.expert-name {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 15px;
}

.expert-desc {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* --- Logic / Transparency --- */

.logic-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.logic-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
}

.logic-card h3 {
  font-size: 14px;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.logic-card p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.disclaimer {
  margin: 0;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--bg);
  border-radius: 6px;
  border-left: 3px solid var(--primary);
}

/* --- System Messages --- */

.system-message {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  border-radius: 6px;
  font-size: 14px;
}

.system-message.warn {
  border-color: rgba(163, 90, 0, 0.4);
  background: var(--warn-bg);
}

.system-message.error {
  border-color: rgba(176, 35, 35, 0.4);
  background: #fff0f0;
}

.captcha-box {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: var(--bg);
}

#captcha-widget {
  min-height: 70px;
}

.hidden {
  display: none;
}

/* --- Result Screen --- */

.result-top {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.score-card,
.card,
.benefit-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}

.score-card {
  background: linear-gradient(155deg, #ffffff 0%, #e8f0fe 50%, #d8ffff 100%);
  text-align: center;
  padding: 36px 48px;
  max-width: 520px;
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(51, 71, 142, 0.12);
}

.score-label {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.score-main {
  margin: 8px 0 12px;
  font-size: 72px;
  line-height: 1;
  color: var(--primary);
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
}

.rank-letter {
  margin: 0;
  font-size: 64px;
  line-height: 1;
  color: var(--primary);
  font-weight: 700;
}

.rank-message {
  margin: 0;
  font-size: 18px;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.5;
}

.rank-criteria {
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--ink-soft);
}

.rank-row-letter {
  font-weight: 700;
  font-size: 15px;
  min-width: 24px;
  color: var(--ink-muted);
}

.rank-row-desc {
  color: var(--ink-soft);
}

.rank-active {
  background: var(--primary);
  border-radius: 6px;
  color: #fff;
}

.rank-active .rank-row-letter,
.rank-active .rank-row-desc {
  color: #fff;
  font-weight: 700;
}

.score-comment {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.title {
  margin: 0 0 8px;
  font-weight: 700;
}

.benefit-box {
  margin-top: 12px;
  background: linear-gradient(155deg, #ffffff 0%, #e8f0fe 50%, #d8ffff 100%);
}

.cta-stack {
  margin-top: 14px;
}

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

/* --- Detailed Report --- */

.detailed-report-area {
  margin-top: 16px;
}

.detailed-report-area .btn {
  width: 100%;
}

#detailed-report {
  margin-top: 12px;
}

.report-section {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.report-section:last-child {
  border-bottom: 0;
}

.report-section h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.report-section p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}


/* --- Registration Accordion --- */

.registration-accordion {
  margin-top: 12px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.registration-accordion.hidden {
  display: none;
}

.registration-form-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 24px;
}

.prefill-info {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: 6px;
  border-left: 3px solid var(--primary);
}

.prefill-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prefill-row {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.prefill-row span:first-child {
  font-weight: 500;
  color: var(--ink);
  min-width: 80px;
}

.reg-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reg-form select {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
}

.reg-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(17, 118, 212, 0.15);
}

.reg-status {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
}

.reg-status.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.reg-status.error {
  background: #fce4ec;
  color: #c62828;
}

/* --- Email Form --- */

.email-form-area {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.email-form-area h3 {
  margin-bottom: 12px;
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.email-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

.email-form input[type="email"],
.email-form input[type="text"] {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
}

.email-form input[type="email"]:focus,
.email-form input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(17, 118, 212, 0.15);
}

.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  gap: 6px !important;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.required {
  color: var(--danger);
}

/* --- FAQ --- */

details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

details:last-child {
  padding-bottom: 0;
}

summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

summary:hover {
  color: var(--primary);
}

details p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

/* --- Caution --- */

.caution {
  border-color: rgba(163, 90, 0, 0.25);
  background: var(--warn-bg);
}

/* --- Misc --- */

ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

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

.small {
  font-size: 13px;
  color: var(--ink-muted);
}

/* --- Responsive --- */

@media (max-width: 860px) {
  .hero-grid,
  .result-top,
  .triple-grid,
  .result-grid,
  .expert-grid {
    grid-template-columns: 1fr;
  }

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

  .container {
    padding: 16px 14px 48px;
  }

  .hero {
    padding: 20px 18px;
  }

  .panel {
    padding: 18px;
  }

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

  .form-row-2col {
    grid-template-columns: 1fr;
  }

  .form-row-query {
    flex-direction: column;
  }

  .form-row-query .btn {
    width: 100%;
  }

  .score-main {
    font-size: 56px;
  }

  .score-card {
    padding: 28px 24px;
  }
}
