/* Hallmark · theme: custom (by request) · shape: app screen · copy: verbatim · surface: absolute · preserve the reference calculator's fonts, gold palette and cards. */
/* critique: build only the calculator and configuration modal; source badge/captions retained by explicit request. */
:root { --body-font: 'Tajawal', sans-serif; --heading-font: 'Cairo', sans-serif; --mono: ui-monospace, Consolas, monospace; --accent: #fbbf24; --accentDeep: #f59e0b; --ink: #18181b; --muted: #71717a; --surface: #ffffff; --background: #fafafa; --border: #e4e4e7; --accentSoft: #fffbeb; --accentBorder: #fde68a; --danger: #be123c; --overlay: #18181b80; --clear: transparent; --shadow: #18181b0d; --gold-shadow: #fbbf2433; }
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; color: var(--ink); font-family: var(--body-font); background: var(--background); }
body { min-height: 100dvh; background: radial-gradient(ellipse at 5% 15%, var(--accentSoft), var(--clear) 42%), linear-gradient(var(--background), var(--surface) 60%, var(--accentSoft)); }
button, input, select, textarea { font: inherit; color: inherit; }
button, select, input[type='radio'], input[type='color'] { cursor: pointer; }
button { border: 0; background: none; }
button, input, select, textarea, a, summary { -webkit-tap-highlight-color: var(--clear); }
:focus-visible { outline: 3px solid var(--accentDeep); outline-offset: 3px; }
svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sprite { position: absolute; width: 0; height: 0; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; overflow-wrap: break-word; min-width: 0; }
h1, h2, h3 { font-family: var(--heading-font); }
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1120px; padding: 18px 28px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 19px; font-weight: 800; }
.brand svg { color: var(--accentDeep); width: 28px; height: 28px; }
nav { display: flex; align-items: center; gap: 20px; }
nav button { font-size: 14px; font-weight: 700; padding: 8px 2px; }
.settings-button { display: inline-flex; align-items: center; gap: 7px; }
.settings-button svg { width: 18px; height: 18px; color: var(--accentDeep); }
.page { max-width: 896px; margin: auto; padding: 52px 28px 32px; }
.hero { text-align: center; margin-bottom: 46px; }
.badge { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--accentBorder); border-radius: 30px; padding: 6px 16px; background: var(--accentSoft); color: var(--ink); font-size: 13px; font-weight: 700; box-shadow: 0 4px 14px -4px var(--gold-shadow); }
.badge svg { color: var(--accentDeep); width: 16px; height: 16px; }
h1 { font-size: clamp(32px, 4.5vw, 52px); font-weight: 900; line-height: 1.4; margin: 18px 0 13px; background: linear-gradient(135deg, var(--ink) 60%, var(--accentDeep)); background-clip: text; color: var(--clear); }
.hero > p { color: var(--muted); font-size: 18px; line-height: 1.9; max-width: 640px; margin: auto; }
.section-card { background: var(--surface); border: 1px solid var(--accentBorder); border-radius: 17px; padding: 30px 32px; box-shadow: 0 8px 30px -12px var(--shadow); margin-bottom: 28px; }
.section-title { display: flex; gap: 13px; align-items: center; margin-bottom: 30px; }
.section-title h2 { font-size: 21px; font-weight: 800; line-height: 1.6; }
.section-caption { font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 2px; }
.icon-tile { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 1px solid var(--accentBorder); border-radius: 13px; background: var(--accentSoft); color: var(--accentDeep); }
label { display: grid; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 22px; }
label small { font-size: 11px; font-weight: 400; margin-inline-start: 5px; }
input:not([type='radio']), select, textarea { width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 12px 15px; min-height: 48px; color: var(--ink); font-size: 15px; font-weight: 600; box-shadow: 0 2px 8px -2px var(--shadow); transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover { border-color: var(--accent); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accentDeep); outline-offset: 2px; }
select { padding-inline-end: 12px; }
input::placeholder { color: var(--muted); font-weight: 400; }
input[type='number'] { font-variant-numeric: tabular-nums; }
fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
legend { color: var(--muted); font-size: 13px; font-weight: 700; padding: 0 0 9px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--background); border: 1px solid var(--border); border-radius: 40px; }
.segmented label, .vehicle-options label { position: relative; margin: 0; cursor: pointer; color: var(--muted); }
.segmented input, .vehicle-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { text-align: center; border-radius: 32px; padding: 10px 16px; font-size: 14px; font-weight: 700; }
.segmented input:checked + span, .vehicle-options input:checked + span { background: linear-gradient(135deg, var(--accent), var(--accentDeep)); color: var(--ink); box-shadow: 0 4px 14px -4px var(--gold-shadow); }
.segmented input:focus-visible + span, .vehicle-options input:focus-visible + span { outline: 3px solid var(--accentDeep); outline-offset: 3px; }
.vehicle-options { display: flex; gap: 10px; flex-wrap: wrap; padding: 2px; }
.vehicle-options span { display: block; font-size: 14px; font-weight: 700; border: 1px solid var(--border); border-radius: 30px; padding: 9px 17px; color: var(--ink); }
.vehicle-options input:checked + span { border-color: var(--accentDeep); }
.tow { display: flex; align-items: center; gap: 13px; padding: 13px 16px; border: 1px solid var(--accentBorder); border-radius: 12px; background: var(--accentSoft); }
.tow svg { color: var(--accentDeep); }
.tow small, .tow strong { display: block; }
.tow small { color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 800; border-radius: 12px; padding: 12px 21px; min-height: 46px; }
.primary { background: linear-gradient(135deg, var(--accent), var(--accentDeep)); color: var(--ink); border: 1px solid var(--accentDeep); box-shadow: 0 5px 20px -9px var(--gold-shadow); }
.primary:hover { filter: brightness(1.03); }
button:active { transform: translateY(1px); }
.primary:disabled, select:disabled { cursor: not-allowed; opacity: .55; }
#calculate { width: 100%; border-radius: 35px; font-size: 18px; min-height: 56px; margin-top: 12px; }
.secondary { border: 1px solid var(--border); background: var(--surface); font-size: 14px; }
.notice { padding: 14px 16px; border: 1px solid var(--accentBorder); background: var(--accentSoft); border-radius: 12px; font-size: 14px; line-height: 1.8; margin: 15px 0; }
.error { color: var(--danger); border-color: var(--danger); }
.result > h2 { font-size: 26px; }
.route { color: var(--muted); font-size: 14px; margin: 12px 0 22px; }
.quote-group { border-bottom: 1px solid var(--border); margin: 16px 0; padding-bottom: 14px; }
.quote-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 12px 0; color: var(--muted); font-size: 15px; }
.quote-row strong { color: var(--ink); font-size: 18px; font-variant-numeric: tabular-nums; }
.quote-row.emphasis { font-weight: 800; }
.total { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 24px; border: 1px solid var(--accentBorder); border-radius: 13px; background: var(--accentSoft); font-size: 19px; font-weight: 800; }
.total strong { color: var(--accentDeep); font-size: clamp(28px, 5vw, 39px); font-variant-numeric: tabular-nums; }
.footnote, footer { color: var(--muted); text-align: center; font-size: 13px; line-height: 1.8; margin-top: 16px; }
footer time { margin-inline-start: 7px; }
dialog { width: min(1000px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; border: 1px solid var(--accentBorder); border-radius: 20px; background: var(--surface); color: var(--ink); padding: 0; box-shadow: 0 24px 80px var(--shadow); }
dialog::backdrop { background: var(--overlay); backdrop-filter: blur(5px); }
dialog[open] { display: flex; flex-direction: column; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 25px 28px 20px; border-bottom: 1px solid var(--border); }
.dialog-heading h2 { font-size: 23px; margin-bottom: 7px; }
.dialog-heading p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; }
.dialog-body { padding: 24px 28px 0; overflow-y: auto; min-height: 0; }
.config-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; }
.config-grid h3 { font-size: 15px; margin-bottom: 17px; }
.quick-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
.quick-grid label { font-size: 12px; margin-bottom: 17px; }
.wide { grid-column: 1 / -1; }
.json-section > label { font-size: 14px; color: var(--ink); margin: 0 0 8px; }
.field-hint { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 6px 0 10px; }
#config-editor, #config-output { font-family: var(--mono); font-weight: 400; font-size: 12px; line-height: 1.7; tab-size: 2; resize: vertical; text-align: left; white-space: pre; }
#config-editor { min-height: 330px; }
#config-output { min-height: 180px; max-height: 300px; background: var(--background); }
.output-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.output-heading h3 { font-size: 15px; }
.status { font-size: 13px; color: var(--muted); padding: 12px 0; min-height: 42px; }
.dialog-heading, .dialog-footer { flex-shrink: 0; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 28px 22px; border-top: 1px solid var(--border); }
@media (max-width: 640px) { .topbar-inner { padding: 13px 18px; } .brand { font-size: 16px; } nav { gap: 12px; } .settings-button span { display: none; } .page { padding: 35px 16px 25px; } .hero { margin-bottom: 28px; } .hero > p { font-size: 15px; } .section-card { padding: 23px 20px; margin-bottom: 22px; } .section-title h2 { font-size: 18px; } .section-title { margin-bottom: 24px; } .config-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; } .dialog-heading, .dialog-body { padding: 20px; } .dialog-footer { padding: 16px 20px; flex-wrap: wrap; } .dialog-footer .primary { flex: 1; } .total { padding: 20px 14px; font-size: 16px; } .vehicle-options { gap: 8px; } .vehicle-options span { padding: 9px 14px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
