/* The home page (redesign, Sep 2026): the rental company first — the days left, the question, the rule as two limit
   signs (the page's one motion: they drop in like stamps), a still picture of the fleet check's answer — then the
   single-car owner with the calculator's example card, then the questions. The calculator's guided steps follow. */
.home { gap: 96px; }

.home-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "text signs"
    "fleet fleet"
    "plan plan";
  gap: 44px 64px;
  align-items: center;
  padding-top: 20px;
}

.home-hero-text { grid-area: text; }

.countdown {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  padding: 6px 16px 6px 12px;
  border: 1px solid color-mix(in srgb, var(--err) 35%, var(--rule));
  border-radius: 999px;
  background: var(--cell);
  font-size: 15px;
  color: var(--ink-2);
}

.countdown::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--err);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--err) 18%, transparent);
}

.countdown strong {
  font-family: var(--display);
  font-weight: 700;
  color: var(--err);
}

#home-title {
  max-width: 15ch;
  font-size: clamp(40px, 20px + 3.6vw, 78px);
  font-variation-settings: "wdth" 100;
  line-height: 1;
  letter-spacing: -0.035em;
}

.home-hero .lede {
  max-width: 54ch;
  margin-top: 24px;
  font-size: 19px;
  line-height: 1.55;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 32px;
}

.btn-lg {
  min-height: 58px;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 18px;
}

.home-fine {
  margin: 0;
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink-3);
}

/* The third door (the one-car page): the small line sits under its button, not beside it. */
.home-one-door {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.home-signs {
  grid-area: signs;
  display: flex;
  gap: 22px;
}

.home-signs .limit-sign {
  --size: 176px;
  animation: sign-in 0.6s cubic-bezier(0.2, 0.9, 0.25, 1.2) 0.1s both;
}

.home-signs .limit-sign + .limit-sign {
  animation-delay: 0.26s;
}

@keyframes sign-in {
  from {
    opacity: 0;
    transform: scale(1.4) rotate(-10deg);
  }
}

.home-fleet {
  grid-area: fleet;
  margin: 0;
  padding: 26px 30px 22px;
  background: var(--cell);
  border: 1px solid var(--rule);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow);
}

.home-fleet figcaption,
.home-plan-road figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  font-size: 16px;
  color: var(--ink-2);
}

.home-fleet-big,
.home-plan-big {
  font-family: var(--display);
  font-variation-settings: "wdth" 86;
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  color: var(--err);
}

.home-plan-big { color: var(--ok); }

.home-fleet .lanes { margin-top: 16px; }

/* The answer to the picture above: the same lanes under the best plan. A lane keeps its colour up to the day the car
   leaves; a blue mandatory-sign disc marks the action there (sold and replaced, or bought); after it the lane runs on
   green. A dashed plate is a car to buy, as in the fleet page's parking bays. */
.home-plan {
  grid-area: plan;
  padding: 30px 30px 26px;
  background: var(--cell);
  border: 1px solid var(--rule);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow);
}

.home-plan h2 {
  margin: 0;
  font-size: clamp(26px, 20px + 1vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.home-plan-answer {
  margin: 10px 0 0;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}

.home-plan-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  gap: 32px 40px;
  margin-top: 26px;
}

.home-plan-road {
  min-width: 0;
  margin: 0;
}

.home-plan-road .lanes { margin-top: 16px; }

.plan-lane .lane-status { color: var(--novel-ink); }
.plan-lane.is-keep .lane-status { color: var(--ok); }
.plan-lane.from-out { --old: var(--err); }
.plan-lane.from-later { --old: var(--amber); }

/* Bars are thick top borders, like .lane-bar, so they print. */
.plan-old,
.plan-new {
  position: absolute;
  top: 9px;
  border-top: 8px solid;
  border-radius: 4px;
}

.plan-old {
  left: 0;
  right: calc(100% - var(--to));
  border-top-color: color-mix(in srgb, var(--old) 38%, transparent);
}

.plan-new {
  left: var(--from, 0%);
  right: 13px;
  border-top-color: color-mix(in srgb, var(--ok) 60%, transparent);
}

/* The arrow: the car is still on the road when the plan ends. */
.plan-new::after {
  content: "";
  position: absolute;
  top: -13px;
  right: -13px;
  border-style: solid;
  border-width: 9px 0 9px 13px;
  border-color: transparent transparent transparent var(--ok);
}

.plan-sign {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 5h11M10 2l3 3-3 3M14 11H3M6 8l-3 3 3 3'/%3E%3C/svg%3E");
  position: absolute;
  top: 50%;
  left: var(--at);
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--novel-ink);
  box-shadow: 0 0 0 3px var(--cell);
  transform: translate(-50%, -50%);
}

.plan-sign.is-buy {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M8 2.5v11M2.5 8h11'/%3E%3C/svg%3E");
}

.plan-sign::after {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--on-fill);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.plate.plate-buy {
  border-style: dashed;
  border-color: var(--novel-ink);
  background: transparent;
  color: var(--novel-ink);
}

.plate-buy .plate-no {
  font-size: 13.5px;
  letter-spacing: 0.01em;
}

/* The plan page (/filo-plani, fleet-plan.js) adds three moves to the home picture's: a car sold for the bank (its lane
   stops at a down-arrow sign), a car moved to long-term rent (a dashed line runs on after a calendar sign), and the
   withheld cars (one grey dashed lane with a padlock, no positions). A car kept on daily rent before its move is green. */
.plan-lane { --old: var(--ok); }

.plan-new.is-long {
  border-top-style: dashed;
  border-top-color: color-mix(in srgb, var(--novel-ink) 55%, transparent);
}

.plan-new.is-long::after { border-color: transparent transparent transparent var(--novel-ink); }

.plan-sign.is-sell {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v8M4.5 6.5 8 10l3.5-3.5M3 13.5h10'/%3E%3C/svg%3E");
}

.plan-sign.is-long {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='3.5' width='11' height='10' rx='1.5'/%3E%3Cpath d='M2.5 7h11M5.5 2v3M10.5 2v3'/%3E%3C/svg%3E");
}

.plan-sign.is-lock {
  --at: 50%;
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='10' height='7.5' rx='1.2'/%3E%3Cpath d='M5 7V4.8a3 3 0 0 1 6 0V7'/%3E%3C/svg%3E");
  background: var(--ink-3);
}

.plan-locked {
  position: absolute;
  top: 9px;
  left: 0;
  right: 0;
  border-top: 8px dashed color-mix(in srgb, var(--ink-3) 35%, transparent);
  border-radius: 4px;
}

.plan-lane.is-locked .lane-status { color: var(--ink-3); }

/* The plan page's answer card: the sentence above the big number, the two facts side by side under it. */
.plan-answer {
  margin: 6px 0 2px;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}

.plan-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 40px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-2);
}

.plan-cash.is-none .plan-fact-big { color: var(--ok); }

.plan-lanes-card .lanes { margin-top: 10px; }

/* The two facts beside the lanes: the cash to find (its month-by-month line) and how often the plan beats the bank. */
.home-plan-facts {
  display: grid;
  align-content: start;
  gap: 30px;
  padding-left: 36px;
  border-left: 1px solid var(--rule-2);
}

.plan-fact { margin: 0; }

.plan-fact figcaption {
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-2);
}

.plan-fact-big {
  display: block;
  margin-bottom: 6px;
  font-family: var(--data);
  font-variation-settings: "wdth" 86;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.plan-cash .plan-fact-big { color: var(--err); }

.plan-cash-line {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 16px;
  overflow: visible;
}

.plan-cash-zero {
  stroke: var(--ink-3);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.plan-cash-neg { fill: color-mix(in srgb, var(--err) 24%, transparent); }

.plan-cash-path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plan-cash-min {
  fill: var(--err);
  stroke: var(--cell);
  stroke-width: 2.5;
}

.plan-cash-years {
  position: relative;
  height: 16px;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.plan-cash-years > span { position: absolute; top: 0; }

.plan-fact .odds-track { margin-top: 14px; }

.home-plan-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 28px;
}

/* The bad economy, in view: a warning sign, the road's own triangle. */
.home-plan-risk {
  display: flex;
  flex: 1 1 360px;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 16px;
  background: var(--warm-wash);
  border-radius: var(--r-field);
  font-size: 15px;
  color: var(--ink-2);
}

.home-plan-risk::before {
  content: "";
  flex: none;
  width: 24px;
  height: 21px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 21'%3E%3Cpath d='M12 1.8 22.4 19.4H1.6z' fill='%23fff' stroke='%23D0262D' stroke-width='2.6' stroke-linejoin='round'/%3E%3Cpath d='M12 8.2v5' stroke='%2316213A' stroke-width='2.2' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='16.1' r='1.3' fill='%2316213A'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* The single-car owner: the question and two doors on the left, the calculator's typed-in example on the right. */
.home-owner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 40px 72px;
  align-items: center;
}

/* h1: the UK home page opens with this section (Pages/Uk/Home.cshtml). */
.home-owner h1,
.home-owner h2 {
  max-width: 17ch;
  font-size: clamp(28px, 18px + 1.6vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.home-owner .lede { margin-top: 16px; }

.home-doors {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.home-door {
  display: grid;
  gap: 4px;
  padding: 18px 22px;
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  background: var(--cell);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.16s, background-color 0.16s;
}

.home-door strong {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
}

.home-door span {
  font-size: 15px;
  color: var(--ink-2);
}

.home-door:hover {
  border-color: var(--novel-ink);
  background: var(--novel-wash);
}

.example-preview { border: 1px solid var(--rule); border-radius: var(--r-panel); background: var(--cell); box-shadow: var(--shadow); min-width: 0; overflow: hidden; }
.example-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 18px 26px; border-bottom: 1px solid var(--rule-2); }
.example-heading .eyebrow { font-weight: 600; color: var(--ink); }
.example-badge { border: 1px solid var(--rule); border-radius: 999px; padding: 3px 10px; font: 500 13px var(--body); color: var(--ink-2); }
.example-inputs { display: grid; grid-template-columns: 1.1fr 1.2fr 1fr; margin: 0; padding: 16px 26px; background: var(--cell-2); border-bottom: 1px solid var(--rule-2); gap: 14px; }
.example-inputs > div + div { border-left: 1px solid var(--rule); padding-left: 14px; }
.example-inputs dt { font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.example-inputs dd { margin: 0; font: 600 17px var(--data); white-space: nowrap; }
.example-inputs dd span { font: 13px var(--body); color: var(--ink-2); }
.example-result { padding: 24px 26px; }
.example-answer { display: flex; align-items: center; gap: 5px; font-size: 17px; margin: 0 0 12px; }
.verdict-mark { display: inline-grid; place-items: center; width: 26px; height: 26px; background: var(--ok-wash); color: var(--ok); margin-right: 5px; border-radius: 50%; }
.example-gain { font: 700 clamp(40px, 3.6vw, 54px) var(--data); font-variation-settings: "wdth" 86; letter-spacing: -0.03em; color: var(--ok); margin: 0 0 24px; }
.example-gain > span { display: block; font: 15px/1.5 var(--body); letter-spacing: normal; margin-top: 6px; color: var(--ink-2); }
.example-odds { margin: 0; }
.example-odds figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; margin-bottom: 10px; color: var(--ink-2); }
.example-odds figcaption strong { font: 700 22px var(--data); color: var(--ink); }
.odds-track { display: flex; height: 14px; border-radius: 999px; overflow: hidden; }
.odds-track > span { display: block; height: 100%; background: var(--ok); }
.odds-track > .odds-bank { background: var(--novel-ink); border-left: 3px solid var(--cell); }
.odds-legend { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.odds-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.odds-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.odds-legend > span:last-child i { background: var(--novel-ink); }
.example-risk { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; background: var(--warm-wash); border-radius: var(--r-field); padding: 12px 16px; margin: 0 26px; font-size: 14px; color: var(--ink-2); }
.example-risk strong { font-weight: 600; color: var(--ink); }
.example-footer { padding: 16px 26px 20px; }
.example-source { font: 13px/1.6 var(--body); color: var(--ink-3); margin: 0 0 6px; }
.example-assumptions { color: var(--ink-2); }
.example-assumptions summary { font-size: 14px; font-weight: 600; color: var(--novel-ink); cursor: pointer; }
.example-assumptions p { font-size: 14px; line-height: 1.6; margin: 12px 0 0; }

/* The questions people search for. */
.home-section { margin-top: 0; }
.home-section > h2, .support-intro h2 { font-size: clamp(26px, 20px + 1vw, 34px); letter-spacing: -0.02em; margin: 0 0 22px; }
.home-support { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 56px; padding-bottom: 8px; }
.trust-line { font-size: 16px; color: var(--ink-2); line-height: 1.7; }
.home-support .faq { max-width: none; min-width: 0; }
.home-support .faq-item { background: transparent; }
.home-support .faq-item summary { font-size: 17px; padding-block: 18px; }
.home-support .faq-item p { margin-bottom: 0; }
.faq-more > summary { cursor: pointer; font-size: 15px; font-weight: 600; color: var(--novel-ink); padding: 18px 0; }
.faq-more[open] > summary { border-bottom: 1px solid var(--rule); }
.guide-links { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; font-size: 15px; font-weight: 600; margin-top: 24px; }
.home a:focus-visible, .home summary:focus-visible { outline: 2px solid var(--novel-ink); outline-offset: 5px; }

/* ------------------------------------------------ the calculator's guided steps -- */
.workbench .pagehead { padding-bottom: 8px; }
.workbench .pagehead h1 { font-size: clamp(30px, 4vw, 46px); }
.workbench .pagehead .lede { font-size: 16px; max-width: 560px; }
.guide-progress { padding: 20px 20px 0; }
.guide-progress ol { display: flex; padding: 0; margin: 0; list-style: none; gap: 5px; }
.guide-progress li { flex: 1; min-width: 0; }
.guide-progress button { width: 100%; min-height: 44px; padding: 8px 4px; font: 600 12px var(--body); color: var(--ink-2); background: var(--paper); border: 0; border-bottom: 3px solid var(--rule); cursor: pointer; }
.guide-progress button[aria-current] { color: var(--novel-ink); background: var(--novel-wash); border-color: var(--novel-ink); }
.guide-progress > p { font-size: 12px; line-height: 1.5; color: var(--ink-2); margin: 14px 0 0; }
.guide-navigation { display: flex; justify-content: space-between; gap: 20px; padding: 0 20px 20px; }
.guide-navigation #guide-next { margin-left: auto; }
.guided [data-guide-hidden="true"] { display: none !important; }
.guided[data-guide-last="false"] .actions #calc-button { display: none; }
.guided .ask-desc { display: none; }
.guided .ask-choice[aria-checked="true"] .ask-desc { display: block; }
.guided .ask-choice { padding: 12px; min-height: 48px; }
.guided .hint, .guided #macro-list { display: none; }
.guided .ask { margin-bottom: 0; }
.guided .panel-body { display: block; }
.guided .actions { position: static; }
.guided [data-rows="talep-km"] { display: none; }
.guided [data-chips="scenario"] [data-key="custom"] { display: none; }
.guided .actions { padding-top: 10px; }
.result-placeholder { padding: 32px 28px; border: 1px dashed var(--rule); border-radius: 12px; background: var(--cell-2); text-align: center; }
.placeholder-mark { color: var(--novel-ink); font-size: 60px; line-height: 1.1; margin-bottom: 20px; }
.result-placeholder h3 { font-size: 24px; margin: 0 0 12px; }
.result-placeholder p { color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.result-placeholder .placeholder-steps { font-size: 12px; margin-top: 28px; }
.report-details { margin-top: 14px; border: 1px solid var(--rule); background: var(--cell); padding: 14px; }
.report-details > summary, .report-chart-fold > summary { font-size: 14px; font-weight: 600; cursor: pointer; color: var(--novel-ink); }
.report-details[open] > summary { margin-bottom: 16px; }
.report-chart-fold { margin-top: 16px; }
.report-details .card { box-shadow: none; }
.result-data-note { font-size: 12px; color: var(--ink-2); margin-top: 14px; }
.results-pending #calc-results { opacity: .45; }
.results-pending #share-button, .results-pending #print-button { display: none; }
.results-pending .pending-notice { display: block; }
.pending-notice { display: none; padding: 12px; margin: 12px 0; background: var(--warm-wash); color: var(--ink); font-size: 14px; }
.reg-rule-summary { max-width: 650px; margin-top: 14px; color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.reg-rule-summary summary { cursor: pointer; }
.reg .actions { position: static; }
.reg .scenario-title { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 1023px) {
  .home { gap: 72px; }
  .home-hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "text"
      "signs"
      "fleet"
      "plan";
    gap: 32px;
  }
  .home-signs .limit-sign { --size: 128px; }
  .home-plan-body { grid-template-columns: minmax(0, 1fr); }
  .home-plan-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 32px;
    padding: 24px 0 0;
    border-left: 0;
    border-top: 1px solid var(--rule-2);
  }
  .home-owner { grid-template-columns: minmax(0, 1fr); }
  .workbench .pagehead { margin-bottom: 8px; }
  .workbench .results:has(.result-placeholder) { display: none; }
}
@media (max-width: 700px) {
  .home { gap: 56px; }
  .home-hero { padding-top: 0; }
  #home-title { font-size: 42px; }
  .home-hero .lede { font-size: 17px; }
  .home-actions .btn { width: 100%; }
  .home-signs .limit-sign { --size: 104px; }
  .home-fleet { padding: 20px 16px 16px; }
  .home-plan { padding: 22px 16px 18px; }
  .home-plan-answer { font-size: 17px; }
  .home-plan-facts { grid-template-columns: minmax(0, 1fr); }
  .home-plan-foot .btn { width: 100%; }
  .plan-answer { font-size: 17px; }
  .plan-facts { grid-template-columns: minmax(0, 1fr); }
  .example-heading, .example-inputs, .example-result, .example-footer { padding-inline: 18px; }
  .example-risk { margin-inline: 18px; }
  .example-inputs { gap: 8px; }
  .example-inputs > div + div { padding-left: 8px; }
  .example-inputs dd { font-size: 14px; }
  .home-support { grid-template-columns: 1fr; gap: 24px; }
  .guide-progress { padding-inline: 14px; }
  .guide-progress button { font-size: 11px; }
  .guide-navigation { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-signs .limit-sign { animation: none; }
}
@media print {
  .guide-progress, .guide-navigation, .pending-notice { display: none !important; }
  .report-details, .example-preview, .home-fleet, .home-plan { box-shadow: none; border-color: #bbb; break-inside: auto; }
  .home-signs .limit-sign { animation: none; }
  .results-pending #calc-results { opacity: 1; }
}
