:root {
    --blue: #1432a4;
    --blue-dark: #0b1c68;
    --blue-soft: #e8edff;
    --coral: #ff6b4a;
    --coral-dark: #d94b2b;
    --cream: #f5f1e8;
    --paper: #fffdf8;
    --ink: #172039;
    --muted: #65708c;
    --line: #cdd4e5;
    --yellow: #ffe77a;
    --white: #fff;
    --shadow: 0 22px 65px rgba(24, 36, 79, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; color: var(--ink); background: var(--cream);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
button, input, select { font: inherit; }
button { color: inherit; }
.icon { width: 1.2em; height: 1.2em; flex: 0 0 auto; }
.shell { width: min(1180px, calc(100% - 44px)); margin-inline: auto; }
.narrow { width: min(850px, calc(100% - 44px)); }
.skip-link { position: fixed; z-index: 100; top: 0; left: 10px; padding: 10px 14px; color: white; background: var(--coral); clip-path: inset(100%); }
.skip-link:focus { top: 10px; clip-path: none; }

.site-header { color: white; background: var(--blue); border-bottom: 1px solid rgba(255,255,255,.18); }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: white; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; color: white; background: var(--coral); border-radius: 50%; }
.brand-mark .icon { width: 27px; height: 27px; }
.brand > span:last-child { display: grid; line-height: 1; text-transform: uppercase; }
.brand strong { font-size: 15px; letter-spacing: .03em; }
.brand b { color: var(--yellow); font-size: 9px; letter-spacing: .2em; }
.site-header nav { display: flex; gap: 30px; }
.site-header nav a { color: #c4cefa; font-size: 12px; font-weight: 750; text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: white; }
.header-cta { display: inline-flex; align-items: center; gap: 8px; color: var(--yellow); font-size: 12px; font-weight: 800; }
.header-cta .icon { width: 16px; }

.hero {
    position: relative; overflow: hidden; color: white; background:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
        var(--blue);
    background-size: 40px 40px;
}
.hero::before { position: absolute; inset: 0; background: linear-gradient(90deg, var(--blue) 0 48%, transparent 75%); content: ""; }
.hero-grid { min-height: 650px; display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 70px; padding-block: 62px 72px; }
.hero-copy { position: relative; z-index: 2; }
.kicker { margin: 0 0 14px; color: var(--yellow); font-size: 10px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.kicker.blue, .chapter { color: var(--blue); }
h1, h2, h3, p { margin-top: 0; }
.hero h1, .subhero h1, .not-found h1 {
    margin-bottom: 25px; font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(55px, 6.8vw, 88px); font-weight: 500; letter-spacing: -.06em; line-height: .93;
}
.hero h1 em, .subhero h1 em { color: var(--yellow); font-style: italic; }
.hero-copy > p:not(.kicker) { max-width: 555px; margin-bottom: 29px; color: #d7ddfa; font-size: 18px; }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 9px; padding: 12px 21px; border: 0; border-radius: 4px; text-decoration: none; font-size: 13px; font-weight: 850; }
.button.coral { color: white; background: var(--coral); box-shadow: 8px 8px 0 rgba(255,231,122,.9); }
.button.coral:hover { background: #ff7b5d; }
.hero-notes { display: flex; gap: 24px; margin-top: 37px; color: #b9c4f4; font-size: 10px; }
.hero-notes span { display: flex; align-items: center; gap: 7px; }
.hero-notes .icon { color: var(--yellow); }

.hero-drawing { position: relative; z-index: 2; color: #aebdfc; }
.hero-drawing > svg { display: block; width: min(100%, 545px); margin-left: auto; color: #aebdfc; }
.drawing-id { position: absolute; top: 8px; left: 42px; z-index: 2; color: var(--yellow); font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.draw-circle { fill: rgba(255,255,255,.04); stroke: white; stroke-width: 3; }
.draw-point { fill: var(--coral); }
.measure { fill: none; stroke: var(--yellow); stroke-width: 2; }
.radius-line { fill: none; stroke: var(--coral); stroke-width: 3; }
.arc-note { fill: none; stroke: #aebdfc; stroke-width: 1.5; stroke-dasharray: 5 6; }
.hero-drawing text { fill: white; font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-style: italic; }
.hero-drawing text:last-child { fill: #c3cdf7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; font-style: normal; }
.pi-stamp { position: absolute; right: 5px; bottom: 25px; width: 91px; height: 91px; display: grid; place-items: center; color: var(--blue); background: var(--yellow); border-radius: 50%; font-family: Georgia, "Times New Roman", serif; font-size: 43px; transform: rotate(8deg); }
.pi-stamp small { position: absolute; bottom: 13px; font-family: ui-monospace, monospace; font-size: 7px; }

.quick-strip { color: white; background: var(--blue-dark); }
.quick-strip > div { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.quick-strip span { display: flex; align-items: center; gap: 9px; color: #b8c3ed; font-size: 10px; }
.quick-strip b { color: var(--yellow); font-family: Georgia, "Times New Roman", serif; font-size: 18px; }
.quick-strip i { color: var(--coral); font-style: normal; }

.calculator-section { padding: 105px 0 115px; }
.section-heading { display: grid; grid-template-columns: 1.15fr .85fr; align-items: end; gap: 70px; margin-bottom: 43px; }
.section-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(43px, 5vw, 64px); font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.section-heading > p { max-width: 460px; margin: 0 0 3px; color: var(--muted); font-size: 14px; }
.calculator-grid { display: grid; grid-template-columns: .9fr 1.05fr .7fr; align-items: stretch; gap: 15px; }
.input-panel, .result-panel, .visual-panel { position: relative; padding: 29px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.panel-number { margin-bottom: 30px; color: var(--blue); font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.field { display: grid; gap: 7px; margin-bottom: 19px; }
.field > span:first-child, .sector-inputs label > span:first-child { color: var(--muted); font-size: 10px; font-weight: 750; }
.field select, .value-input, .compact-input { width: 100%; min-height: 55px; color: var(--ink); background: #f0f3fb; border: 1px solid #cbd3e8; border-radius: 3px; }
.field select { padding: 0 13px; outline: 0; font-size: 12px; font-weight: 700; }
.value-row { display: grid; grid-template-columns: 1fr 92px; gap: 10px; }
.value-input, .compact-input { display: flex; align-items: center; padding: 0 13px; }
.value-input input, .compact-input input { min-width: 0; width: 100%; color: var(--blue-dark); border: 0; outline: 0; background: transparent; font-family: Georgia, "Times New Roman", serif; font-size: 29px; font-weight: 600; }
.value-input b, .compact-input b { color: var(--blue); font-size: 11px; }
.field select:focus, .value-input:focus-within, .compact-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20,50,164,.12); }
.form-error { min-height: 20px; margin: -5px 0 13px; color: #a83825; font-size: 10px; font-weight: 750; }
.formula-preview { display: grid; gap: 2px; margin-top: 9px; padding: 17px; color: white; background: var(--blue); border-left: 5px solid var(--coral); }
.formula-preview span { color: #adbaf0; font-size: 8px; text-transform: uppercase; }
.formula-preview strong { color: var(--yellow); font-family: Georgia, "Times New Roman", serif; font-size: 19px; font-weight: 500; }
.privacy-note { display: flex; align-items: flex-start; gap: 8px; margin: 21px 0 0; color: var(--muted); font-size: 9px; }
.privacy-note .icon { color: var(--blue); }

.result-panel { color: white; background: var(--blue); border-color: var(--blue); }
.result-panel .panel-number { color: var(--yellow); }
.main-result { display: grid; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.2); }
.main-result > span { color: #b7c2ee; font-size: 9px; text-transform: uppercase; }
.main-result strong { margin: 2px 0; color: var(--yellow); font-family: Georgia, "Times New Roman", serif; font-size: 38px; font-weight: 500; letter-spacing: -.04em; line-height: 1.05; overflow-wrap: anywhere; }
.main-result small { color: #91a0dc; font-size: 8px; }
.result-list { margin-top: 14px; }
.result-list button { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 14px; padding: 13px 0; cursor: pointer; border: 0; border-bottom: 1px solid rgba(255,255,255,.14); background: transparent; text-align: left; }
.result-list button:last-child { border-bottom: 0; }
.result-list button:hover { padding-inline: 9px; background: rgba(255,255,255,.07); }
.result-list span { display: flex; align-items: center; gap: 8px; color: #c2cbf0; font-size: 10px; }
.result-list i { width: 25px; height: 25px; display: grid; place-items: center; color: var(--blue); background: var(--yellow); border-radius: 50%; font-family: Georgia, "Times New Roman", serif; font-size: 13px; font-weight: 800; }
.result-list strong { color: white; font-size: 14px; text-align: right; overflow-wrap: anywhere; }
.result-list small { grid-column: 2; color: #8292d2; font-size: 7px; text-align: right; }

.visual-panel { overflow: hidden; padding: 24px; background: #e8edff; box-shadow: none; }
.visual-panel::after { position: absolute; right: -65px; bottom: -80px; width: 170px; height: 170px; border: 27px solid rgba(20,50,164,.08); border-radius: 50%; content: ""; }
.visual-panel > svg { display: block; width: 100%; margin: 6px auto 19px; }
.visual-circle { fill: rgba(255,255,255,.6); stroke: var(--blue); stroke-width: 4; }
.visual-diameter { stroke: var(--coral); stroke-width: 3; }
.visual-radius { stroke: var(--blue-dark); stroke-width: 2; stroke-dasharray: 5 5; }
.visual-center { fill: var(--blue); }
.visual-panel text { fill: var(--blue); font-family: Georgia, "Times New Roman", serif; font-size: 21px; font-style: italic; }
.visual-panel dl { position: relative; z-index: 2; margin: 0; }
.visual-panel dl > div { display: grid; gap: 2px; padding: 11px 0; border-top: 1px solid #bdc7e7; }
.visual-panel dt { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.visual-panel dd { margin: 0; color: var(--blue); font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }

.sector-section { padding: 110px 0; color: white; background: var(--blue-dark); }
.sector-grid { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 90px; }
.sector-copy h2 { margin-bottom: 18px; font-family: Georgia, "Times New Roman", serif; font-size: 57px; font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.sector-copy > p:not(.kicker) { max-width: 500px; color: #aeb9e4; }
.sector-graphic { width: 310px; margin-top: 35px; color: white; }
.sector-graphic svg { display: block; width: 100%; }
[data-sector-shape] { fill: rgba(255,107,74,.18); stroke: none; }
.sector-lines { fill: none; stroke: #8493d1; stroke-width: 2; }
.sector-arc { fill: none; stroke: var(--coral); stroke-width: 5; }
.sector-graphic text { fill: var(--yellow); font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-style: italic; }
.sector-card { padding: 33px; color: var(--ink); background: var(--paper); box-shadow: 12px 12px 0 var(--coral); }
.sector-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sector-inputs label { display: grid; gap: 7px; }
.compact-input { background: var(--blue-soft); }
.sector-card .form-error { margin: 11px 0 5px; }
.sector-results { margin: 12px 0 0; }
.sector-results > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.sector-results dt { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 0 7px; font-weight: 800; }
.sector-results dt i { color: var(--coral); font-family: Georgia, "Times New Roman", serif; font-size: 17px; }
.sector-results dt small { grid-column: 1 / -1; color: var(--muted); font-size: 8px; font-weight: 500; }
.sector-results dd { margin: 0; color: var(--blue); font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 600; text-align: right; }

.formula-cards { padding: 110px 0 120px; }
.compact-heading { grid-template-columns: 1fr auto; }
.compact-heading > a { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); font-size: 12px; font-weight: 850; }
.formula-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.formula-grid article { min-height: 295px; position: relative; padding: 25px; background: var(--paper); border: 1px solid var(--line); }
.formula-grid article:nth-child(even) { background: var(--blue-soft); }
.formula-grid article > span { color: var(--coral); font-size: 9px; font-weight: 850; }
.formula-grid article > i { width: 62px; height: 62px; display: grid; place-items: center; margin: 34px 0 19px; color: white; background: var(--blue); border-radius: 50%; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 700; }
.formula-grid h3 { margin-bottom: 5px; font-size: 14px; }
.formula-grid strong { color: var(--blue); font-family: Georgia, "Times New Roman", serif; font-size: 18px; }
.formula-grid p { margin: 14px 0 0; color: var(--muted); font-size: 10px; }

.subhero { padding: 100px 0 95px; color: white; background:
    radial-gradient(circle at 84% 46%, transparent 0 125px, rgba(255,255,255,.11) 126px 128px, transparent 129px),
    var(--blue); }
.subhero.compact { padding-block: 72px; }
.subhero h1 { max-width: 920px; }
.subhero > div > p:last-child { max-width: 700px; margin: 0; color: #c7cff1; font-size: 18px; }
.prose { max-width: 860px; padding-block: 85px 115px; }
.prose section { margin-bottom: 75px; }
.prose section:last-child { margin-bottom: 0; }
.chapter { margin-bottom: 10px; font-size: 9px; font-weight: 850; letter-spacing: .15em; }
.prose h2, .legal h2 { margin-bottom: 17px; font-family: Georgia, "Times New Roman", serif; font-size: 41px; font-weight: 500; letter-spacing: -.045em; line-height: 1.08; }
.prose p, .legal p { color: var(--muted); font-size: 17px; line-height: 1.75; }
.prose p em { color: var(--blue); font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 700; }
.formula-box { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 26px 0; background: var(--line); border: 1px solid var(--line); }
.formula-box.three { grid-template-columns: repeat(3, 1fr); }
.formula-box span { padding: 25px; color: var(--yellow); background: var(--blue); font-family: Georgia, "Times New Roman", serif; font-size: 25px; text-align: center; }
.worked-example { display: grid; gap: 8px; margin-top: 27px; padding: 28px; color: white; background: var(--blue); border-left: 7px solid var(--yellow); }
.worked-example b { color: #b6c0ea; font-size: 10px; text-transform: uppercase; }
.worked-example span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.worked-example strong { color: var(--yellow); font-family: Georgia, "Times New Roman", serif; font-size: 25px; }
.coral-example { background: var(--coral-dark); border-color: var(--blue); }
.coral-example strong { color: white; }
.formula-list { margin-top: 25px; border: 1px solid var(--line); }
.formula-list > div { display: flex; justify-content: space-between; gap: 25px; padding: 17px 20px; background: var(--paper); border-bottom: 1px solid var(--line); }
.formula-list > div:last-child { border-bottom: 0; }
.formula-list b { font-size: 12px; }
.formula-list span { color: var(--blue); font-family: Georgia, "Times New Roman", serif; font-size: 18px; }
.faq-list { max-width: 900px; padding-block: 75px 110px; }
.faq-list details { border-top: 1px solid var(--line); background: var(--paper); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; padding: 25px 52px 25px 8px; cursor: pointer; list-style: none; font-family: Georgia, "Times New Roman", serif; font-size: 23px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { position: absolute; top: 23px; right: 16px; width: 30px; height: 30px; display: grid; place-items: center; color: white; background: var(--blue); border-radius: 50%; content: "+"; font-family: sans-serif; font-size: 20px; }
.faq-list details[open] summary::after { color: var(--ink); background: var(--yellow); content: "−"; }
.faq-list details > div { max-width: 760px; padding: 0 52px 25px 8px; color: var(--muted); }
.faq-list details p { margin: 0; }
.legal { max-width: 800px; padding-block: 80px 110px; }
.legal section { margin-bottom: 46px; }
.legal h2 { font-size: 30px; }
.legal p { font-size: 16px; }
.legal a { color: var(--blue); font-weight: 700; }
.not-found { min-height: 640px; display: grid; place-items: center; padding: 80px 0; color: white; background: var(--blue); text-align: center; }
.not-found span { color: var(--yellow); font-size: 10px; font-weight: 850; letter-spacing: .15em; }
.not-found h1 { margin-top: 16px; }
.not-found p { color: #c4cdef; }
.not-found .button { margin-top: 12px; }

.site-footer { color: #aab5df; background: #07103f; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 70px; padding-block: 65px 50px; }
.footer-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.footer-grid p { margin: 10px 0 0; color: #6876ae; font-size: 11px; }
.footer-grid > div > b { margin-bottom: 7px; color: var(--yellow); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.footer-grid a:not(.brand) { color: #aab5df; font-size: 11px; text-decoration: none; }
.footer-grid a:hover { color: white; }
.footer-bottom { display: flex; justify-content: space-between; padding-block: 18px; color: #5f6ca1; border-top: 1px solid rgba(255,255,255,.1); font-size: 9px; }

@media (max-width: 1000px) {
    .hero-grid { gap: 25px; }
    .calculator-grid { grid-template-columns: 1fr 1fr; }
    .visual-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 280px 1fr; align-items: center; }
    .visual-panel > svg { max-width: 270px; }
    .formula-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .shell, .narrow { width: min(100% - 30px, 1180px); }
    .header-inner { min-height: 68px; }
    .site-header nav { display: none; }
    .header-cta { font-size: 0; }
    .header-cta .icon { width: 20px; }
    .hero-grid { min-height: auto; grid-template-columns: 1fr; padding-block: 54px 57px; }
    .hero h1, .subhero h1 { font-size: 51px; }
    .hero-copy > p:not(.kicker) { font-size: 16px; }
    .hero-drawing { margin-top: 15px; }
    .hero-drawing > svg { max-width: 440px; margin-inline: auto; }
    .drawing-id { left: 15px; }
    .pi-stamp { right: 7px; width: 76px; height: 76px; font-size: 36px; }
    .quick-strip > div { display: grid; grid-template-columns: 1fr; gap: 8px; padding-block: 18px; }
    .quick-strip i { display: none; }
    .calculator-section { padding-block: 73px 80px; }
    .section-heading { grid-template-columns: 1fr; gap: 17px; }
    .section-heading h2 { font-size: 44px; }
    .calculator-grid { grid-template-columns: 1fr; }
    .input-panel, .result-panel, .visual-panel { padding: 24px; }
    .visual-panel { grid-column: auto; display: block; }
    .visual-panel > svg { max-width: 300px; }
    .sector-section { padding-block: 80px; }
    .sector-grid { grid-template-columns: 1fr; gap: 45px; }
    .sector-copy h2 { font-size: 46px; }
    .sector-graphic { max-width: 100%; }
    .sector-card { padding: 24px; box-shadow: 7px 7px 0 var(--coral); }
    .formula-cards { padding-block: 78px 90px; }
    .compact-heading { grid-template-columns: 1fr; }
    .formula-grid { grid-template-columns: 1fr 1fr; }
    .subhero { padding-block: 70px; }
    .prose { padding-block: 65px 90px; }
    .prose section { margin-bottom: 57px; }
    .prose h2 { font-size: 34px; }
    .formula-box, .formula-box.three { grid-template-columns: 1fr; }
    .formula-list > div { flex-direction: column; gap: 4px; }
    .faq-list { padding-block: 55px 80px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 38px 25px; }
    .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 440px) {
    .brand strong { font-size: 13px; }
    .hero h1, .subhero h1 { font-size: 45px; }
    .hero-notes { flex-direction: column; gap: 8px; }
    .value-row, .sector-inputs { grid-template-columns: 1fr; }
    .unit-field { margin-top: -8px; }
    .main-result strong { font-size: 34px; }
    .sector-results > div { align-items: flex-start; flex-direction: column; gap: 7px; }
    .sector-results dd { text-align: left; }
    .formula-grid { grid-template-columns: 1fr; }
    .formula-grid article { min-height: 250px; }
    .footer-bottom { flex-direction: column; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
