:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #1a2233;
  --text-muted: #5b6472;
  --border: #e1e5ea;
  --accent: #0a5cff;
  --accent-contrast: #ffffff;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151c;
    --surface: #1b1f29;
    --text: #edf0f5;
    --text-muted: #9aa3b2;
    --border: #2a2f3a;
    --accent: #4d8dff;
    --accent-contrast: #0b1220;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.site-header .wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
}

.logo-accent {
  color: var(--accent);
  font-weight: 400;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
}

main.wrap {
  padding-top: 40px;
  padding-bottom: 60px;
}

.intro h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.intro p {
  color: var(--text-muted);
  margin-top: 0;
  max-width: 60ch;
}

.address-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 14px;
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.field input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

.field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.btn-primary {
  grid-column: 1 / -1;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.results {
  margin-top: 44px;
}

.results h2 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.results .hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 65ch;
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.provider-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--provider-color, var(--accent));
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.provider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.provider-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.provider-segment {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.provider-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.provider-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

.status {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.status-loading { color: var(--text-muted); font-weight: 500; }
.status-available { color: #1a8f4c; }
.status-unavailable { color: #d1373f; }
.status-unknown { color: var(--text-muted); font-weight: 500; }

.status-detail {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.plan-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-provider {
  padding: 10px 14px;
  border: 1px solid var(--provider-color, var(--accent));
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.btn-provider:hover {
  background: var(--provider-color, var(--accent));
  color: #fff;
}

.link-secondary {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.link-secondary:hover {
  text-decoration: underline;
}

.disclaimer {
  margin-top: 28px;
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 65ch;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .address-form {
    grid-template-columns: 1fr 1fr;
  }
  .field-street, .field-city {
    grid-column: 1 / -1;
  }
}
