:root {
  --ink: #1a2430;
  --ink-muted: #57626d;
  --border: #d3dae0;
  --bg: #f4f6f7;
  --surface: #ffffff;
  --accent: #b9791f;
  --accent-2: #276b63;
  --danger: #a4432f;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

header {
  padding: 28px 24px 20px;
  max-width: 720px;
  margin: 0 auto;
}
h1 { margin: 0 0 4px; font-size: 26px; }
.subtitle { margin: 0; color: var(--ink-muted); font-size: 14px; }

.mock-banner {
  margin-top: 14px;
  padding: 8px 14px;
  background: #fdf1de;
  border: 1px solid #e6c184;
  border-radius: 4px;
  font-size: 13.5px;
  color: #6b4a12;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 22px;
}
.card h2 { margin: 0 0 12px; font-size: 17px; }

.hint { font-size: 13.5px; color: var(--ink-muted); margin: 0 0 12px; }
.hint code { background: var(--bg); padding: 1px 5px; border-radius: 3px; }

form#address-form { display: flex; gap: 8px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--ink-muted); }

input, select, button {
  font: inherit;
  font-size: 14px;
}
input, select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--ink);
  background: var(--surface);
}
#address-form input { flex: 1; }

button {
  padding: 9px 16px;
  border-radius: 4px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 600;
}
button:hover { filter: brightness(0.95); }
button.tab-button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  font-weight: 500;
}
button.tab-button.active {
  border-color: var(--accent-2);
  color: var(--accent-2);
  background: #eaf3f1;
}

.status { font-size: 13.5px; margin: 10px 0 0; }
.status.error { color: var(--danger); }
.status.ok { color: var(--accent-2); }

.confidence-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 3px;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.confidence-badge.higher { background: #e4f2ee; color: var(--accent-2); }
.confidence-badge.lower { background: #fdf1de; color: #8a5a10; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px 16px;
  margin-bottom: 8px;
}

.tabs { display: flex; gap: 8px; margin-bottom: 14px; }

.panel-preview {
  margin-top: 12px;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  font-size: 13px;
  color: var(--ink-muted);
}
.panel-preview dt { font-weight: 600; color: var(--ink); }
.panel-preview dd { margin: 0; }

#estimate-output { margin-top: 16px; }
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 14px;
}
.stat .stat-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); }
.stat .stat-value { font-size: 22px; font-weight: 700; margin-top: 2px; }

table.monthly { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 16px; }
table.monthly th, table.monthly td { text-align: right; padding: 5px 8px; border-bottom: 1px solid var(--border); }
table.monthly th:first-child, table.monthly td:first-child { text-align: left; }

ul.warnings { margin: 0; padding-left: 18px; font-size: 13.5px; color: #8a5a10; }
ul.warnings li { margin-bottom: 4px; }

footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 24px 40px;
  color: var(--ink-muted);
  font-size: 12.5px;
}
