/* Clear Roads Winter Cost Tool
   Layout: white top bar; on Plans, a plan list | project editor | results column,
   stacking to one column on phones. */
:root {
  --bg: #f3f5f8; --surface: #ffffff; --surface-2: #eaeef4;
  --line: #d5dbe4; --line-strong: #aeb7c4;
  --ink: #161a20; --ink-2: #4a5260; --ink-3: #6c7584;
  --accent: #1f3c78; --accent-soft: #e3e9f7; --sky: #7d9be0;
  --s-labor: #2a78d6; --s-fuel: #eb6834; --s-salt: #1baf7a;
  --warn: #9a5b00; --warn-soft: #fdf1dc; --warm: #f8dccb; --good: #136b3c; --bad: #b42318;
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 6px;
}
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: .01em; text-wrap: balance; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.narrow { max-width: 64ch; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.gap-top { margin-top: 14px; margin-bottom: 8px; }
.form-group { margin-bottom: 0; }

/* Top bar */
/* Top bar ---------------------------------------------------------------------
   One row of brand | tabs | Feedback + account from 1024px wide (most laptops,
   even zoomed in); below that the
   tabs and buttons fold into the menu button. Written for every Bootstrap/bslib
   version: Bootstrap's own breakpoint and underline tab styles are overridden. */
.navbar {
  --bs-navbar-padding-y: 14px;
  background: var(--surface) !important; border-bottom: 1px solid var(--line);
  padding-top: 14px !important; padding-bottom: 14px !important; min-height: 0;
}
.navbar .container-fluid { max-width: 1600px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.navbar .navbar-header { display: flex; align-items: center; gap: 12px; margin: 0; float: none; }
.navbar .navbar-brand { margin: 0; padding: 0; height: auto; display: flex; align-items: center; float: none; }
.navbar .navbar-nav { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; float: none; }
.navbar .navbar-nav > li { display: flex; align-items: center; margin: 0; float: none; }
.navbar .navbar-nav .nav-link, .navbar .nav-link {
  display: block; font-weight: 600; color: var(--ink-2); line-height: 1.2;
  border: 0 !important; border-radius: 999px; padding: 8px 18px !important; margin: 0 !important;
}
.navbar .nav-link.active { background: var(--ink); color: #fff !important; }
.navbar .nav-link:hover:not(.active) { background: var(--surface-2); }
.navbar .bslib-nav-spacer { flex: 1 1 auto; margin: 0 !important; }
.navbar .form-inline { margin: 0; padding: 0; }
.feedback-btn { margin: 0; white-space: nowrap; }
.navbar .btn-sm { padding: 6px 12px; line-height: 1.2; }
.account { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; font-size: 13px; color: var(--ink-3); padding: 0; margin: 0; white-space: nowrap; }
.account b { color: var(--ink); font-weight: 600; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand .logo { background: #fff; border-radius: 4px; padding: 3px; display: inline-flex; line-height: 0; }
.brand .logo img { height: 28px; width: auto; }
.brand-name { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.draft { background: var(--warn-soft); color: var(--warn); border-radius: 4px; padding: 1px 6px; font-weight: 700; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.navbar .navbar-toggle, .navbar .navbar-toggler { margin: 0 0 0 auto; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); }
.navbar .navbar-toggle .icon-bar { display: block; width: 20px; height: 2px; border-radius: 1px; background: var(--ink-2); }
.navbar .navbar-toggle .icon-bar + .icon-bar { margin-top: 4px; }

/* wide: everything on one centred row */
@media (min-width: 1024px) {
  .navbar .navbar-toggle, .navbar .navbar-toggler { display: none !important; }
  .navbar.navbar.navbar.navbar.navbar.navbar.navbar.navbar .navbar-collapse { display: flex !important; flex: 1 1 auto; align-items: center; height: auto !important; visibility: visible; }
  .navbar .navbar-nav { flex-direction: row !important; width: 100%; }
}
@media (min-width: 1024px) and (max-width: 1649.98px) {
  .account-state { display: none; }   /* the Sign in button still shows; the text would crowd the row */
}
/* tighter spacing so the row still fits on smaller laptop screens */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .navbar .container-fluid { gap: 0 14px; }
  .navbar .navbar-nav { gap: 2px; }
  .navbar .navbar-nav .nav-link, .navbar .nav-link { padding: 8px 12px !important; }
  .brand-name { font-size: 20px; }
}

/* narrower: tabs and buttons fold into the menu */
@media (max-width: 1023.98px) {
  .navbar .navbar-header { width: 100%; justify-content: space-between; }
  .navbar .navbar-toggle, .navbar .navbar-toggler { display: block !important; order: 2; }
  .navbar.navbar.navbar.navbar.navbar.navbar.navbar.navbar .navbar-collapse:not(.show):not(.collapsing) { display: none !important; }
  .navbar.navbar.navbar.navbar.navbar.navbar.navbar.navbar .navbar-collapse.show, .navbar.navbar.navbar.navbar.navbar.navbar.navbar.navbar .navbar-collapse.collapsing { display: block !important; width: 100%; flex-basis: 100%; }
  .navbar .navbar-nav { flex-direction: column !important; align-items: stretch !important; gap: 4px; width: 100%; padding-top: 12px; }
  .navbar .navbar-nav > li { display: block; }
  .navbar .navbar-nav .nav-link { text-align: left; }
  .navbar .bslib-nav-spacer { display: none; }
  .navbar .bslib-nav-item { padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--line); }
  .navbar .bslib-nav-item + .bslib-nav-item { border-top: 0; margin-top: 0; padding-top: 4px; }
  .account { flex-wrap: wrap; white-space: normal; }
}

/* Page body */
.tab-content { max-width: 1320px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); }
.page-head { margin-bottom: 18px; }
.page-head h2 { font-size: 32px; margin: 2px 0 4px; }
.row-between { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; min-width: 0; }
.empty { color: var(--ink-3); font-size: 14px; padding: 20px 0; text-align: center; }
.btn { font-weight: 600; }
.btn-link { color: var(--ink-2); text-decoration: none; }
.btn-link:hover { background: var(--surface-2); color: var(--ink); }
.btn-link-action { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: inherit; }
.confirm { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--warn-soft); color: var(--warn); padding: 8px 12px; border-radius: var(--r); font-weight: 600; font-size: 14px; }
.contact { user-select: all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; color: var(--ink); }
.table-wrap { overflow-x: auto; }
.data-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.data-table th, .data-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table thead th { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.num-table td, .num-table th { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.num-table td:first-child, .num-table th:first-child { text-align: left; white-space: normal; }
.num-table tr.best td { font-weight: 700; }
.tag { font-size: 11px; font-weight: 700; color: var(--good); letter-spacing: .04em; text-transform: uppercase; margin-left: 6px; }

/* Home */
.home { display: flex; flex-direction: column; gap: 40px; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 12px 8px; max-width: 860px; }
.home-hero h1 { font-size: clamp(36px, 5vw, 54px); line-height: 1.02; margin: 6px 0 14px; }
.home-hero .lead { font-size: 18px; color: var(--ink-2); max-width: 60ch; }
.home-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.home-section h2 { font-size: 30px; margin-bottom: 14px; }
.home-sub h3 { font-size: 21px; margin: 0 0 10px; }
.home-sub { min-width: 0; }
.home-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0; margin: 0; }
.home-steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.home-steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.home-steps h3 { font-size: 21px; margin: 0 0 6px; }
.home-steps p { color: var(--ink-2); font-size: 14.5px; }
.home-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.home-two p { max-width: 62ch; color: var(--ink-2); }
.home-defs dt { font-weight: 600; margin-top: 10px; }
.home-defs dd { color: var(--ink-2); margin: 2px 0 0; max-width: 60ch; }
.home-limits { max-width: 78ch; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); padding-left: 20px; }
.home-limits b { color: var(--ink); font-weight: 600; }
.home-sources .narrow { max-width: 78ch; color: var(--ink-2); }

/* Plans */
.plans-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 24px; align-items: start; }
.planlist { grid-column: 1 / -1; }
.planlist-head { padding: 0 0 6px; }
.planlist-items { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.plan-btn { all: unset; box-sizing: border-box; display: block; padding: 10px 14px; border-radius: var(--r); cursor: pointer; border: 1px solid var(--line); background: var(--surface); }
.plan-btn:hover { border-color: var(--ink-2); }
.plan-btn:focus-visible { outline: 2px solid var(--sky); }
.plan-btn[aria-current="true"] { border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--ink); }
.plan-btn .pn { font-weight: 600; display: block; }
.plan-btn .pv { font-size: 13px; color: var(--ink-3); }
.new-plan { align-self: center; }
.editor { min-width: 0; }
.editor .shiny-input-container { width: 100% !important; margin-bottom: 0; }
input.plan-name { font-family: var(--font-display); font-size: 30px; font-weight: 600; border: 1px solid transparent; background: none; padding: 0 6px; margin-left: -6px; box-shadow: none; }
input.plan-name:hover { border-color: var(--line); }
input.plan-name:focus { border-color: var(--line-strong); background: var(--surface); box-shadow: none; }
.sub { color: var(--ink-3); font-size: 14px; margin: 4px 0 18px; }
.proj { display: flex; flex-direction: column; gap: 12px; }
.prow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.prow-in { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; min-width: 0; }
.prow .pl { font-size: 18px; font-weight: 600; line-height: 1.3; }
.prow-out { background: var(--surface-2); padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.prow-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 2px; }
.basis { font-style: italic; font-size: 13px; color: var(--ink-2); }
.remove { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; white-space: nowrap; }
.remove:hover { color: var(--bad); }
.prow-figs { display: flex; flex-direction: column; gap: 10px; }
.fig-main { font-size: 20px; line-height: 1.25; color: var(--ink); }
.fig-main b { font-weight: 700; }
.fig-sub { font-size: 12.5px; line-height: 1.35; color: var(--ink-3); margin-top: 1px; }
.gap-legend { margin-top: 8px; }
.qty { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.qbtn { border: 0; background: var(--surface-2); width: 34px; height: 36px; cursor: pointer; font-size: 18px; line-height: 1; color: var(--ink); }
.qbtn:hover { background: var(--line); }
.qty-input { width: 64px; border: 0; text-align: right; padding: 0 4px; height: 36px; background: none; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.qty-input:focus { outline: none; background: var(--accent-soft); }
.qunit { padding: 0 10px 0 4px; font-size: 13px; color: var(--ink-3); }
.equip-block { display: flex; flex-direction: column; gap: 8px; }
.equip-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.equip-label { font-size: 13px; color: var(--ink-2); min-width: 128px; margin: 0; }
.qty-sm .qbtn { width: 30px; height: 30px; font-size: 16px; }
.equip-input { width: 44px; border: 0; text-align: center; height: 30px; background: none; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.equip-input:focus { outline: none; background: var(--accent-soft); }

.hint { display: inline-flex; background: var(--warn-soft); color: var(--warn); border-radius: 4px; padding: 2px 8px; font-weight: 600; font-size: 12.5px; cursor: help; }
.addbox { margin-top: 14px; border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 14px; }
.addgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-top: 10px; }
.addbtn { all: unset; box-sizing: border-box; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.addbtn:hover { border-color: var(--ink-2); }
.addbtn:focus-visible { outline: 2px solid var(--sky); }
.addbtn .t { font-weight: 600; font-size: 14px; }
.addbtn .u { font-size: 12px; color: var(--ink-3); }
.planfoot { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
#plan_foot { margin-top: 18px; }
#plan_foot .planfoot { margin-top: 0; }

/* Results */
.results { position: sticky; top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* cost summary: four boxes */
.sum-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.sum-box { border-radius: 8px; padding: 12px 14px; min-width: 0; }
.sum-box.plain { background: var(--surface-2); }
.sum-box.warm { background: var(--warm); }
.sum-value { font-family: var(--font-display); font-size: 25px; font-weight: 700; line-height: 1.05; color: var(--ink); white-space: nowrap; }
.sum-label { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.delta { font-size: 13px; font-weight: 600; margin-top: 4px; }
.delta.up { color: var(--warn); }
.delta.down { color: var(--good); }

/* forecast */
.fc-body { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.fc-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fc-years { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin: 0; }
.fc-years .shiny-input-container { margin: 0; }
.fc-years input { text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; padding-block: 4px; }
.fc-total { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fc-total .sum-label { font-size: 13px; }
.fc-chart svg { display: block; width: 100%; height: auto; max-width: 100%; }
.fc-grid { stroke: var(--line); stroke-width: 1; }
.fc-axis { fill: var(--ink-3); font-size: 11px; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.fc-maint { fill: var(--accent); }
.fc-equip { fill: var(--sky); }
.fc-hit { fill: transparent; }
.fc-bar:hover .fc-maint { fill: #2d4f96; }
.fc-bar:hover .fc-equip { fill: #94acea; }
.fc-maint-key { background: var(--accent); }
.fc-equip-key { background: var(--sky); }
.fc-legend { gap: 4px 14px; }
.fc-controls .segctl { flex: 1 1 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.legend b { color: var(--ink); font-weight: 600; margin-left: 4px; font-variant-numeric: tabular-nums; }
.s-labor { background: var(--s-labor); }
.s-fuel { background: var(--s-fuel); }
.s-salt { background: var(--s-salt); }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar .bl { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 4px; }
.bar .bl span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .bl span:last-child { font-weight: 600; white-space: nowrap; }
.track { display: flex; gap: 2px; height: 14px; }
.track div { height: 100%; min-width: 0; cursor: default; }
.track div:first-child { border-radius: 3px 0 0 3px; }
.track div:last-child { border-radius: 0 3px 3px 0; }
.track div:only-child { border-radius: 3px; }
.bar .per { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.notes-body { margin-top: 10px; }
.notes-drop:has(#results_notes:empty) { display: none; }
.notes { display: flex; flex-direction: column; gap: 8px; }
.note { font-size: 13px; border-left: 3px solid var(--line-strong); padding: 2px 0 2px 10px; color: var(--ink-2); }
.note.act { border-color: var(--warn); }
.note b { color: var(--ink); }
.whatif { border-top: 1px solid var(--line); padding-top: 14px; }
.whatif summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.whatif summary::-webkit-details-marker { display: none; }
.whatif summary::after { content: "+"; font-size: 18px; color: var(--ink-3); }
.whatif[open] summary::after { content: "\2212"; }
.whatif p { margin: 6px 0 10px; }
.whatif .shiny-input-container { width: 100% !important; margin-bottom: 8px; }
.whatif .control-label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
/* Segmented buttons (seg_buttons() in functions/format.R): equal sections, no Bootstrap */
.segctl { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.segbtn { all: unset; box-sizing: border-box; display: block; min-width: 0; padding: 7px 6px; text-align: center; cursor: pointer; font-family: var(--font-body); font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.segbtn + .segbtn { border-left: 1px solid var(--line-strong); }
.segbtn:hover { background: var(--surface-2); }
.segbtn[aria-checked="true"] { background: var(--ink); color: #fff; }
.segbtn:focus-visible { outline: 2px solid var(--sky); outline-offset: -2px; }
.irs--shiny .irs-bar, .irs--shiny .irs-single { background: var(--accent); border-color: var(--accent); }
.mobilebar { display: none; }

/* Compare */
.chips .shiny-options-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chips .checkbox-inline, .chips .form-check-inline { margin: 0; padding: 0; }
.chips input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.chips .checkbox-inline span, .chips .form-check-inline label { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.chips .checkbox-inline:has(input:checked) span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips .checkbox-inline:has(input:checked) span::before { content: "\2713"; }
.chips .checkbox-inline:has(input:focus-visible) span { outline: 2px solid var(--sky); outline-offset: 2px; }
.chips { margin-bottom: 16px; }
.cmpgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 960px; }
.cmpgrid .bars { margin-top: 4px; }

/* Your numbers */
.numbers-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.agrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.agroup h3 { font-size: 20px; margin-bottom: 6px; }
.arow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.agroup h3 + .arow { border-top: 0; }
.arow .al { font-weight: 500; font-size: 14px; }
.arow .ainput { display: flex; align-items: center; gap: 8px; }
.arow .ainput input { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.arow .u { font-size: 12.5px; color: var(--ink-3); min-width: 108px; }
.arow-sub { grid-column: 1 / 3; font-size: 12.5px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.arow-sub .shiny-html-output { display: inline-flex; gap: 10px; }
.arow:has(.chg) .ainput input { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.chg { color: var(--accent); font-weight: 700; }
.nosrc { font-style: italic; }
details.src summary { cursor: pointer; }
details.src p { margin: 4px 0 0; max-width: 62ch; }
.research { margin-top: 24px; }
.research h3 { font-size: 20px; margin: 4px 0 6px; }

/* Sign-in */
.login-error { background: var(--warn-soft); color: var(--warn); border-radius: var(--r); padding: 8px 10px; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.modal-content { border-radius: 10px; }

/* Footer */
.site-footer { max-width: 1320px; margin: 0 auto; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; font-size: 13px; color: var(--ink-3); padding: 18px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px)); }
.site-footer .logo img { height: 26px; width: auto; }
.site-footer a { color: var(--ink-2); }

/* Narrower screens */
@media (max-width: 1100px) {
  .plans-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
}
@media (max-width: 1000px) and (min-width: 861px), (max-width: 640px) {
  .prow { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .plans-grid, .agrid, .home-hero, .home-two, .home-steps { grid-template-columns: minmax(0, 1fr); }
  .results { position: static; }

  .mobilebar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; }
  .mobilebar-btn { all: unset; box-sizing: border-box; width: 100%; display: flex; justify-content: space-between; gap: 12px; cursor: pointer; background: var(--ink); color: #fff; font-weight: 600; padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .tab-content { padding-bottom: 96px; }
}
@media (max-width: 576px) {
  .navbar .navbar-brand { min-width: 0; }
  .brand { gap: 8px; }
  .brand .logo img { height: 20px; }
  .brand-name { font-size: 18px; white-space: nowrap; }
  .draft { font-size: 10px; padding: 1px 5px; }
}
@media (max-width: 420px) {
  .draft { display: none; }
}
@media (max-width: 480px) {
  .arow { grid-template-columns: minmax(0, 1fr); }
  .arow .u { min-width: 0; }
  .arow-sub { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
