/* Sourced Calc — boring home calculators
   Chrome: dark green header, light gray page, white rounded card. */

:root {
  --green: #1f6b4a;
  --green-dark: #17553b;
  --green-soft: #e8f3ee;
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --input-border: #d1d5db;
  --focus: #1f6b4a;
  --danger: #9a3412;
  --danger-bg: #fff7ed;
  --warn: #92400e;
  --warn-bg: #fffbeb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  --max: 40rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--green);
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.site-header {
  background: var(--green);
  color: #fff;
}

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

.site-header a:hover,
.site-header a:focus-visible {
  text-decoration: underline;
  color: #fff;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.8rem;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.tagline {
  font-weight: 400;
  font-size: 0.95rem;
  opacity: 0.92;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.35rem 1.15rem 3rem;
}

h1 {
  margin: 0 0 0.65rem;
  font-size: 1.7rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.lede {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.15rem 1.4rem;
}

@media (min-width: 480px) {
  .card {
    padding: 1.5rem 1.45rem 1.65rem;
  }

  h1 {
    font-size: 1.85rem;
  }
}

.note {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.field {
  margin-bottom: 1.2rem;
}

.field:last-of-type {
  margin-bottom: 0;
}

label,
.field-label {
  display: block;
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 0.2rem;
}

.hint {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0 0 0.4rem;
  font-weight: 400;
}

.hint.after {
  margin: 0.45rem 0 0;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  color: var(--text);
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7280' d='M4.2 6.2 8 10l3.8-3.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  padding-right: 2.2rem;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.85rem;
  margin-top: 1.25rem;
  padding: 0.65rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover {
  background: var(--green-dark);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.tool-list a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem;
  box-shadow: var(--shadow);
}

.tool-card h2 {
  margin: 0 0 0.3rem;
  font-size: 1.08rem;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.tool-card:hover {
  border-color: #c5ddd2;
}

.result {
  margin-top: 1.1rem;
  padding: 1.05rem 1.05rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafafa;
}

.result h2 {
  margin: 0.35rem 0 0.65rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

.pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
}

.pill.public {
  background: var(--green-soft);
  color: var(--green-dark);
}

.pill.range {
  background: #fef3c7;
  color: #92400e;
}

.pill.unknown {
  background: #e5e7eb;
  color: #374151;
}

.result ul {
  margin: 0.35rem 0 0.85rem;
  padding-left: 1.15rem;
}

.result li {
  margin: 0.28rem 0;
}

.result h3 {
  margin: 0.9rem 0 0.35rem;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.callout {
  background: var(--green-soft);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  margin: 0.5rem 0 0.85rem;
}

.warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
}

.err {
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}

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

.assumptions,
.sources,
.faq,
.fineprint {
  margin-top: 1.5rem;
}

.assumptions h2,
.sources h2,
.faq h2 {
  font-size: 1.15rem;
  margin: 0 0 0.7rem;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: #fff;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--border);
}

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

details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.55rem;
}

summary {
  font-weight: 700;
  cursor: pointer;
}

details p {
  margin: 0.55rem 0 0.15rem;
  color: #374151;
}

.row-2 {
  display: grid;
  gap: 0.85rem;
}

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

.nums {
  font-variant-numeric: tabular-nums;
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.15rem 2.25rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-bottom: 0.65rem;
}

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

.hidden {
  display: none;
}
