:root {
  --navy: #071a43;
  --navy-2: #102957;
  --muted: #5d6981;
  --line: #dce4ef;
  --soft: #f5f8fc;
  --teal: #149b89;
  --blue: #1978d2;
  --purple: #6f42c7;
  --gold: #c88712;
  --white: #fff;
  --shadow: 0 18px 55px rgba(14, 39, 82, .10);
  --radius: 24px;
  --shell: min(1240px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: #fff; color: var(--navy); font-family: "Noto Sans Thai", system-ui, sans-serif; line-height: 1.65; }
button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 1000; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 10px; }
.skip-link:focus { top: 0; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); border-bottom: 1px solid transparent; backdrop-filter: blur(18px); transition: .25s ease; }
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 28px rgba(7,26,67,.06); }
.nav-shell { width: var(--shell); min-height: 78px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.wordmark { display: flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.wordmark-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: white; font-size: .84rem; background: linear-gradient(135deg, var(--teal), var(--blue) 50%, var(--purple)); }
.nav-links { display: flex; align-items: center; gap: clamp(20px, 3vw, 42px); }
.nav-links a { text-decoration: none; color: #40506e; font-size: .94rem; font-weight: 600; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -8px; height: 2px; background: var(--blue); transition: right .2s ease; }
.nav-links a:hover::after, .nav-links a:focus-visible::after { right: 0; }
.menu-toggle { display: none; width: 48px; height: 48px; border: 0; background: transparent; padding: 11px; }
.menu-toggle span:not(.sr-only) { display: block; height: 2px; background: var(--navy); margin: 6px 0; }

.section-shell { width: var(--shell); margin-inline: auto; }
.hero { width: min(1440px, 100%); margin: auto; min-height: 770px; position: relative; display: grid; grid-template-columns: minmax(0, .92fr) minmax(560px, 1.08fr); align-items: center; padding: 52px max(48px, calc((100% - 1240px) / 2)) 120px; overflow: hidden; }
.hero-copy { position: relative; z-index: 2; padding-bottom: 72px; }
.hero h1 { margin: 0; font-family: "Noto Serif Thai", serif; font-size: clamp(3.25rem, 5.35vw, 5.9rem); line-height: 1.12; letter-spacing: -.055em; }
.hero h1 span { color: var(--blue); }
.hero-lede { max-width: 620px; margin: 30px 0 34px; color: #516078; font-size: clamp(1.05rem, 1.4vw, 1.28rem); }
.hero-actions { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.button { min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 30px; border-radius: 12px; padding: 0 24px; text-decoration: none; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease; }
.button-primary { background: var(--navy); color: white; box-shadow: 0 14px 30px rgba(7,26,67,.18); }
.button:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(7,26,67,.24); }
.text-link { font-weight: 700; text-underline-offset: 7px; }
.hero-art { position: absolute; z-index: 0; width: min(880px, 67vw); right: -24px; top: 74px; opacity: .98; }
.hero-art img { width: 100%; }
.hero-note { position: absolute; bottom: 30px; left: max(48px, calc((100% - 1240px) / 2)); right: max(48px, calc((100% - 1240px) / 2)); border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: space-between; gap: 20px; }
.hero-note strong { font-size: 1.15rem; }
.hero-note span { color: var(--muted); }

.section-heading { margin-bottom: 54px; }
.section-index { margin: 0 0 12px; color: var(--blue); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; }
.section-heading h2 { margin: 0; font-family: "Noto Serif Thai", serif; font-size: clamp(2.3rem, 4vw, 4.3rem); line-height: 1.18; letter-spacing: -.04em; }
.section-heading > p:last-child { color: var(--muted); font-size: 1.06rem; }
.split-heading { display: grid; grid-template-columns: 1fr .8fr; align-items: end; gap: 72px; }
.split-heading > p { margin: 0; max-width: 560px; }
.centered-heading { text-align: center; max-width: 830px; margin-inline: auto; }
.centered-heading > p:last-child { max-width: 690px; margin: 18px auto 0; }
.centered-heading.compact { margin-bottom: 38px; }

.framework { padding: 110px 0 120px; }
.path-rail { position: relative; display: grid; grid-template-columns: repeat(9, minmax(126px, 1fr)); gap: 10px; overflow-x: auto; padding: 44px 4px 26px; scrollbar-width: thin; }
.path-rail::before { content: ""; position: absolute; top: 60px; left: 6%; right: 6%; height: 3px; background: linear-gradient(90deg, var(--teal), var(--blue), var(--purple), var(--gold)); }
.path-node { min-width: 126px; position: relative; z-index: 1; border: 0; border-radius: 16px; padding: 0 10px 16px; background: transparent; text-align: left; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.path-node:hover, .path-node:focus-visible { background: var(--soft); transform: translateY(-4px); outline: 2px solid currentColor; outline-offset: 2px; }
.path-number { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: currentColor; color: white; font-weight: 800; box-shadow: 0 0 0 6px white; }
.path-icon { display: block; margin: 26px 0 12px; font-size: 1.6rem; }
.path-node strong, .path-node small { display: block; }
.path-node strong { font-size: .88rem; line-height: 1.3; }
.path-node small { margin-top: 7px; color: var(--muted); line-height: 1.45; }
.foundation { color: var(--teal); } .create { color: var(--blue); } .systems { color: var(--purple); } .research { color: var(--gold); }
.band-legend { margin-top: 12px; display: flex; gap: 28px; flex-wrap: wrap; color: var(--muted); font-size: .86rem; }
.dot { width: 9px; height: 9px; display: inline-block; border-radius: 50%; background: currentColor; margin-right: 8px; }

.analysis-section { padding: 120px 0; background: linear-gradient(180deg, #f8fbfe 0, #fff 100%); border-block: 1px solid #edf1f6; }
.analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.analysis-column { background: white; padding: 42px clamp(24px, 4vw, 58px); }
.analysis-column h3 { margin: 0 0 16px; font-size: 1.3rem; color: var(--teal); }
.analysis-column.cautions h3 { color: var(--purple); }
.analysis-column ol { list-style: none; margin: 0; padding: 0; }
.analysis-column li { display: grid; grid-template-columns: 42px 1fr; gap: 20px; padding: 28px 0; border-top: 1px solid var(--line); }
.analysis-column li > span { font-size: .76rem; color: var(--muted); }
.analysis-column strong { display: block; font-size: 1.12rem; }
.analysis-column p { margin: 7px 0 0; color: var(--muted); }
.branch-map { margin-top: 44px; padding: 28px 34px; border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: center; box-shadow: var(--shadow); background: #fff; }
.branch-copy strong, .branch-copy span { display: block; }
.branch-copy strong { font-size: 1.25rem; }
.branch-copy span { color: var(--muted); margin-top: 5px; }
.branch-nodes { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 22px 0; }
.branch-nodes::before, .branch-nodes::after { content: ""; position: absolute; left: 4%; right: 4%; border-top: 1.5px solid var(--blue); }
.branch-nodes::after { border-color: var(--purple); transform: translateY(-18px) rotate(-4deg); border-radius: 50%; }
.branch-nodes span { z-index: 1; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; font-weight: 800; background: linear-gradient(145deg, var(--teal), var(--blue) 52%, var(--purple)); box-shadow: 0 0 0 4px white; }
.branch-nodes span:last-child { background: var(--gold); }

.pathfinder { padding: 120px 0; }
.role-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.role-tabs button { min-height: 132px; border: 1px solid var(--line); border-radius: 16px; background: white; padding: 22px; text-align: left; cursor: pointer; transition: .2s ease; }
.role-tabs button:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.role-tabs button[aria-selected="true"] { border: 2px solid var(--teal); background: #f5fffd; box-shadow: 0 14px 36px rgba(20,155,137,.12); }
.role-tabs button:focus-visible { outline: 3px solid rgba(25,120,210,.3); outline-offset: 3px; }
.role-number { display: block; color: var(--muted); font-size: .74rem; margin-bottom: 16px; }
.role-tabs strong, .role-tabs small { display: block; }
.role-tabs strong { font-size: 1.08rem; }
.role-tabs small { color: var(--muted); margin-top: 5px; }
.recommendation { margin-top: 16px; display: grid; grid-template-columns: .9fr 1.1fr; border-radius: var(--radius); border: 1px solid var(--line); background: #f8fbfe; overflow: hidden; }
.recommendation-summary, .next-steps { padding: clamp(28px, 4vw, 48px); }
.recommendation-summary { background: white; border-right: 1px solid var(--line); }
.recommendation-summary > p:first-child, .next-steps > p { margin: 0; color: var(--blue); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.recommendation h3 { margin: 8px 0 20px; font-family: "Noto Serif Thai", serif; font-size: 2.15rem; }
.range-label { color: var(--muted); }
.range-label strong { display: block; color: var(--navy); font-size: 1.4rem; margin-top: 4px; }
.level-meter { margin: 22px 0; display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; }
.level-meter span { height: 38px; display: grid; place-items: center; border-radius: 9px; background: #edf1f6; color: #7f899c; font-size: .84rem; font-weight: 700; }
.level-meter span.active { color: white; background: currentColor; }
.level-meter span.active.foundation { background: var(--teal); } .level-meter span.active.create { background: var(--blue); } .level-meter span.active.systems { background: var(--purple); } .level-meter span.active.research { background: var(--gold); }
.range-reason { margin: 0; color: var(--muted); }
.next-steps ol { list-style: none; padding: 0; margin: 14px 0 0; }
.next-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 16px; align-items: center; min-height: 64px; border-bottom: 1px solid var(--line); font-weight: 600; }
.next-steps li span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: white; color: var(--blue); font-size: .76rem; }
.privacy-note { text-align: center; color: var(--muted); font-size: .82rem; margin: 18px 0 0; }

.levels-section { padding: 120px 0; background: #f8fafc; border-block: 1px solid #eef2f6; }
.level-group { display: grid; grid-template-columns: 260px 1fr; border: 1px solid var(--line); border-left: 4px solid currentColor; border-radius: 20px; background: white; margin-bottom: 22px; overflow: hidden; }
.band-intro { padding: 32px; background: linear-gradient(145deg, currentColor -280%, transparent 55%); border-right: 1px solid var(--line); }
.band-symbol { font-size: 1.7rem; }
.band-intro h3 { margin: 20px 0 0; color: currentColor; font-size: 1.2rem; }
.band-intro strong { display: block; margin-top: 2px; }
.band-intro p { color: var(--muted); font-size: .9rem; margin-bottom: 0; }
.level-item + .level-item { border-top: 1px solid var(--line); }
.level-trigger { width: 100%; min-height: 112px; display: grid; grid-template-columns: 52px 210px 1fr 36px; gap: 20px; align-items: center; border: 0; background: white; padding: 18px 24px; text-align: left; cursor: pointer; }
.level-trigger:hover { background: #fbfcfe; }
.level-trigger:focus-visible { outline: 3px solid rgba(25,120,210,.28); outline-offset: -3px; }
.level-number { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: currentColor; color: white; font-weight: 800; }
.level-name strong, .level-name small { display: block; }
.level-name strong { font-size: 1rem; }
.level-name small { color: var(--muted); margin-top: 3px; }
.level-outcome { color: #3e4e68; }
.chevron { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 1.2rem; transition: transform .2s ease; }
.level-trigger[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.level-detail { padding: 0 24px 24px 96px; }
.level-detail > p { margin: 0 0 16px; color: var(--muted); }
.tool-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tool-list span { width: 100%; font-size: .75rem; color: var(--muted); }
.tool-list i { font-style: normal; padding: 5px 10px; border-radius: 7px; background: var(--soft); color: #516078; font-size: .78rem; }

.closing { min-height: 470px; margin-top: 110px; margin-bottom: 40px; border: 1px solid var(--line); border-radius: 30px; display: grid; grid-template-columns: .82fr 1.18fr; align-items: center; overflow: hidden; box-shadow: var(--shadow); }
.closing-art { align-self: stretch; position: relative; min-height: 440px; overflow: hidden; background: #f6fbfd; }
.closing-art img { position: absolute; width: 760px; max-width: none; right: -150px; bottom: -58px; }
.closing-copy { padding: 56px clamp(30px, 5vw, 72px) 48px; }
.closing-copy h2 { margin: 0; font-family: "Noto Serif Thai", serif; font-size: clamp(2rem, 3vw, 3.35rem); line-height: 1.2; }
.closing-copy > p { margin: 10px 0 34px; font-size: 1.35rem; color: var(--muted); }
.closing-copy > p strong { color: var(--teal); font-size: 1.7rem; }
.closing-principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.closing-principles span { background: white; padding: 0 18px; color: var(--muted); font-size: .83rem; }
.closing-principles b { display: block; color: var(--navy); margin-bottom: 4px; }
.source { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; padding: 42px 0 90px; align-items: start; }
.source h2 { margin: 0; font-size: 1.3rem; }
.source > p { margin: 0; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: .88rem; }
.footer-inner span:first-child { color: var(--navy); font-weight: 800; }
.footer-inner a { text-underline-offset: 5px; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; min-height: 820px; align-items: start; padding-top: 80px; }
  .hero-copy { max-width: 700px; }
  .hero-art { width: 760px; right: -180px; top: 260px; opacity: .58; }
  .role-tabs { grid-template-columns: 1fr 1fr; }
  .level-group { grid-template-columns: 220px 1fr; }
  .level-trigger { grid-template-columns: 48px 180px 1fr 34px; }
  .closing { grid-template-columns: .7fr 1.3fr; }
}

@media (max-width: 760px) {
  :root { --shell: min(100% - 32px, 1240px); }
  html { scroll-padding-top: 72px; }
  .nav-shell { min-height: 70px; }
  .menu-toggle { display: block; }
  .nav-links { position: absolute; left: 16px; right: 16px; top: 70px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { min-height: 48px; display: flex; align-items: center; padding: 0 12px; }
  .hero { min-height: 850px; padding: 54px 16px 112px; }
  .hero h1 { font-size: clamp(2.7rem, 13vw, 4.5rem); letter-spacing: -.06em; }
  .hero-art { width: 720px; max-width: none; right: -330px; top: 360px; opacity: .48; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 20px; }
  .hero-note { left: 16px; right: 16px; flex-direction: column; gap: 0; }
  .framework, .analysis-section, .pathfinder, .levels-section { padding-block: 82px; }
  .split-heading { grid-template-columns: 1fr; gap: 22px; }
  .analysis-grid { grid-template-columns: 1fr; }
  .analysis-column { padding-inline: 20px; }
  .branch-map { grid-template-columns: 1fr; padding: 24px 20px; }
  .branch-nodes { overflow-x: auto; }
  .branch-nodes span { min-width: 32px; }
  .role-tabs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px; }
  .role-tabs button { min-width: 78vw; scroll-snap-align: start; }
  .recommendation { grid-template-columns: 1fr; }
  .recommendation-summary { border-right: 0; border-bottom: 1px solid var(--line); }
  .level-group { grid-template-columns: 1fr; }
  .band-intro { border-right: 0; border-bottom: 1px solid var(--line); }
  .level-trigger { grid-template-columns: 46px 1fr 34px; gap: 12px; padding: 18px 16px; }
  .level-outcome { grid-column: 2 / 4; font-size: .88rem; }
  .level-detail { padding: 0 18px 22px 74px; }
  .closing { grid-template-columns: 1fr; margin-top: 82px; }
  .closing-art { min-height: 250px; }
  .closing-art img { width: 600px; right: -120px; bottom: -150px; }
  .closing-copy { padding: 34px 24px; }
  .closing-principles { grid-template-columns: 1fr; background: white; gap: 18px; }
  .closing-principles span { padding: 0; }
  .source { grid-template-columns: 1fr; gap: 18px; padding-bottom: 70px; }
  .footer-inner { padding-block: 28px; flex-direction: column; align-items: flex-start; }
}

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