/* Polestar — trading discipline tracker for Mindful Trading Hub.
   Warm paper, ink, muted gold, serif display type. Mobile first, but the
   layout opens into real columns on a laptop instead of staying a narrow strip. */

:root {
  --paper: #faf8f4;
  --card: #ffffff;
  --sand: #f3efe7;
  --sand-2: #ece7dc;
  --ink: #14161a;
  --ink-2: #4c525c;
  --ink-3: #8b919b;
  --line: #e8e3d9;
  --line-2: #d8d1c2;
  --gold: #9a7b2e;
  --gold-2: #b8963f;
  --gold-soft: #f7f0dc;
  --green: #2d7a4d;
  --green-soft: #e9f2ec;
  --red: #a34328;
  --red-soft: #f9ece8;

  --serif: ui-serif, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;

  --sh-1: 0 1px 2px rgba(20,22,26,.05);
  --sh-2: 0 1px 3px rgba(20,22,26,.05), 0 6px 16px rgba(20,22,26,.05);
  --sh-3: 0 2px 6px rgba(20,22,26,.06), 0 16px 40px rgba(20,22,26,.09);

  --tap: 46px;
  --nav-h: 62px;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.12; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.3rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.up { color: var(--green); }
.down { color: var(--red); }
.center { text-align: center; }
.serif { font-family: var(--serif); }
.nowrap { white-space: nowrap; }
.eyebrow { font-size: .7rem; text-transform: uppercase; letter-spacing: .15em; color: var(--gold); font-weight: 700; }
.kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .13em; color: var(--ink-3); font-weight: 700; }

/* ============================================================ top menu */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,248,244,.9);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  min-height: var(--nav-h);
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand .star { color: var(--gold); font-size: 1.15rem; line-height: 1; }
.brand .bt { font-family: var(--serif); font-size: 1.24rem; letter-spacing: -0.02em; line-height: 1.1; }
.brand .bs { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; display: block; }

.menu { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.menu a {
  padding: 9px 16px; border-radius: 999px; font-size: .9rem; font-weight: 550;
  color: var(--ink-2); transition: background .15s ease, color .15s ease; white-space: nowrap;
}
.menu a:hover { background: var(--sand); color: var(--ink); }
.menu a.on { background: var(--ink); color: var(--paper); }
.menu a.accent { color: var(--green); }
.menu a.accent.on { background: var(--green); color: #fff; }

.nav-end { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.who {
  display: flex; align-items: center; gap: 9px; padding: 5px 14px 5px 5px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--card);
  font-size: .84rem; color: var(--ink-2);
}
.who .av {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(160deg, var(--gold-soft), #fff); border: 1px solid #e6d8ae;
  color: var(--gold); display: grid; place-items: center; font-family: var(--serif); font-size: .82rem;
}

/* Phone: brand row on top, menu becomes a scrollable pill row beneath it. */
@media (max-width: 880px) {
  .nav-inner { flex-wrap: wrap; gap: 0; padding: 11px 16px 0; min-height: 0; }
  .nav-end { margin-left: auto; }
  .menu {
    order: 3; width: 100%; margin: 11px -16px 0; padding: 0 16px 11px;
    overflow-x: auto; scrollbar-width: none; gap: 6px;
  }
  .menu::-webkit-scrollbar { display: none; }
  .menu a { flex: 0 0 auto; padding: 9px 15px; font-size: .87rem; }
  /* The name stays visible on a phone — knowing whose account this is matters
     more than the few pixels it costs. */
  .who { padding-right: 11px; }
  .who .nm { max-width: 8ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ============================================================ page + grid */

.page { max-width: 1240px; margin: 0 auto; padding: 28px 24px 80px; }
.page-narrow { max-width: 780px; }
@media (max-width: 880px) { .page { padding: 20px 16px 60px; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }

/* The first thing you see: who you are and what today needs from you. */
.greeting { margin-bottom: 26px; }
.greeting h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.8rem); margin: 8px 0 10px; }
.greeting .ask { font-size: 1.06rem; color: var(--ink-2); }
.greeting .ask .link { font-size: 1.06rem; }

.cols { display: grid; gap: 20px; align-items: start; }
@media (min-width: 940px) { .cols-2 { grid-template-columns: 1.55fr 1fr; } }
.stack { display: grid; gap: 20px; align-content: start; }

/* ============================================================ cards */

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px 24px; box-shadow: var(--sh-2);
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 16px; }

/* ============================================================ hero */

.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); padding: 32px 30px 30px;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(184,150,63,.17), transparent 60%),
    linear-gradient(160deg, #fffdf7, var(--card) 70%);
  border: 1px solid var(--line-2);
  box-shadow: var(--sh-3);
}
.hero h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.5rem); margin: 8px 0 10px; }
.hero .lede { color: var(--ink-2); font-size: 1rem; max-width: 44ch; }
.hero-actions { display: flex; gap: 12px; align-items: center; margin-top: 24px; flex-wrap: wrap; }
.hero .mark { position: absolute; right: 28px; top: 26px; font-size: 2.6rem; opacity: .14; }
.hero.done { background: linear-gradient(160deg, var(--green-soft), var(--card) 62%); border-color: #cfe0d5; }
.tick-round {
  width: 42px; height: 42px; border-radius: 50%; background: var(--green-soft);
  color: var(--green); display: grid; place-items: center; font-size: 1.15rem; margin-bottom: 14px;
}

/* ============================================================ streak */

.streak-card { text-align: center; }
.streak-big { font-family: var(--serif); font-size: 3.4rem; line-height: 1; letter-spacing: -0.03em; }
.streak-sub { color: var(--ink-2); font-size: .92rem; margin-top: 4px; }
.week { display: flex; justify-content: space-between; gap: 6px; margin-top: 22px; }
.week .d { flex: 1; text-align: center; }
.week .dl { font-size: .64rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.week .dot {
  width: 32px; height: 32px; margin: 7px auto 0; border-radius: 50%;
  border: 1.5px solid var(--line-2); background: var(--paper);
  display: grid; place-items: center; font-size: .78rem; color: var(--ink-3);
}
.week .d.done .dot { background: linear-gradient(160deg, var(--gold-2), var(--gold)); border-color: var(--gold); color: #fff; }
.week .d.rest .dot { background: var(--sand); border-color: var(--sand-2); }
.week .d.today .dot { border-color: var(--gold); border-style: dashed; color: var(--gold); }
.week .d.today.done .dot { border-style: solid; box-shadow: 0 0 0 4px var(--gold-soft); }

/* ============================================================ level */

.level-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.level-name { font-family: var(--serif); font-size: 1.45rem; }
.bar { height: 8px; background: var(--sand-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold-2), var(--gold)); transition: width .5s cubic-bezier(.4,0,.2,1); }

/* ============================================================ figures */

.figs { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--line); gap: 1px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-1); }
.fig { background: var(--card); padding: 18px 14px; text-align: center; }
.fig .n { font-family: var(--serif); font-size: 1.6rem; display: block; letter-spacing: -0.02em; }
.fig .k { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-top: 4px; display: block; }

/* ============================================================ journal */

.journal-cta {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line-2); border-left: 4px solid var(--gold);
  border-radius: 6px var(--r) var(--r) 6px;
  padding: 24px 26px; box-shadow: var(--sh-2);
}
.journal-cta .eyebrow { display: flex; align-items: center; gap: 7px; }
.journal-cta h2 { font-size: 1.55rem; margin: 8px 0 9px; }
.journal-cta p { color: var(--ink-2); font-size: .95rem; max-width: 46ch; }
.prompt-peek {
  margin-top: 18px; padding: 16px 18px; background: var(--gold-soft);
  border-radius: var(--r-sm); font-family: var(--serif); font-size: 1.05rem; line-height: 1.45;
  border-left: 2px solid var(--gold-2);
}
.prompt-peek .pl { display: block; font-family: var(--sans); font-size: .66rem; text-transform: uppercase; letter-spacing: .13em; color: var(--gold); font-weight: 700; margin-bottom: 7px; }

.journal-entry { padding: 18px 0; border-bottom: 1px solid var(--line); }
.journal-entry:last-child { border-bottom: none; }
.je-date { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.je-q { font-size: .85rem; color: var(--gold); margin: 6px 0 8px; font-style: italic; }
.je-body { font-family: var(--serif); font-size: 1.05rem; line-height: 1.65; }
.je-tag { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px; background: var(--sand); font-size: .72rem; color: var(--ink-2); font-weight: 600; }

/* ============================================================ breathe */

.breathe-block {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); padding: 26px 28px;
  background: linear-gradient(155deg, #eaf1ec, #f8faf8 68%);
  border: 1px solid #d3e0d7; box-shadow: var(--sh-2);
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.rings { flex: 0 0 auto; width: 78px; height: 78px; display: grid; place-items: center; position: relative; }
.rings i { position: absolute; inset: 0; border: 1.5px solid var(--green); border-radius: 50%; animation: pulse 4.2s ease-in-out infinite; }
.rings i:nth-child(2) { animation-delay: 1.4s; }
.rings i:nth-child(3) { animation-delay: 2.8s; }
.rings b { font-size: 1.6rem; position: relative; }
@keyframes pulse { 0%,100% { transform: scale(.6); opacity: .35 } 50% { transform: scale(1); opacity: .06 } }
.bb-text { flex: 1 1 250px; }
.breathe-block h3 { font-size: 1.25rem; margin-bottom: 6px; }
.breathe-block p { font-size: .91rem; color: var(--ink-2); }

/* ============================================================ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 13px 26px; min-height: var(--tap);
  font-size: .94rem; font-weight: 600; cursor: pointer;
  transition: transform .12s ease, box-shadow .16s ease, background .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: var(--sh-2); }
.btn-primary:hover { box-shadow: var(--sh-3); }
.btn-gold { background: linear-gradient(160deg, var(--gold-2), var(--gold)); color: #fff; box-shadow: var(--sh-2); }
.btn-green { background: var(--green); color: #fff; box-shadow: var(--sh-2); }
.btn-ghost { background: var(--card); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-danger { background: var(--red); color: #fff; }
.btn-plain { background: none; border: none; color: var(--ink-2); text-decoration: underline; text-underline-offset: 4px; padding: 8px 4px; min-height: 0; font-weight: 550; cursor: pointer; font-size: .9rem; }
.btn-plain:hover { color: var(--ink); }
.btn-sm { padding: 8px 16px; min-height: 36px; font-size: .84rem; }
.btn-wide { width: 100%; }
/* Used on <button> as often as <a>, so strip the native button chrome. */
.link {
  color: var(--gold); font-weight: 550; cursor: pointer;
  background: none; border: none; padding: 0; font: inherit; font-weight: 550;
  min-height: 0; text-align: left;
}
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================ forms */

/* Any display rule outranks the browser's [hidden] rule, so opt out explicitly
   everywhere we toggle visibility with the attribute. */
[hidden] { display: none !important; }

label { display: block; font-size: .82rem; font-weight: 650; color: var(--ink-2); margin-bottom: 16px; }
label > input, label > select, label > textarea { margin-top: 8px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 14px 16px; min-height: var(--tap);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--card); color: var(--ink); font: inherit; font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(154,123,46,.13); }
::placeholder { color: var(--ink-3); }
textarea { resize: vertical; min-height: 160px; line-height: 1.7; font-family: var(--serif); font-size: 1.08rem; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

.msg { padding: 13px 16px; border-radius: var(--r-sm); font-size: .88rem; margin-bottom: 16px; }
.msg.bad { background: var(--red-soft); border: 1px solid #e6c8bd; color: var(--red); }
.msg.good { background: var(--green-soft); border: 1px solid #c6dfcf; color: var(--green); }
.msg.info { background: var(--sand); border: 1px solid var(--line-2); color: var(--ink-2); }
.fine { font-size: .8rem; color: var(--ink-3); line-height: 1.55; }

/* ============================================================ entry flow */

.flow { max-width: 640px; margin: 0 auto; padding: 26px 22px 60px; }
.flow-top { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.flow-top .x { background: none; border: none; color: var(--ink-3); font-size: 1.25rem; cursor: pointer; padding: 4px; line-height: 1; }
.rail { flex: 1; height: 4px; background: var(--sand-2); border-radius: 99px; overflow: hidden; }
.rail i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); border-radius: 99px; transition: width .4s cubic-bezier(.4,0,.2,1); }
.flow-top .count { font-size: .78rem; color: var(--ink-3); letter-spacing: .05em; font-variant-numeric: tabular-nums; }

.step h1 { margin: 9px 0 10px; }
.step .sub { color: var(--ink-2); font-size: .96rem; margin-bottom: 24px; }
.step-nav { display: flex; gap: 12px; margin-top: 30px; }
.step-nav .btn-primary { flex: 1; }

.prompt-box { background: var(--gold-soft); border: 1px solid #e8dcb8; border-radius: var(--r); padding: 20px 22px; margin-bottom: 18px; }
.prompt-box .pq { font-family: var(--serif); font-size: 1.2rem; line-height: 1.45; margin-top: 9px; }

.amount { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--card); padding: 10px 20px; transition: border-color .15s ease, box-shadow .15s ease; }
.amount:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(154,123,46,.13); }
.amount .cur { font-family: var(--serif); font-size: 1.8rem; color: var(--ink-3); }
.amount input { border: none; background: none; box-shadow: none !important; padding: 10px 4px; font-family: var(--serif); font-size: 2.2rem; letter-spacing: -0.02em; }
.amount.loss input { color: var(--red); }

.moods { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.mood { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--card); padding: 18px 8px; text-align: center; cursor: pointer; transition: all .14s ease; }
.mood:hover { border-color: var(--ink-3); }
.mood .mi { font-size: 1.7rem; display: block; line-height: 1; }
.mood .mn { font-size: .84rem; margin-top: 9px; display: block; }
.mood.on { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 3px rgba(154,123,46,.1); }

.checks { display: grid; gap: 10px; }
.check { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--card); cursor: pointer; font-size: .95rem; transition: all .14s ease; }
.check .bx { width: 22px; height: 22px; flex: 0 0 auto; border: 1.5px solid var(--line-2); border-radius: 7px; display: grid; place-items: center; font-size: .76rem; color: transparent; transition: all .14s ease; }
.check.on { border-color: var(--gold); background: var(--gold-soft); }
.check.on .bx { background: var(--gold); border-color: var(--gold); color: #fff; }

.reasons { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.reason { border: 1px solid var(--line-2); background: var(--card); border-radius: 999px; padding: 10px 18px; min-height: 42px; font-size: .88rem; color: var(--ink-2); cursor: pointer; transition: all .14s ease; }
.reason:hover { border-color: var(--ink-3); }
.reason.on { border-color: var(--gold); background: var(--gold-soft); color: var(--ink); font-weight: 600; }

.review { list-style: none; padding: 0; margin: 0 0 8px; }
.review li { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.review li:last-child { border-bottom: none; }
.review .rv { font-family: var(--serif); font-size: 1.08rem; text-align: right; }
.review .rv.small { font-family: var(--sans); font-size: .9rem; max-width: 62%; line-height: 1.5; }

/* ============================================================ reward */

.reward { max-width: 480px; margin: 0 auto; padding: 8vh 24px 60px; text-align: center; }
.reward .seal { width: 82px; height: 82px; margin: 0 auto 24px; border-radius: 50%; background: linear-gradient(160deg, var(--gold-soft), #fff); border: 1px solid #e6d8ae; display: grid; place-items: center; font-size: 2rem; box-shadow: var(--sh-2); animation: rise .5s cubic-bezier(.2,.9,.3,1.2); }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.94) } }
.reward .said { color: var(--ink-2); max-width: 32ch; margin: 10px auto 28px; }
.gained { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--line); gap: 1px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 24px; }
.gained div { background: var(--card); padding: 20px 10px; }
.gained .g { font-family: var(--serif); font-size: 1.7rem; color: var(--gold); display: block; }
.gained .l { font-size: .64rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-top: 4px; display: block; }
.earned { list-style: none; padding: 0; margin: 0 0 28px; text-align: left; }
.earned li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.earned li:last-child { border-bottom: none; }
.earned b { color: var(--gold); }

/* ============================================================ tables */

.scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .66rem; text-transform: uppercase; letter-spacing: .11em; color: var(--ink-3); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line-2); background: var(--sand); }
.tbl td { padding: 14px; border-bottom: 1px solid var(--line); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: #fdfcf9; }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }
.tbl .me { background: var(--gold-soft); }
.tbl .me:hover { background: var(--gold-soft); }
.rank { font-family: var(--serif); font-size: 1.05rem; color: var(--ink-3); width: 44px; }
.tnum { font-variant-numeric: tabular-nums; }

/* ============================================================ chips + segs */

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; background: var(--card); border: 1px solid var(--line-2); color: var(--ink-2); border-radius: 999px; padding: 9px 17px; min-height: 40px; font-size: .85rem; font-weight: 550; cursor: pointer; transition: all .14s ease; }
.chip:hover { border-color: var(--ink-3); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.seg { display: inline-grid; grid-auto-flow: column; gap: 4px; background: var(--sand); padding: 5px; border-radius: 999px; }
.seg button { background: none; border: none; padding: 10px 22px; min-height: 40px; border-radius: 999px; font-size: .87rem; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: all .14s ease; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--sh-1); }
@media (max-width: 620px) { .seg { display: grid; grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); width: 100%; } .seg button { padding: 10px 6px; } }

/* ============================================================ badges */

.badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: var(--r); border: 1px solid #e6d8ae; background: linear-gradient(150deg, var(--gold-soft), #fff); font-size: .9rem; font-weight: 650; box-shadow: var(--sh-1); }
.badge .bi { font-size: 1.3rem; }
.badge em { display: block; font-style: normal; font-weight: 400; font-size: .74rem; color: var(--ink-3); margin-top: 1px; }
.badge.locked { background: var(--sand); border-color: var(--line-2); border-style: dashed; color: var(--ink-3); font-weight: 500; box-shadow: none; }
.badge.locked .bi { filter: grayscale(1); opacity: .5; }
.badge.pending { background: var(--card); border-style: dashed; }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; }
.pod { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 12px; text-align: center; box-shadow: var(--sh-1); }
.pod .p { width: 28px; height: 28px; border-radius: 50%; background: var(--sand-2); color: var(--ink-2); display: grid; place-items: center; margin: 0 auto 10px; font-size: .78rem; font-weight: 700; }
.pod .nm { font-size: .88rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .vv { font-size: .82rem; color: var(--ink-2); margin-top: 3px; }
.pod.first { padding-top: 26px; background: linear-gradient(180deg, var(--gold-soft), var(--card) 70%); border-color: #e6d8ae; box-shadow: var(--sh-2); }
.pod.first .p { background: linear-gradient(160deg, var(--gold-2), var(--gold)); color: #fff; }

/* ============================================================ calendar */

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .hd { font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); text-align: center; padding-bottom: 4px; font-weight: 700; }
.cal .cell { aspect-ratio: 1; border-radius: 8px; background: var(--sand); display: grid; place-items: center; font-size: .74rem; color: var(--ink-3); }
.cal .cell.win { background: #cde2d5; color: #1d5a37; font-weight: 650; }
.cal .cell.loss { background: #f0d5cc; color: #8a3620; font-weight: 650; }
.cal .cell.flat { background: var(--sand-2); color: var(--ink-2); }
.cal .cell.none { background: transparent; }
.cal-key { display: flex; gap: 16px; margin-top: 14px; font-size: .76rem; color: var(--ink-3); flex-wrap: wrap; }
.cal-key i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ============================================================ lists */

.rows { list-style: none; padding: 0; margin: 0; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.rows li:last-child { border-bottom: none; }
.rows b { font-family: var(--serif); font-size: 1.1rem; white-space: nowrap; }
.rows .sm { font-family: var(--sans); font-size: .88rem; font-weight: 600; }

/* ============================================================ alerts */

.alert { border-radius: var(--r); padding: 18px 20px; background: var(--red-soft); border: 1px solid #e6c8bd; }
.alert + .alert { margin-top: 12px; }
.alert b { display: block; color: var(--red); margin-bottom: 4px; }
.alert p { font-size: .89rem; color: var(--ink-2); }
.alert .btn { margin-top: 14px; }
.flag-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 7px; vertical-align: middle; }

/* ============================================================ auth + gates */

.auth { max-width: 420px; margin: 0 auto; padding: 6vh 22px 60px; }
.auth-brand { text-align: center; margin-bottom: 28px; }
.auth-mark { width: 66px; height: 66px; margin: 0 auto 18px; border-radius: 50%; background: linear-gradient(160deg, var(--gold-soft), #fff); border: 1px solid #e6d8ae; display: grid; place-items: center; font-size: 1.7rem; color: var(--gold); box-shadow: var(--sh-2); }
.auth-brand h1 { font-size: 2.1rem; }
.auth-brand .tag { font-size: .66rem; letter-spacing: .19em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-top: 6px; }
.auth-brand p { color: var(--ink-2); font-size: .94rem; margin-top: 12px; }
.switcher { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; background: var(--sand); padding: 5px; border-radius: 999px; margin-bottom: 22px; }
.switcher button { background: none; border: none; padding: 11px; min-height: 42px; border-radius: 999px; font-size: .89rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.switcher button.on { background: var(--card); color: var(--ink); box-shadow: var(--sh-1); }

.gate { max-width: 500px; margin: 0 auto; padding: 12vh 24px; text-align: center; }
.gate .seal { width: 74px; height: 74px; margin: 0 auto 22px; border-radius: 50%; background: var(--gold-soft); border: 1px solid #e6d8ae; display: grid; place-items: center; font-size: 1.8rem; }
.gate p { color: var(--ink-2); margin-bottom: 26px; }

/* ============================================================ drawer */

.drawer { position: fixed; inset: 0; z-index: 90; display: none; }
.drawer.open { display: block; }
.drawer .veil { position: absolute; inset: 0; background: rgba(20,22,26,.36); }
.drawer .panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(640px, 100%);
  background: var(--paper); overflow-y: auto; padding: 30px 26px 70px;
  box-shadow: -10px 0 40px rgba(20,22,26,.16);
  animation: slidein .26s cubic-bezier(.3,.9,.3,1);
}
@keyframes slidein { from { transform: translateX(24px); opacity: .6 } }
.drawer .close { position: absolute; top: 20px; right: 24px; background: var(--card); border: 1px solid var(--line-2); width: 34px; height: 34px; border-radius: 50%; font-size: 1rem; color: var(--ink-2); cursor: pointer; }

/* ============================================================ misc */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--sh-1); }
.kpi .n { font-family: var(--serif); font-size: 1.9rem; display: block; letter-spacing: -0.02em; }
.kpi .k { font-size: .66rem; text-transform: uppercase; letter-spacing: .11em; color: var(--ink-3); font-weight: 600; }
.kpi.flag { border-color: #e6c8bd; background: var(--red-soft); }
.kpi.flag .n { color: var(--red); }

.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { background: none; border: none; border-bottom: 2px solid transparent; padding: 13px 16px; color: var(--ink-2); font-size: .9rem; font-weight: 550; white-space: nowrap; cursor: pointer; }
.subtabs button.on { color: var(--gold); border-bottom-color: var(--gold); }

.empty { color: var(--ink-3); font-size: .92rem; padding: 22px 0; text-align: center; }
.spinner { text-align: center; padding: 70px 0; color: var(--ink-3); font-size: .9rem; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  /* Without the iteration-count line an infinite animation keeps looping at
     0.01ms, which strobes — far worse than the motion it replaces. */
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  /* The breathing circle is content, not decoration: it is the thing a person
     follows, and a slow even scale is not what this setting exists to prevent.
     It keeps its full timing either way. */
  .breath .fill {
    animation-duration: 8s !important;
    animation-iteration-count: infinite !important;
    transition-duration: 4s !important;
  }
}

/* What you wrote today, shown back to you on the home screen. */
.hero .wrote {
  font-family: var(--serif); font-size: 1.15rem; line-height: 1.6;
  margin-top: 10px; max-width: 52ch;
}

/* ============================================================ breathing mark */

/* Deliberately one solid shape scaled by transform, and nothing else.
   Three things went wrong before and all are avoided here:
     - a radial-gradient fill had to be re-rasterised at every size, which
       shimmered instead of gliding;
     - two elements scaling on separate curves read as jitter;
     - the size came from a CSS variable, and unregistered variables cannot be
       transitioned, so the breathing page jumped instead of moving.
   A flat colour scaled on the GPU is the smoothest thing a browser can do. */

.breath {
  position: relative; flex: 0 0 auto;
  width: 104px; height: 104px;
}

.breath .ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid rgba(45, 122, 77, .2);
}

.breath .fill {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(45, 122, 77, .17);
  transform: scale(.36);
  transform-origin: 50% 50%;
  will-change: transform;
}

/* Card version loops on its own: open 2s, hold 1.4s, close 2s, rest 2.6s. */
.breath.auto .fill { animation: breathe 8s cubic-bezier(.4, 0, .5, 1) infinite; }

@keyframes breathe {
  0%   { transform: scale(.36); }
  25%  { transform: scale(1); }
  42%  { transform: scale(1); }
  67%  { transform: scale(.36); }
  100% { transform: scale(.36); }
}

/* Breathing page: JS writes the transform straight onto .fill — no variables,
   so the transition actually interpolates. */
.breath.live { width: min(300px, 74vw); height: min(300px, 74vw); }
.breath.live .ring { border-width: 2px; }
.breath.live .fill { transition: transform 4s cubic-bezier(.4, 0, .5, 1); }

.breathe-stage { position: relative; display: grid; place-items: center; margin: 8px auto 26px; }
.breathe-stage .readout {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; pointer-events: none;
}
/* A glow on the letters themselves keeps the petals vivid — a background disc
   behind the text washed the whole flower out. */
/* A glow on the letters keeps them readable over the circle. */
.breathe-stage .phase-word,
.breathe-stage .phase-count {
  text-shadow: 0 0 10px #fff, 0 0 20px rgba(255,255,255,.9);
}
.breathe-stage .phase-word {
  font-family: var(--serif); font-size: 1.35rem; color: var(--ink); letter-spacing: .01em;
}
.breathe-stage .phase-count {
  font-family: var(--serif); font-size: 2.6rem; color: var(--green);
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
/* Collapse the counter when idle so the phase word stays vertically centred. */
.breathe-stage .phase-count:empty { display: none; }

/* ============================================================ guided steps */

.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: none; }
.steps .dot {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: .82rem; font-weight: 700;
  background: var(--sand); color: var(--ink-3); border: 1px solid var(--line-2);
}
.steps li div { min-width: 0; }
/* Only the step title is a block. A bare `.steps b` rule also caught bold words
   inside the description and snapped each onto its own line. */
.steps li > div > b:first-child { display: block; font-size: .96rem; font-weight: 650; }
.steps span:not(.dot) { display: block; font-size: .87rem; color: var(--ink-2); margin-top: 3px; }
.steps li.done .dot { background: var(--green-soft); border-color: #c6dfcf; color: var(--green); }
.steps li.done b { color: var(--ink-2); }
.steps li.now .dot { background: linear-gradient(160deg, var(--gold-2), var(--gold)); border-color: var(--gold); color: #fff; }

.card.onboard { border-color: var(--line-2); background: linear-gradient(165deg, #fffdf7, var(--card) 60%); margin-bottom: 20px; }

.registered { text-align: center; }
.reg-seal {
  width: 58px; height: 58px; margin: 4px auto 16px; border-radius: 50%;
  background: var(--green-soft); border: 1px solid #c6dfcf; color: var(--green);
  display: grid; place-items: center; font-size: 1.5rem;
}
.registered h2 { font-size: 1.5rem; }
.reg-lede { color: var(--ink-2); font-size: .93rem; margin: 8px 0 22px; }
.registered .steps { text-align: left; }
