/* Northkit free calculators, design v2. Palette from the logo: gold radial, deep green N, white star. */
:root {
  --green-900: #0b2a22;
  --green-800: #0f352c;
  --green-700: #17493c;
  --green-600: #1f5e4e;
  --gold-500: #f0b63f;
  --gold-400: #f6c85a;
  --gold-600: #d99a1f;
  --gold-100: #fdf1d2;
  --bg: #fbf6ec;
  --paper: #ffffff;
  --ink: #17261f;
  --muted: #5b6a63;
  --line: #e6dcc8;
  --line-soft: #efe7d6;
  --alert: #fbe3e1;
  --alert-ink: #8a1f1f;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 53, 44, .06), 0 12px 32px -12px rgba(15, 53, 44, .18);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--green-600); text-underline-offset: 3px; }
a:hover { color: var(--green-800); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; color: var(--green-800); }
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 16px; line-height: 1;
  padding: 15px 22px; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn .arrow { width: 18px; height: 18px; transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold-500); outline-offset: 2px;
}
.btn-sm { padding: 11px 18px; font-size: 14px; }
.btn-gold { background: var(--gold-500); color: var(--green-900); box-shadow: 0 6px 18px -6px rgba(240, 182, 63, .7); }
.btn-gold:hover { background: var(--gold-400); color: var(--green-900); transform: translateY(-1px); }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .04); }
.btn-ghost:hover { color: #fff; border-color: var(--gold-400); }
.btn-green { background: var(--green-700); color: #fff; }
.btn-green:hover { background: var(--green-600); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--green-700); border-color: var(--line); }
.btn-outline:hover { border-color: var(--green-700); color: var(--green-800); }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 42, 34, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.logo img { border-radius: 50%; box-shadow: 0 0 0 2px rgba(240, 182, 63, .55); }
.logo span { font-family: var(--serif); font-weight: 700; font-size: 22px; letter-spacing: .01em; }
.logo:hover { color: var(--gold-400); }
.topbar nav { display: flex; align-items: center; gap: 4px; }
.topbar nav a:not(.btn) {
  color: rgba(255, 255, 255, .82); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 8px 12px; border-radius: 999px;
}
.topbar nav a:not(.btn):hover { color: #fff; background: rgba(255, 255, 255, .08); }
.topbar nav .btn { margin-left: 8px; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(240, 182, 63, .30), transparent 60%),
    radial-gradient(600px 400px at 0% 110%, rgba(31, 94, 78, .55), transparent 60%),
    var(--green-800);
  padding: 56px 0 72px;
}
.hero::after {  /* north star watermark */
  content: ""; position: absolute; right: -90px; bottom: -150px; width: 480px; height: 480px; opacity: .06;
  background: #fff;
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%);
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; gap: 36px; align-items: center; }
.eyebrow { margin: 0 0 14px; color: var(--gold-400); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { color: #fff; font-size: clamp(36px, 8vw, 58px); line-height: 1.05; }
.hero .sub { margin: 18px 0 0; max-width: 560px; font-size: 18px; color: rgba(255, 255, 255, .82); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.badge {
  display: inline-block; margin-top: 26px; padding: 7px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold-400); background: rgba(240, 182, 63, .1); border: 1px solid rgba(240, 182, 63, .35);
}
.jump { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.jump a {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; text-decoration: none; color: #fff;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  transition: background .15s ease, transform .15s ease, border-color .15s ease;
}
.jump a:hover { background: rgba(255, 255, 255, .11); border-color: rgba(240, 182, 63, .6); transform: translateY(-2px); color: #fff; }
.jump .jt { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.jump strong { font-size: 17px; }
.jump small { color: rgba(255, 255, 255, .68); font-size: 14px; }
.jump .arrow { width: 20px; height: 20px; color: var(--gold-400); flex: none; }
.ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--gold-500); color: var(--green-900); }
.ico svg { width: 24px; height: 24px; }
.ico.big { width: 52px; height: 52px; border-radius: 14px; }
.ico.big svg { width: 28px; height: 28px; }

/* Cards */
main { padding-top: 40px; padding-bottom: 24px; margin-top: -32px; position: relative; z-index: 2; }
.card {
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px 20px; margin-bottom: 28px;
}
.card-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.kicker { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-600); }
.card h2 { font-size: clamp(26px, 5vw, 34px); }
.lede { margin: 0 0 22px; color: var(--muted); max-width: 760px; }
.sect { margin: 36px 0 10px; font-size: 20px; font-family: var(--serif); }

/* Calculator layout */
.calc { display: grid; gap: 16px; }
.panel { border-radius: var(--radius-sm); padding: 20px; }
.panel.inputs { background: #fdfaf3; border: 1px solid var(--line-soft); }
.fields { display: grid; gap: 16px; }
label { display: grid; grid-template-rows: 1fr auto; align-content: end; gap: 7px; font-size: 14px; font-weight: 600; color: var(--green-800); line-height: 1.3; }
input, select {
  font: inherit; font-size: 16px; font-weight: 500; color: var(--ink);
  width: 100%; min-height: 48px; padding: 11px 14px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f352c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
input:hover, select:hover { border-color: #cdbf9f; }
input:focus, select:focus { outline: none; border-color: var(--gold-600); box-shadow: 0 0 0 4px rgba(240, 182, 63, .28); }
input::placeholder { color: #9aa59f; font-weight: 400; }

/* Results */
.panel.results { background: var(--green-800); color: #fff; display: flex; flex-direction: column; gap: 12px;
  background-image: radial-gradient(420px 220px at 100% 0%, rgba(240, 182, 63, .18), transparent 70%); }
.results h3 { color: var(--gold-400); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-family: var(--sans); }
.results h4 { color: #fff; font-family: var(--serif); font-size: 20px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.kpi span { font-size: 13px; color: rgba(255, 255, 255, .72); font-weight: 600; }
.kpi strong { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: #fff; line-height: 1.2; }
.kpi.feature { background: linear-gradient(135deg, var(--gold-400), var(--gold-500)); border: 0; }
.kpi.feature span { color: var(--green-800); }
.kpi.feature strong { color: var(--green-900); font-family: var(--serif); font-size: clamp(32px, 8vw, 42px); }
.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.results .ref { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .78); line-height: 1.5; }
.results .ref:empty { display: none; }
.warn { display: none; background: var(--alert); color: var(--alert-ink); padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.5; font-weight: 600; }
.warn.show { display: block; }

/* Trip */
.trip-grid { display: grid; gap: 24px; }
.trip-col { border: 0; margin: 0; padding: 0; min-width: 0; }
.trip-col legend { padding: 0; margin-bottom: 14px; }
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--green-800); color: var(--gold-400); font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.fields.two { grid-template-columns: 1fr 1fr; gap: 14px; }
.fields.two label:first-child { grid-column: 1 / -1; }
.trip-grid + * { margin-top: 0; }
#trip .panel.results { margin-top: 16px; }
.res-grid { display: grid; gap: 22px; }
.res-col { display: flex; flex-direction: column; gap: 10px; }
.compare { margin: 4px 0 0; padding: 14px 16px; border-radius: 12px; background: rgba(240, 182, 63, .14); border: 1px solid rgba(240, 182, 63, .4); color: var(--gold-400); font-weight: 700; text-align: center; }

/* Workout */
.span2 { grid-column: 1 / -1; }
#workout .fields { grid-template-columns: 1fr 1fr; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.actions .btn { padding: 14px 20px; }
.table-wrap { overflow-x: auto; margin-top: 18px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: #fff; -webkit-overflow-scrolling: touch; }
.table-wrap:has(#wo-body:empty) { display: none; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: #fdfaf3; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: #fffdf8; }
.limits td:nth-child(2), .limits td:nth-child(3), .limits th:nth-child(2), .limits th:nth-child(3) { white-space: nowrap; }
.limits td:first-child { font-weight: 700; color: var(--green-800); }
.limits th:last-child, .limits td:last-child { text-align: right; }
.log td:nth-child(4) { font-weight: 700; font-variant-numeric: tabular-nums; }
.log th:last-child, .log td:last-child { text-align: right; }
.log button.secondary { font: inherit; font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 999px; cursor: pointer; background: transparent; color: var(--alert-ink); border: 1.5px solid #efc3bf; }
.log button.secondary:hover { background: var(--alert); }

/* Disclaimers, refs, CTAs */
.disclaimer { margin: 22px 0 0; padding: 14px 16px; background: var(--gold-100); border-left: 4px solid var(--gold-500); border-radius: 0 10px 10px 0; font-size: 14px; color: #4a4636; line-height: 1.55; }
.ref { font-size: 14px; color: var(--muted); margin: 14px 0 0; overflow-wrap: anywhere; }
.cta-strip { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 22px; padding: 18px 20px; border-radius: var(--radius-sm); background: #f3efe2; border: 1px dashed #d8cba8; }
.cta-strip p { margin: 0; font-size: 15px; color: var(--green-800); font-weight: 500; }
.cta-strip a:not(.btn) { font-weight: 700; }

/* About */
.about { background: var(--green-800); color: rgba(255,255,255,.88); border: 0;
  background-image: radial-gradient(500px 260px at 100% 0%, rgba(240,182,63,.16), transparent 70%); }
.about h2 { color: #fff; margin-bottom: 18px; }
.about a:not(.btn) { color: var(--gold-400); }
.about strong { color: #fff; }
.about-grid { display: grid; gap: 14px; margin-bottom: 22px; }
.about-grid p { margin: 0; padding: 16px 18px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); font-size: 15px; }

/* Footer */
footer { background: var(--green-900); color: rgba(255, 255, 255, .7); padding: 36px 0 44px; margin-top: 16px; border-top: 3px solid var(--gold-500); font-size: 14px; }
footer .foot { display: flex; flex-direction: column; gap: 16px; }
footer p { margin: 0; max-width: 720px; }
footer a:not(.logo) { color: var(--gold-400); }
footer .logo span { font-size: 20px; }

/* Larger screens */
@media (min-width: 640px) {
  .wrap { padding: 0 28px; }
  .card { padding: 36px; }
  .fields { grid-template-columns: 1fr 1fr; }
  .trip-grid, .res-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .res-grid { gap: 28px; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .cta-strip { flex-direction: row; align-items: center; justify-content: space-between; }
  .cta-strip .btn { flex: none; }
  .btn-sm.hero-btn { padding: 12px 20px; }
}
@media (min-width: 960px) {
  .hero { padding: 84px 0 108px; }
  .hero-grid { grid-template-columns: 1.25fr .9fr; gap: 64px; }
  .calc { grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: stretch; }
  #workout .calc { align-items: start; }
  #tfsa .panel.results { justify-content: flex-start; }
  main { margin-top: -48px; }
  footer .foot { flex-direction: row; justify-content: space-between; align-items: center; gap: 48px; }
}
@media (max-width: 719px) {
  .topbar nav a:not(.btn) { display: none; }
  .bar { min-height: 64px; }
  .hero { padding: 40px 0 64px; }
  .fields.two { grid-template-columns: 1fr 1fr; }
  td, th { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

.calc-notes { margin-top: 16px; }
.calc-notes .ref { margin: 0; padding: 14px 16px; border-radius: 10px; background: #f6f1e3; color: var(--green-800); font-size: 14px; line-height: 1.55; }
.calc-notes .ref:empty { display: none; }
.calc-notes .warn { margin-top: 12px; }

@media (max-width: 519px) {
  .wrap { padding: 0 14px; }
  .card { padding: 20px 14px; border-radius: 16px; }
  .panel { padding: 16px 14px; }
  .badge { font-size: 11px; letter-spacing: .03em; padding: 6px 12px; }
  .hero .sub { font-size: 17px; }
  .cta-row .btn { width: 100%; }
  .card-head { gap: 12px; }
  .ico.big { width: 46px; height: 46px; }
  .fields.two { gap: 12px; }
  .cta-strip .btn { width: 100%; }
  .actions .btn { flex: 1; }
}
