/* PurpleTIC — styles. Tokens and decisions in design.md */
:root {
  --purple: #5b2a9d;
  --purple-700: #47207d;
  --purple-50: #f3eefb;
  --purple-100: #e6dcf6;
  --ink: #1b1530;
  --text: #3d3651;
  --muted: #6b6480;
  --line: #e4e1ec;
  --band: #f6f5f9;
  --white: #fff;
  --teal: #0f7c80;
  --green: #1d7a46;
  --amber: #a86100;
  --red: #c0292f;
  --r-lg: 20px;
  --r-md: 12px;
  --r-sm: 10px;
  --shadow: 0 18px 40px -18px rgba(27, 21, 48, .28);
  --ease: 160ms ease;
  --wrap: 1200px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--text); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); text-underline-offset: 3px; }
a:hover { color: var(--purple-700); }
:focus-visible { outline: 3px solid #b99be6; outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 44px; font-weight: 300; letter-spacing: -.01em; line-height: 1.1; }
h2 { font-size: 32px; font-weight: 400; letter-spacing: -.005em; }
h3, .h3 { font-size: 21px; font-weight: 600; }
h4, .h4 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: .35em; }
table { border-collapse: collapse; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.lead { font-size: 19px; color: var(--text); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--purple); margin: 0 0 10px; }
.num, .data td, .data th, .tnum { font-feature-settings: 'tnum' 1; }
.ico { width: 24px; height: 24px; flex: none; }
.ico-sm { width: 18px; height: 18px; }

/* ---------- logo ---------- */
.brand { text-decoration: none; display: inline-flex; align-items: center; }
.logo { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 22px; letter-spacing: -.01em; color: var(--ink); }
.logo-tag { position: relative; display: inline-block; padding: 3px 7px; }
.logo-tag span { display: block; background: var(--purple); color: #fff; border-radius: 6px; padding: 1px 7px; font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.logo-tag::before, .logo-tag::after { content: ''; position: absolute; width: 8px; height: 8px; border: 2px solid var(--purple); }
.logo-tag::before { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.logo-tag::after { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.brand-dark .logo { color: #fff; }
.brand-dark .logo-tag::before, .brand-dark .logo-tag::after { border-color: #c9b2ef; }

/* ---------- viewfinder frame motif ---------- */
.frame { position: relative; }
.frame::before, .frame::after, .frame > .fr::before, .frame > .fr::after { content: ''; position: absolute; width: 18px; height: 18px; border: 2px solid var(--purple); pointer-events: none; }
.frame::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.frame::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.frame > .fr::before { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.frame > .fr::after { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.frame-light::before, .frame-light::after, .frame-light > .fr::before, .frame-light > .fr::after { border-color: rgba(255, 255, 255, .7); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; font: 600 16px/1 var(--font); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-700); color: #fff; }
.btn-ghost { background: transparent; color: var(--purple); border-color: var(--purple); }
.btn-ghost:hover { background: var(--purple-50); color: var(--purple-700); }
.btn-light { background: #fff; color: var(--purple); }
.btn-light:hover { background: var(--purple-50); color: var(--purple-700); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .55; cursor: not-allowed; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--purple); }
.link-arrow .ico { transition: transform var(--ease); }
.link-arrow:hover .ico, a:hover .link-arrow .ico { transform: translateX(3px); }
.link-light { color: #fff; }
.link-light:hover { color: #e6dcf6; }

/* ---------- header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(6px); }
.header-in { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-list > li { margin: 0; position: relative; }
.nav-link { display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; font: 500 15px/1 var(--font); color: var(--ink); text-decoration: none; background: none; border: 0; border-radius: 8px; cursor: pointer; }
.nav-link:hover, .has-menu.is-open > .nav-link { color: var(--purple); background: var(--purple-50); }
.nav-link[aria-current='page'], .has-menu.is-active > .nav-link { color: var(--purple); }
.nav-btn .ico { transition: transform var(--ease); }
.has-menu.is-open .nav-btn .ico { transform: rotate(180deg); }
.menu { position: absolute; top: calc(100% + 8px); left: -8px; min-width: 330px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity var(--ease), transform var(--ease), visibility var(--ease); }
.has-menu.is-open .menu { opacity: 1; visibility: visible; transform: none; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li { margin: 0; }
.menu a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.menu a strong { display: block; font-size: 15px; font-weight: 600; }
.menu a span { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; }
.menu a:hover, .menu a[aria-current='page'] { background: var(--purple-50); }
.menu a:hover strong { color: var(--purple); }
.nav-cta { white-space: nowrap; min-height: 44px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; }

/* ---------- home hero ---------- */
.hero { position: relative; padding: 0 0 72px; }
.hero-grid { display: grid; grid-template-columns: 7fr 5fr; align-items: center; min-height: 600px; }
.hero-media { position: absolute; inset: 0 auto 72px 0; width: 64%; overflow: hidden; border-radius: 0 0 var(--r-lg) 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 40%; }
.hero-card { grid-column: 2; position: relative; z-index: 2; margin: 72px 0 0 -96px; background: var(--purple); color: #fff; border-radius: var(--r-lg); padding: 48px 44px 40px; box-shadow: var(--shadow); }
.hero-card h1 { color: #fff; font-size: 44px; margin-bottom: 18px; }
.hero-card p { color: #ece4fa; font-size: 18px; }
.hero-card .btn-row { margin-top: 28px; }
.hero-card .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .7); }
.hero-card .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- page hero ---------- */
.phero { position: relative; padding: 40px 0 8px; background: var(--band); }
.phero-img { padding: 160px 0 0; background: none; }
.phero-media { position: absolute; inset: 0 0 96px; overflow: hidden; }
.phero-media img { width: 100%; height: 100%; object-fit: cover; }
.phero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27, 21, 48, .05), rgba(27, 21, 48, .35)); }
.phero-card { position: relative; background: #fff; border-radius: var(--r-lg); padding: 36px 44px 32px; max-width: 860px; }
.phero-img .phero-card { box-shadow: var(--shadow); }
.phero:not(.phero-img) .phero-card { background: transparent; padding-left: 0; padding-right: 0; }
.phero:not(.phero-img) .phero-card::before, .phero:not(.phero-img) .phero-card::after, .phero:not(.phero-img) .phero-card > .fr::before, .phero:not(.phero-img) .phero-card > .fr::after { display: none; }
.phero .lead { max-width: 68ch; margin-bottom: 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; font-size: 13px; color: var(--muted); }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: '›'; margin-right: 6px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--purple); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); }

/* ---------- sections ---------- */
.sec { padding: 72px 0; }
.sec-tight { padding: 48px 0; }
.band { background: var(--band); padding: 72px 0; }
.sec-title { position: relative; padding-bottom: 14px; margin-bottom: 28px; }
.sec-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 44px; height: 3px; border-radius: 2px; background: var(--purple); }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.sec-head .sec-title { margin-bottom: 0; }
.sec-head p { max-width: 60ch; margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }

/* ---------- article + aside ---------- */
.page-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 56px; padding: 56px 0 72px; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; font-size: 30px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul li::marker { color: var(--purple); }
.prose figure { margin: 28px 0; }
.prose figure img { border-radius: var(--r-md); width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.aside-sticky { position: sticky; top: 96px; display: grid; gap: 20px; }
.qcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow); }
.qcard .h3 { margin-bottom: 14px; }
.qcard .small { margin: 12px 0 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 20px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.5; margin-bottom: 10px; }
.ticks .ico { color: var(--green); margin-top: 2px; }
.facts { border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px 24px; background: var(--band); }
.facts dl { margin: 0; }
.facts dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.facts dl > div:first-child { border-top: 0; }
.facts dt { color: var(--muted); font-weight: 500; }
.facts dd { margin: 0; color: var(--ink); font-weight: 500; }
.toc { border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 24px; }
.toc ol { margin: 0; padding-left: 1.1em; font-size: 15px; }
.toc a { text-decoration: none; color: var(--text); }
.toc a:hover { color: var(--purple); }

/* ---------- cards / lanes ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; }
.card-link { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--text); transition: border-color var(--ease), transform var(--ease); }
.card-link:hover { border-color: var(--purple); color: var(--text); }
.card-link strong { color: var(--ink); font-size: 18px; }
.card-link .link-arrow { margin-top: auto; }
.badge { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--purple-50); color: var(--purple); }
.badge .ico { width: 28px; height: 28px; }
.lane { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.lane-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.lane-body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.lane-body .badge { margin-top: -54px; border: 4px solid #fff; background: var(--purple-50); }
.lane-body h3 { margin: 4px 0 0; }
.lane-body ul { list-style: none; padding: 0; margin: 4px 0 8px; }
.lane-body li { border-top: 1px solid var(--line); margin: 0; }
.lane-body li a { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px; }
.lane-body li a:hover { color: var(--purple); }

/* ---------- stamps ---------- */
.stamps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.stamps li { display: flex; gap: 14px; align-items: flex-start; padding: 20px 22px; margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.stamps li + li { border-left: 1px solid var(--line); }
.stamps .ico { color: var(--purple); margin-top: 2px; }
.stamps strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }

/* ---------- timeline ---------- */
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 8px; }
.timeline::before { content: ''; position: absolute; left: 0; right: 0; top: 15px; height: 2px; background: var(--line); }
.tl-step { position: relative; }
.stage { position: relative; display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; color: #fff; font-size: 13px; font-weight: 600; font-feature-settings: 'tnum' 1; }
.stage-teal { background: var(--teal); }
.stage-green { background: var(--green); }
.stage-amber { background: var(--amber); }
.stage-red { background: var(--red); }
.stage-purple { background: var(--purple); }
.tl-step h3 { font-size: 17px; margin: 14px 0 6px; }
.tl-step h3 a { text-decoration: none; color: var(--ink); }
.tl-step h3 a:hover { color: var(--purple); }
.tl-step p { font-size: 15px; color: var(--muted); margin: 0; }

/* ---------- steps ---------- */
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 0; }
.steps li { counter-increment: s; margin: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.steps li::before { content: counter(s, decimal-leading-zero); display: block; font-size: 32px; font-weight: 300; color: var(--purple); line-height: 1; margin-bottom: 14px; font-feature-settings: 'tnum' 1; }
.steps strong { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.steps span { font-size: 15px; color: var(--muted); }
.olist { counter-reset: o; list-style: none; padding: 0; }
.olist > li { counter-increment: o; position: relative; padding-left: 48px; margin-bottom: 18px; }
.olist > li::before { content: counter(o); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--purple-50); color: var(--purple); font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }

/* ---------- markets ---------- */
.markets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: #fff; }
.mkt { padding: 24px; }
.mkt + .mkt { border-left: 1px solid var(--line); }
.mkt-code { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 30px; padding: 0 10px; border-radius: 6px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.mkt h3 { font-size: 17px; margin: 14px 0 6px; }
.mkt p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.55; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); margin: 20px 0 8px; background: #fff; }
.data { width: 100%; font-size: 15px; line-height: 1.45; }
.data th, .data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data thead th { background: var(--band); color: var(--ink); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.data tbody tr:last-child td, .data tbody tr:last-child th { border-bottom: 0; }
.data tbody th { color: var(--ink); font-weight: 600; }
.data .r { text-align: right; white-space: nowrap; }
.data .c { text-align: center; }
.table-note { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.aqltab { font-size: 13px; }
.aqltab th, .aqltab td { padding: 7px 8px; text-align: center; white-space: nowrap; }
.aqltab thead th { font-size: 12px; text-transform: none; letter-spacing: 0; }
.aqltab tbody th { text-align: center; background: var(--band); }
.aqltab td.arr { color: var(--muted); }
.aqltab td.hl, .aqltab th.hl { background: var(--purple-50); color: var(--purple-700); font-weight: 700; }
.src { font-size: 13px; font-weight: 500; white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--purple-50); color: var(--purple-700); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; }
.tag-amber { background: #fdf1e1; color: #8a4f00; }
.tag-green { background: #e5f4ea; color: #175f37; }

/* ---------- notes ---------- */
.note { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-left: 3px solid var(--purple); background: var(--purple-50); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 15px; color: var(--ink); margin: 24px 0; }
.note .ico { color: var(--purple); margin-top: 2px; }
.note-amber { border-color: var(--amber); background: #fdf6ec; }
.note-amber .ico { color: var(--amber); }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: ''; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border: 2px solid var(--purple); border-radius: 4px; }
.def-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0; }
.def { border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; }
.def b { display: block; font-size: 28px; font-weight: 300; color: var(--ink); line-height: 1.1; font-feature-settings: 'tnum' 1; }
.def span { font-size: 14px; color: var(--muted); }
.def-crit { border-top: 3px solid var(--red); }
.def-maj { border-top: 3px solid var(--amber); }
.def-min { border-top: 3px solid var(--teal); }

/* ---------- forms / tools ---------- */
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field > label, .legend, legend { font-size: 14px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }
.input, select.input, textarea.input { width: 100%; min-height: 48px; padding: 10px 14px; font: 400 16px/1.4 var(--font); color: var(--ink); background: #fff; border: 1px solid #cfcadb; border-radius: var(--r-sm); transition: border-color var(--ease), box-shadow var(--ease); }
textarea.input { min-height: 110px; resize: vertical; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b2a9d' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.input:hover { border-color: #a99fc0; }
.input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px #e2d6f5; }
.input[aria-invalid='true'] { border-color: var(--red); }
.err { font-size: 13px; color: var(--red); min-height: 0; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid #cfcadb; background: #fff; color: var(--ink); font: 500 14px/1 var(--font); cursor: pointer; transition: background var(--ease), border-color var(--ease), color var(--ease); }
.chip:hover { border-color: var(--purple); color: var(--purple); }
.chip[aria-pressed='true'], .chip:has(input:checked) { background: var(--purple); border-color: var(--purple); color: #fff; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:focus-visible) { outline: 3px solid #b99be6; outline-offset: 2px; }
.tool { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.tool-in { padding: 32px; border-right: 1px solid var(--line); background: #fff; }
.tool-out { padding: 32px 36px; background: var(--band); }
.tool-out[aria-busy='true'] { opacity: .6; }
.res-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; }
.kpi span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kpi b { display: block; font-size: 32px; font-weight: 300; color: var(--ink); line-height: 1.15; font-feature-settings: 'tnum' 1; margin-top: 4px; }
.kpi small { display: block; font-size: 13px; color: var(--muted); }
.plain { background: #fff; border-left: 3px solid var(--purple); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 14px 16px; color: var(--ink); font-size: 16px; }
.plain p { margin: 0 0 6px; }
.plain p:last-child { margin: 0; }
.verdict { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.v-acc { background: #e5f4ea; color: #175f37; }
.v-rej { background: #fbe7e8; color: #9b1f24; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; align-items: center; }
.copied { font-size: 13px; color: var(--green); font-weight: 600; }
.empty { color: var(--muted); font-size: 15px; padding: 24px; border: 1px dashed #cfcadb; border-radius: var(--r-md); background: #fff; }
.mini { background: #fff; border-radius: var(--r-lg); padding: 36px; border: 1px solid var(--line); }
.mini-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.mini-out div { background: var(--band); border-radius: var(--r-sm); padding: 12px 14px; }
.mini-out span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.mini-out b { font-size: 26px; font-weight: 300; color: var(--ink); font-feature-settings: 'tnum' 1; }

/* planner */
.plan-cards { display: grid; gap: 20px; }
.plan-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.plan-card > header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.plan-card > header h3 { margin: 0; font-size: 18px; }
.plan-sec { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.plan-sec:last-child { border-bottom: 0; }
.plan-sec h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 10px; }
.plan-sec ul { list-style: none; padding: 0; margin: 0; }
.plan-sec li { padding: 8px 0; border-top: 1px dashed var(--line); font-size: 15px; line-height: 1.5; margin: 0; }
.plan-sec li:first-child { border-top: 0; padding-top: 0; }
.plan-sec li b { color: var(--ink); font-weight: 600; }
.plan-sec li .why { display: block; color: var(--muted); font-size: 14px; }
.plan-sec li .src { margin-left: 4px; }
.who { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; margin-left: 6px; }
.who-lab { background: #fbe7e8; color: #9b1f24; }
.who-self { background: #e5f4ea; color: #175f37; }

/* quote form */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 36px; box-shadow: var(--shadow); }
.form-sec { padding-bottom: 8px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.form-sec:last-of-type { border-bottom: 0; }
.form-sec > h2 { font-size: 18px; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.form-sec > h2 .n { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--purple); color: #fff; font-size: 13px; }
.trap { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.plan-box { background: var(--purple-50); border: 1px solid var(--purple-100); border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 24px; font-size: 14px; color: var(--ink); }
.plan-box pre { white-space: pre-wrap; font: 13px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; margin: 8px 0 0; }
.status { border-radius: var(--r-md); padding: 20px 22px; margin-top: 16px; }
.status-ok { background: #e5f4ea; border: 1px solid #b9e0c6; color: #123f25; }
.status-err { background: #fbe7e8; border: 1px solid #f0c0c3; color: #6e1418; }
.status h2 { font-size: 22px; color: inherit; display: flex; align-items: center; gap: 10px; }

/* ---------- CTA band + footer ---------- */
.cta-band { position: relative; color: #fff; padding: 88px 0; overflow: hidden; background: var(--ink); }
.cta-media { position: absolute; inset: 0; }
.cta-media img { width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.cta-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(27, 21, 48, .95) 30%, rgba(91, 42, 157, .6)); }
.cta-in { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-in h2 { color: #fff; font-size: 34px; font-weight: 300; margin-bottom: 8px; }
.cta-in p { color: #ddd3ee; margin: 0; max-width: 60ch; }
.cta-actions { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.site-footer { background: var(--ink); color: #c9c2d8; font-size: 15px; padding: 64px 0 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.f-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 48px; }
.f-brand p { margin: 16px 0 0; line-height: 1.6; font-size: 14px; }
.f-disc { color: #a59dba; font-size: 13px !important; }
.f-title { color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.f-col ul { list-style: none; padding: 0; margin: 0; }
.f-col a, .f-bottom a { color: #c9c2d8; text-decoration: none; }
.f-col a:hover, .f-bottom a:hover { color: #fff; text-decoration: underline; }
.f-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 20px 32px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: #a59dba; }

.rounded { border-radius: var(--r-lg); aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* ---------- 404 ---------- */
.nf { text-align: center; padding: 120px 0; }
.nf .code { font-size: 96px; font-weight: 200; color: var(--purple); line-height: 1; }

/* ---------- print sheet (hidden on screen) ---------- */
.print-sheet { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav-link { padding: 10px 8px; font-size: 14px; }
  .f-grid { grid-template-columns: 1fr 1fr 1fr; }
  .f-brand { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  h1, .hero-card h1 { font-size: 32px; }
  h2, .prose h2 { font-size: 26px; }
  h3, .h3 { font-size: 19px; }
  .nav-toggle { display: inline-flex; }
  .nav { position: fixed; inset: 72px 0 0; background: #fff; flex-direction: column; align-items: stretch; padding: 16px 20px 28px; overflow-y: auto; gap: 16px; transform: translateX(100%); visibility: hidden; transition: transform var(--ease), visibility var(--ease); }
  .nav.is-open { transform: none; visibility: visible; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-link { width: 100%; justify-content: space-between; padding: 14px 8px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; display: none; min-width: 0; padding: 4px 0 8px; }
  .has-menu.is-open .menu { display: block; }
  .hero { padding-bottom: 48px; }
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-media { position: relative; inset: auto; width: 100%; height: 300px; border-radius: 0; }
  .hero-card { grid-column: 1; margin: -56px 0 0; padding: 32px 26px; }
  .phero-img { padding-top: 120px; }
  .phero-card { padding: 28px 24px; }
  .page-grid { grid-template-columns: 1fr; gap: 40px; padding: 40px 0 56px; }
  .aside-sticky { position: static; }
  .grid-3, .grid-4, .steps, .timeline { grid-template-columns: 1fr 1fr; }
  .timeline::before { display: none; }
  .split, .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .stamps { grid-template-columns: 1fr; }
  .stamps li + li { border-left: 0; border-top: 1px solid var(--line); }
  .markets { grid-template-columns: 1fr 1fr; }
  .mkt + .mkt { border-left: 0; }
  .mkt { border-top: 1px solid var(--line); }
  .tool { grid-template-columns: 1fr; }
  .tool-in { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 20px; }
  .tool-out { padding: 24px 20px; }
  .sec, .band { padding: 56px 0; }
  .cta-band { padding: 64px 0; }
  .cta-in h2 { font-size: 28px; }
  .form-card, .mini { padding: 24px 20px; }
}
@media (max-width: 600px) {
  .grid-3, .grid-4, .steps, .timeline, .markets, .kpis, .def-grid, .mini-out, .row-2 { grid-template-columns: 1fr; }
  .row-3 { grid-template-columns: 1fr 1fr 1fr; }
  .f-grid { grid-template-columns: 1fr 1fr; }
  .kpi b { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- print ---------- */
@media print {
  @page { size: A4; margin: 14mm; }
  body { font-size: 11pt; color: #000; background: #fff; }
  body.has-print .site-header, body.has-print .site-footer, body.has-print main > *:not(.print-sheet) { display: none !important; }
  body.has-print .print-sheet { display: block !important; }
  .print-sheet h1 { font-size: 20pt; font-weight: 400; margin: 0 0 4pt; }
  .print-sheet h2 { font-size: 12pt; font-weight: 700; margin: 12pt 0 4pt; border-bottom: 1px solid #999; padding-bottom: 2pt; }
  .print-sheet table { width: 100%; border-collapse: collapse; font-size: 10pt; }
  .print-sheet th, .print-sheet td { border: 1px solid #999; padding: 4pt 6pt; text-align: left; vertical-align: top; }
  .print-sheet .ph { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #5b2a9d; padding-bottom: 6pt; margin-bottom: 8pt; }
  .print-sheet .blank { display: inline-block; min-width: 60mm; border-bottom: 1px solid #000; }
  .print-sheet .box { display: inline-block; width: 10pt; height: 10pt; border: 1px solid #000; margin-right: 6pt; vertical-align: -1pt; }
  .print-sheet .foot { font-size: 8.5pt; color: #444; margin-top: 10pt; }
  .print-sheet ul { margin: 0; padding-left: 0; list-style: none; }
  .print-sheet li { margin: 2pt 0; }
  a { color: #000; text-decoration: none; }
}
