/* StructCalc — modern blueprint theme. Light / dark via tokens; .on-dark scopes the dark set to a panel. */

:root {
  --bg: #f6f7fb;
  --bg-alt: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --line: #e2e7f0;
  --line-strong: #c6cfdd;
  --text: #0a1020;
  --text-2: #4a5568;
  --text-3: #5e6a80;
  --accent: #b8460a; /* text-safe orange (WCAG AA on light surfaces); gradients keep the bright brand orange */
  --accent-ink: #ffffff;
  --accent-soft: #fff1e7;
  --blue: #2563eb;
  --blue-soft: #e8effe;
  --ok: #0f7a41;
  --ok-soft: #e3f5ea;
  --warn: #8f5600;
  --warn-soft: #fff4dc;
  --bad: #c62828;
  --bad-soft: #fdeaea;
  --load: #e5484d;
  --moment: #d9730d;
  --grid: rgba(37, 99, 235, 0.07);
  --glass: rgba(255, 255, 255, 0.72);
  --grad: linear-gradient(135deg, #f05a0a 0%, #ff8a2b 60%, #ffae4d 100%);
  --grad-text: linear-gradient(100deg, #ff6a13 0%, #ff9a3c 50%, #ffc56b 100%);
  --shadow-sm: 0 1px 2px rgba(10, 16, 32, .06);
  --shadow: 0 1px 2px rgba(10, 16, 32, .05), 0 12px 32px -14px rgba(10, 16, 32, .18);
  --shadow-lg: 0 2px 6px rgba(10, 16, 32, .06), 0 32px 64px -24px rgba(10, 16, 32, .28);
  --radius: 16px;
  --radius-lg: 24px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--font);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070b15; --bg-alt: #0a1020; --surface: #0f1626; --surface-2: #151e31;
    --line: #1e2940; --line-strong: #2e3c5a; --text: #eef2f9; --text-2: #aab5c9; --text-3: #8592a8;
    --accent: #ff7a1a; --accent-ink: #160a01; --accent-soft: rgba(255, 122, 26, .14);
    --blue: #6ea8ff; --blue-soft: rgba(110, 168, 255, .14);
    --ok: #3fcf83; --ok-soft: rgba(63, 207, 131, .13); --warn: #f2b84b; --warn-soft: rgba(242, 184, 75, .14);
    --bad: #ff6b6b; --bad-soft: rgba(255, 107, 107, .14); --load: #ff6b6b; --moment: #ffa940; --grid: rgba(110, 168, 255, 0.06);
    --glass: rgba(10, 16, 32, 0.66);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 36px -16px rgba(0, 0, 0, .75);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 36px 72px -28px rgba(0, 0, 0, .85);
    color-scheme: dark;
  }
}
:root[data-theme="dark"], .on-dark {
  --bg: #070b15; --bg-alt: #0a1020; --surface: #0f1626; --surface-2: #151e31;
  --line: #1e2940; --line-strong: #2e3c5a; --text: #eef2f9; --text-2: #aab5c9; --text-3: #8592a8;
  --accent: #ff7a1a; --accent-ink: #160a01; --accent-soft: rgba(255, 122, 26, .14);
  --blue: #6ea8ff; --blue-soft: rgba(110, 168, 255, .14);
  --ok: #3fcf83; --ok-soft: rgba(63, 207, 131, .13); --warn: #f2b84b; --warn-soft: rgba(242, 184, 75, .14);
  --bad: #ff6b6b; --bad-soft: rgba(255, 107, 107, .14); --load: #ff6b6b; --moment: #ffa940; --grid: rgba(110, 168, 255, 0.06);
  --glass: rgba(10, 16, 32, 0.66);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 36px -16px rgba(0, 0, 0, .75);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 36px 72px -28px rgba(0, 0, 0, .85);
  color-scheme: dark;
}
.on-dark { color: var(--text); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
svg { display: block; }
img, svg { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 100; padding: 8px 14px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.wrap--wide { max-width: 1480px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, filter .18s ease; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.btn:hover svg:last-child:not(:first-child) { transform: translateX(3px); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 28px -10px rgba(240, 90, 10, .75); text-shadow: 0 1px 1px rgba(120, 40, 0, .25); }
.btn--primary:hover { filter: brightness(1.06) saturate(1.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 14px 34px -10px rgba(240, 90, 10, .9); }
.btn--ghost { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { border-color: var(--line-strong); background: var(--surface-2); }
.btn--glass { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: var(--text); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn--glass:hover { background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .24); }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn--lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .7; cursor: progress; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: background-color .15s, border-color .15s; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

/* ---------- Nav ---------- */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--glass); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.nav.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -20px rgba(10, 16, 32, .5); }
.nav__inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 20px/1 var(--display); letter-spacing: -0.03em; text-decoration: none; }
.brand__word em { font-style: normal; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--grad); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 16px -6px rgba(240, 90, 10, .7); }
.brand__mark svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }
.nav__links { display: flex; gap: 2px; margin-left: auto; padding: 4px; border-radius: 12px; }
.nav__links a { padding: 7px 13px; border-radius: 9px; color: var(--text-2); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: color .15s, background-color .15s; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__burger { display: none; }
@media (max-width: 960px) {
  .nav__links { position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); border-radius: 0; display: none; }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 12px; }
  .nav__actions { margin-left: auto; }
  .nav__burger { display: grid; }
}
@media (max-width: 480px) { .nav__actions .btn { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; margin: 8px; border-radius: 22px; background: #060a13; border: 1px solid #172036; padding: 52px 0 40px; isolation: isolate; }
@media (min-width: 720px) { .hero { margin: 12px 14px; border-radius: 30px; padding: 72px 0 64px; } }
.hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse 75% 70% at 50% 35%, #000 25%, transparent 78%); -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 35%, #000 25%, transparent 78%); }
.hero__glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.hero__glow--a { width: 520px; height: 420px; left: -140px; top: -160px; background: radial-gradient(circle, #ff6a13, transparent 65%); }
.hero__glow--b { width: 620px; height: 520px; right: -180px; top: 10%; background: radial-gradient(circle, #2f6bff, transparent 65%); opacity: .45; }
.hero__inner { position: relative; display: grid; gap: 44px; align-items: center; }
@media (min-width: 1080px) { .hero__inner { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; } }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .13); background: rgba(255, 255, 255, .05); font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); margin-bottom: 22px; }
.dot, .live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); flex: none; }
.live { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }
.hero h1 { font-size: clamp(42px, 6.2vw, 74px); font-weight: 700; letter-spacing: -0.04em; }
.hero h1 em { font-style: normal; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin-top: 22px; font-size: clamp(17px, 1.9vw, 19px); color: var(--text-2); max-width: 34em; }
.lead strong { color: var(--text); font-weight: 600; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 40px 0 0; }
@media (min-width: 560px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats div { padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); }
.stats dt { font-size: 12.5px; color: var(--text-3); }
.stats dd { margin: 4px 0 0; font: 700 28px/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ---------- Beam lab (hero) ---------- */
.lab { position: relative; min-width: 0; padding: 18px; border-radius: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025)); border: 1px solid rgba(255, 255, 255, .11); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 40px 90px -40px rgba(0, 0, 0, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
@media (min-width: 720px) { .lab { padding: 22px; } }
.lab__anchor { position: absolute; top: -100px; }
.lab__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
.lab__kicker { display: flex; align-items: center; gap: 10px; font: 600 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .09em; color: var(--ok); margin-bottom: 8px; }
.lab h2 { font-size: 19px; letter-spacing: -0.02em; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 3px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 11px; background: rgba(0, 0, 0, .25); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 6px 11px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); transition: background-color .15s, color .15s; white-space: nowrap; }
.seg label:hover span { color: var(--text); }
.seg input:checked + span { background: rgba(255, 255, 255, .13); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.seg input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
.lab__fig { margin: 14px -4px 4px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.lab__fig svg { width: 100%; height: auto; overflow: visible; }
.lab__fig.is-dragging, .lab__fig.is-dragging * { cursor: grabbing !important; }
.lab-h { font: 700 10.5px var(--mono); letter-spacing: .1em; fill: var(--text-2); }
.lab-h--unit { font-weight: 500; letter-spacing: 0; fill: var(--text-3); }
.lab-t { font: 500 11.5px var(--mono); fill: var(--text-2); }
.lab-t--udl, .lab-t--p { fill: var(--load); font-weight: 700; }
.lab-t--react { fill: var(--ok); font-weight: 700; }
.lab-t--v { fill: var(--blue); font-weight: 700; }
.lab-t--m { fill: var(--moment); font-weight: 700; }
.lab-t--muted { fill: var(--text-3); }
.is-narrow .lab-t { font-size: 13px; }
.is-narrow .lab-h { font-size: 11.5px; }
.lab-udl { fill: none; stroke: var(--load); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.lab-beam { fill: rgba(255, 255, 255, .09); stroke: var(--text-2); stroke-width: 1.4; }
.lab-sup { fill: var(--bg); stroke: var(--text-2); stroke-width: 1.4; stroke-linejoin: round; }
.lab-ground, .lab-dim { fill: none; stroke: var(--text-3); stroke-width: 1.2; stroke-linecap: round; }
.lab-wall { fill: none; stroke: var(--text-2); stroke-width: 3; stroke-linecap: round; }
.lab-defl { fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-dasharray: 5 4; opacity: .8; }
.lab-react { fill: none; stroke: var(--ok); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lab-axis { fill: none; stroke: var(--line-strong); stroke-width: 1.2; }
.lab-fill--v { fill: color-mix(in srgb, var(--blue) 20%, transparent); }
.lab-fill--m { fill: color-mix(in srgb, var(--moment) 20%, transparent); }
.lab-line { fill: none; stroke-width: 2.2; stroke-linejoin: round; }
.lab-line--v { stroke: var(--blue); }
.lab-line--m { stroke: var(--moment); }
.lab-dot { fill: var(--moment); stroke: var(--bg); stroke-width: 2; }
.lab-dot--v { fill: var(--blue); }
.lab-hit, .lab-p__hit { fill: transparent; }
.lab-cross { pointer-events: none; }
.lab-cross__line { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; }
.lab-tip { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.lab-p { cursor: grab; }
.lab-p__arrow { fill: none; stroke: var(--load); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lab-p__knob { fill: var(--load); stroke: #fff; stroke-width: 2; transition: r .15s; }
.lab-p:hover .lab-p__knob { r: 8.5; }
.lab__controls { display: grid; gap: 12px 22px; margin-top: 8px; }
@media (min-width: 560px) { .lab__controls { grid-template-columns: 1fr 1fr; } }
.range { display: grid; gap: 7px; }
.range > span { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--text-2); }
.range output { font: 600 12.5px var(--mono); color: var(--text); font-variant-numeric: tabular-nums; }
.range input { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; --p: 50%; }
.range input::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--p), rgba(255, 255, 255, .13) var(--p)); }
.range input::-moz-range-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--p), rgba(255, 255, 255, .13) var(--p)); }
.range input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent), 0 2px 6px rgba(0, 0, 0, .5); transition: box-shadow .15s; }
.range input::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent), 0 2px 6px rgba(0, 0, 0, .5); }
.range input:hover::-webkit-slider-thumb, .range input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 35%, transparent), 0 2px 6px rgba(0, 0, 0, .5); }
.range input:focus-visible { outline: none; }
.lab__kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0 0; }
@media (min-width: 640px) { .lab__kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lab__kpis div { padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .07); min-width: 0; }
.lab__kpis dt { font-size: 11.5px; color: var(--text-3); }
.lab__kpis dd { margin: 3px 0 0; font: 600 15px/1.25 var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lab__kpis small { display: block; margin-top: 2px; font: 400 11px var(--font); color: var(--text-3); }
.lab__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 14px; font-size: 12.5px; color: var(--text-3); }
.lab__foot a { color: var(--accent); font-weight: 600; text-decoration: none; }
.lab__foot a:hover { text-decoration: underline; }
.lab__links { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ---------- Band ---------- */
.band { padding: 28px 0 8px; }
.band__inner { display: grid; gap: 12px; }
@media (min-width: 820px) { .band__inner { grid-template-columns: repeat(3, 1fr); } }
.band__item { display: flex; gap: 16px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.band__item svg { flex: none; width: 42px; height: 42px; padding: 10px; border-radius: 12px; background: var(--accent-soft); stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.band__item h3 { font-size: 17px; margin-bottom: 4px; }
.band__item p { color: var(--text-2); font-size: 15px; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
@media (min-width: 980px) { .section { padding: 112px 0; } }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section__head { max-width: 760px; margin-bottom: 40px; }
.section h2 { font-size: clamp(30px, 4.2vw, 48px); letter-spacing: -0.035em; }
.section__lead { margin-top: 16px; color: var(--text-2); font-size: 18px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 12.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--grad); }

/* ---------- Catalogue ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.chip span { font: 600 12px var(--mono); color: var(--text-3); }
.chip:hover { border-color: var(--line-strong); }
.chip[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip[aria-selected="true"] span { color: inherit; opacity: .7; }
.search { position: relative; flex: 1 1 260px; max-width: 360px; }
.search svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; }
.search input { width: 100%; min-height: 44px; padding: 0 14px 0 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.result-count { font-size: 13px; color: var(--text-3); margin-bottom: 18px; }
.sheet-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); }
.sheet { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; transition: border-color .2s, transform .2s, box-shadow .2s; overflow: hidden; }
.sheet::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad); opacity: 0; transition: opacity .2s; }
.sheet:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); transform: translateY(-3px); box-shadow: var(--shadow); }
.sheet:hover::before { opacity: 1; }
.sheet--empty { grid-column: 1 / -1; text-align: center; color: var(--text-3); }
.sheet__top { display: flex; justify-content: space-between; align-items: center; }
.sheet__icon svg, .family__icon svg { width: 42px; height: 42px; padding: 9px; border-radius: 12px; background: var(--blue-soft); stroke: var(--blue); fill: none; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.sheet__ext { font: 600 11px var(--mono); color: var(--ok); background: var(--ok-soft); padding: 4px 9px; border-radius: 999px; }
.sheet h3 { font-size: 18px; }
.sheet p { color: var(--text-2); font-size: 14.5px; flex: 1; }
.sheet__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet__tags span { font: 500 11.5px var(--mono); padding: 3px 8px; border-radius: 7px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.sheet__links { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.sheet__live, .sheet__dl { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font-weight: 600; font-size: 14px; color: var(--accent); text-decoration: none; cursor: pointer; }
.sheet__dl { color: var(--blue); }
.sheet__dl svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sheet__live:hover, .sheet__dl:hover { text-decoration: underline; }
.sheet__cat { font-size: 13px; color: var(--text-3); margin-top: 4px; }

/* ---------- Families ---------- */
.families { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.family { padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; transition: border-color .2s, box-shadow .2s; }
.family:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.family h3 { font-size: 20px; margin: 16px 0 8px; }
.family p { color: var(--text-2); font-size: 15px; }
.family ul { list-style: none; margin: 16px 0 0; padding: 16px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 6px; }
.family li { position: relative; padding-left: 20px; font-size: 14.5px; }
.family li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 8px; height: 8px; border: 2px solid var(--accent); border-radius: 2px; }
.family a { text-decoration: none; }
.family a:hover { color: var(--accent); }

/* ---------- Calculator ---------- */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.calc__tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--surface-2); scrollbar-width: thin; }
.calc__tab { flex: 1 0 auto; min-width: 150px; text-align: left; padding: 14px 18px; border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer; position: relative; }
.calc__tab b { display: block; font: 600 15px var(--display); }
.calc__tab span { display: block; font-size: 12.5px; color: var(--text-3); }
.calc__tab[aria-selected="true"] { background: var(--surface); }
.calc__tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--grad); }
.calc__body { display: grid; }
@media (min-width: 980px) { .calc__body { grid-template-columns: minmax(300px, 380px) 1fr; } }
.calc__form { padding: 22px; border-bottom: 1px solid var(--line); display: grid; gap: 18px; align-content: start; }
@media (min-width: 980px) { .calc__form { border-bottom: 0; border-right: 1px solid var(--line); } }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
legend { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-bottom: 10px; padding: 0; }
.field { display: grid; grid-template-columns: 1fr minmax(130px, 170px); align-items: center; gap: 12px; font-size: 14px; color: var(--text-2); }
.field select, .field__box { width: 100%; min-height: 40px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); }
.field select { padding: 0 10px; cursor: pointer; }
.field__box { display: flex; align-items: center; overflow: hidden; }
.field__box input { flex: 1; min-width: 0; width: 100%; height: 38px; padding: 0 0 0 10px; border: 0; background: transparent; font: 500 14px var(--mono); font-variant-numeric: tabular-nums; outline: none; }
.field__box i { font: normal 500 12px var(--mono); color: var(--text-3); padding: 0 10px 0 4px; white-space: nowrap; }
.field__box:focus-within, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.field.is-invalid .field__box { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.field--wide { grid-template-columns: 1fr; gap: 8px; }
.field textarea { width: 100%; min-height: 170px; resize: vertical; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); font: 500 12.5px/1.5 var(--mono); tab-size: 8; white-space: pre; overflow-wrap: normal; }
.field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.calc__actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding-top: 6px; }
.calc__actions .btn { padding: 0 10px; }
.calc__actions .btn--primary { grid-column: 1 / -1; order: -1; }
.calc__actions--embed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calc__out { padding: 22px; min-width: 0; }
.out__empty { padding: 40px; text-align: center; color: var(--text-3); }
.out__status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; }
.out__status.is-ok { background: var(--ok-soft); color: var(--ok); }
.out__status.is-fail { background: var(--bad-soft); color: var(--bad); }
.out__badge { font-weight: 700; font-size: 15px; }
.out__status b { font-family: var(--mono); }
.out__grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .out__grid { grid-template-columns: 1fr 260px; } .out__grid--solo { grid-template-columns: 1fr; } }
.out__grid--solo .out__kpis { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.out__kpis { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; align-content: start; }
.out__kpis div { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); min-width: 0; }
.out__kpis dt { font-size: 12.5px; color: var(--text-3); }
.out__kpis dd { margin: 4px 0 0; font: 600 17px/1.25 var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.out__kpis small { display: block; font-size: 12px; font-weight: 400; color: var(--text-3); margin-top: 2px; }
.out__draws { display: grid; gap: 12px; align-content: start; }
.out__fig { margin: 0; border: 1px solid var(--line); border-radius: 12px; background-color: var(--surface-2); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 16px 16px; display: grid; justify-items: center; padding: 6px 6px 8px; }
.out__fig svg { width: 100%; max-width: 260px; height: auto; }
.out__fig--wide { margin-top: 16px; }
.out__fig--wide svg { max-width: 640px; }
.out__fig figcaption { font: 500 11.5px var(--mono); color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.d-conc { fill: color-mix(in srgb, var(--text-3) 14%, transparent); stroke: var(--text-2); stroke-width: 1.5; }
.d-link { fill: none; stroke: var(--blue); stroke-width: 1.5; }
.d-bar { fill: var(--accent); stroke: color-mix(in srgb, var(--accent) 60%, #000); stroke-width: 1; }
.d-bar--alt { fill: var(--blue); stroke: none; }
.d-col { fill: var(--text-2); }
.d-crit { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 4; }
.d-crit--alt { stroke: var(--blue); }
.d-dim { fill: none; stroke: var(--text-3); stroke-width: 1; }
.d-txt { font: 500 11px var(--mono); fill: var(--text-2); }
.d-txt--strong { font-weight: 700; fill: var(--text); }
.d-txt--hot { fill: var(--bad); }
.d-track { fill: var(--line); }
.d-ok { fill: var(--ok); }
.d-ok--soft { opacity: .55; }
.d-bad { fill: var(--bad); }
.d-limit { fill: none; stroke: var(--text); stroke-width: 2; stroke-dasharray: 3 3; }
.d-axis { fill: none; stroke: var(--text-3); stroke-width: 1; }
.d-area { fill: var(--blue-soft); stroke: none; }
.d-curve { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; }
.d-curve--thick { stroke-width: 3.2; }
.d-curve--hot { stroke: var(--bad); stroke-width: 3.6; }
.d-pt { fill: var(--accent); stroke: var(--surface); stroke-width: 1.5; }
.d-pt--bad { fill: var(--bad); }
.d-load { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.d-support { fill: var(--surface); stroke: var(--text-2); stroke-width: 1.3; }
.d-soil { fill: color-mix(in srgb, var(--warn) 16%, transparent); stroke: none; }
.d-water { fill: color-mix(in srgb, var(--blue) 18%, transparent); stroke: none; }
.d-press { fill: color-mix(in srgb, var(--accent) 16%, transparent); stroke: var(--accent); stroke-width: 1.3; }
.d-zone { fill: color-mix(in srgb, var(--accent) 24%, transparent); stroke: none; }
.d-pile { fill: none; stroke: var(--text-2); stroke-width: 1.3; stroke-dasharray: 4 3; }
.d-edge { fill: none; stroke: var(--text); stroke-width: 3; }
.d-edge--free { stroke: var(--text-3); stroke-width: 1.5; stroke-dasharray: 6 4; }
.d-arrow { fill: none; stroke: var(--accent); stroke-width: 1.8; marker-end: none; }
.d-arrow--alt { stroke: var(--blue); }
.d-ground { fill: none; stroke: var(--text-3); stroke-width: 1.3; stroke-dasharray: 3 4; }
.d-bar-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.d-split { fill: var(--blue); }
.out__table { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.out__table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.out__table table { font-size: 12.5px; }
.out__table th, .out__table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.out__table th { background: var(--surface-2); font-weight: 600; color: var(--text-2); font-size: 12px; white-space: normal; vertical-align: bottom; }
.out__table td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.out__table td:first-child { font-family: var(--font); white-space: normal; min-width: 140px; }
.out__table tr:last-child td { border-bottom: 0; }
.out__table tr.is-fail td { color: var(--bad); background: var(--bad-soft); }
.out__h { font-size: 15px; margin: 24px 0 10px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.check__head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 500; }
.check__head code { font: 500 11.5px var(--mono); color: var(--text-3); white-space: nowrap; }
.check__bar { position: relative; height: 8px; margin: 10px 0 8px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); }
.check__bar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; transition: width .35s cubic-bezier(.2, .7, .2, 1); }
.check__bar b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); opacity: .5; }
.check--ok .check__bar i { background: var(--ok); }
.check--warn .check__bar i { background: var(--warn); }
.check--fail .check__bar i { background: var(--bad); }
.check__vals { display: flex; justify-content: space-between; gap: 10px; font: 500 12.5px var(--mono); color: var(--text-2); font-variant-numeric: tabular-nums; }
.check--ok .check__vals b { color: var(--ok); }
.check--warn .check__vals b { color: var(--warn); }
.check--fail .check__vals b { color: var(--bad); }
.out__notes { margin: 14px 0 0; padding: 12px 14px 12px 32px; border-radius: 12px; background: var(--warn-soft); color: var(--text); font-size: 14px; display: grid; gap: 4px; }
.out__steps { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; }
.out__steps summary { padding: 12px 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
.out__steps table { width: 100%; border-collapse: collapse; font-size: 13px; }
.out__steps th, .out__steps td { padding: 9px 14px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.out__steps th { width: 34%; font-weight: 500; color: var(--text-3); }
.out__steps td { font-family: var(--mono); overflow-wrap: anywhere; }
.disclaimer { margin-top: 16px; font-size: 13px; color: var(--text-3); max-width: 70em; }
.calc__more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 18px; padding: 18px 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.calc__more p { color: var(--text-2); }
@media (max-width: 420px) { .field { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Workflow ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.steps li { position: relative; padding: 28px 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.steps__n { font: 700 44px/1 var(--display); letter-spacing: -0.04em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.steps h3 { font-size: 22px; margin: 14px 0 8px; }
.steps p { color: var(--text-2); font-size: 15px; }

/* ---------- Audience ---------- */
.audience { display: grid; gap: 40px; align-items: center; }
@media (min-width: 980px) { .audience { grid-template-columns: 1fr 1fr; } }
.audience__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.audience__list li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; font-weight: 500; }
.audience__list li span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); font-size: 19px; }

/* ---------- FAQ ---------- */
.faq__list { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; transition: border-color .2s, box-shadow .2s; }
.faq details:hover { border-color: var(--line-strong); }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); font: 500 18px/1 var(--mono); color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--text-2); }

/* ---------- CTA ---------- */
.cta { padding: 24px 0 96px; }
.cta__inner { position: relative; overflow: hidden; display: grid; gap: 32px; padding: 40px 24px; border-radius: 28px; background: radial-gradient(60% 90% at 0% 0%, rgba(255, 106, 19, .35), transparent 70%), radial-gradient(50% 80% at 100% 100%, rgba(47, 107, 255, .3), transparent 70%), #070b15; border: 1px solid #1a2438; box-shadow: var(--shadow-lg); }
@media (min-width: 900px) { .cta__inner { grid-template-columns: 1.4fr 1fr; align-items: center; padding: 60px; } }
.cta h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.035em; }
.cta__inner > div > p { margin-top: 12px; color: var(--text-2); font-size: 17px; }
.cta__list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.cta__list li { display: flex; gap: 10px; }
.cta__list li::before { content: "✓"; display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 700; }
.cta__card { display: grid; gap: 10px; padding: 26px; border-radius: 20px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .11); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.cta__price { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.cta__price span { color: var(--text-3); font-size: 14px; }
.cta__price b { font: 700 28px var(--display); letter-spacing: -0.02em; }
.cta__fine { color: var(--text-3); font-size: 13px; margin-bottom: 12px; }

/* ---------- Footer ---------- */
.footer { background: #060a13; border-top: 1px solid #172036; padding: 64px 0 28px; }
.footer__top { display: grid; gap: 36px; }
@media (min-width: 760px) { .footer__top { grid-template-columns: 1.3fr 1.1fr .8fr; gap: 48px; } }
.footer__company { font: 700 24px/1.2 var(--display); letter-spacing: -0.03em; }
.footer__company span { color: #f5a524; }
.footer__services { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; }
.footer__services li { padding: 5px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, #f5a524 40%, transparent); background: color-mix(in srgb, #f5a524 10%, transparent); color: #f5c46b; font-size: 13px; font-weight: 500; }
.footer__tagline { margin-top: 8px; font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.footer__about { margin-top: 16px; color: var(--text-2); font-size: 15px; max-width: 30em; }
.footer__social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.footer__social a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; text-decoration: none; color: var(--text-2); }
.footer__social a:hover { color: var(--text); border-color: var(--line-strong); }
.footer__col h2 { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin-bottom: 16px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__col a { color: var(--text-2); text-decoration: none; font-size: 15px; }
.footer__col a:hover { color: var(--text); text-decoration: underline; }
.footer__contact li { display: flex; gap: 12px; font-size: 15px; color: var(--text-2); }
.footer__contact svg { flex: none; width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.footer__contact div { padding-top: 6px; min-width: 0; overflow-wrap: anywhere; }
.is-placeholder { color: var(--text-3); border-bottom: 1px dashed currentColor; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.footer__bottom p:last-child { max-width: 46em; }

/* ---------- Download password dialog ---------- */
.dl { width: min(430px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.dl::backdrop { background: rgba(4, 7, 14, .62); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.dl[open] { animation: dl-in .22s cubic-bezier(.2, .8, .2, 1); }
.dl.is-shake { animation: shake .36s; }
@keyframes dl-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.dl__form { position: relative; display: grid; gap: 12px; padding: 30px 26px 24px; text-align: center; }
.dl__close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--text-3); cursor: pointer; }
.dl__close:hover { background: var(--surface-2); color: var(--text); }
.dl__close svg, .dl__eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dl__icon { justify-self: center; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--grad); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 12px 28px -10px rgba(240, 90, 10, .7); }
.dl__icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dl h2 { font-size: 21px; margin-top: 6px; }
.dl__file { font: 500 13px var(--mono); color: var(--text-2); overflow-wrap: anywhere; }
.dl__field { position: relative; display: block; margin-top: 6px; }
.dl__field input { width: 100%; height: 50px; padding: 0 48px 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font: 500 16px var(--mono); }
.dl__field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.dl__field input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.dl__eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--text-3); cursor: pointer; }
.dl__eye:hover, .dl__eye[aria-pressed="true"] { color: var(--text); background: var(--surface); }
.dl__error { min-height: 0; color: var(--bad); font-size: 13.5px; font-weight: 500; }
.dl__error:empty { display: none; }
.dl__note { font-size: 13px; color: var(--text-3); }
.dl__note a { color: var(--accent); font-weight: 600; }

/* ---------- Reveal ---------- */
.reveal { transform: translateY(14px); opacity: .001; transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .7s ease; }
.reveal.is-in { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Workspace (tools.html) ---------- */
.ws { display: grid; max-width: 1480px; margin: 0 auto; }
@media (min-width: 1100px) { .ws { grid-template-columns: 290px minmax(0, 1fr); } }
.ws__side { position: sticky; top: 66px; align-self: start; height: calc(100vh - 66px); overflow-y: auto; padding: 22px 18px 40px 28px; border-right: 1px solid var(--line); scrollbar-width: thin; }
.ws__search { display: block; max-width: none; margin-bottom: 18px; }
.ws__search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 11px var(--mono); color: var(--text-3); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; background: var(--surface-2); }
.ws__group { margin-bottom: 18px; }
.ws__group h2 { display: flex; align-items: center; gap: 8px; font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin-bottom: 6px; }
.ws__group h2 svg { width: 18px; height: 18px; fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ws__group h2 small { margin-left: auto; font-size: 11px; }
.ws__group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.ws__group a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: 14px; line-height: 1.35; border-left: 2px solid transparent; }
.ws__group a:hover { background: var(--surface-2); color: var(--text); }
.ws__group a[aria-current="page"] { background: var(--accent-soft); color: var(--text); font-weight: 600; border-left-color: var(--accent); border-radius: 0 8px 8px 0; }
.ws__none { color: var(--text-3); font-size: 14px; }
.ws__main { min-width: 0; padding: 28px 16px 64px; }
@media (min-width: 720px) { .ws__main { padding: 32px 28px 72px; } }
.ws__toggle { display: none; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; margin-bottom: 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; }
.ws__toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ws__toggle span { font: 600 12px var(--mono); color: var(--text-3); }
.ws__head { margin-bottom: 22px; max-width: 880px; }
.ws__head .eyebrow { margin-bottom: 10px; }
.ws__head h1 { font-size: clamp(28px, 3.6vw, 40px); }
.ws__desc { margin-top: 10px; color: var(--text-2); font-size: 16.5px; }
.ws__tags { margin-top: 12px; }
.ws__dl { margin-top: 16px; }
.ws__dl[hidden] { display: none; }
.calc--ws .calc__body { grid-template-columns: 1fr; }
@media (min-width: 1240px) { .calc--ws .calc__body { grid-template-columns: minmax(320px, 390px) minmax(0, 1fr); } .calc--ws .calc__form { border-bottom: 0; border-right: 1px solid var(--line); } }
@media (min-width: 980px) and (max-width: 1239px) { .calc--ws .calc__form { border-right: 0; border-bottom: 1px solid var(--line); grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; } .calc--ws .calc__actions { grid-column: 1 / -1; } }
.ws__pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.ws__page { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; font-weight: 600; min-width: 0; }
.ws__page small { font: 500 12px var(--mono); color: var(--text-3); }
.ws__page:hover { border-color: var(--line-strong); }
.ws__page--next { text-align: right; }
@media (max-width: 1099px) {
  .ws__toggle { display: inline-flex; }
  .ws__side { position: fixed; z-index: 60; top: 66px; left: 0; bottom: 0; width: min(330px, 88vw); height: auto; background: var(--bg); border-right: 1px solid var(--line); box-shadow: var(--shadow); transform: translateX(-102%); transition: transform .25s cubic-bezier(.2, .7, .2, 1); padding-left: 18px; }
  .ws__side.is-open { transform: none; }
  body.ws-drawer-open::after { content: ""; position: fixed; inset: 66px 0 0; background: rgba(5, 10, 20, .35); z-index: 55; }
}

/* ---------- Print ---------- */
@media print {
  .nav, .ws__side, .ws__toggle, .ws__pager, .calc__actions, .calc__tabs, .footer { display: none !important; }
  .calc { box-shadow: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
