:root {
  color-scheme: light;
  --paper: #f7f6f1;
  --panel: #fffefa;
  --ink: #222033;
  --subtle: #625e71;
  --quiet: #746e83;
  --line: #e4e0e8;
  --violet: #5533cb;
  --violet-dark: #4223ae;
  --wash: #eeebfb;
  --night: #201b36;
  --night-line: #49405f;
  --night-text: #e9e3f7;
  --lilac: #d7c6ff;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --radius: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--violet-dark); text-underline-offset: .2em; }
a:hover { color: var(--violet); }
:focus-visible { outline: 3px solid #8d69fa; outline-offset: 4px; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
svg { display: block; }
.container { width: min(1152px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: 1rem; z-index: 10; padding: .55rem .9rem; background: white; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--line); background: var(--panel); }
.header-inner { display: flex; min-height: 73px; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .62rem; color: var(--ink); text-decoration: none; font-size: 1.28rem; font-weight: 820; letter-spacing: -.055em; white-space: nowrap; }
.brand img { width: 35px; height: 35px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .35rem; }
.nav a { padding: .42rem .7rem; border-radius: 8px; font-size: .88rem; font-weight: 650; text-decoration: none; white-space: nowrap; color: var(--subtle); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--wash); color: var(--violet-dark); }
.hero { display: grid; grid-template-columns: 1.04fr .96fr; align-items: center; gap: clamp(1.4rem, 4vw, 4.1rem); padding-block: 57px 46px; }
.eyebrow, .result-kicker, .section-kicker, .figure-label, .figure-caption {
  font: 700 .72rem/1.45 var(--mono); text-transform: uppercase; letter-spacing: .095em;
}
.eyebrow { color: var(--violet-dark); margin: 0 0 1.04rem; display: flex; gap: .6rem; align-items: center; }
.eyebrow::before { content: ""; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 2px; background: #8e6df2; transform: rotate(45deg); }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: clamp(2.6rem, 5.1vw, 4.5rem); line-height: .98; letter-spacing: -.075em; margin-bottom: 1.15rem; font-weight: 820; }
h1 em { color: var(--violet); font-style: normal; }
h2 { font-size: clamp(1.75rem, 3.05vw, 2.65rem); line-height: 1.07; letter-spacing: -.06em; }
h3 { font-size: 1.22rem; line-height: 1.25; letter-spacing: -.028em; }
.hero-intro { font-size: clamp(1.02rem, 1.6vw, 1.16rem); max-width: 47ch; color: var(--subtle); margin-bottom: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .72rem 1.1rem; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .58rem .92rem; border: 1px solid transparent; border-radius: 10px; background: var(--violet); color: white; font-weight: 720; font-size: .88rem; text-decoration: none; text-align: center; }
.button:hover { background: var(--violet-dark); color: white; }
.hero .button { min-height: 48px; padding-inline: 1.08rem; }
.text-link { font-size: .9rem; font-weight: 710; color: var(--violet-dark); }
.figure { background: #201932; color: var(--night-text); border-radius: 22px; overflow: hidden; margin: 0; box-shadow: 0 12px 34px #2a194a22; border: 1px solid #3a2b52; }
.figure-label, .figure-caption { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .66rem 1.04rem; color: #d0c1e5; font-size: .65rem; }
.figure-label { border-bottom: 1px solid #514360; }
.figure-caption { border-top: 1px solid #514360; text-transform: none; letter-spacing: .045em; }
.figure-caption span:last-child { color: #decfff; white-space: nowrap; }
.figure-label i { display: inline-block; width: 7px; height: 7px; background: #c3adf8; margin-right: .42rem; border-radius: 50%; }
.figure img { display: block; width: 100%; height: auto; }
.secondary-hero { padding-block: 41px 30px; display: block; }
.secondary-hero h1 { max-width: 18ch; font-size: clamp(2.5rem, 5.1vw, 4.2rem); }
.secondary-hero .hero-intro { max-width: 64ch; margin-bottom: 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: .95rem; }
.section-kicker { color: var(--violet-dark); margin-bottom: .36rem; }
.section-head h2 { margin: 0; }
.section-head p:last-child { margin-bottom: 0; }
.status-tag { flex: 0 0 auto; padding: .36rem .6rem; border-radius: 7px; color: #433b52; border: 1px solid #dfd9eb; background: #f0edf7; font: 650 .68rem/1.5 var(--mono); letter-spacing: .015em; }
.calc-section { padding-bottom: 49px; scroll-margin-top: 18px; }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1.27fr) minmax(0, .92fr); gap: 19px; align-items: start; }
.form-card, .tool-card, .article-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.form-card { padding: clamp(1rem, 2.2vw, 1.7rem); }
.form-head, .form-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.form-head { margin-bottom: 1rem; }
.form-head h3, .form-head p, .form-footer p { margin: 0; }
.form-head p, .field-help, .form-note { font-size: .83rem; color: var(--subtle); }
.currency { display: inline-flex; align-items: center; gap: .43rem; font-size: .76rem; font-weight: 650; color: var(--subtle); }
.currency select { color: var(--ink); min-height: 38px; padding: .3rem .34rem; border: 1px solid #dcd6e3; border-radius: 8px; background: #fff; font: 700 .82rem/1 var(--mono); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1rem; }
.field { min-width: 0; }
.field label { display: block; font-size: .84rem; font-weight: 700; line-height: 1.25; margin-bottom: .38rem; }
.input-wrap { display: flex; align-items: center; border: 1px solid #dad5e0; border-radius: 9px; background: #fff; min-height: 45px; }
.input-wrap:focus-within { border-color: #8762e5; box-shadow: 0 0 0 3px #ebe3ff; }
.input-wrap:has([aria-invalid="true"]) { border-color: #ae3b41; }
.input-wrap input { color: var(--ink); width: 100%; min-width: 0; min-height: 43px; border: 0; border-radius: 9px; background: transparent; padding: .48rem .6rem; outline: 0; font-weight: 680; font-variant-numeric: tabular-nums; }
.unit { flex: 0 0 auto; padding-right: .62rem; color: var(--quiet); font: .72rem var(--mono); white-space: nowrap; }
.field-help { display: block; margin: .24rem 0 0; line-height: 1.4; }
.form-note { margin: .85rem 0 0; }
.advanced { margin-top: 1.14rem; border-top: 1px solid var(--line); }
.advanced summary { font-size: .9rem; font-weight: 750; color: var(--violet-dark); padding: .86rem 0; }
.advanced .field-grid { padding: .15rem 0 .35rem; }
.form-footer { border-top: 1px solid var(--line); margin-top: .92rem; padding-top: .75rem; }
.reset, .preset { border: 0; padding: .2rem 0; background: transparent; color: var(--violet-dark); font-size: .84rem; font-weight: 710; text-decoration: underline; text-underline-offset: .2em; }
.preset { margin-top: .7rem; }
.error { margin: .8rem 0 0; color: #962e38; font-weight: 670; font-size: .86rem; }
.result { padding: clamp(1.1rem, 2.35vw, 1.6rem); color: var(--night-text); background: var(--night); border: 1px solid #332b49; border-radius: var(--radius); min-width: 0; }
.result-kicker { color: var(--lilac); margin: 0 0 .18rem; }
.result-head { display: flex; align-items: center; gap: 7px; }
.result-head::before { content: ""; width: 7px; height: 7px; background: #d4c1ff; border-radius: 50%; }
.result-metric { color: #fffaff; font-size: clamp(2.2rem, 4.6vw, 3.55rem); font-weight: 800; line-height: 1.12; letter-spacing: -.07em; overflow-wrap: anywhere; margin: 0; }
.result-negative .result-metric { color: #ffc5ca; }
.result-subtitle { color: #cfc4e1; font-size: .87rem; margin: .15rem 0 .8rem; }
.result dl { margin: 0; }
.result dl > div { border-top: 1px solid var(--night-line); padding: .38rem 0; display: flex; justify-content: space-between; gap: .65rem; font-size: .88rem; }
.result dl > div:first-child { color: white; font-weight: 700; }
.result dt { min-width: 0; }
.result dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; font-weight: 690; }
.result-note { font-size: .79rem; line-height: 1.4; color: #d0c4e5; margin: .52rem 0 0; }
.result-actions { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .87rem; }
.result .button { min-height: 39px; padding: .42rem .68rem; background: #e5d9ff; color: #2f195e; font-size: .82rem; }
.result .button:hover { background: #f5eeff; }
.result .button-secondary { border-color: #665a81; background: transparent; color: #f1eafe; }
.result .button-secondary:hover { background: #3e3358; color: white; }
.result [data-price-link] { flex: 1 0 100%; }
.result [data-price-link]:not([href]) { display: none; }
.result [data-status] { margin: 0; color: #e8dbff; font-size: .8rem; }
.result [data-status]:not(:empty) { margin-top: .6rem; }
.noscript { padding: .7rem 1rem; background: var(--wash); color: var(--violet-dark); border-radius: 8px; }
.tools-section { border-top: 1px solid var(--line); padding-block: 33px 46px; }
.tools-section h2 { margin-bottom: .95rem; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.tool-card { display: flex; flex-direction: column; gap: .3rem; padding: 1rem; text-decoration: none; color: var(--ink); border-radius: 14px; }
.tool-card:hover { border-color: #ab90ef; background: #faf7ff; }
.tool-card strong { line-height: 1.27; font-size: 1rem; }
.tool-card span { color: var(--subtle); font-size: .83rem; line-height: 1.42; }
.tool-card .tool-code { color: var(--violet-dark); font: 700 .69rem/1.4 var(--mono); letter-spacing: .09em; }
.article-wrap { padding-bottom: 48px; }
.article-card { padding: clamp(1rem, 3vw, 2.35rem); }
.article-body { max-width: 78ch; }
.article-body h2 { margin-bottom: .77rem; }
.article-body h3 { margin: 1.5rem 0 .4rem; }
.article-body p, .article-body li { color: var(--subtle); }
.article-body li + li { margin-top: .34rem; }
.article-body .formula { background: #f1edf9; border-left: 3px solid #8d68eb; padding: .7rem .83rem; border-radius: 0 8px 8px 0; color: #3b2c58; font: .85rem/1.55 var(--mono); overflow-wrap: anywhere; }
.article-body .sources { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: .85rem; font-size: .9rem; }
.article-body .sources h3 { margin-top: 0; }
.table-scroll { overflow-x: auto; margin-block: .8rem; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
th, td { padding: .55rem .62rem; border-bottom: 1px solid var(--line); text-align: left; }
th { background: var(--wash); }
.article-body details { border-top: 1px solid var(--line); padding: .68rem 0; }
.article-body details summary { font-size: .96rem; font-weight: 710; }
.article-body details p { margin: .48rem 0 0; }
.footer { background: var(--panel); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .65rem 1.3rem; padding-block: 1.2rem; font-size: .84rem; }
.footer-inner p { color: var(--subtle); margin: 0; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: .6rem 1rem; }
.footer-inner a { font-weight: 660; }
@media (max-width: 850px) {
  .container { width: min(100% - 36px, 1152px); }
  .hero { gap: 20px; padding-block: 41px 35px; }
  .calc-grid { gap: 13px; }
}
@media (max-width: 650px) {
  .header-inner { align-items: flex-start; flex-direction: column; gap: .4rem; padding-block: .62rem .55rem; }
  .nav { gap: .1rem .24rem; }
  .nav a { padding: .33rem .46rem; font-size: .8rem; }
  .hero { grid-template-columns: 1fr; padding-block: 31px 25px; gap: 19px; }
  .hero h1 { margin-bottom: .78rem; }
  .hero-intro { margin-bottom: .9rem; }
  .eyebrow { margin-bottom: .69rem; }
  .figure { max-width: 440px; }
  .figure img { max-height: 190px; object-fit: cover; object-position: center; }
  .calc-grid, .tool-grid { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; gap: .4rem; }
  .calc-section { padding-bottom: 31px; }
  .form-card { padding: .9rem; }
  .form-head { margin-bottom: .8rem; }
  .field-grid { gap: .73rem .6rem; }
  .unit { padding-right: .42rem; font-size: .65rem; }
  .input-wrap input { padding-inline: .46rem .1rem; }
}
@media (max-width: 360px) {
  .container { width: calc(100% - 24px); }
  .field-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  body { background: white; color: black; }
  .site-header, .section-head, .form-card, .result-actions, .result [data-status], .tools-section, .footer, .skip-link,
  .calculator-page .hero, .calculator-page .article-wrap { display: none !important; }
  .result::before { content: "SpoolBasis · " attr(data-result); display: block; margin-bottom: 1rem; font-weight: 700; }
  .content-page .article-card { border: 0; padding: 0; }
  .content-page .hero { padding-top: 0; }
  .content-page .button { color: black; background: white; }
  .container { width: 100%; }
  .calc-grid { display: block; }
  .result { color: black; background: white; border: 1px solid #aaa; }
  .result-metric, .result-kicker, .result-subtitle, .result-note, .result dl > div:first-child, .result-negative .result-metric { color: black; }
  .result dl > div { border-color: #aaa; }
}
