/* ════════════════════════════════════════════════════════════════════════════
   DIPTRADE CALCULATOR — v3
   Font: Onest + JetBrains Mono
   ════════════════════════════════════════════════════════════════════════════ */

/* ── TOKENS ──────────────────────────────────────────────────────────────── */
:root {
    --bg:          #F0F0F0;
    --surface:     #FFFFFF;
    --surface-2:   #EBEBEB;
    --ink:         #0C0D0F;
    --ink-2:       #3A3B3E;
    --muted:       #909196;
    --line:        #E2E2E2;
    --line-strong: #CACACA;
    --accent:      #2B6FED;
    --accent-soft: #EBF2FF;
    --accent-text: #1A52BF;
    --success:     #18A067;
    --warn:        #B87200;
    --warn-bg:     #FFF8E6;
    --warn-line:   #EDD07A;
    --error:       #C23030;
    --error-bg:    #FFF0F0;
    --error-line:  #EDA8A8;
    --header-h:    52px;
    --rates-h:     38px;
    --r:           10px;
    --r-sm:        7px;
}

[data-theme="dark"] {
    --bg:          #111214;
    --surface:     #18191D;
    --surface-2:   #202228;
    --ink:         #EDECEA;
    --ink-2:       #AEACAA;
    --muted:       #5E5F65;
    --line:        #27292E;
    --line-strong: #35373E;
    --accent:      #4D8EFF;
    --accent-soft: #172040;
    --accent-text: #7AADFF;
    --success:     #2EC47E;
    --warn:        #D4950A;
    --warn-bg:     rgba(212,149,10,.1);
    --warn-line:   rgba(212,149,10,.3);
    --error:       #E05555;
    --error-bg:    rgba(224,85,85,.1);
    --error-line:  rgba(224,85,85,.3);
}

/* ── RESET ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Onest", "Segoe UI", system-ui, sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background .25s, color .25s;
}
h1,h2,h3,h4,p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }

.mono { font-family: "JetBrains Mono", "IBM Plex Mono", monospace; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.hidden { display: none !important; }

/* ── HEADER ──────────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    transition: background .25s, border-color .25s;
}

.header-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-label {
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
    white-space: nowrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.header-date {
    text-align: left;
    font-size: 0.68rem;
    line-height: 1.1;
    color: var(--muted);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

/* ── SEGMENTED THEME TOGGLE ──────────────────────────────────────────────── */
.theme-seg {
    position: relative;
    display: flex;
    align-items: center;
    height: 32px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: var(--surface-2);
    padding: 3px;
    gap: 0;
    cursor: pointer;
    user-select: none;
    transition: border-color .2s, background .25s;
}
.theme-seg:hover { border-color: var(--line-strong); }

.theme-seg__slider {
    position: absolute;
    top: 3px;
    left: 3px;
    height: calc(100% - 6px);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    transition: transform .28s cubic-bezier(.34,1.56,.64,1), width .2s ease, background .25s;
    z-index: 0;
    pointer-events: none;
}

[data-theme="dark"] .theme-seg__slider {
    box-shadow: 0 1px 3px rgba(0,0,0,.4);
}

.theme-seg__opt {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 100%;
    border-radius: 999px;
    color: var(--muted);
    transition: color .2s;
}
.theme-seg__opt svg { width: 13px; height: 13px; flex-shrink: 0; }

/* active option highlighted */
[data-theme="light"] #themeOptLight,
[data-theme="dark"]  #themeOptDark  { color: var(--ink); }

/* ── STATUS CHIP ─────────────────────────────────────────────────────────── */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 9px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    transition: border-color .2s, background .2s, color .2s;
}

.status-chip__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--muted);
    flex-shrink: 0;
    transition: background .2s;
}

/* hide hint text by default — only show meaningful states */
.status-chip__hint { display: none; }

.status-chip.is-online { border-color: rgba(24,160,103,.3); color: var(--success); }
.status-chip.is-online .status-chip__dot { background: var(--success); }
.status-chip.is-offline { border-color: rgba(194,48,48,.3); color: var(--error); }
.status-chip.is-offline .status-chip__dot { background: var(--error); }

/* ── RATES BAR ───────────────────────────────────────────────────────────── */
.rates-bar {
    height: var(--rates-h);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    transition: background .25s, border-color .25s;
}

.rates-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}
.rates-inner::-webkit-scrollbar { display: none; }

.rates-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
}

.rate-item {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.rate-item__label {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 500;
}

.rate-item__value {
    font-size: 0.78rem;
    font-weight: 600;
    font-family: "JetBrains Mono", monospace;
}

.rate-item__date {
    font-size: 0.66rem;
    color: var(--muted);
}
.rate-item__date:empty { display: none; }

.rate-item__date--aged {
    color: var(--warn);
    font-weight: 600;
}

.rate-item--muted {
    opacity: 0.62;
}

.rate-item--muted .rate-item__value {
    font-weight: 500;
}

.rates-sep { color: var(--line-strong); user-select: none; flex-shrink: 0; }

.rates-meta {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--muted);
    white-space: nowrap;
}
.rates-meta:empty { display: none; }

/* ── PAGE LAYOUT ─────────────────────────────────────────────────────────── */
.page-main {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 24px 60px;
}

.page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

/* ── FORM BLOCKS ─────────────────────────────────────────────────────────── */
.form-block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 18px;
    display: grid;
    gap: 13px;
    margin-bottom: 10px;
    transition: background .25s, border-color .25s;
}

.block-title {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

.field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.field__label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--ink-2);
    transition: color .25s;
}

.field input,
.field select {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    font-size: 0.86rem;
    transition: border-color .15s, box-shadow .15s, background .25s, color .25s;
    appearance: none;
}

.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath fill='%23909196' d='M6 7L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    padding-right: 30px;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(43,111,237,.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.purchase-row {
    display: grid;
    grid-template-columns: minmax(240px, 1.7fr) minmax(150px, 0.8fr) minmax(180px, 1fr);
    gap: 10px;
    align-items: end;
}

.form-row > *,
.purchase-row > *,
.param-row > * {
    min-width: 0;
}

.param-row {
    display: grid;
    gap: 10px;
}

.param-row--meta {
    grid-template-columns: minmax(120px, 0.9fr) minmax(100px, 0.75fr) minmax(150px, 1fr);
}

.param-row--tech {
    grid-template-columns: minmax(170px, 1.2fr) minmax(120px, 0.9fr) minmax(120px, 0.85fr) minmax(160px, 1fr);
}

/* Money input */
.money-field {
    position: relative;
    min-width: 0;
}

.money-field input {
    padding-right: 54px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.96rem;
    font-weight: 600;
    letter-spacing: -.01em;
}

.money-field__cur {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-text);
    background: var(--accent-soft);
    border: 1px solid var(--line);
    border-left: 0;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    pointer-events: none;
    transition: background .25s, color .25s, border-color .25s;
}

/* Segmented country switcher */
.country-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.seg-ctrl {
    display: flex;
    flex: 1;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--surface-2);
    transition: background .25s, border-color .25s;
}

.seg-ctrl__btn {
    flex: 1;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.seg-ctrl__btn-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.seg-ctrl__flag {
    width: 18px;
    height: 18px;
    object-fit: cover;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.seg-ctrl__btn + .seg-ctrl__btn { border-left: 1px solid var(--line); }

.seg-ctrl__btn.is-active {
    background: var(--accent);
    color: #fff;
}

.encar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    cursor: pointer;
    transition: border-color .15s, background .15s, opacity .15s;
}

.encar-toggle input[type="checkbox"] {
    display: none;
}

.encar-toggle__mark {
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--line-strong);
    border-radius: 4px;
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, background .15s;
}

.encar-toggle input:checked + .encar-toggle__mark {
    background: var(--accent);
    border-color: var(--accent);
}

.encar-toggle input:checked + .encar-toggle__mark::after {
    content: '';
    width: 4px;
    height: 7px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
    display: block;
}

.encar-toggle__logo {
    width: auto;
    height: 13px;
    opacity: 0.82;
}

.encar-toggle.is-disabled {
    opacity: 0.48;
    cursor: default;
}

.form-row--lot {
    grid-template-columns: minmax(0, 1fr) 200px;
    align-items: end;
}

/* Checkbox */
.check-field {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font-size: 0.83rem;
    color: var(--ink-2);
    user-select: none;
    transition: color .25s;
}

.check-field input[type="checkbox"] { display: none; }

.check-field__mark {
    width: 17px;
    height: 17px;
    border: 1.5px solid var(--line-strong);
    border-radius: 5px;
    background: var(--surface);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, background .15s;
}

.check-field input:checked + .check-field__mark {
    background: var(--accent);
    border-color: var(--accent);
}

.check-field input:checked + .check-field__mark::after {
    content: '';
    width: 5px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
    display: block;
}

/* ── FORM ACTIONS ────────────────────────────────────────────────────────── */
.form-actions { display: flex; gap: 8px; }

.btn-primary {
    appearance: none;
    height: 44px;
    padding: 0 22px;
    border: none;
    border-radius: var(--r-sm);
    background: var(--accent);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .15s, transform .1s, background .25s;
    flex: 1;
}
.btn-primary:hover { opacity: .88; }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.btn-ghost {
    appearance: none;
    height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink-2);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .25s;
}
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface-2); }

.btn-ghost--lot {
    width: 100%;
    white-space: nowrap;
}

/* ── RESULT COLUMN ───────────────────────────────────────────────────────── */
.result-sticky {
    position: static;
    top: auto;
    display: grid;
    gap: 10px;
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

/* Alerts */
.msg {
    padding: 11px 14px;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    font-size: 0.82rem;
    line-height: 1.55;
}
.msg--error { background: var(--error-bg); border-color: var(--error-line); color: var(--error); }
.msg--warn  { background: var(--warn-bg);  border-color: var(--warn-line);  color: var(--warn);  }

/* ── TOTAL BLOCK — variant C ─────────────────────────────────────────────── */
.total-block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: var(--r);
    padding: 18px 18px 16px 16px;
    transition: background .25s, border-color .25s;
}

.total-block__label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
    transition: color .25s;
}

.total-block__value {
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1;
    color: var(--accent);
    transition: color .25s;
}

.total-block__hint {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--muted);
    transition: color .25s;
}

/* ── TWIN METRICS ────────────────────────────────────────────────────────── */
.twin-metrics {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 10px;
}

.twin-metric {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 13px;
    display: grid;
    gap: 2px;
    min-width: 0;
    transition: background .25s, border-color .25s;
}

.twin-metric--wide {
    gap: 4px;
}

.twin-metric__label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    transition: color .25s;
}

.twin-metric__value {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.96rem;
    font-weight: 600;
    margin-top: 4px;
}

.twin-metric__sub {
    font-size: 0.68rem;
    color: var(--muted);
    transition: color .25s;
}

/* ── PAYMENTS GRID ───────────────────────────────────────────────────────── */
.payments-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    background: var(--surface);
    transition: background .25s, border-color .25s;
}

.payment-cell {
    padding: 11px 12px 10px;
    display: grid;
    gap: 4px;
    border-right: 1px solid var(--line);
    min-width: 0;
    transition: border-color .25s;
}
.payment-cell:last-child { border-right: none; }

.payment-cell span {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    transition: color .25s;
}

.payment-cell strong {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
    font-weight: 600;
}

.payment-cell--accent {
    background: var(--accent-soft);
}

.payment-cell--accent span {
    color: var(--accent-text);
}

.payment-cell--accent strong {
    font-weight: 700;
    color: var(--accent-text);
}

/* ── BREAKDOWN ───────────────────────────────────────────────────────────── */
.breakdown {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    transition: background .25s, border-color .25s;
}

.breakdown__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    transition: border-color .25s;
}

.breakdown__title {
    font-size: 0.76rem;
    font-weight: 700;
}

.breakdown__count {
    font-size: 0.68rem;
    color: var(--muted);
    background: var(--surface-2);
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    transition: background .25s, border-color .25s, color .25s;
}

.breakdown__list { display: grid; }

/* JS-injected entries */
.breakdown-entry {
    padding: 9px 14px;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 3px;
    transition: border-color .25s;
}
.breakdown-entry:last-child { border-bottom: none; }

.breakdown-entry__top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}

.breakdown-entry__top > * {
    min-width: 0;
}

.breakdown-entry__label { font-size: 0.8rem; font-weight: 600; }

.breakdown-entry__value {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--accent-text);
    transition: color .25s;
}

[data-theme="dark"] .breakdown-entry__value { color: var(--accent); }

.breakdown-entry__detail {
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.5;
    transition: color .25s;
}

/* ── SHARE BLOCK ─────────────────────────────────────────────────────────── */
.share-block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    transition: background .25s, border-color .25s;
}

.share-block__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    font-size: 0.76rem;
    font-weight: 700;
    transition: border-color .25s;
}

.btn-copy {
    appearance: none;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    color: var(--ink-2);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 11px;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.btn-copy:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-copy:disabled { opacity: .38; cursor: not-allowed; }

.share-textarea {
    display: block;
    width: 100%;
    min-height: 160px;
    padding: 12px 14px;
    border: none;
    background: transparent;
    color: var(--ink);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.76rem;
    line-height: 1.65;
    resize: vertical;
    outline: none;
    transition: color .25s;
}

#shareSummary {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.share-status {
    padding: 7px 14px 9px;
    font-size: 0.72rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
    min-height: 30px;
    transition: border-color .25s, color .25s;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
    .page-grid { grid-template-columns: 1fr; }
    .result-sticky { position: static; max-height: none; overflow: visible; }
    .rates-bar {
        height: auto;
        padding: 10px 0;
    }
    .rates-inner {
        height: auto;
        overflow: visible;
        flex-wrap: wrap;
        gap: 8px;
        align-items: stretch;
    }
    .rates-title,
    .rates-meta {
        width: 100%;
    }
    .rates-sep {
        display: none;
    }
    .rate-item {
        padding: 7px 10px;
        border: 1px solid var(--line);
        border-radius: var(--r-sm);
        background: var(--surface-2);
    }
}

@media (max-width: 1240px) {
    .purchase-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    .purchase-row__title {
        grid-column: 1 / -1;
    }
    .param-row--tech {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .site-header {
        height: auto;
    }
    .page-main { padding: 14px 14px 40px; }
    .header-inner,
    .rates-inner { padding: 0 14px; }
    .header-inner {
        padding-top: 10px;
        padding-bottom: 10px;
        height: auto;
        min-height: 0;
        gap: 8px;
    }
    .header-brand {
        gap: 8px;
    }
    .brand-logo {
        width: 24px;
        height: 24px;
    }
    .brand-label {
        font-size: 0.76rem;
    }
    .header-right {
        width: auto;
        gap: 6px;
    }
    .header-date {
        font-size: 0.64rem;
        line-height: 1.15;
    }
    .theme-seg {
        height: 32px;
    }
    .theme-seg__opt {
        width: 26px;
    }
    .status-chip {
        height: 32px;
        padding: 0 8px;
        white-space: nowrap;
    }
    #apiStatus {
        font-size: 0;
        line-height: 0;
    }
    #apiStatus::after {
        content: "API";
        font-size: 0.68rem;
        line-height: 1;
    }
    .rates-bar {
        padding: 8px 0;
    }
    .rates-inner {
        height: auto;
        flex-wrap: nowrap;
        overflow-x: auto;
        align-items: center;
        gap: 10px;
        scrollbar-width: none;
    }
    .rates-title,
    .rates-meta { display: none; }
    .rates-sep { display: block; }
    .rate-item {
        padding: 0;
        border: none;
        border-radius: 0;
        background: transparent;
        gap: 4px;
    }
    .rate-item__label {
        font-size: 0.64rem;
    }
    .rate-item__value {
        font-size: 0.74rem;
    }
    .rate-item__date {
        font-size: 0.62rem;
    }
    .country-row {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    .seg-ctrl {
        min-width: 0;
    }
    .encar-toggle {
        height: 34px;
        padding: 0 8px;
        gap: 5px;
    }
    .encar-toggle__mark {
        width: 13px;
        height: 13px;
    }
    .encar-toggle__logo {
        height: 12px;
    }
    .form-row { grid-template-columns: 1fr; }
    .purchase-row { grid-template-columns: 1fr; }
    .param-row--meta,
    .param-row--tech { grid-template-columns: 1fr; }
    .form-row--lot { grid-template-columns: 1fr; }
    .payments-grid { grid-template-columns: 1fr 1fr; }
    .payment-cell:nth-child(2) { border-right: none; }
    .payment-cell:nth-child(3),
    .payment-cell:nth-child(4) { border-top: 1px solid var(--line); }
    .twin-metrics { grid-template-columns: 1fr; }
    .seg-ctrl__btn { font-size: 0.8rem; }
    .seg-ctrl__btn-content { gap: 6px; }
}
