/* Components for the acquisition funnel. Tokens come from styles.css. */

:root {
  --funnel-paper: #f6f9fe;
  --funnel-ink-soft: #33435f;
  --funnel-rule: #c9d9f0;
  --duration-fast: 150ms;
  --duration-normal: 320ms;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Shared navigation */
.page-top {
  text-decoration: none;
}

.mobile-cta {
  display: none;
}

@media (max-width: 720px) {
  body {
    padding-bottom: 68px;
  }

  .site-header {
    position: static;
  }

  .site-header__inner {
    gap: 8px;
    padding: 12px 0 0;
  }

  .global-nav {
    display: flex;
    width: 100%;
    gap: 18px;
    padding: 6px 0 12px;
    overflow-x: auto;
    font-size: 13px;
    scrollbar-width: none;
  }

  .global-nav::-webkit-scrollbar {
    display: none;
  }

  .mobile-cta {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 24px rgba(14, 54, 111, 0.14);
  }

  .mobile-cta a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
  }

  .mobile-cta__check {
    color: var(--blue-2);
    border: 1px solid var(--blue-2);
    background: #fff;
  }

  .mobile-cta__line {
    color: #fff;
    background: var(--blue-2);
  }
}

/* Home: FAQ with visible answers */
.faq-item {
  margin-bottom: 7px;
  border: 1px solid #d5e2f4;
  border-radius: 4px;
  background: #fff;
}

.faq-item summary {
  min-height: 34px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #121d34;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: #09275c;
  font-size: 17px;
  font-weight: 900;
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-item p {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--funnel-ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

/* Home: self-check entry and guides */
.check-band {
  background: var(--navy);
  color: #fff;
}

.check-band__inner {
  width: min(100% - 96px, 1220px);
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  gap: 48px;
}

.check-band h2 {
  margin: 0 0 12px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.35;
  font-weight: 900;
}

.check-band p {
  margin: 0;
  color: #d7e4f8;
  font-size: 15px;
  line-height: 1.85;
}

.check-band__action {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.check-band .btn {
  min-height: 52px;
  padding: 0 28px;
  color: var(--navy);
  background: #fff;
  box-shadow: none;
  transition: transform var(--duration-fast) var(--ease-out-expo);
}

.check-band .btn:hover {
  transform: translateY(-2px);
}

.check-band__note {
  font-size: 12px !important;
}

.guide-links {
  border-top: 2px solid var(--navy);
}

.guide-links a {
  padding: 20px 4px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid var(--funnel-rule);
  color: var(--navy);
  text-decoration: none;
  transition: background-color var(--duration-fast) ease, padding var(--duration-fast) ease;
}

.guide-links a:hover {
  background: var(--blue-soft);
}

.guide-links__num {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.guide-links strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 900;
}

.guide-links small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.guide-links__arrow {
  color: var(--blue);
  font-weight: 900;
}

/* Article */
.article-page {
  width: min(100% - 40px, 760px);
  margin: 0 auto;
  padding: 36px 0 64px;
}

.breadcrumb {
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  list-style: none;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
}

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

.article-page h1 {
  margin: 0 0 16px;
  color: var(--navy);
  font-size: clamp(27px, 4.4vw, 38px);
  line-height: 1.4;
  font-weight: 900;
}

.article-meta {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.article-body {
  color: #1a2846;
  font-size: 16px;
  line-height: 1.95;
}

.article-body h2 {
  margin: 48px 0 14px;
  padding-top: 14px;
  border-top: 2px solid var(--navy);
  color: var(--navy);
  font-size: 23px;
  line-height: 1.5;
  font-weight: 900;
  scroll-margin-top: 90px;
}

.article-body h3 {
  margin: 28px 0 8px;
  color: var(--navy);
  font-size: 18px;
  font-weight: 900;
}

.article-body a {
  color: var(--blue-2);
  font-weight: 700;
}

.article-body ul,
.article-body ol {
  padding-left: 1.4em;
}

.article-body li + li {
  margin-top: 6px;
}

.answer-box {
  margin: 0 0 8px;
  padding: 20px 22px;
  border-left: 5px solid var(--blue);
  background: var(--blue-soft);
}

.answer-box > span {
  display: block;
  margin-bottom: 4px;
  color: var(--blue-2);
  font-size: 13px;
  font-weight: 900;
}

.answer-box p {
  margin: 0;
  font-weight: 650;
}

.table-scroll {
  margin: 18px 0;
  overflow-x: auto;
}

.table-scroll table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.7;
}

.table-scroll th,
.table-scroll td {
  padding: 10px 12px;
  border: 1px solid var(--funnel-rule);
  text-align: left;
  vertical-align: top;
}

.table-scroll thead th {
  color: #fff;
  background: var(--navy-2);
}

.table-scroll tbody th {
  background: var(--funnel-paper);
}

/* Short tables that should fit a phone screen without sideways scrolling */
.table-scroll--fit table {
  min-width: 0;
}

@media (max-width: 480px) {
  .table-scroll--fit th,
  .table-scroll--fit td {
    padding: 8px 9px;
    font-size: 13px;
  }
}

.article-cta {
  margin: 48px 0 0;
  padding: 26px;
  border-radius: 8px;
  color: #fff;
  background: var(--navy);
}

.article-cta h2 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  color: #fff;
  font-size: 21px;
}

.article-cta p {
  margin: 0 0 16px;
  color: #d7e4f8;
  font-size: 15px;
  line-height: 1.8;
}

.article-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.article-cta__actions a {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.article-cta__primary {
  color: var(--navy);
  background: #fff;
}

.article-cta__secondary {
  color: #fff;
  border: 1px solid #8fb2e6;
}

.source-list {
  margin-top: 40px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.source-list h2 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-size: 15px;
}

/* Self-check */
.check-page {
  width: min(100% - 48px, 1120px);
  margin: 0 auto;
  padding: 44px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  align-items: start;
  gap: 56px;
}

.check-intro {
  position: sticky;
  top: 94px;
}

.check-intro h1 {
  margin: 0 0 16px;
  color: var(--navy);
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.32;
  font-weight: 900;
}

.check-intro p {
  margin: 0 0 16px;
  color: var(--funnel-ink-soft);
  font-size: 15px;
  line-height: 1.85;
}

.check-progress {
  margin: 22px 0 12px;
}

.check-progress span {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
  font-size: 24px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.check-progress__track {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--line);
}

.check-progress__bar {
  height: 100%;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.check-privacy {
  font-size: 12px !important;
  color: var(--muted) !important;
}

.check-area-title {
  margin: 34px 0 10px;
  color: var(--blue-2);
  font-size: 14px;
  font-weight: 900;
}

.check-area-title:first-child {
  margin-top: 0;
}

.check-question {
  margin: 0 0 12px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.check-question legend {
  float: left;
  width: 100%;
  margin-bottom: 12px;
  padding: 0;
  color: var(--navy);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 800;
}

.check-options {
  clear: both;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.check-options label {
  position: relative;
  cursor: pointer;
}

.check-options input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
}

.check-options span {
  min-height: 44px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--funnel-rule);
  border-radius: 6px;
  color: var(--funnel-ink-soft);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease;
}

.check-options label:hover span {
  border-color: var(--blue);
}

.check-options input:checked + span {
  border-color: var(--blue-2);
  color: #fff;
  background: var(--blue-2);
}

.check-submit {
  width: 100%;
  min-height: 56px;
  margin-top: 12px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--navy);
  font: inherit;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  transition: background-color var(--duration-fast) ease;
}

.check-submit:hover {
  background: var(--blue-2);
}

.check-error {
  margin: 10px 0 0;
  color: #b42318;
  font-size: 14px;
  font-weight: 800;
}

.check-result {
  margin-top: 36px;
  padding: 30px;
  border-radius: 8px;
  color: #fff;
  background: var(--navy);
  scroll-margin-top: 90px;
}

.check-result h2 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 900;
  outline: none;
}

.result-score {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.result-score b {
  font-size: 68px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.result-score small {
  font-size: 18px;
  font-weight: 800;
}

.result-score strong {
  font-size: 21px;
  font-weight: 900;
}

.check-result p {
  color: #d7e4f8;
  font-size: 15px;
  line-height: 1.85;
}

.result-areas {
  margin: 22px 0;
  padding: 0;
  list-style: none;
}

.result-areas li {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  font-size: 14px;
  font-weight: 700;
}

.area-track {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
}

.area-bar {
  display: block;
  height: 100%;
  background: #7fb0ff;
  transform-origin: left;
}

.result-priority {
  padding: 18px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.result-priority h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 900;
}

.result-priority p {
  margin: 0 0 8px;
}

.result-priority a {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.result-next h3 {
  margin: 24px 0 6px;
  font-size: 18px;
  font-weight: 900;
}

.result-steps {
  margin: 14px 0;
  display: grid;
  gap: 10px;
}

.result-steps a,
.result-steps button {
  width: 100%;
  min-height: 50px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #8fb2e6;
  border-radius: 7px;
  color: #fff;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.result-steps .result-step-primary {
  border-color: #fff;
  color: var(--navy);
  background: #fff;
}

.result-note {
  margin: 0;
  font-size: 12px !important;
}

@media (max-width: 900px) {
  .check-page {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 28px;
  }

  .check-intro {
    position: static;
  }

  .check-band__inner {
    width: calc(100% - 40px);
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 36px 0;
  }
}

@media (max-width: 720px) {
  .check-page {
    width: calc(100% - 32px);
  }

  .check-question {
    padding: 16px;
  }

  .check-result {
    padding: 24px 18px;
  }

  .guide-links a {
    grid-template-columns: 34px 1fr;
  }

  .guide-links__arrow {
    display: none;
  }

  .article-body {
    font-size: 15.5px;
  }
}

/* Link-in-bio page */
.start-page {
  width: min(100% - 32px, 480px);
  margin: 0 auto;
  padding: 36px 0 44px;
}

.start-brand {
  margin: 0 0 18px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 900;
}

.start-page h1 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 29px;
  line-height: 1.4;
  font-weight: 900;
}

.start-lead {
  margin: 0 0 24px;
  color: var(--funnel-ink-soft);
  font-size: 15px;
  line-height: 1.8;
}

.start-primary {
  margin-bottom: 10px;
  padding: 18px;
  display: block;
  border-radius: 8px;
  color: #fff;
  background: var(--navy);
  text-decoration: none;
}

.start-primary strong {
  display: block;
  font-size: 18px;
  font-weight: 900;
}

.start-primary small {
  color: #d7e4f8;
  font-size: 13px;
}

.start-secondary {
  margin-bottom: 8px;
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--funnel-rule);
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.start-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Keep Japanese headings from breaking inside a word where the browser supports it. */
.article-page h1,
.check-intro h1,
.start-page h1,
.check-band h2,
.article-body h2,
.answer-box p {
  word-break: auto-phrase;
  text-wrap: pretty;
}

/* Tablet header: the navigation moves to its own row so the CTA stays on screen. */
@media (min-width: 721px) and (max-width: 960px) {
  .site-header {
    height: auto;
  }

  .site-header__inner {
    flex-wrap: wrap;
    gap: 6px 18px;
    padding: 10px 0;
  }

  .brand {
    flex: 1 1 auto;
  }

  .global-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    font-size: 13px;
  }
}

/* Long Japanese card text has no <br> outside the home page, so it must be able to wrap. */
.service-card {
  min-width: 0;
}

.service-card p {
  word-break: normal;
  overflow-wrap: anywhere;
}

.service-card h2 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.4;
}

@media (max-width: 360px) {
  .hero-copy {
    min-width: 0;
  }

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

/* Self-check validation: visible for mouse and touch users, not only keyboard focus. */
.check-question.is-missing {
  border: 2px solid #b42318;
}

.check-question.is-missing legend::after {
  content: "未回答";
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 4px;
  color: #fff;
  background: #b42318;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.check-options input:focus + span {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* Keep focused elements clear of the fixed mobile CTA bar. */
@media (max-width: 720px) {
  html {
    scroll-padding-bottom: 84px;
  }
}
