:root {
  --cream: #f1efe4;
  --cream-2: #e9e4d5;
  --paper: #fbf9f3;
  --card: #ffffff;

  --ink: #14201a;
  --ink-2: #3f4a40;
  --ink-3: #7a7e6f;

  --line: #ddd8c7;
  --line-2: #cdc6b0;

  --forest: #14201a;
  --forest-2: #1c2c22;
  --brand: #4c6a30;
  --sage: #5a7d3e;
  --sage-soft: #eef3e3;

  --gold: #a9802f;
  --gold-soft: #f6efde;
  --rust: #b8482a;
  --rust-soft: #f6e4dd;
  --slate: #5e6b74;

  --f-serif: "Instrument Serif", Georgia, serif;
  --f-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 0 rgba(0,0,0,.02), 0 18px 40px -28px rgba(30,40,25,.45);
  --shadow-sm: 0 1px 0 rgba(0,0,0,.02), 0 8px 20px -16px rgba(30,40,25,.4);

  --sidebar-w: 264px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea { font: inherit; }
::selection { background: #cfe0b6; }

.serif { font-family: var(--f-serif); font-weight: 400; letter-spacing: -.01em; }
.mono { font-family: var(--f-mono); }
em.accent, .serif em { font-style: italic; color: var(--sage); }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); flex: none; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  font-family: var(--f-sans); font-weight: 500; font-size: 14px;
  padding: 11px 18px; border-radius: 11px; cursor: pointer;
  transition: transform .14s ease, background .16s ease, box-shadow .16s ease, border-color .16s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--forest); color: #f3f1e7; }
.btn-primary:hover { background: var(--forest-2); box-shadow: 0 10px 22px -14px rgba(20,32,26,.7); }
.btn-sage { background: var(--sage); color: #fff; }
.btn-sage:hover { background: var(--brand); }
.btn-ghost { background: var(--card); border: 1px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-3); background: #fff; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }

/* ============ Login ============ */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.login__art {
  position: relative;
  background: var(--forest);
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 44px;
  color: #eef0e4;
}
.login__art img.bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .42; filter: saturate(.9);
}
.login__art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,32,26,.45) 0%, rgba(20,32,26,.82) 100%);
}
.login__art > * { position: relative; z-index: 1; }
.login__brand { font-family: var(--f-mono); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.login__brand .mk { width: 26px; height: 26px; border-radius: 7px; background: var(--sage); display: grid; place-items: center; font-family: var(--f-serif); font-size: 17px; color: #fff; font-style: italic; }
.login__quote { max-width: 30ch; }
.login__quote h2 { font-family: var(--f-serif); font-weight: 400; font-size: 42px; line-height: 1.06; margin: 0 0 18px; letter-spacing: -.01em; }
.login__quote h2 em { font-style: italic; color: #b6cf92; }
.login__quote .by { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; color: #c9cdba; }
.login__stats { display: flex; gap: 26px; }
.login__stats b { font-family: var(--f-serif); font-size: 30px; display: block; line-height: 1; }
.login__stats span { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #b7bca8; }

.login__form { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--cream); }
.login__card { width: 100%; max-width: 380px; }
.login__card h1 { font-family: var(--f-serif); font-weight: 400; font-size: 38px; line-height: 1.04; margin: 14px 0 6px; letter-spacing: -.01em; }
.login__card h1 em { font-style: italic; color: var(--sage); }
.login__card .sub { color: var(--ink-2); font-size: 14.5px; margin: 0 0 26px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: 11px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(90,125,62,.14); }
.login__row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 20px; font-size: 13px; }
.login__row a { color: var(--sage); }
.login__hint { font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); text-align: center; margin: 18px 0 0; line-height: 1.6; }
.login__foot { font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); text-align: center; margin-top: 26px; }

/* ============ App shell ============ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: var(--forest); color: #d7dccb;
  display: flex; flex-direction: column;
  padding: 22px 16px;
}
.sidebar__brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 22px; }
.sidebar__brand .mk { width: 30px; height: 30px; border-radius: 8px; background: var(--sage); display: grid; place-items: center; font-family: var(--f-serif); font-size: 19px; color: #fff; font-style: italic; flex: none; }
.sidebar__brand b { font-family: var(--f-serif); font-size: 19px; font-weight: 400; color: #f3f1e7; letter-spacing: -.01em; line-height: 1; }
.sidebar__brand span { display: block; font-family: var(--f-mono); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: #8c9580; margin-top: 3px; }

.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.nav__label { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: #79836e; padding: 16px 10px 7px; }
.nav__item {
  display: flex; align-items: center; gap: 12px; padding: 10px 11px; border-radius: 10px;
  color: #c4cbb6; font-size: 14.5px; font-weight: 450; cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.nav__item .ic { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav__item:hover { background: rgba(255,255,255,.05); color: #eef0e4; }
.nav__item.active { background: var(--sage); color: #fff; }
.nav__item.active .ic { opacity: 1; }
.nav__item .badge-n { margin-left: auto; font-family: var(--f-mono); font-size: 10px; background: rgba(255,255,255,.14); color: #eef0e4; padding: 2px 7px; border-radius: 999px; }
.nav__item.active .badge-n { background: rgba(0,0,0,.18); }

.sidebar__user {
  margin-top: auto; display: flex; align-items: center; gap: 11px;
  padding: 12px 10px; border-top: 1px solid rgba(255,255,255,.08); cursor: pointer;
  border-radius: 10px;
}
.sidebar__user:hover { background: rgba(255,255,255,.05); }
.sidebar__user img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.sidebar__user b { display: block; font-size: 14px; color: #f3f1e7; font-weight: 500; line-height: 1.2; }
.sidebar__user span { font-family: var(--f-mono); font-size: 10px; color: #8c9580; letter-spacing: .04em; }

/* ============ Main / topbar ============ */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 16px clamp(20px, 3.5vw, 44px);
  background: rgba(241,239,228,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar h2 { font-family: var(--f-serif); font-weight: 400; font-size: 24px; margin: 0; letter-spacing: -.01em; }
.topbar .crumb { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.topbar .spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 9px; background: var(--card);
  border: 1px solid var(--line-2); border-radius: 11px; padding: 8px 13px; width: 240px;
  color: var(--ink-3); font-size: 13.5px;
}
.search input { border: 0; background: none; outline: none; width: 100%; color: var(--ink); font-size: 13.5px; }
.icon-btn { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--card); display: grid; place-items: center; color: var(--ink-2); position: relative; }
.icon-btn:hover { border-color: var(--ink-3); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--rust); border: 2px solid var(--card); }

.view { padding: clamp(22px, 3.2vw, 40px) clamp(20px, 3.5vw, 44px) 64px; max-width: 1280px; width: 100%; }

/* ============ Generic cards / chips ============ */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 6px; font-weight: 500;
}
.tag-sage { background: var(--sage-soft); color: var(--brand); }
.tag-gold { background: var(--gold-soft); color: var(--gold); }
.tag-rust { background: var(--rust-soft); color: var(--rust); }
.tag-slate { background: #e7ebee; color: var(--slate); }
.tag-line { border: 1px solid var(--line-2); color: var(--ink-3); }

/* progress bar */
.bar { height: 6px; border-radius: 999px; background: var(--cream-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--sage); border-radius: 999px; }

/* ============ Dashboard ============ */
.dash-hero {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; margin-bottom: 26px;
}
.welcome { padding: 30px 32px; display: flex; flex-direction: column; }
.welcome h1 { font-family: var(--f-serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.02; margin: 14px 0 8px; letter-spacing: -.01em; }
.welcome h1 em { font-style: italic; color: var(--sage); }
.welcome p { color: var(--ink-2); max-width: 46ch; margin: 0 0 22px; }
.welcome .continue { margin-top: auto; }

.continue-card {
  display: flex; align-items: center; gap: 16px; padding: 14px;
  background: var(--sage-soft); border: 1px solid #d8e3c4; border-radius: var(--radius); margin-top: 6px;
}
.continue-card img { width: 78px; height: 58px; border-radius: 9px; object-fit: cover; flex: none; }
.continue-card .meta { min-width: 0; flex: 1; }
.continue-card .meta b { display: block; font-size: 14.5px; }
.continue-card .meta span { font-size: 12.5px; color: var(--ink-2); }

.stat-stack { display: grid; gap: 14px; }
.stat-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.stat-card .k { font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.stat-card .v { font-family: var(--f-serif); font-size: 38px; line-height: 1; }
.stat-card .v small { font-size: 16px; color: var(--ink-3); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 34px 0 16px; }
.section-head h3 { font-family: var(--f-serif); font-weight: 400; font-size: 26px; margin: 0; letter-spacing: -.01em; }
.section-head a { font-family: var(--f-mono); font-size: 11.5px; color: var(--sage); letter-spacing: .04em; }
.section-head a:hover { color: var(--brand); }

/* toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--forest); color: #f3f1e7; padding: 13px 22px; border-radius: 12px;
  font-size: 14px; box-shadow: 0 18px 40px -16px rgba(20,32,26,.6); z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
  display: flex; align-items: center; gap: 11px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .ti { width: 22px; height: 22px; border-radius: 50%; background: var(--sage); display: grid; place-items: center; color: #fff; font-size: 12px; flex: none; }

.empty { text-align: center; color: var(--ink-3); padding: 60px 20px; font-family: var(--f-mono); font-size: 13px; }

/* ============ Footer ============ */
.footer {
  margin-top: auto;
  background: var(--forest);
  color: #c4cbb6;
  padding: clamp(40px, 5vw, 60px) clamp(20px, 3.5vw, 44px) 30px;
}
.footer__top {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px;
  padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer__brand { max-width: 34ch; }
.footer__brand .sidebar__brand b { color: #f3f1e7; }
.footer__brand > p { font-size: 13.5px; line-height: 1.6; color: #aab29b; margin: 0 0 18px; }
.footer__social { display: flex; flex-wrap: wrap; gap: 8px; }
.footer__soc {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em;
  border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 6px 13px;
  color: #c4cbb6; transition: border-color .14s ease, color .14s ease, background .14s ease;
}
.footer__soc:hover { border-color: var(--sage); color: #fff; background: rgba(90,125,62,.25); }
.footer__col { display: flex; flex-direction: column; gap: 11px; }
.footer__col h5 {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: #79836e; margin: 0 0 5px; font-weight: 500;
}
.footer__col a { font-size: 13.5px; color: #c4cbb6; transition: color .14s ease; }
.footer__col a:hover { color: #f3f1e7; }
.footer__bottom {
  max-width: 1280px; margin: 24px auto 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  font-family: var(--f-mono); font-size: 11px; color: #79836e; line-height: 1.6;
}
.footer__legal { max-width: 58ch; }
@media (max-width: 880px) {
  .footer__top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer__brand { grid-column: 1 / -1; max-width: none; }
}

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .dash-hero { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --sidebar-w: 0px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: 264px; transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .search { display: none; }
  .menu-btn { display: grid !important; }
}
.menu-btn { display: none; }


/* ============ Portal additions ============ */
.hidden { display: none !important; }
.muted { color: var(--ink-3); }
.mono-sm { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; color: var(--ink-3); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 1080px) { .grid-2 { grid-template-columns: 1fr; } }
.pad { padding: 22px 24px; }
.pad-sm { padding: 16px 18px; }
h3.h { font-family: var(--f-serif); font-weight: 400; font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
.err { color: var(--rust); font-size: 13px; margin-top: 8px; min-height: 18px; }
.ok { color: var(--brand); font-size: 13px; margin-top: 8px; }
.field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: 11px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-size: 15px; font: inherit;
}
.field textarea { min-height: 90px; resize: vertical; }
.field textarea:focus, .field select:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(90,125,62,.14); }
.field .hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.btn-danger { background: var(--rust-soft); color: var(--rust); }
.btn-danger:hover { background: #f0d6cc; }
.link { color: var(--sage); cursor: pointer; }
.link:hover { color: var(--brand); text-decoration: underline; }

/* list rows (homework, docs, notes) */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: flex-start; gap: 14px; padding: 15px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item .ck {
  width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; margin-top: 1px;
  display: grid; place-items: center; color: #fff; cursor: pointer; transition: all .14s ease; background: #fff;
}
.item .ck:hover { border-color: var(--sage); }
.item.done .ck { background: var(--sage); border-color: var(--sage); }
.item .body { flex: 1; min-width: 0; }
.item .body b { font-weight: 500; font-size: 15px; display: block; }
.item.done .body b { text-decoration: line-through; color: var(--ink-3); }
.item .body p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; }
.item .meta { font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-3); margin-top: 6px; display: flex; gap: 12px; flex-wrap: wrap; }
.item .meta .late { color: var(--rust); }
.item .x { color: var(--ink-3); cursor: pointer; padding: 4px; border-radius: 6px; }
.item .x:hover { color: var(--rust); background: var(--rust-soft); }

/* notes */
.note { padding: 14px 16px; border-radius: 13px; background: var(--paper); border: 1px solid var(--line); }
.note.mine { background: var(--sage-soft); border-color: #d8e3c4; }
.note .who { font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-3); margin-bottom: 5px; display: flex; gap: 10px; }
.note .who b { color: var(--brand); font-weight: 500; }
.note p { margin: 0; font-size: 14px; white-space: pre-wrap; }
.composer-box { display: flex; gap: 10px; align-items: flex-end; margin-top: 14px; }
.composer-box textarea { flex: 1; border: 1px solid var(--line-2); background: #fff; border-radius: 12px; padding: 11px 14px; font-size: 14px; outline: none; resize: vertical; min-height: 44px; }
.composer-box textarea:focus { border-color: var(--sage); }

/* documents */
.doc { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-top: 1px solid var(--line); }
.doc:first-child { border-top: 0; }
.doc .di { width: 38px; height: 38px; border-radius: 10px; background: var(--sage-soft); display: grid; place-items: center; color: var(--brand); flex: none; }
.doc b { font-size: 14.5px; font-weight: 500; display: block; }
.doc span { font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-3); }
.doc a.open { margin-left: auto; }

/* partners */
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.partner { padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.partner h4 { font-family: var(--f-serif); font-weight: 400; font-size: 22px; margin: 0; line-height: 1.1; }
.partner p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.partner .jnote { background: var(--gold-soft); border-left: 3px solid var(--gold); padding: 9px 12px; border-radius: 0 9px 9px 0; font-size: 13px; color: var(--ink-2); }
.partner .jnote b { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 3px; }
.partner .foot { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 6px; }
.disclosure { font-size: 12.5px; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: 10px; padding: 10px 14px; margin: 0 0 18px; }
.cat-head { font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin: 26px 0 12px; display: flex; align-items: center; gap: 10px; }
.cat-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* journey frame */
.frame-wrap { height: calc(100vh - 73px); }
.frame-wrap iframe { width: 100%; height: 100%; border: 0; display: block; background: #FBF9F3; }

/* admin */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: var(--paper); }
.table tr.click { cursor: pointer; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--cream-2); display: grid; place-items: center; font-family: var(--f-serif); font-style: italic; color: var(--brand); font-size: 17px; flex: none; }
.pill { font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--cream-2); color: var(--ink-2); }
.pill.on { background: var(--sage-soft); color: var(--brand); }
.pill.off { background: var(--rust-soft); color: var(--rust); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 18px 0 20px; flex-wrap: wrap; }
.tab { padding: 9px 14px; font-size: 14px; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--brand); border-bottom-color: var(--sage); font-weight: 500; }
.back { display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: 11.5px; color: var(--sage); margin-bottom: 14px; cursor: pointer; }
.member-head { display: flex; align-items: center; gap: 16px; }
.member-head h1 { font-family: var(--f-serif); font-weight: 400; font-size: 34px; margin: 0; line-height: 1; }
.member-head .avatar { width: 56px; height: 56px; font-size: 26px; }

/* modal */
.modal-scrim { position: fixed; inset: 0; background: rgba(20,32,26,.45); z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-scrim.show { display: flex; }
.modal { background: var(--card); border-radius: var(--radius-lg); width: 100%; max-width: 520px; padding: 26px 28px; box-shadow: var(--shadow); max-height: 92vh; overflow: auto; }
.modal h3 { font-family: var(--f-serif); font-weight: 400; font-size: 26px; margin: 0 0 16px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* dashboard extras */
.next-stage { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--sage-soft); border: 1px solid #d8e3c4; border-radius: var(--radius); }
.next-stage .n { width: 40px; height: 40px; border-radius: 50%; background: var(--sage); color: #fff; display: grid; place-items: center; font-family: var(--f-serif); font-size: 19px; flex: none; }
.next-stage b { display: block; font-size: 14.5px; }
.next-stage span { font-size: 12.5px; color: var(--ink-2); }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.quick a { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: transform .14s ease, box-shadow .14s ease; }
.quick a:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.quick .qi { width: 36px; height: 36px; border-radius: 10px; background: var(--sage-soft); color: var(--brand); display: grid; place-items: center; }
.quick b { font-size: 15px; font-weight: 500; }
.quick span { font-size: 12.5px; color: var(--ink-3); }
.loading { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); padding: 40px; text-align: center; }
.banner { background: var(--gold-soft); border: 1px solid #ead9b3; border-radius: var(--radius); padding: 12px 16px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 18px; }
.login__art img.bg { background: linear-gradient(135deg,#1c2c22,#4c6a30); }
@media (max-width: 720px) { .login { grid-template-columns: 1fr; } .login__art { min-height: 220px; padding: 26px; } .login__quote h2 { font-size: 28px; } .login__stats { display: none; } .frame-wrap { height: calc(100vh - 73px); } }
.scrim-side { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 55; display: none; }
.scrim-side.show { display: block; }

.plogo { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 5px; flex: none; }
.plogo-fallback { display: grid; place-items: center; font-family: var(--f-serif); font-style: italic; font-size: 20px; color: var(--brand); background: var(--sage-soft); }

/* five stages */
.stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; position: relative; padding-top: 14px; }
.stages::before { content: ""; position: absolute; left: 6px; right: 6px; top: 19px; height: 1px; background: var(--line-2); }
.stage { position: relative; padding-top: 14px; min-width: 0; }
.stage__dot { position: absolute; top: 0; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--cream); border: 1.5px solid var(--line-2); }
.stage.past .stage__dot { background: var(--sage); border-color: var(--sage); }
.stage.now .stage__dot { background: var(--rust); border-color: var(--rust); box-shadow: 0 0 0 5px rgba(184,72,42,.15); }
.stage__num { font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; color: var(--ink-3); }
.stage__name { font-family: var(--f-serif); font-size: 21px; line-height: 1.1; margin: 4px 0 6px; color: var(--ink-3); }
.stage.past .stage__name { color: var(--brand); }
.stage.now .stage__name { color: var(--rust); }
.stage__line { font-size: 13px; color: var(--ink-2); }
.stage.ahead .stage__line, .stage.ahead .stage__sub { color: var(--ink-3); }
.stage__sub { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.stage__here { display: inline-block; margin-top: 8px; font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--rust); background: var(--rust-soft); padding: 3px 8px; border-radius: 999px; }
.stage__next { margin-top: 18px; padding: 12px 14px; background: var(--sage-soft); border: 1px solid #d8e3c4; border-radius: var(--radius); font-size: 13.5px; color: var(--ink-2); }
.stage__next b { color: var(--brand); font-weight: 500; }
@media (max-width: 900px) { .stages { grid-template-columns: repeat(2, 1fr); } .stages::before { display: none; } .stage__dot { position: static; display: inline-block; margin-bottom: 6px; } .stage { padding-top: 0; } }

/* stage drawings */
.stage-art { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 26px 0 6px; }
.stage-art__cell { position: relative; }
.stage-art__here { position: absolute; top: -24px; left: 4px; font-family: var(--f-serif); font-style: italic; font-size: 17px; color: var(--rust); white-space: nowrap; display: flex; align-items: flex-end; gap: 4px; }
.sa { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; }
.sa-frame { fill: var(--paper); stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; }
.sa-cur .sa-frame { stroke: var(--rust); }
.sa-hollow { fill: rgba(90,125,62,.08); stroke: var(--ink-3); stroke-width: 1.8; }
.sa-info { fill: #8a5a3c; opacity: .85; }
.sa-link { fill: none; stroke: var(--line-2); stroke-width: 1.6; }
.sa-route { fill: none; stroke: var(--brand); stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; }
.sa-halo { fill: rgba(90,125,62,.18); }
.sa-on { fill: var(--sage); }
.sa-dim { fill: #a3a692; }
@media (max-width: 900px) { .stage-art { grid-template-columns: repeat(5, 1fr); gap: 6px; } .stage-art__here { font-size: 12px; top: -18px; } .stage-art__here svg { display: none; } }

/* progress toward the next stage */
.stages__fill { position: absolute; top: 19px; height: 3px; margin-top: -1px; left: calc((var(--cur) - 1) * 20% + 6px); width: calc((20% - 14px) * var(--toward)); background: var(--rust); border-radius: 2px; opacity: .55; }
.stage-art__here { display: none; }

/* continuous progress bar along the five stages */
.stages__bar { position: absolute; top: 18px; left: 6px; height: 3px; width: calc((100% - 12px) * var(--pos)); background: var(--sage); border-radius: 2px; z-index: 0; }
.stage__dot { z-index: 1; }
@media (max-width: 900px) { .stages__bar { display: none; } }

/* testimonial page */
.tm { max-width: 640px; }
.tm__title { font-family: var(--f-serif); font-weight: 400; font-size: clamp(34px, 4.4vw, 50px); line-height: 1.02; margin: 12px 0 14px; letter-spacing: -.01em; }
.tm__title em { font-style: italic; color: var(--sage); }
.tm__lede { color: var(--ink-2); font-size: 15.5px; max-width: 52ch; margin: 0 0 12px; }
.tm__time { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 7px; margin: 0 0 22px; }
.tm__promise { font-family: var(--f-serif); font-style: italic; font-size: 16px; letter-spacing: 0; text-transform: none; color: var(--rust); margin-left: 4px; }
.tm__card { padding: 22px 24px 26px; }
.tm__seg { display: flex; background: var(--cream-2); border-radius: 999px; padding: 4px; }
.tm__seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 12px; border-radius: 999px; font-size: 13.5px; color: var(--ink-2); font-family: var(--f-mono); }
.tm__seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.tm__label { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); display: block; }
.tm__opt { color: var(--ink-3); opacity: .8; }
.tmpl { font-family: var(--f-serif); font-size: 24px; line-height: 1.65; padding: 20px 24px; background: var(--paper); border: 1.5px dashed var(--line-2); border-radius: var(--radius); }
.tmpl .blank { display: inline; border-bottom: 2px solid var(--sage); color: var(--brand); font-style: italic; padding: 0 3px; outline: none; min-width: 2ch; }
.tmpl .blank:empty::before { content: attr(data-ph); color: var(--sage); opacity: .75; }
.tmpl .blank:focus { background: var(--sage-soft); border-radius: 4px; }
.tm__hint { font-size: 12.5px; color: var(--ink-3); margin: 10px 0 0; }
.tm__own { width: 100%; margin-top: 10px; padding: 14px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: var(--paper); font-family: var(--f-serif); font-size: 20px; line-height: 1.5; resize: vertical; outline: none; }
.tm__rule { border: 0; border-top: 1px solid var(--line); margin: 26px 0 22px; }
.tm__photo { display: flex; align-items: center; gap: 16px; padding: 14px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: var(--paper); margin: 12px 0 18px; }
.tm__avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--sage-soft); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3); overflow: hidden; flex: none; }
.tm__avatar img { width: 100%; height: 100%; object-fit: cover; }
.tm__addphoto { display: inline-block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 11px 18px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; cursor: pointer; color: var(--ink); width: 100%; text-align: center; box-sizing: border-box; }
.tm__addphoto:hover { border-color: var(--sage); color: var(--brand); }
.tm__consent { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; background: var(--cream-2); border-radius: var(--radius); font-size: 14.5px; font-weight: 500; cursor: pointer; }
.tm__consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--sage); flex: none; }
.tm__preview { position: relative; background: var(--forest); color: #f3f1e7; border-radius: var(--radius-lg); padding: 30px 32px 24px; background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 14px 14px; }
.tm__q { font-family: var(--f-serif); font-size: 44px; line-height: .6; color: #9fb08c; margin-bottom: 18px; }
.tm__preview p { font-family: var(--f-serif); font-size: clamp(20px, 2.4vw, 26px); line-height: 1.35; margin: 0 0 22px; }
.tm__preview em { font-style: italic; color: #b6cf92; }
.tm__preview .ph { color: #b6cf92; opacity: .9; }
.tm__by { display: flex; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); font-family: var(--f-serif); font-style: italic; font-size: 16px; color: #c9cdba; }
.tm__byav { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.25); display: grid; place-items: center; font-style: normal; color: #eef0e4; overflow: hidden; flex: none; }
.tm__byav img { width: 100%; height: 100%; object-fit: cover; }
.tm__submit { margin-top: 22px; padding: 16px; font-size: 16px; border-radius: 14px; }
.tm__thanks { text-align: center; font-size: 13px; color: var(--ink-3); margin: 18px 0 0; }

/* refer a friend */
.rf__earned { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--sage-soft); border: 1px solid #d8e3c4; border-radius: var(--radius); padding: 14px 16px; margin: 0 0 20px; font-size: 13.5px; color: var(--ink-2); }
.rf__earned b { color: var(--brand); font-weight: 500; font-size: 15px; display: block; margin-bottom: 2px; }
.rf__earned .ic { color: var(--brand); flex: none; }
.rf__link { display: flex; gap: 10px; align-items: stretch; margin-top: 12px; flex-wrap: wrap; }
.rf__link code { flex: 1 1 260px; min-width: 0; font-family: var(--f-mono); font-size: 13px; line-height: 1.4; padding: 13px 16px; background: var(--paper); border: 1.5px dashed var(--line-2); border-radius: var(--radius); color: var(--brand); word-break: break-all; display: flex; align-items: center; }
.rf__link .btn { flex: none; border-radius: var(--radius); }
.rf__code { font-size: 13px; color: var(--ink-3); margin: 10px 0 0; }
.rf__code b { font-family: var(--f-mono); color: var(--ink); letter-spacing: .06em; }
.rf__steps { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: rf; display: flex; flex-direction: column; gap: 12px; }
.rf__steps li { counter-increment: rf; position: relative; padding-left: 44px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.rf__steps li::before { content: "0" counter(rf); position: absolute; left: 0; top: 2px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; color: var(--sage); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 7px; background: #fff; }
.rf__steps li b { color: var(--ink); font-weight: 500; }
.rf__tmpl { margin-top: 14px; }
.rf__tmpl textarea { width: 100%; box-sizing: border-box; padding: 14px 16px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: var(--paper); font-family: var(--f-serif); font-size: 17px; line-height: 1.5; resize: vertical; outline: none; color: var(--ink); }
.rf__tmpl textarea:focus { border-color: var(--sage); background: #fff; }
.rf__row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.rf__row b { font-size: 14px; font-weight: 500; }
.rf__row .x { color: var(--ink-3); cursor: pointer; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; }
.rf__row .x:hover { color: var(--rust); background: var(--rust-soft); }
.rf__sel { font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--ink); }

/* member avatar riding the stage progress bar (bobs like the journey avatar) */
.stages__me { position: absolute; top: 19.5px; left: calc(6px + (100% - 12px) * var(--pos)); margin: -17px 0 0 -17px; width: 34px; height: 34px; border-radius: 50%; background: var(--forest); color: #f1efe4; font-family: var(--f-serif); font-style: italic; font-size: 17px; display: grid; place-items: center; border: 2.5px solid #fff; box-shadow: 0 0 0 2px var(--sage), 0 6px 14px rgba(20,32,26,.2); z-index: 2; animation: me-bob 3.4s ease-in-out infinite; }
.stages__me img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.stages__me::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--sage); animation: me-beacon 2.4s ease-out infinite; pointer-events: none; }
@keyframes me-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes me-beacon { 0% { transform: scale(1); opacity: .6; } 70% { opacity: 0; } 100% { transform: scale(1.85); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .stages__me, .stages__me::before { animation: none; } }
@media (max-width: 900px) { .stages__me { display: none; } }

/* request a call */
.cr__slots { display: flex; flex-direction: column; gap: 10px; }
.cr__slot { display: grid; grid-template-columns: 22px 1fr 1fr; gap: 10px; align-items: center; padding: 10px 12px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: var(--paper); }
.cr__slot input, .cr__slot select { font: inherit; font-size: 14px; padding: 9px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--ink); min-width: 0; }
.cr__slot input:focus, .cr__slot select:focus { outline: none; border-color: var(--sage); }
.cr .tm__own { font-size: 17px; min-height: 90px; }
@media (max-width: 600px) { .cr__slot { grid-template-columns: 22px 1fr; } .cr__slot select { grid-column: 2; } }

.stage__here.out { color: var(--brand); background: var(--sage-soft); }

/* shared calendar */
.pcal { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; }
.pcal__month { font-family: var(--f-serif); font-weight: 400; font-size: 21px; }
.pcal__dow, .pcal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.pcal__dow span { text-align: center; font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.pcal__cell { position: relative; height: 46px; border-radius: 10px; background: var(--paper); border: 1px solid transparent; padding: 5px 7px; font-size: 12.5px; text-align: right; cursor: pointer; color: var(--ink-2); }
.pcal__cell:hover { border-color: var(--sage); background: var(--sage-soft); }
.pcal__cell.blank, .pcal__cell.blank:hover { background: transparent; border-color: transparent; cursor: default; }
.pcal__cell.today { background: #fff; border-color: var(--rust); color: var(--rust); font-weight: 600; }
.pcal__dots { position: absolute; left: 7px; bottom: 6px; display: flex; gap: 3px; }
.pcal__dots i, .pcal__legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); display: inline-block; }
.pcal i.hw { background: #c99a3c; } .pcal i.hw.late { background: var(--rust); } .pcal i.call { background: var(--forest); }
.pcal__legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.pcal__legend span { display: flex; align-items: center; gap: 6px; }
.pcal__ev { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.pcal__ev:last-of-type { border-bottom: 0; }
.pcal__d { flex: none; width: 42px; text-align: center; border: 1px solid var(--line); border-radius: 9px; padding: 3px 0; background: var(--paper); }
.pcal__d b { display: block; font-family: var(--f-serif); font-weight: 400; font-size: 17px; line-height: 1.1; color: var(--brand); }
.pcal__d span { font-family: var(--f-mono); font-size: 9px; text-transform: uppercase; color: var(--ink-3); }
.pcal__tag { display: inline-block; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; margin-bottom: 3px; background: #f6ecd6; color: #8a6420; }
.pcal__tag.late { background: var(--rust-soft); color: var(--rust); } .pcal__tag.call { background: var(--sage-soft); color: var(--brand); }
.pcal__ev .x { color: var(--ink-3); cursor: pointer; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; }
.pcal__ev .x:hover { color: var(--rust); background: var(--rust-soft); }
@media (max-width: 900px) { .pcal { grid-template-columns: 1fr; } }

/* member photo next to the welcome */
.welcome__head { display: flex; align-items: center; gap: 18px; margin: 14px 0 8px; }
.welcome__head h1 { margin: 0; }
.welcome__photo { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--sage), 0 6px 16px rgba(20,32,26,.14); }
.welcome__photo.empty { display: grid; place-items: center; background: var(--forest); color: #f1efe4; font-family: var(--f-serif); font-style: italic; font-size: 28px; text-decoration: none; }
@media (max-width: 600px) { .welcome__photo { width: 48px; height: 48px; } }

/* note author avatars */
.note.has-av { display: flex; gap: 12px; align-items: flex-start; }
.note__body { flex: 1; min-width: 0; }
.note__av { flex: none; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: var(--forest); color: #f1efe4; display: grid; place-items: center; font-family: var(--f-serif); font-style: italic; font-size: 16px; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--sage); }
.note__av img { width: 100%; height: 100%; object-fit: cover; }
