/* ============================================================================
   Certified Karma — main stylesheet
   Design tokens first, then components top-to-bottom (nav → hero → footer).
   Fonts are self-hosted; see fonts.css (loaded before this file).
   ========================================================================== */

:root {
  --page:         #efece5;   /* cream page behind the content sheet */
  --paper:        #f8f6f0;   /* near-white content sheet */
  --card:         #fff;
  --card-hi:      #f3efe6;   /* warm cream — chart thumbnails */

  --ink:          #1c1c1a;   /* headings + strong text */
  --black:        #181816;   /* announce bar, primary buttons, premium card */
  --text:         #4a4740;
  --muted:        #6b675f;
  --faint:        #8a8578;

  --accent:       #1f8a5b;   /* forest green */
  --accent-2:     #4fd1a5;   /* mint */
  --accent-soft:  #6bbf95;   /* mid green (charts) */
  --accent-tint:  #f2f7f4;   /* pale green bands */
  --gold:         #9c7a3c;
  --gold-line:    #e8dcc0;

  --line:         #ece8de;
  --line-strong:  #e4dfd2;

  --serif: 'Instrument Serif', Georgia, serif;
  --sans:  'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, monospace;

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 20px;
  --pill: 28px;
  --shadow-sm: 0 2px 10px rgba(0,0,0,.03);
  --shadow:    0 4px 18px rgba(0,0,0,.05);
  --shadow-lg: 0 8px 28px rgba(0,0,0,.18);

  --max: 1040px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.sheet { width: 100%; margin: 0 auto; background: var(--paper); min-height: 100vh; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
/* Wide container — capped and centered so cards don't over-stretch on large monitors. */
.wrap-wide { max-width: 1420px; margin: 0 auto; padding: 0 40px; }

.eyebrow {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}
.eyebrow.green { color: var(--accent); }
.serif { font-family: var(--serif); font-weight: 500; line-height: 1.1; letter-spacing: 0; color: var(--ink); }
h1.serif { font-size: clamp(38px, 5.2vw, 50px); }
h2.serif { font-size: clamp(28px, 3.6vw, 40px); }
.lead { color: var(--muted); font-size: 15px; line-height: 1.55; }

a { color: inherit; text-decoration: none; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--black); color: #fff;
  padding: 10px 16px; border-radius: var(--r-sm); font-size: 13px; font-weight: 600; transition: top .15s ease; }
.skip:focus { top: 12px; }

/* ── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 13px;
  padding: 12px 22px; border-radius: var(--pill);
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--black); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: var(--black); }
.btn-light:hover { background: #f0ece2; }

/* ── CHIP ────────────────────────────────────────────────────────────────── */
.chip {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
  padding: 7px 16px; border: 1px solid var(--gold-line); border-radius: var(--pill); background: #fff;
}

/* ── ANNOUNCE ────────────────────────────────────────────────────────────── */
.announce {
  background: var(--black); color: #c9c5b8;
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em;
  text-align: center; padding: 10px 16px;
}
.announce b { color: #fff; font-weight: 600; }

/* ── NAV ─────────────────────────────────────────────────────────────────── */
header.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 27px; color: var(--ink); }
.brand span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 14px; color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-signin { font-size: 14px; font-weight: 700; color: var(--ink); }
.menu-btn { display: none; }

/* ── HERO ────────────────────────────────────────────────────────────────── */
.hero { padding: 64px 0 40px; text-align: center; }
.hero .chip { margin-bottom: 24px; }
.hero h1 { margin: 0 auto 18px; max-width: 18ch; }
.hero .lead { max-width: 520px; margin: 0 auto 40px; }

.testis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
.testi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.testi .stars { color: var(--gold); letter-spacing: 2px; font-size: 12px; }
.testi p { color: var(--ink); font-size: 14.5px; line-height: 1.5; margin: 12px 0 14px; }
.testi .who { color: var(--faint); font-size: 12.5px; }

/* ── STAT ROW ────────────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 56px; }
.stat { padding: 34px 24px; text-align: center; border-left: 1px solid var(--line); }
.stat:first-child { border-left: none; }
.stat .num { font-family: var(--serif); font-size: 40px; color: var(--ink); line-height: 1; }
.stat .lbl { margin-top: 8px; color: var(--muted); font-size: 13.5px; }

/* ── SECTIONS ────────────────────────────────────────────────────────────── */
section { padding: 76px 0; }
.band { background: var(--accent-tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 60ch; margin-bottom: 40px; }
.sec-head .eyebrow { display: block; margin-bottom: 14px; }
.sec-head h2 { margin-bottom: 12px; }

/* ── CALLOUT ─────────────────────────────────────────────────────────────── */
.callout { display: grid; grid-template-columns: 44px 1fr; gap: 20px; align-items: start; }
.callout .mark { width: 44px; height: 44px; border-radius: 50%; background: var(--accent);
  display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 22px; color: #fff; }
.callout h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.callout p { color: var(--muted); max-width: 80ch; }

/* ── PRICING ─────────────────────────────────────────────────────────────── */
.tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; align-items: stretch; }
.tier { position: relative; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 28px 24px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.tier:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tier.featured { border: 1.5px solid var(--accent); box-shadow: var(--shadow); }
.tier.dark { background: var(--black); border-color: var(--black); color: #fff; box-shadow: var(--shadow-lg); }
.tier .flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: var(--accent); color: #fff; padding: 6px 14px; border-radius: var(--pill); white-space: nowrap; }
.tier .tname { font-size: 15px; font-weight: 700; color: var(--ink); }
.tier.dark .tname { color: #fff; }
.tier .price { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 4px; }
.tier .price .amt { font-family: var(--serif); font-size: 42px; color: var(--ink); line-height: 1; }
.tier.dark .price .amt { color: #fff; }
.tier .price .was { color: var(--faint); font-size: 15px; text-decoration: line-through; }
.tier .tsub { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.tier.dark .tsub { color: #a4a099; }
.tier .feat { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-bottom: 18px; }
.tier .feat li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text); }
.tier.dark .feat li { color: #ded8c6; }
.tier .feat .tick { color: var(--accent); flex: none; font-weight: 700; }
.tier.dark .feat .tick { color: var(--accent-2); }
.tier .scarcity { font-size: 11.5px; font-weight: 600; color: var(--gold); margin-bottom: 16px; line-height: 1.45; }
.tier .scarcity.italic { font-style: italic; font-weight: 500; }
.tier .btn { width: 100%; margin-top: auto; }
.tier .tnote { text-align: center; margin-top: 12px; font-size: 11px; color: var(--faint); }
.tier.dark .tnote { color: #8a8578; }

/* ── GROWTH LESSONS ──────────────────────────────────────────────────────── */
.growth { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; }
.growth h2 { margin: 14px 0 14px; }
.growth p { color: var(--muted); font-size: 15px; max-width: 42ch; }
.weeks { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.week { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.week .wn { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-family: var(--serif); font-size: 18px; }
.week .wk { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.week h4 { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; margin-top: 3px; }

/* ── HOW IT WORKS ────────────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.step .n { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-family: var(--serif); font-size: 17px; margin-bottom: 14px; }
.step h4 { font-size: 16px; color: var(--ink); margin-bottom: 8px; font-weight: 700; }
.step p { color: var(--muted); font-size: 13.5px; }

/* ── LEARNING CENTER ─────────────────────────────────────────────────────── */
.journal-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 34px; flex-wrap: wrap; gap: 12px; }
.journal-head .eyebrow { display: block; margin-bottom: 12px; }
.journal-head a { font-size: 14px; font-weight: 600; color: var(--accent); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .18s ease; }
.article:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.article .thumb { height: 172px; background: var(--card-hi); border-bottom: 1px solid var(--line); padding: 22px; }
.article .body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.article .meta { font-size: 12px; color: var(--faint); margin-bottom: 10px; }
.article h4 { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.28; margin-bottom: 8px; }
.article p { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.byline { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--line-strong); color: var(--muted);
  display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 500; }
.byline .who { font-size: 12.5px; color: var(--muted); }

/* chart thumbnails */
.thumb-bars { display: flex; align-items: flex-end; gap: 18px; }
.thumb-bars .bars { display: flex; align-items: flex-end; gap: 12px; height: 100%; }
.thumb-bars .bar { width: 34px; border-radius: 4px 4px 0 0; position: relative; }
.thumb-bars .bar span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; color: var(--muted); }
.thumb-bars .note { font-family: var(--serif); font-size: 17px; color: var(--ink); line-height: 1.2; align-self: center; }
.thumb-list { display: flex; flex-direction: column; justify-content: center; gap: 14px; height: 100%; }
.thumb-list .row { display: flex; align-items: center; gap: 12px; }
.thumb-list .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.thumb-list .rbar { height: 8px; border-radius: 4px; background: var(--line-strong); }
.thumb-line { display: flex; flex-direction: column; height: 100%; }

/* ── ABOUT ───────────────────────────────────────────────────────────────── */
.about { display: grid; grid-template-columns: 88px 1fr; gap: 28px; align-items: center; max-width: 820px; }
.about .logo { width: 88px; height: 88px; border-radius: 50%; background: var(--black);
  display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 38px; color: var(--accent-2); }
.about p { color: var(--muted); font-size: 15.5px; line-height: 1.65; }
.about p b { color: var(--ink); font-weight: 700; }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.qa { display: grid; grid-template-columns: 34px 1fr; gap: 16px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px 26px; box-shadow: var(--shadow-sm); }
.qa .q-ic { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-tint); color: var(--accent);
  display: grid; place-items: center; font-family: var(--serif); font-size: 18px; }
.qa h4 { font-size: 15.5px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.qa p { color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
footer { background: var(--black); color: #cfccc3; padding: 60px 0 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 44px; }
footer .brand { color: #fff; }
footer .brand span { color: var(--accent-2); }
.foot-about { color: #a4a099; font-size: 14px; margin-top: 14px; max-width: 34ch; }
.foot-col h5 { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #8a8578; margin-bottom: 16px; }
.foot-col a { display: block; color: #cfccc3; font-size: 14px; padding: 5px 0; }
.foot-col a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid #33322d; padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: #8a8578; }

/* ── ACTIVE NAV ──────────────────────────────────────────────────────────── */
.nav-links a[aria-current="page"] { color: var(--ink); }

/* ── SUB-PAGE HEADERS ────────────────────────────────────────────────────── */
.page-head { padding: 56px 0 10px; text-align: center; }
.page-head .eyebrow { display: block; margin-bottom: 14px; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 44px); }
.page-head .lead { max-width: 60ch; margin: 14px auto 0; }
.page-head.left { text-align: left; }
.page-head.left .lead { margin-left: 0; }
.page-narrow { max-width: 780px; margin: 0 auto; }
.page-wide { padding-left: 56px; padding-right: 56px; }
.breadcrumb { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); margin-bottom: 20px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }

/* ── FORMS ───────────────────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink);
  padding: 12px 14px; background: var(--card-hi);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-hint { font-size: 12px; color: var(--faint); margin-top: 6px; }
.btn-block { width: 100%; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--accent); }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.form-row a { color: var(--accent); font-size: 13px; font-weight: 600; }

/* ── AUTH ────────────────────────────────────────────────────────────────── */
.auth { display: grid; place-items: center; padding: 56px 24px 80px; }
.auth-card { width: 100%; max-width: 428px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 38px 36px; box-shadow: var(--shadow); }
.auth-card .brand { display: block; text-align: center; margin-bottom: 6px; }
.auth-card h1 { font-family: var(--serif); font-weight: 500; font-size: 30px; color: var(--ink); text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.oauth { display: grid; gap: 10px; }
.oauth .btn { width: 100%; background: var(--card); border-color: var(--line-strong); color: var(--ink); font-weight: 600; }
.oauth .btn:hover { border-color: var(--ink); }
.divider { display: flex; align-items: center; gap: 14px; color: var(--faint); font-size: 11px;
  font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-alt { text-align: center; margin-top: 22px; font-size: 13.5px; color: var(--muted); }
.auth-alt a { color: var(--accent); font-weight: 600; }
.legal-note { text-align: center; margin-top: 18px; font-size: 11.5px; color: var(--faint); line-height: 1.5; }
.legal-note a { color: var(--muted); text-decoration: underline; }

/* ── BROWSE / CATALOG ────────────────────────────────────────────────────── */
.browse { display: grid; grid-template-columns: 240px 1fr; gap: 34px; align-items: start; }
.filters { position: sticky; top: 88px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px 22px 8px; box-shadow: var(--shadow-sm); }
.filter-group { margin-bottom: 22px; }
.filter-group h4 { font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 12px; letter-spacing: .01em; }
.filter-group .checkbox { margin-bottom: 9px; }
.filter-group input[type="range"] { width: 100%; accent-color: var(--accent); }
.listing-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.listing-top .count { color: var(--muted); font-size: 13.5px; }
.listing-top select { font: inherit; font-size: 13px; padding: 8px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); background: var(--card); color: var(--ink); }
.acct-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.acct { background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px;
  transition: transform .18s ease, box-shadow .18s ease; }
.acct:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.acct-top { display: flex; align-items: center; justify-content: space-between; }
.acct-handle { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.badge-verified { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono);
  font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-tint); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  padding: 4px 9px; border-radius: var(--pill); }
.acct-stats { display: flex; gap: 20px; }
.acct-stats .s .n { font-family: var(--serif); font-size: 26px; color: var(--ink); line-height: 1; }
.acct-stats .s .l { font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.acct-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.acct-price { display: flex; align-items: baseline; gap: 7px; }
.acct-price .amt { font-family: var(--serif); font-size: 28px; color: var(--ink); }
.acct-price .was { color: var(--faint); font-size: 13px; text-decoration: line-through; }

/* ── PROSE / DOCS (legal, blog posts) ────────────────────────────────────── */
.prose { color: var(--text); }
.prose > * + * { margin-top: 14px; }
.prose h2 { font-family: var(--serif); font-weight: 500; font-size: 27px; color: var(--ink); margin-top: 38px; margin-bottom: 4px; }
.prose h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin-top: 26px; }
.prose p, .prose li { font-size: 15px; line-height: 1.72; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-top: 6px; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose strong { color: var(--ink); }
.prose blockquote { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; color: var(--muted); font-style: italic; }
.updated { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.doc-toc { background: var(--card-hi); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 24px; margin: 8px 0 32px; }
.doc-toc h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.doc-toc a { display: block; color: var(--muted); font-size: 14px; padding: 4px 0; }
.doc-toc a:hover { color: var(--accent); }

/* ── BLOG POST ───────────────────────────────────────────────────────────── */
.post-head { max-width: 760px; margin: 0 auto 30px; }
.post-meta { display: flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.post-meta .avatar { width: 32px; height: 32px; }
.post-hero-img { max-width: 900px; margin: 0 auto 36px; height: 240px; border-radius: var(--r-lg);
  background: var(--card-hi); border: 1px solid var(--line); display: grid; place-items: center; }

/* ── CONTACT PAGE ────────────────────────────────────────────────────────── */
.contact-grid { grid-template-columns: 1fr 320px; }
.contact-card { max-width: none; margin: 0; }
.contact-aside { position: static; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

/* Media (img/video) never overflows its column. */
img, video { max-width: 100%; height: auto; }

/* Small laptops / large tablets */
@media (max-width: 1100px) {
  .tiers { grid-template-columns: repeat(3, 1fr); }
  .growth { grid-template-columns: 1fr; gap: 32px; }
}

/* Tablets — collapse multi-column grids and switch the nav to a menu button */
@media (max-width: 900px) {
  .testis, .cards, .steps, .foot-grid { grid-template-columns: repeat(2, 1fr); }

  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  /* Menu button toggles this open state (see app.js). */
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 49;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 4px 24px 14px; box-shadow: var(--shadow);
  }
  .nav-links.open a { padding: 14px 2px; font-size: 15px; border-top: 1px solid var(--line); }

  .browse { grid-template-columns: 1fr; }
  .filters { position: static; }
  .acct-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Large phones */
@media (max-width: 760px) {
  .tiers { grid-template-columns: repeat(2, 1fr); }
  .growth h2 { font-size: 30px; }
  .nav-signup { display: none; }   /* keep the mobile bar uncluttered */
}

/* Phones */
@media (max-width: 560px) {
  .testis, .cards, .steps, .weeks, .faq-grid, .foot-grid, .tiers { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-left: none; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: none; }

  .wrap, .wrap-wide { padding: 0 18px; }
  .page-wide { padding-left: 20px; padding-right: 20px; }
  .announce { font-size: 11px; letter-spacing: .02em; padding: 8px 14px; }
  .nav-in { height: 60px; }
  .brand { font-size: 24px; }

  .hero { padding: 40px 0 30px; }
  .hero h1 { font-size: 34px; max-width: none; }
  .hero .lead { font-size: 14.5px; }
  section { padding: 52px 0; }

  .about { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .journal-head { flex-direction: column; align-items: flex-start; }
  .foot-bottom { flex-direction: column; gap: 8px; }

  .acct-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 30px 22px; }
  .post-hero-img { height: 180px; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ============================================================================
   Realtime layer — live-viewers badge, social-proof toasts, sold states,
   form status messages. Added alongside the api.js / realtime.js / pages.js
   integration. Kept token-driven so it inherits the site's theme.
   ========================================================================== */

/* Live "N viewers" pill (revealed by realtime.js once the socket connects) */
.live-badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 14px 0 4px; padding: 6px 13px;
  background: var(--accent-tint); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 999px; font-size: 13px; font-weight: 600;
  font-family: var(--mono, ui-monospace, monospace);
}
.live-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
  animation: ck-pulse 2s infinite;
}
@keyframes ck-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Social-proof toast stack (bottom-left, fixed) */
.ck-toasts {
  position: fixed; left: 20px; bottom: 20px; z-index: 60;
  display: flex; flex-direction: column; gap: 10px;
  max-width: min(340px, calc(100vw - 40px)); pointer-events: none;
}
.ck-toast {
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 12px 14px; box-shadow: var(--shadow);
  font-size: 13px; line-height: 1.4;
  transform: translateX(-120%); opacity: 0;
  transition: transform .38s cubic-bezier(.2,.8,.2,1), opacity .38s ease;
}
.ck-toast.show { transform: translateX(0); opacity: 1; }
.ck-toast.no-anim { transition: none; transform: none; opacity: 1; }
.ck-toast-dot {
  flex: none; width: 9px; height: 9px; margin-top: 4px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint);
}
.ck-toast-body b { color: var(--ink); font-weight: 600; }
.ck-toast-price {
  display: inline-block; margin-left: 2px; padding: 1px 7px;
  background: var(--black); color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 600;
}

/* Sold / reserved states on browse cards */
.acct.sold { opacity: .72; }
.sold-tag {
  display: inline-flex; align-items: center; width: 100%;
  font-size: 13px; font-weight: 600; color: var(--accent);
}
.sold-tag.muted { color: var(--muted); }
.empty-note { color: var(--muted); font-size: 15px; padding: 20px 0; }

/* Inline form status messages (signup / login / contact) */
.form-msg {
  margin-bottom: 14px; padding: 10px 13px; border-radius: var(--r-sm);
  font-size: 13.5px; line-height: 1.4;
}
.form-msg.error   { background: #fdeceb; color: #a02216; border: 1px solid #f3c7c2; }
.form-msg.success { background: var(--accent-tint); color: var(--accent);
                    border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.form-msg.info    { background: var(--line); color: var(--muted); }

@media (max-width: 560px) {
  .ck-toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* OAuth buttons: disabled state when a provider has no credentials configured */
.oauth .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: auto; }
.oauth-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

/* ── SIGNED-IN HEADER ────────────────────────────────────────────────────── */
/* Injected by pages.js reflectAuth() when a session exists; replaces the
   Sign in / Get started CTA with a greeting + Sign out control. */
.nav-account {
  font-size: 14px; font-weight: 600; color: var(--muted);
  max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-signout { font-size: 13px; padding: 9px 18px; }

@media (max-width: 760px) {
  /* Keep the mobile bar tidy: greeting text can hide, Sign out stays reachable. */
  .nav-account { display: none; }
}
