:root {
  /* Calvary brand palette */
  --red: #C63527;          /* PMS 7626, primary */
  --charcoal: #1D252D;     /* PMS 433, primary */
  --cool-gray-1: #D9D9D6;
  --cool-gray-9: #83786F;
  --slate: #A4BCC2;
  --navy-302: #003B5C;
  --light-blue: #BBDDE6;
  --sand: #D6D2C4;
  --blue: #236192;
  --yellow: #FFD100;

  /* Roles */
  --navy: var(--charcoal);   /* dominant dark (header, hero) */
  --navy-2: #2A333C;
  --navy-3: #3B4650;
  --on-navy: #FFFFFF;
  --on-navy-muted: #C9CDD1;
  --accent: var(--red);
  --accent-ink: #FFFFFF;
  --highlight: var(--yellow);

  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F7F7F5;
  --ink: #1D252D;
  --muted: #5B5650;
  --line: #E1E1DE;
  --primary: #1D252D;
  --primary-ink: #FFFFFF;
  --link: #236192;
  --self: #236192;
  --sup: #1D252D;
  --flag: #6B5800;
  --flag-bg: #FFF4C2;
  --danger: #9A2A1F;
  --danger-bg: #F7DEDB;
  --ok: #003B5C;
  --ok-bg: #DCEEF3;
  --draft: #6B5800;
  --draft-bg: #FFF4C2;
  --idle-bg: #EDEDEA;
  --t-self: #1B4E77;     --t-self-bg: #DCE8F2;
  --t-upward: #6B5800;   --t-upward-bg: #FFF4C2;
  --t-employee: #57503F; --t-employee-bg: #EAE6DA;
  --t-meeting: #3E5459;  --t-meeting-bg: #E4ECEE;
  --focus: #236192;
  --serif: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 12px;
  --radius: 22px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161C22;
    --surface: #1F272F;
    --surface-2: #27313A;
    --ink: #EEEEEC;
    --muted: #B5AFA8;
    --line: #34404A;
    --primary: #C63527;
    --primary-ink: #FFFFFF;
    --link: #9FCDE0;
    --self: #7FB3D9;
    --sup: #FFD100;
    --flag: #FFE27A;
    --flag-bg: #3A3210;
    --danger: #F2A29A;
    --danger-bg: #3F1C18;
    --ok: #BBDDE6;
    --ok-bg: #173342;
    --draft: #FFE27A;
    --draft-bg: #3A3210;
    --idle-bg: #2A343E;
    --t-self: #A9CBE6;     --t-self-bg: #18324A;
    --t-upward: #FFE27A;   --t-upward-bg: #3A3210;
    --t-employee: #E2DCCB; --t-employee-bg: #3A362C;
    --t-meeting: #C4D6DA;  --t-meeting-bg: #26383C;
    --focus: #9FCDE0;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; top: 8px; }
.loading { color: var(--muted); padding: 48px 20px; text-align: center; }

h1, h2, h3 { font-family: var(--serif); font-weight: 800; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.4rem); letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
p { margin: 0; }
.lede { color: var(--muted); font-size: 1.05rem; max-width: 62ch; margin-top: 8px; }
.hint { color: var(--muted); font-size: 0.9rem; }

/* Top bar */
#top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.bar {
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 600; }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(90deg, var(--self) 50%, var(--sup) 50%); flex: none; }
.bar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.bar nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: var(--radius-sm); font-weight: 500; }
.bar nav a:hover { color: var(--ink); background: var(--surface-2); }
.bar nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.92rem; }
@media (max-width: 560px) { .who span { display: none; } .bar { gap: 12px; } }

/* Page */
.page { max-width: 1040px; margin: 0 auto; padding: 36px 20px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.back { display: inline-block; margin-bottom: 14px; font-size: 0.92rem; text-decoration: none; }
.back:hover { text-decoration: underline; }
.section { margin-top: 40px; }
.section > h2 { margin-bottom: 4px; }
.section > .hint { margin-bottom: 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 600 0.95rem/1 var(--sans);
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  min-height: 42px;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 7px 12px; min-height: 34px; font-size: 0.88rem; }
.btn:disabled { opacity: 0.55; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; text-decoration: underline; }

/* Forms */
.stack { display: grid; gap: 16px; }
label, .field { display: grid; gap: 6px; font-weight: 500; font-size: 0.95rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], select, textarea {
  font: 400 1rem/1.5 var(--sans);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  width: 100%;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.check input { width: 18px; height: 18px; }
.form-error { background: var(--flag-bg); color: var(--danger); padding: 10px 12px; border-radius: var(--radius-sm); font-weight: 500; }
.row-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

/* Auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; }
.auth-card h1 { font-size: 1.8rem; margin-bottom: 6px; }
.auth-card .lede { margin-bottom: 22px; font-size: 0.98rem; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; margin-bottom: 26px; color: var(--muted); }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list > li { display: flex; align-items: center; gap: 14px; padding: 14px 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.row-main { flex: 1 1 260px; min-width: 0; }
.row-title { font-weight: 600; color: var(--ink); text-decoration: none; }
a.row-title:hover { text-decoration: underline; }
.row-meta { display: block; color: var(--muted); font-size: 0.9rem; }
.empty { color: var(--muted); padding: 18px 0; border-top: 1px solid var(--line); }

.pill { display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill-draft { background: var(--draft-bg); color: var(--primary); }
.pill-submitted { background: var(--ok-bg); color: var(--ok); }
.pill-shared { background: var(--ok-bg); color: var(--ok); }
.pill-invited { background: var(--draft-bg); color: var(--primary); }
.pill-inactive { background: var(--surface-2); color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.85rem; padding: 10px 10px 8px; border-bottom: 1px solid var(--line); }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td .row-meta { font-size: 0.85rem; }
td.actions { white-space: nowrap; text-align: right; }
td.actions .btn + .btn { margin-left: 6px; }
@media (max-width: 680px) {
  table.stackable thead { display: none; }
  table.stackable tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.stackable td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 5px 2px; }
  table.stackable td::before { content: attr(data-label); color: var(--muted); font-size: 0.85rem; }
  table.stackable td.lead { display: block; }
  table.stackable td.lead::before { content: none; }
  table.stackable td.actions { justify-content: flex-start; }
}

/* Review form */
.review-head { margin-bottom: 8px; }
.review-meta { color: var(--muted); margin-top: 6px; }
.intro { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); padding: 14px 16px; margin: 20px 0 8px; max-width: 70ch; }
.q { border: 0; margin: 0; padding: 22px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.q legend, .q > h3 { padding: 0; margin-bottom: 12px; }
.q-label { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.08rem; }
.help { display: block; color: var(--muted); font-size: 0.93rem; font-weight: 400; margin-top: 2px; }
.q > .help { margin: -8px 0 12px; }
.answer { white-space: pre-wrap; max-width: 72ch; margin-top: 8px; }
.answer.none { color: var(--muted); font-style: italic; }

.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; max-width: 680px; }
.step { position: relative; display: block; cursor: pointer; }
.step input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.step span { display: block; }
.step-face {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 10px 6px 9px;
  text-align: center;
  min-height: 74px;
  transition: background-color .12s, border-color .12s;
}
.step-n { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; line-height: 1.1; }
.step-w { font-size: 0.74rem; color: var(--muted); line-height: 1.25; margin-top: 4px; }
.step:hover .step-face { border-color: var(--primary); }
.step input:checked + .step-face { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.step input:checked + .step-face .step-w { color: inherit; }
.step input:focus-visible + .step-face { outline: 3px solid var(--focus); outline-offset: 2px; }
.q.missing .step-face { border-color: var(--danger); }
.q.missing .q-label::after { content: "  Choose a rating"; color: var(--danger); font-family: var(--sans); font-size: 0.85rem; font-weight: 600; }
.scale-key { display: none; justify-content: space-between; color: var(--muted); font-size: 0.8rem; max-width: 680px; margin-top: 6px; }
@media (max-width: 520px) {
  .step .step-w { display: none; }
  .step-face { min-height: 0; padding: 10px 4px; }
  .scale-key { display: flex; }
}

.note { margin-top: 12px; max-width: 680px; }
.note summary { cursor: pointer; color: var(--primary); font-size: 0.92rem; font-weight: 500; }
.note textarea { margin-top: 8px; min-height: 64px; }

.read-score { display: flex; align-items: center; gap: 12px; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--primary); display: block; }
.dots i.on { background: var(--primary); }
.read-score .word { color: var(--muted); font-size: 0.93rem; }

.goals { display: grid; gap: 14px; max-width: 760px; }
.goal { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.goal .field { font-size: 0.85rem; color: var(--muted); }
@media (max-width: 620px) { .goal { grid-template-columns: 1fr; } }
.goal-read { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.goal-read:last-child { border-bottom: 0; }
.goal-read strong { display: block; }
.goal-read span { color: var(--muted); font-size: 0.93rem; }

.savebar {
  position: sticky;
  bottom: 0;
  margin-top: 28px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  margin-left: -20px; margin-right: -20px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.savestate { color: var(--muted); font-size: 0.9rem; margin-right: auto; }

/* Side-by-side */
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 18px 0 6px; font-size: 0.95rem; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.sw.self { background: var(--self); }
.sw.sup { background: var(--sup); }
.notice { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 12px 14px; color: var(--muted); margin-top: 12px; }

.cmp { padding: 24px 0; border-bottom: 1px solid var(--line); }
.cmp-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cmp-head .help { flex-basis: 100%; }
.flag { font-size: 0.8rem; font-weight: 600; color: var(--flag); background: var(--flag-bg); padding: 2px 9px; border-radius: 999px; }

.track { position: relative; height: 86px; margin: 14px 10px 0; max-width: 660px; }
.track-line { position: absolute; left: 0; right: 0; top: 34px; height: 2px; background: var(--line); }
.tick { position: absolute; top: 28px; width: 2px; height: 14px; background: var(--line); transform: translateX(-1px); }
.tick-n { position: absolute; top: 66px; transform: translateX(-50%); font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.mk {
  position: absolute;
  left: var(--pos);
  width: 22px; height: 22px;
  margin-left: -11px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
.mk-self { top: 6px; background: var(--self); }
.mk-sup { top: 41px; background: var(--sup); }
.mk::after {
  content: "";
  position: absolute; left: 50%; width: 2px; margin-left: -1px; height: 7px;
}
.mk-self::after { top: 19px; background: var(--self); }
.mk-sup::after { bottom: 19px; background: var(--sup); }
.track-ends { display: flex; justify-content: space-between; max-width: 680px; color: var(--muted); font-size: 0.78rem; margin-top: 2px; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 14px; }
.cols h4 { margin: 0 0 6px; font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.col p { white-space: pre-wrap; }
.col .q-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.col .q-item:last-child { border-bottom: 0; }
.col .q-item h5 { margin: 0 0 4px; font: 600 0.95rem/1.35 var(--sans); }
.col-self { border-top: 3px solid var(--self); padding-top: 12px; }
.col-sup { border-top: 3px solid var(--sup); padding-top: 12px; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }

.share { margin-top: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.share p { flex: 1 1 280px; }

/* Cycle progress */
.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; width: 160px; }
.progress span { display: block; height: 100%; background: var(--primary); }
.cycle-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

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

/* Dialog */
dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; width: min(520px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgba(10, 20, 24, 0.45); }
.dlg { padding: 24px; display: grid; gap: 16px; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.copy { display: flex; gap: 8px; }
.copy input { font-size: 0.85rem; }

#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Added: cycles, progress, Review View, people ---------- */
.pill-overdue { background: var(--flag-bg); color: var(--flag); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.banner { background: var(--draft-bg); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.last-goals { margin: 18px 0 4px; border-left: 4px solid var(--self); }
.last-goals h3 { margin-bottom: 2px; }
.btn.ghost { border-color: transparent; color: var(--muted); }
.link.danger-link { color: var(--danger); }
.late { color: var(--flag); font-weight: 600; }

.tabs { display: flex; gap: 4px; align-items: center; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 12px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--primary); }
.tabs-end { margin-left: auto; font-size: 0.92rem; }

.org-wrap { overflow-x: auto; }
.org, .org ul { list-style: none; margin: 0; padding: 0; }
.org ul { margin-left: 18px; padding-left: 18px; border-left: 1px solid var(--line); }
.org li { padding: 6px 0; position: relative; }
.org ul > li::before { content: ""; position: absolute; left: -18px; top: 26px; width: 14px; border-top: 1px solid var(--line); }
.org-node { display: inline-flex; flex-direction: column; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); min-width: 200px; }
.org-node span { color: var(--muted); font-size: 0.88rem; }
.org-node em { font-style: normal; color: var(--primary); font-size: 0.8rem; margin-top: 2px; }

.phase-dates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.phase-dates li { display: grid; gap: 6px; align-content: start; }

.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.phase { padding: 16px 18px 14px 0; }
.phase + .phase { padding-left: 18px; border-left: 1px solid var(--line); }
.phase h3 { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.phase-num { margin: 4px 0 8px; color: var(--muted); }
.phase-num strong { font-family: var(--serif); font-size: 1.9rem; color: var(--ink); font-weight: 600; margin-right: 2px; }
.progress.wide { width: 100%; }
.phase .hint { margin-top: 8px; font-size: 0.85rem; }
@media (max-width: 760px) {
  .phases { grid-template-columns: 1fr 1fr; }
  .phase:nth-child(3) { border-left: 0; padding-left: 0; }
  .phase:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.export { display: flex; gap: 16px 24px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.export > div { flex: 1 1 280px; }
.filter-bar { display: flex; gap: 12px 18px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.filter-bar input[type="search"] { max-width: 260px; font: 400 1rem/1.5 var(--sans); padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.filter-bar .btn { margin-left: auto; }

/* Review View */
body.meeting-mode { font-size: 17.5px; }
.page.meeting { max-width: 1120px; }
.steps { display: flex; gap: 6px; margin: 4px 0 8px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.steps a { display: flex; align-items: center; gap: 8px; padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.steps a span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 0.8rem; }
.steps a[aria-current="step"] { color: var(--ink); border-bottom-color: var(--primary); }
.steps a[aria-current="step"] span { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.step-body { min-height: 40vh; padding-top: 12px; }
.step-title { font-size: 1.6rem; margin: 14px 0 6px; }
.step-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); }
.agreed-box { margin-top: 32px; padding: 20px; border: 2px solid var(--primary); border-radius: var(--radius); background: var(--surface); }
.agreed-box h3 { margin-bottom: 4px; }
.agreed-box .goals { margin: 14px 0; }
.goal.agreed { grid-template-columns: 1fr 1fr auto; align-items: end; }
@media (max-width: 620px) { .goal.agreed { grid-template-columns: 1fr; } }
.meeting .head-actions .savestate { margin: 0; }

.steps a b { font-weight: inherit; }
@media (max-width: 560px) { .steps a:not([aria-current]) b { display: none; } .steps a { padding: 10px 10px; } }

/* Google sign-in and email */
.btn.google { background: var(--surface); color: var(--ink); border-color: var(--line); gap: 10px; min-height: 46px; font-size: 1rem; }
.btn.google:hover { background: var(--surface-2); }
.pw-alt { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.pw-alt summary { cursor: pointer; color: var(--primary); font-size: 0.93rem; margin-bottom: 14px; }
.mailstate { color: var(--muted); font-size: 0.92rem; margin: -6px 0 18px; }
.auth-card .form-error { margin-bottom: 14px; }

/* Wins */
.wins { list-style: none; margin: 0; padding: 0; }
.wins li { display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.wins li:last-child { border-bottom: 0; }
.wins li.editing { display: block; }
.win-date { color: var(--muted); font-size: 0.88rem; padding-top: 2px; font-variant-numeric: tabular-nums; }
.win-body p { white-space: pre-wrap; }
.win-tag { display: inline-block; margin-top: 4px; font-size: 0.78rem; color: var(--muted); background: var(--surface-2); padding: 1px 8px; border-radius: 999px; }
.win-actions { display: flex; gap: 12px; font-size: 0.9rem; }
.win-row { align-items: start; grid-template-columns: auto 1fr; }
.win-row .grow { min-width: 0; }
@media (max-width: 560px) { .win-row { grid-template-columns: 1fr; } .wins li { grid-template-columns: 56px 1fr; } .win-actions { grid-column: 2; } }
h2.month { font-size: 1.05rem; color: var(--muted); margin: 26px 0 4px; }
.wins-panel { margin: 18px 0 4px; border-left: 4px solid var(--self); }
.wins-panel summary { cursor: pointer; list-style: none; }
.wins-panel summary::-webkit-details-marker { display: none; }
.wins-panel summary h3 { display: inline; }
.wins-panel summary::after { content: "Show"; float: right; color: var(--primary); font-size: 0.9rem; }
.wins-panel[open] summary::after { content: "Hide"; }
.wins-panel .wins { margin-top: 10px; max-height: 340px; overflow-y: auto; }
.wins-box { margin-top: 28px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--self); border-radius: var(--radius-sm); }
.wins-line { margin-top: 10px; color: var(--muted); }
.drive-row { flex-basis: 100%; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }


/* ===================== Calvary brand layer ===================== */
#top { background: var(--navy); border-bottom: 0; color: var(--on-navy); }
.bar { max-width: 1140px; padding: 14px 24px; }
.brand { color: var(--on-navy); font-weight: 800; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.brand-mark svg { display: block; }
.bar nav { background: var(--navy-2); padding: 5px; border-radius: 999px; gap: 4px; }
.bar nav a { color: var(--on-navy-muted); padding: 8px 15px; border-radius: 999px; font-weight: 600; font-size: 0.93rem; }
.bar nav a:hover { color: var(--on-navy); background: var(--navy-3); }
.bar nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.who { color: var(--on-navy-muted); }
.who .link { color: var(--on-navy); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--light-blue); color: var(--charcoal); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; }

.page { max-width: 1140px; padding: 30px 24px 80px; }
h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.4rem); }

/* Navy hero band on the home page */
.hero { background: var(--navy); color: var(--on-navy); padding: 10px 0 28px; }
.hero-inner { max-width: 1140px; margin: 0 auto; padding: 8px 24px 0; display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.hero-text { flex: 1 1 420px; }
.hero h1 { color: var(--on-navy); }
.hero .lede { color: var(--on-navy-muted); }
.hero-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.hero .btn.gold { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hero .btn.gold:hover { background: #A92C20; }
.hero .btn.ghost-light { background: transparent; border: 1.5px solid #59636D; color: var(--on-navy); }
.hero .btn.ghost-light:hover { background: var(--navy-2); }
.ring { --pct: 0%; width: 128px; height: 128px; border-radius: 50%; background: conic-gradient(var(--highlight) 0 var(--pct), var(--navy-3) var(--pct) 100%); display: flex; align-items: center; justify-content: center; flex: none; }
.ring > div { width: 98px; height: 98px; border-radius: 50%; background: var(--navy); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring strong { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.ring span { font-size: 0.75rem; color: var(--on-navy-muted); font-weight: 600; margin-top: 4px; }
.timeline { max-width: 1140px; margin: 26px auto 0; padding: 0 24px; display: flex; gap: 10px; flex-wrap: wrap; list-style: none; }
.timeline li { flex: 1 1 200px; background: var(--navy-2); border-radius: 18px; padding: 13px 18px; display: flex; align-items: center; gap: 12px; }
.timeline li strong { display: block; font-size: 0.9rem; }
.timeline li span.when { font-size: 0.82rem; color: var(--on-navy-muted); }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }
.dot-self { background: var(--light-blue); } .dot-upward { background: var(--yellow); } .dot-employee { background: var(--sand); } .dot-meeting { background: var(--slate); }
.wins-line { color: var(--on-navy-muted); }
.hero .wins-line a { color: var(--highlight); }

/* Cards */
.section { margin-top: 26px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.panel, .share, .agreed-box, .wins-box, .export, .auth-card, dialog { border-radius: var(--radius); }
.panel, .share { border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(29, 37, 45, 0.06); }
.list { border-top: 0; }
.card .list > li:first-child, .card .table-wrap { border-top: 0; }
.list > li { border-bottom: 1px dashed var(--line); padding: 13px 0; }
.list > li:last-child { border-bottom: 0; }
.empty { border-top: 0; }
.table-wrap { border-top: 0; }
th { border-bottom: 1px solid var(--line); }
td { border-bottom: 1px dashed var(--line); }
tr:last-child td { border-bottom: 0; }

/* Buttons */
.btn { border-radius: 999px; min-height: 44px; padding: 11px 20px; font-weight: 700; border-color: transparent; background: var(--surface); color: var(--ink); }
.card .btn:not(.primary), .panel .btn:not(.primary), dialog .btn:not(.primary), .savebar .btn:not(.primary), .share .btn:not(.primary), .export .btn:not(.primary) { background: var(--idle-bg); }
.btn:hover { background: var(--line); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: none; background: #333D47; }
.btn.small { min-height: 36px; padding: 7px 14px; }
.btn.danger { color: var(--danger); background: var(--danger-bg); }
.btn.google { background: var(--surface); border: 1.5px solid var(--line); }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="url"], input[type="search"], select, textarea { border-radius: 12px; border: 1.5px solid var(--line); }
input[type="url"] { font: 400 1rem/1.5 var(--sans); color: var(--ink); background: var(--surface); padding: 10px 12px; width: 100%; }

/* Pills */
.pill { padding: 4px 11px; font-weight: 700; background: var(--idle-bg); color: var(--muted); }
.pill-draft { background: var(--draft-bg); color: var(--draft); }
.pill-submitted, .pill-shared { background: var(--ok-bg); color: var(--ok); }
.pill-overdue { background: var(--danger-bg); color: var(--danger); }
.tag { display: inline-block; min-width: 88px; text-align: center; font-size: 0.75rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.tag-self { background: var(--t-self-bg); color: var(--t-self); }
.tag-upward { background: var(--t-upward-bg); color: var(--t-upward); }
.tag-employee { background: var(--t-employee-bg); color: var(--t-employee); }
.flag { background: var(--flag-bg); color: var(--flag); }

/* Rating scale */
.step-face { border-radius: 14px; border: 1.5px solid var(--line); }
.step-n { font-family: var(--sans); font-weight: 800; }
.step input:checked + .step-face { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.dots i { border-color: var(--navy); }
.dots i.on { background: var(--navy); }
.intro { border-left: 0; background: var(--t-meeting-bg); color: var(--ink); border: 0; border-radius: 16px; }
.savebar { border-radius: 18px 18px 0 0; box-shadow: 0 -4px 16px rgba(29, 37, 45, 0.08); border-top: 0; }

/* Side by side tracks */
.track-line { height: 10px; top: 30px; border-radius: 999px; background: var(--idle-bg); }
.tick { background: transparent; }
.mk { width: 20px; height: 20px; margin-left: -10px; border: 3px solid var(--surface); box-shadow: none; }
.mk-self { top: 6px; }
.mk-sup { top: 39px; }
.mk::after { display: none; }
.sw { width: 12px; height: 12px; }
.col-self { border-top-color: var(--self); }
.col-sup { border-top-color: var(--sup); }
.last-goals, .wins-panel { border-left: 0; }
.wins-box { border: 0; border-left: 0; }

/* Phases on the progress page */
.phases { border: 0; gap: 12px; }
.phase, .phase + .phase { background: var(--surface); border: 0; border-radius: 18px; padding: 16px 18px; }
@media (max-width: 760px) { .phase:nth-child(n+3) { border-top: 0; } }
.progress { height: 8px; }
.progress span { background: var(--navy); }
.progress.wide { background: var(--idle-bg); }

/* Review View */
.steps { border-bottom: 0; gap: 8px; }
.steps a { border-radius: 999px; border-bottom: 0; padding: 9px 16px; background: var(--surface); margin-bottom: 0; }
.steps a[aria-current="step"] { background: var(--navy); color: #FFFFFF; }
.steps a[aria-current="step"] span { background: var(--highlight); border-color: var(--highlight); color: var(--charcoal); }
.agreed-box { border: 2px solid var(--navy); }
.banner { background: var(--draft-bg); color: var(--ink); border-radius: 16px; }

/* Tabs, org chart */
.tabs a[aria-current="page"] { border-bottom-color: var(--accent); }
.org-node { border-radius: 14px; border: 0; box-shadow: 0 1px 2px rgba(29, 37, 45, 0.08); }
.org-node em { color: var(--link); }

/* Sign-in */
.auth { background: var(--navy); }
.auth-card { border: 0; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); }
.auth-brand { color: var(--ink); font-family: var(--sans); font-weight: 800; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn.primary:hover { background: #A92C20; }
  :root:not([data-theme="light"]) .step input:checked + .step-face { background: var(--highlight); border-color: var(--highlight); color: var(--charcoal); }
  :root:not([data-theme="light"]) .dots i { border-color: var(--highlight); }
  :root:not([data-theme="light"]) .dots i.on { background: var(--highlight); }
  :root:not([data-theme="light"]) .progress span { background: var(--highlight); }
  :root:not([data-theme="light"]) .agreed-box { border-color: var(--highlight); }
  :root:not([data-theme="light"]) .steps a[aria-current="step"] { background: var(--highlight); color: var(--charcoal); }
  :root:not([data-theme="light"]) .steps a[aria-current="step"] span { background: var(--charcoal); border-color: var(--charcoal); color: var(--highlight); }
  :root:not([data-theme="light"]) #top, :root:not([data-theme="light"]) .hero { background: #11161B; }
  :root:not([data-theme="light"]) .ring > div { background: #11161B; }
}

@media (max-width: 520px) { .tag { min-width: 0; } .hero h1 { font-size: 1.8rem; } .ring { width: 104px; height: 104px; } .ring > div { width: 80px; height: 80px; } }
.auth-card h1 { margin-bottom: 18px; }
.auth-card .lede { margin-top: -10px; }
@media (max-width: 520px) { .timeline li { flex: 1 1 140px; padding: 11px 14px; } .timeline { gap: 8px; } }
