/* PlumbCheck global styles. Verdict/result classes driven by checker.js. */
img{max-width:100%;height:auto}
:root {
  --navy: #123c5f;
  --navy-dark: #0b263d;
  --navy-light: #e8f0f7;
  --navy-subtle: #f0f5fa;
  --bg: #f7f5f1;
  --surface: #ffffff;
  --text: #1d2731;
  --text-muted: #596b7a;
  --border: #dcd7ce;
  --border-focus: #123c5f;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 2px 6px rgba(18, 60, 95, 0.05);
  --shadow-md: 0 6px 20px rgba(18, 60, 95, 0.08);
  --shadow-lg: 0 12px 32px rgba(18, 60, 95, 0.12);
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

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

body {
  font-family: var(--font-system);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-width: 320px;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--navy-dark);
}

.wrap {
  width: 100%;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.site-header {
  background-color: var(--navy);
  color: #ffffff;
  padding: 16px 0;
  border-bottom: 3px solid rgba(255, 255, 255, 0.12);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-header a {
  color: #ffffff;
  text-decoration: none;
}

.site-brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.9;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  opacity: 1;
  border-bottom-color: #ffffff;
}

.hero {
  padding: 44px 0 28px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

.checker {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px 28px;
  margin: 24px 0 36px;
}

.checker h2 {
  font-size: 1.35rem;
  color: var(--navy);
  margin-bottom: 6px;
  font-weight: 700;
}

.checker-intro {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

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

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

.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.field label .hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: 4px;
}

.field input,
.field select {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--text);
  background-color: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
  appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23123c5f' d='M1.4 0L6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  padding-right: 36px;
  cursor: pointer;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(18, 60, 95, 0.15);
}

.field input::placeholder {
  color: #9aa7b3;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  color: #ffffff;
  background-color: var(--navy);
  border: 1.5px solid var(--navy);
  border-radius: var(--radius-md);
  padding: 12px 22px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.btn:hover {
  background-color: var(--navy-dark);
  border-color: var(--navy-dark);
  color: #ffffff;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(18, 60, 95, 0.25);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
  background-color: var(--surface);
  border: 1.5px solid var(--navy);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background-color: var(--navy-light);
  color: var(--navy-dark);
}

.result {
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 24px;
  border-left: 6px solid;
  border-top: 1px solid;
  border-right: 1px solid;
  border-bottom: 1px solid;
  background-color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.result h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.result.below {
  background-color: #f0f7fd;
  border-color: #b7d6f5;
  border-left-color: #1d72b8;
  color: #0c3e6b;
}
.result.below h3 {
  color: #134e85;
}

.result.in {
  background-color: #edf7ed;
  border-color: #b3dfb5;
  border-left-color: #2e7d32;
  color: #174a1a;
}
.result.in h3 {
  color: #1e5a22;
}

.result.high {
  background-color: #fdf8eb;
  border-color: #f5dfa8;
  border-left-color: #d97706;
  color: #663803;
}
.result.high h3 {
  color: #8f4d04;
}

.result.way {
  background-color: #fdf1f1;
  border-color: #f4c2c2;
  border-left-color: #d32f2f;
  color: #6a1313;
}
.result.way h3 {
  color: #941717;
}

.tiers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 40px 0;
}

.tier {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tier:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.tier.featured {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px var(--navy), var(--shadow-md);
}

.tier-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  background-color: var(--navy);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 999px;
}

.tier h3 {
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 6px;
  font-weight: 700;
}

.tier-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
  min-height: 40px;
}

.tier .price {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.tier .price .unit {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.tier-features {
  list-style: none;
  margin-bottom: 24px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.92rem;
}

.tier-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.tier-features li::before {
  content: "✓";
  color: var(--navy);
  font-weight: 800;
  flex-shrink: 0;
}

table.ranges {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 28px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
}

table.ranges caption {
  caption-side: top;
  text-align: left;
  font-weight: 700;
  color: var(--navy);
  font-size: 1.15rem;
  margin-bottom: 10px;
  padding: 0 4px;
}

table.ranges th,
table.ranges td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table.ranges th {
  background-color: var(--navy);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

table.ranges tr:last-child td {
  border-bottom: none;
}

table.ranges tbody tr:nth-child(even) {
  background-color: var(--bg);
}

table.ranges tbody tr:hover {
  background-color: var(--navy-subtle);
}

table.ranges td.cost {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.guide-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 24px 0 40px;
}

.guide-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.guide-list li:hover {
  border-color: var(--navy);
  transform: translateY(-1px);
}

.guide-list h4 {
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 6px;
  font-weight: 700;
}

.guide-list p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.disclaimer {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 16px 0;
  padding: 10px 14px;
  background-color: rgba(18, 60, 95, 0.04);
  border-left: 3px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.site-footer {
  margin-top: 60px;
  padding: 32px 0 28px;
  background-color: #ffffff;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.site-footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  list-style: none;
}

.site-footer-links a {
  color: var(--text-muted);
}

.site-footer-links a:hover {
  color: var(--navy);
}

.site-footer .copyright {
  font-size: 0.8rem;
  color: #7b8a97;
}

@media (max-width: 680px) {
  .site-header {
    padding: 12px 0;
  }

  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .checker {
    padding: 22px 16px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .tiers {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tier {
    padding: 24px 18px;
  }

  table.ranges th,
  table.ranges td {
    padding: 10px 12px;
    font-size: 0.875rem;
  }
}

@media (max-width: 390px) {
  .wrap {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .checker {
    padding: 18px 12px;
  }

  .btn {
    padding: 11px 16px;
    font-size: 0.95rem;
  }

  .result {
    padding: 16px 14px;
  }

  .tier .price {
    font-size: 1.85rem;
  }
}
