:root {
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: #26392e;
  background: #f7f7f0;
  --green: #255c44;
  --muted: #56685c;
  --line: #d8dfd4;
  --soft: #edf2e8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--green);
}
input,
select,
button {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--green);
  border-radius: 6px;
  padding: 0.7rem 1rem;
  font-weight: 650;
  background: var(--green);
  color: white;
}
button:hover {
  background: #19432f;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.secondary {
  color: var(--green);
  background: white;
}
button.text-button {
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 0.3rem;
  text-decoration: underline;
  font-size: 0.85rem;
}
input,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid #b8c5b5;
  border-radius: 5px;
  padding: 0.6rem;
  color: #26392e;
  background: white;
}
input:focus,
select:focus,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #b08125;
  outline-offset: 3px;
}
label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 550;
}
.site-header {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 2rem;
  background: #fff;
}
.brand {
  font-weight: 850;
  letter-spacing: 0.16em;
  text-decoration: none;
}
.site-header nav {
  display: flex;
  gap: 1.4rem;
  font-size: 0.85rem;
}
.pill {
  font-size: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0.3rem 0.6rem;
  margin-left: auto;
  white-space: nowrap;
}
main {
  max-width: 1320px;
  padding: 2.5rem 1.5rem;
  margin: auto;
}
.hero {
  max-width: 830px;
  margin-bottom: 2.5rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.75rem;
  font-weight: 750;
  color: var(--green);
  margin: 0 0 0.6rem;
}
h1 {
  font-family: Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.12;
  margin: 0.5rem 0 1rem;
  letter-spacing: -0.02em;
}
.lede {
  font-size: 1.12rem;
  max-width: 710px;
}
.muted,
.small {
  font-size: 0.85rem;
  color: var(--muted);
}
h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 0 0.7rem;
}
h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.6rem;
}
.optional {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  padding: 1.5rem;
  min-width: 0;
}
.vehicle {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.vehicle p {
  font-size: 0.85rem;
  margin: 0.5rem 0;
  color: var(--muted);
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0.8rem 0;
}
.vehicle-fields {
  grid-template-columns: 1fr 1fr 0.7fr;
  align-items: center;
}
.mode-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}
.mode-tabs button[aria-pressed="false"] {
  background: white;
  color: var(--green);
}
.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(350px, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.editor fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 1.2rem 0;
  margin: 0.5rem 0;
}
legend {
  font-size: 0.9rem;
  font-weight: 750;
  padding-right: 0.6rem;
}
.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}
.checks {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.9rem;
}
.checks label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.checks input {
  width: 1.1rem;
  height: 1.1rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.actions button {
  font-size: 0.84rem;
}
.results-area {
  display: grid;
  gap: 1.2rem;
}
.placeholder {
  background: var(--soft);
  padding: 2rem;
}
.placeholder h2 {
  font-family: Georgia, serif;
  font-size: 1.8rem;
  font-weight: 400;
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.2rem 0;
}
.stat {
  background: var(--soft);
  padding: 0.9rem;
  border-radius: 6px;
}
.stat span {
  display: block;
  font-size: 0.77rem;
  color: var(--muted);
}
.stat strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.assumptions {
  background: #f6f6ef;
  border-left: 3px solid #80996a;
  padding: 0.8rem 1rem;
  font-size: 0.82rem;
  margin: 1rem 0;
}
.assumptions p {
  margin: 0.4rem 0;
}
.notice {
  background: #fff3dc;
  border: 1px solid #bb8d37;
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 0;
  color: #65491a;
}
.notice.example {
  font-size: 0.8rem;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
th,
td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
th {
  background: var(--soft);
  font-weight: 650;
}
td.money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
details {
  margin-top: 1.2rem;
}
summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
}
details table {
  margin-top: 0.8rem;
  font-size: 0.72rem;
}
.content {
  margin-top: 2rem;
  max-width: 940px;
}
.content p {
  max-width: 78ch;
}
.guide-link {
  font-weight: 700;
}
.guide {
  max-width: 880px;
}
.guide h1 {
  font-size: clamp(2.2rem, 5vw, 3.3rem);
}
.guide .panel {
  margin-bottom: 1.5rem;
}
.guide article {
  max-width: 76ch;
}
.guide li {
  margin: 0.6rem 0;
}
.guide .callout {
  background: var(--soft);
  padding: 1rem;
  border-radius: 6px;
}
footer {
  padding: 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}
[hidden] {
  display: none !important;
}
@media (max-width: 800px) {
  main {
    padding: 1.7rem 0.85rem;
  }
  .site-header {
    padding: 1rem;
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  .site-header nav {
    order: 3;
    width: 100%;
    gap: 1rem;
  }
  .pill {
    font-size: 0.65rem;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .vehicle {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  .panel {
    padding: 1.1rem;
  }
  .fields {
    gap: 0.8rem;
  }
  .section-heading {
    flex-wrap: wrap;
  }
  .content {
    margin-top: 1.5rem;
  }
  .results-area {
    margin-top: 0.3rem;
  }
  .vehicle-fields {
    grid-template-columns: 1fr 1fr;
  }
  .vehicle-fields label:last-child {
    grid-column: 1/-1;
  }
  .actions button {
    flex: 1;
  }
  .hero br {
    display: none;
  }
}
@media (max-width: 440px) {
  .fields:not(.vehicle-fields) {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 0.5rem;
  }
  .stat {
    padding: 0.7rem;
  }
  .stat strong {
    font-size: 1.15rem;
  }
  .stat span {
    font-size: 0.7rem;
  }
  .section-heading {
    display: block;
  }
  .table-wrap {
    overflow: auto;
  }
  th,
  td {
    padding: 0.45rem;
  }
  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
@media print {
  .site-header,
  .hero,
  .no-print,
  .mode-tabs,
  .placeholder,
  footer,
  .content,
  #message {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
  main {
    max-width: none;
    padding: 0;
  }
  .workspace {
    display: block;
  }
  .results-area {
    display: block;
  }
  .panel {
    border: 0;
    padding: 0;
    margin-bottom: 1.5rem;
  }
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
  .stat {
    background: white;
    border: 1px solid #aaa;
  }
  .table-wrap {
    overflow: visible;
  }
  table {
    font-size: 8pt;
    table-layout: fixed;
  }
  th,
  td {
    padding: 0.3rem;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  thead {
    display: table-header-group;
  }
  tr {
    break-inside: avoid;
  }
  h2,
  h3 {
    break-after: avoid;
  }
  details {
    display: block;
  }
  summary {
    display: none;
  }
  .assumptions {
    background: white;
    border: 1px solid #aaa;
  }
  #pinned-note {
    display: none !important;
  }
}
@page {
  size: A4 landscape;
  margin: 12mm;
}

.print-choice {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.8rem;
}
.print-choice input {
  width: 1rem;
  height: 1rem;
}
@media print {
  .schedule-details:not(.include-print) {
    display: none !important;
  }
  .schedule-details.include-print {
    display: block !important;
  }
}
