/* ============ StrongPlan styles ============ */
:root {
  --bg: #0c0f14;
  --bg-2: #11161f;
  --surface: #161d29;
  --surface-2: #1c2533;
  --line: #28323f;
  --text: #eef2f7;
  --muted: #9aa7b8;
  --accent: #ff5a36;
  --accent-2: #ffb02e;
  --good: #34d399;
  --bad: #ff6b6b;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, #1a2230 0%, var(--bg) 55%);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { width: min(1080px, 92vw); margin: 0 auto; }

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
a { color: inherit; }
p { margin: 0; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; cursor: pointer; border: none; border-radius: var(--radius-sm);
  font-family: inherit; font-weight: 600; font-size: .95rem;
  padding: .7rem 1.25rem; text-decoration: none; transition: transform .08s ease, filter .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-small { padding: .5rem .9rem; font-size: .85rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-pro {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #1a1205; font-weight: 700;
}
.btn-pro:hover { filter: brightness(1.05); }
.btn-link { background: none; color: var(--muted); padding: .4rem; font-weight: 500; text-decoration: underline; }
.btn-link:hover { color: var(--text); }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(12,15,20,.78);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-name { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand-name.small { font-size: 1rem; }
.brand-accent { color: var(--accent); }
.header-nav { display: flex; align-items: center; gap: 1.4rem; }
.header-nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .92rem; }
.header-nav a:hover { color: var(--text); }
.pro-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1205; font-weight: 800; font-size: .72rem;
  padding: .2rem .5rem; border-radius: 6px; letter-spacing: .04em;
}

/* ---- hero ---- */
.hero { padding: 4.5rem 0 3.5rem; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.eyebrow { color: var(--accent-2); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; }
.grad { background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--muted); font-size: 1.1rem; margin: 1.25rem 0 1.75rem; max-width: 38ch; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-note { color: var(--muted); font-size: .85rem; margin-top: 1rem; }

.hero-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem; box-shadow: var(--shadow);
}
.hc-row { display: grid; grid-template-columns: .6fr .7fr 1.4fr; gap: .5rem; padding: .55rem .4rem; font-size: .9rem; border-radius: 8px; }
.hc-head { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.hc-row:not(.hc-head) { border-top: 1px solid var(--line); }
.hc-accent { background: rgba(255,90,54,.12); }
.hc-row span:first-child { font-weight: 700; color: var(--accent-2); }

/* ---- sections ---- */
section { scroll-margin-top: 70px; }
.section-head { margin-bottom: 1.6rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
.section-head p { color: var(--muted); margin-top: .4rem; }
.section-head.center { text-align: center; }
.section-head.center p { max-width: 50ch; margin-left: auto; margin-right: auto; }
.section-head.between { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem;
}

/* ---- calculator ---- */
.calc-section { padding: 1rem 0 3rem; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.field input, .bar-config select, .program-controls select, .program-controls input, .field select {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-sm); padding: .7rem .85rem; font-family: inherit; font-size: 1rem;
  width: 100%;
}
.field input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }

.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 3px; width: fit-content; }
.seg-btn { background: none; border: none; color: var(--muted); font-family: inherit; font-weight: 600; padding: .45rem 1.4rem; border-radius: 7px; cursor: pointer; }
.seg-btn.active { background: var(--accent); color: #fff; }

.error { color: var(--bad); background: rgba(255,107,107,.1); border: 1px solid rgba(255,107,107,.35); padding: .6rem .8rem; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 1rem; }
.formula-note { color: var(--muted); font-size: .8rem; margin-top: .9rem; text-align: center; }

.result-card { display: flex; flex-direction: column; justify-content: center; }
.result-empty { text-align: center; color: var(--muted); }
.re-icon { font-size: 2rem; margin-bottom: .5rem; }
.result-label { color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.result-value { font-size: 3.4rem; font-weight: 800; line-height: 1; margin: .4rem 0 1rem; }
.result-value .unit-suffix { font-size: 1.3rem; color: var(--muted); font-weight: 600; }
.result-actions { display: flex; gap: .6rem; }
.ephemeral-note { color: var(--muted); font-size: .82rem; margin-top: 1rem; }
.ephemeral-note a { color: var(--accent-2); }

/* ---- percentage table ---- */
.table-section { padding: 2rem 0 1rem; }
.bar-config { display: flex; align-items: center; gap: .6rem; }
.bar-config label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.bar-config select { width: auto; }
.table-wrap { padding: 0; overflow: hidden; }
.pct-table { width: 100%; border-collapse: collapse; }
.pct-table th, .pct-table td { text-align: left; padding: .85rem 1.2rem; }
.pct-table thead th { background: var(--bg-2); color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; }
.pct-table tbody tr { border-top: 1px solid var(--line); }
.pct-table tbody tr:hover { background: var(--surface-2); }
.pct-table td.pct-target { font-weight: 700; color: var(--accent-2); }
.pct-table td.pct-weight { font-weight: 700; font-size: 1.05rem; }
.lock-dot { font-size: .8rem; }
.plate-cell { color: var(--muted); }
.plate-chip { display: inline-block; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: .1rem .45rem; font-size: .8rem; font-weight: 600; margin: 0 .2rem .2rem 0; color: var(--text); }
.plate-locked { color: var(--muted); font-style: italic; filter: blur(3px); user-select: none; }

.pro-inline-upsell {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 1.1rem; padding: 1rem 1.25rem; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(255,90,54,.14), rgba(255,176,46,.1));
  border: 1px solid rgba(255,90,54,.3);
}
.pro-inline-upsell span { display: block; color: var(--muted); font-size: .88rem; }

/* ---- pro veil (locked features) ---- */
.pro-feature { position: relative; overflow: hidden; }
.pro-veil {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  background: rgba(12,15,20,.72); backdrop-filter: blur(4px); text-align: center; padding: 1rem;
}
.pro-veil p { font-weight: 600; }
body.is-pro .pro-veil { display: none; }
body.is-pro .pro-inline-upsell { display: none; }
body.is-pro #plateLockDot { display: none; }

/* ---- custom pct ---- */
.custom-pct { margin-top: 1.25rem; }
.cp-head h3 { font-size: 1.15rem; }
.cp-head p { color: var(--muted); font-size: .88rem; margin-top: .3rem; margin-bottom: 1rem; }
.cp-rows { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.cp-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: .6rem; align-items: center; }
.cp-row input { background: var(--bg-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: .55rem .7rem; font-family: inherit; }
.cp-row .rm-row { background: none; border: none; color: var(--bad); cursor: pointer; font-size: 1.2rem; }
.pill-pro {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1205; font-weight: 800; font-size: .62rem; padding: .15rem .45rem;
  border-radius: 5px; letter-spacing: .05em; vertical-align: middle; margin-left: .4rem;
}

/* ---- program ---- */
.program-section { padding: 2.5rem 0; }
.program-controls { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: end; margin-bottom: 1.5rem; }
.program-controls .btn { height: 44px; }
.week-block { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden; }
.week-head { background: var(--bg-2); padding: .75rem 1.1rem; display: flex; justify-content: space-between; align-items: center; }
.week-head h4 { margin: 0; font-size: 1rem; }
.week-head .week-tag { color: var(--accent-2); font-size: .8rem; font-weight: 600; }
.set-table { width: 100%; border-collapse: collapse; }
.set-table th, .set-table td { padding: .55rem 1.1rem; text-align: left; font-size: .9rem; }
.set-table thead th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.set-table tbody tr { border-top: 1px solid var(--line); }
.set-table .warmup { color: var(--muted); }
.set-table .topset td { font-weight: 700; }
.set-weight { font-weight: 700; }

.export-bar { display: flex; align-items: center; gap: .7rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.export-label { color: var(--muted); font-size: .85rem; font-weight: 600; }

/* ---- saved ---- */
.saved-section { padding: 1rem 0 2rem; }
.saved-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.saved-row:first-child { border-top: none; }
.saved-meta { color: var(--muted); font-size: .85rem; }
.saved-actions { display: flex; gap: .5rem; }
.saved-empty { color: var(--muted); text-align: center; padding: 1rem; }

/* ---- pricing ---- */
.pricing-section { padding: 3.5rem 0 4rem; }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 820px; margin: 0 auto; }
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.75rem; position: relative; }
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.ribbon { position: absolute; top: -12px; right: 1.5rem; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1a1205; font-weight: 800; font-size: .72rem; padding: .25rem .7rem; border-radius: 6px; letter-spacing: .03em; }
.price-card h3 { font-size: 1.3rem; }
.price { font-size: 2.6rem; font-weight: 800; margin: .6rem 0 .1rem; }
.price-once { font-size: 1rem; color: var(--muted); font-weight: 600; }
.price-sub { color: var(--muted); font-size: .9rem; margin-bottom: 1.4rem; }
.feature-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: .6rem; }
.feature-list li { padding-left: 1.7rem; position: relative; font-size: .93rem; }
.feature-list li.yes::before { content: '✓'; color: var(--good); position: absolute; left: 0; font-weight: 800; }
.feature-list li.no { color: var(--muted); }
.feature-list li.no::before { content: '✕'; color: #54606e; position: absolute; left: 0; font-weight: 800; }
.pro-status-line { text-align: center; margin-top: 1.5rem; font-weight: 600; color: var(--good); }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; margin-top: 2rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-inner p { color: var(--muted); font-size: .85rem; }

/* ---- print sheet (hidden on screen) ---- */
.print-sheet { display: none; }

/* ============ responsive ============ */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .calc-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .program-controls { grid-template-columns: 1fr; }
  .program-controls .btn { width: 100%; }
}

/* ============ PRINT ============ */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .hero, #calc, #pricing, .pro-inline-upsell,
  .custom-pct, .program-controls, .export-bar, .bar-config, .pro-veil,
  .header-nav, #savedSection { display: none !important; }
  section { padding: 0 !important; }
  .card { border: 1px solid #ccc; box-shadow: none; }
  .print-sheet { display: block !important; padding: 0 0 1rem; }
  .print-sheet h1 { font-size: 1.6rem; }
  .print-sheet .ps-meta { color: #555; font-size: .9rem; margin: .3rem 0 1rem; }
  .week-block { border: 1px solid #ccc; page-break-inside: avoid; }
  .week-head { background: #f2f2f2; }
  .week-head .week-tag { color: #b8430f; }
  .set-table thead th { color: #555; }
  .set-table tbody tr { border-top: 1px solid #ddd; }
  .program-output { color: #000; }
  /* Free watermark for print */
  .print-watermark { display: block !important; color: #b8430f; font-weight: 800; border: 2px dashed #b8430f; padding: .5rem 1rem; text-align: center; margin-bottom: 1rem; border-radius: 8px; }
  body.is-pro .print-watermark { display: none !important; }
}
.print-watermark { display: none; }
