/* ==========================================================================
   Metric Conversions – shared calculator styles
   Loaded after main/mobile CSS on every calculator page. Everything is scoped
   to .calc-* class names so nothing here leaks into the rest of the site.
   ========================================================================== */

:root {
    --calc-teal: #3e7589;
    --calc-teal-dark: #2f5f73;
    --calc-ink: #1f2933;
    --calc-muted: #52606d;
    --calc-line: #cfd4d9;
    --calc-soft: #f3f5f7;
    --calc-focus: #ffd166;
    --calc-editable: #fff9dc;      /* pale yellow: anything you can type in */
    --calc-editable-line: #8a6d1f;
    --calc-blue: #6c8ef0;
    --calc-green: #3bb55a;
    --calc-amber: #f2a541;
    --calc-red: #c93a3a;
}

/* ---- Teal input panel ---------------------------------------------------- */
#userConvert.calc-panel {
    padding: 18px 5% 22px;
    box-sizing: border-box;
    line-height: 1.4;
}
.calc-panel h2,
.calc-panel .calc-label {
    display: block;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 0 0 8px !important;
    padding: 0;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    line-height: 1.3;
}
.calc-panel p.calc-intro {
    color: #fff;
    font-size: 15px;
    margin: 0 0 14px;
}

/* Segmented control (unit toggle, mode tabs) */
.calc-toggle {
    display: inline-flex;
    flex-wrap: wrap;
    border: 2px solid rgba(255,255,255,0.85);
    border-radius: 999px;
    padding: 2px;
    margin: 0 0 18px;
    background: rgba(0,0,0,0.12);
}
.calc-toggle button {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: #fff;
    font: 700 15px/1 Arial, Helvetica, sans-serif;
    padding: 9px 18px;
    border-radius: 999px;
    cursor: pointer;
    min-width: 96px;
}
.calc-toggle button[aria-pressed="true"] {
    background: #fff;
    color: var(--calc-teal-dark);
}
.calc-toggle button:focus-visible {
    outline: 3px solid var(--calc-focus);
    outline-offset: 1px;
}

/* Layout grids */
.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.calc-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.calc-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}
.calc-fieldset + .calc-fieldset { margin-top: 16px; }
.calc-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.calc-fields.calc-single { grid-template-columns: 1fr; }
.calc-fields.calc-triple { grid-template-columns: 1fr 1fr 1fr; }
.calc-units[hidden] { display: none !important; }

/* Field = input + unit suffix */
.calc-field {
    position: relative;
    min-width: 0;
}
.calc-field input,
.calc-field select {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: 52px;
    padding: 10px 12px;
    font: 22px/1.2 Arial, Helvetica, sans-serif;
    color: var(--calc-ink);
    background: var(--calc-editable);
    border: 1px solid var(--calc-editable-line);
    border-radius: 6px;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}
.calc-field select { background-color: var(--calc-editable); }
.calc-field.calc-has-unit input { padding-right: 56px; }
.calc-field.calc-has-prefix input { padding-left: 36px; }
.calc-field input:focus,
.calc-field select:focus {
    outline: 3px solid var(--calc-focus);
    outline-offset: 0;
}
.calc-field input::-webkit-outer-spin-button,
.calc-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-field input[type=number] { -moz-appearance: textfield; }
.calc-field input[type=date],
.calc-field input[type=datetime-local],
.calc-field input[type=time] { font-size: 18px; }
.calc-field select {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23064d6b' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
    font-size: 18px;
}
.calc-field select.calc-small { height: 44px; font-size: 16px; }
.calc-field .calc-unit,
.calc-field .calc-prefix {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font: 700 15px/1 Arial, Helvetica, sans-serif;
    color: var(--calc-muted);
    pointer-events: none;
}
.calc-field .calc-unit { right: 12px; }
.calc-field .calc-prefix { left: 12px; font-size: 18px; }
.calc-field .calc-unit select {
    pointer-events: auto;
}
.calc-sub-label {
    display: block;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    margin: 0 0 4px;
}
.calc-hint {
    margin: 6px 0 0;
    min-height: 18px;
    font-size: 13px;
    line-height: 18px;
    color: #ffe3a3;
}
.calc-hint:empty { display: none; }

/* Small text buttons in the panel ("Now", "Today") */
.calc-mini {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(255,255,255,0.8);
    background: transparent;
    color: #fff;
    font: 700 13px/1 Arial, Helvetica, sans-serif;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    margin-left: 8px;
    vertical-align: middle;
}
.calc-mini:hover { background: rgba(255,255,255,0.15); }
.calc-mini:focus-visible { outline: 3px solid var(--calc-focus); }

/* Checkbox row */
.calc-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 15px;
    margin: 12px 0 0;
}
.calc-check input { width: 20px; height: 20px; margin: 0; accent-color: #fff; }

/* Sentence-style inputs ("What is [ ] % of [ ]?") */
.calc-sentence {
    color: #fff;
    font-size: 22px;
    line-height: 2.4;
    margin: 0 0 6px;
}
.calc-sentence .calc-inline {
    display: inline-block;
    width: 7em;
    max-width: 40%;
    height: 48px;
    margin: 0 4px;
    padding: 6px 10px;
    font: 22px/1.2 Arial, Helvetica, sans-serif;
    color: var(--calc-ink);
    background: var(--calc-editable);
    border: 1px solid var(--calc-editable-line);
    border-radius: 6px;
    vertical-align: middle;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.calc-sentence .calc-inline:focus { outline: 3px solid var(--calc-focus); }
.calc-sentence .calc-inline::-webkit-outer-spin-button,
.calc-sentence .calc-inline::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-sentence .calc-inline[type=number] { -moz-appearance: textfield; }
.calc-sentence .calc-answer {
    display: inline-block;
    min-width: 4em;
    padding: 6px 14px;
    margin-left: 6px;
    background: #fff;
    color: var(--calc-teal-dark);
    border-radius: 6px;
    font-weight: 700;
    line-height: 1.3;
    vertical-align: middle;
}

/* Buttons */
.calc-btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-block;
    border: 0;
    border-radius: 6px;
    padding: 12px 20px;
    font: 700 16px/1.2 Arial, Helvetica, sans-serif;
    color: #fff;
    background: var(--calc-teal);
    cursor: pointer;
}
.calc-btn:hover { background: var(--calc-teal-dark); }
.calc-btn:focus-visible { outline: 3px solid var(--calc-focus); }
.calc-btn.calc-btn-light {
    background: #fff;
    color: var(--calc-teal-dark);
}
.calc-btn.calc-btn-ghost {
    background: transparent;
    color: var(--calc-ink);
    border: 1px solid var(--calc-line);
}
.calc-btn[disabled] { opacity: 0.5; cursor: default; }

/* ---- Grey area under the panel ------------------------------------------- */
.calc-below { background: #e3e3e3; }

/* Result card */
.calc-result {
    margin: 14px 0 18px;
    padding: 18px 16px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    text-align: center;
}
.calc-result[hidden] { display: none !important; }
.calc-result-label {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--calc-muted);
}
.calc-value {
    margin: 2px 0 0;
    font-size: 56px;
    line-height: 1.05;
    font-weight: 700;
    color: var(--calc-ink);
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}
.calc-value small {
    font-size: 0.45em;
    font-weight: 700;
    color: var(--calc-muted);
    letter-spacing: 0;
    margin-left: 4px;
}
.calc-sub {
    margin: 6px 0 0;
    font-size: 17px;
    color: var(--calc-muted);
}
.calc-sub strong { color: var(--calc-ink); }

/* Category / status pill */
.calc-pill {
    display: inline-block;
    margin: 10px 0 0;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: var(--calc-green);
}
.calc-pill[hidden] { display: none !important; }
.calc-pill[data-tone="blue"]  { background: var(--calc-blue); }
.calc-pill[data-tone="green"] { background: var(--calc-green); }
.calc-pill[data-tone="amber"] { background: var(--calc-amber); color: var(--calc-ink); }
.calc-pill[data-tone="red"]   { background: var(--calc-red); }
.calc-pill[data-tone="grey"]  { background: var(--calc-soft); color: var(--calc-ink); }

/* Secondary facts – grid of small tiles. Site CSS floats every li at 350px
   and sizes every ul, so those are undone here. */
.calc-facts,
.calc-legend {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 18px 0 0;
    list-style: none;
    box-sizing: border-box;
}
.calc-facts li,
.calc-legend li {
    float: none !important;
    width: auto !important;
    list-style: none;
}
.calc-facts[hidden],
.calc-legend[hidden],
.calc-facts li[hidden],
.calc-table-wrap[hidden],
.calc-chart[hidden],
.calc-bar[hidden] { display: none !important; }
.calc-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    text-align: left;
}
.calc-facts.calc-facts-3 { grid-template-columns: 1fr 1fr 1fr; }
.calc-facts li {
    background: var(--calc-soft);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--calc-muted);
}
.calc-facts strong {
    display: block;
    font-size: 17px;
    color: var(--calc-ink);
}
.calc-facts strong.calc-inline-strong { display: inline; }
.calc-facts a { color: #064d6b; }
.calc-facts li.calc-wide { grid-column: 1 / -1; }
.calc-facts li.calc-hi { background: #e6f4ea; }

/* Legend strip (BMI-style category key) */
.calc-legend {
    margin: 0 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.calc-legend li {
    padding: 10px 8px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    line-height: 1.3;
    text-align: center;
}
.calc-legend li strong { display: block; font-size: 15px; }
.calc-legend li[aria-current="true"] {
    outline: 3px solid var(--calc-ink);
    outline-offset: 1px;
}

/* Horizontal scale with a marker (BMI, oven heat) */
.calc-scale {
    position: relative;
    margin: 24px 8px 0;
    padding-bottom: 26px;
}
.calc-track {
    display: flex;
    height: 16px;
    border-radius: 999px;
    overflow: hidden;
}
.calc-track span { display: block; height: 100%; }
.calc-ticks {
    position: relative;
    height: 18px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--calc-muted);
}
.calc-ticks span { position: absolute; transform: translateX(-50%); top: 0; }
.calc-marker {
    position: absolute;
    top: -8px;
    left: 0;
    width: 4px;
    height: 32px;
    margin-left: -2px;
    background: var(--calc-ink);
    border-radius: 2px;
    transition: left 0.25s ease-out;
}
.calc-marker::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -9px;
    margin-left: -7px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 9px solid var(--calc-ink);
}

/* Stacked bar (capital vs interest, contributions vs growth) */
.calc-bar {
    display: flex;
    height: 22px;
    border-radius: 6px;
    overflow: hidden;
    margin: 14px 0 6px;
}
.calc-bar span { display: block; height: 100%; min-width: 2px; }
.calc-bar-key {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    justify-content: center;
    font-size: 13px;
    color: var(--calc-muted);
    margin: 0;
    padding: 0;
    list-style: none;
}
.calc-bar-key li { float: none !important; width: auto !important; }
.calc-bar-key i {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: -1px;
}

/* Results tables */
.calc-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 14px 0 0;
    text-align: left;
}
.calc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    min-width: 0;
}
.calc-table th,
.calc-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--calc-line);
    text-align: right;
    white-space: nowrap;
}
.calc-table th:first-child,
.calc-table td:first-child { text-align: left; }
.calc-table thead th {
    background: var(--calc-soft);
    color: var(--calc-muted);
    font-weight: 700;
    position: sticky;
    top: 0;
}
.calc-table tbody tr:hover td { background: #fafbfc; }
.calc-table tr.calc-row-hi td { background: #e6f4ea; font-weight: 700; }
.calc-table caption {
    caption-side: top;
    text-align: left;
    font-weight: 700;
    padding: 0 0 8px;
    color: var(--calc-ink);
}
.calc-table-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin: 10px 0 0;
}

/* Alarm chip / banner (days between dates) */
.calc-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 0;
    padding: 8px 10px 8px 16px;
    background: var(--calc-soft);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    color: var(--calc-ink);
}
.calc-chip[hidden] { display: none !important; }
.calc-chip button {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: var(--calc-ink);
    color: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    font: 700 13px/1 Arial, Helvetica, sans-serif;
    cursor: pointer;
}
.calc-banner {
    margin: 14px 0 0;
    padding: 16px;
    border-radius: 8px;
    background: #fff4d6;
    border: 2px solid var(--calc-amber);
    color: var(--calc-ink);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}
.calc-banner[hidden] { display: none !important; }
.calc-note {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--calc-muted);
}

/* Reference chart under a calculator (oven temps, shoe sizes) */
.calc-chart {
    margin: 0 0 20px;
    background: #fff;
    border-radius: 8px;
    padding: 14px 16px 16px;
}
.calc-chart h2 {
    margin: 0 0 10px !important;
    font-size: 18px !important;
    color: var(--calc-ink) !important;
    font-weight: 700 !important;
}

/* ---- Article --------------------------------------------------------------- */
.calc-below article#information { color: #333; }
.calc-below article#information h2 {
    clear: both;
    font-size: 20px;
    font-weight: 700 !important;
    color: #333;
    margin: 24px 0 6px;
}
.calc-below article#information h3 {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    margin: 28px 0 4px;
}
.calc-below article#information h2 + h3 { margin-top: 12px; }
.calc-below article#information p,
.calc-below article#information li {
    color: #333;
    font-size: 15px;
    line-height: 1.55;
}
.calc-below article#information table {
    float: none;
    display: table;
    border-collapse: collapse;
    width: 100%;
    max-width: 520px;
    margin: 8px 0 12px;
    font-size: 15px;
}
.calc-below article#information th,
.calc-below article#information td {
    text-align: left;
    padding: 6px 10px;
    border-bottom: 1px solid var(--calc-line);
}
.calc-below article#information ul,
.calc-below article#information ol {
    padding: 0 0 0 1.4em;
    margin: 0 0 12px;
    width: auto;
}
.calc-below article#information li {
    float: none;
    width: auto;
    list-style-type: disc;
    margin: 0 0 6px;
}
.calc-below article#information ol li { list-style-type: decimal; }
.calc-below article#information code {
    background: var(--calc-soft);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 14px;
}
.calc-below article#information a { color: #064d6b; }
/* Card grouping a sub-heading with its explanation (e.g. one per calculation mode) */
.calc-below article#information .calc-card {
    background: #fff;
    border-radius: 8px;
    padding: 14px 16px 4px;
    margin: 12px 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.calc-below article#information .calc-card h3 { margin-top: 0; }
.calc-below article#information .calc-card p { margin: 0 0 12px; }
.calc-below article#information .calc-card p.calc-example { background: #eef2f4; }
.calc-below article#information p.calc-example {
    margin: 8px 0 12px;
    padding: 8px 12px;
    border-left: 3px solid var(--calc-teal);
    background: #ebeef0;
    border-radius: 0 6px 6px 0;
}

/* ---- Responsive ------------------------------------------------------------ */
@media (min-width: 1024px) {
    .calc-below { padding: 0 0 20px; }
}
@media (max-width: 1023.98px) {
    .calc-grid,
    .calc-grid-3 { grid-template-columns: 1fr; gap: 16px; }
    .calc-below { padding: 12px 4% 20px; width: 100%; box-sizing: border-box; }
    .calc-value { font-size: 13vw; }
    .calc-facts,
    .calc-facts.calc-facts-3 { grid-template-columns: 1fr; }
    .calc-legend { grid-template-columns: 1fr 1fr; }
    .calc-toggle { display: flex; }
    .calc-toggle button { flex: 1; min-width: 0; }
    .calc-sentence { font-size: 19px; }
    .calc-sentence .calc-inline { font-size: 19px; width: 5.5em; }
}
@media (max-width: 360px) {
    .calc-legend { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .calc-marker { transition: none; }
}

/* ---- BMI calculator (bmi-calculator.blade.php) --------------------------- */
/* Height and weight on separate rows (side by side they sat staggered: two fields vs one) */
.bmi-stack { grid-template-columns: 1fr; gap: 16px; }
.bmi-stack .calc-fields { max-width: 360px; }
/* Scale segments (15–40) and category colours */
.bmi-track .u { width: 14%; background: var(--calc-blue); }
.bmi-track .h { width: 26%; background: var(--calc-green); }
.bmi-track .o { width: 20%; background: var(--calc-amber); }
.bmi-track .b { width: 40%; background: var(--calc-red); }
.bmi-legend .u { background: var(--calc-blue); }
.bmi-legend .h { background: var(--calc-green); }
.bmi-legend .o { background: var(--calc-amber); color: var(--calc-ink); }
.bmi-legend .b { background: var(--calc-red); }

/* ---- Percentage calculator (percentage-calculator.blade.php) --------------- */
.pct-mode {
    padding: 16px 0 10px;
    border-top: 1px solid rgba(255,255,255,0.25);
}
.pct-mode:first-of-type { border-top: 0; padding-top: 0; }
.pct-mode h2 { margin-bottom: 2px !important; }
.pct-mode .calc-sentence { margin: 0; }
.pct-mode .calc-sentence .calc-inline { width: 5.5em; }
.pct-sub { font-size: 18px; line-height: 2.2; }
.pct-sub .calc-inline { height: 42px; font-size: 18px; width: 5em; }
.pct-sub .calc-answer { font-size: 18px; }
.calc-answer.pct-neg { color: var(--calc-red); }
.calc-answer.pct-pos { color: var(--calc-green); }
/* "How it was worked out" directly under each row: the formula, then one line per step */
.pct-how {
    margin: 6px 0 18px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255,255,255,0.85);
}
.pct-how:empty { display: none; }
.pct-how code {
    display: inline-block;
    background: rgba(255,255,255,0.14);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
}
.pct-how code span { display: block; }
.pct-how code .pct-formula {
    color: rgba(255,255,255,0.75);
    border-bottom: 1px solid rgba(255,255,255,0.25);
    padding-bottom: 3px;
    margin-bottom: 3px;
}
@media (max-width: 1023.98px) {
    .pct-mode .calc-sentence .calc-inline { width: 4.5em; }
    .pct-sub { font-size: 16px; }
    .pct-sub .calc-inline { font-size: 16px; width: 4em; }
    .pct-how { font-size: 13px; }
    .pct-how code { font-size: 13px; }
}

/* ---- Oven temperature converter (oven-temperature-converter.blade.php) ----- */
.oven-fields { grid-template-columns: repeat(4, 1fr); }
.oven-fields .calc-field input { padding-right: 62px; }
.oven-fields .calc-unit { font-size: 13px; text-align: right; line-height: 1.1; }
.oven-scale .calc-track .a { width: 16%; background: #6c8ef0; }
.oven-scale .calc-track .b { width: 16%; background: #7fb3e0; }
.oven-scale .calc-track .c { width: 20%; background: #3bb55a; }
.oven-scale .calc-track .d { width: 16%; background: #f2a541; }
.oven-scale .calc-track .e { width: 16%; background: #e8712f; }
.oven-scale .calc-track .f { width: 16%; background: #c93a3a; }
.oven-chart .calc-table th, .oven-chart .calc-table td { text-align: center; }
.oven-chart .calc-table td:first-child, .oven-chart .calc-table th:first-child { text-align: left; }
.oven-chart .calc-table td:last-child, .oven-chart .calc-table th:last-child { text-align: left; white-space: normal; }
@media (max-width: 1023.98px) {
    .oven-fields { grid-template-columns: 1fr 1fr; }
}
@media print {
    header, footer, #sideMenu, #userConvert, .calc-result, article#information { display: none !important; }
    .oven-chart { box-shadow: none; }
}

/* ---- Days between dates (days-between-dates.blade.php) ---- */
.dbd-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 8px;
}
.dbd-head h2 { margin: 0 !important; }
/* Start and end each on their own row (side by side the two boxes sat jogged) */
.dbd-stack { grid-template-columns: 1fr; gap: 16px; }
.dbd-stack .calc-fieldset { max-width: 360px; }
.dbd-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 14px 0 0;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
}
.dbd-presets .calc-mini { margin: 0; }
.dbd-live {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--calc-green);
    margin-right: 6px;
    vertical-align: 1px;
    animation: dbd-pulse 1.2s infinite;
}
@keyframes dbd-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .dbd-live { animation: none; } }

/* Alarm card (white, lives under the result) */
.dbd-alarm {
    margin: 0 0 18px;
    padding: 16px 16px 18px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    text-align: left;
}
.dbd-alarm h2 {
    margin: 0 0 10px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--calc-ink) !important;
}
.dbd-alarm-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}
.dbd-alarm .calc-field select,
.dbd-alarm .calc-field input { height: 48px; font-size: 17px; }
.dbd-alarm .calc-btn { height: 48px; white-space: nowrap; }
.dbd-alarm .calc-hint { color: var(--calc-red); }
.dbd-alarm .calc-banner button { margin-left: 12px; }
@media (max-width: 1023.98px) {
    .dbd-alarm-row { grid-template-columns: 1fr 1fr; }
    .dbd-alarm-row .dbd-mode { grid-column: 1 / -1; }
    .dbd-alarm-row .calc-btn { grid-column: 1 / -1; }
}


/* ---- Age calculator (age-calculator.blade.php) ---- */
.age-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin: 0 0 8px;
}
.age-head h2 { margin: 0 !important; }
.age-value { font-size: 40px; }
.age-value b { display: block; font-size: 64px; line-height: 1.05; }
@media (max-width: 1023.98px) {
    .age-value { font-size: 7vw; }
    .age-value b { font-size: 15vw; }
}
/* One date per row, and don't stretch a date picker across the whole panel */
.age-stack { grid-template-columns: 1fr; gap: 16px; }
.age-stack .calc-field { max-width: 360px; }

/* ---- Loan and mortgage repayment calculator (loan-repayment-calculator.blade.php) ---- */
.loan-details {
    margin: 16px 0 0;
    border-top: 1px solid rgba(255,255,255,0.35);
    padding-top: 10px;
}
.loan-details summary {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    list-style: none;
    padding: 6px 0;
}
.loan-details summary::-webkit-details-marker { display: none; }
.loan-details summary::before {
    content: "▸";
    display: inline-block;
    width: 1.1em;
    transition: transform 0.15s;
}
.loan-details[open] summary::before { transform: rotate(90deg); }
.loan-details .calc-grid { margin-top: 8px; }
/* Overpayment inputs: one per row, not stretched across the panel */
.loan-stack { grid-template-columns: 1fr; gap: 14px; }
.loan-stack .calc-field { max-width: 360px; }
/* A currency code (CHF, kr) in front of the number needs more room than a one-character symbol */
.calc-field.calc-has-prefix.loan-prefix-long input { padding-left: 54px; }
/* Headline banner shown above the monthly payment when overpayments shorten the loan */
.loan-highlight {
    background: #e6f4ea;
    border-radius: 8px;
    padding: 12px 14px 14px;
    margin: 0 0 18px;
}
.loan-highlight[hidden] { display: none !important; }
.loan-highlight .calc-result-label { color: #2f6b3a; }
.loan-highlight-value {
    margin: 2px 0 0;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 700;
    color: var(--calc-ink);
}
.loan-highlight-sub { margin: 6px 0 0; font-size: 16px; color: var(--calc-muted); }
.loan-highlight-sub strong { color: #2f6b3a; }
.loan-bar-capital { background: var(--calc-teal); }
.loan-bar-interest { background: var(--calc-amber); }
.loan-saving { background: #e6f4ea !important; }
.loan-table-note { font-size: 13px; color: var(--calc-muted); margin: 8px 0 0; text-align: left; }
#loanTableWrap { max-height: 520px; overflow-y: auto; }


/* ---- Compound interest calculator (compound-interest-calculator.blade.php) ---- */
.ci-bar-deposit { background: var(--calc-teal); }
.ci-bar-interest { background: var(--calc-green); }
.ci-note { font-size: 13px; color: var(--calc-muted); margin: 8px 0 0; text-align: left; }
#ciTableWrap { max-height: 520px; overflow-y: auto; }
/* Regular contribution and Time each take a full row of the panel */
.ci-full { grid-column: 1 / -1; }
.ci-contrib .calc-fields { grid-template-columns: 1fr 1fr 1.7fr; }
.ci-rate .calc-fields { grid-template-columns: minmax(150px, 1fr) 2.2fr; }
/* A symbol of two or more characters (kr, CHF) needs more room than a single £ */
.calc-field.ci-wide input { padding-left: 64px; }
@media (max-width: 1023.98px) {
    .ci-contrib .calc-fields { grid-template-columns: 1fr 1fr; }
    .ci-contrib .ci-timing { grid-column: 1 / -1; }
    .ci-rate .calc-fields { grid-template-columns: 1fr 1fr; }
    .ci-rate .calc-field:last-child { grid-column: 1 / -1; }
}

/* ---- Calorie calculator (calorie-calculator.blade.php) ---- */
.cal-toggles { display: flex; flex-wrap: wrap; gap: 0 16px; }
.cal-toggles .calc-toggle { margin-bottom: 14px; }
.cal-targets { margin-top: 14px; }
.cal-targets li { text-align: center; }
.cal-targets li.cal-warn { background: #fff4d6; }
.cal-targets small { display: block; font-size: 12px; margin-top: 2px; }
/* One field per row (side by side the boxes sat jogged); selects with long labels get more width */
.cal-stack { grid-template-columns: 1fr; gap: 16px; }
.cal-stack .calc-fields { max-width: 360px; }
.cal-stack .cal-select .calc-fields { max-width: 520px; }
@media (max-width: 1023.98px) {
    .cal-toggles { display: block; }
}

/* ---- Shoe size converter (shoe-size-converter.blade.php) ---- */
.shoe-sub { margin-top: -8px; }
/* "I know my size in" above the size box, one per row */
.shoe-stack { grid-template-columns: 1fr; gap: 16px; }
.shoe-stack .calc-field { max-width: 360px; }
.shoe-sub[hidden] { display: none !important; }
.shoe-sizes {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 12px 0 0;
}
.shoe-size {
    background: var(--calc-soft);
    border-radius: 8px;
    padding: 12px 6px 10px;
    text-align: center;
}
.shoe-size small {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--calc-muted);
}
.shoe-size strong {
    display: block;
    font-size: 28px;
    line-height: 1.2;
    color: var(--calc-ink);
    margin-top: 2px;
}
.shoe-size.shoe-hi {
    background: var(--calc-teal);
}
.shoe-size.shoe-hi small,
.shoe-size.shoe-hi strong { color: #fff; }
.shoe-chart .calc-table th,
.shoe-chart .calc-table td { text-align: center; }
.shoe-chart .calc-table th:first-child,
.shoe-chart .calc-table td:first-child { text-align: center; }
#shoeChartWrap { max-height: 480px; overflow-y: auto; margin-top: 0; }
@media (max-width: 1023.98px) {
    .shoe-sizes { grid-template-columns: repeat(3, 1fr); }
    .shoe-size strong { font-size: 24px; }
}

/* ---- Cups to grams converter (cups-to-grams.blade.php) ---- */
.cups-ingredient { margin-bottom: 18px; }
.cups-rows .calc-fieldset + .calc-fieldset { margin-top: 18px; }
.cups-qty { grid-template-columns: minmax(140px, 1fr) 2fr; }
.cups-to .calc-field { max-width: 360px; }
.cups-facts { grid-template-columns: repeat(3, 1fr); }
.cups-facts li { text-align: center; }
.cups-density { margin-top: 12px; }
@media (max-width: 1023.98px) {
    .cups-facts { grid-template-columns: 1fr 1fr; }
}

/* ---- Days between dates: date and optional time side by side (days-26110402) ---- */
.dbd-when { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 1023.98px) {
    .dbd-when { grid-template-columns: 1.6fr 1fr; }
}

/* ---- VAT and sales tax calculator (vat-calculator.blade.php) ---- */
/* One fieldset per row */
.vat-stack { grid-template-columns: 1fr; gap: 16px; }
.vat-panel .vat-stack .calc-fields { max-width: 440px; }
.vat-panel .calc-field.calc-has-prefix.vat-prefix-long input { padding-left: 54px; }
.vat-panel .calc-fieldset[hidden] { display: none; }

@media (max-width: 1023.98px) {
    .vat-panel .vat-stack .calc-fields { max-width: none; }
}

/* ---- Fuel cost calculator (fuel-cost-calculator.blade.php) ---- */
/* One row per input, not stretched across the panel; value box and unit select share a row */
.fc-stack { grid-template-columns: 1fr; gap: 16px; }
.fc-stack .calc-fields { max-width: 440px; }
.fc-stack .calc-fields.calc-single { max-width: 360px; }
/* Currency select, price, per-unit select */
.fc-stack .fc-price { max-width: 560px; grid-template-columns: minmax(110px, 1fr) 1.5fr 1.5fr; }
#fcCurrency { font-size: 16px; }
.fc-stack .calc-check { margin: 0; }
.fc-stack .calc-check input { flex: none; }
@media (max-width: 1023.98px) {
    .fc-stack .calc-fields { max-width: none; }
    .fc-stack .calc-fields.calc-single { max-width: none; }
    /* Price on its own line, the two selects side by side beneath it */
    .fc-stack .fc-price { max-width: none; grid-template-columns: 1fr 1fr; }
    .fc-stack .fc-price .fc-amount { order: -1; grid-column: 1 / -1; }
}

/* ---- Fuel economy converter (fuel-economy-converter.blade.php) ---- */
.fe-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); max-width: 520px; }
.fe-chart .calc-table-wrap { position: relative; max-height: 320px; overflow-y: auto; }
.fe-chart .calc-table th,
.fe-chart .calc-table td { text-align: right; }
.fe-chart .calc-table th:first-child,
.fe-chart .calc-table td:first-child { text-align: left; }
@media (max-width: 1023.98px) {
    .fe-fields { max-width: none; }
    .fe-chart .calc-table-wrap { max-height: 280px; }
}

/* ---- Speed, distance and time calculator (speed-distance-time-calculator.blade.php) ---- */
/* One fieldset per row; the amount and its unit select share a row and are the same height */
.sdt-stack { grid-template-columns: 1fr; gap: 16px; }
.sdt-stack .calc-fieldset + .calc-fieldset { margin-top: 0; }
.sdt-stack .calc-fields { max-width: 420px; }
.sdt-stack .calc-fields:not(.calc-triple):not(.calc-single) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.sdt-stack .calc-fields.calc-single { max-width: 220px; }
/* h / min / s suffixes are short, so the numbers need less room reserved */
.sdt-stack .calc-triple .calc-field input { padding-right: 40px; font-size: 20px; }
.sdt-stack .calc-triple .calc-unit { font-size: 14px; }
.sdt-stack .calc-fieldset[hidden] { display: none !important; }
@media (max-width: 1023.98px) {
    .sdt-stack .calc-fields,
    .sdt-stack .calc-fields.calc-single { max-width: none; }
}
@media (max-width: 400px) {
    .sdt-stack .calc-triple .calc-field input { padding-left: 8px; padding-right: 32px; font-size: 18px; }
}

/* ---- Wind chill, heat index and dew point calculator (wind-chill-calculator.blade.php) ---- */
/* Mode switch and units switch side by side on a wide screen, stacked on a phone */
.wx-toggles { display: flex; flex-wrap: wrap; gap: 0 16px; }
.wx-toggles .calc-toggle { margin-bottom: 14px; }
/* One field per row, not stretched across the panel */
.wx-stack { grid-template-columns: 1fr; gap: 16px; }
.wx-stack .calc-fields { max-width: 360px; }
.wx-stack .calc-fieldset[hidden] { display: none !important; }
/* The band text under the facts reads as part of the answer */
.calc-result .wx-note { margin: 14px 0 0; font-size: 16px; font-weight: 700; color: var(--calc-ink); }
.calc-result .wx-note[hidden] { display: none !important; }
@media (max-width: 1023.98px) {
    .wx-toggles { display: block; }
    .wx-toggles .calc-toggle { display: flex; }
}

/* ---- Height converter (height-converter.blade.php) ---- */
.ht-chart .calc-table-wrap {
    position: relative;
    max-height: 480px;
    overflow-y: auto;
    overflow-x: auto;
}
.ht-chart .calc-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
}
.ht-chart .calc-table td:nth-child(n+2),
.ht-chart .calc-table th:nth-child(n+2) { text-align: right; }

@media (max-width: 1023.98px) {
    .ht-chart { padding: 12px; }
    .ht-chart .calc-table { font-size: 13px; }
    .ht-chart .calc-table th,
    .ht-chart .calc-table td { padding: 7px 8px; }
}

/* ---- Discount calculator (discount-calculator.blade.php) ---- */
/* One fieldset per row */
.dsc-stack { grid-template-columns: 1fr; gap: 16px; }
.dsc-panel .dsc-stack .calc-fields { max-width: 440px; }
.dsc-panel .calc-field.calc-has-prefix.dsc-prefix-long input { padding-left: 54px; }
.dsc-panel .calc-fieldset[hidden] { display: none; }

@media (max-width: 1023.98px) {
    .dsc-panel .dsc-stack .calc-fields { max-width: none; }
}

/* ---- Salary converter (salary-converter.blade.php) ---- */
.sal-stack { grid-template-columns: 1fr; gap: 16px; }
.sal-panel .sal-stack .calc-fields { max-width: 440px; }
.sal-panel .calc-field.calc-has-prefix.sal-prefix-long input { padding-left: 54px; }
@media (max-width: 1023.98px) {
    .sal-panel .sal-stack .calc-fields { max-width: none; }
}

/* ---- Ideal weight calculator (ideal-weight-calculator.blade.php) ---- */
.iw-panel .calc-toggle { margin-bottom: 0; }
.iw-panel .iw-stack .calc-fieldset .calc-toggle { width: 100%; }
.iw-panel .calc-table td:nth-child(2),
.iw-panel .calc-table th:nth-child(2) { text-align: right; }
.calc-below .calc-result .calc-table-wrap { margin-top: 14px; }
.calc-below > .calc-note { margin-top: 14px; }

/* ---- Running pace calculator (running-pace-calculator.blade.php) ---- */
/* One fieldset per row; the amount and its unit select share a row and are the same height */
.rp-panel .rp-stack { grid-template-columns: 1fr; gap: 16px; }
.rp-panel .rp-stack .calc-fieldset + .calc-fieldset { margin-top: 0; }
.rp-panel .rp-stack .calc-fieldset[hidden] { display: none !important; }
.rp-panel .rp-stack .calc-fields { max-width: 420px; }
.rp-panel .rp-stack .calc-fields:not(.calc-triple):not(.calc-single) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.rp-panel .rp-stack .calc-fields.calc-single { max-width: 220px; margin-top: 10px; }
/* h / min / s suffixes are short, so the numbers need less room reserved */
.rp-panel .rp-stack .calc-has-unit input { padding-right: 40px; font-size: 20px; }
.rp-panel .rp-stack .calc-unit { font-size: 14px; }
.rp-panel .rp-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 12px 0 0;
}
.rp-panel .rp-presets .calc-mini { margin: 0; }
#result .rp-races h2 { margin: 18px 0 0; font-size: 17px; text-align: left; }
@media (max-width: 1023.98px) {
    .rp-panel .rp-stack .calc-fields,
    .rp-panel .rp-stack .calc-fields.calc-single { max-width: none; }
}
@media (max-width: 400px) {
    .rp-panel .rp-stack .calc-has-unit input { padding-left: 8px; padding-right: 32px; font-size: 18px; }
}

/* ---- Pregnancy due date calculator (due-date-calculator.blade.php) ---- */
/* One input per row, and do not stretch a date picker or select across the whole panel */
.dd-panel .dd-stack { grid-template-columns: 1fr; gap: 16px; }
.dd-panel .dd-stack .calc-field { max-width: 360px; }
.dd-panel .dd-stack .calc-fieldset + .calc-fieldset { margin-top: 0; }
.dd-panel .calc-toggle { margin-bottom: 16px; }
.calc-result .dd-table td:first-child { white-space: normal; }
.calc-result .dd-table td:last-child { white-space: nowrap; }
.calc-result .dd-table caption { font-size: 16px; }
@media (max-width: 1023.98px) {
    .calc-result .dd-table th, .calc-result .dd-table td { padding: 8px 6px; font-size: 13px; }
    .calc-result .dd-table td:last-child { white-space: normal; }
}

/* ---- Add or subtract days from a date (add-subtract-dates.blade.php) ---- */
.da-panel .da-stack { grid-template-columns: 1fr; gap: 16px; }
.da-panel .da-stack .calc-fieldset { max-width: 360px; }
.da-panel .da-datebox { display: flex; align-items: center; gap: 10px; }
.da-panel .da-datebox .calc-field { flex: 1 1 auto; min-width: 0; }
.da-panel .da-datebox .calc-mini { margin: 0; flex: none; }
.da-panel .calc-check { margin-top: 16px; }

/* ---- Paint calculator (paint-calculator.blade.php) ---- */
/* One fieldset per row; the two toggles side by side where there is room */
.pt-toggles { display: flex; flex-wrap: wrap; gap: 0 16px; }
.pt-toggles .calc-toggle { margin-bottom: 14px; }
.pt-stack { grid-template-columns: 1fr; gap: 16px; }
.pt-panel .pt-stack .calc-fields { max-width: 360px; }
.pt-panel .calc-fieldset[hidden] { display: none !important; }
/* Longer suffixes ("ft² per US gallon", "windows") need more room inside the box */
.pt-panel .calc-field.calc-has-unit.pt-wide input { padding-right: 136px; }
.pt-panel #ptCoverageHelp { margin-top: 6px; }

@media (max-width: 1023.98px) {
    .pt-toggles { display: block; }
    .pt-toggles .calc-toggle { display: flex; }
    .pt-panel .pt-stack .calc-fields { max-width: none; }
}

/* ---- Tile calculator (tile-calculator.blade.php) ---- */
/* One field per row, not stretched across the panel */
.tl-stack { grid-template-columns: 1fr; gap: 16px; }
.tl-stack .calc-fields { max-width: 360px; }
.tl-panel .calc-toggle { margin-bottom: 14px; }
.tl-panel .calc-fieldset .calc-hint + .calc-hint { margin-top: 4px; }
@media (max-width: 1023.98px) {
    .tl-stack .calc-fields { max-width: none; }
}

/* ---- Concrete, gravel and sand calculator (concrete-calculator.blade.php) ---- */
/* One fieldset per row */
.cc-stack { grid-template-columns: 1fr; gap: 16px; }
.cc-panel .cc-stack .calc-fields { max-width: 360px; }
.cc-panel .calc-fieldset[hidden] { display: none !important; }
.cc-panel .calc-toggle { margin-bottom: 14px; }
.calc-result #ccNote[hidden] { display: none !important; }

@media (max-width: 1023.98px) {
    .cc-panel .cc-stack .calc-fields { max-width: none; }
}

/* ---- Roman numerals converter (roman-numerals-converter.blade.php) ---- */
.rn-panel .rn-roman { text-transform: uppercase; letter-spacing: 0.06em; }
.rn-panel .calc-fields.calc-single { max-width: 360px; }
.rn-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 14px 0 0;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
}
.rn-presets .calc-mini { margin: 0; }
#result .calc-table-wrap { margin-top: 14px; }
#rnParts td:last-child { letter-spacing: 0.06em; font-weight: 700; }

/* ---- Share link and related calculators (partials/calc-article) ---- */
.calc-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
}
.calc-share[hidden] { display: none; }
.calc-share-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #bbb;
    background: #fff;
    color: #333;
    font: 14px/1.2 Arial, Helvetica, sans-serif;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
}
.calc-share-btn:hover { background: #f2f2f2; }
.calc-share-btn:focus-visible { outline: 3px solid var(--calc-focus); }
.calc-share-status { font-size: 14px; color: #2e7d32; }
.calc-share-url {
    flex-basis: 100%;
    box-sizing: border-box;
    font-size: 14px;
    padding: 6px 8px;
    border: 1px solid #bbb;
    border-radius: 4px;
}
.calc-share-url[hidden] { display: none; }

.calc-related { margin: 28px 0 0; }
.calc-below .calc-related h2 {
    clear: both;
    font-size: 20px;
    font-weight: 700 !important;
    color: #333;
    margin: 0 0 10px;
}
.calc-related ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.calc-related li {
    float: none;
    width: auto;
    margin: 0;
}
.calc-related a {
    display: inline-block;
    background: #413f3f;
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 15px;
}
.calc-related a:hover { background: #2b2a2a; }
.calc-related a:focus-visible { outline: 3px solid #f0c419; }
@media (max-width: 1023.98px) {
    .calc-related ul { flex-direction: column; }
    .calc-related a { display: block; }
}

/* ---- Searchable select (MC.searchSelect) ---- */
.calc-combo {
    position: relative;
    min-width: 0;
}
.calc-field .calc-combo-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: 52px;
    margin: 0;
    padding: 10px 40px 10px 12px;
    font: 18px/1.2 Arial, Helvetica, sans-serif;
    color: var(--calc-ink);
    background-color: var(--calc-editable);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23064d6b' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
    border: 1px solid var(--calc-editable-line);
    border-radius: 6px;
    -webkit-appearance: none;
    appearance: none;
    text-overflow: ellipsis;
}
.calc-field .calc-combo-input:focus {
    outline: 3px solid var(--calc-focus);
    outline-offset: 0;
}
.calc-combo-input::placeholder { color: #6b6b6b; opacity: 1; }
.calc-combo-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 320px;
    overflow-y: auto;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    color: #222;
    border: 1px solid #bbb;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    text-align: left;
}
.calc-combo-list[hidden] { display: none; }
.calc-combo-list li {
    float: none;
    width: auto;
    margin: 0;
    background-image: none;
    list-style: none;
}
.calc-combo-list li[role=option] {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.3;
}
.calc-combo-list li[role=option].is-active,
.calc-combo-list li[role=option]:hover { background: #e8f0f8; }
.calc-combo-list li[role=option][aria-selected=true] { font-weight: 700; }
.calc-combo-list li.calc-combo-group {
    padding: 8px 12px 4px;
    font-size: 12px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
}
.calc-combo-list li.calc-combo-empty {
    padding: 8px 12px;
    font-size: 15px;
    color: #666;
    font-style: italic;
}
.calc-combo-list li[hidden] { display: none; }
@media (max-width: 1023.98px) {
    .calc-combo-list { max-height: 50vh; }
}

/* The site stylesheet gives every ul a fixed width; let the list span the box */
.calc-combo .calc-combo-list { width: auto; max-width: none; box-sizing: border-box; }

/* ---- [hidden] wins on calculator pages ----
   Rules such as ".calc-field select { display: block }" outrank the browser's own [hidden] style, so an element a
   script hides (the select under MC.searchSelect, rows a toggle hides) would still show. */
.calc-page [hidden] { display: none !important; }

/* ---- The result card on phones ----
   The site's mobile stylesheet (mobile100926.css) styles `#result p` at 14px with no margin for the converter
   pages; the calculators' result card is also #result, and an id selector outranks .calc-value, so on phones the big
   answer and the working out were printed at 14px. Put the calculator sizes back. */
@media (max-width: 1023.98px) {
    body.calc-page #result .calc-result-label { font-size: 14px; margin: 0; }
    body.calc-page #result .calc-value { font-size: 13vw; margin: 2px 0 0; }
    body.calc-page #result .calc-sub { font-size: 17px; margin: 6px 0 0; }
    body.calc-page #result .calc-note { font-size: 13px; margin: 10px 0 0; }
    body.calc-page #result .calc-share { margin: 14px 0 0; }
}
