/* ───────────────────────────────────────────────
   Ai Driven 90-Day Plan — app styles
   Tokens matched to horriblebrands.com:
     red #FF4844 · Bebas Neue display · Poppins body
     pill buttons (radius 100px) · white bg
   ─────────────────────────────────────────────── */

:root {
  --hb-red: #ff4844;
  --hb-red-dark: #e23733;
  --ink: #0d0d0d;
  --paper: #ffffff;
  --muted: #6b6b6b;
  --line: #e8e8e8;
  --radius: 12px;
  --pill: 100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 18px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Header ─────────────────────────────────── */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 3rem; border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-header .logo img { height: 54px; width: auto; display: block; }
.site-header nav { display: flex; align-items: center; gap: 2rem; }
.site-header nav a, .site-header nav .link-btn {
  font-family: 'Poppins', sans-serif; font-weight: 500;
  font-size: 1rem; color: var(--ink);
  background: none; border: none; cursor: pointer; letter-spacing: .2px;
}
.site-header nav a:hover { color: var(--hb-red); text-decoration: none; }

/* ── Main ───────────────────────────────────── */
.site-main {
  max-width: 760px; margin: 0 auto;
  padding: 4.5rem 1.5rem 6rem; min-height: 62vh;
}

h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5em;
  line-height: 1.0;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  font-weight: 400;
}
h1 .hl {
  background: var(--hb-red); color: var(--paper);
  padding: 0 0.15em; display: inline-block;
}
h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.25em; line-height: 1.05;
  letter-spacing: 0.5px; text-transform: uppercase;
  margin: 2.5rem 0 0.75rem; font-weight: 400;
}
h3 {
  font-family: 'Poppins', sans-serif; font-weight: 600;
  font-size: 1.15em; margin: 1.5rem 0 0.5rem;
}
p { margin-bottom: 1.1rem; }
.lead {
  font-size: 1.25em; color: #2e2e2e;
  margin-bottom: 2.5rem; line-height: 1.6; font-weight: 400;
}

/* ── Buttons (Horrible pill style) ──────────── */
.btn {
  display: inline-block;
  border: 1px solid var(--hb-red);
  background-color: var(--hb-red);
  color: var(--paper);
  text-align: center;
  letter-spacing: .5px;
  border-radius: var(--pill);
  padding: .85rem 1.9rem;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover {
  background-color: var(--paper);
  color: var(--hb-red);
  border-color: var(--hb-red);
  text-decoration: none;
}
.btn-block { display: block; width: 100%; }
.btn-ghost {
  background-color: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover {
  background-color: var(--ink);
  color: var(--paper);
}

/* ── Forms ──────────────────────────────────── */
label {
  display: block; font-family: 'Poppins', sans-serif;
  font-weight: 500; font-size: 1rem; margin-bottom: 0.5rem;
}
input[type="email"], input[type="text"], textarea {
  width: 100%; padding: 0.9rem 1rem; font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 1.25rem; background: var(--paper);
}
input:focus, textarea:focus {
  outline: none; border-color: var(--hb-red);
  box-shadow: 0 0 0 3px rgba(255, 72, 68, 0.12);
}

/* ── Cards / notices ────────────────────────── */
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; margin-bottom: 1.5rem; background: var(--paper);
}
.card.featured { border: 2px solid var(--hb-red); }
.card h2 { margin-top: 0; }
.badge {
  display: inline-block;
  background: var(--hb-red); color: #fff;
  font-family: 'Poppins', sans-serif; font-size: 0.7rem;
  font-weight: 600; padding: 0.25rem 0.65rem;
  border-radius: var(--pill); vertical-align: middle;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.notice {
  background: #fff3f3; border: 1px solid var(--hb-red);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.notice.error { background: #fff0ef; }

/* ── Footer ─────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line); padding: 3rem 2rem;
  text-align: center; font-size: 0.9rem;
  color: var(--muted); background: var(--paper);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--hb-red); }
.site-footer .legal { margin-top: 0.5rem; font-size: 0.78rem; }
.site-footer .footer-logo { height: 40px; margin-bottom: 1rem; }

/* ── Utility ────────────────────────────────── */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.small { font-size: 0.9rem; color: var(--ink); }

/* ── Range slider (brand red, fills as you drag) ── */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--pill);
  /* --pct is set by JS (0–100). Track fills red up to the thumb. */
  background: linear-gradient(
    to right,
    var(--hb-red) 0%,
    var(--hb-red) var(--pct, 25%),
    var(--line) var(--pct, 25%),
    var(--line) 100%
  );
  outline: none;
  margin: 0.75rem 0 0;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--hb-red);
  border: 3px solid var(--paper);
  cursor: pointer;
  margin-top: -7px;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: var(--pill);
  background: transparent;
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--hb-red);
  border: 3px solid var(--paper);
  cursor: pointer;
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: var(--pill);
  background: transparent;
}
input[type="range"]:focus {
  box-shadow: 0 0 0 4px rgba(255, 72, 68, 0.18);
}

/* ── Checkboxes & radios in brand red ── */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--hb-red);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* ── multiselect_primary rows ── */
.hb-multiselect .ms-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}
.hb-multiselect .ms-row.is-primary { border-color: var(--hb-red); }
.hb-multiselect .ms-check {
  flex: 1;
  margin: 0;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
}
.hb-multiselect .ms-other-label {
  cursor: default;
  font-weight: 600;
}
.hb-multiselect .ms-primary {
  margin: 0;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  cursor: pointer;
  font-size: 0.9rem;
}
.hb-multiselect .ms-star {
  font-size: 1.15rem;
  line-height: 1;
  color: var(--line);
  transition: color 0.15s ease;
}
.hb-multiselect .ms-row.is-primary .ms-star { color: #F5B400; }

/* ── triple-field stack ── */
.hb-triple .t-row {
  margin-bottom: 1.4rem;
}
.hb-triple .t-row:last-child {
  margin-bottom: 0.5rem;
}
.hb-triple label {
  margin-bottom: 0.35rem;
}
.hb-triple input {
  margin-bottom: 0;
}

/* ── Plan view ─────────────────────────────── */
.plan-meta { margin-bottom: 1rem; }

.plan-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  line-height: 1.0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: var(--hb-red);
}

.plan-opening {
  font-size: 1.15rem;
  line-height: 1.55;
  margin-bottom: 1.75rem;
  color: var(--ink);
}

.plan-warning {
  border: 1px solid var(--hb-red);
  background: #fff5f5;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.plan-warning-label {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1.5px;
  font-size: 1.6rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--hb-red);
  margin-bottom: 0.5rem;
}

.plan-progress { margin-bottom: 2.5rem; }
.plan-progress-bar {
  height: 8px;
  background: var(--line);
  border-radius: var(--pill);
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.plan-progress-fill {
  height: 100%;
  background: var(--hb-red);
  transition: width 0.25s ease;
}
.plan-progress-text { color: var(--ink); margin-bottom: 0; }

.plan-month { margin-bottom: 3rem; }
.plan-month-header {
  border-top: 2px solid var(--ink);
  padding-top: 1.5rem;
  margin-bottom: 1.75rem;
}
.plan-month-label {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--hb-red);
  margin-bottom: 0.5rem;
}
.plan-month-theme {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.2rem;
  line-height: 1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
  font-weight: 400;
}
.plan-month-focus {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 0;
}

.plan-week {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1rem;
}
.plan-week-header {
  display: block;        /* stacked layout: num above, headline below */
  margin-bottom: 1rem;
}
.plan-week-num {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.9rem;
  letter-spacing: 1px;
  line-height: 1;
  color: var(--hb-red);
  margin-bottom: 0.3rem;
}
.plan-week-headline {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 0;
}

.plan-actions { list-style: none; padding: 0; margin: 0; }
.plan-action {
  display: flex;
  gap: 0.85rem;
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
  align-items: flex-start;
}
.plan-action:first-child { border-top: none; padding-top: 0.4rem; }
.plan-action.is-done .plan-action-task { text-decoration: line-through; color: var(--muted); }
.plan-action.is-done .plan-action-done { opacity: 0.6; }
.plan-action-tick { padding-top: 0.15rem; }
.plan-action-tick input { width: 18px; height: 18px; }
.plan-action-body { flex: 1; min-width: 0; }
.plan-action-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

/* TYPE chip — always first; red fill, white text */
.plan-type {
  font-family: 'Poppins', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.22rem 0.6rem;
  border-radius: var(--pill);
  background: var(--hb-red);
  color: var(--paper);
}

/* CHANNEL chips — colour cascade per action.
   1st: black fill, white text.
   2nd: white fill, black text + black border (future-proofing).
   3rd: white fill, red text + red border (further future-proofing). */
.plan-channel {
  font-family: 'Poppins', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.22rem 0.6rem;
  border-radius: var(--pill);
}
.plan-channel-1 { background: var(--ink);    color: var(--paper); }
.plan-channel-2 { background: var(--paper);  color: var(--ink);    border: 1px solid var(--ink); }
.plan-channel-3 { background: var(--paper);  color: var(--hb-red); border: 1px solid var(--hb-red); }

/* FLAG badges — emphasis markers */
.plan-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.22rem 0.6rem;
  border-radius: var(--pill);
}
.plan-flag-quick {
  background: #1f8a4c;  /* on-brand green — dark enough for white text */
  color: var(--paper);
}
.plan-flag-quick .plan-flag-icon { font-size: 0.85rem; }
.plan-flag-rev {
  background: var(--paper);
  color: #1f8a4c;
  border: 1px solid #1f8a4c;
}
.plan-flag-dollar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1f8a4c;
  color: var(--paper);
  font-size: 0.6rem;
  font-weight: 700;
}

.plan-hours {
  font-size: 0.8rem;
  color: var(--ink);
  margin-left: auto;
  font-weight: 500;
}

.plan-action-task {
  font-size: 1rem;
  line-height: 1.45;
  margin-bottom: 0.4rem;
  color: var(--ink);
}
.plan-action-done {
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0;
}

/* Section blocks at the foot of the plan */
.plan-metrics, .plan-review {
  margin-top: 3rem;
  border-top: 2px solid var(--ink);
  padding-top: 1.75rem;
}
.plan-metrics h2, .plan-review h2 {
  color: var(--hb-red);
  margin-bottom: 0.5rem;
}
.plan-section-sub {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.25rem;
  line-height: 1.45;
}
.plan-metric-list, .plan-review-list {
  padding-left: 1.25rem;
  margin: 0;
}
.plan-metric-list li, .plan-review-list li {
  margin-bottom: 0.75rem;
  line-height: 1.5;
  font-size: 1rem;
}

.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;
}
