:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #1a2531;
  --muted: #5a6b7b;
  --brand: #1f6f54;
  --brand-dark: #155340;
  --accent: #e8f3ee;
  --border: #dde3e8;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(26, 37, 49, 0.06);
  --maxw: 720px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.site-header {
  background: var(--brand);
  color: #fff;
  padding: 14px 0;
}
.site-header .container { display: flex; flex-direction: column; }
.brand { font-weight: 700; font-size: 1.05rem; }
.tagline { font-size: 0.85rem; opacity: 0.9; }

.hero { padding: 36px 0 12px; }
.hero h1 { font-size: 1.9rem; margin: 0 0 10px; }
.lede { color: var(--muted); font-size: 1.05rem; margin: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 20px 0;
}

.field { margin-bottom: 20px; }
label { display: block; font-weight: 600; margin-bottom: 8px; }
.hint { font-size: 0.83rem; color: var(--muted); margin: 6px 0 0; }

.input-row { display: flex; align-items: stretch; gap: 8px; }
.prefix {
  display: flex; align-items: center; padding: 0 12px;
  background: var(--accent); border: 1px solid var(--border);
  border-radius: 10px; font-weight: 600;
}
input, select {
  font-size: 1rem; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.input-row input { flex: 1; }
.input-row select { flex: 0 0 auto; width: auto; }

.btn-primary {
  width: 100%; padding: 14px; font-size: 1.05rem; font-weight: 700;
  color: #fff; background: var(--brand); border: none; border-radius: 10px;
  cursor: pointer; transition: background 0.15s;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }

.result.hidden { display: none; }
.result h2 { margin-top: 0; }
.ami-badge {
  display: inline-block; font-size: 2.4rem; font-weight: 800;
  color: var(--brand-dark); line-height: 1;
}
.ami-category { font-size: 1.1rem; font-weight: 600; margin: 6px 0 16px; }
.result-detail { color: var(--muted); margin: 4px 0; }

.threshold-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 0.92rem; }
.threshold-table th, .threshold-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.threshold-table th { color: var(--muted); font-weight: 600; }
.threshold-table tr.you td { background: var(--accent); font-weight: 700; }

.next-steps { margin-top: 18px; padding: 16px; background: var(--accent); border-radius: 10px; }
.next-steps h3 { margin: 0 0 8px; font-size: 1rem; }
.next-steps p { margin: 0; font-size: 0.92rem; color: var(--muted); }

.disclaimer { font-size: 0.85rem; color: var(--muted); margin: 8px 0 40px; }

.site-footer { border-top: 1px solid var(--border); padding: 20px 0; font-size: 0.85rem; color: var(--muted); }
.site-footer a { color: var(--brand); }
.error { color: #b3261e; font-weight: 600; }

@media (min-width: 560px) {
  .site-header .container { flex-direction: row; align-items: baseline; gap: 12px; }
}
