/* Forge Fit — brand system v1.0
   Black/charcoal foundations, silver secondary text, red reserved for action. */

:root {
  --forge-black: #000000;
  --white: #ffffff;
  --red: #f2380a;
  --silver: #c9cdd3;
  --charcoal: #1a1a1a;
  --graphite: #2e2e2e;
  --stone: #5a5a5a;
  --light-grey: #e6e6e6;

  --bg: var(--forge-black);
  --surface: var(--charcoal);
  --surface2: #222222;
  --line: var(--graphite);
  --text: var(--white);
  --muted: var(--silver);

  --display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand, .btn, .eyebrow, .pill, th, .metric {
  font-family: var(--display);
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; line-height: 1.1; margin: 0 0 14px; }
h2 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; margin: 0 0 10px; }
h3 { font-size: 17px; font-weight: 600; margin: 0 0 8px; }

p { margin: 0 0 14px; }

a { color: var(--white); text-decoration: none; }
a:hover { color: var(--red); }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.optional { color: var(--stone); font-weight: 400; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- nav ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: var(--forge-black);
  border-bottom: 1px solid var(--graphite);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand img { display: block; height: 30px; width: auto; }

.navlinks { display: flex; align-items: center; gap: 18px; }
.navlinks a { font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--silver); }
.navlinks a:hover { color: var(--white); }

.inline { display: inline; margin: 0; }

.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--display); font-size: 13px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--silver);
}
.linkish:hover { color: var(--white); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  border: 1px solid var(--red);
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: #d92f06; border-color: #d92f06; color: var(--white); transform: translateY(-1px); }
.btn.small { padding: 8px 14px; font-size: 12px; }

.ghost {
  display: inline-block;
  background: transparent;
  color: var(--silver);
  border: 1px solid var(--stone);
  border-radius: 8px;
  padding: 12px 22px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer;
}
.ghost:hover { color: var(--white); border-color: var(--silver); }
.ghost.small { padding: 8px 14px; font-size: 12px; }

/* ---------- layout ---------- */

main { max-width: 980px; margin: 0 auto; padding: 40px 24px 64px; }
main.wide { max-width: 1180px; }

.hero { padding: 32px 0 48px; max-width: 760px; }

.heroLogo { display: block; width: min(340px, 70vw); height: auto; margin: 0 0 28px; }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--red); margin: 0 0 12px;
}

.lede { font-size: 17px; color: var(--silver); max-width: 640px; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }

.fineprint { font-size: 12px; color: var(--stone); letter-spacing: .04em; text-transform: uppercase; }

.typeblock { margin: 44px 0; }
.typehead { border-top: 2px solid var(--red); padding-top: 18px; margin-bottom: 20px; max-width: 720px; }
.typehead h2 { margin-bottom: 6px; }

.methodgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }

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

.method p { color: var(--silver); font-size: 14px; }
.method .methodType {
  font-family: var(--display); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin: 0 0 8px;
}

.tags { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font-size: 12px; color: var(--light-grey);
  background: var(--surface2); border: 1px solid var(--graphite);
  border-radius: 999px; padding: 3px 10px;
}

.method.pick { display: flex; flex-direction: column; }
.method.pick .btn { margin-top: auto; align-self: flex-start; }

.how { margin: 56px 0 24px; }
.steps { padding-left: 20px; color: var(--silver); }
.steps li { margin-bottom: 10px; }
.steps strong { color: var(--white); }

.quote { border-left: 3px solid var(--red); margin: 40px 0 0; padding: 6px 0 6px 20px; }
.quote blockquote { margin: 0; font-family: var(--display); font-size: 19px; font-weight: 600; line-height: 1.4; color: var(--light-grey); }

/* ---------- page heads ---------- */

.pagehead {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 20px; flex-wrap: wrap; margin-bottom: 26px;
  border-bottom: 1px solid var(--graphite); padding-bottom: 20px;
}
.headActions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- forms ---------- */

.intake { display: flex; flex-direction: column; gap: 16px; }
.intake .btn { align-self: flex-start; }

.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 20px; }
.formgrid h2 { grid-column: 1 / -1; margin-bottom: 0; }
.fullspan { grid-column: 1 / -1; margin: 0; }

label {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--display); font-size: 12px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--silver);
}

input, select {
  font-family: var(--body); font-size: 15px; color: var(--white);
  background: var(--forge-black); border: 1px solid var(--stone);
  border-radius: 8px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--red); }
input::placeholder { color: var(--stone); }

.checkline { flex-direction: row; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--light-grey); }
.checkline input { width: auto; }

.unitlabel { color: var(--stone); font-size: 11px; font-weight: 500; letter-spacing: .08em; }

.error {
  background: #2a0b05; border: 1px solid var(--red); color: #ffd9cf;
  border-radius: 8px; padding: 10px 14px; font-size: 14px; margin: 0 0 16px;
}

.pickhead { margin-bottom: 8px; }

/* ---------- program view ---------- */

.weeknav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }

.pill {
  display: inline-block; border-radius: 999px; padding: 3px 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.pill.live { background: var(--red); color: var(--white); }

.days { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 28px; }

.daycard {
  background: var(--surface); border: 1px solid var(--line);
  border-top: 3px solid var(--red); border-radius: var(--radius); padding: 18px;
}
.daycard h2 { font-size: 18px; margin-bottom: 2px; }
.daykind { color: var(--red); font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }

.warmlabel { font-family: var(--display); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--stone); margin: 0 0 6px; }
.warmups { list-style: none; padding: 0; margin: 0 0 12px; color: var(--stone); font-size: 13px; }
.warmups li { padding: 2px 0; }

.sets { list-style: none; padding: 0; margin: 0; }
.sets li {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-top: 1px solid var(--graphite);
  font-size: 14px;
}
.sets li:first-child { border-top: 0; }
.load { color: var(--light-grey); font-weight: 500; }
.note { color: var(--stone); font-size: 12px; white-space: nowrap; }

.progression, .notes { margin-bottom: 16px; }
.progression h2, .notes h2 { font-size: 18px; }

.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-family: var(--display); font-size: 14px; }
th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--stone); padding: 8px 10px; border-bottom: 1px solid var(--graphite); }
td { padding: 8px 10px; border-bottom: 1px solid var(--graphite); color: var(--light-grey); }
tr.current td { color: var(--white); font-weight: 700; }
tr.current td:first-child { color: var(--red); }

.notes ul { margin: 0; padding-left: 18px; color: var(--silver); font-size: 14px; }
.notes li { margin-bottom: 8px; }

.regen { margin-top: 10px; }

/* ---------- print view ---------- */

.printweek { margin-bottom: 26px; }
.printdays { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.printday { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.printday h3 { font-size: 14px; margin-bottom: 6px; }
.printday ul { margin: 0; padding-left: 16px; color: var(--silver); font-size: 13px; }
.printday li em { color: var(--stone); font-style: normal; }
.printweek.liveweek h2 { color: var(--red); }
.printnotes h2 { font-size: 18px; }

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--graphite);
  padding: 32px 24px 40px;
  max-width: 980px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 8px;
}
.footbrand { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.footlogo { height: 46px; width: auto; }
.tagline { font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--silver); margin: 0; }

/* ---------- print stylesheet ---------- */

@media print {
  :root { --bg: #fff; --surface: #fff; --text: #111; --muted: #444; --line: #ccc; --graphite: #ddd; --light-grey: #111; --silver: #333; }
  body { background: #fff; color: #111; }
  .nav, .foot, .noprint { display: none !important; }
  main { padding: 0; max-width: none; }
  .card, .daycard, .printday, .printweek { break-inside: avoid; border-color: #ccc; }
  .pill.live { background: #ddd; color: #111; }
  .printweek h2 { font-size: 15px; }
  .printday h3 { font-size: 12px; }
  .printday ul { font-size: 11px; }
  a { color: #111; }
}

@media (max-width: 640px) {
  .nav { padding: 12px 16px; }
  .brand img { height: 24px; }
  .navlinks { gap: 12px; }
  main { padding: 28px 16px 48px; }
  .hero { padding: 16px 0 32px; }
  .heroLogo { width: min(260px, 76vw); }
}

/* ---------- landing shell (side panel) ---------- */

.shell { display: grid; grid-template-columns: 260px 1fr; gap: 48px; margin-top: 4px; }

.rail {
  border-right: 1px solid var(--graphite);
  padding-right: 24px;
  position: sticky;
  top: 88px;
  align-self: start;
}
.railtitle {
  font-family: var(--display); font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--stone);
  margin: 0 0 16px;
}
.railgroup { margin-bottom: 22px; }
.railtype {
  font-family: var(--display); font-size: 12px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--silver);
  margin: 0 0 8px;
}
.raillist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.railitem {
  display: flex; flex-direction: column; gap: 1px;
  padding: 9px 12px; border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0; color: var(--silver); font-size: 14px;
}
.railitem:hover { background: var(--charcoal); color: var(--white); }
.railitem.active { background: var(--charcoal); border-left-color: var(--red); color: var(--white); }
.railitem.active span:first-child { font-weight: 600; }
.raildays { font-size: 11px; color: var(--stone); letter-spacing: .04em; }
.railfoot {
  margin-top: 20px; font-family: var(--display); font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red);
}

.pane { max-width: 700px; }
.pane h1 { font-size: clamp(32px, 4vw, 46px); margin-bottom: 12px; }
.pane .lede { color: var(--silver); margin-bottom: 16px; }
.rule { border: 0; border-top: 1px solid var(--graphite); margin: 28px 0 22px; }
.panefeatures { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px; }
.panefeatures h3 { font-size: 14px; margin-bottom: 4px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; gap: 24px; }
  .rail { position: static; border-right: 0; border-bottom: 1px solid var(--graphite); padding: 0 0 16px; }
  .raillist { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .railitem { border: 1px solid var(--graphite); border-radius: 999px; padding: 6px 12px; flex-direction: row; gap: 8px; align-items: center; }
  .railitem.active { border-color: var(--red); background: transparent; }
  .raildays { display: none; }
}

/* ---------- landing v3: rail + split hero ---------- */

.nav .brand { display: flex; align-items: center; gap: 10px; }
.brandmark { height: 26px; width: auto; display: block; }
.brandname { font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: .1em; text-transform: uppercase; color: var(--white); }
.brandname em { font-style: normal; color: var(--red); }

.rail { display: flex; flex-direction: column; min-height: 520px; }

.typelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.typeitem {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0; color: var(--silver);
  font-family: var(--display); font-size: 14px; font-weight: 600; letter-spacing: .03em;
}
.typeitem:hover { background: var(--charcoal); color: var(--white); }
.typeitem.active { background: var(--charcoal); border-left-color: var(--red); color: var(--white); }
.typecount { font-family: var(--body); font-weight: 400; font-size: 11px; color: var(--stone); letter-spacing: .02em; }

.railauth { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 22px; }
.authbtn { width: 100%; text-align: center; }

.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; }
.splitcopy h1 { font-size: clamp(34px, 4.2vw, 46px); }
.splitcopy .lede { font-size: 16px; max-width: 420px; }

.pickercard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.pickerlist { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pickerrow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--graphite); border-radius: 8px;
  font-size: 14px; color: var(--silver);
}
.pickerrow:hover { border-color: var(--silver); color: var(--white); }
.pickerrow.active { border-color: var(--red); color: var(--white); background: #1d120e; }
.pickerrow .days { font-size: 11px; color: var(--stone); white-space: nowrap; }
.pickerrow.active .days { color: var(--silver); }
.pickersummary { border-top: 1px solid var(--graphite); padding-top: 12px; margin-bottom: 16px; }
.pickersummary p { font-size: 13px; color: var(--silver); margin: 0 0 10px; }
.pickercta { width: 100%; text-align: center; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 26px; }
  .rail { min-height: 0; }
  .typelist { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .typeitem { border: 1px solid var(--graphite); border-radius: 999px; padding: 7px 13px; flex-direction: row; gap: 8px; align-items: center; }
  .typeitem.active { border-color: var(--red); background: transparent; }
  .railauth { flex-direction: row; padding-top: 14px; }
  .authbtn { width: auto; flex: 1; }
}

/* ---------- Forge-style rail + mobile drawer ---------- */

.icon { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.navtoggle {
  display: none; background: transparent; border: 1px solid var(--graphite);
  border-radius: 8px; width: 38px; height: 38px;
  align-items: center; justify-content: center; color: var(--silver); cursor: pointer;
}
.navtoggle:hover { color: var(--white); border-color: var(--stone); }
.drawerClose { display: none; }
.railhead { display: none; }
.backdrop { display: none; }

.typeitem {
  display: flex; flex-direction: row; justify-content: flex-start; align-items: center; gap: 10px;
  padding: 11px 10px; border-left: 2px solid transparent; border-radius: 8px;
  color: var(--silver); font-family: var(--body); font-size: 15px; font-weight: 500;
}
.typeitem:hover { background: #1b1b1b; color: var(--white); }
.typeitem.active { background: #1b1b1b; color: var(--white); border-left-color: var(--red); }

.railrow {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 10px; border-radius: 8px;
  color: var(--silver); font-size: 15px;
}
.railrow:hover { background: #1b1b1b; color: var(--white); }

.railauth {
  margin-top: auto; border-top: 1px solid var(--graphite);
  padding-top: 10px; display: flex; flex-direction: column; gap: 2px;
}

@media (max-width: 900px) {
  .navtoggle { display: inline-flex; }
  .shell { grid-template-columns: 1fr; }
  body.drawer-open { overflow: hidden; }

  .rail {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: min(86vw, 380px); min-height: 100dvh; max-height: 100dvh; overflow-y: auto;
    background: #0e0e0e; border-right: 1px solid var(--graphite);
    z-index: 60; padding: 16px 16px 24px;
    transform: translateX(-102%); transition: transform .22s ease;
    box-shadow: 24px 0 60px rgba(0, 0, 0, .5);
  }
  body.drawer-open .rail { transform: translateX(0); }

  .backdrop {
    display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .62);
    z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  body.drawer-open .backdrop { opacity: 1; pointer-events: auto; }

  .railhead { display: flex; align-items: center; gap: 10px; padding: 4px 6px 22px; }
  .railhead img { height: 26px; width: auto; }
  .railhead .brandname { font-size: 15px; }

  .drawerClose {
    display: inline-flex; position: absolute; top: 14px; right: 12px;
    width: 36px; height: 36px; align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--graphite); border-radius: 8px;
    color: var(--silver); cursor: pointer;
  }
  .drawerClose:hover { color: var(--white); border-color: var(--stone); }

  .typelist { flex-direction: column; gap: 2px; }
  .typeitem { border: 0; border-left: 2px solid transparent; border-radius: 8px; padding: 11px 10px; flex-direction: row; gap: 10px; align-items: center; }
  .typeitem.active { border-left-color: var(--red); background: #1b1b1b; }
  .typecount { display: none; }
  .railauth { flex-direction: column; }
  .authbtn { width: 100%; }
}

/* ---------- mobile optimisation ---------- */

html, body { overflow-x: hidden; }

.nav .brandmark { height: 30px; }
.brandname { font-size: 17px; letter-spacing: .09em; }

.mdrawer { display: none; }
.logoutform { margin: 0; }
.logoutform .railrow {
  width: 100%; background: transparent; border: 0; cursor: pointer;
  font-family: var(--body); text-align: left;
}

@media (max-width: 900px) {
  .nav { padding: 12px 16px; gap: 12px; }
  .nav .brandmark { height: 34px; }
  .brandname { font-size: 18px; letter-spacing: .08em; }
  .navtoggle { width: 44px; height: 44px; flex: 0 0 44px; }
  .navlinks { display: none; }

  main { padding: 24px 16px 48px; }
  .splitcopy h1 { font-size: clamp(30px, 9vw, 38px); }
  .splitcopy .lede { font-size: 15px; }
  .eyebrow { font-size: 10.5px; }
  .pickerrow { min-height: 48px; padding: 12px 14px; }
  .pickerrow .days { font-size: 11px; }
  .pickersummary p { font-size: 14px; }
  .pickercta { padding: 15px 18px; font-size: 13px; }
  .tags li { font-size: 12px; }

  .rail {
    width: min(88vw, 400px);
    padding: 18px 18px calc(24px + env(safe-area-inset-bottom));
  }
  .railhead { padding: 6px 4px 26px; gap: 12px; padding-right: 52px; }
  .railhead img { height: 40px; }
  .railhead .brandname { font-size: 20px; letter-spacing: .07em; }
  .railtitle { font-size: 11px; margin-bottom: 12px; }
  .typeitem, .railrow { min-height: 48px; font-size: 16px; }
  .expanded .icon, .typeitem .icon, .railrow .icon { width: 22px; height: 22px; flex: 0 0 22px; }
  .drawerClose { width: 44px; height: 44px; top: 18px; right: 14px; }
  .drawerClose .icon { width: 20px; height: 20px; }

  .mdrawer { display: flex; }
}
