@font-face {
  font-family: "Archivo";
  src: url("/assets/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --ink: #1c2733;
  --ink-soft: #4a5663;
  --paper: #f1f2ee;
  --sheet: #fbfbf8;
  --oil: #d6981c;
  --oil-deep: #5b4216;
  --steel: #8793a0;
  --rule: #cfd4d6;
  --focus: #1d5fbf;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.1rem, 4.6vw, 3.25rem);
  --step-4: clamp(2.6rem, 7vw, 5rem);

  --gutter: clamp(16px, 4vw, 48px);
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  font-stretch: 100%;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header / footer ---------- */
.site-head { padding: 22px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark {
  font-stretch: 125%; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em;
  text-decoration: none; display: inline-flex; align-items: center; gap: 10px;
}
.wordmark svg { width: 26px; height: 26px; }
.wordmark .iq { color: var(--oil-deep); }
.head-link { font-weight: 600; font-size: var(--step--1); }

.site-foot { border-top: 1px solid var(--rule); margin-top: 96px; padding: 28px 0 40px; font-size: var(--step--1); color: var(--ink-soft); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-foot nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -0.02em; }
.display {
  font-size: var(--step-4); font-weight: 850; font-stretch: 125%;
  max-width: 14ch; text-wrap: balance;
}
h2 { font-size: var(--step-3); font-weight: 800; font-stretch: 118%; max-width: 20ch; text-wrap: balance; }
h3 { font-size: var(--step-1); font-weight: 700; font-stretch: 105%; line-height: 1.2; letter-spacing: -0.005em; }
p { margin: 0; }
.lede { font-size: var(--step-1); line-height: 1.45; max-width: var(--measure); color: var(--ink-soft); }
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: var(--step-2); margin-top: 2em; }
.prose ul { padding-left: 1.2em; }
.small { font-size: var(--step--1); color: var(--ink-soft); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font: inherit; font-weight: 700; font-stretch: 110%;
  background: var(--ink); color: var(--paper); border: 2px solid var(--ink);
  padding: 15px 26px; border-radius: 4px; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--oil-deep); border-color: var(--oil-deep); }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 24px; }
.hero .lede { margin-top: 24px; }
.hero .actions { margin-top: 32px; }

/* the dipstick */
.gauge { margin: 72px 0 0; }
.gauge-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 14px; }
.gauge-total { font-size: var(--step-3); font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.gauge-total span { display: block; font-size: var(--step--1); font-weight: 500; font-stretch: 100%; letter-spacing: 0; color: var(--ink-soft); }
.gauge-note { font-size: var(--step--1); color: var(--ink-soft); }

.stick { position: relative; display: flex; align-items: center; }
.stick-handle {
  flex: 0 0 auto; width: 54px; height: 34px; border-radius: 17px 6px 6px 17px;
  background: var(--oil); box-shadow: inset 0 -4px 0 rgba(0,0,0,.14);
  position: relative;
}
.stick-handle::after { content: ""; position: absolute; left: 14px; top: 9px; width: 14px; height: 16px; border-radius: 50%; background: var(--paper); }
.stick-rod {
  position: relative; flex: 1; height: 22px; background: #dde0de;
  border: 1px solid #b9c0c4; border-left: 0; border-radius: 0 11px 11px 0; overflow: hidden;
}
.stick-oil { position: absolute; inset: 0 auto 0 0; width: 100%; display: flex; transform-origin: left; }
.stick-oil i { display: block; height: 100%; font-style: normal; }
.stick-oil i:nth-child(1) { background: #b77d0e; }
.stick-oil i:nth-child(2) { background: #d6981c; }
.stick-oil i:nth-child(3) { background: #e6b34c; }
.stick-oil i:nth-child(4) { background: #efcd83; }
/* hatched full-mark zone near the tip, like a real dipstick */
.stick-hatch {
  position: absolute; top: 0; bottom: 0; right: 10px; width: 12%;
  background: repeating-linear-gradient(-55deg, rgba(28,39,51,.38) 0 1.5px, transparent 1.5px 7px);
  border-left: 2px solid rgba(28,39,51,.55); border-right: 2px solid rgba(28,39,51,.55);
}
@media (prefers-reduced-motion: no-preference) {
  .stick-oil { animation: fill 1.6s cubic-bezier(.2,.7,.2,1) .25s both; }
  @keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

.legend { list-style: none; margin: 22px 0 0; padding: 0 0 0 54px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 24px; }
.legend li { border-top: 3px solid var(--sw); padding-top: 10px; }
.legend b { display: block; font-size: var(--step-1); font-stretch: 108%; font-variant-numeric: tabular-nums; }
.legend span { font-size: var(--step--1); color: var(--ink-soft); }

/* ---------- sections ---------- */
.section { padding-top: 112px; }
.section > .wrap > h2 + .lede { margin-top: 20px; }

.leaks { margin-top: 44px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 40px; }
.leaks p { margin-top: 8px; color: var(--ink-soft); }

/* repair-order ticket */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: start; }
.split .lede { margin-top: 20px; }
.split ul.plain { margin: 28px 0 0; padding: 0; list-style: none; max-width: var(--measure); }
.split ul.plain li { padding: 12px 0; border-top: 1px solid var(--rule); }

.ticket {
  background: var(--sheet); border: 1px solid #c9cdc9; border-radius: 3px;
  box-shadow: 0 1px 0 #c9cdc9, 0 14px 30px -18px rgba(28,39,51,.35);
  padding: 26px 26px 22px; font-size: var(--step--1); position: relative;
}
.ticket::before { /* perforation */
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 8px;
  background: radial-gradient(circle at 6px 0, var(--paper) 4px, transparent 4.5px) 0 0 / 12px 8px repeat-x;
}
.ticket-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.ticket-head strong { font-stretch: 118%; font-size: 1rem; }
.ticket dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 16px 0; }
.ticket dt { color: var(--ink-soft); }
.ticket dd { margin: 0; font-weight: 600; }
.lines { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lines td { padding: 8px 0; border-top: 1px dashed #bcc3c7; }
.lines td:last-child { text-align: right; }
.lines tr.total td { border-top: 2px solid var(--ink); font-weight: 800; font-size: 1rem; }
.stamp {
  margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 12px 14px;
  background: #f6ebd2; border-left: 4px solid var(--oil); color: var(--oil-deep);
}
.stamp b { color: var(--ink); }
.draft { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); }
.draft p { margin-top: 6px; font-style: italic; color: var(--ink); line-height: 1.5; }

.systems { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px 12px; padding: 0; list-style: none; }
.systems li { border: 1px solid var(--steel); border-radius: 3px; padding: 8px 14px; font-weight: 600; font-stretch: 108%; }

.steps { margin: 44px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.steps li { counter-increment: s; border-top: 2px solid var(--ink); padding-top: 16px; }
.steps li::before { content: counter(s); display: block; font-size: var(--step-2); font-weight: 800; font-stretch: 125%; color: var(--oil-deep); line-height: 1; margin-bottom: 14px; }
.steps p { margin-top: 8px; color: var(--ink-soft); }

.closer { background: var(--ink); color: var(--paper); border-radius: 6px; padding: clamp(32px, 6vw, 72px); }
.closer .lede { color: #c4cbd2; margin-top: 18px; }
.closer .actions { margin-top: 30px; }
.closer .btn { background: var(--oil); border-color: var(--oil); color: var(--ink); }
.closer .btn:hover { background: #e6b34c; border-color: #e6b34c; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 64px; align-items: start; padding-top: 40px; }
form.audit { background: var(--sheet); border: 1px solid #c9cdc9; border-radius: 4px; padding: clamp(20px, 4vw, 36px); display: grid; gap: 20px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 650; font-size: var(--step--1); }
.field .hint { font-size: var(--step--1); color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 1px solid #aeb6bd; border-radius: 4px; padding: 12px 12px; width: 100%;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input[type=file] { padding: 10px; background: var(--paper); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: var(--step--1); }
.consent input { margin-top: 4px; width: 18px; height: 18px; flex: 0 0 auto; }
.alert { padding: 14px 16px; border-left: 4px solid #a33a2a; background: #f7e3df; font-size: var(--step--1); }
.checks { margin: 28px 0 0; padding: 0; list-style: none; }
.checks li { padding: 12px 0 12px 30px; border-top: 1px solid var(--rule); position: relative; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 12px; height: 7px; border-left: 2.5px solid var(--oil-deep); border-bottom: 2.5px solid var(--oil-deep); transform: rotate(-45deg); }

/* ---------- sample report ---------- */
.report { margin-top: 40px; max-width: 46rem; }
.report .ticket { font-size: var(--step-0); padding: clamp(20px, 4vw, 40px); }
.report h3 { margin-top: 28px; margin-bottom: 4px; }
.prob { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.prob div { border-top: 3px solid var(--sw); padding-top: 8px; font-variant-numeric: tabular-nums; }
.prob b { display: block; font-size: var(--step-1); }
.prob span { font-size: var(--step--1); color: var(--ink-soft); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .leaks { grid-template-columns: 1fr 1fr; }
  .split, .form-grid { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .legend { grid-template-columns: 1fr 1fr; padding-left: 0; }
}
@media (max-width: 560px) {
  .leaks, .steps, .row2 { grid-template-columns: 1fr; }
  .section { padding-top: 80px; }
  .gauge { margin-top: 56px; }
  .stick-handle { width: 40px; height: 28px; }
  .stick-handle::after { left: 10px; top: 7px; width: 11px; height: 14px; }
  .prob { grid-template-columns: 1fr; }
  .ticket dl { grid-template-columns: 1fr; gap: 0; }
  .ticket dd { margin-bottom: 8px; }
}

.factors { margin: 10px 0 0; padding: 0; list-style: none; color: var(--ink-soft); }
.factors li { padding: 3px 0 3px 16px; position: relative; }
.factors li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--oil); }
