/* ===== DESIGN TOKENS ===== */
:root {
  --paper: #FCFBF8;
  --page: #F1EFEA;
  --ink: #1B1917;
  --ink-2: #4E4A44;
  --ink-3: #8A857C;
  --hair: #E4E1D9;
  --hair-dark: #CFCBC1;
  --accent: #8A3B2E;
  --accent-soft: #F4E9E5;
  --ok: #3E6B4F;
  --ok-soft: #E9F0EA;
  --warn: #9A6A1F;
  --warn-soft: #F6EEDD;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --dur-fast: 150ms;
  --dur-normal: 250ms;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: var(--page); }
body {
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-width: 1440px;
}

/* ===== STAGE + PHONE ===== */
.stage {
  width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  padding: 0;
}

.stage-side {
  position: fixed;
  top: 48px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: .02em;
}
.stage-side.left {
  left: calc(50% - 420px);
  text-align: right;
  width: 180px;
}
.stage-side.left small {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hair-dark);
  margin-top: 6px;
}

.phone {
  width: 396px;
  background: var(--paper);
  border-left: 1px solid var(--hair);
  border-right: 1px solid var(--hair);
  min-height: 100vh;
  position: relative;
  padding-bottom: 96px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ===== STATUS BAR ===== */
.statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px 8px;
  font-size: 12px;
  font-weight: 550;
  color: var(--ink-2);
  background: var(--paper);
}
.statusbar .sig {
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 11px;
  letter-spacing: .02em;
}

/* ===== TOPBAR ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(252, 251, 248, .96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 10px 20px 14px;
  border-bottom: 1px solid var(--hair);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.topbar-sub {
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.topbar-sub .topbar-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 17px;
  flex: 1;
  text-align: center;
  letter-spacing: -.01em;
}

.topbar-sub .topbar-right {
  min-width: 30px;
}

.topbar-back { flex-shrink: 0; }

.masthead .kicker {
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 550;
  margin-bottom: 3px;
}
.masthead h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 23px;
  line-height: 1.1;
  letter-spacing: -.01em;
}
.masthead h1 em {
  font-style: italic;
  color: var(--accent);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 2px;
}
.icon-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 2px;
  transition: opacity var(--dur-fast);
}
.icon-btn:active { opacity: 0.6; }
.icon-btn svg { display: block; }
.badge {
  position: absolute;
  top: -5px;
  right: -7px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  font-family: var(--sans);
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: .03em;
}

/* ===== DATELINE ===== */
.dateline {
  padding: 14px 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.dateline .date {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-2);
}
.dateline .week {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 550;
}

/* ===== NUDGE BANNER ===== */
.nudge {
  margin: 14px 20px 0;
  border-top: 2px solid var(--accent);
  background: linear-gradient(var(--accent-soft), rgba(244, 233, 229, .35));
  padding: 12px 14px 13px;
}
.nudge .from {
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 5px;
}
.nudge p {
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink);
}
.nudge p em { font-style: italic; }
.nudge .row {
  display: flex;
  gap: 18px;
  margin-top: 9px;
}

/* ===== TEXT ACTIONS ===== */
.text-action {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--hair-dark);
  transition: opacity var(--dur-fast);
}
.text-action:active { opacity: 0.6; }
.text-action.accent { color: var(--accent); text-decoration-color: var(--accent); }
.text-action.muted { color: var(--ink-3); }

/* ===== COMMITMENT STRIP ===== */
.commit {
  margin: 22px 20px 0;
  border-top: 1px solid var(--ink);
  padding-top: 12px;
}
.commit-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.commit-head .label {
  font-size: 9.5px;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.commit-head .frac {
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  color: var(--ink-2);
}
.commit-head .frac b {
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
  font-size: 19px;
}
.meter {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}
.meter span {
  flex: 1;
  height: 3px;
  background: var(--hair);
  transition: background var(--dur-normal) var(--ease-out);
}
.meter span.done { background: var(--ink); }
.meter span.cur { background: var(--accent); }
.commit-note {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
}
.commit-note em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12.5px;
  color: var(--ink-2);
}

/* ===== SECTIONS ===== */
.section { margin-top: 30px; }
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--ink);
  margin: 0 20px;
}
.sec-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -.005em;
  padding-bottom: 10px;
}
.sec-head h2 .count {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-3);
  margin-left: 7px;
}
.sec-head .view-all {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.sec-sub {
  margin: 8px 20px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-3);
}
.sec-end {
  margin: 26px 20px 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12.5px;
  color: var(--ink-3);
}
.sec-end::before, .sec-end::after {
  content: "—";
  margin: 0 10px;
  color: var(--hair-dark);
}

/* ===== COMPANY CARD ===== */
.card {
  margin: 16px 20px 0;
  border-top: 1px solid var(--hair);
  padding-top: 13px;
  cursor: pointer;
  transition: background var(--dur-fast);
}
.card:first-of-type { margin-top: 18px; border-top: none; padding-top: 0; }
.card:active { background: var(--page); }
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.co-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}
.anchor {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 11.5px;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  white-space: nowrap;
}
.meta {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.meta .sep { color: var(--hair-dark); }
.bucket {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* Priority */
.pri {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .05em;
  padding: 2px 6px;
  border: 1px solid var(--hair-dark);
  color: var(--ink-2);
  white-space: nowrap;
}
.pri.p0 { border-color: var(--accent); color: var(--accent); }

/* Score */
.score {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}
.score .ticks {
  display: flex;
  gap: 3px;
}
.score .ticks i {
  width: 14px;
  height: 4px;
  background: var(--hair);
  display: block;
  transition: background var(--dur-normal);
}
.score .ticks i.on { background: var(--ink); }
.score .val {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12.5px;
  color: var(--ink-2);
}

/* Status line */
.status-line {
  margin-top: 7px;
  font-size: 12px;
  color: var(--ink-2);
  display: flex;
  gap: 6px;
  align-items: center;
}
.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-3);
  flex: none;
}
.dot.warn { background: var(--warn); }
.dot.ok { background: var(--ok); }
.dot.none { background: var(--hair-dark); }
.stale {
  font-family: var(--serif);
  font-style: italic;
  color: var(--warn);
}

/* Card actions */
.card-actions {
  display: flex;
  gap: 18px;
  margin-top: 11px;
}
.done-flag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ok);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ===== FOLLOW-UP CARD ===== */
.fu-card {
  margin: 16px 20px 0;
  border-top: 1px solid var(--hair);
  padding-top: 13px;
  cursor: pointer;
  transition: background var(--dur-fast);
}
.fu-card:first-of-type { margin-top: 18px; border-top: none; padding-top: 0; }
.fu-card:active { background: var(--page); }
.fu-due {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.fu-due.overdue { color: var(--accent); }
.fu-due.today { color: var(--warn); }
.fu-due.soon { color: var(--ink-3); }
.fu-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.25;
}
.fu-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--ink-2);
}
.fu-stage {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-2);
}
.stage-chip {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 7px;
  background: var(--ok-soft);
  color: var(--ok);
  display: inline-block;
}
.stage-chip.warm { background: var(--warn-soft); color: var(--warn); }
.stage-chip.hot { background: var(--accent-soft); color: var(--accent); }
.fu-next {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 13.5px;
  font-style: italic;
  color: var(--ink-2);
  line-height: 1.45;
  padding-left: 12px;
  border-left: 2px solid var(--hair);
}
.fu-contact {
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.fu-contact b {
  font-weight: 550;
  color: var(--ink-2);
}

/* ===== TODAY STRIP ===== */
.today {
  margin: 30px 20px 0;
  border-top: 1px solid var(--ink);
  padding-top: 12px;
}
.today .label {
  font-size: 9.5px;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.today-item {
  display: flex;
  gap: 14px;
  margin-top: 13px;
  align-items: baseline;
  cursor: pointer;
}
.today-item:active { opacity: 0.7; }
.today-item .time {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-2);
  width: 66px;
  flex: none;
}
.today-item .what {
  font-size: 13px;
  line-height: 1.4;
  flex: 1;
}
.today-item .what b {
  font-weight: 600;
  font-family: var(--serif);
  font-size: 14px;
}
.today-item .what span {
  color: var(--ink-3);
  font-size: 11.5px;
  display: block;
  margin-top: 1px;
}
.zoom-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--hair-dark);
  white-space: nowrap;
  cursor: pointer;
}

/* ===== TAB BAR ===== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 396px;
  background: rgba(252, 251, 248, .97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--ink);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 8px 18px;
  z-index: 50;
  border-left: 1px solid var(--hair);
  border-right: 1px solid var(--hair);
}
.tab {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ink-3);
  width: 60px;
  transition: color var(--dur-fast);
}
.tab svg { display: block; }
.tab .t-label {
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
}
.tab.active { color: var(--ink); }
.tab:active { transform: scale(0.92); }
.tab.add {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  align-items: center;
  justify-content: center;
  margin-top: -22px;
  box-shadow: 0 4px 14px rgba(27, 25, 23, .22);
}
.tab.add:active { transform: scale(0.88); }

/* ===== HOME SECTION SEPARATION ===== */
.home-section {
  position: relative;
}

/* Emphasis tier — urgent sections (nudge + commitment) */
.home-section--emphasis {
  background: var(--accent-soft);
  padding: 4px 0 14px;
  margin-top: 10px;
}

.home-section--emphasis .nudge {
  background: linear-gradient(rgba(252, 251, 248, 0.55), rgba(252, 251, 248, 0.15));
}

.home-section--emphasis .commit {
  border-top-color: rgba(138, 59, 46, 0.2);
}

/* Standard tier — informational sections */
.home-section--standard {
  margin-top: 28px;
  padding-bottom: 8px;
}

.home-section--standard .section {
  margin-top: 0;
}

.home-section--standard + .home-section--standard {
  margin-top: 0;
  padding-top: 24px;
  border-top: 1px solid var(--hair-dark);
}

/* Surface variant — page-tinted background for visual variety */
.home-section--surface {
  background: var(--page);
  margin-top: 28px;
  padding: 4px 0 12px;
  border-top: 1px solid var(--hair-dark);
}

.home-section--surface .today {
  margin-top: 12px;
  border-top: none;
}

/* ===== HOME FOOTER ===== */
.home-footer {
  margin: 34px 20px 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-3);
  padding-bottom: 20px;
}

/* ===== SCREEN CONTENT ===== */
.screen-content {
  min-height: calc(100vh - 200px);
}

/* ===== CHIP ===== */
.chip {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  display: inline-block;
}
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-neutral { background: var(--page); color: var(--ink-3); }

/* ===== LOGIN SCREEN ===== */
.login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 24px;
}
.login-brand { text-align: center; margin-bottom: 36px; }
.login-kicker {
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 6px;
}
.login-title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -.01em;
}
.login-title em {
  font-style: italic;
  color: var(--accent);
}
.login-sub {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 6px;
}
.login-cards {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.login-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--hair);
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.login-card:hover { border-color: var(--hair-dark); }
.login-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.login-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}
.login-info { flex: 1; }
.login-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
}
.login-email {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}
.login-form { width: 100%; }
.login-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-bottom: 6px;
}
.login-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--hair);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  outline: none;
}
.login-input:focus { border-color: var(--ink-3); }
.login-error {
  color: var(--accent);
  font-size: 12px;
  margin-top: 6px;
  min-height: 18px;
}
.login-submit {
  width: 100%;
  padding: 14px;
  margin-top: 16px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity var(--dur-fast);
}
.login-submit:active { opacity: 0.8; }
.login-submit svg { stroke: var(--paper); }
.login-footer {
  margin-top: 40px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-3);
}
.input-error { border-color: var(--accent) !important; }

/* ===== NOTIFICATIONS ===== */
.notif-screen { padding: 0 0 20px; }
.notif-actions {
  padding: 12px 20px;
  text-align: right;
}
.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
  transition: background var(--dur-fast);
}
.notif-item:active { background: var(--page); }
.notif-unread { border-left: 2px solid var(--accent); }
.notif-icon {
  flex-shrink: 0;
  color: var(--ink-3);
  padding-top: 2px;
}
.notif-body { flex: 1; min-width: 0; }
.notif-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 3px;
}
.notif-preview {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-time {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
}

/* ===== COMMITMENT ===== */
.commitment-screen { padding: 16px 0; }
.commit-prompt {
  padding: 0 20px 16px;
}
.commit-prompt-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  margin-bottom: 6px;
}
.commit-prompt-sub {
  font-size: 13px;
  color: var(--ink-3);
}
.commit-count {
  padding: 10px 20px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-2);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.commit-select-list { padding: 0 20px; }
.commit-select-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
}
.commit-check-input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.commit-select-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
}
.commit-select-meta {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
}
.commit-submit-btn {
  display: block;
  margin: 20px auto;
  padding: 12px 40px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.commit-submit-btn:active { opacity: 0.8; }
.commit-list { padding: 20px 20px 0; }
.commit-list-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.commit-company-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hair);
}
.commit-check {
  width: 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
}
.commit-check.checked { color: var(--ok); font-weight: 600; }
.commit-co-name {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  flex: 1;
  cursor: pointer;
}
.commit-co-name:hover { text-decoration: underline; }
.commit-co-meta {
  font-size: 11px;
  color: var(--ink-3);
}
.commit-prior { padding: 20px 20px 0; }
.commit-prior-row {
  font-size: 13px;
  color: var(--ink-2);
  font-family: var(--serif);
  font-style: italic;
}

/* ===== FORMS ===== */
.form-screen { padding: 16px 20px 40px; }
.form-group { margin-bottom: 18px; }
.form-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-bottom: 6px;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--hair);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  outline: none;
  -webkit-appearance: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--ink-3); }
.form-textarea { resize: vertical; }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238A857C' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.form-radio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.form-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--hair);
  font-size: 13px;
  cursor: pointer;
}
.form-radio input { accent-color: var(--accent); }
.form-segment {
  display: flex;
  border: 1px solid var(--hair);
}
.form-segment-wrap {
  flex-wrap: wrap;
}
.seg-btn {
  flex: 1;
  padding: 10px 8px;
  border: none;
  background: var(--paper);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  border-right: 1px solid var(--hair);
  transition: all var(--dur-fast);
}
.seg-btn:last-child { border-right: none; }
.seg-btn.active {
  background: var(--ink);
  color: var(--paper);
}
.seg-btn:active { opacity: 0.7; }
.score-selector {
  display: flex;
  gap: 4px;
}
.score-step {
  flex: 1;
  padding: 10px 4px;
  border: 1px solid var(--hair);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  text-align: center;
  transition: all var(--dur-fast);
}
.score-step.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}
.form-submit:active { opacity: 0.8; }
.form-context-badge {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-2);
  padding: 8px 12px;
  background: var(--page);
  margin-bottom: 16px;
}
.form-static {
  padding: 11px 14px;
  font-size: 14px;
  color: var(--ink-3);
  background: var(--page);
}
.form-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
}
.form-check input { accent-color: var(--accent); }
.form-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-3);
  padding: 8px 12px;
  background: var(--page);
  margin-bottom: 12px;
}
.form-close-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.close-won-btn, .close-lost-btn {
  flex: 1;
  padding: 12px;
  border: none;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.close-won-btn {
  background: var(--ok-soft);
  color: var(--ok);
}
.close-lost-btn {
  background: var(--accent-soft);
  color: var(--accent);
}
.close-won-btn:active, .close-lost-btn:active { opacity: 0.7; }

/* ===== DUPLICATE NOTICE ===== */
.dup-notice {
  padding: 12px 14px;
  background: var(--accent-soft);
  border-top: 2px solid var(--accent);
  margin-bottom: 16px;
}
.dup-msg {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 8px;
}
.dup-actions {
  display: flex;
  gap: 16px;
}

/* ===== COMPANY DETAIL ===== */
.cd-screen { padding: 16px 0 40px; }
.cd-header { padding: 0 20px; }
.cd-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.cd-badges {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}
.cd-score-section {
  padding: 16px 20px 0;
}
.cd-score-label, .cd-status-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.cd-score-taps {
  display: flex;
  gap: 4px;
}
.score-tap {
  width: 32px;
  height: 12px;
  border: none;
  background: var(--hair);
  cursor: pointer;
  transition: background var(--dur-fast);
}
.score-tap.filled { background: var(--ink); }
.score-tap.current { background: var(--accent); }
.score-tap:active { opacity: 0.7; }
.cd-score-val {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 6px;
}
.cd-status-section {
  padding: 16px 20px 0;
}
.status-dropdown {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--hair);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  background: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238A857C' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  -webkit-appearance: none;
  padding-right: 36px;
}
.cd-firm-summary {
  padding: 12px 20px 0;
  font-size: 12px;
  color: var(--ink-3);
}
.cd-section {
  margin-top: 24px;
  padding: 0 20px;
}
.cd-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cd-contact {
  padding: 8px 0;
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
}
.cd-contact:active { background: var(--page); }
.cd-contact-name {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
}
.cd-contact-meta {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
}
.cd-opp {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
}
.cd-opp:active { background: var(--page); }
.cd-opp-type {
  font-family: var(--serif);
  font-size: 14px;
}
.cd-activity {
  padding: 8px 0;
  border-bottom: 1px solid var(--hair);
}
.cd-act-type {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: 8px;
}
.cd-act-date {
  font-size: 11px;
  color: var(--ink-3);
}
.cd-act-content {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 3px;
  line-height: 1.4;
}

/* ===== MEETINGS LIST ===== */
.meetings-list { padding: 0 0 20px; }
.ml-day-section { margin-top: 16px; }
.ml-day-label {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
  padding: 0 20px 8px;
  border-bottom: 1px solid var(--hair);
}
.ml-meeting {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
}
.ml-meeting:active { background: var(--page); }
.ml-time {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-2);
  width: 70px;
  flex-shrink: 0;
}
.ml-info { flex: 1; min-width: 0; }
.ml-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 14px;
}
.ml-meta {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
}
.ml-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.ml-task {
  padding: 10px 20px;
  border-bottom: 1px solid var(--hair);
}
.ml-task-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-3);
  margin-right: 8px;
}
.ml-task-title {
  font-size: 13px;
  color: var(--ink);
}
.ml-task-overdue {
  display: block;
  font-size: 11px;
  color: var(--accent);
  margin-top: 2px;
}

/* ===== MEETING DETAIL ===== */
.md-screen { padding: 16px 20px 40px; }
.md-header { margin-bottom: 16px; }
.md-company {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--hair-dark);
  text-underline-offset: 3px;
}
.md-contacts {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 4px;
}
.md-opp {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--accent);
  margin-top: 4px;
  cursor: pointer;
}
.md-time {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.md-zoom { margin-bottom: 8px; }
.md-no-zoom {
  font-size: 12px;
  color: var(--ink-3);
}
.md-sync { margin-bottom: 12px; }
.md-synced {
  font-size: 12px;
  color: var(--ok);
  font-weight: 600;
}
.md-not-synced {
  font-size: 12px;
  color: var(--ink-3);
}
.md-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.md-status-label {
  font-size: 12px;
  color: var(--ink-3);
}
.md-duration {
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.md-notes-prompt {
  margin-top: 20px;
  padding: 14px;
  background: var(--page);
}
.md-notes-q {
  font-family: var(--serif);
  font-size: 14px;
  margin-bottom: 10px;
}
.md-notes-actions {
  display: flex;
  gap: 16px;
}

/* ===== OPPORTUNITY DETAIL ===== */
.od-screen { padding: 16px 0 40px; }
.od-header { padding: 0 20px; margin-bottom: 16px; }
.od-company {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--hair-dark);
  text-underline-offset: 3px;
}
.od-service {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 4px;
}
.od-stage-section {
  padding: 0 20px 12px;
}
.od-stage-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.od-stage-select { margin-bottom: 0; }
.od-outcome {
  padding: 0 20px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.od-outcome-label {
  font-size: 12px;
  color: var(--ink-3);
}
.od-close-actions {
  padding: 0 20px 16px;
  display: flex;
  gap: 10px;
}

/* ===== SEARCH ===== */
.search-screen { padding: 0; }
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--hair);
}
.search-icon { color: var(--ink-3); flex-shrink: 0; }
.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: transparent;
}
.search-input::placeholder { color: var(--ink-3); }
.search-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-3);
  padding: 4px;
}
.search-results { padding: 0; }
.search-prompt, .search-no-result {
  padding: 40px 20px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-3);
}
.search-group { margin-top: 8px; }
.search-group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 20px;
  background: var(--page);
}
.search-item {
  padding: 12px 20px;
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
}
.search-item:active { background: var(--page); }
.search-item-name {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
}
.search-item-meta {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
}

/* ===== CLAUDE ===== */
.claude-screen {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
}
.claude-context {
  padding: 10px 20px;
  font-size: 11px;
  color: var(--ink-3);
  background: var(--page);
  font-weight: 550;
  letter-spacing: .04em;
}
.claude-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.claude-msg {
  display: flex;
  gap: 8px;
}
.claude-msg.user { justify-content: flex-end; }
.claude-msg-icon {
  flex-shrink: 0;
  color: var(--accent);
  padding-top: 4px;
}
.claude-msg-bubble {
  max-width: 85%;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.5;
}
.user-bubble {
  background: var(--ink);
  color: var(--paper);
}
.ai-bubble {
  background: var(--page);
  color: var(--ink);
  font-family: var(--serif);
  font-style: italic;
  white-space: pre-line;
}
.claude-input-bar {
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--hair);
  background: var(--paper);
}
.claude-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--hair);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  background: var(--paper);
}
.claude-input:focus { border-color: var(--ink-3); }
.claude-send {
  background: var(--ink);
  color: var(--paper);
  border: none;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.claude-send:active { opacity: 0.7; }

/* ===== SETTINGS ===== */
.settings-screen { padding: 16px 0 40px; }
.settings-section {
  padding: 0 20px;
  margin-bottom: 24px;
}
.settings-section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 6px;
}
.settings-section-sub {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.integ-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
}
.integ-icon { color: var(--ink-2); flex-shrink: 0; }
.integ-info { flex: 1; }
.integ-name {
  font-weight: 600;
  font-size: 14px;
}
.integ-badge {
  font-size: 11px;
  font-weight: 600;
  margin-top: 3px;
  display: block;
}
.integ-badge.connected { color: var(--ok); }
.integ-badge.disconnected { color: var(--ink-3); }
.integ-connect, .integ-disconnect {
  padding: 8px 16px;
  border: 1px solid var(--hair);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.integ-connect { color: var(--ink); }
.integ-disconnect { color: var(--accent); border-color: var(--accent); }
.integ-connect:active, .integ-disconnect:active { opacity: 0.7; }
.settings-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
}
.settings-user-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
}
.settings-user-email {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}
.settings-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 0;
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}
.settings-logout:active { opacity: 0.7; }

/* ===== EMPTY STATE ===== */
.empty-state {
  padding: 30px 20px;
  text-align: center;
}
.empty-icon {
  color: var(--ink-3);
  margin-bottom: 10px;
}
.empty-msg {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-3);
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
  width: 340px;
}
.toast {
  padding: 12px 18px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  text-align: center;
  pointer-events: auto;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--dur-normal) var(--ease-out);
}
.toast-visible {
  transform: translateY(0);
  opacity: 1;
}
.toast-exit {
  transform: translateY(20px);
  opacity: 0;
}
.toast-info {
  background: var(--ink);
  color: var(--paper);
}
.toast-success {
  background: var(--ok);
  color: #fff;
}
.toast-error {
  background: var(--accent);
  color: #fff;
}

/* ===== ANIMATIONS ===== */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.anim-card-in {
  animation: cardIn var(--dur-normal) var(--ease-out) both;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
.anim-slide-down {
  animation: slideDown var(--dur-normal) var(--ease-out) both;
}
@keyframes meterFill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.anim-meter span {
  transform-origin: left;
  animation: meterFill 400ms var(--ease-out) both;
}
.anim-meter span:nth-child(1) { animation-delay: 0ms; }
.anim-meter span:nth-child(2) { animation-delay: 80ms; }
.anim-meter span:nth-child(3) { animation-delay: 160ms; }
.anim-meter span:nth-child(4) { animation-delay: 240ms; }
.anim-meter span:nth-child(5) { animation-delay: 320ms; }
