:root {
  --tp-ok: #166534;
  --tp-deny: #991b1b;
  --tp-warn: #92400e;
  --tp-panel: #faf9f7;
  --tp-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --tp-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.page-tool {
  background: var(--color-bg);
}

.page-tool .page-hero {
  padding-top: var(--space-7);
  padding-bottom: var(--space-5);
}

.tp-lede {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
  max-width: 62ch;
  margin: 0;
}

.tp-prose {
  max-width: 68ch;
}

.tp-prose p {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-3);
}

.tp-prose p:last-child {
  margin-bottom: 0;
}

.tp-prose strong {
  color: var(--color-text);
  font-weight: 600;
}

.tp-compare {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

@media (min-width: 800px) {
  .tp-compare {
    grid-template-columns: 1fr 1fr;
  }
}

.tp-compare-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: var(--space-4);
  box-shadow: 0 1px 3px var(--shadow-soft);
}

.tp-compare-card h3 {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tp-compare-card p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.6;
  font-size: 0.9375rem;
}

.tp-compare-card ul {
  margin: 16px 0 0;
  padding: 0 0 0 18px;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.tp-price {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
}

.tp-live-board {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: var(--space-4);
  box-shadow: 0 1px 3px var(--shadow-soft);
}

.tp-live-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.tp-live-head h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tp-live-head p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.55;
  max-width: 52ch;
}

.tp-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.tp-metric {
  background: var(--tp-panel);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tp-metric span {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.tp-metric strong {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.tp-sources,
.tp-note,
.tp-meta {
  margin: 16px 0 0;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.tp-checks {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 900px) {
  .tp-checks {
    grid-template-columns: 1fr 1fr;
  }

  .tp-checks .tp-check-wide {
    grid-column: 1 / -1;
  }
}

.tp-check {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: var(--space-4);
  box-shadow: 0 1px 3px var(--shadow-soft);
}

.tp-check h2 {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tp-check > p {
  margin: 0 0 var(--space-3);
  color: var(--color-text-secondary);
  line-height: 1.55;
  font-size: 0.9375rem;
}

.tp-form {
  display: grid;
  gap: 12px;
}

.tp-form label,
.tp-form legend {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

.tp-form input[type="text"],
.tp-form input[type="date"],
.tp-form input[type="number"],
.tp-form select,
.tp-form textarea {
  width: 100%;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
  color: var(--color-text);
}

.tp-form input:focus,
.tp-form select:focus,
.tp-form textarea:focus {
  outline: 2px solid rgba(31, 75, 122, 0.4);
  border-color: var(--color-accent);
}

.tp-form textarea {
  min-height: 110px;
  resize: vertical;
  font-family: var(--tp-mono);
  font-size: 0.875rem;
}

.tp-plate-input {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  font-family: var(--tp-mono);
}

.tp-lookup-row {
  display: grid;
  gap: 12px;
}

@media (min-width: 560px) {
  .tp-lookup-row {
    grid-template-columns: 1fr auto;
    align-items: stretch;
  }
}

.tp-vehicle-card {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

@media (min-width: 700px) {
  .tp-vehicle-card {
    grid-template-columns: 1.2fr 1fr;
  }
}

.tp-vehicle-main {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px;
}

.tp-reg {
  font-family: var(--tp-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1.25rem;
  margin: 0 0 8px;
}

.tp-vehicle-grid {
  display: grid;
  gap: 8px 16px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: 12px;
}

.tp-vehicle-grid span {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.tp-vehicle-grid strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-top: 2px;
}

.tp-status-stack {
  display: grid;
  gap: 12px;
}

.tp-status-panel {
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--color-border);
  background: #fff;
}

.tp-status-panel.is-ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.tp-status-panel.is-deny {
  border-color: #fecaca;
  background: #fef2f2;
}

.tp-status-panel h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 600;
}

.tp-status-panel p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.tp-row {
  display: grid;
  gap: 12px;
}

@media (min-width: 560px) {
  .tp-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.tp-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

.tp-loading[hidden] {
  display: none !important;
}

.tp-loading-wheel {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: tp-spin 0.7s linear infinite;
}

@keyframes tp-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tp-loading-wheel {
    animation: none;
  }

  .tp-result.is-reveal {
    animation: none;
  }
}

.tp-result {
  margin-top: 16px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  padding: 16px 18px;
  background: var(--tp-panel);
}

.tp-result.is-reveal {
  animation: tp-in 0.35s var(--tp-ease);
}

@keyframes tp-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.tp-result.is-ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.tp-result.is-deny {
  border-color: #fecaca;
  background: #fef2f2;
}

.tp-result.is-warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.tp-result h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.tp-result p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.55;
  font-size: 0.9375rem;
}

.tp-result .tp-proof {
  margin-top: 10px;
  font-size: 0.8125rem;
  font-family: var(--tp-mono);
  color: var(--color-text-secondary);
}

.tp-zone-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.tp-zone-list li {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
}

.tp-zone-list strong {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.tp-fleet-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.875rem;
}

.tp-fleet-table th,
.tp-fleet-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--color-border);
}

.tp-fleet-table th {
  font-weight: 600;
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tp-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tp-badge-ok {
  background: #dcfce7;
  color: var(--tp-ok);
}

.tp-badge-warn {
  background: #fef3c7;
  color: var(--tp-warn);
}

.tp-badge-deny {
  background: #fee2e2;
  color: var(--tp-deny);
}

.tp-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.section-muted {
  background: #f1efe9;
}

.tp-gov-strip {
  display: grid;
  gap: 12px;
}

@media (min-width: 700px) {
  .tp-gov-strip {
    grid-template-columns: 1fr 1fr;
  }
}

.tp-gov-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 3px var(--shadow-soft);
}

.tp-gov-card h3 {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.tp-gov-card p {
  margin: 0 0 16px;
  color: var(--color-text-secondary);
  line-height: 1.55;
  font-size: 0.9375rem;
}

.tp-source-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.tp-chip{display:inline-flex;align-items:center;padding:6px 12px;border:1px solid #e5e2dc;border-radius:999px;background:#fff;font-size:.8125rem;color:#5c5c5c;text-decoration:none}
.tp-chip:hover{border-color:#1f4b7a;color:#1f4b7a}
.tp-metric-grid{display:grid;gap:12px;margin-top:16px}
@media(min-width:700px){.tp-metric-grid{grid-template-columns:repeat(3,1fr)}}
.tp-metric{padding:16px;border:1px solid #e5e2dc;border-radius:12px;background:#faf9f7}
.tp-metric span{display:block;font-size:.8125rem;color:#5c5c5c}
.tp-metric strong{display:block;margin-top:4px;font-size:1.25rem;font-weight:600;letter-spacing:-.02em}
.tp-list{display:grid;gap:10px;margin:16px 0 0;padding:0;list-style:none}
.tp-list li{padding:14px 16px;border:1px solid #e5e2dc;border-radius:12px;background:#fff}
.tp-list a{color:#1f4b7a;font-weight:500;text-decoration:none}
.tp-list a:hover{text-decoration:underline}
.tp-list p{margin:4px 0 0;color:#5c5c5c;font-size:.875rem;line-height:1.5}
.tp-check label.tp-checkline{display:flex;gap:10px;align-items:flex-start;font-weight:500}
.tp-check label.tp-checkline input{width:auto;min-height:0;margin-top:3px;accent-color:#1f4b7a}
.tp-form select{width:100%;min-height:48px;border:1.5px solid #e5e2dc;border-radius:10px;padding:12px 14px;background:#fff;font:inherit}
.tp-form select:focus{outline:2px solid rgba(31,75,122,.4);outline-offset:2px;border-color:#1f4b7a}
.tp-status-grid{display:grid;gap:12px;margin-top:16px}
@media(min-width:620px){.tp-status-grid{grid-template-columns:repeat(2,1fr)}}
.tp-status{padding:14px;border:1px solid #e5e2dc;border-radius:12px;background:#fff}
.tp-status span{display:block;color:#5c5c5c;font-size:.8125rem}
.tp-status strong{display:block;margin-top:4px}
.tp-status.is-ok strong{color:#166534}
.tp-status.is-deny strong{color:#991b1b}
.circuit-chip{display:inline-block;margin:4px 6px 0 0;padding:4px 10px;border:1px solid #e5e2dc;border-radius:999px;font-size:.75rem;color:#5c5c5c}
.tp-note{margin-top:16px;padding-top:16px;border-top:1px solid #e5e2dc;font-size:.8125rem;color:#5c5c5c;line-height:1.55}
