/* team.cardlio.app — the cardlio team library in the browser.
   Brand: indigo #4F46E5 → violet #8B5CF6 (as cardlio.app). Light and dark
   follow the system; motion respects prefers-reduced-motion. */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/space-grotesk-vf.woff2") format("woff2-variations");
}

:root {
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --indigo: #4F46E5;
  --violet: #8B5CF6;
  --grad: linear-gradient(135deg, #4F46E5, #8B5CF6);
  --bg: #f6f5fb;
  --bg-raised: #ffffff;
  --bg-sunken: #eeecf7;
  --ink: #17161f;
  --ink-2: #4b4d5c;
  --muted: #6b6e7f;
  --line: rgba(24, 20, 70, 0.09);
  --line-strong: rgba(24, 20, 70, 0.16);
  --accent: #4F46E5;
  --accent-ink: #ffffff;
  --accent-soft: rgba(79, 70, 229, 0.10);
  --ok: #15803d;
  --ok-soft: rgba(21, 128, 61, 0.10);
  --warn: #b45309;
  --danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(20, 16, 60, 0.06);
  --shadow: 0 1px 2px rgba(20, 16, 60, 0.05), 0 8px 24px rgba(20, 16, 60, 0.07);
  --shadow-lg: 0 24px 64px rgba(20, 16, 60, 0.22);
  --radius: 16px;
  --radius-sm: 10px;
  --hero-bg: #12101f;
  --bg-alt: var(--bg-sunken);
  --card-face: #fbfaff;
  --card-ink: #1c1d24;
  --card-sub: #5d6170;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111019;
    --bg-raised: #1b1a26;
    --bg-sunken: #16151f;
    --ink: #f1f0f7;
    --ink-2: #c9cad6;
    --muted: #9a9db0;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.15);
    --accent: #8b84ff;
    --accent-ink: #12101f;
    --accent-soft: rgba(139, 132, 255, 0.14);
    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, 0.12);
    --warn: #fbbf24;
    --danger: #f87171;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
    --card-face: #232134;
    --card-ink: #f1f0f7;
    --card-sub: #a3a6b8;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 12px max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35); }
.brand-mark i { width: 17px; height: 11px; background: #fff; border-radius: 3px; transform: rotate(-6deg); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand-name span { font-weight: 500; color: var(--muted); margin-left: 4px; }
.topbar .spacer { flex: 1; }
.who { color: var(--muted); font-size: 13px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--bg-raised);
  color: var(--ink-2); box-shadow: var(--shadow-sm);
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.spinning svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#apple-sign-out-button { min-height: 32px; }
/* Signed out, the bar sits on the dark welcome screen. */
body.signed-out .topbar { background: color-mix(in srgb, var(--hero-bg) 88%, transparent); border-bottom-color: rgba(255, 255, 255, 0.07); }
body.signed-out .brand { color: #f1f0f7; }
body.signed-out .brand-name span { color: #9ea3b5; }

/* ---------- signed out ---------- */
.welcome {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 57px);
  display: grid; place-items: center;
  padding: 48px 16px 64px;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(79, 70, 229, 0.42), transparent 60%),
    radial-gradient(800px 480px at 105% 110%, rgba(139, 92, 246, 0.34), transparent 60%),
    var(--hero-bg);
  color: #f1f0f7;
}
.welcome-inner { max-width: 1040px; width: 100%; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.welcome h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(38px, 6vw, 64px); line-height: 1.02; letter-spacing: -0.025em;
  text-wrap: balance;
}
.welcome h1 .grad { background: linear-gradient(90deg, #a9a4ff, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.welcome .lead { margin-top: 18px; font-size: 18px; color: #c3c5d6; max-width: 34em; text-wrap: pretty; }
.signin-box { margin-top: 30px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.signin-box .fine { font-size: 13px; color: #9ea3b5; }
#apple-sign-in-button { min-height: 44px; }
.promises { margin-top: 34px; list-style: none; display: grid; gap: 12px; }
.promises li { display: flex; gap: 12px; align-items: flex-start; color: #c3c5d6; font-size: 15px; }
.promises svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: #a9a4ff; }
.promises b { color: #f1f0f7; font-weight: 600; }
.welcome-visual { position: relative; height: 420px; }
.demo-card {
  position: absolute; width: 300px; aspect-ratio: 1.75; border-radius: 14px;
  background: #fbfaff; color: #1c1d24; padding: 20px 22px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column; justify-content: space-between;
}
.demo-card .n { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.demo-card .t { font-size: 12px; color: #5d6170; }
.demo-card .c { font-size: 12px; color: #4F46E5; font-weight: 600; }
.demo-card .bar { height: 5px; width: 46px; border-radius: 3px; background: var(--grad); }
.demo-card.a { top: 30px; left: 10px; transform: rotate(-7deg); }
.demo-card.b { top: 165px; left: 150px; transform: rotate(4deg); background: #1f1d2e; color: #f1f0f7; }
.demo-card.b .t { color: #a3a6b8; } .demo-card.b .c { color: #b4aefc; }
.demo-card.c { top: 290px; left: 20px; transform: rotate(-2deg); }
.demo-pill {
  position: absolute; z-index: 2; top: 128px; right: -6px;
  background: #2a2740; border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  color: #f1f0f7; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
}
.demo-pill.two { top: 400px; right: 10px; }
.demo-pill .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; margin-right: 7px; }
@media (max-width: 860px) {
  .welcome-inner { grid-template-columns: 1fr; gap: 20px; }
  .welcome-visual { display: none; }
}

/* ---------- signed in: layout ---------- */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: calc(100vh - 57px); }
.sidebar { border-right: 1px solid var(--line); padding: 20px 12px; position: sticky; top: 57px; height: calc(100vh - 57px); overflow-y: auto; }
.side-title { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 0 10px 8px; }
.team-nav { list-style: none; display: grid; gap: 2px; }
.team-nav button {
  width: 100%; text-align: left; border: 0; background: transparent;
  padding: 9px 10px; border-radius: 10px; display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center;
}
.team-nav button:hover { background: var(--bg-sunken); }
.team-nav button[aria-current="true"] { background: var(--accent-soft); }
.team-nav .avatar { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: var(--grad); }
.team-nav .t-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-nav .t-sub { font-size: 12px; color: var(--muted); }
.team-nav .t-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.side-note { margin-top: 18px; padding: 12px; border-radius: 12px; background: var(--bg-sunken); color: var(--muted); font-size: 12.5px; }
.team-select { display: none; }
.join-side { width: 100%; margin-top: 14px; }
.invite-banner { margin-top: 22px; padding: 12px 14px; border-radius: 12px; background: rgba(139, 132, 255, 0.16); border: 1px solid rgba(169, 164, 255, 0.35); color: #e4e2ff; font-size: 15px; max-width: 34em; }
.join-preview { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--accent-soft); }
.join-preview .avatar { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--grad); flex: none; }
.join-preview b { display: block; overflow-wrap: anywhere; }
.join-preview small { color: var(--muted); }
.join-error { color: var(--danger); font-size: 14px; }

.main { padding: 26px 32px 64px; max-width: 1280px; width: 100%; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .team-select { display: flex; gap: 8px; margin-bottom: 16px; }
  .team-select label { flex: 1; min-width: 0; }
  .team-select select { width: 100%; }
  .main { padding: 18px 16px 56px; }
}

/* team header */
.team-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.team-head h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 4vw, 34px); letter-spacing: -0.02em; line-height: 1.1; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.plain { background: var(--bg-sunken); color: var(--muted); }
.team-sub { margin-top: 6px; color: var(--muted); font-size: 14px; }

.stats { margin-top: 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }
.stat .v { margin-top: 2px; font-family: var(--font-display); font-weight: 700; font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.stat .v.small { font-size: 16px; line-height: 1.35; margin-top: 6px; font-family: var(--font-body); font-weight: 600; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* toolbar */
.toolbar { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { position: relative; flex: 1 1 260px; min-width: 0; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 40px; padding: 0 12px 0 38px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--bg-raised); box-shadow: var(--shadow-sm);
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--bg-sunken); border: 1px solid var(--line); }
.segmented button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.segmented button[aria-pressed="true"] { background: var(--bg-raised); color: var(--ink); box-shadow: var(--shadow-sm); }
.select {
  height: 40px; padding: 0 30px 0 12px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--bg-raised) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236b6e7f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 9px center / 16px;
  appearance: none; -webkit-appearance: none; font-size: 14px; max-width: 100%;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--bg-raised); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-sm); white-space: nowrap; text-decoration: none; color: var(--ink);
}
.btn:hover { border-color: var(--accent); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(79, 70, 229, 0.32); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { background: var(--danger); border-color: transparent; color: #fff; }
.btn.danger:hover { filter: brightness(1.06); border-color: transparent; }
.btn[disabled] { opacity: 0.55; cursor: default; }
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px;
  background: var(--bg-raised); border: 1px solid var(--line-strong); border-radius: 14px; padding: 6px; box-shadow: var(--shadow-lg);
}
.menu button { width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 10px; border-radius: 9px; display: flex; flex-direction: column; }
.menu button:hover, .menu button:focus-visible { background: var(--bg-sunken); }
.menu button small { color: var(--muted); font-size: 12px; }
.chips { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-strong); background: var(--bg-raised); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.result-line { margin-top: 16px; color: var(--muted); font-size: 13px; }

/* card grid */
.grid { margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; list-style: none; }
.tile {
  position: relative; display: flex; flex-direction: column; text-align: left; width: 100%;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); padding: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.tile:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow), 0 14px 34px rgba(20, 16, 60, 0.12); }
.tile .ph { aspect-ratio: 1.75; background: var(--bg-sunken); display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.tile .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .ph .initials { font-family: var(--font-display); font-weight: 700; font-size: 34px; color: var(--muted); }
.tile .tb { padding: 12px 14px 14px; display: grid; gap: 2px; min-width: 0; }
.tile .nm { font-weight: 650; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .co, .tile .ln { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .foot { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.status { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.status.open { background: var(--accent-soft); color: var(--accent); }
.status.taken { background: var(--ok-soft); color: var(--ok); }
.tile.skeleton { pointer-events: none; }
.tile.skeleton .ph, .tile.skeleton .bar { background: linear-gradient(90deg, var(--bg-sunken), var(--line), var(--bg-sunken)); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.tile.skeleton .bar { height: 11px; border-radius: 6px; margin: 4px 0; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.empty { margin-top: 28px; text-align: center; padding: 48px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }
.empty h2 { font-family: var(--font-display); color: var(--ink); font-size: 22px; margin-bottom: 6px; }
.empty p { max-width: 460px; margin: 0 auto; }

/* ---------- detail dialog ---------- */
dialog {
  border: 0; padding: 0; background: var(--bg-raised); color: var(--ink);
  border-radius: 22px; box-shadow: var(--shadow-lg);
  width: min(940px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  margin: auto; /* the global margin reset would pin it to the top left */
}
dialog::backdrop { background: rgba(10, 8, 25, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.detail { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 0; max-height: calc(100vh - 48px); }
.detail .photo { background: var(--bg-sunken); display: grid; place-items: center; padding: 24px; min-height: 260px; }
.detail .photo img { max-height: calc(100vh - 140px); border-radius: 12px; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18); }
.detail .photo .noimg { color: var(--muted); }
.detail .info { padding: 26px 26px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.detail .close { position: absolute; top: 12px; right: 12px; }
.detail h2 { font-family: var(--font-display); font-size: 26px; line-height: 1.15; letter-spacing: -0.015em; padding-right: 40px; overflow-wrap: anywhere; }
.detail .role { color: var(--ink-2); margin-top: 4px; overflow-wrap: anywhere; }
.fields { display: grid; gap: 2px; }
.field { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 8px 8px; border-radius: 10px; }
.field:hover { background: var(--bg-sunken); }
.field svg { width: 18px; height: 18px; color: var(--muted); margin-top: 2px; }
.field .fv { overflow-wrap: anywhere; min-width: 0; }
.field .fv a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.field .fv a:hover { color: var(--accent); border-color: var(--accent); }
.field .fl { font-size: 11.5px; color: var(--muted); }
.copy { opacity: 0; border: 0; background: transparent; color: var(--muted); padding: 3px; border-radius: 6px; }
.field:hover .copy, .copy:focus-visible { opacity: 1; }
.copy svg { width: 16px; height: 16px; margin: 0; }
@media (hover: none) { .copy { opacity: 1; } }
.provenance { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.notes { font-size: 14px; color: var(--ink-2); white-space: pre-wrap; background: var(--bg-sunken); border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.claimed-note { display: flex; gap: 8px; align-items: center; color: var(--ok); font-weight: 600; font-size: 14px; }
.claimed-note svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
  #detail { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
  .detail { grid-template-columns: 1fr; max-height: 100dvh; overflow-y: auto; }
  .detail .photo { padding: 16px; min-height: 0; }
  .detail .photo img { max-height: 42vh; }
  .detail .info { overflow: visible; padding: 20px 16px 28px; }
}

/* small dialogs */
.small-dialog { width: min(440px, calc(100vw - 32px)); height: auto; border-radius: 20px; margin: auto; }
.small-dialog form { padding: 24px; display: grid; gap: 14px; }
.small-dialog h2 { font-family: var(--font-display); font-size: 21px; }
.small-dialog p { color: var(--ink-2); }
.small-dialog label { font-size: 13px; font-weight: 600; color: var(--muted); display: grid; gap: 6px; }
.small-dialog input { height: 42px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--bg); }
.small-dialog input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.small-dialog .row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: #1f1d2e; color: #f1f0f7; padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 100; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }

.alert { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); font-size: 14px; }
.foot-note { margin-top: 42px; color: var(--muted); font-size: 12.5px; }
.foot-note a { color: var(--muted); }

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

/* ---- 2026-09-19: claim all, new-cards pill, release, copy link ---- */
.new-pill {
  position: sticky; top: 8px; z-index: 5; margin: 14px auto 0; display: block;
  background: var(--grad); color: #fff; border: 0; border-radius: 999px; padding: 8px 16px;
  font-weight: 700; font-size: 13.5px; box-shadow: 0 6px 18px rgba(79, 70, 229, 0.32); cursor: pointer;
}
.new-pill:hover { filter: brightness(1.06); }
.btn.quiet { color: var(--muted); }
.claimed-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---- 2026-09-19: add/edit, ZIP, dashboard, keyboard, duplicates ---- */
.form-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid input, .form-grid textarea, .form-grid select {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--bg-raised); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 8px 10px; width: 100%; box-sizing: border-box;
}
.form-grid input:focus, .form-grid textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.stat .v.people { font-size: 14px; line-height: 1.4; font-family: var(--font-body); font-weight: 600; margin-top: 6px; }
.stat .v.people span { display: inline-block; margin-right: 10px; white-space: nowrap; }
.stat .v.people b { color: var(--accent); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 34px; margin-top: 8px; }
.bars i { flex: 1; background: var(--accent); opacity: 0.85; border-radius: 3px 3px 0 0; min-height: 2px; }
.bars i.zero { background: var(--line-strong); opacity: 1; }
.stat .days { font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; margin-top: 3px; }
.status.dupe { background: #fff3d6; color: #8a5a00; }
@media (prefers-color-scheme: dark) { .status.dupe { background: #3a2c08; color: #f2c66d; } }
.dupe-note { font-size: 13.5px; color: var(--ink-2); background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; }
.dupe-note button { font: inherit; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- 2026-09-19: vCard drop / import ---- */
.drop-hint { position: fixed; inset: 0; z-index: 60; background: rgba(79, 70, 229, 0.12); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); display: grid; place-items: center; pointer-events: none; }
.drop-hint > div { background: var(--bg-raised); border: 2px dashed var(--accent); border-radius: 20px; padding: 28px 36px; display: grid; justify-items: center; gap: 8px; color: var(--ink); font-size: 15px; box-shadow: var(--shadow-lg); }
.drop-hint svg { width: 34px; height: 34px; color: var(--accent); }
.drop-hint span { color: var(--muted); font-size: 13.5px; }
.import-list { list-style: none; margin: 0; padding: 0; max-height: 40vh; overflow: auto; display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 12px; }
.import-list li { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.import-list li:last-child { border-bottom: 0; }
.import-list .ph { width: 40px; height: 26px; border-radius: 4px; background: var(--bg-alt); object-fit: cover; flex: none; display: grid; place-items: center; font-size: 10px; color: var(--muted); }
.import-list img.ph { object-fit: cover; }
.import-list .who { flex: 1; min-width: 0; }
.import-list .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-list .who span { color: var(--muted); font-size: 12.5px; }
.import-list .status.dupe { flex: none; }

/* ---- 2026-09-20: team notes ---- */
.team-notes { display: grid; gap: 6px; }
.team-notes label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.team-notes label span { font-weight: 500; color: var(--muted); }
.team-notes textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg-alt); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 10px; width: 100%; box-sizing: border-box; resize: vertical; }
.team-notes textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.team-notes .row { display: flex; justify-content: flex-end; }
.tile .note { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 5px; align-items: center; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .note svg { width: 13px; height: 13px; flex: none; color: var(--accent); }

/* ================= 2026-09-20: the professional pass (1–7) ================= */

/* 1. Card-shaped tiles: a card without a photo is typeset AS a card. */
.tile .ph.cardface {
  background: var(--card-face); color: var(--card-ink); border-bottom: 0;
  display: flex; flex-direction: column; justify-content: space-between; align-items: stretch;
  padding: 14px 16px; position: relative;
}
.tile .ph.cardface::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(160deg, rgba(255,255,255,0.18), transparent 45%); }
.cardface .n { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.15; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cardface .t { font-size: 11.5px; color: var(--card-sub); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cardface .c { font-size: 11.5px; font-weight: 600; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cardface .bar { height: 4px; width: 42px; border-radius: 2px; background: var(--grad); margin-top: 6px; }
.tile .ph img { transition: transform 0.35s ease; }
.tile:hover .ph img { transform: scale(1.03); }

/* 2. Team hero with the people on it. */
.team-hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 22px 24px 20px;
  background:
    radial-gradient(520px 220px at 0% 0%, rgba(79, 70, 229, 0.20), transparent 60%),
    radial-gradient(420px 220px at 100% 100%, rgba(139, 92, 246, 0.18), transparent 60%),
    var(--bg-raised);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.team-hero .team-head { align-items: center; }
.people { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.people .avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; border: 2px solid var(--bg-raised);
  margin-left: -8px; box-shadow: var(--shadow-sm);
}
.people .avatar:first-child { margin-left: 0; }
.people .more { margin-left: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.people .none { font-size: 12.5px; color: var(--muted); }

/* 3. Lightbox. */
.detail .photo img { cursor: zoom-in; }
.lightbox { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; background: rgba(8, 7, 18, 0.96); display: grid; place-items: center; }
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: 94vw; max-height: 86dvh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); transition: transform 0.25s ease; cursor: zoom-in; object-fit: contain; }
.lightbox img.zoomed { max-width: none; max-height: none; width: 170vw; cursor: zoom-out; }
.lightbox.scroll { overflow: auto; place-items: start center; }
.lightbox .lb-bar { position: fixed; top: 14px; right: 14px; display: flex; gap: 8px; }
.lightbox .icon-btn { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.18); color: #fff; }

/* 4. Motion and states. */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.grid > li { animation: rise 0.32s ease both; animation-delay: calc(var(--i, 0) * 28ms); }
dialog[open] { animation: dialog-in 0.22s ease; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }
.empty .art { position: relative; height: 84px; width: 150px; margin: 0 auto 16px; }
.empty .art i {
  position: absolute; left: 50%; width: 116px; height: 68px; border-radius: 9px; background: var(--card-face); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
}
.empty .art i::before { content: ""; position: absolute; left: 12px; top: 14px; width: 44px; height: 7px; border-radius: 4px; background: var(--grad); }
.empty .art i::after { content: ""; position: absolute; left: 12px; top: 30px; width: 70px; height: 5px; border-radius: 3px; background: var(--line-strong); box-shadow: 0 11px 0 var(--line-strong); }
.empty .art i:nth-child(1) { transform: translate(-50%, 0) rotate(-9deg); top: 10px; opacity: 0.7; }
.empty .art i:nth-child(2) { transform: translate(-50%, 0) rotate(5deg); top: 6px; opacity: 0.85; }
.empty .art i:nth-child(3) { transform: translate(-50%, 0) rotate(-1deg); top: 2px; }
.empty { border-style: solid; background: var(--bg-raised); }

/* 5. List view. */
.view-toggle button { padding: 6px 9px; display: inline-grid; place-items: center; }
.view-toggle svg { width: 17px; height: 17px; }
.list-wrap { margin-top: 10px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow); }
.list { width: 100%; border-collapse: collapse; font-size: 14px; }
.list th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--bg-raised); position: sticky; top: 0; }
.list th button { border: 0; background: none; font: inherit; color: inherit; padding: 0; cursor: pointer; }
.list th button[aria-sort] { color: var(--accent); }
.list td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr { cursor: pointer; }
.list tbody tr:hover { background: var(--bg-sunken); }
.list tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.list .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.list .who .thumb { width: 42px; height: 26px; border-radius: 4px; object-fit: cover; flex: none; background: var(--card-face); border: 1px solid var(--line); }
.list .who .thumb.face { display: grid; place-items: center; font-size: 9px; font-weight: 700; color: var(--accent); }
.list .who b { overflow: hidden; text-overflow: ellipsis; }
.list .who small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }

/* 6. Dark-mode pass. */
@media (prefers-color-scheme: dark) {
  .tile { border-color: rgba(255,255,255,0.09); }
  .tile:hover { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); }
  .detail .photo { background: #0f0e17; }
  .team-hero { background: radial-gradient(520px 220px at 0% 0%, rgba(139,132,255,0.16), transparent 60%), radial-gradient(420px 220px at 100% 100%, rgba(139,92,246,0.14), transparent 60%), var(--bg-raised); }
  .list th { background: var(--bg-raised); }
  .search input, .select, .btn, .small-dialog input, .form-grid input, .form-grid textarea, .team-notes textarea { background: #1f1e2b; }
  .btn.primary { background: var(--grad); }
  .new-pill, .demo-pill { color: #fff; }
}

/* 7. Phone: a bottom action bar. */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg-raised) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-top: 1px solid var(--line);
}
.mobile-bar button { display: grid; justify-items: center; gap: 3px; border: 0; background: transparent; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 4px; border-radius: 10px; }
.mobile-bar button svg { width: 22px; height: 22px; color: var(--accent); }
.mobile-bar button:active { background: var(--bg-sunken); }
@media (min-width: 701px) { .mobile-bar { display: none !important; } }
@media (max-width: 700px) {
  body.signed-in-view .main { padding-bottom: 96px; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .team-hero { padding: 18px 16px 16px; }
  .people .avatar { width: 28px; height: 28px; font-size: 11px; }
  #claim-all, #add-card { display: none; }   /* on the bottom bar instead */
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .tile .foot { flex-wrap: wrap; row-gap: 6px; }
  .list td { max-width: 180px; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
}

/* ================= 2026-09-20: 9 print sheet · 12 multi-select · 13 filters ================= */

/* 12. Multi-select */
.grid > li { position: relative; }
.pick {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.9); background: rgba(20, 16, 60, 0.35); color: #fff;
  display: grid; place-items: center; padding: 0; box-shadow: var(--shadow-sm); opacity: 0; transition: opacity 0.15s ease, background 0.15s ease;
}
.pick svg { width: 15px; height: 15px; }
.grid > li:hover .pick, .grid > li:focus-within .pick, .pick[aria-pressed="true"] { opacity: 1; }
.pick[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
@media (hover: none) { .pick { opacity: 1; } }
.grid > li.picked .tile { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.list td.pick-cell, .list th.pick-cell { width: 34px; padding-right: 0; }
.list input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.list tbody tr.picked { background: var(--accent-soft); }
.sel-hint { margin-top: 14px; }
.sel-bar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 26;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: min(96vw, 900px);
  padding: 10px 14px; border-radius: 16px; background: var(--bg-raised); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
  animation: rise 0.22s ease both;
}
.sel-bar b { font-size: 14px; white-space: nowrap; }
.sel-bar .link { border: 0; background: none; color: var(--accent); font: inherit; font-size: 13.5px; font-weight: 600; padding: 4px 6px; cursor: pointer; border-radius: 8px; }
.sel-bar .link:hover { background: var(--accent-soft); }
.sel-bar .spacer { flex: 1; min-width: 8px; }
.sel-bar .btn { padding: 7px 12px; }
@media (max-width: 700px) {
  .sel-bar { left: 8px; right: 8px; transform: none; max-width: none; bottom: calc(78px + env(safe-area-inset-bottom)); padding: 8px 10px; }
  .sel-bar .spacer { display: none; }
  .sel-bar .btn { padding: 7px 10px; font-size: 13px; }
}

/* 9. Print sheet */
.print-sheet { display: none; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; color: #000; }
  body > *:not(.print-sheet) { display: none !important; }
  .print-sheet { display: block; font: 10.5pt/1.35 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; color: #000; }
  .print-sheet h1 { font: 700 20pt/1.1 var(--font-display), Helvetica, Arial, sans-serif; margin: 0 0 2mm; }
  .print-sheet .meta { color: #444; margin: 0 0 6mm; font-size: 10pt; }
  .print-sheet table { width: 100%; border-collapse: collapse; page-break-inside: auto; }
  .print-sheet tr { page-break-inside: avoid; }
  .print-sheet th { text-align: left; font-size: 8.5pt; text-transform: uppercase; letter-spacing: 0.04em; color: #444; border-bottom: 1.5pt solid #000; padding: 0 2mm 1.5mm 0; }
  .print-sheet td { vertical-align: top; padding: 2mm 2mm 2mm 0; border-bottom: 0.5pt solid #bbb; }
  .print-sheet td b { display: block; }
  .print-sheet td small { color: #444; }
  .print-sheet .tick { width: 6mm; }
  .print-sheet .tick i { display: inline-block; width: 4mm; height: 4mm; border: 0.6pt solid #000; border-radius: 1mm; }
  .print-sheet .note { white-space: pre-wrap; }
  .print-sheet .claimed { font-weight: 700; }
  .print-sheet .foot { margin-top: 6mm; font-size: 8.5pt; color: #666; }
}

/* ================= 2026-09-21: read a card photo with your own Claude / Gemini key ================= */
.btn.icon-only { padding: 8px 9px; }
.btn.icon-only svg { margin: 0; }
#k-provider { margin: 4px 0 12px; }
.small-dialog label.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.small-dialog label.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.scan-dialog { text-align: center; }
.scan-dialog img { display: block; max-width: 100%; max-height: 220px; margin: 0 auto 12px; border-radius: 10px; box-shadow: var(--shadow); object-fit: contain; }
.scan-dialog p { margin: 0 0 12px; font-weight: 600; }
.scan-dialog p::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 8px; vertical-align: -2px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scan-strip { display: flex; gap: 12px; align-items: center; margin: 0 0 12px; padding: 10px; border-radius: 12px; background: var(--bg-sunken); border: 1px solid var(--line); }
.scan-strip img { width: 120px; height: 76px; object-fit: cover; border-radius: 8px; flex: none; background: var(--card-face); }
.scan-strip div { display: grid; gap: 2px; min-width: 0; font-size: 13px; color: var(--muted); }
.scan-strip b { color: var(--ink); font-size: 13.5px; }
.scan-strip .link { border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; padding: 0; cursor: pointer; justify-self: start; }
@media (max-width: 700px) { #scan-photo { display: none; } }

/* The filter group on a phone: no wrapping inside a segment, scroll the row instead. */
@media (max-width: 700px) {
  #filter-group { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #filter-group button { white-space: nowrap; }
}

.toast .toast-copy { margin-left: 10px; border: 1px solid rgba(255,255,255,0.6); background: rgba(255,255,255,0.15); color: #fff; border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }

/* ================= 2026-10-02: lead rating + interests (the apps' 3.2 fields) ================= */
:root { --hot: #d6411c; --hot-soft: #fde6df; --warm: #b7791f; --warm-soft: #fbf0d6; --cold: #2b6cb0; --cold-soft: #e1edfa; }
@media (prefers-color-scheme: dark) { :root { --hot: #ff8a65; --hot-soft: #45211a; --warm: #f0c060; --warm-soft: #3d3118; --cold: #82b4f0; --cold-soft: #1b2c44; } }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 3px 8px 3px 6px; border-radius: 999px; white-space: nowrap; }
.rating svg { width: 14px; height: 14px; flex: none; }
.rating.hot { color: var(--hot); background: var(--hot-soft); }
.rating.warm { color: var(--warm); background: var(--warm-soft); }
.rating.cold { color: var(--cold); background: var(--cold-soft); }
.tile .nm-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tile .nm-row .nm { min-width: 0; flex: 1; }
.tile .nm-row .rating { flex: none; }
.list .rating-cell small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.lead-box { margin-top: 14px; display: grid; gap: 8px; }
.lead-label { font-size: 13px; font-weight: 700; }
.lead-label span { font-weight: 400; color: var(--muted); margin-left: 6px; }
.lead-rate { display: flex; gap: 8px; flex-wrap: wrap; }
.lead-rate .rate { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-raised); font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.lead-rate .rate svg { width: 16px; height: 16px; }
.lead-rate .rate.hot[aria-pressed="true"] { color: var(--hot); background: var(--hot-soft); border-color: var(--hot); }
.lead-rate .rate.warm[aria-pressed="true"] { color: var(--warm); background: var(--warm-soft); border-color: var(--warm); }
.lead-rate .rate.cold[aria-pressed="true"] { color: var(--cold); background: var(--cold-soft); border-color: var(--cold); }
.lead-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.lead-tags:empty { display: none; }
.lead-tags .tag { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.lead-tags .tag button { border: 0; background: none; color: inherit; font-size: 15px; line-height: 1; padding: 0 5px; cursor: pointer; border-radius: 50%; }
.lead-tags .tag button:hover { background: rgba(0,0,0,0.08); }
.lead-box input { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg-alt); border: 1px solid var(--line-strong); border-radius: 10px; padding: 7px 10px; width: 100%; box-sizing: border-box; }
@media (max-width: 700px) { #rating-group { max-width: 100%; overflow-x: auto; } #rating-group button { white-space: nowrap; } }
@media print { .print-sheet td small { display: block; } }

/* "My cards" — the person's own library (read only). Team-only controls
   go away; downloads wait for the unlock marker (body.locked). */
body.mine .team-only { display: none !important; }
body:not(.mine) .mine-only { display: none !important; }
#mine-side .team-nav { margin-bottom: 14px; }
.status.owed { background: var(--accent-soft); color: var(--accent); }
.status.due { background: #fff3d6; color: #8a5a00; }
.inline-edit { display: flex; gap: 8px; }
.inline-edit input { flex: 1; min-width: 0; font: inherit; font-size: 14px; color: var(--ink); background: var(--bg-alt); border: 1px solid var(--line-strong); border-radius: 10px; padding: 7px 10px; }
.inline-edit input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.mine-follow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
@media (prefers-color-scheme: dark) { .inline-edit input { background: #1f1e2b; } }

/* ================= 2026-10-06: direction B — the card wall =================
   A calm, neutral page: the cards are the colour. Cards are shown whole on a
   grey stage (never cropped, never blown up), one toolbar row with a Filters
   panel, teams as tabs, the account in a small menu. Overrides the rules above. */
:root {
  --bg: #FBFBFA; --bg-raised: #FFFFFF; --bg-sunken: #F0F1F4; --bg-alt: #F4F5F7; --stage: #EFF0F2;
  --ink: #16181D; --ink-2: #3B404C; --muted: #5B6170;
  --line: #E6E7EB; --line-strong: #D5D8DF;
  --accent: #4F46E5; --accent-soft: #EEEDFD; --accent-ink: #FFFFFF;
  --primary-bg: #16181D; --primary-ink: #FFFFFF;
  --shadow-sm: none; --shadow: none;
  --card-shadow: 0 8px 18px rgba(22, 24, 29, 0.14), 0 1px 3px rgba(22, 24, 29, 0.10);
  --card-face: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121317; --bg-raised: #1A1B21; --bg-sunken: #23242B; --bg-alt: #1F2027; --stage: #1F2027;
    --ink: #F1F1F4; --ink-2: #C9CAD3; --muted: #A0A3AF;
    --line: rgba(255, 255, 255, 0.08); --line-strong: rgba(255, 255, 255, 0.16);
    --accent: #A29CFF; --accent-soft: rgba(162, 156, 255, 0.15); --accent-ink: #121317;
    --primary-bg: #F1F1F4; --primary-ink: #121317;
    --card-shadow: 0 10px 22px rgba(0, 0, 0, 0.5);
    --card-face: #2A2B33;
  }
}

/* header */
.topbar { background: color-mix(in srgb, var(--bg) 88%, transparent); }
.brand-mark { background: var(--primary-bg); box-shadow: none; }
.brand-mark i { background: var(--primary-ink); }
body.signed-out .brand-mark { background: #FFFFFF; }
body.signed-out .brand-mark i { background: #16181D; }
#account { position: relative; }
.account-pop { width: 270px; padding: 14px; visibility: hidden; opacity: 0; transform: translateY(-4px); transition: opacity 0.15s ease, transform 0.15s ease; }
.account-pop.open { visibility: visible; opacity: 1; transform: none; }
.account-note { font-size: 13px; color: var(--muted); margin-bottom: 12px; }

/* places: My cards and the teams, as tabs under the header */
.app { display: block; min-height: 0; }
.sidebar {
  position: static; height: auto; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line);
  padding: 0 max(16px, calc((100% - 1280px) / 2 + 32px)); display: flex; align-items: center; gap: 2px; scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar .side-title, .sidebar .side-note { display: none; }
#mine-side { display: contents; }
#mine-nav { padding-right: 10px; margin-right: 10px; border-right: 1px solid var(--line); }
.team-nav { display: flex; gap: 2px; }
.team-nav li { flex: none; }
.team-nav button { display: flex; align-items: center; gap: 8px; padding: 13px 10px 11px; border-radius: 0; border-bottom: 2px solid transparent; background: transparent; }
.team-nav button:hover, .team-nav button[aria-current="true"] { background: transparent; }
.team-nav .avatar, .team-nav .t-sub { display: none; }
.team-nav .t-name { font-weight: 600; color: var(--muted); max-width: 220px; }
.team-nav button:hover .t-name { color: var(--ink); }
.team-nav button[aria-current="true"] { border-bottom-color: var(--ink); }
.team-nav button[aria-current="true"] .t-name { color: var(--ink); }
.team-nav .t-count { font-size: 12px; color: var(--muted); background: var(--bg-sunken); padding: 0 7px; border-radius: 9px; line-height: 18px; }
.join-side { width: auto; flex: none; margin: 0 0 0 10px; height: 32px; padding: 0 12px; font-size: 13.5px; }
.join-side svg { width: 15px; height: 15px; }
.main { max-width: 1280px; margin: 0 auto; padding: 30px 32px 64px; }
@media (max-width: 900px) {
  .sidebar { display: flex; padding: 0 12px; }
  .team-select { display: none; }
  .main { padding: 20px 16px 56px; }
}

/* title row */
.team-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.team-head h1 { font-size: clamp(30px, 4.6vw, 44px); letter-spacing: -0.03em; line-height: 1.05; }
.team-head h1 .badge { font-family: var(--font-body); letter-spacing: 0; font-size: 12px; vertical-align: 0.55em; margin-left: 2px; }
.team-sub { margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
.linkish:hover { text-decoration-color: currentColor; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.head-actions .people { margin-right: 6px; }
.stats { display: none; }

/* buttons and fields: flat, one ink-black primary */
.btn { border-radius: 10px; border-color: var(--line-strong); box-shadow: none; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--primary-bg); color: var(--primary-ink); border-color: transparent; box-shadow: none; }
.btn.primary:hover { filter: none; opacity: 0.88; }
.icon-btn { box-shadow: none; }
.icon-btn.round { width: 44px; height: 44px; border-radius: 22px; }
.select { border-radius: 10px; box-shadow: none; }
.menu { border-radius: 12px; border-color: var(--line); box-shadow: 0 16px 40px rgba(22, 24, 29, 0.16); }
.new-pill { background: var(--primary-bg); color: var(--primary-ink); box-shadow: 0 6px 18px rgba(22, 24, 29, 0.2); }

/* one toolbar row */
.toolbar { margin-top: 24px; padding: 8px; gap: 8px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 14px; }
.search input { border: 0; background: var(--bg-alt); box-shadow: none; border-radius: 10px; }
.search input:focus { box-shadow: 0 0 0 2px var(--accent); }
#filters-btn .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 12px; display: inline-grid; place-items: center; }
#filters-btn .count[hidden] { display: none; }
.filters-pop { left: auto; right: 0; width: min(560px, calc(100vw - 32px)); padding: 16px; display: grid; gap: 18px; }
@media (max-width: 700px) { .filters-pop { left: 0; right: auto; } }
.filters-pop .fgroup { display: grid; gap: 8px; justify-items: start; }
.flabel, .lead-label, .team-notes label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lead-label span, .team-notes label span { text-transform: none; letter-spacing: 0; font-weight: 400; }
.filters-pop .segmented { flex-wrap: wrap; max-width: 100%; }
.filters-pop .segmented button { width: auto; display: inline-block; padding: 6px 12px; text-align: center; }
.fselects { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; }
.fselects label { flex: 1 1 200px; }
.fselects .select { width: 100%; }
.active-filters { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.active-filters .lead-in { font-size: 13px; color: var(--muted); }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px 0 12px; border-radius: 15px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; }
.filter-chip .x { font-size: 16px; line-height: 1; }
.active-filters .linkish { font-size: 13px; }
.chips { margin-top: 12px; }
.chip { height: 30px; padding: 0 12px; border-color: var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-ink); }

/* the card wall */
.grid { margin-top: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 30px 24px; }
.group-head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; padding: 12px 0 8px; border-bottom: 1px solid var(--line); animation: none !important; }
.group-head:first-child { padding-top: 0; }
.group-head h2 { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.group-head span { color: var(--muted); font-size: 13px; }
.tile { background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.tile:hover { transform: none; border-color: transparent; box-shadow: none; }
.tile .ph, .tile .ph.cardface {
  aspect-ratio: 3 / 2; background: var(--stage); border: 0; border-radius: 12px; padding: 16px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative;
}
.tile .ph.cardface::after { content: none; }
.tile .ph img {
  width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 4px; box-shadow: var(--card-shadow); transition: transform 0.25s ease;
}
.tile:hover .ph img { transform: translateY(-3px); }
.face-card {
  width: 100%; aspect-ratio: 1.75; background: var(--card-face); color: var(--card-ink); border-radius: 4px;
  box-shadow: var(--card-shadow); padding: 12px 14px; display: flex; flex-direction: column; justify-content: space-between;
  text-align: left; transition: transform 0.25s ease; min-width: 0;
}
.tile:hover .face-card { transform: translateY(-3px); }
.tile .tb { padding: 12px 2px 0; background: transparent; }
.tile .nm { font-size: 15px; font-weight: 600; }
.tile .foot { margin-top: 6px; }
.grid > li.picked .tile { border-color: transparent; box-shadow: none; }
.grid > li.picked .ph { box-shadow: 0 0 0 3px var(--accent); }
.pick { top: 10px; right: 10px; }
.tile:focus-visible { outline: none; }
.tile:focus-visible .ph { box-shadow: 0 0 0 3px var(--accent); }
.list-wrap, .empty { border-color: var(--line); }

/* the opened card */
#detail { width: min(1120px, calc(100vw - 32px)); border-radius: 20px; }
.detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: min(780px, calc(100vh - 48px)); }
.detail > * { min-height: 0; }
.photo-col { background: var(--stage); display: flex; flex-direction: column; gap: 16px; padding: 40px 32px 20px; overflow: hidden; }
.face-card.big { width: min(100%, 440px); padding: 22px 26px; box-shadow: 0 18px 40px rgba(22, 24, 29, 0.22), 0 2px 6px rgba(22, 24, 29, 0.12); }
.face-card.big .n { font-size: 24px; }
.face-card.big .t, .face-card.big .c { font-size: 13px; }
.detail .photo { background: transparent; padding: 0; flex: 1; min-height: 240px; display: grid; place-items: center; }
.detail .photo img { max-height: calc(100vh - 230px); border-radius: 6px; box-shadow: 0 18px 40px rgba(22, 24, 29, 0.22), 0 2px 6px rgba(22, 24, 29, 0.12); }
.d-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.detail .info { padding: 32px 32px 26px; gap: 18px; }
.detail h2 { font-size: 30px; letter-spacing: -0.02em; }
.detail .role { font-size: 15px; }
.actions { margin-top: 0; padding-top: 0; }
.field { padding: 7px 8px; }
.provenance { margin-top: auto; }
@media (prefers-color-scheme: dark) { .detail .photo { background: transparent; } }
@media (max-width: 760px) {
  .detail { grid-template-columns: 1fr; height: 100dvh; }
  .photo-col { padding: 20px 16px 12px; overflow: visible; }
  .detail .photo { min-height: 0; }
  .detail .photo img { max-height: 36vh; }
}

/* phone */
@media (max-width: 700px) {
  #add-wrap { display: none !important; }   /* Scan and Add are on the bottom bar */
  .toolbar .search-wrap { flex-basis: 100%; }
  .toolbar > label:not(.search) { flex: 1 1 0; min-width: 0; }
  .toolbar > label:not(.search) .select { width: 100%; }
  #filters-btn { padding: 0 12px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 14px; }
  .tile .ph { padding: 10px; border-radius: 10px; }
}
@media (max-width: 420px) { .grid { grid-template-columns: 1fr 1fr; } }
.face-card .n { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.15; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.face-card .t { font-size: 11.5px; color: var(--card-sub); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.face-card .c { font-size: 11.5px; font-weight: 600; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.face-card .bar { height: 4px; width: 42px; border-radius: 2px; background: var(--accent); margin-top: 6px; }
.face-card.big .n { font-size: 24px; }
.face-card.big .t, .face-card.big .c { font-size: 13px; }

/* search suggestions: the apps' search tokens (Country: …, Company: …) */
.search-wrap { position: relative; flex: 1 1 260px; min-width: 0; }
.search-wrap .search { width: 100%; }
.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; max-height: 380px; overflow-y: auto;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 16px 40px rgba(22, 24, 29, 0.16);
}
.suggest .opt { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.suggest .opt:hover, .suggest .opt[aria-selected="true"] { background: var(--bg-sunken); }
.suggest .k { flex: none; width: 104px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.suggest .v { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .n { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ================= 2026-10-06: follow up from anywhere ================= */
.btn.small { height: 32px; padding: 0 10px; font-size: 13px; gap: 6px; border-radius: 8px; }
.btn.small svg { width: 15px; height: 15px; }
.today { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
.today-col { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 6px; }
.today-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.today-head h2 { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.today-head .n { color: var(--muted); font-size: 13px; }
.today-head .linkish { margin-left: auto; font-size: 13px; }
.today-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.today-row .av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; }
.today-row .who { flex: 1; min-width: 0; display: grid; }
.today-row .nm { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; text-align: left; color: var(--ink); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-row .nm:hover { color: var(--accent); }
.today-row .sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-row .btns, .follow-line .btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mine-follow { display: grid; gap: 10px; margin-top: 12px; }
.follow-line { display: grid; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--bg-alt); }
.follow-line .what { font-size: 13.5px; color: var(--ink-2); }
.follow-line .btns { justify-content: flex-start; }
.e-ai { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
#mail-dialog textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 11px; padding: 10px 12px; resize: vertical; }
#mail-dialog textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#mail-dialog .select { width: 100%; height: 42px; }
.r-when { display: flex; gap: 10px; }
.r-when label { flex: 1; }
#sel-rate { height: 34px; padding-top: 0; padding-bottom: 0; font-size: 13.5px; }
@media (max-width: 700px) {
  .today { grid-template-columns: 1fr; }
  .today-row { flex-wrap: wrap; }
  .today-row .btns { width: 100%; justify-content: flex-start; padding-left: 46px; }
}

/* ================= 2026-10-06: overview · event recap · share to team ================= */
.overview { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.ov-panel { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 6px; align-content: start; }
.ov-panel.wide { grid-column: 1 / -1; }
.ov-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.ov-head h2 { font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.ov-note, .ov-more, .ov-empty { color: var(--muted); font-size: 12.5px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr) 3.2em; align-items: center; gap: 10px; padding: 5px 6px; margin: 0 -6px; border: 0; background: none; border-radius: 8px; font: inherit; font-size: 13.5px; color: var(--ink); text-align: left; }
button.bar-row { cursor: pointer; }
button.bar-row:hover, button.bar-row:focus-visible { background: var(--bg-sunken); }
.bar-row .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .track { height: 8px; border-radius: 4px; background: var(--bg-sunken); overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.bar-row .val { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; height: 160px; }
.col { display: grid; grid-template-rows: auto 1fr auto; height: 100%; gap: 4px; justify-items: center; }
.col .cv { font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; min-height: 15px; }
.colbar { width: 100%; max-width: 34px; display: flex; align-items: flex-end; }
.colbar i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; }
.colbar i.zero { height: 2px !important; background: var(--line-strong); border-radius: 1px; }
.col .cm { font-size: 11px; color: var(--muted); }
.recap { margin-top: 14px; padding: 14px 16px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 14px; }
.recap-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.recap-head h2 { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.recap-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.recap-facts { list-style: none; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); font-size: 13.5px; }
.recap-facts li { position: relative; }
.recap-facts li + li::before { content: ""; position: absolute; left: -10px; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
#share-dialog .select { width: 100%; height: 42px; }
@media (max-width: 700px) {
  .overview { grid-template-columns: 1fr; }
  .cols { gap: 4px; height: 130px; }
  .col .cv { font-size: 10px; }
}

/* ================= 2026-10-06: more web-editable fields · company view ================= */
.kit { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.kit .select { height: 34px; font-size: 13.5px; font-weight: 500; }
.mine-details { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.mine-details > summary { cursor: pointer; padding: 12px 0; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); list-style-position: inside; }
.mine-details > summary span { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 6px; }
.mine-details[open] { padding-bottom: 14px; }
.mine-details .form-grid label { font-size: 12.5px; font-weight: 600; color: var(--muted); display: grid; gap: 4px; }
.mine-details .form-grid label small { font-weight: 400; }
.mine-details .fine { margin: 10px 0 6px; }
.mine-details .row { display: flex; justify-content: flex-end; }
.also-at { font-size: 13.5px; color: var(--ink-2); background: var(--bg-alt); border-radius: 10px; padding: 10px 12px; }
.also-at button { font: inherit; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; }
.also-at button:hover { text-decoration: underline; }

/* ------------------------------------------- map (2026-10-06) */
.map-view { margin-top: 10px; }
.map { height: min(70vh, 640px); min-height: 360px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-raised); box-shadow: var(--shadow); }
.map-note { margin-top: 8px; }
.map-view.problem .map-note { padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); }
.map-pick { margin-top: 10px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.map-pick h3 { margin: 0 0 6px; font-size: 14px; }
.map-pick ul { list-style: none; margin: 0; padding: 0; }
.map-pick-row { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 9px 4px; background: none; border: 0; border-top: 1px solid var(--line); color: inherit; font: inherit; cursor: pointer; }
.map-pick li:first-child .map-pick-row { border-top: 0; }
.map-pick-row span { color: var(--muted, inherit); font-size: 13px; }
@media (max-width: 640px) { .map { height: 62vh; min-height: 300px; } }

/* ------------------- trip planner, meeting brief, QR (2026-10-06) */
.map-bar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.brief-dialog { width: min(560px, calc(100vw - 32px)); height: fit-content; padding: 24px; }
.brief-dialog .row, .qr-dialog .row { margin-top: 16px; }
.brief { max-height: min(70vh, 640px); overflow: auto; padding-right: 4px; }
.brief .b-name { margin: 0; font-family: var(--font-display); font-size: 24px; letter-spacing: -0.01em; }
.brief .b-role { margin: 4px 0 0; color: var(--ink-2); }
.brief .b-sub { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.b-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); font-size: 14px; }
.b-facts dt { color: var(--muted); }
.b-facts dd { margin: 0; overflow-wrap: anywhere; }
.brief h3 { margin: 16px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.b-notes { margin: 0; white-space: pre-wrap; font-size: 14px; }
.b-also { margin: 0; padding-left: 18px; font-size: 14px; }
.qr-dialog { width: min(360px, calc(100vw - 32px)); height: fit-content; padding: 24px; text-align: center; }
.qr-dialog p { margin: 6px 0; }
.qr-dialog .row { justify-content: center; }
.qr-box { display: inline-block; padding: 8px; background: #fff; border-radius: 12px; margin: 6px 0 4px; }
.qr-box canvas { display: block; image-rendering: pixelated; }
@media print {
  .print-sheet .b-name { font: 700 20pt/1.1 var(--font-display), Helvetica, Arial, sans-serif; margin: 0 0 1mm; }
  .print-sheet .b-role, .print-sheet .b-sub { margin: 0 0 1mm; color: #333; }
  .print-sheet .b-facts { display: grid; grid-template-columns: max-content 1fr; gap: 1.5mm 5mm; margin: 4mm 0 0; padding-top: 3mm; border-top: 0.5pt solid #999; }
  .print-sheet .b-facts dt { color: #555; }
  .print-sheet .b-facts dd { margin: 0; }
  .print-sheet h3 { font-size: 9pt; text-transform: uppercase; letter-spacing: 0.04em; color: #555; margin: 5mm 0 1mm; }
  .print-sheet .b-notes { white-space: pre-wrap; margin: 0; }
  .print-sheet .b-also { margin: 0; padding-left: 5mm; }
}

/* ------------- local time, talking points, network graph (2026-10-06) */
.lt { display: inline-block; justify-self: start; margin-top: 3px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; color: var(--muted); background: var(--bg-alt, rgba(127,127,127,.08)); white-space: nowrap; }
.lt.good { color: #0b6b4f; background: rgba(16, 150, 110, 0.12); }
.today-head .reach { margin-left: auto; font-size: 12px; color: #0b6b4f; }
.map-pick-row .lt { margin-top: 4px; }
.b-points { margin: 0; padding-left: 20px; font-size: 14px; display: grid; gap: 6px; }
.b-points a, .b-src a { color: var(--accent); }
.b-src { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.b-points-note { margin: 12px 0 0; font-size: 12.5px; }
.brief-dialog .row .spacer { flex: 1; }
.graph-panel { --g-event: var(--accent); --g-company: #0E8C7E; }
.graph-wrap { width: 100%; overflow: hidden; }
.graph { width: 100%; height: auto; display: block; }
.graph line { stroke: var(--line-strong, #c9cbd3); opacity: .8; }
.graph .g-node { cursor: pointer; outline: none; }
.graph .g-node.event rect { fill: var(--g-event); stroke: var(--bg-raised); stroke-width: 2; }
.graph .g-node.company circle { fill: var(--g-company); stroke: var(--bg-raised); stroke-width: 2; }
.graph text { font-size: 12px; fill: var(--ink-2); paint-order: stroke; stroke: var(--bg-raised); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.graph .g-node.event text { font-weight: 600; fill: var(--ink); }
.graph .g-node:focus-visible rect, .graph .g-node:focus-visible circle { stroke: var(--ink); stroke-width: 3; }
.graph.focus .g-node:not(.near) { opacity: .25; }
.graph.focus line:not(.near) { opacity: .12; }
.graph.focus line.near { stroke: var(--ink-2); opacity: 1; }
.graph-legend { display: flex; gap: 16px; margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.graph-legend .lg::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.graph-legend .event::before { background: var(--g-event); border-radius: 2px; }
.graph-legend .company::before { background: var(--g-company); border-radius: 50%; }
.graph-facts { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
@media (prefers-color-scheme: dark) {
  .graph-panel { --g-company: #3CC4B0; }
  .lt.good, .today-head .reach { color: #5fd3a8; }
  .lt.good { background: rgba(95, 211, 168, 0.14); }
}
@media print { .print-sheet .b-points { padding-left: 5mm; } .print-sheet .b-src { color: #555; } }
