/* =========================================================
   柜算 · Container Lab
   A dependency-free interface for a PHP 8.3 packing engine.
   ========================================================= */

:root {
    --ink: #0e2a31;
    --ink-2: #173c42;
    --ink-3: #24535a;
    --teal: #1f7a70;
    --teal-bright: #2a9d8f;
    --teal-soft: #e3f1ec;
    --orange: #f06a3a;
    --orange-dark: #cf5227;
    --orange-soft: #fde8dd;
    --gold: #d8a63e;
    --paper: #f5f1e8;
    --paper-2: #ece7db;
    --surface: #fffdf8;
    --surface-2: #fbf9f3;
    --line: #dfe4dc;
    --line-strong: #cbd4cb;
    --muted: #65767a;
    --muted-2: #8b999a;
    --white: #fff;
    --danger: #c44736;
    --danger-bg: #fbe9e5;
    --warning: #9a6a17;
    --warning-bg: #fbf1d9;
    --success: #176b5e;
    --success-bg: #e1f1ea;
    --shadow-sm: 0 4px 14px rgba(14, 42, 49, .07);
    --shadow-md: 0 18px 50px rgba(14, 42, 49, .10);
    --shadow-lg: 0 34px 90px rgba(14, 42, 49, .14);
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --radius-xl: 34px;
    --font-sans: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 94px;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--ink);
    background:
        radial-gradient(circle at 8% -4%, rgba(240, 106, 58, .10), transparent 30rem),
        radial-gradient(circle at 96% 8%, rgba(42, 157, 143, .09), transparent 34rem),
        var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-variant-numeric: tabular-nums;
}

body.is-modal-open {
    overflow: hidden;
}

::selection {
    background: rgba(240, 106, 58, .22);
    color: var(--ink);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

img,
svg {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 3px solid rgba(240, 106, 58, .45);
    outline-offset: 2px;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 10px;
    left: 10px;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--ink);
    color: var(--white);
    transform: translateY(-150%);
    transition: transform .2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

/* ---------- typography & primitives ---------- */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    color: var(--teal);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .17em;
    text-transform: uppercase;
}

.eyebrow .line {
    width: 28px;
    height: 1px;
    background: currentColor;
    opacity: .6;
}

.pulse-dot {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal-bright);
}

.pulse-dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border: 1px solid rgba(42, 157, 143, .5);
    border-radius: 50%;
    animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
    0% { transform: scale(.6); opacity: .9; }
    70%, 100% { transform: scale(1.8); opacity: 0; }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s ease;
}

.btn:hover svg {
    transform: translateX(2px);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--orange);
    color: #fff;
    box-shadow: 0 12px 28px rgba(240, 106, 58, .24);
}

.btn-primary:hover {
    background: var(--orange-dark);
    box-shadow: 0 16px 34px rgba(240, 106, 58, .30);
}

.btn-dark {
    background: var(--ink);
    color: var(--white);
}

.btn-dark:hover {
    background: var(--ink-2);
}

.btn-lg {
    min-height: 54px;
    padding: 0 26px;
    font-size: 15px;
}

.btn-sm {
    min-height: 38px;
    padding: 0 16px;
    font-size: 12px;
}

.btn.is-loading .btn-label,
.btn.is-loading > svg {
    opacity: .18;
}

.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .38);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.btn.is-loading .btn-spinner {
    display: block;
    position: absolute;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    border-bottom: 1px solid rgba(14, 42, 49, .22);
    padding-bottom: 3px;
    transition: color .2s ease, border-color .2s ease;
}

.text-link span {
    transition: transform .2s ease;
}

.text-link:hover {
    color: var(--teal);
    border-color: var(--teal);
}

.text-link:hover span {
    transform: translateX(3px);
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 36px;
    margin-bottom: 34px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(32px, 3.6vw, 52px);
    line-height: 1.08;
    letter-spacing: -.035em;
    font-weight: 760;
}

.section-lead {
    max-width: 610px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .65s cubic-bezier(.2, .7, .2, 1), transform .65s cubic-bezier(.2, .7, .2, 1);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* ---------- header ---------- */

.site-header {
    position: sticky;
    z-index: 80;
    top: 0;
    border-bottom: 1px solid rgba(14, 42, 49, .08);
    background: rgba(245, 241, 232, .82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    width: min(1280px, calc(100% - 48px));
    min-height: 76px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-mark {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    width: 36px;
    height: 36px;
    padding: 7px;
    border-radius: 10px;
    background: var(--ink);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10);
}

.brand-mark span {
    border-radius: 2px;
    background: var(--orange);
}

.brand-mark span:nth-child(2) {
    background: #f4b75c;
}

.brand-mark span:nth-child(3) {
    background: #74c8b8;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-text strong {
    font-size: 21px;
    letter-spacing: .02em;
    font-weight: 800;
}

.brand-text small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .22em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: auto;
    margin-right: 34px;
}

.main-nav a {
    position: relative;
    color: var(--ink-3);
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -8px;
    height: 2px;
    background: var(--orange);
    transition: right .25s ease;
}

.main-nav a:hover {
    color: var(--ink);
}

.main-nav a:hover::after {
    right: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
}

.tech-badge i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal-bright);
    box-shadow: 0 0 0 3px rgba(42, 157, 143, .13);
}

/* ---------- hero ---------- */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
    align-items: center;
    gap: 56px;
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 66px 0 76px;
}

.hero-copy h1 {
    max-width: 650px;
    margin: 0;
    font-size: clamp(48px, 5.3vw, 76px);
    line-height: 1.02;
    letter-spacing: -.055em;
    font-weight: 780;
}

.hero-copy h1 em {
    position: relative;
    color: var(--orange);
    font-style: normal;
}

.hero-copy h1 em::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 6px;
    bottom: 2px;
    height: 7px;
    border-radius: 10px;
    background: rgba(240, 106, 58, .16);
    z-index: -1;
}

.hero-lead {
    max-width: 560px;
    margin: 25px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.85;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 32px;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    max-width: 590px;
    margin: 48px 0 0;
    border-top: 1px solid rgba(14, 42, 49, .14);
}

.hero-metrics div {
    padding: 18px 18px 0 0;
}

.hero-metrics div + div {
    padding-left: 22px;
    border-left: 1px solid rgba(14, 42, 49, .10);
}

.hero-metrics dt {
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.hero-metrics dd {
    margin: 7px 0 0;
    font-size: 18px;
    font-weight: 760;
    letter-spacing: -.02em;
}

.hero-metrics dd span {
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
}

.hero-art {
    position: relative;
    min-width: 0;
    padding: 14px;
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .12));
    border: 1px solid rgba(255, 255, 255, .55);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .7);
}

.hero-art::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, .35), transparent 40%);
}

.hero-art-top {
    position: absolute;
    z-index: 3;
    top: 32px;
    left: 34px;
    right: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid rgba(160, 217, 208, .22);
    border-radius: 999px;
    background: rgba(6, 25, 29, .38);
    color: #b5dfd8;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .13em;
}

.live-pill i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #71d9c7;
    box-shadow: 0 0 12px #71d9c7;
    animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink {
    50% { opacity: .35; }
}

.hero-art-code {
    color: rgba(202, 235, 229, .65);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .08em;
}

.hero-illustration {
    display: block;
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
}

.hero-float {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 13px;
    background: rgba(9, 33, 39, .74);
    color: #e8f2ee;
    box-shadow: 0 16px 35px rgba(0, 0, 0, .24);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hero-float strong {
    display: block;
    font-size: 11px;
    line-height: 1.2;
}

.hero-float small {
    display: block;
    margin-top: 3px;
    color: rgba(207, 233, 228, .55);
    font-size: 9px;
}

.hero-float-a {
    right: 26px;
    bottom: 92px;
}

.hero-float-b {
    left: 26px;
    bottom: 26px;
}

.float-icon {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: rgba(113, 217, 199, .13);
    color: #82e0cf;
    font-size: 13px;
    font-weight: 800;
}

.float-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    width: 27px;
    height: 26px;
}

.float-bars i {
    flex: 1;
    min-height: 4px;
    border-radius: 2px 2px 0 0;
    background: linear-gradient(180deg, #ff9a6d, #d85f35);
}

/* ---------- planner ---------- */

.planner-section {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 36px 0 96px;
}

.mode-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(14, 42, 49, .10);
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    box-shadow: inset 0 1px 2px rgba(14, 42, 49, .04);
    align-self: end;
}

.mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.mode-btn span {
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(14, 42, 49, .07);
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: .03em;
}

.mode-btn.is-active {
    background: var(--ink);
    color: var(--white);
    box-shadow: 0 6px 14px rgba(14, 42, 49, .16);
}

.mode-btn.is-active span {
    background: var(--orange);
    color: #fff;
}

.planner-shell {
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
    border: 1px solid rgba(14, 42, 49, .10);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.config-panel {
    padding: 26px 25px 28px;
    border-right: 1px solid rgba(14, 42, 49, .08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(250, 247, 239, .5)),
        var(--surface-2);
}

.config-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 21px;
    border-bottom: 1px solid var(--line);
}

.panel-kicker {
    display: block;
    color: var(--orange);
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
}

.config-top h3 {
    margin: 6px 0 0;
    font-size: 21px;
    letter-spacing: -.025em;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.icon-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-btn:hover {
    border-color: var(--ink);
    color: var(--ink);
    background: #fff;
}

.icon-btn.subtle {
    width: 30px;
    height: 30px;
    border-color: transparent;
}

.mode-form {
    padding-top: 20px;
}

.form-block {
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.form-block-last {
    border-bottom: 0;
    margin-bottom: 14px;
    padding-bottom: 6px;
}

.form-block-head {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    margin-bottom: 15px;
}

.step-num {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 27px;
    height: 27px;
    border: 1px solid rgba(31, 122, 112, .22);
    border-radius: 50%;
    background: var(--teal-soft);
    color: var(--teal);
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 800;
}

.form-block-head h4 {
    margin: 1px 0 0;
    font-size: 13px;
    letter-spacing: -.01em;
}

.form-block-head p {
    margin: 4px 0 0;
    color: var(--muted-2);
    font-size: 10.5px;
    line-height: 1.5;
}

.container-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.container-option {
    position: relative;
    display: block;
    padding: 12px 12px 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .62);
    text-align: left;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
}

.container-option:hover {
    border-color: var(--line-strong);
    background: #fff;
    transform: translateY(-1px);
}

.container-option.is-active {
    border-color: var(--ink);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(14, 42, 49, .06), 0 8px 18px rgba(14, 42, 49, .06);
}

.container-option.is-active::after {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 9px;
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
}

.container-option b {
    display: block;
    font-size: 16px;
    letter-spacing: -.03em;
}

.container-option small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}

.container-option em {
    display: block;
    margin-top: 6px;
    color: var(--teal);
    font-family: var(--font-mono);
    font-size: 8px;
    font-style: normal;
    font-weight: 700;
}

.container-note {
    margin-top: 10px;
    padding: 9px 11px;
    border-radius: 8px;
    background: rgba(31, 122, 112, .06);
    color: var(--ink-3);
    font-size: 10px;
    line-height: 1.55;
}

.container-note b {
    color: var(--teal);
}

.cargo-table {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, .55);
}

.simple-row {
    display: grid;
    grid-template-columns: 5px minmax(0, 1fr);
    gap: 9px;
    padding: 11px 10px;
    border-bottom: 1px solid rgba(223, 228, 220, .75);
}

.simple-row:last-child {
    border-bottom: 0;
}

.simple-row-main {
    min-width: 0;
}

.simple-row-top {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.simple-row-top .cargo-name {
    flex: 1;
    min-width: 0;
    height: 27px;
    padding: 0 5px;
    font-size: 11.5px;
}

.row-cbm {
    flex: 0 0 auto;
    color: var(--muted-2);
    font-family: var(--font-mono);
    font-size: 7.5px;
    white-space: nowrap;
}

.simple-row-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) 56px 64px;
    gap: 6px;
    margin-top: 7px;
}

.compact-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.compact-field > span {
    color: var(--muted-2);
    font-size: 7.5px;
    font-weight: 650;
    line-height: 1;
}

.compact-field .inp {
    height: 28px;
    padding: 0 3px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 600;
    text-align: center;
}

.compact-field .inp:hover {
    border-color: var(--line-strong);
}

.compact-field .inp:focus {
    border-color: rgba(31, 122, 112, .45);
    box-shadow: 0 0 0 2px rgba(31, 122, 112, .07);
}

.cargo-swatch {
    width: 5px;
    height: 100%;
    min-height: 52px;
    border-radius: 999px;
    background: var(--swatch, var(--orange));
}

.inp {
    width: 100%;
    height: 32px;
    min-width: 0;
    padding: 0 7px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    font-size: 11px;
    font-weight: 600;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.inp:hover {
    background: rgba(255, 255, 255, .65);
}

.inp:focus {
    outline: 0;
    border-color: rgba(31, 122, 112, .42);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(31, 122, 112, .08);
}

.inp::placeholder {
    color: #aeb8b4;
    font-weight: 400;
}

.inp.is-invalid {
    border-color: rgba(196, 71, 54, .55);
    background: var(--danger-bg);
}

.cargo-name {
    font-weight: 700;
}

.dim-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 8px minmax(0, 1fr) 8px minmax(0, 1fr);
    align-items: end;
    gap: 2px;
}

.dim-group > b {
    padding-bottom: 8px;
    color: var(--muted-2);
    font-size: 8px;
    font-weight: 400;
    text-align: center;
}

.row-delete {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #b1bcb8;
    transition: background .15s ease, color .15s ease;
}

.row-delete svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: round;
}

.row-delete:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.add-cargo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 36px;
    margin-top: 8px;
    border: 1px dashed var(--line-strong);
    border-radius: 9px;
    background: transparent;
    color: var(--ink-3);
    font-size: 10px;
    font-weight: 700;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.add-cargo-btn span {
    color: var(--orange);
    font-size: 16px;
    line-height: 1;
    font-weight: 500;
}

.add-cargo-btn:hover {
    border-color: var(--teal);
    background: rgba(31, 122, 112, .04);
    color: var(--teal);
}

.quick-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 9px;
}

.quick-links button {
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: var(--muted-2);
    font-size: 9px;
    font-weight: 650;
    text-decoration: underline;
    text-decoration-color: rgba(101, 118, 122, .3);
    text-underline-offset: 3px;
    transition: color .15s ease;
}

.quick-links button:hover {
    color: var(--orange-dark);
}

.quick-links span {
    color: var(--line-strong);
    font-size: 9px;
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 11px 0;
    cursor: pointer;
}

.switch-row strong {
    display: block;
    font-size: 11px;
    font-weight: 750;
}

.switch-row small {
    display: block;
    margin-top: 3px;
    color: var(--muted-2);
    font-size: 9px;
    line-height: 1.4;
}

.switch-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch {
    position: relative;
    flex: 0 0 auto;
    width: 36px;
    height: 21px;
    border-radius: 999px;
    background: #d7ddd7;
    transition: background .2s ease;
}

.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(14, 42, 49, .18);
    transition: transform .2s ease;
}

.switch-row input:checked + .switch {
    background: var(--teal);
}

.switch-row input:checked + .switch::after {
    transform: translateX(15px);
}

.switch-row input:focus-visible + .switch {
    outline: 3px solid rgba(240, 106, 58, .35);
    outline-offset: 2px;
}

.switch-row.is-disabled {
    opacity: .5;
    cursor: not-allowed;
}

.hint-box {
    display: flex;
    gap: 9px;
    padding: 10px 11px;
    border: 1px solid rgba(216, 166, 62, .24);
    border-radius: 9px;
    background: rgba(216, 166, 62, .07);
}

.hint-box svg {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin-top: 1px;
    fill: none;
    stroke: #a57b24;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hint-box p {
    margin: 0;
    color: #7d642d;
    font-size: 9.5px;
    line-height: 1.55;
}

.btn-calculate {
    position: relative;
    width: 100%;
    min-height: 50px;
    margin-top: 4px;
    border-radius: 11px;
    font-size: 13px;
}

.btn-calculate .btn-label {
    transition: opacity .2s ease;
}

.form-footnote {
    margin: 10px 0 0;
    color: var(--muted-2);
    font-size: 8.5px;
    line-height: 1.5;
    text-align: center;
}

/* pro form */

.segmented {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    padding: 3px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(14, 42, 49, .035);
}

.segmented button {
    min-height: 30px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 700;
}

.segmented button.is-active {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 2px 7px rgba(14, 42, 49, .08);
}

.container-picker.compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.container-picker.compact .container-option {
    padding: 8px 9px;
}

.container-picker.compact .container-option b {
    font-size: 13px;
}

.container-picker.compact .container-option small {
    display: none;
}

.container-picker.compact .container-option em {
    margin-top: 3px;
}

.field-caption {
    margin: 0 0 8px;
    color: var(--muted-2);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
}

.check-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}

.check-chip {
    position: relative;
}

.check-chip input {
    position: absolute;
    opacity: 0;
}

.check-chip span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
}

.check-chip input:checked + span {
    border-color: var(--teal);
    background: var(--teal-soft);
    color: var(--teal);
}

.custom-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-bottom: 12px;
}

.inline-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.mini-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.mini-field > span {
    color: var(--muted-2);
    font-size: 8.5px;
    font-weight: 650;
}

.mini-field input,
.mini-field select {
    width: 100%;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font-size: 10px;
    font-weight: 600;
}

.mini-field select {
    cursor: pointer;
}

.pro-cargo-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.pro-cargo-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, .6);
}

.pro-cargo-card::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: var(--swatch, var(--orange));
}

.pro-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px 6px 12px;
}

.pro-card-index {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(14, 42, 49, .06);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 700;
}

.pro-card-head .cargo-name {
    height: 27px;
    padding: 0 5px;
    font-size: 11px;
}

.pro-card-head .row-delete {
    margin-left: auto;
}

.pro-field-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    padding: 0 10px 8px 12px;
}

.pro-field-grid label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pro-field-grid label span {
    color: var(--muted-2);
    font-size: 7.5px;
    font-weight: 650;
}

.pro-field-grid input {
    height: 27px;
    padding: 0 4px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
    font-family: var(--font-mono);
    font-size: 9px;
    text-align: center;
}

.pro-advanced {
    border-top: 1px solid rgba(223, 228, 220, .75);
}

.pro-advanced summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 11px;
    color: var(--muted);
    font-size: 8.5px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.pro-advanced summary::-webkit-details-marker {
    display: none;
}

.pro-advanced summary::after {
    content: "+";
    color: var(--orange);
    font-size: 13px;
    line-height: 1;
}

.pro-advanced[open] summary::after {
    content: "−";
}

.pro-advanced-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 2px 11px 11px;
}

.pro-advanced-grid .mini-field {
    gap: 2px;
}

.pro-advanced-grid .mini-field span {
    font-size: 8px;
}

.pro-advanced-grid .mini-field input,
.pro-advanced-grid .mini-field select {
    height: 29px;
}

.pro-advanced-grid .switch-row {
    grid-column: 1 / -1;
    padding: 3px 0;
}

/* result panel */

.result-panel {
    position: relative;
    min-width: 0;
    min-height: 800px;
    padding: 28px 28px 30px;
    background:
        radial-gradient(circle at 100% 0%, rgba(42, 157, 143, .06), transparent 22rem),
        linear-gradient(180deg, #fbfcf9, #f7f9f5);
}

.result-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 740px;
    padding: 30px;
    text-align: center;
}

.empty-graphic {
    position: relative;
    display: grid;
    place-items: center;
    width: 180px;
    height: 180px;
    margin-bottom: 30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(42, 157, 143, .10), transparent 68%);
}

.empty-box {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 36px);
    grid-template-rows: repeat(2, 36px);
    gap: 5px;
    padding: 12px;
    border: 1px solid rgba(14, 42, 49, .16);
    border-radius: 12px;
    background: rgba(255, 255, 255, .55);
    transform: rotate(-7deg);
    box-shadow: 0 18px 40px rgba(14, 42, 49, .08);
}

.empty-box i {
    border-radius: 4px;
    background: var(--teal-soft);
    border: 1px solid rgba(31, 122, 112, .12);
}

.empty-box i:nth-child(2) {
    background: var(--orange-soft);
}

.empty-box i:nth-child(3) {
    background: #f5edda;
}

.empty-box i:nth-child(4) {
    background: #e5edf5;
}

.empty-scan {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 54%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--orange), transparent);
    box-shadow: 0 0 16px rgba(240, 106, 58, .8);
    animation: scan 3s ease-in-out infinite;
}

@keyframes scan {
    0%, 100% { transform: translateY(-36px); opacity: .25; }
    50% { transform: translateY(36px); opacity: .9; }
}

.result-empty h3 {
    margin: 0;
    font-size: 23px;
    letter-spacing: -.03em;
}

.result-empty p {
    max-width: 360px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.75;
}

.empty-steps {
    display: flex;
    gap: 7px;
    margin-top: 25px;
}

.empty-steps span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
}

.empty-steps i {
    display: grid;
    place-items: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 7px;
    font-style: normal;
}

.result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 740px;
    gap: 8px;
    text-align: center;
}

.result-loading strong {
    margin-top: 16px;
    font-size: 15px;
}

.result-loading span {
    color: var(--muted);
    font-size: 11px;
}

.loader-cube {
    position: relative;
    width: 66px;
    height: 66px;
    transform: rotate(30deg) skew(-8deg);
}

.loader-cube i {
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 5px;
    background: var(--orange);
    animation: cube 1.2s ease-in-out infinite;
}

.loader-cube i:nth-child(1) { top: 0; left: 0; }
.loader-cube i:nth-child(2) { top: 0; right: 0; background: var(--teal); animation-delay: .12s; }
.loader-cube i:nth-child(3) { bottom: 0; left: 0; background: #e3bd63; animation-delay: .24s; }

@keyframes cube {
    0%, 100% { transform: scale(.65); opacity: .4; }
    50% { transform: scale(1); opacity: 1; }
}

.result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.result-kicker {
    margin: 0 0 7px;
    color: var(--teal);
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.result-head h3 {
    margin: 0;
    font-size: clamp(23px, 2.4vw, 31px);
    line-height: 1.18;
    letter-spacing: -.035em;
}

.result-sub {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.dirty-note {
    color: var(--orange-dark);
    font-weight: 700;
}

.mini-field.is-disabled {
    opacity: .45;
}

.mini-field.is-disabled select {
    cursor: not-allowed;
}

.result-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}

.icon-text-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 29px;
    padding: 0 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.icon-text-btn svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-text-btn:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.action-menu {
    position: relative;
}

.action-menu summary {
    list-style: none;
    cursor: pointer;
}

.action-menu summary::-webkit-details-marker {
    display: none;
}

.action-menu-list {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    display: flex;
    flex-direction: column;
    min-width: 155px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.action-menu-list button {
    padding: 8px 9px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--ink-2);
    font-size: 10px;
    text-align: left;
}

.action-menu-list button:hover {
    background: var(--surface-2);
}

.print-header {
    display: none;
}

.print-only {
    display: none;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin-top: 18px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 13px 14px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -10px;
    bottom: -16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(42, 157, 143, .05);
}

.stat-card span {
    display: block;
    color: var(--muted-2);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: .04em;
}

.stat-card strong {
    display: block;
    margin-top: 5px;
    font-size: 23px;
    line-height: 1;
    letter-spacing: -.045em;
}

.stat-card strong small {
    margin-left: 2px;
    color: var(--muted-2);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0;
}

.stat-card em {
    display: block;
    margin-top: 6px;
    color: var(--muted-2);
    font-size: 8.5px;
    font-style: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-card.is-accent {
    border-color: rgba(240, 106, 58, .18);
    background: linear-gradient(140deg, #fff8f3, #fff);
}

.stat-card.is-accent strong {
    color: var(--orange-dark);
}

.stat-card.is-dark {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.stat-card.is-dark span,
.stat-card.is-dark em,
.stat-card.is-dark strong small {
    color: rgba(220, 238, 233, .55);
}

.stat-card.is-dark::after {
    background: rgba(255, 255, 255, .05);
}

.warning-stack {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 12px;
}

.warning-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 9.5px;
    line-height: 1.55;
}

.warning-item svg {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin-top: 1px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.warning-item strong {
    display: block;
    font-size: 9.5px;
}

.warning-item p {
    margin: 1px 0 0;
}

.warning-item.is-success {
    border-color: rgba(23, 107, 94, .14);
    background: var(--success-bg);
    color: var(--success);
}

.warning-item.is-info {
    border-color: rgba(42, 157, 143, .14);
    background: var(--teal-soft);
    color: var(--teal);
}

.warning-item.is-warning {
    border-color: rgba(154, 106, 23, .16);
    background: var(--warning-bg);
    color: var(--warning);
}

.warning-item.is-danger {
    border-color: rgba(196, 71, 54, .14);
    background: var(--danger-bg);
    color: var(--danger);
}

.container-tabs {
    display: flex;
    gap: 5px;
    margin-top: 16px;
    padding-bottom: 1px;
    overflow-x: auto;
    scrollbar-width: none;
}

.container-tabs::-webkit-scrollbar {
    display: none;
}

.container-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 700;
}

.container-tab b {
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 700;
    color: var(--muted-2);
}

.container-tab.is-active {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.container-tab.is-active b {
    color: rgba(224, 241, 236, .6);
}

.viewer-card {
    overflow: hidden;
    margin-top: 12px;
    border: 1px solid rgba(14, 42, 49, .12);
    border-radius: 16px;
    background: #0c252b;
    box-shadow: 0 18px 40px rgba(14, 42, 49, .12);
}

.viewer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(159, 210, 201, .10);
    background: rgba(255, 255, 255, .02);
}

.view-switch {
    display: flex;
    align-items: center;
    gap: 3px;
}

.view-switch button {
    height: 27px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: rgba(196, 225, 219, .58);
    font-size: 9px;
    font-weight: 700;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.view-switch button:hover {
    color: #fff;
    background: rgba(255, 255, 255, .05);
}

.view-switch button.is-active {
    border-color: rgba(157, 211, 202, .16);
    background: rgba(157, 211, 202, .09);
    color: #e6f5f1;
}

.view-switch button:last-child {
    display: grid;
    place-items: center;
    width: 27px;
    padding: 0;
}

.view-switch button svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.viewer-hint {
    color: rgba(188, 219, 213, .38);
    font-size: 8px;
    letter-spacing: .03em;
    white-space: nowrap;
}

.viewer-stage {
    position: relative;
    height: 470px;
    background:
        radial-gradient(circle at 52% 40%, rgba(45, 125, 118, .16), transparent 55%),
        linear-gradient(160deg, #0e2b31, #081b20);
}

.viewer-stage canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: grab;
}

.viewer-stage canvas:active {
    cursor: grabbing;
}

.viewer-badge {
    position: absolute;
    top: 14px;
    left: 15px;
    padding: 6px 9px;
    border: 1px solid rgba(159, 210, 201, .15);
    border-radius: 5px;
    background: rgba(5, 23, 27, .62);
    color: #c0e4dd;
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .08em;
    pointer-events: none;
}

.viewer-meta {
    position: absolute;
    top: 14px;
    right: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    pointer-events: none;
}

.viewer-meta span {
    padding: 5px 7px;
    border: 1px solid rgba(159, 210, 201, .12);
    border-radius: 4px;
    background: rgba(5, 23, 27, .55);
    color: rgba(201, 232, 225, .65);
    font-family: var(--font-mono);
    font-size: 7.5px;
    letter-spacing: .02em;
}

.viewer-tooltip {
    position: absolute;
    z-index: 6;
    max-width: 210px;
    padding: 9px 11px;
    border: 1px solid rgba(169, 220, 211, .20);
    border-radius: 7px;
    background: rgba(5, 23, 27, .92);
    color: #e9f6f2;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .3);
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.viewer-tooltip strong {
    display: block;
    font-size: 10px;
}

.viewer-tooltip span {
    display: block;
    margin-top: 4px;
    color: rgba(188, 223, 216, .64);
    font-family: var(--font-mono);
    font-size: 8px;
    line-height: 1.55;
}

.viewer-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(8, 27, 32, .72);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.viewer-loading.is-active {
    opacity: 1;
}

.viewer-loading span {
    width: 26px;
    height: 26px;
    border: 2px solid rgba(255, 255, 255, .18);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.viewer-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 13px;
    border-top: 1px solid rgba(159, 210, 201, .10);
    background: rgba(255, 255, 255, .02);
}

.legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px 13px;
    min-width: 0;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(210, 234, 229, .72);
    font-size: 8.5px;
    white-space: nowrap;
}

.legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--legend-color, var(--orange));
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .04);
}

.legend-item b {
    color: rgba(210, 234, 229, .44);
    font-family: var(--font-mono);
    font-size: 7.5px;
    font-weight: 500;
}

.timeline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.play-btn {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid rgba(159, 210, 201, .16);
    border-radius: 50%;
    background: transparent;
    color: #b9ddd6;
    transition: background .15s ease;
}

.play-btn:hover {
    background: rgba(159, 210, 201, .10);
}

.play-btn svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

.play-btn.is-playing svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.timeline input[type="range"] {
    width: 82px;
    height: 3px;
    margin: 0;
    appearance: none;
    border-radius: 999px;
    background: rgba(186, 221, 214, .18);
    outline: none;
}

.timeline input[type="range"]::-webkit-slider-thumb {
    width: 11px;
    height: 11px;
    appearance: none;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 0 3px rgba(240, 106, 58, .18);
    cursor: pointer;
}

.timeline input[type="range"]::-moz-range-thumb {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 50%;
    background: var(--orange);
    cursor: pointer;
}

.timeline span {
    min-width: 54px;
    color: rgba(202, 231, 225, .55);
    font-family: var(--font-mono);
    font-size: 7.5px;
    text-align: right;
    white-space: nowrap;
}

.result-tabs {
    display: flex;
    gap: 4px;
    margin-top: 16px;
    border-bottom: 1px solid var(--line);
}

.result-tabs button {
    position: relative;
    padding: 8px 12px 10px;
    border: 0;
    background: transparent;
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 700;
}

.result-tabs button::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -1px;
    height: 2px;
    background: transparent;
    border-radius: 2px;
}

.result-tabs button.is-active {
    color: var(--ink);
}

.result-tabs button.is-active::after {
    background: var(--orange);
}

.result-tab-panel {
    padding-top: 14px;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.insight-card {
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.insight-card > span {
    display: block;
    color: var(--muted-2);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .05em;
}

.insight-card strong {
    display: block;
    margin-top: 7px;
    font-size: 20px;
    letter-spacing: -.03em;
}

.insight-card strong small {
    margin-left: 3px;
    color: var(--muted-2);
    font-size: 8px;
    font-weight: 500;
}

.insight-card p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.55;
}

.cog-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.cog-track {
    position: relative;
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(42, 157, 143, .18), rgba(240, 106, 58, .16));
}

.cog-track i {
    position: absolute;
    top: -3px;
    left: 50%;
    width: 2px;
    height: 12px;
    border-radius: 2px;
    background: var(--ink);
    transform: translateX(-50%);
}

.cog-track b {
    position: absolute;
    top: -4px;
    left: 50%;
    width: 13px;
    height: 13px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 2px 6px rgba(14, 42, 49, .25);
    transform: translateX(-50%);
}

.cog-bar em {
    color: var(--muted-2);
    font-size: 8px;
    font-style: normal;
    white-space: nowrap;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9.5px;
}

.data-table th {
    padding: 8px 9px;
    border-bottom: 1px solid var(--line);
    color: var(--muted-2);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .03em;
    text-align: left;
    white-space: nowrap;
    background: rgba(14, 42, 49, .025);
}

.data-table td {
    padding: 9px;
    border-bottom: 1px solid rgba(223, 228, 220, .7);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background: rgba(31, 122, 112, .025);
}

.data-table .type-cell {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 100px;
}

.data-table .type-cell i {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--swatch, var(--orange));
}

.data-table .type-cell b {
    font-size: 9.5px;
}

.data-table .type-cell small {
    display: block;
    margin-top: 2px;
    color: var(--muted-2);
    font-family: var(--font-mono);
    font-size: 7px;
}

.data-table .num {
    font-family: var(--font-mono);
    font-size: 8.5px;
    white-space: nowrap;
}

.data-table .muted {
    color: var(--muted-2);
}

.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.table-footnote {
    margin: 6px 0 0;
    color: var(--muted-2);
    font-size: 8px;
    text-align: right;
}

.batch-table td {
    font-size: 9px;
}

.batch-table .batch-range {
    color: var(--muted-2);
    font-family: var(--font-mono);
    font-size: 8px;
}

.empty-table {
    padding: 32px 18px;
    border: 1px dashed var(--line-strong);
    border-radius: 10px;
    color: var(--muted);
    font-size: 10px;
    text-align: center;
}

/* ---------- knowledge ---------- */

.knowledge-section {
    position: relative;
    padding: 92px 0 100px;
    background:
        radial-gradient(circle at 8% 12%, rgba(240, 106, 58, .12), transparent 24rem),
        radial-gradient(circle at 92% 80%, rgba(42, 157, 143, .11), transparent 27rem),
        var(--ink);
    color: #f1f4ee;
    overflow: hidden;
}

.knowledge-section::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .22;
    background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
    mask-image: linear-gradient(180deg, #000, transparent 85%);
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
}

.knowledge-heading,
.knowledge-grid {
    position: relative;
    z-index: 1;
    width: min(1280px, calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
}

.knowledge-heading {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .7fr);
    align-items: end;
    gap: 60px;
    margin-bottom: 44px;
}

.eyebrow-light {
    color: #8fd0c4;
}

.knowledge-heading h2 {
    color: #f7f3e9;
}

.knowledge-intro {
    max-width: 430px;
    margin: 0 0 5px auto;
    color: rgba(217, 233, 226, .62);
    font-size: 13px;
    line-height: 1.8;
}

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.knowledge-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 25px;
    border: 1px solid rgba(180, 220, 211, .10);
    border-radius: 18px;
    background: rgba(255, 255, 255, .035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.knowledge-card-wide {
    grid-column: span 2;
}

.card-index {
    color: #73b4a8;
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .13em;
}

.knowledge-card h3 {
    margin: 13px 0 0;
    color: #f7f3e9;
    font-size: 24px;
    line-height: 1.18;
    letter-spacing: -.03em;
}

.knowledge-card > p {
    margin: 9px 0 0;
    color: rgba(211, 231, 225, .62);
    font-size: 11px;
    line-height: 1.7;
}

.formula-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 18px;
    padding: 14px 16px;
    border-left: 2px solid var(--orange);
    background: rgba(0, 0, 0, .12);
}

.formula-box span {
    color: #ff9a70;
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: .12em;
}

.formula-box strong {
    color: #fbf6eb;
    font-family: var(--font-mono);
    font-size: 18px;
    letter-spacing: -.03em;
}

.formula-box small {
    color: rgba(207, 230, 223, .42);
    font-size: 8px;
}

.mini-case {
    margin-top: 16px;
}

.mini-case-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.mini-case-head span {
    padding: 2px 5px;
    border-radius: 3px;
    background: var(--orange);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 7px;
    font-weight: 700;
}

.mini-case-head strong {
    color: rgba(227, 241, 235, .78);
    font-size: 9.5px;
}

.case-rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.case-rows div {
    padding: 10px 11px;
    border: 1px solid rgba(180, 220, 211, .10);
    border-radius: 7px;
    background: rgba(255, 255, 255, .025);
}

.case-rows span {
    display: block;
    color: rgba(197, 225, 217, .42);
    font-size: 8px;
}

.case-rows b {
    display: block;
    margin-top: 5px;
    color: #f0e9dc;
    font-family: var(--font-mono);
    font-size: 11px;
}

.case-rows em {
    display: block;
    margin-top: 3px;
    color: rgba(206, 230, 223, .35);
    font-size: 7.5px;
    font-style: normal;
}

.mini-case > p {
    margin: 10px 0 0;
    color: rgba(207, 229, 222, .48);
    font-size: 9px;
    line-height: 1.6;
}

.meter-card h3 {
    font-size: 22px;
}

.meter-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin-top: 19px;
}

.meter-row > div:first-child {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.meter-row span {
    color: #e9f1eb;
    font-size: 10px;
    font-weight: 700;
}

.meter-row small {
    color: rgba(194, 224, 216, .42);
    font-family: var(--font-mono);
    font-size: 7.5px;
}

.meter {
    position: relative;
    height: 5px;
    margin-top: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
}

.meter i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #398f83, #7ed2c2);
}

.meter b {
    position: absolute;
    right: 0;
    top: -15px;
    color: rgba(199, 226, 219, .54);
    font-family: var(--font-mono);
    font-size: 7px;
    font-weight: 500;
}

.meter-note {
    margin-top: auto;
    padding-top: 17px;
    color: rgba(205, 229, 222, .42);
    font-size: 8.5px;
    line-height: 1.6;
    border-top: 1px solid rgba(180, 220, 211, .08);
}

.weight-card h3 {
    font-size: 22px;
}

.weight-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 17px;
}

.weight-compare div {
    padding: 10px;
    border: 1px solid rgba(180, 220, 211, .10);
    border-radius: 7px;
    background: rgba(0, 0, 0, .1);
}

.weight-compare span {
    display: block;
    color: #ff9a70;
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 700;
}

.weight-compare strong {
    display: block;
    margin-top: 4px;
    color: #f4efe4;
    font-size: 18px;
}

.weight-compare small {
    display: block;
    margin-top: 3px;
    color: rgba(197, 225, 217, .38);
    font-size: 7.5px;
}

.compact-list {
    margin: 15px 0 0;
    padding: 0;
    list-style: none;
}

.compact-list li {
    position: relative;
    padding-left: 12px;
    margin-top: 8px;
    color: rgba(208, 231, 224, .54);
    font-size: 9px;
    line-height: 1.55;
}

.compact-list li::before {
    content: "";
    position: absolute;
    top: .55em;
    left: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #7ec8ba;
    opacity: .6;
}

.compact-list b {
    color: rgba(240, 247, 242, .78);
}

.door-card h3 {
    font-size: 21px;
}

.door-diagram {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-top: 17px;
    padding: 11px;
    border: 1px solid rgba(180, 220, 211, .10);
    border-radius: 8px;
    background: rgba(0, 0, 0, .1);
}

.door-frame {
    width: 76px;
    height: 70px;
    padding: 7px;
    border: 2px solid rgba(164, 218, 208, .34);
    border-bottom-width: 4px;
}

.door-fill {
    display: grid;
    place-items: center;
    height: 100%;
    border: 1px dashed rgba(164, 218, 208, .22);
    color: rgba(196, 227, 219, .45);
    font-size: 7px;
}

.door-side b {
    display: block;
    color: #f4efe4;
    font-family: var(--font-mono);
    font-size: 10px;
}

.door-side span {
    display: block;
    margin-top: 4px;
    color: rgba(197, 225, 218, .45);
    font-size: 8px;
}

.experience-card {
    padding-bottom: 18px;
}

.experience-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.experience-head h3 {
    margin-top: 13px;
}

.experience-head p {
    max-width: 590px;
    margin: 9px 0 0;
    color: rgba(211, 231, 225, .58);
    font-size: 11px;
    line-height: 1.7;
}

.stamp {
    flex: 0 0 auto;
    padding: 8px 10px;
    border: 1px solid rgba(240, 106, 58, .28);
    border-radius: 4px;
    color: #f08a62;
    font-family: var(--font-mono);
    font-size: 7px;
    line-height: 1.5;
    letter-spacing: .12em;
    text-align: center;
    transform: rotate(4deg);
}

.experience-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 27px;
    margin-top: 18px;
}

.experience-list > div {
    display: flex;
    gap: 11px;
    padding: 12px 0;
    border-top: 1px solid rgba(180, 220, 211, .08);
}

.experience-list > div > span {
    color: #66a99e;
    font-family: var(--font-mono);
    font-size: 8px;
}

.experience-list strong {
    display: block;
    color: #eef5ef;
    font-size: 10px;
}

.experience-list p {
    margin: 4px 0 0;
    color: rgba(204, 228, 221, .46);
    font-size: 8.5px;
    line-height: 1.6;
}

.terms-card h3 {
    font-size: 21px;
}

.term-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
    margin-top: 14px;
}

.term-list div {
    padding: 9px 0;
    border-top: 1px solid rgba(180, 220, 211, .08);
}

.term-list b {
    display: block;
    color: #ff9a70;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: .03em;
}

.term-list span {
    display: block;
    margin-top: 4px;
    color: rgba(207, 230, 223, .48);
    font-size: 8px;
    line-height: 1.45;
}

.term-note {
    margin-top: auto !important;
    padding-top: 14px;
    border-top: 1px solid rgba(180, 220, 211, .08);
    color: rgba(198, 226, 218, .35) !important;
    font-family: var(--font-mono);
    font-size: 7.5px !important;
}

.checklist-card {
    background: rgba(255, 255, 255, .055);
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 14px;
}

.checklist label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(180, 220, 211, .06);
    color: rgba(216, 236, 229, .68);
    font-size: 9px;
    cursor: pointer;
}

.checklist input {
    width: 13px;
    height: 13px;
    margin: 0;
    accent-color: var(--orange);
}

.checklist input:checked + span {
    color: rgba(190, 218, 210, .3);
    text-decoration: line-through;
}

.checklist-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.checklist-progress span {
    color: rgba(201, 227, 220, .45);
    font-family: var(--font-mono);
    font-size: 7px;
    white-space: nowrap;
}

.checklist-progress i {
    flex: 1;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
}

.checklist-progress b {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--orange);
    transition: width .3s ease;
}

/* ---------- specs ---------- */

.specs-section {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 92px 0 96px;
}

.estimator {
    width: 330px;
    padding: 15px;
    border: 1px solid rgba(14, 42, 49, .12);
    border-radius: 14px;
    background: rgba(255, 255, 255, .58);
    box-shadow: 0 12px 30px rgba(14, 42, 49, .05);
}

.estimator-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.estimator-head span {
    font-size: 12px;
    font-weight: 750;
}

.estimator-head small {
    color: var(--muted-2);
    font-size: 8px;
}

.estimator-fields {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 7px;
}

.estimator-fields label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

.estimator-fields label > span {
    color: var(--muted-2);
    font-size: 8px;
    font-weight: 650;
}

.estimator-fields input,
.estimator-fields select {
    width: 100%;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    font-size: 10px;
    font-weight: 600;
}

.estimator-fields input {
    padding-right: 34px;
}

.estimator-fields label > b {
    position: absolute;
    right: 8px;
    bottom: 9px;
    color: var(--muted-2);
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 500;
}

.estimator-result {
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 9px;
    line-height: 1.55;
}

.estimator-result b {
    color: var(--orange-dark);
    font-family: var(--font-mono);
    font-size: 14px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(14, 42, 49, .1);
    border-radius: 16px;
    background: rgba(255, 255, 255, .5);
    box-shadow: var(--shadow-sm);
}

.spec-table {
    width: 100%;
    min-width: 840px;
    border-collapse: collapse;
    font-size: 11px;
}

.spec-table th {
    padding: 15px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(14, 42, 49, .035);
    color: var(--muted-2);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-align: left;
    white-space: nowrap;
}

.spec-table td {
    padding: 17px 16px;
    border-bottom: 1px solid rgba(223, 228, 220, .72);
    color: var(--ink-2);
    white-space: nowrap;
}

.spec-table tr:last-child td {
    border-bottom: 0;
}

.spec-table tbody tr {
    transition: background .15s ease;
}

.spec-table tbody tr:hover {
    background: rgba(42, 157, 143, .035);
}

.spec-code {
    display: block;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 800;
}

.spec-table td small {
    display: block;
    margin-top: 3px;
    color: var(--muted-2);
    font-size: 8px;
}

.effective-pill {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 4px;
    background: var(--teal-soft);
    color: var(--teal);
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
}

.table-note {
    margin: 12px 0 0;
    color: var(--muted-2);
    font-size: 9px;
    line-height: 1.6;
}

/* ---------- faq ---------- */

.faq-section {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 0 0 104px;
}

.faq-lead {
    max-width: 390px;
    margin: 0 0 6px auto;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.75;
}

.faq-list {
    border-top: 1px solid rgba(14, 42, 49, .15);
}

.faq-item {
    border-bottom: 1px solid rgba(14, 42, 49, .12);
}

.faq-item summary {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 21px 4px;
    list-style: none;
    cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary span {
    flex: 0 0 auto;
    color: var(--muted-2);
    font-family: var(--font-mono);
    font-size: 9px;
}

.faq-item summary {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.faq-item summary i {
    position: relative;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-left: auto;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
}

.faq-item summary i::before,
.faq-item summary i::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 1px;
    background: var(--ink-3);
    transform: translate(-50%, -50%);
}

.faq-item summary i::after {
    transform: translate(-50%, -50%) rotate(90deg);
    transition: transform .2s ease;
}

.faq-item[open] summary i::after {
    transform: translate(-50%, -50%) rotate(0);
}

.faq-item[open] summary i {
    border-color: var(--orange);
    background: var(--orange);
}

.faq-item[open] summary i::before,
.faq-item[open] summary i::after {
    background: #fff;
}

.faq-answer {
    max-width: 860px;
    padding: 0 0 23px 40px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.85;
}

/* ---------- footer ---------- */

.site-footer {
    padding: 48px 0 24px;
    background: #0a2228;
    color: #d9e9e3;
}

.footer-main,
.footer-bottom {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    padding-bottom: 34px;
    border-bottom: 1px solid rgba(180, 220, 211, .10);
}

.brand-light .brand-text strong {
    color: #f5f1e7;
}

.brand-light .brand-text small {
    color: rgba(203, 230, 222, .38);
}

.brand-light .brand-mark {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
}

.footer-brand p {
    margin: 18px 0 0;
    color: rgba(202, 229, 221, .45);
    font-size: 11px;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-links > div {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-links b {
    margin-bottom: 3px;
    color: rgba(214, 236, 229, .36);
    font-size: 8px;
    letter-spacing: .12em;
}

.footer-links a {
    color: rgba(220, 239, 233, .68);
    font-size: 10px;
    transition: color .15s ease;
}

.footer-links a:hover {
    color: var(--orange);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding-top: 18px;
    color: rgba(195, 224, 216, .28);
    font-size: 8px;
    line-height: 1.6;
}

/* ---------- toast ---------- */

.toast-stack {
    position: fixed;
    z-index: 200;
    right: 22px;
    bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    max-width: 340px;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 10px;
    background: rgba(10, 34, 40, .92);
    color: #eaf5f1;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .22);
    font-size: 10.5px;
    line-height: 1.55;
    backdrop-filter: blur(10px);
    animation: toast-in .25s ease both;
}

.toast.is-error {
    border-color: rgba(240, 106, 58, .35);
}

.toast.is-ok {
    border-color: rgba(126, 210, 194, .25);
}

.toast svg {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin-top: 1px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 1160px) {
    .hero {
        gap: 38px;
    }

    .main-nav {
        gap: 22px;
        margin-right: 20px;
    }

    .planner-shell {
        grid-template-columns: 370px minmax(0, 1fr);
    }

    .config-panel {
        padding: 23px 21px 25px;
    }

    .result-panel {
        padding: 25px 23px 27px;
    }

    .viewer-stage {
        height: 430px;
    }

    .knowledge-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .knowledge-card-wide {
        grid-column: span 2;
    }

    .knowledge-heading {
        grid-template-columns: 1fr .8fr;
        gap: 40px;
    }
}

@media (max-width: 980px) {
    .header-inner {
        width: calc(100% - 36px);
    }

    .main-nav {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 44px;
        padding-top: 50px;
    }

    .hero-copy h1 {
        max-width: 760px;
    }

    .hero-art {
        max-width: 680px;
        width: 100%;
        margin: 0 auto;
    }

    .section-heading {
        grid-template-columns: 1fr;
        gap: 22px;
        align-items: start;
    }

    .mode-switch {
        justify-self: start;
    }

    .planner-shell {
        grid-template-columns: 1fr;
    }

    .config-panel {
        border-right: 0;
        border-bottom: 1px solid rgba(14, 42, 49, .08);
    }

    .result-panel {
        min-height: 0;
    }

    .result-empty,
    .result-loading {
        min-height: 420px;
    }

    .knowledge-heading {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .knowledge-intro {
        max-width: 600px;
        margin: 0;
    }

    .specs-section .section-heading,
    .faq-section .section-heading {
        grid-template-columns: 1fr;
    }

    .estimator {
        width: min(100%, 420px);
    }

    .faq-lead {
        margin: 0;
    }
}

@media (max-width: 760px) {
    html {
        scroll-padding-top: 78px;
    }

    .header-inner {
        width: calc(100% - 28px);
        min-height: 66px;
    }

    .brand-text strong {
        font-size: 18px;
    }

    .tech-badge {
        display: none;
    }

    .header-actions {
        gap: 8px;
    }

    .hero {
        width: calc(100% - 32px);
        padding: 38px 0 54px;
    }

    .hero-copy h1 {
        font-size: clamp(40px, 11vw, 58px);
    }

    .hero-lead {
        font-size: 14px;
    }

    .hero-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
        margin-top: 26px;
    }

    .hero-metrics {
        margin-top: 34px;
    }

    .hero-metrics dd {
        font-size: 14px;
    }

    .hero-metrics div {
        padding-right: 8px;
    }

    .hero-metrics div + div {
        padding-left: 12px;
    }

    .hero-art {
        padding: 8px;
        border-radius: 23px;
    }

    .hero-float-a {
        right: 14px;
        bottom: 64px;
    }

    .hero-float-b {
        left: 14px;
        bottom: 12px;
    }

    .hero-float {
        padding: 8px 10px;
    }

    .hero-float strong {
        font-size: 9px;
    }

    .hero-float small {
        font-size: 7.5px;
    }

    .planner-section,
    .specs-section,
    .faq-section {
        width: calc(100% - 28px);
    }

    .planner-section {
        padding-top: 20px;
        padding-bottom: 70px;
    }

    .section-heading h2 {
        font-size: 34px;
    }

    .section-lead {
        font-size: 13px;
    }

    .planner-shell {
        border-radius: 18px;
    }

    .config-panel {
        padding: 20px 15px 22px;
    }

    .result-panel {
        padding: 20px 14px 22px;
    }

    .simple-row {
        grid-template-columns: 5px minmax(0, 1fr);
        gap: 8px;
        padding: 10px 9px;
    }

    .simple-row-bottom {
        grid-template-columns: minmax(0, 1.55fr) 50px 58px;
        gap: 4px;
    }

    .row-cbm {
        display: none;
    }

    .pro-field-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pro-field-grid label:nth-child(4),
    .pro-field-grid label:nth-child(5) {
        grid-column: span 1;
    }

    .result-head {
        flex-direction: column;
        gap: 15px;
    }

    .result-actions {
        width: 100%;
        justify-content: space-between;
    }

    .icon-text-btn {
        flex: 1;
        justify-content: center;
    }

    .action-menu {
        flex: 1;
    }

    .action-menu summary {
        justify-content: center;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .viewer-stage {
        height: 330px;
    }

    .viewer-hint {
        display: none;
    }

    .viewer-meta {
        display: none;
    }

    .viewer-foot {
        align-items: flex-start;
        flex-direction: column;
    }

    .timeline {
        width: 100%;
        justify-content: flex-end;
    }

    .timeline input[type="range"] {
        flex: 1;
        width: auto;
    }

    .insight-grid {
        grid-template-columns: 1fr;
    }

    .knowledge-section {
        padding: 64px 0 70px;
    }

    .knowledge-heading,
    .knowledge-grid {
        width: calc(100% - 28px);
    }

    .knowledge-grid {
        grid-template-columns: 1fr;
    }

    .knowledge-card-wide {
        grid-column: auto;
    }

    .knowledge-card {
        padding: 20px;
    }

    .knowledge-card h3 {
        font-size: 21px;
    }

    .experience-list {
        grid-template-columns: 1fr;
    }

    .experience-head {
        flex-direction: column;
    }

    .stamp {
        display: none;
    }

    .specs-section {
        padding: 64px 0 70px;
    }

    .faq-section {
        padding-bottom: 74px;
    }

    .faq-item summary {
        gap: 12px;
        padding: 17px 2px;
        font-size: 12px;
    }

    .faq-answer {
        padding-left: 21px;
        font-size: 11px;
    }

    .footer-main {
        flex-direction: column;
        gap: 32px;
    }

    .footer-links {
        gap: 48px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
    }

    .toast-stack {
        right: 12px;
        left: 12px;
        bottom: 12px;
    }

    .toast {
        max-width: none;
    }
}

@media (max-width: 460px) {
    .hero-metrics {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hero-metrics div {
        padding: 12px 0;
        border-bottom: 1px solid rgba(14, 42, 49, .08);
    }

    .hero-metrics div + div {
        padding-left: 0;
        border-left: 0;
    }

    .hero-metrics div:last-child {
        border-bottom: 0;
    }

    .hero-art-top {
        top: 20px;
        left: 20px;
        right: 20px;
    }

    .hero-float-a {
        display: none;
    }

    .container-picker {
        grid-template-columns: 1fr 1fr;
    }

    .custom-container {
        grid-template-columns: 1fr 1fr;
    }

    .pro-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-card strong {
        font-size: 19px;
    }

    .viewer-stage {
        height: 280px;
    }

    .result-actions {
        gap: 1px;
    }

    .icon-text-btn {
        padding: 0 5px;
        font-size: 8px;
    }

    .icon-text-btn svg {
        width: 12px;
        height: 12px;
    }

    .case-rows {
        grid-template-columns: 1fr;
    }

    .weight-compare {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}

/* ---------- print ---------- */

@media print {
    @page {
        size: A4 landscape;
        margin: 10mm;
    }

    body {
        background: #fff;
        color: #111;
    }

    .site-header,
    .hero,
    .knowledge-section,
    .specs-section,
    .faq-section,
    .site-footer,
    .config-panel,
    .mode-switch,
    .result-actions,
    .result-tabs,
    .result-tab-panel,
    .timeline,
    .view-switch,
    .viewer-hint,
    .toast-stack {
        display: none !important;
    }

    .planner-section {
        width: 100%;
        padding: 0;
    }

    .section-heading {
        display: none;
    }

    .planner-shell {
        display: block;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .result-panel {
        min-height: 0;
        padding: 0;
        background: #fff;
    }

    .print-header {
        display: block;
        margin-bottom: 8mm;
        border-bottom: 1px solid #ccc;
        padding-bottom: 4mm;
    }

    .print-header h1 {
        margin: 0;
        font-size: 18pt;
    }

    .print-header p {
        margin: 2mm 0 0;
        color: #555;
        font-size: 8pt;
    }

    .result-head {
        display: none !important;
    }

    .result-head h3 {
        font-size: 17pt;
    }

    .stat-grid {
        margin-top: 3mm;
        gap: 2mm;
    }

    .stat-card {
        padding: 3mm;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    .stat-card strong {
        font-size: 16pt;
    }

    .warning-stack {
        margin-top: 2mm;
        break-inside: avoid;
    }

    .warning-item {
        border: 1px solid #ddd;
        background: #fafafa;
        color: #333;
        font-size: 7.5pt;
    }

    .viewer-card {
        margin-top: 3mm;
        border: 1px solid #ddd;
        box-shadow: none;
        break-inside: avoid;
    }

    .viewer-bar {
        display: none;
    }

    .viewer-stage {
        height: 82mm;
        background: #0c252b;
    }

    .viewer-badge {
        color: #fff;
    }

    .viewer-foot {
        background: #fafafa;
    }

    .legend-item {
        color: #333;
    }

    .legend-item b {
        color: #777;
    }

    .container-tabs {
        display: flex;
    }

    .container-tab {
        font-size: 7pt;
    }

    .container-tab:not(.is-active) {
        display: none;
    }

    #tabList {
        display: block !important;
        padding-top: 4mm;
        break-before: auto;
    }

    #tabList .table-scroll {
        border: 1px solid #ddd;
    }

    #tabList .data-table {
        font-size: 7pt;
    }

    #tabList .data-table th,
    #tabList .data-table td {
        padding: 2mm;
    }

    #tabView,
    #tabSteps {
        display: none !important;
    }

    .print-only {
        display: block;
    }
}
