/* BidCalc shared styles. Design idea: the page looks like the auction invoice it works out.
   Catalogue serif for headings and totals, a clear sans for everything else, deep teal ink, one brass accent. */

@font-face { font-family: "Libre Caslon Text"; src: url(caslon-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url(caslon-700.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(public-sans.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ink: #0E2A25;
  --panel: #0E2A25;
  --fill: #0B4A3F;
  --brass: #C99A3B;
  --brass-text: #7A5A12;
  --seg: #ECE9DE;
  --on-ink: #F3F0E6;
  --on-ink-soft: #D2DAD5;
  /* names every existing page already uses, given the new values */
  --surface-0: #FBFAF6;
  --surface-2: #FFFFFF;
  --border: #DCD8CB;
  --text-primary: #0E2A25;
  --text-secondary: #4A5049;
  --text-muted: #5B5F58;
  --radius: 12px;
  --teal-50: #EEF4F0;
  --teal-800: #0B4A3F;
  --teal-900: #0E2A25;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { background: var(--surface-0); color: var(--text-primary); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { margin: 0; font-size: 16px; line-height: 1.55; }
a { color: var(--teal-800); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 16px; background: #fff; color: var(--ink); border-radius: 8px; font-weight: 600; }
.skip:focus { left: 12px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

h1, h2 { font-family: var(--serif); font-weight: 700; color: var(--teal-800); letter-spacing: -0.012em; }
h1 { font-size: clamp(31px, 4.6vw, 46px); line-height: 1.12; margin: 0 0 12px; }
h2 { font-size: 24px; line-height: 1.22; margin: 40px 0 10px; }
h3 { font-family: var(--sans); font-size: 17.5px; font-weight: 650; line-height: 1.3; color: var(--ink); margin: 22px 0 6px; }
p, li { font-size: 17px; line-height: 1.68; }
p { margin: 0 0 14px; }
ul, ol { padding-left: 22px; margin: 0 0 14px; }
li { margin-bottom: 6px; }

/* ------------------------------------------------------------------ header and tabs (every page) */
.site-header { background: var(--surface-0); border-bottom: 1px solid var(--border); padding-top: env(safe-area-inset-top, 0px); }
.site-header-inner { max-width: 1120px; margin: 0 auto; padding: 12px 20px 0; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 24px; }
.brand-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--teal-800); min-height: 44px; }
.brand-link img { width: 38px; height: 38px; border-radius: 9px; display: block; }
.brand-word { font-family: var(--serif); font-weight: 700; font-size: 26px; letter-spacing: -0.012em; }
.top-links { margin-left: auto; display: flex; gap: 4px; }
.top-links a { display: flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 14.5px; font-weight: 500; color: var(--text-secondary); text-decoration: none; }
.top-links a:hover { color: var(--teal-800); text-decoration: underline; text-underline-offset: 3px; }
.tabs { display: flex; gap: 2px; width: 100%; margin-top: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; font-size: 15px; font-weight: 500; color: var(--text-secondary); text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; }
.tabs a svg { stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.tabs a:hover { color: var(--teal-800); }
.tabs a[aria-current="page"] { color: var(--teal-800); font-weight: 650; border-bottom-color: var(--brass); }
@media (max-width: 640px) {
  .site-header-inner { padding: 8px 16px 0; gap: 0 12px; }
  .brand-link img { width: 34px; height: 34px; } .brand-word { font-size: 23px; }
  .tabs { padding-right: 36px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent); }
  .tabs a { padding: 0 11px; font-size: 14.5px; gap: 6px; }
}

/* ------------------------------------------------------------------ footer (every page) */
.footer-links { max-width: 1120px; margin: 56px auto 0; padding: 28px 20px 40px; border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 24px; text-align: left; font-size: 14.5px; line-height: 1.4; }
.footer-links .footer-row { display: flex; flex-direction: column; align-items: flex-start; flex-wrap: nowrap; margin: 0; }
.footer-links .footer-row > span { margin: 0 0 6px; font-family: var(--serif); font-weight: 700; font-size: 17px; color: var(--teal-800); }
.footer-links a { display: inline-block; padding: 7px 0; color: var(--text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--teal-800); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) { .footer-links { grid-template-columns: 1fr; gap: 14px; padding: 24px 16px 36px; } }
.page-footer { margin-top: 0; }

/* ------------------------------------------------------------------ shared pieces */
.crumbs { margin: 0 0 18px; font-size: 13.5px; color: var(--text-muted); }
.crumbs a { color: var(--text-muted); }
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; margin: 6px 8px 0 0; border: 1.5px solid var(--fill); border-radius: 12px; background: var(--fill); color: #fff;
  font-family: var(--sans); font-size: 15px; font-weight: 600; text-decoration: none; }
.btn.secondary { background: transparent; color: var(--teal-800); border-color: var(--teal-800); }
.btn:hover { filter: brightness(1.08); }
.updated { margin: 0 0 4px; font-size: 13.5px; color: var(--text-muted); }
.disclaimer { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13.5px; line-height: 1.55; color: var(--text-muted); }
.eyebrow { margin: 0 0 12px; font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: -0.01em; text-transform: none; color: var(--teal-800); }
.hidden { display: none; }

/* ------------------------------------------------------------------ reading pages: guides, about, terms, directory pages, setup page */
.page-doc main { max-width: 1120px; margin: 0 auto; padding: 32px 20px 8px; }
.page-doc article.card { background: transparent; border: 0; border-radius: 0; padding: 0; margin: 0; }
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
@media (min-width: 1000px) {
  .doc-grid.has-side { grid-template-columns: minmax(0, 700px) 300px; gap: 72px; justify-content: center; }
  .doc-side { position: sticky; top: 24px; align-self: start; }
}
.page-doc article.card > h1, .page-doc .doc-head h1 { max-width: 20em; }
.lead { margin: 0 0 14px; font-size: 20px; line-height: 1.6; color: var(--text-secondary); }
.page-doc article p, .page-doc article li { max-width: 40rem; }
.page-doc article .helps p, .page-doc article .helps li { max-width: none; }
.page-doc h2 { margin-top: 44px; }
.page-doc h2[id] { scroll-margin-top: 20px; }

table.example { width: 100%; border-collapse: separate; border-spacing: 0; margin: 16px 0 22px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  font-size: 16px; font-variant-numeric: tabular-nums; }
table.example td { padding: 11px 18px; border-bottom: 1.5px dotted var(--border); vertical-align: top; }
table.example tr:last-child td { border-bottom: 0; }
table.example td:last-child { text-align: right; white-space: nowrap; }
table.example tr.total td { border-top: 4px double var(--teal-800); border-bottom: 0; background: var(--teal-50); padding-top: 14px; padding-bottom: 14px; font-weight: 700; color: var(--teal-800); }
table.example tr.total td:last-child { font-family: var(--serif); font-size: 23px; line-height: 1.1; }
table.example thead td { background: var(--teal-50); font-weight: 650; font-size: 14px; color: var(--text-secondary); text-transform: none; letter-spacing: 0; border-bottom: 1px solid var(--border); }
table.example.three td:nth-child(2), table.example.three td:nth-child(3), table.example.num td:not(:first-child) { text-align: right; }
table.example.text td { text-align: left !important; white-space: normal !important; }
table.example.text td:first-child { white-space: nowrap !important; font-weight: 600; }
.formula { margin: 16px 0 20px; padding: 14px 18px; background: var(--teal-50); border-left: 4px solid var(--brass); border-radius: 0 12px 12px 0; font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.callout { margin: 18px 0; padding: 14px 18px; background: #FBF3DF; border: 1px solid #E6D3A0; border-radius: 12px; color: #5C440D; font-size: 15.5px; line-height: 1.6; }
.method { margin: 0 0 12px; padding: 16px 18px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.method h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 19px; color: var(--teal-800); }
.method p { margin: 0 0 6px; font-size: 16px; } .method p:last-child { margin-bottom: 0; }
.helps { margin: 36px 0 8px; padding: 22px 22px 18px; background: var(--teal-50); border: 1px solid #CFE0D8; border-radius: 16px; }
.helps h2 { margin: 0 0 8px; font-size: 21px; }
.helps p { margin-bottom: 10px; font-size: 16px; }
.doc-side .helps { margin: 0 0 20px; background: var(--panel); border: 0; color: var(--on-ink); }
.doc-side .helps h2 { color: #fff; }
.doc-side .helps p { color: var(--on-ink-soft); }
.doc-side .helps .btn { background: var(--brass); border-color: var(--brass); color: var(--panel); }
.doc-side .helps .btn.secondary { background: transparent; color: var(--on-ink); border-color: rgba(243, 240, 230, 0.4); }
.doc-side .helps a:not(.btn) { color: #fff; }
.toc { margin: 0 0 22px; padding: 0 0 0 2px; font-size: 15px; }
.toc-title { margin: 0 0 8px; font-family: var(--sans); font-size: 14.5px; font-weight: 650; color: var(--text-muted); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; font-size: 15px; line-height: 1.4; color: var(--text-secondary); text-decoration: none; }
.toc a:hover { color: var(--teal-800); border-left-color: var(--brass); }
@media (max-width: 999px) { .toc { display: none; } }
.related { margin-top: 36px; padding-top: 8px; border-top: 1px solid var(--border); }
.related h2 { font-size: 20px; margin-top: 18px; }
.related ul { list-style: none; padding: 0; }

.cat-title { margin: 38px 0 12px; font-family: var(--serif); font-size: 23px; font-weight: 700; letter-spacing: -0.01em; text-transform: none; color: var(--teal-800); }
.guide-card { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 16px; align-items: start; margin: 0 0 12px; padding: 18px 20px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; color: inherit; text-decoration: none; }
.guide-card:hover { border-color: var(--teal-800); }
.gc-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: var(--teal-50); color: var(--teal-800); }
.gc-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.guide-card h3 { margin: 0 0 3px; font-family: var(--serif); font-size: 19px; line-height: 1.25; color: var(--teal-800); }
.guide-card p { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--text-secondary); }
.guide-grid { display: grid; grid-template-columns: 1fr; gap: 0 18px; }
@media (min-width: 760px) { .guide-grid { grid-template-columns: 1fr 1fr; } }
.tools-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 18px; }
.tool-pill { flex: 1 1 30%; min-width: 150px; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--teal-50); color: var(--teal-800); border-radius: 14px; text-decoration: none; }
.tool-pill-title { font-weight: 650; font-size: 15px; } .tool-pill-sub { font-size: 14px; color: var(--text-secondary); }

/* ================================================================== calculator pages */
.page-calc main, .page-tool main, .page-dir main, .page-text main { margin: 0 auto; padding: 36px 20px 8px; }
.page-calc main, .page-dir main { max-width: 1120px; }
.page-tool main, .page-text main { max-width: 760px; }
.page-compare main { max-width: 1040px; }
@media (max-width: 640px) { .page-calc main, .page-tool main, .page-dir main, .page-text main, .page-doc main { padding-left: 16px; padding-right: 16px; padding-top: 26px; } }
.page-title { margin: 0 0 10px; font-family: var(--serif); font-size: clamp(31px, 4.6vw, 46px); font-weight: 700; line-height: 1.12; letter-spacing: -0.012em; text-align: left; color: var(--teal-800); }
.intro { max-width: 38em; margin: 0 0 28px; font-size: 18px; line-height: 1.6; text-align: left; color: var(--text-secondary); }
@media (max-width: 640px) { .intro { font-size: 16.5px; margin-bottom: 22px; } }

.page-tool .card, .page-text .card, .page-dir .card, .page-calc .lots-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 18px; padding: 1.6rem 1.5rem; margin-bottom: 16px; }
.page-calc .layout-row { display: block; }
.page-calc .layout-row > .card:first-child { background: transparent; border: 0; border-radius: 0; padding: 0; margin: 0; flex: none; max-width: none; }
.page-calc .layout-row > .lots-card { position: static; flex: none; width: 100%; margin-top: 32px !important; }

label { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.page-calc input[type="number"], .page-tool input[type="number"], .page-dir input[type="number"], .page-tool input[type="text"] {
  height: 52px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--ink); font-family: var(--sans); font-size: 17px; font-variant-numeric: tabular-nums; }
.page-calc input[type="number"]:focus, .page-tool input[type="number"]:focus, .page-tool input[type="text"]:focus { outline: none; border-color: var(--teal-800); box-shadow: 0 0 0 3px rgba(201, 154, 59, 0.5); }
.page-calc input.prefilled { background: #EEF4F0; border-color: #9DC1B3 !important; }
.field-grid { gap: 20px 16px; }
.field-hint { margin-top: 6px; font-size: 13.5px; line-height: 1.45; color: var(--text-muted); }
.checkbox-row { font-size: 15px; color: var(--text-secondary); }
.checkbox-row.inline { margin: 8px 0 0; min-height: 36px; font-size: 14.5px; font-weight: 400; }
.checkbox-row input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--teal-800); }
.info-btn { width: 18px; height: 18px; font-size: 11px; }
.prefill-notice { border-radius: 12px; padding: 10px 14px; font-size: 14px; background: #FBF3DF; border: 1px solid #E6D3A0; color: #5C440D; }

.mode-toggle { gap: 4px; padding: 4px; margin-bottom: 22px; background: var(--seg); border-radius: 14px; }
.mode-btn { min-height: 46px; border-radius: 10px; font-family: var(--sans); font-size: 15px; font-weight: 500; color: var(--text-secondary); }
.mode-btn.active { background: var(--surface-2); color: var(--teal-800); font-weight: 650; box-shadow: 0 1px 3px rgba(14, 42, 37, 0.16); }
.chip-row { gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--ink); font-family: var(--sans); font-size: 15px; }
.chip.active { background: var(--fill); border-color: var(--fill); color: #fff; font-weight: 600; }
.chip.small { min-height: 36px; padding: 0 13px; font-size: 14px; border-color: var(--border); background: var(--surface-2); color: var(--ink); border-radius: 999px; }
.chip.small.active { background: var(--fill); border-color: var(--fill); color: #fff; }

/* the "I plan to resell this" switch */
.checkbox-row.resale-toggle { border: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0 0; padding: 16px 18px; background: var(--teal-50); border-radius: 16px; text-align: left; cursor: pointer; font-size: 16px; font-weight: 600; color: var(--teal-800); }
.resale-toggle .t { flex: 1; display: block; }
.resale-toggle .t b { display: block; font-size: 17px; color: var(--teal-800); }
.resale-toggle .t small { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; color: var(--text-secondary); }
.checkbox-row.resale-toggle input[type="checkbox"] { -webkit-appearance: none; appearance: none; width: 52px; height: 30px; margin: 0; flex: 0 0 auto; border: 0; border-radius: 99px; cursor: pointer;
  background: radial-gradient(circle at 15px 50%, #fff 12px, transparent 12.5px), #B9C3BD; transition: background-color 0.15s; }
.checkbox-row.resale-toggle input[type="checkbox"]:checked { background: radial-gradient(circle at 37px 50%, #fff 12px, transparent 12.5px), var(--fill); }
.resale-panel { margin-top: 12px; padding: 20px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; }
.profit-box { margin-top: 14px; padding: 16px 18px; border-radius: 16px; }
.profit-box.positive { background: var(--teal-50); color: var(--teal-800); }
.profit-box.negative { background: #FBE7E4; color: #7A2A1E; }
.profit-box.neutral { background: #F1EFE8; color: var(--text-secondary); }
.profit-box .total-row span:last-child, .profit-row span:last-child { font-family: var(--serif); font-weight: 700; font-size: 32px; line-height: 1.1; }
.maxbid-box { margin-top: 12px; padding: 14px 18px; border-radius: 14px; background: var(--teal-50); }
.maxbid-box span:last-child { font-family: var(--serif); font-weight: 700; font-size: 22px; }

/* ------------------------------------------------------------------ the invoice: breakdown, total, actions */
.breakdown { border-top: 0; padding-top: 0; }
.breakdown table { font-size: 16px; font-variant-numeric: tabular-nums; }
.breakdown td { padding: 9px 0; border-bottom: 1.5px dotted var(--border); }
.breakdown tr:last-child td { border-bottom: 0; }
.breakdown td:first-child { color: var(--text-secondary); }
.total-box { margin-top: 18px; padding: 20px 22px; border-radius: 18px; background: var(--panel); color: var(--on-ink); }
.total-row span:first-child { font-size: 16px; font-weight: 600; }
.total-row span:last-child { font-family: var(--serif); font-weight: 700; font-size: 40px; line-height: 1.05; letter-spacing: -0.01em; color: #fff; }
.total-box .convert-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(243, 240, 230, 0.2); }
.total-box #out-converted, .total-box .converted-amount-row { color: var(--brass); font-weight: 500; }
.total-box .chip.small { background: transparent; border-color: rgba(243, 240, 230, 0.4); color: var(--on-ink); }
.total-box .chip.small.active { background: var(--brass); border-color: var(--brass); color: var(--panel); font-weight: 650; }
.total-box #row-maxbid { border-bottom: 1px solid rgba(243, 240, 230, 0.25) !important; }

/* home page: inputs on the left, the invoice on the right */
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 960px) { .calc-grid { grid-template-columns: minmax(0, 1fr) 430px; gap: 52px; align-items: start; } }
.calc-results { padding: 28px 26px 24px; background: var(--panel); color: var(--on-ink); border-radius: 22px; box-shadow: 0 22px 44px -24px rgba(14, 42, 37, 0.65); }
@media (min-width: 960px) { .calc-results { position: sticky; top: 20px; } }
.calc-results .breakdown { border: 0; padding: 0; }
.calc-results .breakdown td { color: var(--on-ink); border-bottom-color: rgba(243, 240, 230, 0.28); }
.calc-results .breakdown td:first-child { color: var(--on-ink-soft); }
.calc-results .total-box { margin-top: 14px; padding: 18px 0 0; border-radius: 0; border-top: 4px double rgba(243, 240, 230, 0.45); background: transparent; }
.calc-results .rate-note { margin-top: 18px; color: #A9BBB3; font-size: 13.5px; }
.calc-results .rate-note input { width: 100px; height: 36px; padding: 0 8px; font-size: 16px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(243, 240, 230, 0.28); color: var(--on-ink); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.add-lot-btn { grid-column: 1 / -1; width: 100%; height: 52px; margin: 0; border: 0; border-radius: 12px; background: var(--brass); color: var(--panel); font-family: var(--sans); font-size: 16px; font-weight: 650; }
.add-lot-btn:active { background: #B88A2E; }
.calc-results .copy-link-btn, .calc-results .pdf-btn { width: 100%; height: 48px; margin: 0; border: 1px solid rgba(243, 240, 230, 0.38); border-radius: 12px; background: transparent; color: var(--on-ink); font-family: var(--sans); font-size: 14.5px; font-weight: 600; }
.calc-results .copy-link-btn:active, .calc-results .pdf-btn:active { background: rgba(255, 255, 255, 0.1); }
.page-calc .total-row span:last-child.flash, #out-total.flash { animation: totalflash 0.35s ease-out; }
@keyframes totalflash { from { opacity: 0.35; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.sticky-total { background: var(--panel); }
#sticky-value { font-family: var(--serif); font-weight: 700; }

/* the lots list */
.lots-card .eyebrow { font-size: 22px; }
.lots-list li.lot-item { border-bottom: 1.5px dotted var(--border); }
.lots-total-row { font-size: 17px; font-weight: 650; }
.share-lots-btn { height: 44px; border: 1.5px solid var(--teal-800); border-radius: 12px; font-size: 14.5px; font-weight: 600; }
.clear-lots-btn { height: 44px; font-size: 14.5px; }

/* ------------------------------------------------------------------ Copart, Compare, Sell */
.page-tool .breakdown td { padding: 10px 0; }
.page-tool .total-row span:last-child { font-size: 36px; }
.page-copart .card + .card { margin-top: 18px; }
.profit-row span:first-child { font-size: 16px; font-weight: 600; }
.scenario-card { padding: 1.5rem; border: 1px solid var(--border); border-radius: 18px; background: var(--surface-2); }
.scenario-card.cheaper { border: 2px solid var(--teal-800); }
.scenario-title { font-size: 16px; font-weight: 650; color: var(--teal-800); }
.cheaper-badge { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 650; padding: 4px 11px; border-radius: 999px; background: var(--brass); color: var(--panel); }
.scenario-total { margin-top: 14px; padding: 16px 18px; border-radius: 14px; background: var(--teal-50); }
.scenario-total span:last-child { font-family: var(--serif); font-weight: 700; font-size: 28px; }
.shared-card { padding: 1.5rem; border: 1px solid var(--border); border-radius: 18px; background: var(--surface-2); }
.result-banner { padding: 22px 24px; border-radius: 18px; background: var(--panel); }
.result-banner .headline { font-family: var(--serif); font-size: 23px; font-weight: 700; margin-bottom: 4px; }
.result-banner .sub { font-size: 15px; color: var(--on-ink-soft); }
.page-content { margin-top: 36px; }
.page-content h2 { font-size: 24px; margin: 36px 0 10px; }
.page-content h3 { font-family: var(--sans); font-size: 17px; margin: 20px 0 6px; color: var(--ink); }
.page-content p, .page-content li { font-size: 16.5px; line-height: 1.68; }
.page-content details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.page-content summary { font-size: 16px; color: var(--teal-800); padding: 15px 0; }
table.fee-table { font-size: 15px; }
table.fee-table th { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text-secondary); }
table.fee-table td { border-bottom: 1.5px dotted var(--border); padding: 9px 4px; }

/* ------------------------------------------------------------------ home page content under the calculator */
.home-info { max-width: 820px; margin: 72px auto 0; }
.home-info h2 { margin: 44px 0 10px; font-size: 26px; }
.home-info h3 { margin: 22px 0 4px; }
.home-info p, .home-info li { font-size: 17px; }
.guide-links a { display: block; height: 100%; padding: 18px 20px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; text-decoration: none; color: var(--teal-800); font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.3; }
.guide-links a:hover { border-color: var(--teal-800); }
.guide-links a span { display: block; margin-top: 5px; font-family: var(--sans); font-weight: 400; font-size: 15.5px; line-height: 1.5; color: var(--text-secondary); }

/* ------------------------------------------------------------------ directory */
.category-row { gap: 8px; margin-bottom: 22px; }
.category-chip { min-height: 44px; padding: 0 18px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--ink); font-family: var(--sans); font-size: 15px; font-weight: 500; }
.category-chip.active { background: var(--fill); border-color: var(--fill); color: #fff; font-weight: 600; }
.dir-search { display: block; width: 100%; max-width: 440px; margin: 0 0 18px; }
.dir-search input { width: 100%; height: 52px; padding: 0 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 17px; }
.dir-search input:focus { outline: none; border-color: var(--teal-800); box-shadow: 0 0 0 3px rgba(201, 154, 59, 0.5); }
.dir-empty { padding: 18px; color: var(--text-secondary); font-size: 16px; }
.house-list { background: var(--surface-2); border: 1px solid var(--border); border-radius: 18px; padding: 6px; }
.house-item { padding: 14px 14px 14px 16px; border-bottom: 1.5px dotted var(--border); border-left: 4px solid transparent; border-radius: 0; }
.house-item:last-child { border-bottom: 0; }
.house-item.active { background: var(--teal-50); border-left-color: var(--brass); border-radius: 10px; }
.house-category { display: block; margin: 0 0 3px; padding: 0; background: transparent; border-radius: 0; text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 500; color: var(--text-muted); }
.house-name { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--teal-800); }
.house-address { font-size: 14.5px; color: var(--text-secondary); }
.map-panel { background: var(--surface-2); border: 1px solid var(--border); border-radius: 18px; padding: 12px; }
.map-frame-wrap { border-radius: 12px; }
.map-consent { background: var(--teal-50); }
.map-consent-title { font-family: var(--serif); font-size: 19px; }
.show-map-btn { background: var(--fill); border-radius: 12px; }
.selected-name { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--teal-800); }
.selected-address { font-size: 15px; }
.selected-btn { min-height: 46px; padding: 0 18px; border: 1.5px solid var(--teal-800); border-radius: 12px; font-size: 15px; font-weight: 600; }
.browse h2 { font-size: 26px; }
.browse h3 { font-family: var(--serif); font-size: 20px; color: var(--teal-800); }
.browse p, .browse li { font-size: 16.5px; }

/* ------------------------------------------------------------------ FAQ and privacy */
.faq-item { padding: 20px 0; border-bottom: 1.5px dotted var(--border); }
.faq-q { margin: 0 0 8px; font-family: var(--serif); font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--teal-800); }
.faq-a { font-size: 16.5px; line-height: 1.68; color: var(--text-secondary); }
.back-link { display: block; margin-top: 18px; text-align: left; font-size: 15.5px; }
.page-text .card h2 { margin: 34px 0 8px; font-size: 23px; }
.page-text .card h2:first-child { margin-top: 0; }
.page-text .card p, .page-text .card li { font-size: 16.5px; max-width: 44rem; }
.toast { border-radius: 12px; background: var(--panel); font-size: 14.5px; }

/* call-to-action card buttons: full width, centred, no awkward wrapping */
.doc-side .helps .btn { display: flex; justify-content: center; align-items: center; width: 100%; margin: 10px 0 0; padding: 10px 16px; text-align: center; line-height: 1.3; }
.helps .btn { max-width: 100%; }

button, input, select, textarea { font-family: inherit; }

.page-calc input[type="number"], .page-tool input[type="number"], .page-tool input[type="text"] { font-variant-numeric: lining-nums proportional-nums; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.dir-count { margin: 0 0 14px; font-size: 14.5px; color: var(--text-muted); }

.table-scroll { max-width: 100%; margin: 16px 0 22px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll table.example { margin: 0; min-width: 100%; }
@media (max-width: 560px) { table.example { font-size: 15px; } table.example td { padding: 10px 12px; } }

@media (max-width: 640px) { .lead { font-size: 18px; } }

/* PDF buttons on the Copart, Compare and Sell pages */
.page-tool .pdf-btn { width: 100%; height: 52px; margin-top: 16px; border: 1.5px solid var(--fill); border-radius: 12px; background: var(--fill); color: #fff; font-family: var(--sans); font-size: 16px; font-weight: 600; cursor: pointer; }
.page-compare .pdf-btn, .page-sell .pdf-btn { background: transparent; color: var(--teal-800); border-color: var(--teal-800); }

.selected-btn { background: var(--fill); border-color: var(--fill); color: #fff; }
.selected-btn.secondary { background: transparent; border-color: var(--teal-800); color: var(--teal-800); }


/* ================================================================== one layout for every calculator: inputs on the left, the invoice on the right */
.page-copart main, .page-sell main, .page-compare main { max-width: 1120px; }
.page-tool .page-content { max-width: 760px; margin-left: 0; margin-right: auto; }
.calc-inputs > .card, .calc-inputs > .shared-card, .calc-inputs > .scenario-card { margin: 0 0 18px; }
.calc-inputs > :last-child { margin-bottom: 0; }
.calc-results .btn-row { grid-template-columns: 1fr; }
.calc-results .pdf-btn { width: 100%; height: 50px; margin: 0; border: 1px solid rgba(243, 240, 230, 0.38); border-radius: 12px; background: transparent; color: var(--on-ink); font-family: var(--sans); font-size: 15px; font-weight: 600; cursor: pointer; }
.calc-results .pdf-btn:active { background: rgba(255, 255, 255, 0.1); }
.calc-results .total-box .total-row span:first-child { color: var(--on-ink); }

/* resale / profit results shown inside the invoice panel (home page and Copart) */
@media (min-width: 960px) and (max-height: 1050px) { .calc-results.has-resale { position: static; } }
.calc-results .profit-box .total-row span:last-child, .calc-results .profit-row span:last-child { color: inherit; }
.calc-results .resale-output { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(243, 240, 230, 0.22); }
.calc-results .resale-heading { margin: 0 0 8px; font-family: var(--serif); font-size: 20px; font-weight: 700; color: #fff; }
.calc-results .resale-output .breakdown { margin: 0; }
.calc-results .profit-box { margin-top: 14px; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); color: var(--on-ink); }
.calc-results .profit-box .total-row span:first-child, .calc-results .profit-row span:first-child { font-size: 16px; font-weight: 600; color: var(--on-ink); }
.calc-results .profit-box .total-row span:last-child, .calc-results .profit-row span:last-child { font-family: var(--serif); font-weight: 700; font-size: 34px; line-height: 1.05; }
.calc-results .profit-box.positive .total-row span:last-child, .calc-results .profit-box.positive .profit-row span:last-child { color: #8FE3CB; }
.calc-results .profit-box.negative { background: rgba(247, 179, 165, 0.14); }
.calc-results .profit-box.negative .total-row span:last-child, .calc-results .profit-box.negative .profit-row span:last-child { color: #F9B8AA; }
.calc-results .profit-box.neutral .profit-row span:last-child { color: var(--on-ink-soft); }
.calc-results .profit-sub { margin: 6px 0 0; font-size: 14.5px; color: var(--on-ink-soft); opacity: 1; }
.calc-results .maxbid-box { margin-top: 12px; padding: 14px 18px; border-radius: 14px; background: rgba(201, 154, 59, 0.16); color: var(--on-ink); }
.calc-results .maxbid-box span:first-child { font-size: 15px; font-weight: 500; color: var(--on-ink); }
.calc-results .maxbid-box span:last-child { font-family: var(--serif); font-weight: 700; font-size: 24px; color: #F0CF8A; }

/* Compare: the verdict and both totals live in the invoice panel */
.page-compare .scenario-grid { display: block; margin: 0; }
.page-compare .scenario-card { margin: 0 0 18px; }
.scenario-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin: 6px 0 4px; }
.scenario-fields .field-row { margin: 0; }
.scenario-fields .field-row .checkbox-row { margin-top: 8px; font-size: 14px; }
@media (max-width: 480px) { .scenario-fields { grid-template-columns: 1fr; } }
.calc-results .result-banner { margin: 0 0 6px; padding: 0; border-radius: 0; background: transparent; }
.calc-results .result-banner .headline { margin: 0 0 6px; font-family: var(--serif); font-size: 27px; font-weight: 700; line-height: 1.2; color: #fff; }
.calc-results .result-banner .sub { font-size: 15.5px; color: var(--on-ink-soft); }
.compare-summary { width: 100%; margin-top: 12px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.compare-summary td { padding: 12px 0; border-top: 1.5px dotted rgba(243, 240, 230, 0.3); font-size: 16px; color: var(--on-ink-soft); vertical-align: baseline; }
.compare-summary td:last-child { text-align: right; font-family: var(--serif); font-weight: 700; font-size: 27px; line-height: 1.1; color: #fff; }
.compare-summary tr.cheaper td:first-child { color: #fff; font-weight: 650; }
.compare-summary tr.cheaper td:last-child { color: #8FE3CB; }
.compare-summary .badge { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: var(--brass); color: var(--panel); font-size: 12.5px; font-weight: 650; }

/* floating total on phones (every calculator) */
.sticky-total { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; justify-content: space-between; align-items: baseline; gap: 12px; cursor: pointer;
  background: var(--panel); color: #fff; box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25); padding: 10px 18px calc(10px + env(safe-area-inset-bottom, 0px)); }
.sticky-total.show { display: flex; }
#sticky-label { font-size: 13px; color: #B7CFC7; }
#sticky-value { font-family: var(--serif); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
body.has-sticky { padding-bottom: 64px; }
@media (min-width: 960px) { .sticky-total { display: none !important; } }

/* colour theme button (the header) */
.theme-btn { visibility: hidden; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: 2px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--text-secondary); cursor: pointer; }
.theme-ready .theme-btn { visibility: visible; }
.theme-btn:hover { color: var(--teal-800); background: var(--teal-50); }
.theme-btn svg { display: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn[data-mode="auto"] .i-auto, .theme-btn[data-mode="light"] .i-light, .theme-btn[data-mode="dark"] .i-dark { display: block; }
.theme-btn .i-auto path { fill: currentColor; }

.calc-results .total-row span:last-child { font-size: 40px; }
.calc-results .total-box .total-row span:first-child { font-size: 16px; font-weight: 600; }

.compare-summary .badge.hidden { display: none; }
.calc-results .result-banner { text-align: left; }

/* ================================================================== dark mode: automatic (follows the visitor's device) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #ECE9DF;
    --fill: #1F7A67;
    --seg: #1B2D28;
    --surface-0: #0A1512;
    --surface-2: #12211D;
    --border: #2D3F39;
    --text-primary: #ECE9DF;
    --text-secondary: #C5CCC6;
    --text-muted: #9FABA4;
    --teal-50: #17302A;
    --teal-800: #74D2BC;
    --teal-900: #ECE9DF;
  }
  :root:not([data-theme="light"]) .skip {
    background: #12211D;
    color: #ECE9DF;
  }
  :root:not([data-theme="light"]) .callout,
  :root:not([data-theme="light"]) .prefill-notice {
    background: #2B2410;
    border-color: #5A4A1B;
    color: #E8D49A;
  }
  :root:not([data-theme="light"]) .page-calc input.prefilled {
    background: #17302A;
    border-color: #3E7A69 !important;
  }
  :root:not([data-theme="light"]) .calc-results,
  :root:not([data-theme="light"]) .doc-side .helps {
    border: 1px solid #2D4A42;
  }
  :root:not([data-theme="light"]) .calc-results .total-box {
    border: 0;
    border-top: 4px double rgba(243, 240, 230, 0.45);
  }
  :root:not([data-theme="light"]) .helps {
    border-color: #2D4A42;
  }
  :root:not([data-theme="light"]) .btn.secondary {
    color: var(--teal-800);
  }
  :root:not([data-theme="light"]) .checkbox-row.resale-toggle input[type="checkbox"] {
    background: radial-gradient(circle at 15px 50%, #fff 12px, transparent 12.5px), #4B5A55;
  }
  :root:not([data-theme="light"]) .checkbox-row.resale-toggle input[type="checkbox"]:checked {
    background: radial-gradient(circle at 37px 50%, #fff 12px, transparent 12.5px), var(--fill);
  }
  :root:not([data-theme="light"]) .site-header,
  :root:not([data-theme="light"]) .footer-links {
    border-color: var(--border);
  }
  :root:not([data-theme="light"]) .tabs a[aria-current="page"] {
    color: var(--teal-800);
  }
  :root:not([data-theme="light"]) input[type="number"],
  :root:not([data-theme="light"]) input[type="text"],
  :root:not([data-theme="light"]) input[type="search"],
  :root:not([data-theme="light"]) select {
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) table.example tr.total td {
    color: var(--teal-800);
  }
  :root:not([data-theme="light"]) .brand-link img {
    filter: brightness(1.05);
  }
}

/* dark mode: chosen with the button in the header */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ECE9DF;
  --fill: #1F7A67;
  --seg: #1B2D28;
  --surface-0: #0A1512;
  --surface-2: #12211D;
  --border: #2D3F39;
  --text-primary: #ECE9DF;
  --text-secondary: #C5CCC6;
  --text-muted: #9FABA4;
  --teal-50: #17302A;
  --teal-800: #74D2BC;
  --teal-900: #ECE9DF;
}
:root[data-theme="dark"] .skip {
  background: #12211D;
  color: #ECE9DF;
}
:root[data-theme="dark"] .callout,
:root[data-theme="dark"] .prefill-notice {
  background: #2B2410;
  border-color: #5A4A1B;
  color: #E8D49A;
}
:root[data-theme="dark"] .page-calc input.prefilled {
  background: #17302A;
  border-color: #3E7A69 !important;
}
:root[data-theme="dark"] .calc-results,
:root[data-theme="dark"] .doc-side .helps {
  border: 1px solid #2D4A42;
}
:root[data-theme="dark"] .calc-results .total-box {
  border: 0;
  border-top: 4px double rgba(243, 240, 230, 0.45);
}
:root[data-theme="dark"] .helps {
  border-color: #2D4A42;
}
:root[data-theme="dark"] .btn.secondary {
  color: var(--teal-800);
}
:root[data-theme="dark"] .checkbox-row.resale-toggle input[type="checkbox"] {
  background: radial-gradient(circle at 15px 50%, #fff 12px, transparent 12.5px), #4B5A55;
}
:root[data-theme="dark"] .checkbox-row.resale-toggle input[type="checkbox"]:checked {
  background: radial-gradient(circle at 37px 50%, #fff 12px, transparent 12.5px), var(--fill);
}
:root[data-theme="dark"] .site-header,
:root[data-theme="dark"] .footer-links {
  border-color: var(--border);
}
:root[data-theme="dark"] .tabs a[aria-current="page"] {
  color: var(--teal-800);
}
:root[data-theme="dark"] input[type="number"],
:root[data-theme="dark"] input[type="text"],
:root[data-theme="dark"] input[type="search"],
:root[data-theme="dark"] select {
  color-scheme: dark;
}
:root[data-theme="dark"] table.example tr.total td {
  color: var(--teal-800);
}
:root[data-theme="dark"] .brand-link img {
  filter: brightness(1.05);
}

:root[data-theme="light"] { color-scheme: light; }

/* Affiliate advert slot: one per page, always labelled, never near the calculator result */
.aff-slot { margin: 28px auto 8px; max-width: 728px; text-align: center; }
.aff-slot .aff-tip { margin: 0 0 10px; font-size: 15px; color: var(--text-secondary); text-align: left; }
.aff-slot .aff-tag { display: block; margin: 0 0 4px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); text-align: left; }
.aff-slot a { display: block; border-radius: 8px; overflow: hidden; line-height: 0; }
.aff-slot img { width: 100%; height: auto; display: block; }
.aff-slot a:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }

/* Jump-to list on the location pages */
.jump-list { margin: 18px 0 8px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.jump-list .jump-title { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-secondary); }
.jump-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.jump-list a { display: inline-block; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; text-decoration: none; line-height: 1.3; }
.jump-list a:hover { border-color: var(--brass); }
.house { scroll-margin-top: 16px; }
/* Wide tables that scroll sideways on phones can be scrolled with the keyboard */
.table-scroll:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

/* carVertical box on car pages: labelled advert, styled as a tip rather than a banner */
.cv-card { margin: 24px 0; padding: 18px 20px 20px; background: var(--surface-2); border: 1px solid var(--border); border-left: 4px solid var(--brass); border-radius: 14px; }
.cv-card .aff-tag { display: block; margin: 0 0 6px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.cv-card .cv-title { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: var(--text-primary); }
.cv-card .cv-text { margin: 0 0 14px; font-size: 15px; line-height: 1.55; color: var(--text-secondary); }
.cv-card .cv-code, .cv-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.04em; color: var(--text-primary); background: var(--surface-0); border: 1px dashed var(--border); border-radius: 6px; padding: 1px 6px; }
.cv-card .cv-btn { margin: 0; }

/* Slim carVertical line near the top of the car directory pages */
.cv-strip { max-width: 760px; margin: 12px 0 4px; padding: 10px 14px; border-left: 3px solid var(--brass); background: var(--surface-2); border-radius: 0 10px 10px 0; }
.cv-strip .aff-tag { display: block; margin: 0 0 2px; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.cv-strip p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--text-secondary); }
.cv-strip a { font-weight: 600; }

/* -20% bubble on the carVertical adverts */
.cv-card { position: relative; }
.cv-badge { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; justify-content: center; min-width: 58px; height: 34px; padding: 0 10px; border-radius: 999px; background: var(--brass); color: #14110a; font-size: 15px; font-weight: 800; letter-spacing: 0.02em; transform: rotate(-4deg); }
.cv-card .cv-title { padding-right: 76px; }
.cv-badge.cv-badge-inline { position: static; min-width: 0; height: auto; padding: 1px 8px; margin-right: 8px; font-size: 13px; transform: none; vertical-align: 1px; }
@media (max-width: 520px) { .cv-card .cv-btn { width: 100%; justify-content: center; text-align: center; } }
