/* GLPKit design system
   Mobile first, clean white base, deep teal primary, soft neutral grays,
   amber used sparingly as an accent. One shared stylesheet for all pages. */

:root {
  --teal: #0f766e;
  --teal-dark: #115e59;
  --teal-deep: #134e4a;
  --teal-tint: #f0fdfa;
  --teal-soft: #ccfbf1;
  --ink: #111827;
  --muted: #5b6472;
  --faint: #6b7280;
  --line: #e5e7eb;
  --panel: #f9fafb;
  --white: #ffffff;
  --amber: #f59e0b;
  --amber-tint: #fffbeb;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(17, 24, 39, 0.06), 0 4px 14px rgba(17, 24, 39, 0.05);
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* Typography scale */
h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.6rem; }
h2 { font-size: 1.45rem; line-height: 1.3; letter-spacing: -0.01em; margin: 2.2rem 0 0.7rem; }
h3 { font-size: 1.12rem; line-height: 1.35; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.13rem; color: var(--muted); }
.small { font-size: 0.88rem; color: var(--faint); }
a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--teal-dark); }

/* Accessible focus states */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
main { display: block; }
section { padding: 8px 0; }

/* Sticky header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--teal-deep);
  text-decoration: none;
}
.logo span { color: var(--amber); }
.main-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 8px 12px;
  border-radius: 999px;
}
.main-nav a:hover { background: var(--teal-tint); color: var(--teal-dark); }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--teal-tint), var(--white));
  border-bottom: 1px solid var(--line);
  padding: 44px 0 34px;
}
.hero h1 { max-width: 720px; }
.hero .lede { max-width: 640px; }
.hero-badge {
  display: inline-block;
  background: var(--white);
  border: 1px solid var(--teal-soft);
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.btn {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { background: var(--teal-dark); color: var(--white); }
.btn-secondary {
  background: var(--white);
  color: var(--teal-dark);
  border: 1.5px solid var(--teal);
}
.btn-secondary:hover { background: var(--teal-tint); color: var(--teal-dark); }

/* Cards and grids */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 18px 0 8px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: block;
  text-decoration: none;
  color: var(--ink);
}
a.card:hover { border-color: var(--teal); color: var(--ink); }
.card h3 { color: var(--teal-deep); }
.card p { color: var(--muted); font-size: 0.96rem; margin-bottom: 0.6rem; }
.card .card-link { color: var(--teal); font-weight: 700; font-size: 0.92rem; }
.card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: var(--teal-tint);
  border: 1px solid var(--teal-soft);
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.card .tag-soon { color: #92400e; background: var(--amber-tint); border-color: #fde68a; }

/* Panels */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin: 18px 0;
}
.disclaimer-box {
  background: var(--amber-tint);
  border: 1px solid #fde68a;
  border-left: 5px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 22px 0;
  font-size: 0.94rem;
}
.disclaimer-box strong { color: #92400e; }
.sources-note {
  background: var(--teal-tint);
  border: 1px solid var(--teal-soft);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 18px 0;
  font-size: 0.94rem;
}

/* Calculator */
.calc {
  background: var(--white);
  border: 1.5px solid var(--teal-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin: 20px 0;
}
.calc label { display: block; font-weight: 700; font-size: 0.95rem; margin: 14px 0 6px; }
.calc label:first-child { margin-top: 0; }
.calc input[type="number"], .calc select {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--white);
  color: var(--ink);
}
.calc input[type="range"] { width: 100%; accent-color: var(--teal); }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
.range-value { font-weight: 800; color: var(--teal-dark); }
.calc .btn { width: 100%; margin-top: 18px; }
.results {
  display: none;
  margin-top: 20px;
  border-top: 1px dashed var(--line);
  padding-top: 18px;
}
.results.show { display: block; }
.result-big {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--teal-deep);
  line-height: 1.3;
  margin-bottom: 6px;
}
.result-line { margin-bottom: 6px; }
.calc-error { display: none; color: #b91c1c; font-weight: 600; margin-top: 12px; }
.calc-error.show { display: block; }

/* Result tables (used inside calculator results) */
.results-table { width: 100%; border-collapse: collapse; margin: 10px 0 6px; font-size: 0.97rem; }
.results-table th, .results-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.results-table th { color: var(--teal-deep); font-weight: 700; }
.results-table th:last-child, .results-table td:last-child { text-align: right; }

/* Generic data tables (guides) */
.table-scroll { overflow-x: auto; margin: 14px 0 20px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.data-table th, .data-table td { text-align: left; padding: 9px 12px; border: 1px solid var(--line); vertical-align: top; }
.data-table thead th { background: var(--teal-tint); color: var(--teal-deep); font-weight: 700; }
.data-table td:first-child { font-weight: 700; color: var(--teal-deep); white-space: nowrap; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq-item h3 { margin-bottom: 4px; }
.faq-item p { color: var(--muted); margin-bottom: 4px; }

/* Lists */
ul.checks { list-style: none; padding: 0; margin: 0 0 1rem; }
ul.checks li { padding: 6px 0 6px 28px; position: relative; }
ul.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 13px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--panel);
  margin-top: 48px;
  padding: 30px 0 36px;
  font-size: 0.92rem;
  color: var(--muted);
}
.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.footer-nav a { color: var(--teal-dark); font-weight: 600; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.footer-disclaimer { max-width: 760px; }

/* Wider screens */
@media (min-width: 640px) {
  h1 { font-size: 2.5rem; }
  .grid { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .hero { padding: 64px 0 48px; }
}
@media (min-width: 960px) {
  .grid { grid-template-columns: 1fr 1fr 1fr; }
  .grid-two { grid-template-columns: 1fr 1fr; }
}
