@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
  --ink: #07111f;
  --ink-soft: #13233a;
  --paper: #f5f3ed;
  --paper-2: #ebe8df;
  --white: #fffefa;
  --yellow: #f5c84c;
  --green: #0f7a63;
  --blue: #2e68d3;
  --orange: #d96833;
  --muted: #627080;
  --line: rgba(7,17,31,.14);
  --shadow: 0 24px 70px rgba(7,17,31,.12);
  --sidebar: 19rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.72 'DM Sans', sans-serif; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }

.reading-progress { position: fixed; z-index: 100; inset: 0 auto auto 0; height: 3px; width: 0; background: linear-gradient(90deg,var(--yellow),var(--green)); }
.topbar { position: fixed; z-index: 50; inset: 0 0 auto 0; height: 5rem; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; background: rgba(245,243,237,.88); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: .8rem; align-items: center; text-decoration: none; letter-spacing: .03em; }
.brand span:last-child { display: grid; line-height: 1.12; }
.brand b { font: 800 .92rem/1 'Manrope',sans-serif; }
.brand small { margin-top: .28rem; color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { width: 2.15rem; height: 2.15rem; display: grid; place-items: center; transform: rotate(45deg); background: var(--yellow); border-radius: .38rem; }
.brand-mark i { width: .9rem; height: .9rem; background: var(--green); border-radius: 50%; }
.top-actions { display: flex; align-items: center; gap: .65rem; }
.ghost, .text-button { border: 0; background: transparent; cursor: pointer; font-weight: 700; }
.ghost { min-height: 2.75rem; padding: 0 .95rem; border: 1px solid var(--line); border-radius: .75rem; }
.ghost:hover, .ghost:focus-visible { background: var(--white); border-color: rgba(7,17,31,.3); }
.mobile-menu { display: none; }
.search-box { width: min(25vw,19rem); min-width: 13rem; height: 2.75rem; display: flex; align-items: center; gap: .55rem; padding: 0 .75rem; background: var(--white); border: 1px solid var(--line); border-radius: .75rem; }
.search-box:focus-within { outline: 2px solid var(--yellow); outline-offset: 2px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
kbd { padding: .1rem .36rem; border: 1px solid var(--line); border-radius: .3rem; color: var(--muted); font: 600 .68rem/1.4 'DM Sans',sans-serif; }

.sidebar { position: fixed; z-index: 20; inset: 5rem auto 0 0; width: var(--sidebar); padding: 2rem 1.25rem 1.5rem; overflow-y: auto; border-right: 1px solid var(--line); background: #efede6; }
.sidebar-head { display: flex; align-items: end; justify-content: space-between; padding: 0 .55rem 1rem; color: var(--muted); font-size: .72rem; }
.label { color: var(--green); font-weight: 800; font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; }
#chapterNav { display: grid; gap: .16rem; }
.nav-link { display: grid; grid-template-columns: 1.65rem 1fr; gap: .35rem; padding: .55rem .6rem; border-radius: .55rem; color: #4d5b6c; text-decoration: none; font-size: .78rem; line-height: 1.3; }
.nav-link .num { color: #8a929b; font-variant-numeric: tabular-nums; }
.nav-link:hover, .nav-link.active { background: var(--white); color: var(--ink); }
.nav-link.active { box-shadow: inset 3px 0 0 var(--yellow); }
.sidebar-note { margin-top: 1.5rem; padding: 1rem .8rem; display: flex; gap: .7rem; border-top: 1px solid var(--line); }
.sidebar-note div { display: grid; }
.sidebar-note b { font-size: .76rem; }
.sidebar-note small { margin-top: .15rem; color: var(--muted); font-size: .68rem; line-height: 1.4; }
.pulse { width: .55rem; height: .55rem; margin-top: .3rem; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(15,122,99,.12); }

main { margin-left: var(--sidebar); padding-top: 5rem; }
.hero { min-height: 35rem; padding: 5.5rem clamp(2rem,6vw,7rem) 4rem; display: grid; grid-template-columns: minmax(0,1.4fr) minmax(18rem,.75fr); gap: clamp(3rem,8vw,8rem); align-items: center; color: var(--white); background: var(--ink); position: relative; overflow: hidden; }
.hero::after { content:""; position:absolute; width: 33rem; height: 33rem; right:-13rem; top:-14rem; border: 1px solid rgba(245,200,76,.28); transform: rotate(45deg); box-shadow: inset 0 0 0 5rem rgba(245,200,76,.025), inset 0 0 0 10rem rgba(245,200,76,.025); }
.hero-copy, .thesis-card { position: relative; z-index: 1; }
.kicker { color: var(--yellow); font-weight: 700; font-size: .72rem; letter-spacing: .14em; }
.hero h1 { max-width: 58rem; margin: 1rem 0 1.35rem; font: 800 clamp(2.8rem,5.4vw,5.8rem)/.98 'Manrope',sans-serif; letter-spacing: -.055em; }
.hero h1 em { color: var(--yellow); font-style: normal; }
.hero-copy > p { max-width: 49rem; margin: 0; color: #bec8d5; font-size: 1.08rem; }
.hero-meta { margin-top: 2.25rem; display: flex; gap: 1.6rem; flex-wrap: wrap; }
.hero-meta span { display: grid; color: #8fa0b5; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.hero-meta b { color: var(--white); font: 700 1.1rem/1.5 'Manrope',sans-serif; letter-spacing: 0; text-transform: none; }
.thesis-card { padding: 2rem; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); backdrop-filter: blur(12px); border-radius: 1.15rem; box-shadow: var(--shadow); }
.thesis-card .label { color: var(--yellow); }
.thesis-card blockquote { margin: 1.3rem 0 2rem; color: var(--white); font: 700 1.25rem/1.48 'Manrope',sans-serif; }
.signature { padding-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; border-top: 1px solid rgba(255,255,255,.14); color: #a8b4c3; font-size: .68rem; font-weight: 700; letter-spacing: .08em; }
.signature span { color: var(--yellow); }

.system-map, .readiness, .routes, .document-shell { padding: 5rem clamp(2rem,6vw,7rem); }
.section-heading { margin-bottom: 2rem; display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.section-heading h2 { margin: .35rem 0 0; font: 800 clamp(1.8rem,3.2vw,3.25rem)/1.08 'Manrope',sans-serif; letter-spacing: -.04em; }
.section-heading > p { max-width: 31rem; margin: 0; color: var(--muted); }
.architecture-grid { margin-bottom: 1rem; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: var(--line); box-shadow: var(--shadow); }
.architecture-grid article { min-height: 12rem; padding: 1.5rem; background: var(--white); }
.architecture-grid article:nth-child(1) { border-top: .35rem solid var(--yellow); }
.architecture-grid article:nth-child(2) { border-top: .35rem solid var(--blue); }
.architecture-grid article:nth-child(3) { border-top: .35rem solid var(--orange); }
.architecture-grid article:nth-child(4) { border-top: .35rem solid var(--green); }
.architecture-grid span { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .1em; }
.architecture-grid h3 { margin: 2rem 0 .5rem; font: 800 1.3rem/1.15 'Manrope',sans-serif; }
.architecture-grid p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.flow { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; background: var(--white); box-shadow: var(--shadow); }
.flow-card { min-height: 12rem; padding: 1.5rem 1.2rem; display: flex; flex-direction: column; border-right: 1px solid var(--line); position: relative; }
.flow-card:last-child { border: 0; }
.flow-card::after { content:""; position:absolute; inset:auto 1.2rem 1.2rem; height:.28rem; border-radius:1rem; background:var(--yellow); }
.flow-card.route::after { background: var(--blue); }
.flow-card.knowledge::after { background: var(--orange); }
.flow-card.city::after { background: var(--green); }
.flow-card span { color: #8993a0; font: 700 .7rem/1 'Manrope',sans-serif; }
.flow-card b { margin-top: auto; font: 800 1.05rem/1.2 'Manrope',sans-serif; }
.flow-card small { min-height: 3rem; margin-top: .4rem; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.partner-entry { margin-top: 1rem; padding: 1.15rem 1.3rem; display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; border: 1px solid rgba(217,104,51,.28); border-radius: .9rem; background: #fff5eb; text-decoration: none; }
.partner-entry:hover { border-color: var(--orange); box-shadow: 0 10px 30px rgba(7,17,31,.08); }
.partner-icon { width: 2.7rem; height: 2.7rem; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: var(--white); font: 800 .9rem/1 'Manrope',sans-serif; }
.partner-entry > span:nth-child(2) { display: grid; }
.partner-entry small { color: var(--orange); font-size: .66rem; font-weight: 800; letter-spacing: .12em; }
.partner-entry b { font: 700 .95rem/1.35 'Manrope',sans-serif; }
.partner-action { color: var(--orange); font-size: .76rem; font-weight: 700; }
.readiness { padding-top: 1rem; }
.readiness-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; }
.readiness-grid article { min-height: 9rem; padding: 1.25rem; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; column-gap: .75rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--white); }
.readiness-grid article > span { grid-row: 1 / 3; width: 1.8rem; height: 1.8rem; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--white); font-size: .64rem; font-weight: 800; }
.readiness-grid b { align-self: center; font: 800 .95rem/1.25 'Manrope',sans-serif; }
.readiness-grid small { color: var(--muted); font-size: .76rem; line-height: 1.5; }
.readiness-actions { margin-top: 1rem; display: grid; grid-template-columns: minmax(13rem,.32fr) 1fr; gap: 1rem; }
.mini-link { padding: 1rem 1.2rem; display: grid; place-items: center; border: 1px solid var(--line); border-radius: .9rem; background: var(--ink); color: var(--white); text-align: center; text-decoration: none; font-size: .78rem; font-weight: 800; }
.mini-link:hover { background: var(--ink-soft); }
.partner-entry { margin-top: 0; }
.routes { padding-top: 2rem; background: var(--paper-2); border-block: 1px solid var(--line); }
.routes .section-heading .text-button { text-decoration: none; }
.route-panel { padding: 1.5rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--white); box-shadow: 0 12px 35px rgba(7,17,31,.06); }
.route-panel + .route-panel { margin-top: 1rem; }
.route-panel-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.route-panel-head h3 { margin: .3rem 0 0; font: 800 1.25rem/1.2 'Manrope',sans-serif; }
.route-panel-head p { max-width: 28rem; margin: 0; color: var(--muted); font-size: .8rem; }
.route-line { padding: 2.1rem .5rem .5rem; display: grid; position: relative; }
.pilot-line { grid-template-columns: repeat(4,1fr); }
.season-line { grid-template-columns: repeat(7,1fr); }
.route-line::before { content:""; position:absolute; left: calc(7.14% + .5rem); right: calc(7.14% + .5rem); top: 2.65rem; height: 3px; background: linear-gradient(90deg,var(--yellow),var(--blue),var(--green)); }
.pilot-line::before { left: calc(12.5% + .5rem); right: calc(12.5% + .5rem); }
.route-stop { min-width: 0; display: grid; justify-items: center; gap: .65rem; position: relative; text-align: center; }
.route-stop i { width: 1.1rem; height: 1.1rem; z-index: 1; border: 3px solid var(--white); border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 2px var(--blue); }
.route-stop.origin i { background: var(--yellow); box-shadow: 0 0 0 2px var(--yellow); }
.route-stop.destination i { background: var(--green); box-shadow: 0 0 0 2px var(--green); }
.route-stop span { display: grid; }
.route-stop b { font: 800 .78rem/1.2 'Manrope',sans-serif; }
.route-stop small { margin-top: .2rem; color: var(--muted); font-size: .66rem; }

.document-shell { padding-top: 2rem; }
.document-heading { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.document-tools { display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: .82rem; }
.text-button { padding: .45rem 0; color: var(--green); }
.text-button:hover { text-decoration: underline; }
.document { display: grid; gap: 1rem; }
.chapter { scroll-margin-top: 6rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--white); overflow: clip; box-shadow: 0 6px 24px rgba(7,17,31,.045); }
.chapter[open] { box-shadow: 0 16px 42px rgba(7,17,31,.08); }
.chapter.hidden { display: none; }
.chapter-summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 3.2rem 1fr auto; gap: 1rem; align-items: center; min-height: 6rem; padding: 1rem 1.5rem; }
.chapter-summary::-webkit-details-marker { display: none; }
.chapter-index { color: var(--green); font: 800 .76rem/1 'Manrope',sans-serif; letter-spacing: .06em; }
.chapter-summary h2 { margin: 0; font: 800 clamp(1.05rem,2vw,1.4rem)/1.22 'Manrope',sans-serif; letter-spacing: -.02em; }
.chapter-summary small { display: block; margin-top: .25rem; color: var(--muted); font-size: .72rem; font-weight: 500; }
.chapter-toggle { width: 2rem; height: 2rem; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 1.2rem; transition: transform .2s ease; }
.chapter[open] .chapter-toggle { transform: rotate(45deg); background: var(--yellow); border-color: var(--yellow); }
.chapter-body { padding: 1rem clamp(1.5rem,5vw,5rem) 4rem; border-top: 1px solid var(--line); }
.chapter-body > * { max-width: 52rem; }
.chapter-body h2 { margin: 3.2rem 0 1rem; font: 800 clamp(1.5rem,2.6vw,2.35rem)/1.15 'Manrope',sans-serif; letter-spacing: -.035em; }
.chapter-body h3 { margin: 2.2rem 0 .6rem; color: var(--green); font: 800 1.08rem/1.35 'Manrope',sans-serif; }
.chapter-body p { margin: .85rem 0; }
.chapter-body strong { font-weight: 700; }
.chapter-body blockquote { margin: 1.8rem 0; padding: 1.1rem 1.35rem; border-left: 4px solid var(--yellow); background: #f8f2da; border-radius: 0 .65rem .65rem 0; font: 700 1.08rem/1.55 'Manrope',sans-serif; }
.chapter-body ul, .chapter-body ol { padding-left: 1.25rem; }
.chapter-body li { margin: .35rem 0; padding-left: .25rem; }
.chapter-body hr { margin: 3rem 0; border: 0; border-top: 1px solid var(--line); }
.chapter-body mark { padding: .08em .12em; background: #ffe48a; border-radius: .15em; }
.loading { padding: 4rem 1rem; text-align: center; color: var(--muted); }
.loading span { width: .7rem; height: .7rem; margin-right: .6rem; display: inline-block; border-radius: 50%; background: var(--green); animation: blink 1s infinite alternate; }
@keyframes blink { to { opacity: .25; } }

.to-top { position: fixed; z-index: 30; right: 1.5rem; bottom: 1.5rem; width: 3rem; height: 3rem; border: 0; border-radius: 50%; background: var(--ink); color: var(--white); cursor: pointer; opacity: 0; transform: translateY(1rem); pointer-events: none; transition: .2s ease; box-shadow: var(--shadow); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
footer { margin-left: var(--sidebar); min-height: 8rem; padding: 2rem clamp(2rem,6vw,7rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: #9facbb; background: var(--ink); font-size: .78rem; }
footer b { color: var(--yellow); letter-spacing: .08em; }

@media (max-width: 1180px) {
  :root { --sidebar: 16rem; }
  .flow { grid-template-columns: repeat(3,1fr); }
  .flow-card { border-bottom: 1px solid var(--line); }
  .architecture-grid { grid-template-columns: repeat(2,1fr); }
  .season-line { grid-template-columns: repeat(4,1fr); gap: 1.5rem 0; }
  .season-line::before { display: none; }
  .hero { grid-template-columns: 1fr; gap: 3rem; }
  .thesis-card { max-width: 38rem; }
}
@media (max-width: 820px) {
  .topbar { height: auto; min-height: 4.5rem; padding: .7rem 1rem; }
  .brand small, .top-actions > .ghost:not(.mobile-menu), kbd { display: none; }
  .mobile-menu { display: inline-flex; align-items: center; }
  .search-box { min-width: 0; width: min(44vw,15rem); }
  .sidebar { inset: 4.55rem auto 0 0; width: min(88vw,21rem); transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  main { margin-left: 0; padding-top: 4.5rem; }
  .hero { min-height: 0; padding: 4rem 1.35rem 3rem; }
  .hero h1 { font-size: clamp(2.7rem,12vw,4.5rem); }
  .system-map, .readiness, .routes, .document-shell { padding: 3.5rem 1.1rem; }
  .section-heading { align-items: start; flex-direction: column; }
  .flow { grid-template-columns: repeat(2,1fr); }
  .flow-card:nth-child(even) { border-right: 0; }
  .chapter-summary { grid-template-columns: 2rem 1fr auto; padding: 1rem; }
  .chapter-body { padding: .5rem 1.15rem 3rem; }
  .partner-entry { grid-template-columns: auto 1fr; }
  .partner-action { grid-column: 2; }
  .readiness-grid { grid-template-columns: repeat(2,1fr); }
  .readiness-actions { grid-template-columns: 1fr; }
  .route-panel-head { align-items: start; flex-direction: column; gap: .6rem; }
  footer { margin-left: 0; padding: 2rem 1.2rem; align-items: start; flex-direction: column; }
}
@media (max-width: 480px) {
  .brand b { font-size: .78rem; }
  .brand-mark { width: 1.85rem; height: 1.85rem; }
  .search-box { width: 42vw; font-size: .82rem; }
  .hero-meta { display: grid; grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-card, .flow-card:nth-child(even) { min-height: 9rem; border-right: 0; }
  .chapter-summary { grid-template-columns: 1fr auto; }
  .chapter-index { display: none; }
  .architecture-grid, .readiness-grid { grid-template-columns: 1fr; }
  .architecture-grid article { min-height: 9rem; }
  .pilot-line, .season-line { grid-template-columns: 1fr; gap: 0; padding: 1.2rem 0 0; }
  .route-line::before { left: .52rem; right: auto; top: 1.7rem; bottom: 1.6rem; width: 3px; height: auto; }
  .season-line::before { display: block; }
  .route-stop { min-height: 4rem; grid-template-columns: 1.1rem 1fr; justify-items: start; align-items: start; gap: .8rem; text-align: left; }
  .route-stop span { padding-top: .05rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
