:root {
  --fp-ink: #102a43;
  --fp-deep: #08233a;
  --fp-olive: #153B5B;
  --fp-olive-light: #e5eef5;
  --fp-gold: #D5A326;
  --fp-gold-dark: #765800;
  --fp-paper: #f5f8fb;
  --fp-card: #ffffff;
  --fp-muted: #465f73;
  --fp-border: #c8d7e3;
  --fp-danger: #9f2d27;
  --fp-shadow: 0 24px 70px rgba(8, 35, 58, .14);
}

html { scroll-behavior: smooth; }
.fp-body { margin: 0; color: var(--fp-ink); background: radial-gradient(circle at 94% 2%, rgba(213,163,38,.14), transparent 26rem), var(--fp-paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.fp-body *, .fp-body *::before, .fp-body *::after { box-sizing: border-box; }
.fp-body a { color: inherit; }
.fp-body button, .fp-body input, .fp-body select { font: inherit; }
.fp-body button, .fp-body select, .fp-body a { touch-action: manipulation; }
[hidden] { display: none !important; }
.fp-skip { position: fixed; z-index: 100; top: .6rem; left: .6rem; padding: .75rem 1rem; color: #fff; background: var(--fp-deep); border-radius: .7rem; transform: translateY(-160%); }
.fp-skip:focus { transform: none; }
.fp-header { position: sticky; z-index: 40; top: 0; border-bottom: 1px solid rgba(200,215,227,.95); background: rgba(245,248,251,.94); backdrop-filter: blur(16px); }
.fp-header-inner { width: min(1180px, calc(100% - 2rem)); min-height: 76px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; }
.fp-brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 950; letter-spacing: -.03em; text-decoration: none; white-space: nowrap; }
.fp-brand small { display: block; color: var(--fp-muted); font-size: .67rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.fp-logo { width: 46px; height: 54px; display: block; flex: 0 0 auto; object-fit: contain; }
.fp-nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.fp-nav a { min-height: 44px; padding: .65rem .8rem; display: inline-flex; align-items: center; border-radius: .75rem; color: #294b66; font-size: .88rem; font-weight: 800; text-decoration: none; }
.fp-nav a:hover { color: var(--fp-deep); background: var(--fp-olive-light); }
.fp-nav .fp-back { border: 1px solid var(--fp-border); background: #fff; }
.fp-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 1.6rem 0 5rem; }
.fp-breadcrumb { margin: 0 0 1.2rem; display: flex; gap: .55rem; color: var(--fp-muted); font-size: .88rem; }
.fp-breadcrumb a { color: var(--fp-olive); font-weight: 850; }
.fp-hero { min-height: 520px; padding: clamp(2rem, 6vw, 5rem); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(250px, .75fr); align-items: center; gap: 2rem; overflow: hidden; border-radius: 2rem; color: #fff; background: radial-gradient(circle at 83% 22%, rgba(213,163,38,.2), transparent 17rem), linear-gradient(140deg, #071b2d, #153B5B 62%, #245b80); box-shadow: var(--fp-shadow); }
.fp-kicker { color: var(--fp-gold); font-size: .77rem; font-weight: 950; letter-spacing: .13em; text-transform: uppercase; }
.fp-hero h1 { max-width: 780px; margin: .8rem 0 1rem; font-size: clamp(2.45rem, 6.7vw, 5.6rem); line-height: .94; letter-spacing: -.06em; }
.fp-hero h1 span { color: #dbeaf5; }
.fp-hero p { max-width: 690px; margin: 0; color: #edf5fa; font-size: clamp(1rem, 2vw, 1.22rem); line-height: 1.65; }
.fp-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.35rem; }
.fp-primary, .fp-secondary, .fp-danger { min-height: 48px; padding: .75rem 1rem; display: inline-flex; align-items: center; justify-content: center; border-radius: .8rem; font-weight: 900; text-decoration: none; cursor: pointer; }
.fp-primary:disabled, .fp-secondary:disabled, .fp-danger:disabled { opacity: .5; cursor: not-allowed; }
.fp-primary { border: 1px solid var(--fp-gold); color: #1f1700; background: var(--fp-gold); }
.fp-secondary { border: 1px solid var(--fp-border); color: var(--fp-ink); background: var(--fp-card); }
.fp-danger { border: 1px solid #efc2be; color: var(--fp-danger); background: #fff6f5; }
.fp-hero .fp-secondary { color: #fff; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.08); }
.fp-primary:hover { background: #e5ba4a; }
.fp-brand-panel { min-width: 230px; min-height: 300px; margin: auto; padding: 1.25rem; display: grid; place-items: center; align-content: center; gap: .35rem; border: 1px solid rgba(255,255,255,.25); border-radius: 1.5rem; background: rgba(255,255,255,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.fp-brand-panel img { width: min(180px, 72%); height: auto; filter: drop-shadow(0 14px 20px rgba(0,0,0,.2)); }
.fp-brand-panel strong { color: #fff; font-size: 1.3rem; letter-spacing: .06em; text-transform: uppercase; }
.fp-brand-panel span { color: #f3dfaa; font-size: .78rem; font-weight: 850; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.fp-trust { margin: -1.3rem 1.1rem 0; padding: 1rem; position: relative; display: flex; justify-content: center; flex-wrap: wrap; gap: .65rem; border: 1px solid var(--fp-border); border-radius: 1rem; background: rgba(255,255,255,.97); box-shadow: 0 12px 35px rgba(8,35,58,.1); }
.fp-trust span { padding: .45rem .7rem; border-radius: 999px; color: #153B5B; background: var(--fp-olive-light); font-size: .82rem; font-weight: 850; }
.fp-scope, .fp-section { margin-top: 4rem; scroll-margin-top: 7rem; }
.fp-scope { padding: clamp(1.2rem, 3vw, 2rem); display: grid; grid-template-columns: .75fr 1.25fr; gap: 1.3rem; border: 1px solid var(--fp-border); border-radius: 1.4rem; background: #fff; }
.fp-scope h2, .fp-section-head h2 { margin: .45rem 0 .6rem; font-size: clamp(1.7rem, 4vw, 2.8rem); line-height: 1.06; letter-spacing: -.045em; }
.fp-scope-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.fp-scope-grid article { padding: 1rem; border-radius: 1rem; background: #e8f1f7; }
.fp-scope-grid article.is-limit { background: #faf2dc; }
.fp-scope-grid strong { font-size: 1.05rem; }
.fp-scope-grid ul { padding-left: 1.15rem; margin: .7rem 0 0; color: var(--fp-muted); line-height: 1.55; }
.fp-section-head { max-width: 780px; margin-bottom: 1.25rem; }
.fp-section-head > span { color: var(--fp-olive); font-size: .77rem; font-weight: 950; letter-spacing: .13em; text-transform: uppercase; }
.fp-section-head p { margin: 0; color: var(--fp-muted); line-height: 1.65; }
.fp-route-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; }
.fp-route-card { min-height: 160px; padding: 1rem; display: grid; align-content: start; gap: .4rem; border: 1px solid var(--fp-border); border-radius: 1.15rem; color: var(--fp-ink); text-align: left; background: var(--fp-card); cursor: pointer; box-shadow: 0 13px 36px rgba(8,35,58,.08); }
.fp-route-card:hover, .fp-route-card[aria-pressed="true"] { border-color: var(--fp-olive); background: #e9f2f8; transform: translateY(-2px); }
.fp-route-card > span { color: var(--fp-gold-dark); font-size: .8rem; font-weight: 950; }
.fp-route-card strong { margin-top: auto; font-size: 1.14rem; }
.fp-route-card small { color: var(--fp-muted); line-height: 1.35; }
.fp-route-detail, .fp-result, .fp-panel { border: 1px solid var(--fp-border); border-radius: 1.3rem; background: var(--fp-card); box-shadow: 0 15px 44px rgba(17,36,27,.07); }
.fp-route-detail, .fp-result { margin-top: 1rem; padding: clamp(1.15rem, 3vw, 1.8rem); border-top: 5px solid var(--fp-gold); }
.fp-route-detail h3, .fp-result h3 { margin: .4rem 0 .5rem; font-size: clamp(1.45rem, 3vw, 2rem); }
.fp-route-detail header > p, .fp-result header > p { max-width: 820px; color: var(--fp-muted); line-height: 1.6; }
.fp-result-label { display: inline-flex; padding: .35rem .55rem; border-radius: 999px; color: #153B5B; background: var(--fp-olive-light); font-size: .72rem; font-weight: 950; text-transform: uppercase; }
.fp-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1rem; }
.fp-detail-grid section { padding: 1rem; border-radius: 1rem; background: #f1f6fa; }
.fp-detail-grid h4 { margin: 0 0 .7rem; }
.fp-detail-grid ol { margin: 0; padding-left: 1.25rem; color: var(--fp-muted); line-height: 1.6; }
.fp-source-list { display: grid; gap: .55rem; }
.fp-source-list a { min-height: 46px; padding: .7rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; border: 1px solid var(--fp-border); border-radius: .7rem; color: var(--fp-olive); background: #fff; font-weight: 850; text-decoration: none; }
.fp-review-date { margin: 1rem 0 0; color: var(--fp-muted); font-size: .82rem; }
.fp-checker-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 1rem; align-items: start; }
.fp-panel { padding: clamp(1rem, 3vw, 1.5rem); }
.fp-field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin-bottom: 1rem; }
.fp-field { display: grid; gap: .4rem; }
.fp-field.is-wide { grid-column: 1 / -1; }
.fp-field span { color: #294b66; font-size: .84rem; font-weight: 850; }
.fp-field select { width: 100%; min-height: 48px; padding: .7rem; border: 1px solid #9db5c8; border-radius: .75rem; color: var(--fp-ink); background: #fff; }
.fp-field select:focus, .fp-route-card:focus-visible, .fp-primary:focus-visible, .fp-secondary:focus-visible, .fp-danger:focus-visible, .ft-exam-card:focus-visible { outline: 3px solid rgba(213,163,38,.62); outline-offset: 2px; }
.fp-safety { display: grid; grid-template-columns: auto 1fr; gap: .8rem; border-top: 5px solid var(--fp-gold); }
.fp-safety > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: var(--fp-deep); background: var(--fp-gold); font-size: 1.25rem; font-weight: 950; }
.fp-safety h3 { margin: .1rem 0 .5rem; }
.fp-safety p { margin: 0; color: var(--fp-muted); line-height: 1.6; }
.fp-status { min-height: 1.4rem; margin: .75rem 0 0; color: var(--fp-olive); font-weight: 800; }
.fp-document-list { display: grid; gap: .55rem; }
.fp-document-item { min-height: 48px; display: flex; align-items: center; gap: .7rem; color: var(--fp-muted); cursor: pointer; }
.fp-document-item input { width: 23px; height: 23px; accent-color: var(--fp-olive); }
.fp-document-item.is-complete span { color: var(--fp-olive); text-decoration: line-through; }
.fp-prep-grid, .fp-official-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.fp-prep-grid article { padding: 1.2rem; border: 1px solid var(--fp-border); border-radius: 1.15rem; background: #fff; }
.fp-prep-grid article > span { color: var(--fp-olive); font-size: .75rem; font-weight: 950; text-transform: uppercase; }
.fp-prep-grid h3 { margin: .6rem 0 .4rem; }
.fp-prep-grid p { margin: 0; color: var(--fp-muted); line-height: 1.55; }
.fp-prep-grid a { color: var(--fp-olive); font-weight: 850; }
.fp-prep-link { min-height: 48px; margin-top: .75rem; display: inline-flex; align-items: center; }
.fp-history { display: grid; gap: .7rem; }
.fp-history-card { padding: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; border: 1px solid var(--fp-border); border-left: 5px solid var(--fp-olive); border-radius: .9rem; background: #fff; }
.fp-history-card h3 { margin: .25rem 0; }
.fp-history-card p { margin: 0; color: var(--fp-muted); }
.fp-history-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.fp-empty { padding: 1rem; color: var(--fp-muted); border: 1px dashed var(--fp-border); border-radius: .8rem; }
.fp-official-grid { grid-template-columns: repeat(4, 1fr); }
.fp-official-grid a { min-height: 100px; padding: 1rem; display: grid; align-content: center; gap: .35rem; border: 1px solid var(--fp-border); border-radius: 1rem; color: var(--fp-ink); background: #fff; text-decoration: none; }
.fp-official-grid a:hover { border-color: var(--fp-olive); }
.fp-official-grid strong { color: var(--fp-olive); }
.fp-official-grid span { color: var(--fp-muted); }
.fp-disclaimer { margin-top: 3rem; padding: 1rem; border-left: 5px solid var(--fp-gold); border-radius: 0 .8rem .8rem 0; color: #5c4810; background: #fff8e7; line-height: 1.55; }
.fp-footer { padding: 2rem 1rem; color: #dcebf5; background: var(--fp-deep); }
.fp-footer > div { width: min(1180px, 100%); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.fp-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.fp-footer a { color: #f2d98d; font-weight: 800; }

[data-nb-theme="dark"] .fp-body { --fp-ink: #edf6fc; --fp-paper: #071724; --fp-card: #0d2638; --fp-muted: #b9cddd; --fp-border: #31556f; --fp-olive-light: #173d58; background: #071724; }
[data-nb-theme="dark"] .fp-header { background: rgba(7,23,36,.94); }
[data-nb-theme="dark"] .fp-nav a, [data-nb-theme="dark"] .fp-field span { color: #d7e8f4; }
[data-nb-theme="dark"] .fp-nav .fp-back, [data-nb-theme="dark"] .fp-secondary, [data-nb-theme="dark"] .fp-field select { color: var(--fp-ink); background: var(--fp-card); }
[data-nb-theme="dark"] .fp-trust, [data-nb-theme="dark"] .fp-scope, [data-nb-theme="dark"] .fp-route-card, [data-nb-theme="dark"] .fp-prep-grid article, [data-nb-theme="dark"] .fp-history-card, [data-nb-theme="dark"] .fp-official-grid a { background: var(--fp-card); }
[data-nb-theme="dark"] .fp-route-card:hover, [data-nb-theme="dark"] .fp-route-card[aria-pressed="true"], [data-nb-theme="dark"] .fp-detail-grid section { background: #153b56; }
[data-nb-theme="dark"] .fp-source-list a { color: #d4e8f5; background: #0d2638; }

@media (max-width: 950px) {
  .fp-header-inner { align-items: flex-start; padding: .7rem 0; flex-wrap: wrap; }
  .fp-nav { width: 100%; margin: 0; overflow-x: auto; }
  .fp-nav a { flex: 0 0 auto; }
  .fp-route-grid { grid-template-columns: repeat(3, 1fr); }
  .fp-scope, .fp-checker-layout { grid-template-columns: 1fr; }
  .fp-official-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 680px) {
  .fp-header-inner, .fp-shell { width: min(100% - 1.15rem, 1180px); }
  .fp-hero { min-height: auto; padding: 2rem 1.2rem; grid-template-columns: 1fr; border-radius: 1.35rem; }
  .fp-brand-panel { min-width: 0; min-height: 220px; width: 100%; }
  .fp-brand-panel img { width: 120px; }
  .fp-trust { margin: .7rem 0 0; justify-content: flex-start; }
  .fp-scope, .fp-scope-grid, .fp-detail-grid, .fp-field-grid, .fp-prep-grid, .fp-official-grid { grid-template-columns: 1fr; }
  .fp-route-grid { grid-template-columns: repeat(2, 1fr); }
  .fp-route-card { min-height: 135px; }
  .fp-field.is-wide { grid-column: auto; }
  .fp-history-card { align-items: flex-start; flex-direction: column; }
  .fp-history-actions, .fp-history-actions > * { width: 100%; }
  .fp-footer > div { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fp-route-card { transition: none; }
}
