:root {
  --color: #173954;
  --paper: #f3f7fa;
  --surface: #dbebf2;
  --ink: #162f43;
  --muted: #466170;
  --accent: #1e597b;
  --highlight: #bce4f2;
}

:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  line-height: 1.55;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.frame { width: min(72rem, calc(100% - 4rem)); margin-inline: auto; }
[id] { scroll-margin-top: 1.4rem; }
.skip { position: fixed; z-index: 3; top: .7rem; left: .7rem; padding: .6rem .95rem; background: var(--highlight); color: var(--ink); transform: translateY(-200%); }
.skip:focus { transform: none; }

.masthead { background: var(--color); color: #fff; }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; min-height: 4.75rem; }
.header-inner { border-bottom: 1px solid #ffffff2e; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-size: 1.2rem; font-weight: 750; letter-spacing: -.03em; text-decoration: none; }
.brand-symbol { display: grid; place-items: center; width: 1.7rem; aspect-ratio: 1; border-radius: var(--symbol-radius, .4rem); background: var(--highlight); }
.brand-symbol::before { content: ""; width: .72rem; aspect-ratio: 1; border: 2px solid var(--color); border-radius: var(--symbol-inner, 50% 50% 50% 0); transform: rotate(var(--symbol-turn, 0deg)); }
nav { display: flex; gap: .5rem 1.5rem; flex-wrap: wrap; }
nav a { font-size: .94rem; text-decoration: none; text-underline-offset: .22em; }
nav a:hover { text-decoration: underline; }

.intro { background: var(--color); color: #fff; overflow: clip; }
.hero { display: grid; grid-template-columns: minmax(0,1.02fr) minmax(0,1fr); align-items: center; gap: clamp(1.5rem, 4.2vw, 4rem); min-height: 32rem; padding-block: clamp(2.4rem, 6vw, 5rem); }
.topic { font-size: .88rem; letter-spacing: .03em; font-weight: 650; margin-bottom: 1rem; }
.topic::before { content: ""; display: inline-block; width: .45rem; height: .45rem; margin-right: .55rem; border-radius: 50%; background: var(--highlight); vertical-align: .12em; }
h1 { font-size: clamp(2.75rem, 5.7vw, 5.65rem); line-height: .99; letter-spacing: -.067em; font-weight: 750; text-wrap: balance; }
h1 em { display: block; color: var(--highlight); font-style: normal; }
.lead { max-width: 39ch; margin-top: 1.3rem; font-size: clamp(1rem, 2vw, 1.18rem); }
.action { display: inline-flex; min-height: 3.1rem; align-items: center; margin-top: 1.5rem; padding: .65rem 1.05rem; border-radius: .65rem; background: var(--highlight); color: var(--ink); font-weight: 700; text-decoration: none; transition: translate .18s, filter .18s; }
.action:hover { translate: 0 -2px; filter: brightness(1.06); }
.action:focus-visible { outline-color: var(--highlight); }
.scene { position: relative; isolation: isolate; display: grid; place-items: center; min-width: 0; min-height: clamp(18rem, 31vw, 25rem); border-radius: 1.4rem; overflow: hidden; }
.visual-heading { display: flex; justify-content: space-between; gap: .45rem .8rem; flex-wrap: wrap; align-items: baseline; padding-bottom: .9rem; }
.visual-heading strong { font-size: clamp(1rem, 2.3vw, 1.3rem); letter-spacing: -.03em; }
.visual-heading span { font-size: .81rem; color: var(--muted); }
.amount-row, .amount-total { display: flex; align-items: baseline; justify-content: space-between; gap: .65rem; }
.amount-row b, .amount-total b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.check-icon { display: inline-grid; flex: 0 0 1.7rem; width: 1.7rem; aspect-ratio: 1; place-items: center; border-radius: .5rem; background: var(--highlight); color: var(--ink); }
.check-icon::before { content: ""; width: .63rem; height: .37rem; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateY(-.07rem) rotate(-45deg); }

.guide { display: grid; grid-template-columns: minmax(0,.86fr) minmax(0,1.14fr); align-items: start; gap: 1.5rem 3rem; padding-block: clamp(2.6rem, 6.7vw, 5.3rem); }
h2 { font-size: clamp(1.95rem, 4.2vw, 3.3rem); line-height: 1.08; letter-spacing: -.055em; text-wrap: balance; }
.guide-copy p { margin-top: .9rem; font-size: 1.06rem; color: var(--muted); max-width: 60ch; }
.notes { display: grid; gap: .7rem; padding: 0; margin: 0; list-style: none; }
.notes li { min-width: 0; padding: 1.1rem 1.2rem; border-radius: .9rem; background: #fff; border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); }
.notes h3 { font-size: 1.15rem; line-height: 1.26; letter-spacing: -.02em; }
.notes p, .preparation label > span > span { color: var(--muted); margin-top: .38rem; }
.source { grid-column: 1/-1; color: var(--ink); border-radius: .78rem; background: var(--surface); padding: 1.1rem 1.25rem; }
.source a { font-weight: 700; color: var(--accent); text-underline-offset: .2em; }
.source a:hover { text-decoration-thickness: 2px; }
.faq { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 1rem 2rem; padding-bottom: clamp(3rem, 7vw, 5rem); }
.answers { border-top: 1px solid color-mix(in srgb, var(--accent) 26%, transparent); }
details { border-bottom: 1px solid color-mix(in srgb, var(--accent) 26%, transparent); }
summary { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding-block: .88rem; cursor: pointer; list-style: none; font-weight: 700; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; display: block; color: var(--accent); font-size: 1.45rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin: 0 1rem 1rem 0; color: var(--muted); }
.footer { border-top: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); }
.footer-inner > span { color: var(--muted); font-size: .9rem; }

@keyframes arrive {
  from { opacity: 0; translate: 0 1.2rem; }
  to { opacity: 1; translate: none; }
}

.form { --symbol-radius: .62rem; --symbol-inner: .08rem; }
.form .masthead { background: var(--paper); color: var(--ink); }
.form .header-inner { border-color: #1e597b30; }
.form .intro { background: linear-gradient(120deg, #e1eff6, #f3f7fa 65%); color: var(--ink); }
.form h1 em { color: var(--accent); }
.form .topic::before { background: var(--accent); }
.form .scene { background: radial-gradient(circle at 52% 30%, #e1f7ff, #a5cbd9 80%); }
.form .action { color: #fff; background: var(--accent); }
.form .action:focus-visible { outline-color: var(--accent); }
.form-window { width: min(88%, 28rem); padding: clamp(.85rem, 2.8vw, 1.35rem); border-radius: .9rem; background: #fbfdff; color: var(--ink); box-shadow: 0 .9rem 2.8rem #17445b3d; }
.form-steps { display: grid; gap: .45rem; }
.form-step { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem; border: 1px solid #1e597b27; border-radius: .45rem; animation: arrive .55s calc(var(--step) * 130ms) ease-out both; }
.form-step > span { display: grid; place-items: center; width: 1.75rem; aspect-ratio: 1; border-radius: .3rem; background: var(--highlight); font-weight: 700; }
.form-step small { display: block; color: var(--muted); font-size: .8rem; }
.form .guide { grid-template-columns: 1fr; }
.form .notes { grid-template-columns: repeat(3,minmax(0,1fr)); counter-reset: form-step; }
.form .notes li { counter-increment: form-step; }
.form .notes li::before { content: counter(form-step); display: grid; place-items: center; width: 2rem; aspect-ratio: 1; margin-bottom: .75rem; border-radius: .38rem; background: var(--highlight); font-weight: 750; }

@media (max-width: 51rem) {
  .frame { width: calc(100% - 2.4rem); }
  .hero { min-height: 0; gap: 1.6rem; }
  h1 { font-size: clamp(2.6rem, 6.5vw, 4.3rem); }
  .guide { gap: 1.3rem 1.7rem; }
  .transfer .scene { display: flex; align-items: center; justify-content: center; gap: .65rem; padding: .75rem; }
  .transfer .device { width: min(58%, 13rem); flex-shrink: 0; margin-left: 0; }
  .transfer .send-card { position: relative; top: auto; left: auto; }
}

@media (max-width: 43rem) {
  .frame { width: calc(100% - 2rem); }
  .header-inner { min-height: 0; padding-block: .86rem; flex-wrap: wrap; gap: .55rem 1rem; }
  nav { gap: .28rem .85rem; }
  .hero, .timeline .hero, .guide, .faq { grid-template-columns: minmax(0,1fr); }
  .hero { gap: 1.55rem; padding-block: 2.5rem 2rem; }
  h1 { font-size: clamp(2.5rem, 9.65vw, 4.22rem); }
  .scene, .equation .scene, .transfer .scene { order: 0; min-height: 16.5rem; }
  .transfer .scene { min-height: 17.4rem; }
  .guide { gap: 1rem; }
  .receipt .notes, .form .notes, .schedule .notes { grid-template-columns: minmax(0,1fr); }
  .footer-inner { flex-wrap: wrap; min-height: 0; gap: .4rem 1rem; padding-block: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .action:hover { translate: none; }
}

/* Sitemap navigation */
.footer-sitemap {
  color: var(--muted);
  font-size: .9rem;
  text-underline-offset: .22em;
}

.footer-sitemap:hover { color: var(--ink); }

.site-map {
  width: min(46rem, calc(100% - 2rem));
  margin: clamp(2rem, 7vw, 5rem) auto;
  padding: clamp(1.25rem, 5vw, 3rem);
  background: var(--surface, #eee9fb);
  border-radius: 1.25rem;
}

.site-map-back { color: var(--muted); text-underline-offset: .2em; }

.site-map h1 {
  font-size: clamp(2.4rem, 7.5vw, 4rem);
  margin-block: 1.25rem;
}

.site-map ul { display: grid; gap: .6rem; padding-inline-start: 1.25rem; margin: 0; }
.site-map li a { color: var(--accent, #50318b); font-weight: 650; text-underline-offset: .22em; }
