:root {
    --ink: #0d2a31;
    --ink-2: #123b42;
    --teal: #1f7a70;
    --teal-soft: #e5f2ed;
    --orange: #e76f51;
    --orange-dark: #cf563a;
    --sand: #f4f0e6;
    --surface: #fffdf8;
    --line: #dfe4dc;
    --muted: #62716d;
    --muted-2: #94a09a;
    --warning: #9a6a17;
    --warning-bg: #fff8e7;
    --danger: #b64634;
    --danger-bg: #fff1ec;
    --radius: 18px;
    --shadow: 0 22px 60px rgba(13, 42, 49, .10);
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 88% 4%, rgba(231, 111, 81, .10), transparent 23rem),
        radial-gradient(circle at 4% 92%, rgba(31, 122, 112, .08), transparent 25rem),
        var(--sand);
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

a {
    color: inherit;
}

.fob-app {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    min-height: 100vh;
}

/* ---------------- sidebar ---------------- */

.fob-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    align-self: start;
    height: 100vh;
    padding: 28px 22px 22px;
    overflow-y: auto;
    background:
        radial-gradient(circle at 15% 5%, rgba(42, 157, 143, .22), transparent 18rem),
        linear-gradient(160deg, #0e2e35, #0a2228 65%, #071a1f);
    color: #eef7f3;
}

.fob-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.fob-brand-mark {
    display: grid;
    grid-template-columns: repeat(3, 5px);
    align-items: end;
    gap: 3px;
    width: 34px;
    height: 34px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
}

.fob-brand-mark i {
    display: block;
    width: 5px;
    border-radius: 2px;
    background: var(--orange);
}

.fob-brand-mark i:nth-child(1) { height: 9px; opacity: .65; }
.fob-brand-mark i:nth-child(2) { height: 16px; }
.fob-brand-mark i:nth-child(3) { height: 12px; opacity: .82; }

.fob-brand strong {
    display: block;
    font-size: 17px;
    letter-spacing: .04em;
}

.fob-brand small {
    display: block;
    margin-top: 2px;
    color: rgba(224, 241, 236, .46);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: .14em;
}

.fob-sidebar-label {
    margin: 38px 0 10px;
    color: rgba(224, 241, 236, .38);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.fob-mode-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fob-mode-btn {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 14px 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 13px;
    background: rgba(255, 255, 255, .04);
    color: rgba(238, 247, 243, .72);
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.fob-mode-btn:hover {
    border-color: rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.fob-mode-btn.is-active {
    border-color: rgba(231, 111, 81, .55);
    background: rgba(231, 111, 81, .13);
    color: #fff;
}

.fob-mode-no {
    color: rgba(224, 241, 236, .36);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
}

.fob-mode-btn.is-active .fob-mode-no {
    color: var(--orange);
}

.fob-mode-copy {
    flex: 1;
    min-width: 0;
}

.fob-mode-copy b {
    display: block;
    font-size: 13px;
    letter-spacing: .02em;
}

.fob-mode-copy small {
    display: block;
    margin-top: 3px;
    color: rgba(224, 241, 236, .44);
    font-size: 10px;
}

.fob-mode-btn.is-active .fob-mode-copy small {
    color: rgba(238, 247, 243, .62);
}

.fob-mode-arrow {
    color: rgba(224, 241, 236, .24);
    font-size: 14px;
}

.fob-mode-btn.is-active .fob-mode-arrow {
    color: var(--orange);
}

.fob-sidebar-note {
    display: flex;
    gap: 9px;
    margin-top: 24px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    background: rgba(255, 255, 255, .035);
}

.fob-dot {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    margin-top: 5px;
    border-radius: 50%;
    background: #e3c47b;
    box-shadow: 0 0 0 4px rgba(227, 196, 123, .10);
}

.fob-sidebar-note p {
    margin: 0;
    color: rgba(224, 241, 236, .55);
    font-size: 10.5px;
    line-height: 1.65;
}

.fob-sidebar-note b {
    color: #f5e8c8;
    font-weight: 700;
}

.fob-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
    padding-top: 22px;
}

.fob-sidebar-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    color: rgba(224, 241, 236, .58);
    font-size: 10.5px;
    text-decoration: none;
    transition: color .18s ease;
}

.fob-sidebar-links a:hover {
    color: #fff;
}

.fob-sidebar-links a span {
    color: var(--orange);
    font-size: 12px;
}

.fob-sidebar-foot {
    margin: 14px 0 0;
    color: rgba(224, 241, 236, .28);
    font-size: 9px;
    line-height: 1.6;
}

/* ---------------- main ---------------- */

.fob-main {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 34px 46px 38px;
}

.fob-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    padding: 18px 0 30px;
}

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

.fob-topbar h1 {
    margin: 12px 0 0;
    font-size: clamp(34px, 4.3vw, 62px);
    font-weight: 800;
    letter-spacing: -.055em;
    line-height: 1.08;
}

.fob-topbar h1 em {
    color: var(--orange);
    font-style: normal;
}

.fob-lede {
    max-width: 590px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}

.fob-rate-pill {
    flex: 0 0 auto;
    min-width: 132px;
    padding: 14px 16px;
    border: 1px solid rgba(13, 42, 49, .10);
    border-radius: 14px;
    background: rgba(255, 253, 248, .7);
    box-shadow: 0 8px 22px rgba(13, 42, 49, .05);
}

.fob-rate-pill span {
    display: block;
    color: var(--muted-2);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: .12em;
}

.fob-rate-pill strong {
    display: block;
    margin: 3px 0 2px;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 24px;
    letter-spacing: -.02em;
}

.fob-rate-pill small {
    color: #9a7a34;
    font-size: 9px;
}

/* ---------------- cards ---------------- */

.fob-calc-card,
.fob-formula-section,
.fob-links-section {
    border: 1px solid rgba(13, 42, 49, .09);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.fob-calc-card {
    padding: 28px 30px 30px;
}

.fob-formula-section,
.fob-links-section {
    margin-top: 22px;
    padding: 28px 30px 30px;
    box-shadow: 0 12px 32px rgba(13, 42, 49, .05);
}

.fob-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 20px;
}

.fob-section-head h2 {
    margin: 7px 0 0;
    font-size: 24px;
    letter-spacing: -.04em;
}

.fob-section-note {
    max-width: 420px;
    margin: 0;
    color: var(--muted-2);
    font-size: 10.5px;
    line-height: 1.65;
    text-align: right;
}

.fob-calc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(340px, .94fr);
    gap: 24px;
    align-items: start;
}

/* ---------------- form ---------------- */

.fob-form {
    min-width: 0;
}

.fob-rate-box {
    margin-bottom: 18px;
    padding: 13px;
    border: 1px solid rgba(31, 122, 112, .16);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(31, 122, 112, .055), rgba(255, 253, 248, .4));
}

.fob-rate-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.fob-currency-field {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    min-width: 132px;
}

.fob-currency-field > span {
    color: var(--muted-2);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: .08em;
}

.fob-currency-field select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid rgba(31, 122, 112, .24);
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.fob-live-rate {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.fob-live-rate span {
    color: var(--muted);
    font-size: 9px;
}

.fob-live-rate b {
    color: var(--teal);
    font-family: var(--mono);
    font-size: 21px;
    letter-spacing: -.04em;
}

.fob-live-rate small {
    color: var(--muted-2);
    font-family: var(--mono);
    font-size: 8px;
}

.fob-live-rate small.is-fallback {
    color: var(--warning);
}

.fob-rate-choice {
    margin-left: auto;
    padding: 4px 8px;
    border-radius: 99px;
    background: var(--teal-soft);
    color: var(--teal);
    font-family: var(--mono);
    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
}

.fob-rate-choice.is-user {
    border: 1px solid rgba(182, 70, 52, .25);
    background: var(--danger-bg);
    color: var(--danger);
}

.fob-rate-options {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 9px 14px;
    margin-top: 10px;
}

.fob-rate-mode,
.fob-fixed-field {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    min-width: 180px;
}

.fob-rate-mode > span,
.fob-fixed-field > span {
    color: var(--muted-2);
    font-size: 8px;
    font-weight: 650;
}

.fob-rate-mode select,
.fob-fixed-field input {
    height: 34px;
    padding: 0 9px;
    border: 1px solid #d8dfd6;
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    font-size: 11px;
}

.fob-rate-mode select:disabled {
    opacity: .45;
    background: #f3f4f0;
}

.fob-fixed-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    color: var(--muted);
    font-size: 9.5px;
    cursor: pointer;
}

.fob-fixed-check input {
    accent-color: var(--danger);
}

.fob-fixed-check.is-user {
    color: var(--danger);
    font-weight: 700;
}

.fob-fixed-field input {
    border-color: rgba(182, 70, 52, .35);
    background: #fff8f5;
    color: var(--danger);
    font-weight: 700;
}

.fob-fixed-field input.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(182, 70, 52, .09);
}

.fob-rate-note {
    margin: 8px 0 0;
    color: var(--muted-2);
    font-size: 8.5px;
    line-height: 1.55;
}

.fob-vote-note {
    margin: 5px 0 0;
    color: #9a7a34;
    font-family: var(--mono);
    font-size: 7.5px;
    line-height: 1.5;
}

.fob-rate-error {
    margin: 7px 0 0;
    color: var(--danger);
    font-size: 9px;
}

.fob-form-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.fob-step {
    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(--mono);
    font-size: 9px;
    font-weight: 800;
}

.fob-form-title h3 {
    margin: 0;
    font-size: 16px;
    letter-spacing: -.02em;
}

.fob-form-title p {
    margin: 4px 0 0;
    color: var(--muted-2);
    font-size: 10.5px;
    line-height: 1.6;
}

.fob-field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.fob-field {
    position: relative;
    display: block;
    margin-top: 12px;
}

.fob-field-row .fob-field {
    margin-top: 0;
}

.fob-field-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 6px;
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 700;
}

.fob-field-label em {
    color: var(--muted-2);
    font-style: normal;
    font-size: 9px;
    font-weight: 500;
}

.fob-required {
    color: var(--orange);
    font-size: 12px;
}

.fob-optional {
    color: var(--muted-2);
    font-size: 8.5px;
    font-weight: 500;
}

.fob-ref-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border: 1px solid rgba(154, 106, 23, .22);
    border-radius: 99px;
    background: #fff6dc;
    color: var(--warning);
    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
}

.fob-field input,
.fob-field select {
    width: 100%;
    height: 45px;
    padding: 0 12px;
    border: 1px solid #d8dfd6;
    border-radius: 10px;
    outline: 0;
    background: #fff;
    color: var(--ink);
    font-size: 15px;
    font-weight: 650;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.fob-field input::placeholder {
    color: #b7c1bb;
    font-weight: 500;
}

.fob-field input:focus,
.fob-field select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(31, 122, 112, .10);
}

.fob-field small {
    display: block;
    margin-top: 5px;
    color: var(--muted-2);
    font-size: 10px;
    line-height: 1.55;
}

.fob-field.is-reference input {
    border-color: #d7b766;
    background: #fff9e8;
    box-shadow: inset 3px 0 0 #d7b766;
}

.fob-field.is-reference .fob-field-label {
    color: #7f6020;
}

.fob-field.is-edited input {
    border-color: var(--teal);
    background: #fff;
    box-shadow: inset 3px 0 0 var(--teal);
}

.fob-field.is-edited .fob-ref-badge {
    border-color: rgba(31, 122, 112, .18);
    background: var(--teal-soft);
    color: var(--teal);
}

.fob-field.is-disabled {
    opacity: .55;
}

.fob-field-note {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 45px;
    padding: 7px 11px;
    border: 1px dashed rgba(31, 122, 112, .22);
    border-radius: 10px;
    background: rgba(31, 122, 112, .035);
}

.fob-field-note strong {
    font-size: 11px;
    color: var(--teal);
}

.fob-field-note small {
    margin-top: 2px;
    font-family: var(--mono);
    font-size: 8.5px;
}

.fob-form-note {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 14px;
    padding: 11px 12px;
    border-left: 2px solid var(--teal);
    background: rgba(31, 122, 112, .05);
    color: var(--muted);
    font-size: 9.5px;
    line-height: 1.6;
}

.fob-form-note b {
    color: var(--teal);
    font-size: 10px;
}

.fob-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.fob-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

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

.fob-btn-primary {
    flex: 1;
    max-width: 235px;
    background: var(--orange);
    color: #fff;
    box-shadow: 0 10px 24px rgba(231, 111, 81, .24);
}

.fob-btn-primary:hover {
    background: var(--orange-dark);
}

.fob-btn-primary:disabled {
    opacity: .6;
    cursor: wait;
}

.fob-btn-ghost {
    border-color: var(--line);
    background: transparent;
    color: var(--muted);
}

.fob-btn-ghost:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.fob-form-error {
    margin: 10px 0 0;
    padding: 9px 11px;
    border: 1px solid rgba(182, 70, 52, .18);
    border-radius: 8px;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 10px;
}

.fob-form-foot {
    margin: 10px 0 0;
    color: var(--muted-2);
    font-size: 8.5px;
    text-align: right;
}

/* ---------------- result ---------------- */

.fob-result-panel {
    position: sticky;
    top: 24px;
    min-height: 430px;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(circle at 78% 12%, rgba(231, 111, 81, .18), transparent 13rem),
        radial-gradient(circle at 12% 92%, rgba(42, 157, 143, .12), transparent 15rem),
        #0c252b;
    color: #e9f4ee;
    box-shadow: 0 22px 44px rgba(8, 30, 35, .18);
}

.fob-result-empty,
.fob-result-loading,
.fob-result {
    padding: 28px 26px;
}

.fob-result-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 430px;
}

.fob-result-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 15px;
    background: rgba(255, 255, 255, .04);
}

.fob-result-icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: var(--orange);
    stroke-width: 1.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fob-result-empty .fob-kicker,
.fob-result .fob-kicker {
    color: rgba(224, 241, 236, .45);
}

.fob-result-empty h3 {
    margin: 12px 0 10px;
    font-size: 27px;
    letter-spacing: -.04em;
    line-height: 1.15;
}

.fob-result-empty p:last-child {
    max-width: 300px;
    margin: 0;
    color: rgba(224, 241, 236, .48);
    font-size: 10.5px;
    line-height: 1.7;
}

.fob-result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 430px;
    color: rgba(224, 241, 236, .65);
    font-size: 11px;
}

.fob-spinner {
    width: 28px;
    height: 28px;
    margin-bottom: 12px;
    border: 2px solid rgba(255, 255, 255, .16);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: fob-spin .8s linear infinite;
}

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

.fob-result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.fob-result-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 9px;
}

.fob-result-tag {
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 99px;
    color: rgba(224, 241, 236, .65);
    font-family: var(--mono);
    font-size: 8px;
    white-space: nowrap;
}

.fob-price-digits {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(224, 241, 236, .7);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: .04em;
    white-space: nowrap;
}

.fob-price-digits select {
    padding: 2px 3px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    background-color: #172623;
    color: #e6f3ef;
    color-scheme: dark;
    font-family: var(--mono);
    font-size: 9px;
    line-height: 1.2;
    cursor: pointer;
}

.fob-price-digits select option {
    background-color: #172623;
    color: #e6f3ef;
}

.fob-price-digits select:focus {
    outline: 1px solid rgba(255, 155, 127, .55);
    outline-offset: 1px;
}

.fob-result-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 8px;
}

.fob-result-price span {
    color: #ff9b7f;
    font-family: var(--mono);
    font-size: clamp(34px, 3.4vw, 48px);
    font-weight: 800;
    letter-spacing: -.06em;
    line-height: 1;
}

.fob-result-price small {
    color: rgba(224, 241, 236, .46);
    font-family: var(--mono);
    font-size: 9px;
}

.fob-result-total {
    margin: 11px 0 0;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    color: rgba(224, 241, 236, .62);
    font-size: 11px;
}

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

.fob-metric {
    min-width: 0;
    padding: 10px 10px 9px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 9px;
    background: rgba(255, 255, 255, .035);
}

.fob-metric span {
    display: block;
    color: rgba(224, 241, 236, .42);
    font-size: 9px;
    line-height: 1.4;
}

.fob-metric strong {
    display: block;
    margin-top: 3px;
    color: #f0f8f3;
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
    word-break: break-all;
}

.fob-metric strong.is-orange {
    color: #ff9b7f;
}

.fob-metric strong.is-teal {
    color: #7fd1bf;
}

.fob-profit-line {
    margin-top: 14px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 9px;
    background: rgba(255, 255, 255, .035);
}

.fob-profit-line > span {
    color: rgba(224, 241, 236, .42);
    font-size: 8px;
}

.fob-profit-line strong {
    display: block;
    margin-top: 3px;
    color: #f0f8f3;
    font-family: var(--mono);
    font-size: 13px;
}

.fob-profit-bar {
    height: 4px;
    margin-top: 9px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255, 255, 255, .09);
}

.fob-profit-bar i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #e3c47b, #ff9b7f);
    transition: width .35s ease;
}

.fob-result-warnings {
    margin-top: 12px;
    padding: 9px 10px;
    border: 1px solid rgba(227, 196, 123, .18);
    border-radius: 8px;
    background: rgba(227, 196, 123, .07);
    color: #f0d99f;
    font-size: 9px;
    line-height: 1.6;
}

.fob-result-warnings p {
    margin: 0;
}

.fob-result-warnings p + p {
    margin-top: 4px;
}

.fob-result-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: rgba(224, 241, 236, .32);
    font-size: 8px;
    line-height: 1.5;
}

.fob-text-btn {
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    background: none;
    color: #ffb29d;
    font-size: 8.5px;
    cursor: pointer;
}

/* ---------------- formulas ---------------- */

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

.fob-formula-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
}

.fob-formula-card.is-accent {
    border-color: rgba(231, 111, 81, .22);
    background: #fff8f3;
}

.fob-formula-card > span {
    color: var(--teal);
    font-family: var(--mono);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .1em;
}

.fob-formula-card.is-accent > span {
    color: var(--orange-dark);
}

.fob-formula-card h3 {
    margin: 7px 0 7px;
    font-size: 14px;
    letter-spacing: -.02em;
}

.fob-formula-card p {
    margin: 0 0 9px;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.65;
}

.fob-formula-card code {
    display: block;
    margin: 5px 0;
    padding: 7px 9px;
    border-radius: 6px;
    background: #f4f6f2;
    color: var(--ink-2);
    font-family: var(--mono);
    font-size: 10px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.fob-formula-card.is-accent code {
    background: #ffefe8;
}

.fob-formula-card small {
    display: block;
    margin-top: 8px;
    color: var(--muted-2);
    font-size: 9.5px;
    line-height: 1.55;
}

/* ---------------- links ---------------- */

.fob-links-section {
    padding-bottom: 24px;
}

.fob-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 10px;
}

.fob-link-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 86px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    transition: border-color .16s ease, transform .16s ease;
}

.fob-link-card:hover {
    border-color: rgba(31, 122, 112, .35);
    transform: translateY(-2px);
}

.fob-link-card span {
    color: var(--ink);
    font-size: 12px;
    font-weight: 750;
}

.fob-link-card small {
    color: var(--muted-2);
    font-size: 9.5px;
    line-height: 1.5;
}

.fob-link-card b {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--orange);
    font-size: 13px;
    font-weight: 500;
}

.fob-assumptions {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(154, 106, 23, .18);
    border-radius: 14px;
    background: #fffbf1;
}

.fob-assumptions-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.fob-assumptions-head h3 {
    margin: 5px 0 0;
    font-size: 16px;
    letter-spacing: -.03em;
}

.fob-assumption-badge {
    padding: 4px 7px;
    border: 1px solid rgba(154, 106, 23, .18);
    border-radius: 99px;
    color: var(--warning);
    font-family: var(--mono);
    font-size: 7.5px;
    font-weight: 700;
    white-space: nowrap;
}

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

.fob-assumption-item {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(154, 106, 23, .14);
    color: var(--muted);
    font-size: 9px;
    line-height: 1.55;
}

.fob-assumption-item span {
    flex: 0 0 auto;
    color: #9a7a34;
    font-size: 8.5px;
}

.fob-assumption-item b {
    color: var(--ink-2);
    font-weight: 700;
    word-break: break-word;
}

.fob-assumption-warning {
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid rgba(154, 106, 23, .16);
    color: #7f6020;
    font-size: 9px;
    line-height: 1.65;
}

.fob-assumption-warning b {
    color: var(--danger);
}

.fob-assumption-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 11px;
}

.fob-assumption-actions .fob-btn {
    flex: 0 0 auto;
    max-width: none;
    min-height: 36px;
    font-size: 10px;
}

.fob-share-status {
    color: var(--teal);
    font-size: 9px;
}

.fob-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 4px 4px;
    color: var(--muted-2);
    font-family: var(--mono);
    font-size: 8px;
}

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

@media (max-width: 1180px) {
    .fob-main {
        padding-right: 28px;
        padding-left: 28px;
    }

    .fob-calc-grid {
        grid-template-columns: minmax(0, 1fr) minmax(310px, .88fr);
    }

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

@media (max-width: 900px) {
    .fob-app {
        display: block;
    }

    .fob-sidebar {
        position: static;
        display: block;
        height: auto;
        padding: 17px 18px;
        overflow: visible;
    }

    .fob-brand {
        margin-bottom: 14px;
    }

    .fob-sidebar-label {
        display: none;
    }

    .fob-mode-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .fob-mode-btn {
        padding: 10px;
    }

    .fob-sidebar-note,
    .fob-sidebar-foot {
        display: none;
    }

    .fob-sidebar-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px 14px;
        margin-top: 13px;
        padding-top: 0;
    }

    .fob-sidebar-links a {
        padding: 4px 0;
        border: 0;
        font-size: 9px;
    }

    .fob-main {
        padding: 20px 16px 28px;
    }

    .fob-topbar {
        align-items: flex-start;
        padding: 8px 0 22px;
    }

    .fob-topbar h1 {
        font-size: clamp(31px, 7vw, 46px);
    }

    .fob-rate-pill {
        display: none;
    }

    .fob-calc-card,
    .fob-formula-section,
    .fob-links-section {
        padding: 20px 16px;
        border-radius: 18px;
    }

    .fob-section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .fob-section-note {
        text-align: left;
    }

    .fob-calc-grid {
        grid-template-columns: 1fr;
    }

    .fob-result-panel {
        position: static;
        min-height: 0;
    }

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

    .fob-formula-grid {
        grid-template-columns: 1fr;
    }

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

    .fob-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding-top: 20px;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 12mm;
    }

    body {
        background: #fff;
    }

    .fob-sidebar,
    .fob-topbar,
    .fob-form-wrap,
    .fob-formula-section,
    .fob-links-section,
    .fob-footer,
    .fob-assumption-actions,
    .fob-price-digits,
    .fob-text-btn {
        display: none !important;
    }

    .fob-app {
        display: block;
    }

    .fob-main {
        max-width: none;
        padding: 0;
    }

    .fob-calc-card {
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .fob-section-head {
        display: none;
    }

    .fob-calc-grid {
        display: block;
    }

    .fob-result-panel {
        position: static;
        min-height: 0;
        border: 1px solid #ccc;
        background: #fff !important;
        color: #111;
        box-shadow: none;
    }

    .fob-result-empty,
    .fob-result-loading {
        display: none !important;
    }

    .fob-result {
        display: block !important;
        padding: 14px;
    }

    .fob-result .fob-kicker {
        color: #666;
    }

    .fob-result-price span {
        color: #b64634;
    }

    .fob-result-price small,
    .fob-result-total,
    .fob-result-foot,
    .fob-metric span,
    .fob-result-tag,
    .fob-profit-line > span {
        color: #555;
    }

    .fob-result-tag {
        border-color: #ccc;
    }

    .fob-metric {
        border-color: #ddd;
        background: #f7f7f7;
    }

    .fob-metric strong,
    .fob-profit-line strong {
        color: #111;
    }

    .fob-profit-line {
        border-color: #ddd;
        background: #f7f7f7;
    }

    .fob-result-warnings {
        color: #7f6020;
        background: #fff8e7;
    }

    .fob-assumptions {
        margin-top: 14px;
        border-color: #ccc;
        background: #fff;
        break-inside: avoid;
    }

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

@media (max-width: 560px) {
    .fob-rate-main {
        align-items: flex-start;
    }

    .fob-rate-choice {
        margin-left: 0;
    }

    .fob-rate-mode,
    .fob-fixed-field {
        min-width: 100%;
    }

    .fob-sidebar {
        padding: 14px 13px;
    }

    .fob-mode-copy small {
        font-size: 8.5px;
    }

    .fob-mode-no {
        display: none;
    }

    .fob-main {
        padding: 16px 10px 24px;
    }

    .fob-topbar h1 {
        font-size: 32px;
    }

    .fob-lede {
        font-size: 11.5px;
    }

    .fob-field-row {
        grid-template-columns: 1fr;
    }

    .fob-field input,
    .fob-field select {
        height: 48px;
        font-size: 16px;
    }

    .fob-form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .fob-btn-primary {
        max-width: none;
    }

    .fob-btn-ghost {
        order: 2;
    }

    .fob-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .fob-result-price span {
        font-size: 39px;
    }

    .fob-link-grid {
        grid-template-columns: 1fr;
    }

    .fob-formula-card code {
        font-size: 8.5px;
    }
}

