/* Layout: top bar, student roster on the left, working record on the right; proposal renders as a printable letter-size document. */
/* Layout: deep-water header with contour lines and a compass-rose mark, student roster on the left, working record on the right.
   Palette runs by depth: surface → shallows → reef → thermocline → deep. The dive-flag red is used only for the flag. */
:root {
  --bg: #eaf3f4;          /* surface */
  --surface: #ffffff;
  --surface-2: #f4f9fa;
  --ink: #0b2a3a;         /* deep */
  --muted: #4f6a73;
  --line: #c9dce0;
  --accent: #0f7c8c;      /* reef */
  --accent-ink: #ffffff;
  --accent-soft: #d6eef1;
  --shallows: #5fc4cf;
  --thermo: #2c6c7c;
  --deep: #0b2a3a;
  --deep-ink: #e6f4f5;
  --deep-muted: #b9dde1;
  --contour: #2c6c7c;
  /* Header and navigation: ocean blue, deepening toward the bottom. */
  --head-1: #0f6a9e; --head-2: #0b4a78; --head-3: #08345a; --head-line: #6cc0ea;
  --ip: #8a5300;   --ip-bg: #fff0cc;
  --pr: #1d5fae;   --pr-bg: #e1ecfb;
  --ok: #17683f;   --ok-bg: #dcf3e4;  --ok-mark: #1e8a5a;
  --bad: #a1211a;  --bad-bg: #fbe2df;
  --font-display: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #071b25; --surface: #0e2532; --surface-2: #132e3c; --ink: #e3eef1; --muted: #93a9b2;
    --line: #24414f; --accent: #5fc4cf; --accent-ink: #062027; --accent-soft: #15404b;
    --deep: #04131b; --contour: #1f5463;
    --head-1: #0b4f7a; --head-2: #083a60; --head-3: #062a48; --head-line: #4fa6d6;
    --ip: #f0b44c; --ip-bg: #3d2f12; --pr: #8ab8f5; --pr-bg: #182d4a;
    --ok: #6fd296; --ok-bg: #143823; --ok-mark: #4fbf80; --bad: #f2948c; --bad-bg: #44191a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #071b25; --surface: #0e2532; --surface-2: #132e3c; --ink: #e3eef1; --muted: #93a9b2;
  --line: #24414f; --accent: #5fc4cf; --accent-ink: #062027; --accent-soft: #15404b;
  --deep: #04131b; --contour: #1f5463;
  --head-1: #0b4f7a; --head-2: #083a60; --head-3: #062a48; --head-line: #4fa6d6;
  --ip: #f0b44c; --ip-bg: #3d2f12; --pr: #8ab8f5; --pr-bg: #182d4a;
  --ok: #6fd296; --ok-bg: #143823; --ok-mark: #4fbf80; --bad: #f2948c; --bad-bg: #44191a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font-body); }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.15; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.topbar {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--head-1) 0%, var(--head-2) 55%, var(--head-3) 100%); color: var(--deep-ink);
  padding-block: clamp(22px, 4vw, 40px);
  padding-left: max(clamp(64px, 8vw, 100px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(64px, 8vw, 100px), env(safe-area-inset-right, 0px));
  display: flex; align-items: center; justify-content: center;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--head-1); }
.topbar .topo { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; stroke: var(--head-line); opacity: .38; }
.topbar > :not(.topo) { position: relative; }
.wave { display: block; width: 100%; height: 16px; fill: var(--head-3); }
.brand { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 2vw, 20px); }
.rose { width: clamp(56px, 9vw, 92px); height: clamp(56px, 9vw, 92px); flex-shrink: 0; }
.rose .r-dark { fill: var(--shallows); } .rose .r-light { fill: var(--deep-ink); } .rose .r-mid { fill: var(--thermo); }
.rose .r-ring { stroke: var(--shallows); } .rose .r-hub { fill: var(--deep); stroke: var(--deep-ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 5.5vw, 52px); letter-spacing: .06em; text-transform: uppercase; }
.brand-text span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--deep-muted); }
/* Page layout: navigation column on the left, the page on the right. */
.layout {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start;
  max-width: 1540px; margin: 0 auto;
  padding: 14px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
}
.layout > .shell { padding-left: 0; padding-right: 0; padding-top: 0; max-width: none; margin: 0; width: 100%; }
.layout > .shell.full { max-width: 900px; }
.sidenav {
  position: sticky; top: 14px; background: var(--head-3); color: var(--deep-ink); border-radius: 12px;
  padding: 12px 10px; display: flex; flex-direction: column; gap: 14px;
}
.nav-modes, .nav-tools { display: flex; flex-direction: column; gap: 2px; }
.nav-tools { border-top: 1px solid rgba(185, 221, 225, .2); padding-top: 10px; }
.nav-group { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--deep-muted); opacity: .8; padding: 12px 12px 4px; }
.navbtn { border: 0; background: transparent; color: var(--deep-muted); font-weight: 600; padding: 8px 12px; border-radius: 6px; cursor: pointer; min-height: 40px; text-align: left; width: 100%; }
.navbtn:hover { color: var(--deep-ink); background: rgba(95, 196, 207, .14); }
.navbtn.active { background: var(--shallows); color: #0b2a3a; font-weight: 700; }
.navbtn.account { border: 1.5px solid var(--shallows); color: var(--deep-ink); margin-bottom: 2px; }
.navbtn.account.active { color: #0b2a3a; }
.nav-tools .navbtn { font-weight: 400; font-size: 14px; }
@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sidenav { position: static; flex-direction: row; overflow-x: auto; padding: 8px; gap: 8px; }
  .nav-modes, .nav-tools { flex-direction: row; flex-shrink: 0; }
  .nav-tools { border-top: 0; padding-top: 0; border-left: 1px solid rgba(185, 221, 225, .2); padding-left: 8px; }
  .nav-group { display: none; }
  .navbtn { white-space: nowrap; width: auto; }
}
.flag { position: absolute !important; right: max(16px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); width: clamp(44px, 6vw, 63px); height: auto; aspect-ratio: 3 / 2; border-radius: 3px; }

.btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius);
  padding: 6px 12px; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.active { background: var(--accent-soft); border-color: var(--accent); }
.btn.danger { color: var(--bad); }
.btn.small { padding: 3px 8px; font-size: 13px; }

.shell {
  display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px;
  padding-block: 14px 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  max-width: 1280px; margin: 0 auto;
}
.shell.full { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
@media (max-width: 820px) { .shell { grid-template-columns: minmax(0, 1fr); } }

.roster { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.roster input[type=search] { width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.roster ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.roster li button {
  width: 100%; text-align: left; border: 1px solid transparent; background: transparent; border-radius: var(--radius);
  padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 4px;
}
.roster li button:hover { background: var(--surface); }
.roster li button.sel { background: var(--surface); border: 1.5px solid var(--accent); }
.roster .depth { margin-top: 18px; display: flex; gap: 10px; }
.roster .depth i { width: 6px; border-radius: 3px; background: var(--shallows); opacity: .6; }
.roster .depth div { display: flex; flex-direction: column; justify-content: space-between; height: 160px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.roster .nm { font-weight: 600; }
.roster .meta { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok-mark); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; min-width: 0; position: relative; overflow: hidden; }
.panel > * { position: relative; }
.panel > .watermark { position: absolute; right: -90px; bottom: -110px; width: 360px; height: 360px; opacity: .06; pointer-events: none; fill: var(--ink); stroke: var(--ink); }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.gauge { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.gauge svg { width: 96px; height: 56px; }
.gauge .track { stroke: var(--line); } .gauge .fill { stroke: var(--ok-mark); } .gauge .fill.f2 { stroke: var(--pr); }
.gauge text { fill: var(--ink); font-family: var(--font-mono); font-weight: 600; font-size: 16px; }
.gauge span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gauge b { font-family: var(--font-mono); font-size: 24px; line-height: 56px; font-variant-numeric: tabular-nums; }
.profile { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; background: var(--surface-2); margin-bottom: 16px; }
.profile svg { display: block; width: 100%; height: 86px; margin-top: 4px; }
.profile .surf { stroke: var(--shallows); } .profile .done { stroke: var(--accent); } .profile .todo { stroke: var(--line); }
.profile .dot-done { fill: var(--ok-mark); } .profile .dot-todo { fill: var(--surface); stroke: var(--muted); }
.profile text { fill: var(--ink); font-family: var(--font-mono); font-size: 12px; }
.rec-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; margin-bottom: 14px; }
.rec-head h1 { font-size: 34px; }
.rec-head .who { margin-right: auto; display: flex; flex-direction: column; gap: 4px; }
.rec-head .sub { color: var(--muted); }
.stats { display: flex; gap: 18px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat b { font-family: var(--font-mono); font-size: 18px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 0 -20px 18px; padding: 0 20px; }
.tabs button {
  border: 0; background: none; padding: 8px 12px; cursor: pointer; color: var(--muted);
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button.on { color: var(--ink); border-bottom: 3px solid var(--accent); font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label, .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.field input, .field textarea, .field select, td input, td select {
  width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2);
}
.field textarea { min-height: 84px; resize: vertical; }
.hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; max-width: 70ch; }
h2.sec { font-size: 20px; margin: 22px 0 10px; }
h2.sec:first-child { margin-top: 0; }

.tablewrap { overflow-x: auto; }
table.m { width: 100%; border-collapse: collapse; font-size: 14px; }
table.m th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.m td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.m td.dom { font-size: 12px; color: var(--muted); white-space: nowrap; }
table.m td.obj { min-width: 260px; }
table.m td.c { width: 92px; }
table.m td.ini { width: 72px; }
table.m td.ini input { font-family: var(--font-mono); text-transform: uppercase; }
table.m tr.done td.obj { color: var(--muted); }

select.st { font-family: var(--font-mono); font-weight: 600; }
select.st[data-v="IP"] { background: var(--ip-bg); color: var(--ip); }
select.st[data-v="PR"] { background: var(--pr-bg); color: var(--pr); }
select.st[data-v="M"]  { background: var(--ok-bg); color: var(--ok); }
select.st[data-v="R"]  { background: var(--bad-bg); color: var(--bad); }

.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--ok); }
.prq { display: flex; flex-direction: column; gap: 10px; }
.prq-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px 16px; align-items: end; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.prq-row .chk { align-self: center; }
@media (max-width: 640px) { .prq-row { grid-template-columns: minmax(0, 1fr); } }

.key { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; font-size: 13px; }
.pill { font-family: var(--font-mono); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.pill.IP { background: var(--ip-bg); color: var(--ip); }
.pill.PR { background: var(--pr-bg); color: var(--pr); }
.pill.M { background: var(--ok-bg); color: var(--ok); }
.pill.R { background: var(--bad-bg); color: var(--bad); }

.money { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; max-width: 360px; margin-top: 14px; }
.totals .grand { font-weight: 700; border-top: 1px solid var(--line); padding-top: 4px; }
.row-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty h2 { color: var(--ink); font-size: 24px; margin-bottom: 8px; }

.toast { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: var(--radius); font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ---------- Proposal document ---------- */
.doc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.doc {
  background: #ffffff; color: #13232b; border: 1px solid var(--line); border-radius: 4px;
  padding: 40px clamp(18px, 5vw, 56px); font-size: 14px; line-height: 1.55; max-width: 860px;
}
.doc .runhead { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #5b707a; border-bottom: 1px solid #c9d5da; padding-bottom: 6px; margin-bottom: 26px; flex-wrap: wrap; }
.doc .cover h1 { font-size: 34px; letter-spacing: .01em; text-transform: uppercase; color: #0a5361; }
.doc .cover .sub { font-family: var(--font-display); font-size: 22px; text-transform: uppercase; margin-top: 4px; }
.doc .cover .tag { font-style: italic; color: #3d5560; margin: 10px 0 20px; }
.doc dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 24px; padding: 14px 18px; background: #eef5f6; border-left: 3px solid #0a6b7c; }
.doc dl.facts dt { font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .06em; color: #0a5361; align-self: center; }
.doc dl.facts dd { margin: 0; }
.doc h2 { font-size: 19px; text-transform: uppercase; letter-spacing: .03em; color: #0a5361; margin: 26px 0 8px; border-bottom: 1px solid #c9d5da; padding-bottom: 4px; }
.doc p { margin: 0 0 10px; max-width: 72ch; white-space: pre-line; }
.doc .callout { background: #fff6e0; border: 1px solid #ecd59a; padding: 10px 14px; border-radius: 4px; font-weight: 600; }
.doc .tablewrap { margin: 8px 0 14px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.doc th { background: #0a5361; color: #ffffff; text-align: left; padding: 6px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.doc td { border-bottom: 1px solid #d6e0e4; padding: 5px 8px; vertical-align: top; }
.doc tr:nth-child(even) td { background: #f5f9fa; }
.doc td.mk { font-family: var(--font-mono); font-weight: 600; text-align: center; white-space: nowrap; }
.doc .key { font-size: 12px; color: #3d5560; }
.doc .sig { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 18px; margin-top: 26px; }
.doc .sig div { border-top: 1px solid #13232b; padding-top: 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #5b707a; min-height: 40px; }
.doc .sig div b { display: block; font-size: 14px; color: #13232b; text-transform: none; letter-spacing: 0; font-weight: 600; margin-bottom: 2px; }
.doc .foot { margin-top: 30px; font-size: 11px; color: #5b707a; border-top: 1px solid #c9d5da; padding-top: 6px; text-align: center; }
.doc .pb { break-before: page; }

/* ---------- course catalog (All courses) and the Students tab's certifications ---------- */
.cat-table td { vertical-align: top; }
.cat-table { table-layout: auto; }
.cat-table td:first-child { min-width: 150px; }
.cat-table td:nth-child(3) { min-width: 240px; }
.cat-table td:nth-child(4), .cat-table td:nth-child(5) { min-width: 120px; }
.cat-table td:nth-child(2) { min-width: 100px; }
.cat-pre { margin: 0; padding-left: 16px; }
.cat-pre li { margin: 0 0 2px; }
.cat-n { text-align: center; }
.cat-acts { white-space: nowrap; }
.cat-full { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); white-space: nowrap; }
.cat-missing { color: var(--muted); font-style: italic; }
.cert-row.wide4 { grid-template-columns: minmax(120px, 0.8fr) minmax(0, 2fr) minmax(0, 1fr) minmax(130px, 0.8fr) auto; }
.cert-row.wide4 .field:nth-child(2) { grid-column: auto; }
@media (max-width: 900px) {
  .cert-row.wide4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cert-row.wide4 .field:nth-child(2) { grid-column: 2 / -1; }
  .cert-row.wide4 .btn { justify-self: start; }
}

@media print {
  body { background: #fff; }
  body::before, .topbar, .wave, .sidenav, .roster, .rec-head, .tabs, .doc-actions, .toast, .no-print { display: none !important; }
  .shell { display: block; padding: 0; max-width: none; }
  .layout { display: block; padding: 0; max-width: none; }
  .panel { border: 0; padding: 0; }
  .doc { border: 0; padding: 0; max-width: none; font-size: 11.5pt; }
  .doc table { font-size: 9.5pt; }
  .doc tr { break-inside: avoid; }
  .tablewrap { overflow: visible; }
  @page { size: letter; margin: 0.6in; }
}

/* ---------- Header banner (header.jpg: compass rose, topo map and the "Limitless Diving & Technical Training" title) ----------
   The picture carries the title, so the drawn compass, title and contour lines are hidden on screen but stay
   readable for screen readers. The banner keeps the picture's shape (1024 × 191) between 120px and 280px tall;
   "cover" trims the sides on narrow screens so the title in the middle stays large enough to read. */
.topbar {
  background: #0a1821 url("header.jpg") center / cover no-repeat;
  height: clamp(120px, calc(100vw * 191 / 1024), 280px);
  padding-block: 0 !important;
}
/* Phones: slide the picture so the title sits left of the Admin Log in button and the dive flag. */
@media (max-width: 560px) { .topbar { background-position: 62% center; } }
.topbar .topo { display: none; }
.topbar .brand { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
body::before { background: #10232f; }
.wave { fill: #0a1821; }

/* Dive flag, large, with Admin Log in under it, on the right of the header. */
.topbar .head-right {
  position: absolute !important; right: max(16px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: clamp(6px, 1vw, 10px);
}
.topbar .head-right .flag { position: static !important; transform: none; width: clamp(64px, 11vw, 150px); }
.topbar .head-right .admin-login { position: static !important; transform: none; }
@media (max-width: 560px) { .topbar .head-right { right: max(10px, env(safe-area-inset-right, 0px)); } }

/* ---------- email compose box (email.js) ---------- */
.ld-email { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 20, 30, .35); }
.ld-email::backdrop { background: rgba(4, 19, 27, .55); }
.ld-email-in { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; }
.ld-email-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ld-email-head h2 { font-size: 22px; }
.ld-email .hint { margin: 0; }
.ld-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; max-height: 140px; overflow: auto; }
.ld-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 999px;
  background: var(--accent-soft); font-size: 14px; max-width: 100%; }
.ld-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-chip-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 2px 6px; border-radius: 999px; }
.ld-chip-x:hover { color: var(--bad); }
.ld-add { display: flex; gap: 6px; }
.ld-add input { flex: 1; min-width: 0; }
.ld-alt { align-self: center; margin-left: auto; color: var(--accent); font-size: 14px; }
.ld-email .row-actions { flex-wrap: wrap; }
