/* ================================================================
   EAVESDROP — Design System
   Ported from Figma: Eavesdrop / Onboarding / V1
   gt0hM30wdO1zKMDt3Szaij

   Type      EB Garamond (display) · Quicksand (UI)
   Surfaces  #393939 ink shell · #FFFEEC cream · #F7F5DA wheat
   Radii     32 dialog · 22 card · 12 group · 7 tab · 5 control
   ================================================================ */

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

:root {
  /* Core palette (from Figma, no variables were defined in the file) */
  --ink: #393939;
  --ink-soft: #434343;
  --cream: #FFFEEC;
  --wheat: #F7F5DA;
  --muted: #A4A4A4;
  --hairline: #E9E7C8;

  /* Transport + status accents */
  --play: #2DB720;
  --play-bg: #E3FFCE;
  --stop: #B72720;
  --stop-bg: #FFD1CE;
  --pause-bg: #D9D9D9;
  --pause-fg: #434343;
  --ai-from: #9136DF;
  --ai-to: #DB0739;

  /* Loader shimmer — exact values from the Eavesdrop Loader design doc.
     Those are tuned for the doc's cream panel; the transcription skeleton
     sits on wheat, so it needs a darker pair to stay legible. */
  --shimmer-track: #EFEDCD;
  --shimmer-fill: #DEDBAB;
  --skel-track: #DFDCC0;
  --skel-fill: #C6C3A0;

  /* Semantic aliases */
  --bg: var(--ink);
  --surface: var(--cream);
  --surface-2: var(--wheat);
  --border: var(--wheat);
  --text: var(--ink);
  --accent: var(--play);
  --accent-bg: var(--play-bg);
  --red: var(--stop);
  --red-bg: var(--stop-bg);

  /* Radii */
  --r-dialog: 32px;
  --r-card: 22px;
  --r-group: 12px;
  --r-tab: 7px;
  --r-ctl: 5px;

  /* Type */
  --display: 'EB Garamond', Georgia, serif;
  --ui: 'Quicksand', system-ui, -apple-system, sans-serif;

  --shadow: 0 1px 3px rgba(57, 57, 57, .08), 0 1px 2px rgba(57, 57, 57, .04);
  --shadow-lg: 0 12px 40px rgba(24, 24, 24, .28), 0 2px 8px rgba(24, 24, 24, .16);
}

body {
  font-family: var(--ui);
  background: var(--ink);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; outline: none; transition: all .15s; color: inherit }
input, select, textarea { font-family: inherit; outline: none; color: inherit }
a { color: inherit }

::-webkit-scrollbar { width: 6px; height: 6px }
::-webkit-scrollbar-track { background: transparent }
::-webkit-scrollbar-thumb { background: #DCDAB8; border-radius: 3px }
::-webkit-scrollbar-thumb:hover { background: #C9C7A4 }

/* ── Icons ──────────────────────────────────────────────────────────
   Every glyph is an exported Figma SVG (assets/icons) drawn as a mask so
   it inherits currentColor. The source files are single-colour #393939. */
.ic {
  display: inline-block;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.ic-ai { background: linear-gradient(135deg, var(--ai-from), var(--ai-to)) }

/* Brand wordmark (cream artwork — sits on ink only) */
.wordmark { display: block; height: 24px; width: auto }

/* ── Display type ───────────────────────────────────────────────────*/
.display { font-family: var(--display); font-weight: 500; letter-spacing: .01em }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: .01em }

.meta { font-size: 11px; font-weight: 600; color: var(--muted) }
.tnum { font-variant-numeric: tabular-nums }

/* ── Shell ──────────────────────────────────────────────────────────*/
.shell { display: flex; height: 100vh; overflow: hidden; background: var(--ink) }
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0 }

.topbar {
  height: 50px; background: var(--ink); display: flex; align-items: center;
  justify-content: space-between; padding: 0 13px; gap: 12px; flex-shrink: 0; color: var(--cream);
}
.topbar-actions { display: flex; align-items: center; gap: 14px }
.topbar-btn {
  background: none; color: var(--cream); display: inline-flex; align-items: center;
  justify-content: center; padding: 4px; border-radius: 6px; opacity: .9;
}
.topbar-btn:hover { opacity: 1; background: rgba(255, 254, 236, .1) }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--wheat); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0; overflow: hidden;
}

/* The cream page plate that floats on the ink shell */
.content { flex: 1; overflow: hidden; padding: 0 5px 5px; display: flex }
.plate {
  flex: 1; background: var(--cream); border-radius: var(--r-card);
  overflow: hidden; display: flex; flex-direction: column; min-width: 0;
}

/* ── Buttons ────────────────────────────────────────────────────────*/
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 10px; border-radius: var(--r-ctl); font-size: 14px; font-weight: 700;
  font-family: var(--ui); background: var(--cream); color: var(--ink);
  border: 2px solid var(--wheat); transition: all .15s; line-height: 1.1;
}
.btn:hover { background: var(--ink); color: var(--cream); border-color: var(--ink) }
.btn:active:not(:disabled) { transform: translateY(1px) }
.btn:disabled { opacity: .45; cursor: not-allowed }
/* A busy CTA keeps full contrast — the mark inside carries the waiting state */
.btn.is-busy, .btn.is-busy:hover { opacity: 1; cursor: progress }
.btn.is-busy { pointer-events: none }
.btn:disabled:hover { background: var(--cream); color: var(--ink); border-color: var(--wheat) }
.btn-primary { background: var(--ink); color: var(--cream); border-color: var(--ink) }
.btn-primary:hover { background: #2b2b2b; border-color: #2b2b2b; color: var(--cream) }
.btn-primary:disabled:hover { background: var(--ink); color: var(--cream) }
.btn-wheat { background: var(--wheat); border-color: var(--wheat) }
.btn-sm { padding: 7px 12px; font-size: 12px; gap: 7px; border-width: 1.5px }
.btn-block { width: 100% }
.btn-ai { border-color: var(--ai-from); color: var(--ink); background: var(--cream) }
.btn-ai:hover { background: var(--ai-from); border-color: var(--ai-from); color: #fff }

.btn-icon {
  padding: 5px; border-radius: 6px; background: transparent; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-icon:hover { background: var(--wheat); color: var(--ink) }

/* ── Segmented control (Log In / Sign Up) ───────────────────────────*/
.seg { display: flex; gap: 1px; background: var(--wheat); border-radius: var(--r-group); padding: 5px }
.seg-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; border-radius: var(--r-tab); background: transparent; color: var(--ink);
  font-size: 14px; font-weight: 700; transition: background .15s;
}
.seg-btn.active { background: var(--cream) }
.seg-btn:not(.active):hover { background: rgba(255, 254, 236, .5) }

/* ── Meta pills (Today · 2 · label) ─────────────────────────────────*/
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: var(--r-ctl); background: var(--wheat); color: var(--ink);
  font-size: 11px; font-weight: 600; white-space: nowrap; border: none;
}
.pill-btn { cursor: pointer }
.pill-btn:hover { background: var(--hairline) }

/* ── Cards ──────────────────────────────────────────────────────────*/
.card { background: var(--cream); border: 2px solid var(--wheat); border-radius: var(--r-card) }
.card-wheat { background: var(--wheat); border-radius: var(--r-card) }

/* ── Forms ──────────────────────────────────────────────────────────*/
.field { margin-bottom: 16px }
.field-label { display: block; font-size: 11px; font-weight: 600; color: var(--ink); margin-bottom: 4px }
.input, .select {
  width: 100%; padding: 10px; border: 2px solid var(--wheat); border-radius: var(--r-ctl);
  background: var(--cream); font-size: 14px; font-weight: 700; color: var(--ink); transition: border-color .15s;
}
.input::placeholder { color: var(--ink); opacity: 1; font-weight: 700 }
.input:focus, .select:focus { border-color: var(--ink) }
.input-wrap { position: relative }
.input-affix {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; padding: 0; color: var(--ink); display: flex; opacity: .8;
}
.input-affix:hover { opacity: 1 }
.select {
  appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("assets/icons/dropdown.svg");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 14px;
}

/* Divider with an OR chip */
.divider { position: relative; height: 20px; display: flex; align-items: center; justify-content: center }
.divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--wheat) }
.divider span {
  position: relative; background: var(--cream); padding: 0 12px;
  font-size: 11px; font-weight: 600; color: var(--ink);
}

/* ── Auth ───────────────────────────────────────────────────────────*/
.auth-page {
  min-height: 100vh; background: var(--ink); display: flex; flex-direction: column;
  align-items: center; padding: 69px 24px 40px; overflow: auto;
}
.auth-page .wordmark { height: 40px; margin-bottom: 65px }
.auth-dialog {
  width: 495px; max-width: 100%; background: var(--cream);
  border-radius: var(--r-dialog); padding: 20px; box-shadow: var(--shadow-lg);
  /* Fixed height so the form leaves real whitespace for the scene below it */
  min-height: 563px; display: flex; flex-direction: column;
}
.auth-note {
  margin-bottom: 12px; padding: 9px 12px; border-radius: var(--r-ctl);
  font-size: 12px; font-weight: 600; border: 2px solid;
}
.auth-note.err { background: var(--stop-bg); border-color: #F3B6B2; color: var(--stop) }
.auth-note.ok { background: var(--play-bg); border-color: #BEE9A9; color: #1F7D15 }

/* ── Animated whitespace (sign-in dialog) ───────────────────────────
   From the Claude Design doc "Eavesdrop Sign In - Animated Whitespace":
   three ambient scenes for the empty space below the sign-in options.
   1a birds crossing · 1b meadow · 1c landscape */

@keyframes fly-across { 0% { transform: translateX(-80px) } 100% { transform: translateX(480px) } }
@keyframes fly-far {
  0% { transform: translateX(-60px) translateY(0) }
  50% { transform: translateX(200px) translateY(-16px) }
  100% { transform: translateX(470px) translateY(0) }
}
@keyframes bob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-14px) } }
@keyframes flap-l { 0%, 100% { transform: rotate(18deg) } 50% { transform: rotate(-22deg) } }
@keyframes flap-r { 0%, 100% { transform: rotate(-18deg) } 50% { transform: rotate(22deg) } }
@keyframes sway { 0%, 100% { transform: rotate(-5deg) } 50% { transform: rotate(6deg) } }
@keyframes sway-slow { 0%, 100% { transform: rotate(3deg) } 50% { transform: rotate(-4deg) } }
@keyframes glow { 0%, 100% { opacity: 0 } 40%, 60% { opacity: 1 } }
@keyframes drift-up { 0% { transform: translate(0, 0) } 100% { transform: translate(40px, -120px) } }
@keyframes cloud-drift { 0% { transform: translateX(-140px) } 100% { transform: translateX(460px) } }
@keyframes twinkle { 0%, 100% { opacity: .15 } 50% { opacity: .8 } }
@keyframes perch-bob {
  0%, 100% { transform: translateY(0) rotate(0deg) }
  30% { transform: translateY(-2px) rotate(-4deg) }
  60% { transform: translateY(0) rotate(3deg) }
}
@keyframes leaf-fall {
  0% { transform: translate(0, -10px) rotate(0deg); opacity: 0 }
  15% { opacity: 1 }
  100% { transform: translate(-70px, 180px) rotate(320deg); opacity: 0 }
}
@keyframes branch-sway { 0%, 100% { transform: rotate(-1.5deg) } 50% { transform: rotate(1.5deg) } }

/* The scene bleeds into the dialog's bottom corners and fills whatever
   vertical space the form leaves over. */
.auth-scene {
  position: relative; flex: 1; min-height: 130px;
  margin: 6px -20px -20px; border-radius: 0 0 var(--r-dialog) var(--r-dialog);
  overflow: hidden;
}
.scene-birds { background: linear-gradient(180deg, var(--cream) 0%, #FAF8DC 100%) }
.scene-meadow { background: linear-gradient(180deg, var(--cream) 0%, #F7F4D3 62%, #EFECC4 100%) }
.scene-landscape { background: linear-gradient(180deg, var(--cream) 0%, #F8F5D6 55%, #F2EEC6 100%) }

/* A bird is two arcs that flap around their inner edge, inside a bobbing wrap */
.bird { display: flex }
.bird i { display: block; border-top-style: solid; border-radius: 50% }
.bird i:first-child { transform-origin: right center; animation-name: flap-l }
.bird i:last-child { transform-origin: left center; animation-name: flap-r }
.bird i { animation-timing-function: ease-in-out; animation-iteration-count: infinite }

/* Shuffle — swaps the scene, per the user's mood */
.scene-shuffle {
  position: absolute; right: 12px; bottom: 10px; z-index: 3;
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px;
  border-radius: 100px; background: rgba(255, 254, 236, .72);
  border: 1px solid rgba(57, 57, 57, .12); color: var(--ink);
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  backdrop-filter: blur(3px); opacity: .55; transition: opacity .15s, background .15s;
}
.scene-shuffle:hover { opacity: 1; background: var(--cream) }
.scene-shuffle:active { transform: translateY(1px) }
.scene-shuffle .ic { transition: transform .4s ease }
.scene-shuffle:hover .ic { transform: rotate(180deg) }

/* Ambient decoration only — hold it still for anyone who asked for less motion */
@media (prefers-reduced-motion: reduce) {
  .auth-scene *, .loader-breathe, .loader-label { animation: none !important }
}

/* ── Home ───────────────────────────────────────────────────────────
   The main column scrolls on its own so the right rail can hold the full
   height of the plate and stay put while the list moves. */
.home { flex: 1; overflow: hidden; padding: 42px 62px; display: flex; justify-content: center }
.home-inner { display: flex; gap: 25px; max-width: 1145px; width: 100%; min-height: 0 }
.home-col { flex: 1; min-width: 0; overflow-y: auto; overflow-x: hidden; padding-right: 10px }
.home-hello { font-family: var(--display); font-size: 26px; font-weight: 500; margin-bottom: 14px }
.home-hello em { font-style: italic; font-weight: 600 }

.capture-row { display: flex; gap: 15px; margin-bottom: 22px }
.capture-tile {
  flex: 1; min-height: 122px; border-radius: var(--r-group); background: var(--cream);
  border: 2px solid var(--wheat); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; padding: 20px; text-align: center; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--ink); transition: all .18s; user-select: none;
}
.capture-tile:hover { border-color: var(--ink) }
.capture-tile.dashed { flex: 0 0 241px; border-style: dashed }
.capture-tile.dashed.drag { border-color: var(--play); background: var(--play-bg) }
.capture-tile .ic { opacity: .85 }

.section-title { font-family: var(--display); font-size: 20px; font-weight: 600; margin: 0 0 12px }

/* "For You" resource cards — server-driven. `media_url` becomes the card
   background (behind a scrim so the copy stays readable); rows without media
   fall back to a gradient plate. */
.feed { display: flex; flex-direction: column; gap: 14px }
.feed-card {
  position: relative; border-radius: var(--r-group); overflow: hidden; padding: 22px 24px 20px;
  min-height: 128px; display: flex; flex-direction: column; justify-content: flex-end;
  color: var(--cream); isolation: isolate;
}
.feed-card::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, #2f2f2f 0%, #4a4636 55%, #6b6448 100%);
}
.feed-card.alt::after { background: linear-gradient(105deg, #2b3330 0%, #3f4a44 55%, #5d6b5f 100%) }
.feed-card.has-media::after {
  background:
    linear-gradient(105deg, rgba(26, 26, 24, .92) 0%, rgba(38, 38, 32, .66) 52%, rgba(58, 56, 44, .34) 100%),
    var(--media) center / cover no-repeat;
}
.feed-card h3 { font-size: 24px; font-weight: 600; margin-bottom: 6px; color: var(--cream) }
.feed-card p { font-size: 12px; font-weight: 600; opacity: .82; max-width: 340px; line-height: 1.4 }
.feed-card .btn { margin-top: 14px; align-self: flex-start; padding: 6px 12px; font-size: 11px; gap: 8px }

/* Right rail — full height, fixed against the main column's scroll */
.rail { flex: 0 0 352px; display: flex; min-height: 0 }
.rail-card {
  flex: 1; background: var(--wheat); border-radius: var(--r-card); padding: 36px;
  text-align: center; display: flex; flex-direction: column; justify-content: center;
  overflow-y: auto;
}
.rail-illus { width: 171px; max-width: 100%; height: auto; margin: 0 auto 30px; display: block }
.rail-card h3 { font-size: 24px; font-weight: 600; margin-bottom: 12px }
.rail-card p { font-size: 14px; font-weight: 600; line-height: 1.35; margin-bottom: 28px }

/* Meeting rows */
.mrow {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer;
  background: var(--cream); border: 2px solid var(--wheat); border-radius: var(--r-group);
  margin-bottom: 8px; transition: border-color .15s;
}
.mrow:hover { border-color: var(--ink) }
.mrow-icon {
  width: 34px; height: 34px; border-radius: 9px; background: var(--wheat); color: var(--ink);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mrow-title { font-family: var(--display); font-size: 17px; font-weight: 600; line-height: 1.2 }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 100px;
  font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
}
.badge-green { background: var(--play-bg); color: #1F7D15 }
.badge-wheat { background: var(--wheat); color: var(--ink) }
.badge-red { background: var(--stop-bg); color: var(--stop) }
.badge-ai { background: linear-gradient(135deg, var(--ai-from), var(--ai-to)); color: #fff }

/* ── Pagination ─────────────────────────────────────────────────────*/
.pager { display: flex; align-items: center; gap: 6px; padding: 14px 0 2px; flex-wrap: wrap }
.pager-btn {
  min-width: 30px; height: 30px; padding: 0 9px; border-radius: var(--r-ctl);
  background: var(--cream); border: 1.5px solid var(--wheat); color: var(--ink);
  font-size: 12px; font-weight: 700; display: inline-flex; align-items: center;
  justify-content: center; gap: 6px;
}
.pager-btn:hover:not(:disabled) { border-color: var(--ink) }
.pager-btn.on { background: var(--ink); color: var(--cream); border-color: var(--ink) }
.pager-btn:disabled { opacity: .38; cursor: not-allowed }
.pager-gap { color: var(--muted); font-size: 12px; font-weight: 700; padding: 0 2px }
.pager-meta { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--muted) }

.empty { padding: 46px 20px; text-align: center; color: var(--muted) }
.empty-icon {
  width: 48px; height: 48px; border-radius: 14px; background: var(--wheat); color: var(--ink);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}

/* ── Calendar connect ───────────────────────────────────────────────
   From the Claude Design doc "Calendar Connect": prompt → provider →
   scope → syncing → connected → meetings. Reuses .modal-overlay. */

@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.985) } to { opacity: 1; transform: none } }
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }
@keyframes pulse-dot { 0%, 100% { opacity: .35; transform: scale(.8) } 50% { opacity: 1; transform: scale(1) } }
@keyframes sweep { 0% { transform: translateX(-100%) } 100% { transform: translateX(340%) } }

.cal-sheet {
  background: var(--cream); border-radius: 22px; padding: 32px; box-sizing: border-box;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .35); animation: pop-in .28s cubic-bezier(.2, .7, .3, 1);
  width: 460px; max-width: 100%; max-height: 90vh; overflow-y: auto;
}
.cal-sheet.narrow { width: 420px }
.cal-sheet.wide { width: 700px }
.cal-stack { display: flex; flex-direction: column; gap: 22px }
.cal-title { font-family: var(--display); font-weight: 600; font-size: 32px; line-height: 1.1; color: var(--ink) }
.cal-title.sm { font-size: 24px }
.cal-sub { font-size: 14px; font-weight: 600; line-height: 1.4; color: #5F5D44 }
.cal-fine { font-size: 12px; font-weight: 600; line-height: 1.45; color: #7D7B62 }
.cal-rule { height: 1px; background: #EDEBC6 }

/* Provider rows */
.cal-row {
  display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px;
  box-sizing: border-box; border-radius: var(--r-ctl); background: var(--cream);
  box-shadow: 0 0 0 2px #EDEBC6; cursor: pointer; width: 100%; text-align: left;
}
.cal-row:hover { box-shadow: 0 0 0 2px #C9C7A2 }
.cal-row.soon { cursor: not-allowed; opacity: .55; background: transparent }
.cal-row.soon:hover { box-shadow: 0 0 0 2px #EDEBC6 }
.cal-row span.grow { flex: 1; font-size: 14px; font-weight: 700; color: var(--ink) }
.cal-count { font-size: 12px; font-weight: 600; color: #7D7B62 }

/* The Microsoft mark is four squares — drawn, not fabricated as art */
.ms-mark { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5px; width: 15px; height: 15px; flex: 0 0 auto }
.ms-mark i { display: block; background: var(--ink) }

/* Switch */
.cal-switch {
  width: 38px; height: 22px; border-radius: 22px; flex: 0 0 auto; display: flex;
  align-items: center; padding: 2px; box-sizing: border-box;
  transition: background .18s; background: #DDDAA9; border: none;
}
.cal-switch.on { background: #7F8153 }
.cal-switch.dim { opacity: .55 }
.cal-switch i { width: 18px; height: 18px; border-radius: 50%; background: var(--cream); transition: transform .18s }
.cal-switch.on i { transform: translateX(16px) }
.cal-toggle-row {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px;
  cursor: pointer; background: transparent; box-shadow: 0 0 0 2px #EDEBC6; text-align: left; width: 100%;
}
.cal-toggle-row.on { background: var(--wheat) }
.cal-toggle-copy { display: flex; flex-direction: column; gap: 3px; flex: 1 }
.cal-toggle-copy b { font-size: 14px; font-weight: 700; color: var(--ink) }
.cal-toggle-copy span { font-size: 12px; font-weight: 600; line-height: 1.4; color: #7D7B62 }

.cal-cta {
  height: 36px; border-radius: var(--r-ctl); background: var(--ink); color: var(--cream);
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 14px; font-weight: 700; width: 100%; border: none;
}
.cal-cta:hover { background: #2B2B28 }

/* Syncing */
.cal-sync { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 14px 0; text-align: center }
.cal-bar { width: 260px; height: 6px; border-radius: 6px; background: #EFECC4; overflow: hidden; position: relative }
.cal-bar::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 30%;
  background: #8D8A5F; animation: sweep 1.5s ease-in-out infinite;
}

/* Failure — a connection that didn't happen or stopped working */
.cal-fail-mark {
  width: 54px; height: 54px; border-radius: 50%; background: var(--stop-bg); color: var(--stop);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1;
}
.cal-broken {
  display: flex; flex-direction: column; gap: 7px; padding: 18px; margin-top: 4px;
  border-radius: 16px; background: var(--cream); box-shadow: 0 0 0 2px #EDEBC6;
}
.cal-broken b { font-size: 14px; font-weight: 700; color: var(--ink) }
.cal-broken span { font-size: 12px; font-weight: 600; line-height: 1.45; color: #7D7B62 }
.cal-broken-actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap }

/* Connected */
.cal-done { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 10px 0; text-align: center }
.cal-done-mark {
  width: 54px; height: 54px; border-radius: 50%; background: var(--wheat);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.cal-done-mark::after {
  content: ''; width: 12px; height: 20px; border: solid #5F6B3D;
  border-width: 0 3px 3px 0; transform: rotate(40deg) translate(-2px, -2px);
}

/* ── Today agenda (right rail once connected) ───────────────────────*/
.rail-card.is-agenda {
  justify-content: flex-start; text-align: left; padding: 20px;
  animation: pop-in .4s cubic-bezier(.2, .7, .3, 1); overflow: hidden;
}
.agenda-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0 }
.agenda-head h3 { font-family: var(--ui); font-weight: 700; font-size: 24px; line-height: 1.1; color: #000 }
.agenda-src { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: #5F5D44 }
.agenda-src i { width: 7px; height: 7px; border-radius: 50%; background: #7F8153; animation: pulse-dot 2s ease-in-out infinite }
.agenda-summary { font-size: 13px; font-weight: 600; color: #6D6B52; margin: 10px 0 12px; flex-shrink: 0 }
.agenda-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; margin: 0 -4px; padding: 0 4px }
.agenda-slot { flex: 0 0 auto; display: flex; flex-direction: column }
.agenda-slot.conflict {
  gap: 6px; padding: 9px 8px 8px; border-radius: 18px;
  background: rgba(226, 208, 158, .32); box-shadow: 0 0 0 1.5px #E7DCB4;
}
.agenda-conflict-label {
  display: flex; align-items: center; gap: 7px; padding: 0 2px 2px;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8A6B2F;
}
.agenda-item {
  flex: 0 0 auto; display: flex; flex-direction: column; gap: 5px; padding: 13px 14px;
  border-radius: 16px; background: var(--cream); cursor: pointer; border: none;
  text-align: left; width: 100%;
}
.agenda-item:hover { box-shadow: 0 0 0 1.5px #DDDAA9 }
.agenda-item + .agenda-item { margin-top: 6px }
.agenda-when { display: flex; align-items: baseline; justify-content: space-between; gap: 10px }
.agenda-time { font-size: 13px; font-weight: 700; color: var(--ink) }
.agenda-title { font-family: var(--display); font-size: 20px; line-height: 1.15; color: #191919 }
.agenda-meta { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: #6D6B52 }
.agenda-where { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px }

.cal-pill {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 20px; white-space: nowrap;
}
.cal-pill.recording { background: #E4E7C4; color: #4F5A32 }
.cal-pill.ask { background: #EFE6C6; color: #6B5B2F }
.cal-pill.skipped { background: #E9E4D0; color: #8A7F5F }
.cal-pill.off { background: #E8E6D4; color: #7D7B62 }

/* ── Meeting detail sheet ───────────────────────────────────────────*/
.md-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px }
.md-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #7D7B62 }
.md-meta { font-size: 13px; font-weight: 600; color: #6D6B52 }
.md-close {
  width: 28px; height: 28px; border-radius: 50%; background: var(--wheat); color: #5F5D44;
  display: flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1;
  flex: 0 0 auto; border: none;
}
.md-close:hover { background: #EDEBC6; color: var(--ink) }
.md-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap }
.md-join {
  height: 36px; padding: 0 18px; border-radius: var(--r-ctl); background: var(--ink); color: var(--cream);
  display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700;
  text-decoration: none; border: none;
}
.md-join:hover { background: #2B2B28 }
.md-where {
  display: inline-flex; align-items: center; gap: 9px; height: 36px; padding: 0 14px;
  border-radius: var(--r-ctl); background: var(--wheat); font-size: 13px; font-weight: 700; color: var(--ink);
}
.md-notice {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 16px;
  background: #F6EFD6; box-shadow: 0 0 0 2px #E7DCB4;
}
.md-notice b { font-size: 13px; font-weight: 700; color: #6B5424 }
.md-notice span { font-size: 12px; font-weight: 600; line-height: 1.45; color: #7D6535 }
.md-people { display: flex; gap: 8px; flex-wrap: wrap }
.md-person { display: flex; align-items: center; gap: 8px; padding: 5px 11px 5px 5px; border-radius: 20px; background: var(--wheat) }
.md-person i {
  width: 22px; height: 22px; border-radius: 50%; background: #DDDAA9; display: flex;
  align-items: center; justify-content: center; font-size: 10px; font-weight: 700;
  color: #4B4A35; font-style: normal; flex: 0 0 auto;
}
.md-person span { font-size: 12px; font-weight: 600; color: var(--ink) }
.md-invite { border-radius: 16px; background: var(--wheat); padding: 16px; display: flex; flex-direction: column; gap: 9px }
.md-invite b { font-size: 13px; font-weight: 700; color: var(--ink) }
.md-invite div { font-size: 13px; font-weight: 600; line-height: 1.5; color: #5F5D44; white-space: pre-line }
.md-record {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px;
  background: var(--cream); box-shadow: 0 0 0 2px #EDEBC6;
}

/* ── Note view ──────────────────────────────────────────────────────*/
.note { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 42px 62px 30px }
.note-head { display: flex; align-items: flex-start; gap: 14px; flex-shrink: 0; margin-bottom: 20px }
.note-back { background: none; color: var(--muted); padding: 4px; display: flex; margin-top: 4px }
.note-back:hover { color: var(--ink) }
.note-title {
  font-family: var(--display); font-size: 26px; font-weight: 500; color: var(--muted);
  line-height: 1.1; border: none; background: none; padding: 0; width: 100%;
  max-width: 620px; letter-spacing: .01em;
}
.note-title.named { color: var(--ink) }
.note-title:focus { outline: none; border-bottom: 1px solid var(--wheat) }
.note-pills { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: center }

.note-body { flex: 1; display: flex; gap: 38px; overflow: hidden; min-height: 0 }
.panel-left {
  flex: 0 0 352px; background: var(--wheat); border-radius: var(--r-card);
  display: flex; flex-direction: column; overflow: hidden;
}
.panel-right {
  flex: 1; background: var(--wheat); border-radius: var(--r-card);
  overflow: hidden; display: flex; flex-direction: column; min-width: 0; position: relative;
}

/* Recorder (left panel, recording + stopped) */
.rec { padding: 30px 31px; display: flex; flex-direction: column; align-items: center; flex-shrink: 0 }
.timer { font-family: var(--display); font-size: 28px; font-weight: 500; letter-spacing: .01em; margin-bottom: 30px }
.timer.rolling { color: var(--ink) }

.wave-wrap { width: 100%; background: var(--cream); border-radius: 4px; position: relative; height: 162px; overflow: hidden }
.wave-wrap.clickable { cursor: pointer }
.wave-canvas { display: block; width: 100%; height: 100% }
.wave-head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--stop); pointer-events: none }
.ruler { width: 100%; height: 24px; margin-top: 5px; position: relative }
.ruler canvas { display: block; width: 100%; height: 100% }

.transport { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 34px }
.tbtn {
  width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; background: var(--pause-bg); color: var(--pause-fg); flex-shrink: 0;
}
.tbtn:hover { filter: brightness(.96) }
.tbtn-sm { width: 30px; height: 30px; background: transparent; color: var(--ink) }
.tbtn-sm:hover { background: rgba(57, 57, 57, .08); filter: none }
.tbtn-play { background: var(--play-bg); color: var(--play) }
.tbtn-stop { background: var(--stop-bg); color: var(--stop); position: relative }
.tbtn-stop.holding::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--stop); animation: holdRing .7s linear forwards;
}
@keyframes holdRing { from { transform: scale(1); opacity: .9 } to { transform: scale(1.28); opacity: 0 } }

.tooltip {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--cream); font-size: 10px; font-weight: 600;
  padding: 6px 8px; border-radius: 4px; width: 112px; text-align: left;
  line-height: 1.3; z-index: 5; pointer-events: none;
}
.tooltip::before {
  content: ''; position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-bottom: 5px solid var(--ink);
}

.mic-picker { margin-top: 30px; position: relative; display: flex; justify-content: center; width: 100% }
.mic-picker .pill { height: 24px; max-width: 100%; overflow: hidden }
.mic-picker .pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.mic-menu {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--cream); border: 2px solid var(--wheat); border-radius: var(--r-ctl);
  min-width: 240px; max-width: 300px; padding: 4px; z-index: 20; box-shadow: var(--shadow-lg);
}
.mic-menu button {
  display: block; width: 100%; text-align: left; padding: 7px 9px; border-radius: 3px;
  background: none; font-size: 12px; font-weight: 600; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.mic-menu button:hover, .mic-menu button.on { background: var(--wheat) }

/* Compact player (transcription phases) */
.rec-compact { padding: 20px 22px 14px; flex-shrink: 0 }
.rec-compact .wave-wrap { height: 30px; border-radius: 3px }
.rec-compact-row { display: flex; align-items: center; gap: 12px; margin-top: 14px }
.rec-compact .timer { font-size: 22px; margin: 0; flex: 1 }

/* Transcription list (left panel) */
.tx-head {
  display: flex; align-items: center; gap: 8px; padding: 4px 22px 10px;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.tx-list { flex: 1; overflow: auto; padding: 0 22px 22px; display: flex; flex-direction: column; gap: 10px }
.tx-card { background: var(--cream); border-radius: 9px; padding: 12px 14px; cursor: pointer; border: 1.5px solid transparent }
.tx-card:hover { border-color: var(--hairline) }
.tx-card.on { border-color: var(--ink) }
.tx-card-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px }
.tx-name { font-family: var(--display); font-size: 13px; font-weight: 600 }
.tx-time { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--muted) }
.tx-text { font-size: 12px; font-weight: 600; line-height: 1.5 }
.tx-rename { font-size: 12px; font-weight: 700; border: none; border-bottom: 1px solid var(--ink); background: none; width: 110px; padding: 0 }
.role-toggle { display: flex; gap: 4px; margin-top: 8px }
.role-btn {
  padding: 2px 8px; border-radius: 100px; font-size: 10px; font-weight: 700;
  background: transparent; border: 1.5px solid var(--wheat); color: var(--muted);
}
.role-btn.on { border-color: var(--ink); color: var(--ink); background: var(--wheat) }

/* Skeleton — same left-to-right sweep as the loader's shimmer bars */
.skel { display: flex; flex-direction: column; gap: 7px; padding: 0 22px 22px; overflow: hidden }
.skel-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px }
.skel-line {
  height: 9px; border-radius: 100px; background: var(--skel-track);
  position: relative; overflow: hidden;
}
.skel-line::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 34%;
  background: var(--skel-fill); animation: bar 1.8s ease-in-out infinite;
}

/* ── Notes panel (right) ────────────────────────────────────────────*/
.notes { flex: 1; overflow: auto; padding: 30px; display: flex; flex-direction: column; gap: 10px }
.nblock {
  display: flex; gap: 8px; background: var(--cream); border-radius: 9px;
  padding: 15px 15px 12px; position: relative;
}
.nblock.dragging { opacity: .4 }
.nblock.drop-before { box-shadow: 0 -2px 0 var(--ink) }
.nblock-handle {
  color: var(--muted); cursor: grab; margin-top: 1px; opacity: .45; transition: opacity .15s;
  background: none; padding: 0; display: flex; flex-shrink: 0;
}
.nblock:hover .nblock-handle { opacity: 1 }
.nblock-del {
  background: none; color: var(--muted); font-size: 15px; line-height: 1; padding: 0 2px;
  opacity: 0; transition: opacity .15s; border-radius: 3px;
}
.nblock:hover .nblock-del { opacity: 1 }
.nblock-del:hover { color: var(--stop) }

/* Bulleted-list mark for the format bar (no such glyph in the Figma icon set) */
.list-glyph { display: inline-flex; flex-direction: column; gap: 2px; width: 12px }
.list-glyph i {
  display: block; height: 1.5px; background: currentColor; border-radius: 1px;
  width: 100%; margin-left: 3px; position: relative;
}
.list-glyph i::before {
  content: ''; position: absolute; left: -3px; top: 0; width: 1.5px; height: 1.5px;
  background: currentColor; border-radius: 50%;
}
.nblock-main { flex: 1; min-width: 0 }
.nblock-text { font-size: 14px; font-weight: 600; line-height: 1.5; outline: none; word-break: break-word }
.nblock-text:empty::before { content: attr(data-ph); color: var(--muted) }
.nblock-text ul, .nblock-text ol { padding-left: 20px; margin: 4px 0 }
.nblock-text code { background: var(--wheat); border-radius: 3px; padding: 1px 4px; font-size: 12.5px }
.nblock-text img { max-width: 100%; border-radius: 6px; margin: 6px 0; display: block }
.nblock-foot { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 6px }
.nblock-time { font-size: 11px; font-weight: 600; color: var(--muted) }

.fmt-bar {
  position: fixed; z-index: 60; display: flex; gap: 5px; padding: 12px;
  background: var(--cream); border-radius: var(--r-group); box-shadow: var(--shadow-lg);
}
.fmt-btn {
  width: 22px; height: 22px; border-radius: var(--r-ctl); background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; font-family: var(--display);
}
.fmt-btn:hover { background: var(--wheat) }
.fmt-btn i { font-style: italic }
.fmt-btn s { text-decoration: line-through }

/* Floating action over the notes column */
.notes-float { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 10 }

/* ── Modals ─────────────────────────────────────────────────────────*/
.modal-overlay {
  position: fixed; inset: 0; background: rgba(24, 24, 24, .5); display: flex;
  align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(2px); padding: 24px;
}
.modal {
  background: var(--cream); border-radius: var(--r-card); box-shadow: var(--shadow-lg);
  width: 460px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
}
.modal-header {
  padding: 20px 22px 14px; display: flex; justify-content: space-between;
  align-items: center; flex-shrink: 0; gap: 12px;
}
.modal-header h3 { font-size: 20px }
.modal-body { padding: 0 22px 6px; flex: 1; overflow: auto }
.modal-footer { padding: 16px 22px 20px; display: flex; justify-content: flex-end; gap: 8px; flex-shrink: 0 }

.notice {
  font-size: 12px; font-weight: 600; color: var(--ink); background: var(--wheat);
  border-radius: var(--r-ctl); padding: 11px 14px; line-height: 1.6;
}

/* ── Tabs ───────────────────────────────────────────────────────────*/
.tabs { display: flex; gap: 18px; flex-shrink: 0 }
.tab {
  padding: 9px 0; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s; background: none;
}
.tab:hover { color: var(--ink) }
.tab.active { color: var(--ink); border-bottom-color: var(--ink) }

/* ── Action items (minutes) ─────────────────────────────────────────*/
.action-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--wheat) }
.action-item:last-child { border-bottom: none }
.action-check {
  width: 16px; height: 16px; border-radius: 4px; border: 2px solid var(--wheat); flex-shrink: 0;
  margin-top: 2px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s; background: var(--cream);
}
.action-check.checked { background: var(--play); border-color: var(--play); color: #fff }

/* ── Loading: the signal-wave mark ──────────────────────────────────
   From the Claude Design doc "Eavesdrop Loader" (Animated dialog box
   scenery). The logo's dot matrix fills left to right, then resets —
   one motion used for route loads, panels and busy CTAs alike. */

@keyframes signal {
  0%, 62%, 100% { opacity: .16; transform: translateX(0) scaleY(.82) }
  22% { opacity: 1; transform: translateX(6px) scaleY(1) }
}
@keyframes breathe { 0%, 100% { transform: scale(1) } 50% { transform: scale(1.03) } }
@keyframes fade-cycle { 0%, 100% { opacity: .55 } 50% { opacity: 1 } }
@keyframes bar { 0% { transform: translateX(-100%) } 100% { transform: translateX(320%) } }

.mark { display: block; flex-shrink: 0; overflow: visible }
.mark g { transform-box: fill-box; transform-origin: center }

/* Full-screen / route-change loader. `loader-page` is only for a page-root
   mount; without it the loader simply fills whatever box contains it. */
.loader-full {
  flex: 1; min-height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 26px; padding: 26px;
  box-sizing: border-box;
}
.loader-page { min-height: 100vh }
.loader-full.on-ink { background: var(--ink); color: var(--cream) }
.loader-breathe { animation: breathe 2.4s ease-in-out infinite }
.loader-label {
  font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  animation: fade-cycle 2.4s ease-in-out infinite;
}
.loader-full.on-ink .loader-label { color: #A9A78A }

/* Inline loader — panels, lists, table rows */
.loader-inline { display: flex; flex-direction: column; gap: 22px; padding: 26px }
.loader-inline-head { display: flex; align-items: center; gap: 14px; font-size: 15px; font-weight: 600 }

/* Shimmer bars (the doc's `bar` sweep) */
.shimmer { display: flex; flex-direction: column; gap: 10px }
.shimmer-bar {
  height: 12px; border-radius: 6px; background: var(--shimmer-track);
  overflow: hidden; position: relative;
}
.shimmer-bar::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 34%;
  background: var(--shimmer-fill); animation: bar 1.8s ease-in-out infinite;
  animation-delay: inherit;
}

/* ── Feedback ───────────────────────────────────────────────────────*/

@keyframes recPulse {
  0% { box-shadow: 0 0 0 0 rgba(183, 39, 32, .38) }
  70% { box-shadow: 0 0 0 12px rgba(183, 39, 32, 0) }
  100% { box-shadow: 0 0 0 0 rgba(183, 39, 32, 0) }
}
.rec-live { animation: recPulse 1.6s ease-out infinite }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
.fade-in { animation: fadeIn .2s ease-out }

/* ── Responsive ─────────────────────────────────────────────────────*/
@media (max-width: 1180px) {
  /* Too narrow for a fixed rail — hand scrolling back to the page. */
  .home { padding: 32px 28px; overflow: auto; display: block }
  .home-inner { flex-direction: column; max-width: 720px; margin: 0 auto }
  .home-col { overflow: visible; padding-right: 0 }
  .rail { flex: none; width: 100%; max-width: 420px; display: block; height: auto }
  .rail-card { display: block; overflow: visible }
  .note { padding: 28px 28px 22px }
  .note-body { gap: 22px }
  .panel-left { flex: 0 0 300px }
}
@media (max-width: 900px) {
  body { overflow: auto }
  .note-body { flex-direction: column; overflow: auto }
  .panel-left { flex: none }
  .capture-row { flex-direction: column }
  .capture-tile.dashed { flex: none }
}
