/* ===== FitCalc — shared styles ===== */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --bg-muted: #f2f2f3;
  --ink: #111113;
  --ink-soft: #5c5c63;
  --ink-faint: #8a8a92;
  --line: #ececee;
  --line-strong: #d9d9dd;
  --accent: #111113;
  --blue: #1f6f8b;
  --green: #15a06a;
  --amber: #f3b21b;
  --red: #e1452d;
  --orange: #ef6c2b;
  --teal: #149b8e;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(17,17,19,.04), 0 8px 24px rgba(17,17,19,.05);
  --maxw: 1280px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
.icon { width: 18px; height: 18px; stroke-width: 2; flex: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 20px; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 12px; background: var(--accent);
  color: #fff; display: grid; place-items: center;
}
.brand .logo .icon { width: 22px; height: 22px; }
.nav-links {
  display: flex; gap: 28px; margin: 0 auto;
  list-style: none; padding: 0;
}
.nav-links a {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-faint); font-weight: 600; font-size: 16px;
  padding: 6px 2px; border-bottom: 2px solid transparent;
  transition: color .15s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); border-bottom-color: var(--ink); }

/* ===== Layout ===== */
.container { max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 64px; }
.page-head { max-width: 720px; margin-bottom: 32px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-muted); color: var(--ink);
  font-weight: 600; font-size: 14px; padding: 6px 14px; border-radius: 999px;
  margin-bottom: 18px;
}
.page-head h1 { font-size: 44px; line-height: 1.05; letter-spacing: -.02em; margin: 0 0 14px; }
.page-head p { color: var(--ink-soft); font-size: 18px; margin: 0; }

.grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.05fr) minmax(0,.62fr);
  gap: 24px; align-items: start;
}

/* ===== Cards ===== */
.card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.card h2 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
.card .sub { color: var(--ink-faint); font-size: 15px; margin: 0 0 22px; }
.field { margin-bottom: 22px; }
.field-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-weight: 700; font-size: 15px; margin-bottom: 10px;
}
.field-label .val { color: var(--ink); font-weight: 700; }
.group-label { font-weight: 700; font-size: 15px; margin: 0 0 10px; }

/* inputs */
.input-wrap {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.input-wrap:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17,17,19,.06); }
.input-wrap .icon { color: var(--ink-faint); }
.input-wrap input {
  border: 0; outline: 0; width: 100%; font-size: 17px; font-weight: 600;
  color: var(--ink); background: transparent;
}
.input-wrap .unit { color: var(--ink-faint); font-weight: 600; font-size: 15px; }

/* segmented toggle (2 cols) */
.toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toggle button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-strong); background: var(--bg);
  border-radius: var(--radius-sm); padding: 16px; font-weight: 700; font-size: 16px;
  color: var(--ink-soft); transition: all .15s;
}
.toggle button:hover { border-color: var(--ink); }
.toggle button.active { background: var(--bg-muted); color: var(--ink); border-color: var(--ink); }

/* pills (wrap) */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  border: 1px solid var(--line-strong); background: var(--bg-muted);
  border-radius: 999px; padding: 9px 18px; font-weight: 600; font-size: 15px;
  color: var(--ink-soft); transition: all .15s;
}
.pill:hover { border-color: var(--ink); }
.pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* option cards (goal) */
.options { display: grid; gap: 12px; }
.option {
  display: flex; align-items: center; gap: 14px; text-align: left;
  border: 1px solid var(--line-strong); background: var(--bg-soft);
  border-radius: var(--radius-sm); padding: 16px 18px; transition: all .15s;
}
.option:hover { border-color: var(--ink); }
.option.active { background: var(--bg); border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.option .o-icon { color: var(--ink-soft); }
.option .o-text { display: flex; flex-direction: column; }
.option .o-text strong { font-size: 16px; }
.option .o-text span { color: var(--ink-faint); font-size: 14px; }
.option .o-check { margin-left: auto; color: var(--ink); opacity: 0; }
.option.active .o-check { opacity: 1; }

/* primary button */
.btn-primary {
  width: 100%; border: 0; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff; padding: 16px;
  font-weight: 700; font-size: 16px; display: inline-flex;
  align-items: center; justify-content: center; gap: 10px; transition: opacity .15s;
}
.btn-primary:hover { opacity: .9; }

/* ===== Result card ===== */
.result-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 26px; }
.result-head .sub { margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg-muted); border-radius: 999px; padding: 6px 14px;
  font-weight: 600; font-size: 14px;
}
.result-main { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }

/* gauge ring */
.gauge { position: relative; width: 168px; height: 168px; flex: none; }
.gauge svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.gauge .track { fill: none; stroke: var(--line); stroke-width: 12; }
.gauge .prog { fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round;
  transition: stroke-dashoffset .6s ease; }
.gauge .center {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
}
.gauge .center .num { font-size: 40px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.gauge .center .lab { color: var(--ink-faint); font-size: 14px; margin-top: 4px; }

.result-detail { flex: 1; min-width: 220px; }
.result-detail .kicker { color: var(--ink-faint); font-size: 15px; margin: 0 0 2px; }
.result-detail h3 { font-size: 26px; margin: 0 0 10px; letter-spacing: -.01em; }
.result-detail p { color: var(--ink-soft); font-size: 15px; margin: 0 0 14px; }
.result-detail .note { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.result-detail .note .icon { color: var(--ink); }

/* scale bar */
.scale { margin-top: 26px; }
.scale-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; }
.scale-bar span { flex: 1; }
.scale-bar .s-blue { background: var(--blue); }
.scale-bar .s-ink { background: var(--ink); flex: 1.3; }
.scale-bar .s-amber { background: var(--amber); }
.scale-bar .s-red { background: var(--red); }
.scale-labels { display: flex; justify-content: space-between; color: var(--ink-faint); font-size: 13px; margin-top: 10px; }

/* macro bar */
.macro-head { display: flex; justify-content: space-between; color: var(--ink-faint); font-size: 14px; margin: 0 0 10px; }
.macro-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 0; }
.macro-bar .m-carbs { background: var(--orange); }
.macro-bar .m-protein { background: var(--teal); }
.macro-bar .m-fat { background: var(--amber); }
.macro-legend { display: flex; gap: 22px; margin-top: 14px; flex-wrap: wrap; }
.macro-legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.carbs { background: var(--orange); }
.dot.protein { background: var(--teal); }
.dot.fat { background: var(--amber); }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 22px; }
.stat {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px;
  background: var(--bg); box-shadow: var(--shadow);
}
.stat .s-ico {
  width: 36px; height: 36px; border-radius: 10px; background: var(--bg-muted);
  display: grid; place-items: center; margin-bottom: 16px; color: var(--ink);
}
.stat.tint-green .s-ico { background: #e3f5ec; color: var(--green); }
.stat.tint-orange .s-ico { background: #fdece2; color: var(--orange); }
.stat.tint-amber .s-ico { background: #fdf3da; color: #c98a05; }
.stat .s-val { font-size: 24px; font-weight: 800; }
.stat .s-lab { color: var(--ink-faint); font-size: 14px; }

/* next steps list */
.steps { margin-top: 22px; }
.steps .steps-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.steps h3 { font-size: 18px; margin: 0; }
.step {
  display: flex; align-items: center; gap: 16px; padding: 16px 0;
  border-top: 1px solid var(--line);
}
.step:first-of-type { border-top: 0; }
.step .st-ico {
  width: 36px; height: 36px; border-radius: 10px; background: var(--bg-muted);
  display: grid; place-items: center; flex: none; color: var(--ink);
}
.step .st-text strong { display: block; font-size: 16px; }
.step .st-text span { color: var(--ink-faint); font-size: 14px; }
.step .chev { margin-left: auto; color: var(--ink-faint); }

/* ===== Aside motivational image ===== */
.aside-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 560px; color: #fff; box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: space-between;
  background: #1a1a1a;
}
.aside-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.aside-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.05) 40%, rgba(0,0,0,.75) 100%);
}
.aside-card .a-top, .aside-card .a-bottom { position: relative; z-index: 1; padding: 22px; }
.aside-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px;
}
.aside-card .a-quote { font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 10px; }
.aside-card .a-by { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,.85); font-size: 15px; }

/* weekly plan */
.week { display: flex; justify-content: space-between; margin-top: 8px; }
.week .day { text-align: center; }
.week .day .d-lab { color: var(--ink-faint); font-size: 14px; margin-bottom: 10px; }
.week .day .d-dot {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-muted); color: var(--ink-faint); font-weight: 700; margin: 0 auto;
}
.week .day.on .d-dot { background: var(--accent); color: #fff; }
.plan-head .chip { margin-bottom: 14px; }
.plan-meta { color: var(--ink-soft); font-size: 15px; margin: 2px 0 0; }

.workout-day {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px 22px;
  box-shadow: var(--shadow); position: relative;
}
.workout-day.accent { border-left: 4px solid var(--ink); }
.workout-day.rest { background: var(--bg-soft); }
.wd-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.wd-title { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.wd-min { background: var(--bg-muted); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.wd-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.wd-list li { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 15px; }
.wd-list li .icon { color: var(--green); }
.wd-rest { color: var(--ink-soft); font-size: 15px; margin: 0; }

.result-stack { display: grid; gap: 24px; }

/* ===== Ad slots ===== */
.ad-slot {
  margin: 0 auto; text-align: center; overflow: hidden;
}
.ad-slot.ad-leaderboard { max-width: var(--maxw); padding: 8px 24px 0; }
.ad-slot .ad-label {
  display: block; text-transform: uppercase; letter-spacing: .08em;
  font-size: 11px; color: var(--ink-faint); margin-bottom: 6px;
}

/* ===== SEO content section ===== */
.seo-section { max-width: 880px; margin: 56px auto 0; }
.seo-section h2 { font-size: 28px; letter-spacing: -.01em; margin: 0 0 14px; }
.seo-section h3 { font-size: 20px; margin: 28px 0 8px; }
.seo-section p, .seo-section li { color: var(--ink-soft); font-size: 16px; }
.seo-section ul { padding-left: 20px; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 18px; margin-bottom: 12px;
}
.faq summary { font-weight: 700; cursor: pointer; font-size: 16px; }
.faq details p { margin: 10px 0 0; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); margin-top: 64px; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 40px 24px;
  display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between;
}
.footer-inner .brand { font-size: 18px; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin: 0 0 12px; }
.footer-col a { display: block; color: var(--ink-soft); font-size: 15px; padding: 4px 0; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { border-top: 1px solid var(--line); }
.footer-bottom .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 18px 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  color: var(--ink-faint); font-size: 14px;
}

/* ===== Cookie consent banner ===== */
.cc-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100;
  background: var(--ink); color: #fff; border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,.28); padding: 18px 22px;
  animation: cc-up .35s ease;
}
@keyframes cc-up { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.cc-inner {
  max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center;
  gap: 20px; flex-wrap: wrap;
}
.cc-text { margin: 0; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.88); flex: 1; min-width: 240px; }
.cc-text a { color: #fff; text-decoration: underline; }
.cc-actions { display: flex; gap: 10px; flex: none; }
.cc-btn {
  border: 0; border-radius: 10px; padding: 11px 20px; font-weight: 700; font-size: 14px;
  font-family: inherit; transition: opacity .15s;
}
.cc-btn:hover { opacity: .85; }
.cc-reject { background: rgba(255,255,255,.14); color: #fff; }
.cc-accept { background: #fff; color: var(--ink); }
@media (max-width: 560px) {
  .cc-actions { width: 100%; }
  .cc-btn { flex: 1; }
}

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .aside-card { grid-column: 1 / -1; min-height: 320px; }
}
@media (max-width: 760px) {
  .nav { gap: 12px; flex-wrap: wrap; }
  .nav-links { gap: 16px; order: 3; width: 100%; margin: 6px 0 0; overflow-x: auto; }
  .nav-links a { font-size: 15px; }
  .page-head h1 { font-size: 32px; }
  .grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .card { padding: 22px; }
}
