/* tint-ok — mobile-first, one column, dark on light.
 * Same design-token family as delay-check / bill-verdict / air-fry-fix,
 * with legal-green accent and a ticket-red for the "you get stopped" case. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --ink: #16130f;
  --ink-soft: #57514a;
  --line: #ded7cd;
  --surface: #f7f4ef;
  --card: #fffdf9;
  --accent: #0f7b4d;
  --accent-ink: #0b5c3a;
  --bad: #a12622;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0 auto;
  max-width: 640px;
  padding: 16px 16px 40px;
  background: var(--surface);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
}

/* Visibility is driven by the hidden attribute everywhere; make it stick. */
[hidden] {
  display: none !important;
}

h1 {
  margin: 8px 0 2px;
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

header p {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Language toggle: two small pills, the active one filled. */
.lang-toggle {
  display: flex;
  gap: 6px;
  margin: 0 0 16px;
}

.lang-toggle button {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-ink);
  border: 1px solid var(--line);
}

.lang-toggle button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Cards. */
section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin: 0 0 16px;
}

/* Small-caps legends on cards and fieldsets. */
h2,
fieldset legend {
  margin: 0 0 12px;
  font-size: 1.05rem;
  text-transform: uppercase;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* Radios and checkboxes read as sentence rows, not side-by-side columns. */
label input[type="radio"],
label input[type="checkbox"] {
  width: auto;
  margin: 0 8px 0 0;
  accent-color: var(--accent);
}

input[type="text"],
input[type="number"],
select {
  display: block;
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* Full-width 44px touch targets for the primary controls. */
input[type="number"],
select {
  min-height: 44px;
}

select {
  margin-top: 4px;
}

button {
  font: inherit;
  font-weight: 700;
  padding: 12px 18px;
  min-height: 44px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
}

button:active,
button:focus-visible {
  background: var(--accent-ink);
}

button[disabled] {
  background: var(--line);
  border-color: var(--line);
  color: var(--ink-soft);
  cursor: default;
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

fieldset {
  margin: 14px 0 0;
  padding: 0 0 4px;
  border: 0;
}

p {
  margin: 10px 0 0;
}

.hint {
  margin: 4px 0 12px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.fine {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.fine a {
  color: var(--accent-ink);
}

ul {
  margin: 8px 0 0;
  padding: 0 0 0 20px;
}

li {
  margin: 0 0 4px;
}

/* Ad slot: inert placeholder. Zero height while empty so there's no layout jump. */
#ad-slot {
  min-height: 0;
  margin: 0 0 16px;
}

/* Verdict card: the most prominent thing on the page, and always above the ad. */
#verdict-card {
  border-color: var(--accent);
}

#verdict-line {
  margin: 0 0 10px;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

#verdict-line.ok {
  color: var(--accent);
}

#verdict-line.bad {
  color: var(--bad);
}

/* Per-window rows: window name on the left, limit + status on the right. */
.verdict-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.verdict-row:first-child {
  border-top: 1px solid var(--line);
}

.verdict-row .win {
  font-weight: 700;
}

.verdict-row .lim {
  color: var(--ink-soft);
}

.verdict-row .flag {
  flex-basis: 100%;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.verdict-row.ok .flag {
  color: var(--accent);
}

.verdict-row.bad .flag {
  color: var(--bad);
  font-weight: 700;
}

#verdict-note {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Glovebox card: the thing you print and keep in the car. */
#glovebox-card .card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#glovebox-card .card-head p {
  margin: 0;
}

#glovebox-card #print-btn {
  padding: 8px 14px;
  min-height: 40px;
  background: transparent;
  color: var(--accent-ink);
  border-color: var(--line);
}

#card-body {
  margin-top: 8px;
  font-size: 0.95rem;
}

#card-body table {
  width: 100%;
  margin: 10px 0 0;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

#card-body th,
#card-body td {
  padding: 6px 8px;
  border: 1px solid var(--line);
  text-align: left;
}

#card-body th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

#card-body .statute {
  font-size: 0.85rem;
  color: var(--ink-soft);
  word-break: break-word;
}

footer {
  margin-top: 24px;
}

footer p {
  margin: 6px 0 0;
}

#source-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.card-rows { list-style:none; margin:8px 0; padding:0; }
.card-row { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:6px 0; border-bottom:1px solid var(--line); }
.card-row-label { font-weight:600; }
.card-row-value { text-align:right; }
.card-table-head { font-weight:700; margin:10px 0 2px; }
.card-statute, .card-verified, .card-vlt, .card-note { margin:8px 0; }

/* Print: the glovebox card and nothing else. */
@media print {
  header,
  #form-card,
  #ad-slot,
  .lang-toggle,
  footer a,
  #print-btn,
  #check-btn {
    display: none;
  }

  body {
    background: #fff;
    max-width: 100%;
    color: #000;
  }

  #glovebox-card {
    border: 2px solid #000;
    background: #fff;
  }

  #glovebox-card #print-btn {
    display: none;
  }

  #card-body th,
  #card-body td {
    border-color: #000;
    color: #000;
  }
}
