/* Shared public-page finish. Content, navigation and commerce remain page-owned. */
:root {
  --editorial-paper: #f5f2ea;
  --editorial-surface: #faf8f2;
  --editorial-ink: #1e2724;
  --editorial-muted: #60675f;
  --editorial-seal: #a33126;
  --editorial-line: #d7d7cc;
  --editorial-serif: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
}

:is(.academy-page, .fuel-preview-page, .special-page, .exchange) {
  color: var(--editorial-ink);
  background: var(--editorial-paper);
  -webkit-font-smoothing: antialiased;
}

:is(.academy-page, .fuel-preview-page, .special-page, .exchange) :is(a, button):focus-visible {
  outline: 2px solid var(--editorial-seal);
  outline-offset: 5px;
}

:is(.academy-header, .fuel-header, .special-header) {
  min-height: 84px;
  padding-inline: clamp(20px, 4vw, 64px);
  background: rgba(245, 242, 234, .96);
  border-bottom: 1px solid var(--editorial-line);
  box-shadow: none;
}

.academy-header.is-scrolled {
  min-height: 72px;
  background: rgba(245, 242, 234, .96);
  box-shadow: none;
}

:is(.academy-brand, .fuel-brand, .special-brand) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

:is(.academy-lang, .fuel-lang, .special-lang) {
  gap: 0;
  padding: 0;
  border: 1px solid var(--editorial-line);
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
}

:is(.academy-lang, .fuel-lang, .special-lang) button {
  min-width: 44px;
  min-height: 44px;
  padding-inline: 10px;
  border-radius: 999px;
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 600;
}

:is(.academy-lang, .fuel-lang, .special-lang) button[aria-pressed="true"] {
  background: var(--editorial-ink);
  color: var(--editorial-paper);
}

:is(.academy-nav, .fuel-nav) a,
.academy-account-link,
.fuel-header-actions > a,
.special-header-actions > a,
:is(.academy-footer, .fuel-footer, .special-footer) a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

:is(.academy-footer, .fuel-footer, .special-footer) {
  color: var(--editorial-muted);
  border-color: var(--editorial-line);
  padding-block: 32px 44px;
}

/* SELECT retains its book-cover identity, with quieter surfaces and clearer edges. */
.academy-page {
  --select-paper: var(--editorial-paper);
  --select-paper-bright: var(--editorial-surface);
  --select-ink: var(--editorial-ink);
  --select-muted: var(--editorial-muted);
  --select-line: var(--editorial-line);
  --select-seal: var(--editorial-seal);
}
.academy-paper { opacity: .12; }
.select-hero { background: var(--editorial-ink); }
.select-hero::after { border-color: rgba(245, 242, 234, .15); }
.select-hero h1 { font-weight: 900; }
.select-hero h1 span:last-child { color: #e0c7a4; }
.select-orbit { box-shadow: none; border-color: rgba(224, 199, 164, .15); }
.select-cover-main { box-shadow: -2px 3px 0 #d0c1a7, -5px 6px 0 #96846a, 10px 24px 35px #0003; }
.select-cover-back, .select-art-seal { box-shadow: none; }
.select-button, .academy-account-link { border-radius: 999px; }
.select-button-gold { background: var(--editorial-seal); border-color: var(--editorial-seal); box-shadow: none; }
.select-button:hover { transform: translateY(-3px); box-shadow: 0 8px 22px #0002; }
.select-section-index { color: var(--editorial-seal); }
.select-collection::before, .select-access-panel::after, .select-closing::before { display: none; }
.select-source-principle, .select-topic { background: var(--editorial-surface); box-shadow: none; }
.select-topic { border-color: var(--editorial-line); border-radius: 14px; }
.select-topic:hover { transform: translateY(-4px); border-color: #a9afa3; box-shadow: 0 15px 30px #17201c0d; }
.select-topic::before { box-shadow: none; }
.select-audience-professional .select-audience-heading,
.select-access-panel { background: var(--editorial-ink); box-shadow: none; }
.select-section h2, .select-closing h2 { font-weight: 900; }
.select-feature-link { display: inline-flex; min-height: 44px; align-items: center; }

/* Food Basics: an illustrated reading rhythm instead of floating UI cards. */
.fuel-preview-page {
  --ink: var(--editorial-ink);
  --muted: var(--editorial-muted);
  --cream: var(--editorial-paper);
  --paper: var(--editorial-surface);
  --sage: #e8ebe1;
  --orange: var(--editorial-seal);
  --line: var(--editorial-line);
}
.fuel-preview-page::before { display: none; }
.fuel-hero-art { transform: none; }
.fuel-hero-art img {
  border: 1px solid var(--editorial-line);
  border-radius: 2px;
  box-shadow: none;
}
.fuel-hero-art figcaption { margin-inline: 0; padding-top: 8px; }
.fuel-hero h1 { font-size: clamp(46px, 4.8vw, 68px); font-weight: 900; line-height: 1.4; text-wrap: balance; }
.fuel-hero-lead { font-size: clamp(17px, 1.6vw, 20px); }
.fuel-hero-facts { gap: 0; }
.fuel-hero-facts span { flex: 1; background: transparent; border-top: 1px solid var(--editorial-line); border-right: 1px solid var(--editorial-line); }
.fuel-hero-facts span:first-child { padding-left: 0; }
.fuel-hero-facts span:last-child { border-right: 0; }
.fuel-hero-facts strong { color: var(--editorial-seal); font-weight: 500; }
:is(.fuel-primary, .fuel-secondary, .fuel-special-bridge a) { border-radius: 999px; transition: transform .3s ease, background .3s ease, box-shadow .3s ease; }
:is(.fuel-primary, .fuel-secondary, .fuel-special-bridge a):hover { transform: translateY(-3px); box-shadow: 0 8px 20px #17201c12; }
.fuel-section-heading h2, .fuel-scope h2, .fuel-cta h2 { font-weight: 900; line-height: 1.4; }
.fuel-section-heading > p:last-child { letter-spacing: normal; font-weight: 400; }
.fuel-steps { gap: 0; border-block: 1px solid var(--editorial-line); }
.fuel-steps article { border: 0; border-right: 1px solid var(--editorial-line); border-radius: 0; background: transparent; }
.fuel-steps article:last-child { border-right: 0; }
.fuel-note { border-radius: 0; border-left: 2px solid var(--editorial-seal); background: #e8ebe1; }
.fuel-lesson-card, .fuel-scope-copy li { border-radius: 14px; }
.fuel-lesson-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px #17201c0d; border-color: #a9afa3; }
.fuel-lesson-card h4 { line-height: 1.6; }
.fuel-special-bridge { border-top-width: 2px; }
.fuel-special-bridge li { border-radius: 2px; background: transparent; }
.fuel-cta { border-radius: 0; }
.fuel-cta .fuel-kicker { color: #e0c7a4; }
.fuel-cta .fuel-primary { background: var(--editorial-paper); }
.fuel-cta small { color: #c5c9c0; line-height: 1.8; }

/* Special routes retain their four useful identifying colours. */
.special-page :is(h1, h2) { font-family: var(--editorial-serif); font-weight: 900; line-height: 1.4; }
.special-page main, .special-footer { width: min(1180px, calc(100% - 40px)); }
.special-hero { padding-bottom: clamp(48px, 6vw, 80px); }
.special-hero h1 { letter-spacing: -.035em; }
.special-eyebrow, .special-course-label, .special-header > span { color: var(--editorial-seal); font-family: Inter, sans-serif; font-weight: 600; }
.special-actions a { border-radius: 999px; transition: transform .3s ease, background .3s ease; }
.special-actions a:hover { transform: translateY(-3px); }
.special-primary-action { color: var(--editorial-paper); background: var(--editorial-ink); }
.special-facts { max-width: 760px; border-block: 1px solid var(--editorial-line); background: var(--editorial-line); }
.special-facts div { flex: 1; background: var(--editorial-paper); }
.special-facts strong { color: var(--editorial-seal); }
.special-promise { border-left: 2px solid var(--editorial-seal); border-radius: 0; background: #e8ebe1; }
.special-route-choice > span, .special-route-identity span { border-radius: 2px; }
.special-course figure { border: 1px solid var(--editorial-line); border-radius: 2px; box-shadow: none; }
.special-route-identity { position: static; border: 0; border-radius: 0; background: var(--route-accent); box-shadow: none; }
.special-course li, .special-boundary-grid > div { border-radius: 2px; border-color: var(--editorial-line); background: var(--editorial-surface); }
.special-unit-cue { border-radius: 2px; box-shadow: none; }
.special-course-result { border-left-width: 2px; }

/* Exchange shares the paper-and-ink palette while keeping its field imagery. */
.exchange {
  --paper: var(--editorial-paper);
  --ink: var(--editorial-ink);
  --green: #253d33;
  --line: var(--editorial-line);
  --muted: var(--editorial-muted);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}
.exchange header.site-header { padding-top: 28px; }
.exchange .site-header .languages { border-radius: 999px; background: transparent; padding: 3px; }
.exchange .site-header .languages a { min-height: 44px; min-width: 44px; border-radius: 999px; }
.exchange .site-header .languages [aria-current] { background: var(--editorial-ink); }
.exchange .site-header .brand > a { display: inline-flex; align-items: center; gap: 19px; }
.exchange .site-header .brand-calligraphy { width: 132px; height: auto; flex: none; mix-blend-mode: multiply; }
.exchange .site-header .brand-lockup { display: grid; padding-left: 19px; border-left: 1px solid var(--editorial-line); }
.exchange .site-header nav a:last-child { border-radius: 999px; border-color: var(--editorial-line); background: transparent; }
.exchange .site-header nav a:last-child:hover { border-color: var(--editorial-ink); }
.exchange .small-label { font-family: Inter, -apple-system, sans-serif; font-size: 11px; font-weight: 600; }
.exchange .mast { margin-block: 32px; }
.exchange .mast, .exchange .mast-intro, .exchange .project, .exchange .session { box-shadow: none; }
.exchange .portal-stamp, .exchange .tags span, .exchange .badge { border-radius: 2px; }
.exchange .button { border: 1px solid transparent; border-radius: 999px; background: var(--editorial-ink); transition: transform .3s ease, background .3s ease; }
.exchange .button:hover, .exchange .button:focus-visible { transform: translateY(-2px); background: var(--editorial-seal); }
.exchange :is(h1, h2) { font-weight: 700; }
html[lang="en"] :is(.select-hero h1, .select-section h2, .select-closing h2, .fuel-hero h1, .fuel-section-heading h2, .fuel-scope h2, .fuel-cta h2, .special-page h1, .special-page h2, .exchange h1, .exchange h2) { font-weight: 700; }
:is(.academy-page, .fuel-preview-page, .special-page, .exchange) :is(h1, h2, h3) { line-break: strict; }
:is(.academy-page, .fuel-preview-page, .special-page, .exchange) :is(p, li) { text-wrap: pretty; }
html[lang="ja"] :is(.fuel-hero h1, .exchange .mast-intro h1) { white-space: pre-line; }
@supports (word-break: auto-phrase) {
  html[lang="ja"] :is(.academy-page, .fuel-preview-page, .special-page, .exchange) :is(h1, h2, h3) { word-break: auto-phrase; }
}
.exchange .footer-links a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 980px) {
  .academy-header-actions { gap: 10px; }
}

@media (max-width: 900px) {
  .exchange .site-header .brand-calligraphy { width: 105px; }
  .exchange .site-header .brand-lockup { gap: 2px; padding-left: 14px; }
  .fuel-header-actions > a { display: none; }
  .fuel-hero-art { order: 0; }
  .fuel-steps article:nth-child(2) { border-right: 0; }
  .fuel-steps article:nth-child(-n + 2) { border-bottom: 1px solid var(--editorial-line); }
}

@media (max-width: 760px) {
  .special-header-actions > a { display: none; }
}

@media (max-width: 600px) {
  :is(.academy-header, .fuel-header, .special-header) { min-height: 76px; padding: 10px 20px; gap: 12px; }
  .academy-header.is-scrolled { min-height: 76px; padding-block: 10px; }
  .academy-brand img, .academy-header.is-scrolled .academy-brand img { width: 94px; }
  .academy-account-link { min-height: 44px; padding-inline: 8px; font-size: 10px; }
  .academy-header-actions { gap: 8px; }
  :is(.academy-lang, .fuel-lang, .special-lang) button { min-width: 44px; min-height: 44px; }
  .select-section, .select-feature-strip, .select-access { width: calc(100% - 40px); }
  .select-hero-copy { padding-inline: 20px; }
  .select-feature-strip { padding-inline: 0; }
  .academy-footer { padding-inline: 20px; }
  .fuel-hero, .fuel-section, .fuel-cta, .fuel-footer { width: calc(100% - 40px); }
  .fuel-hero { padding-top: 44px; }
  .fuel-hero h1 { font-size: clamp(38px, 10vw, 48px); }
  .fuel-hero-art img { border-width: 1px; border-radius: 2px; }
  .fuel-section { padding-block: 64px; }
  .fuel-steps article { padding: 26px 0; border-right: 0; border-bottom: 1px solid var(--editorial-line); }
  .fuel-steps article:last-child { border-bottom: 0; }
  .fuel-footer { align-items: flex-start; flex-direction: column; gap: 12px; line-height: 1.7; }
  .special-hero h1, html[lang="ja"] .special-hero h1 { font-size: clamp(32px, 9vw, 44px); line-height: 1.4; }
  .special-hero { padding-top: 44px; }
  .special-lead { margin-block: 24px; }
  .special-facts div { min-width: calc(50% - 1px); }
  .special-facts div:last-child { width: 100%; }
  .special-route-identity { padding: 12px; }
  .special-course figure { border-width: 1px; border-radius: 2px; }
  .exchange .mast { margin-block: 24px; }
  .exchange header.site-header { grid-template-columns: 1fr auto; grid-template-areas: "brand languages" "navigation navigation"; }
  .exchange .site-header .brand > a { gap: 8px; }
  .exchange .site-header .brand-calligraphy { width: 70px; }
  .exchange .site-header .brand-lockup { padding-left: 8px; }
  .exchange .site-header .brand-name { font-size: 17px; letter-spacing: .8px; }
  .exchange .site-header .brand-name > span { letter-spacing: 2.5px; }
  .exchange .site-header .brand-sub { font-size: 10px; }
  .exchange .site-header .languages { font-size: 9px; }
  .exchange .site-header .languages a { min-height: 44px; min-width: 44px; padding-inline: 4px; }
}

@media (max-width: 360px) {
  .exchange header.site-header { grid-template-columns: 1fr; grid-template-areas: "brand" "languages" "navigation"; }
  .exchange .site-header .languages { justify-self: start; }
  .academy-header { grid-template-columns: 1fr; }
  .academy-header-actions { justify-self: stretch; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :is(.academy-page, .fuel-preview-page, .special-page, .exchange) *,
  :is(.academy-page, .fuel-preview-page, .special-page, .exchange) *::before,
  :is(.academy-page, .fuel-preview-page, .special-page, .exchange) *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal-ready [data-reveal] { opacity: 1; transform: none; }
  :is(.select-button, .select-topic, .fuel-primary, .fuel-secondary, .fuel-lesson-card, .fuel-special-bridge a, .special-actions a, .exchange .button):is(:hover, :focus-visible) { transform: none; }
}
