/* Aesthetic mirrors AppStudio Hub (cfawall.app) — DM Sans, CFA red #E51636,
   gray-50 surfaces, 12px radius, identical token system + status palette.
   See cfa-appstudio-hub/src/index.css for the source-of-truth tokens. */

:root {
  /* Brand */
  --color-primary: 229 22 54;        /* #E51636 — CFA Red */
  --color-primary-dark: 184 18 48;
  --brand-subtle: 254 242 242;       /* red-50 */

  /* Surfaces */
  --surface-page: 249 250 251;       /* gray-50 */
  --surface-card: 255 255 255;
  --surface-card-alt: 249 250 251;
  --surface-card-light: 248 250 252; /* slate-50 — lightest fill, distinct alt */
  --surface-elevated: 255 255 255;

  /* Text */
  --text-heading: 17 24 39;          /* gray-900 */
  --text-body: 75 85 99;             /* gray-600 */
  --text-muted: 156 163 175;         /* gray-400 */
  --text-icon-muted: 148 163 184;    /* slate-400 — non-text muted decoration */
  --text-on-brand: 255 255 255;

  /* Borders */
  --border-default: 229 231 235;     /* gray-200 */
  --border-subtle: 243 244 246;      /* gray-100 */
  --border-strong: 209 213 219;      /* gray-300 */
  --border-focus: 229 22 54;

  /* Status (matches AppStudio tokens) */
  --status-success-bg: 236 253 245;  /* emerald-50 */
  --status-success-text: 5 150 105;  /* emerald-600 */
  --status-warning-bg: 255 251 235;  /* amber-50 */
  --status-warning-text: 217 119 6;  /* amber-600 */
  --status-error-bg: 254 242 242;    /* red-50 */
  --status-error-text: 220 38 38;    /* red-600 */
  --status-info-bg: 239 246 255;     /* blue-50 */
  --status-info-text: 37 99 235;     /* blue-600 */

  /* Radius */
  --radius: 0.75rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-full: 9999px;

  /* Shadows (reduced — matches CFA Pathways alignment in AppStudio) */
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.03);
  --shadow-md: 0 1px 3px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 2px 8px rgb(0 0 0 / 0.06);

  /* Font — DM Sans with italic variants */
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* Motion */
  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);

  /* Safe-area insets — iOS notch + home indicator. Falls back to 0 elsewhere. */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

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

html, body {
  font-family: var(--font-sans);
  color: rgb(var(--text-body));
  background: rgb(var(--surface-page));
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* Defense-in-depth against horizontal scroll from any rogue absolute or
   wide element. `overflow-x: clip` is preferred over `hidden` because
   `hidden` makes the element a scroll container — which breaks
   `position: sticky` for descendants like the editor's save bar. `clip`
   skips the scroll-container behavior. Safari 16+, all modern Chrome. */
html { overflow-x: clip; }
body { overflow-x: clip; }

/* iOS Safari: never auto-zoom on input focus. The trigger is any text input
   below 16px font-size. We bump every text-entry control to 16px on phone
   widths; desktop still uses the 14px design size where the bug doesn't
   apply. The `-input-base` class is a cheap escape hatch we never use. */
@media (max-width: 800px) {
  input[type="text"],
  input[type="tel"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  input[type="url"],
  input[type="date"],
  input[type="time"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* Bigger tap targets on touch devices (no fine pointer). 44px is Apple's
   guideline; we apply it to buttons, link cards, and removable item rows
   so Jason isn't fighting his thumb to hit anything. */
@media (hover: none) and (pointer: coarse) {
  button, .btn, a.resource, button.resource, a.archive-row {
    min-height: 44px;
  }
}

a { color: rgb(var(--color-primary)); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; }

/* Restore [hidden] semantics — class selectors with display:flex were winning */
[hidden] { display: none !important; }

/* Focus indicators for accessibility (matches AppStudio Hub) */
:focus-visible {
  outline: 2px solid rgb(var(--color-primary));
  outline-offset: 2px;
}

/* ── Typography composites (matches AppStudio Hub typo-* prefix) ── */
.typo-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgb(var(--text-muted));
}
.typo-card-title {
  font-size: 18px;
  font-weight: 600;
  color: rgb(var(--text-heading));
  letter-spacing: -0.2px;
}
.typo-card-meta {
  font-size: 12px;
  color: rgb(var(--text-muted));
}

/* Section divider — 3px gradient bar with CFA accent (AppStudio pattern) */
.section-divider {
  height: 3px;
  background: linear-gradient(
    90deg,
    rgb(var(--color-primary)) 0%,
    rgb(var(--color-primary) / 0.3) 50%,
    transparent 100%
  );
  border-radius: 2px;
  margin: 24px 0;
}

/* Saved-flash — small ephemeral confirmation chip (200ms slide + fade) */
.saved-flash {
  display: inline-block;
  background: rgb(var(--status-success-bg));
  color: rgb(var(--status-success-text));
  font-size: 12px; font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  letter-spacing: 0.2px;
  transition: opacity 350ms ease, transform 350ms ease;
}
.saved-flash.fade-out {
  opacity: 0;
  transform: translateY(-4px);
}

/* ───── PIN GATE ───────────────────────────── */
.pin-gate {
  position: fixed; inset: 0;
  background: rgb(var(--surface-page));
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  z-index: 100;
}
.pin-card {
  position: relative;
  background: rgb(var(--surface-card));
  border: 1px solid rgb(var(--border-default));
  border-radius: var(--radius-lg);
  padding: 36px 32px 32px;
  width: 100%; max-width: 380px;
  box-shadow: var(--shadow-lg);
}
.pin-logo {
  display: flex; align-items: center; gap: 10px;
  justify-content: center; margin-bottom: 18px;
}
.pin-logo .dot {
  width: 14px; height: 14px; border-radius: 999px;
  background: rgb(var(--color-primary));
}
.pin-logo .name {
  font-size: 13px; font-weight: 700;
  color: rgb(var(--text-heading));
  letter-spacing: -0.2px;
}
.pin-eyebrow {
  font-size: 11px; font-weight: 700;
  color: rgb(var(--text-muted));
  letter-spacing: 1.5px; text-transform: uppercase;
  text-align: center;
}
.pin-title {
  font-size: 24px; font-weight: 700;
  color: rgb(var(--text-heading));
  letter-spacing: -0.4px;
  margin-top: 4px; line-height: 1.1;
  text-align: center;
}
.pin-subtitle {
  color: rgb(var(--text-muted)); font-size: 14px;
  margin-top: 8px; text-align: center;
}
.pin-input-row {
  display: flex; gap: 8px; margin-top: 24px;
}
.pin-input-row input {
  flex: 1; font-size: 18px; font-weight: 600;
  padding: 12px 14px;
  border: 1px solid rgb(var(--border-default));
  border-radius: var(--radius-md);
  outline: none; background: white;
  text-align: center; letter-spacing: 12px;
  font-family: inherit;
  color: rgb(var(--text-heading));
}
.pin-input-row input:focus {
  border-color: rgb(var(--color-primary));
  box-shadow: 0 0 0 3px rgb(var(--color-primary) / 0.12);
}
.pin-input-row button {
  background: rgb(var(--color-primary));
  color: rgb(var(--text-on-brand));
  border: none;
  border-radius: var(--radius-md); padding: 0 18px;
  font-weight: 600; font-size: 14px;
  cursor: pointer;
  transition: background 150ms ease;
}
.pin-input-row button:hover { background: rgb(var(--color-primary-dark)); }
.pin-error {
  color: rgb(var(--color-primary)); font-size: 13px; font-weight: 500;
  margin-top: 12px; min-height: 18px; text-align: center;
}

/* ───── PAGE LAYOUT ───────────────────────── */
.page {
  max-width: 880px; margin: 0 auto;
  padding: 28px 20px 60px;
}

/* App-style header (sticky-ish, light) */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 4px 16px;
  border-bottom: 1px solid rgb(var(--border-subtle));
}
.topbar .brand {
  display: flex; align-items: center; gap: 10px;
}
.topbar .brand .dot {
  width: 12px; height: 12px; border-radius: 999px;
  background: rgb(var(--color-primary));
}
.topbar .brand .name {
  font-size: 14px; font-weight: 700;
  color: rgb(var(--text-heading));
  letter-spacing: -0.2px;
}
.topbar .nav { display: flex; gap: 4px; }
.topbar .nav a {
  font-size: 13px; font-weight: 600;
  color: rgb(var(--text-muted));
  padding: 8px 14px; border-radius: var(--radius-md);
  transition: background 150ms ease, color 150ms ease;
}
.topbar .nav a:hover {
  background: rgb(var(--surface-card-alt));
  color: rgb(var(--text-heading));
  text-decoration: none;
}
.topbar .nav a.active {
  background: rgb(var(--color-primary) / 0.08);
  color: rgb(var(--color-primary));
}

/* ───── WEEK PAGE ─────────────────────────── */
.week-eyebrow {
  margin-top: 28px;
  font-size: 12px; font-weight: 700;
  color: rgb(var(--color-primary));
  letter-spacing: 1.5px; text-transform: uppercase;
}
.week-title {
  margin-top: 6px;
  font-weight: 700;
  font-size: 36px;
  color: rgb(var(--text-heading));
  letter-spacing: -0.6px;
  line-height: 1.1;
}
.week-meta {
  margin-top: 6px;
  color: rgb(var(--text-muted));
  font-size: 14px;
}

.video-frame {
  margin-top: 24px;
  background: rgb(17 24 39);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
}
.video-frame video {
  width: 100%; height: 100%; display: block;
  background: rgb(17 24 39);
}

.actions {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 18px;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-md);
  font-weight: 600; font-size: 14px;
  cursor: pointer; border: 1px solid transparent;
  font-family: inherit;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn:hover { text-decoration: none; }
.btn.primary {
  background: rgb(var(--color-primary));
  color: rgb(var(--text-on-brand));
}
.btn.primary:hover { background: rgb(var(--color-primary-dark)); }
.btn.secondary {
  background: rgb(var(--surface-card));
  color: rgb(var(--text-heading));
  border-color: rgb(var(--border-default));
}
.btn.secondary:hover {
  background: rgb(var(--surface-card-alt));
  border-color: rgb(var(--border-strong));
}
.btn .icon { font-size: 15px; line-height: 1; }

/* Small text-only "download video" link tucked under the video frame */
.video-download {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 6px 4px;
  font-size: 13px; font-weight: 600;
  color: rgb(var(--text-muted));
  border-radius: var(--radius-sm);
}
.video-download:hover {
  color: rgb(var(--color-primary));
  text-decoration: none;
}
.video-download .icon { font-size: 13px; }

/* ───── PREV/NEXT MEETING NAV (top of every meeting page) ───────── */
.meeting-nav {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  margin-top: 18px;
  font-size: 13px;
}
.meeting-nav a {
  font-weight: 600;
  color: rgb(var(--text-muted));
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background 120ms ease, color 120ms ease;
}
.meeting-nav a:hover {
  background: rgb(var(--surface-card-alt));
  color: rgb(var(--color-primary));
  text-decoration: none;
}
.meeting-nav .nav-spacer { width: 1px; }

/* Past-meeting → next-meeting handoff card (above the brief) */
.next-meeting-callout {
  margin-top: 14px;
  background: rgb(var(--brand-subtle));
  border: 1px solid rgb(var(--color-primary) / 0.2);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
}
.nm-callout-eyebrow {
  font-size: 10px; font-weight: 700;
  color: rgb(var(--color-primary));
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 2px;
}
.nm-callout-title {
  font-size: 15px; font-weight: 600;
  color: rgb(var(--text-heading));
}
.nm-callout-btn {
  display: inline-flex; align-items: center;
  background: rgb(var(--color-primary));
  color: white !important;
  font-weight: 600; font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition: background 150ms ease;
}
.nm-callout-btn:hover {
  background: rgb(var(--color-primary-dark));
  text-decoration: none;
}

/* Upcoming-meeting page: small "previous brief" link */
.meeting-context-link {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
}
.meeting-context-link a {
  color: rgb(var(--text-muted));
  font-weight: 500;
}
.meeting-context-link a:hover { color: rgb(var(--color-primary)); }

/* Past meeting with no artifacts yet */
.materials-pending {
  margin-top: 22px;
  background: rgb(var(--surface-card-alt));
  border: 1px dashed rgb(var(--border-default));
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-size: 14px; line-height: 1.5;
  color: rgb(var(--text-body));
}
.materials-pending strong {
  display: block;
  color: rgb(var(--text-heading));
  margin-bottom: 4px;
  font-weight: 600;
}

/* "Upcoming" pill for archive list */
.archive-row .upcoming-pill {
  background: rgb(var(--surface-card-alt));
  color: rgb(var(--text-body));
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
  letter-spacing: 0.3px;
  border: 1px solid rgb(var(--border-default));
}

/* ───── NEXT MEETING (editable agenda) ───────── */
.next-meeting {
  margin-top: 24px;
  background: rgb(var(--surface-card));
  border: 1px solid rgb(var(--border-default));
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-md);
  border-top: 3px solid rgb(var(--color-primary));
}
.next-meeting-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.nm-eyebrow {
  font-size: 11px; font-weight: 700;
  color: rgb(var(--color-primary));
  letter-spacing: 1.5px; text-transform: uppercase;
}
.btn-edit, .btn-cancel, .btn-save {
  font-family: inherit;
  font-size: 13px; font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 150ms ease, border-color 150ms ease;
}
.btn-edit {
  background: rgb(var(--surface-card-alt));
  color: rgb(var(--text-heading));
  border-color: rgb(var(--border-default));
}
.btn-edit:hover {
  background: white;
  border-color: rgb(var(--border-strong));
}
.nm-edit-buttons { display: flex; gap: 8px; }
.nm-edit-buttons-bottom {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgb(var(--border-subtle));
}
.btn-cancel {
  background: transparent;
  color: rgb(var(--text-muted));
}
.btn-cancel:hover {
  color: rgb(var(--text-heading));
  background: rgb(var(--surface-card-alt));
}
.btn-save {
  background: rgb(var(--color-primary));
  color: white;
}
.btn-save:hover { background: rgb(var(--color-primary-dark)); }
.btn-save:disabled { opacity: 0.6; cursor: not-allowed; }

.nm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}
.nm-row {}
.nm-label {
  font-size: 11px; font-weight: 700;
  color: rgb(var(--text-muted));
  letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 4px;
}
.nm-value {
  font-size: 15px; font-weight: 600;
  color: rgb(var(--text-heading));
}

.nm-items-block { margin-top: 4px; }
.nm-items {
  margin: 8px 0 0; padding: 0 0 0 22px;
  display: flex; flex-direction: column; gap: 6px;
}
.nm-items li {
  font-size: 15px; line-height: 1.45;
  color: rgb(var(--text-body));
}
.nm-empty-items {
  font-size: 14px;
  color: rgb(var(--text-muted));
  font-style: italic;
}

.nm-empty {
  background: rgb(var(--surface-card-alt));
  border: 1px dashed rgb(var(--border-default));
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 14px; line-height: 1.5;
  color: rgb(var(--text-body));
  margin-bottom: 14px;
}

.nm-foot {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgb(var(--border-subtle));
  font-size: 12px;
  color: rgb(var(--text-muted));
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
}

.nm-history-link {
  background: none; border: none; padding: 0;
  font-family: inherit; font-size: 12px;
  color: rgb(var(--text-muted));
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nm-history-link:hover { color: rgb(var(--color-primary)); }

.nm-history-panel {
  margin-top: 14px;
  padding: 14px 16px;
  background: rgb(var(--surface-card-alt));
  border: 1px solid rgb(var(--border-default));
  border-radius: var(--radius-md);
}
.nm-history-head {
  font-size: 11px; font-weight: 700;
  color: rgb(var(--text-muted));
  letter-spacing: 1.2px; text-transform: uppercase;
  margin-bottom: 10px;
}
.nm-history-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.nm-history-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid rgb(var(--border-subtle));
}
.nm-history-item:first-child { border-top: none; padding-top: 0; }
.nm-history-meta { flex: 1; }
.nm-history-meta strong {
  display: block;
  font-size: 13px; color: rgb(var(--text-heading)); font-weight: 600;
}
.nm-history-summary {
  font-size: 12px; color: rgb(var(--text-muted));
  margin-top: 2px;
  line-height: 1.4;
}
.nm-restore {
  flex-shrink: 0;
  font-size: 12px !important;
  padding: 6px 10px !important;
}

/* Dropdown styling — match the text inputs */
.nm-field select,
.action-row select {
  font-family: inherit; font-size: 14px;
  padding: 9px 12px;
  border: 1px solid rgb(var(--border-default));
  border-radius: var(--radius-md);
  background: white;
  color: rgb(var(--text-heading));
  outline: none;
  width: 100%;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23999' stroke-width='2'%3e%3cpolyline points='3 6 8 11 13 6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  padding-right: 32px;
}
.nm-field select:focus,
.action-row select:focus {
  border-color: rgb(var(--color-primary));
  box-shadow: 0 0 0 3px rgb(var(--color-primary) / 0.10);
}

.nm-help {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: rgb(var(--text-muted));
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

/* ─── Action items (in editor) ─── */
.action-row {
  display: flex; flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: rgb(var(--surface-card-alt));
  border: 1px solid rgb(var(--border-subtle));
  border-radius: var(--radius-md);
}
.action-row-main {
  display: flex; gap: 6px; align-items: center;
}
.action-row .action-text {
  flex: 1;
  font-family: inherit; font-size: 14px;
  padding: 8px 12px;
  border: 1px solid rgb(var(--border-default));
  border-radius: var(--radius-md);
  background: white;
  color: rgb(var(--text-heading));
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.action-row .action-text:focus {
  border-color: rgb(var(--color-primary));
  box-shadow: 0 0 0 3px rgb(var(--color-primary) / 0.10);
}

/* Per-action-item scope picker. When set ("All directors" / "All ops"),
   the individual owner pills get dimmed because the roster is implied. */
.action-scope {
  display: flex; align-items: center; gap: 8px;
  padding: 0 2px;
}
.action-scope-label {
  font-size: 11px; font-weight: 700;
  color: rgb(var(--text-muted));
  letter-spacing: 1px; text-transform: uppercase;
}
.action-scope-select {
  flex: 1;
  font-family: inherit; font-size: 13px;
  padding: 6px 10px;
  border: 1px solid rgb(var(--border-default));
  border-radius: var(--radius-md);
  background: white;
  color: rgb(var(--text-heading));
}
.action-row.has-scope .owner-pills {
  opacity: 0.45;
  pointer-events: none;
}

/* Owner toggle pills (one per director) */
.owner-pills {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding-left: 2px;
}
.owner-pill {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 600;
  padding: 4px 10px;
  border: 1px solid rgb(var(--border-default));
  border-radius: 999px;
  background: white;
  color: rgb(var(--text-muted));
  cursor: pointer;
  user-select: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  min-height: 0; min-width: 0;
}
/* Visually hide the input but keep it focusable for keyboard users.
   The compound selectors (label.owner-pill input, .nm-field .owner-pill input)
   bump specificity past the .nm-field input { width: 100% } rule below so
   the hidden checkbox doesn't escape to viewport-width and trigger
   horizontal overflow on mobile. */
.owner-pill input,
label.owner-pill input,
.nm-field .owner-pill input,
.action-row .owner-pill input {
  position: absolute;
  width: 1px !important; height: 1px !important;
  min-height: 0 !important;
  margin: -1px; padding: 0 !important;
  border: 0; clip: rect(0 0 0 0); overflow: hidden;
  white-space: nowrap;
  font-size: 1px !important;
}
.owner-pill:hover {
  border-color: rgb(var(--border-strong));
  color: rgb(var(--text-body));
}
.owner-pill.is-on {
  background: rgb(var(--color-primary));
  border-color: rgb(var(--color-primary));
  color: white;
}

/* Team Updates — 2x2 grid of textareas, one per ops director */
.team-updates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.team-update-field {
  display: flex; flex-direction: column;
  gap: 4px;
  background: rgb(var(--surface-card-alt));
  border: 1px solid rgb(var(--border-subtle));
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.team-update-name {
  font-size: 12px; font-weight: 700;
  color: rgb(var(--text-heading));
  letter-spacing: 0.2px;
}
.team-update-input {
  font-family: inherit; font-size: 13px;
  padding: 6px 8px;
  border: 1px solid rgb(var(--border-default));
  border-radius: var(--radius-sm);
  background: white;
  color: rgb(var(--text-heading));
  outline: none;
  resize: vertical;
  min-height: 44px;
  line-height: 1.4;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.team-update-input:focus {
  border-color: rgb(var(--color-primary));
  box-shadow: 0 0 0 3px rgb(var(--color-primary) / 0.10);
}

/* Multi-line textarea (e.g. Spotlight context) */
.nm-textarea-md {
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  padding: 9px 12px;
  border: 1px solid rgb(var(--border-default));
  border-radius: var(--radius-md);
  background: white;
  color: rgb(var(--text-heading));
  outline: none;
  resize: vertical;
  width: 100%;
  min-height: 80px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.nm-textarea-md:focus {
  border-color: rgb(var(--color-primary));
  box-shadow: 0 0 0 3px rgb(var(--color-primary) / 0.10);
}

/* Nested items-edit (used inside the Spotlight section) */
.nm-items-edit.nm-nested {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgb(var(--border-default));
}
@media (max-width: 700px) {
  .team-updates-grid { grid-template-columns: 1fr; }
}

/* ─── Action items (read-only display in prior-review block) ─── */
.nm-action-items {
  list-style: none; padding: 0; margin: 8px 0 0;
  display: flex; flex-direction: column;
}
.nm-action-items li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0;
  border-top: 1px solid rgb(var(--border-subtle));
  font-size: 14px;
  color: rgb(var(--text-body));
  line-height: 1.45;
}
.nm-action-items li:first-child { border-top: none; padding-top: 0; }
.nm-action-items li.ai-done .ai-text {
  color: rgb(var(--text-muted));
  text-decoration: line-through;
}
.nm-action-items .ai-mark {
  flex-shrink: 0;
  width: 18px; text-align: center;
  color: rgb(var(--text-muted));
  font-weight: 700;
  margin-top: 1px;
}
.nm-action-items li.ai-done .ai-mark {
  color: rgb(var(--status-success-text));
}
.nm-action-items .ai-body { flex: 1; min-width: 0; }
.nm-action-items .ai-text {
  font-size: 14px; line-height: 1.45;
  color: rgb(var(--text-body));
}
.nm-action-items .ai-owner-row {
  margin-top: 4px;
  display: flex; flex-wrap: wrap; gap: 4px;
}
.nm-action-items .ai-owner-chip {
  font-size: 11px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgb(var(--brand-subtle));
  color: rgb(var(--color-primary-dark));
  letter-spacing: 0.2px;
}
.nm-action-items .ai-owner-chip.is-done {
  background: rgb(var(--status-success-bg));
  color: rgb(var(--status-success-text));
}

.prior-block-help {
  font-size: 12px;
  color: rgb(var(--text-muted));
  margin-bottom: 6px;
}

/* ─── Embedded prior-meeting review (top of the agenda card) ─── */
.prior-block {
  margin-bottom: 4px;
  background: rgb(var(--status-info-bg) / 0.5);
  border: 1px solid rgb(var(--border-subtle));
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.prior-block-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.prior-block-link {
  font-size: 11px;
  color: rgb(var(--text-muted));
  font-weight: 600;
}
.prior-block-link:hover {
  color: rgb(var(--color-primary));
  text-decoration: none;
}
.prior-block .nm-action-items { margin-top: 6px; }


.nm-topic-line {
  display: flex; gap: 10px; align-items: baseline;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgb(var(--border-subtle));
}
.nm-topic-eyebrow {
  font-size: 11px; font-weight: 700;
  color: rgb(var(--text-muted));
  letter-spacing: 1px; text-transform: uppercase;
}
.nm-topic-value {
  font-size: 16px; font-weight: 600;
  color: rgb(var(--text-heading));
  letter-spacing: -0.2px;
}
.nm-loading { color: rgb(var(--text-muted)); font-size: 14px; padding: 8px 0; }

.nm-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.nm-edit-grid.two-col { grid-template-columns: repeat(2, 1fr); }
.nm-field {
  display: flex; flex-direction: column; gap: 4px;
}
.nm-field span {
  font-size: 11px; font-weight: 700;
  color: rgb(var(--text-muted));
  letter-spacing: 1px; text-transform: uppercase;
}
.nm-field input {
  font-family: inherit; font-size: 14px;
  padding: 9px 12px;
  border: 1px solid rgb(var(--border-default));
  border-radius: var(--radius-md);
  background: white;
  color: rgb(var(--text-heading));
  outline: none;
  width: 100%;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.nm-field input:focus {
  border-color: rgb(var(--color-primary));
  box-shadow: 0 0 0 3px rgb(var(--color-primary) / 0.10);
}
.nm-name {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgb(var(--border-default));
}

.nm-items-edit { margin-top: 6px; }
.nm-items-edit .nm-label { margin-bottom: 8px; }
#items-rows {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 8px;
}
.item-row {
  display: flex; gap: 6px; align-items: center;
}
.item-row input.item-input {
  flex: 1;
  font-family: inherit; font-size: 14px;
  padding: 8px 12px;
  border: 1px solid rgb(var(--border-default));
  border-radius: var(--radius-md);
  background: white;
  color: rgb(var(--text-heading));
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.item-row input.item-input:focus {
  border-color: rgb(var(--color-primary));
  box-shadow: 0 0 0 3px rgb(var(--color-primary) / 0.10);
}
.item-row .rm {
  background: transparent; border: none;
  font-size: 22px; line-height: 1;
  color: rgb(var(--text-muted));
  cursor: pointer;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  transition: color 120ms ease, background 120ms ease;
  font-family: inherit;
}
.item-row .rm:hover {
  color: rgb(var(--color-primary));
  background: rgb(var(--brand-subtle));
}
.btn-add-item {
  background: transparent;
  border: 1px dashed rgb(var(--border-default));
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px; font-weight: 600;
  color: rgb(var(--text-body));
  cursor: pointer;
  width: 100%;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}
.btn-add-item:hover {
  border-color: rgb(var(--color-primary));
  color: rgb(var(--color-primary));
  background: rgb(var(--brand-subtle));
}

.nm-error {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgb(var(--color-primary) / 0.08);
  color: rgb(var(--color-primary));
  border-radius: var(--radius-md);
  font-size: 13px; font-weight: 500;
}
.nm-error.visible { display: block; }

.nm-date-moved {
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgb(var(--surface-card-alt));
  border: 1px solid rgb(var(--border-default));
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: rgb(var(--text-muted));
}

.nm-date-field {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed rgb(var(--border-default));
}
.nm-date-field input[type="date"] {
  font-family: inherit; font-size: 14px;
  padding: 9px 12px;
  border: 1px solid rgb(var(--border-default));
  border-radius: var(--radius-md);
  background: white;
  color: rgb(var(--text-heading));
  outline: none;
  width: 100%;
  max-width: 220px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.nm-date-field input[type="date"]:focus {
  border-color: rgb(var(--color-primary));
  box-shadow: 0 0 0 3px rgb(var(--color-primary) / 0.10);
}
.nm-date-help {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: rgb(var(--text-muted));
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.nm-date-help strong {
  color: rgb(var(--text-body));
  font-weight: 600;
}

@media (max-width: 700px) {
  .nm-grid, .nm-edit-grid { grid-template-columns: 1fr; gap: 12px; }
  .next-meeting { padding: 18px 18px; }
}

/* ───── RESOURCE CARDS (Before / After meeting) ───────── */
.resource-section { margin-top: 32px; }
.resource-section-title {
  font-size: 11px; font-weight: 700;
  color: rgb(var(--text-muted));
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 12px;
}
.resource-list {
  display: flex; flex-direction: column; gap: 8px;
}
.resource {
  background: rgb(var(--surface-card));
  border: 1px solid rgb(var(--border-subtle));
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm);
  text-decoration: none; color: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 100ms ease;
}
.resource:hover {
  border-color: rgb(var(--border-strong));
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.resource:active { transform: scale(0.99); }
.resource-icon {
  font-size: 22px; line-height: 1;
  width: 38px; text-align: center;
  flex-shrink: 0;
}
.resource-text { flex: 1; min-width: 0; }
.resource-label {
  font-size: 15px; font-weight: 600;
  color: rgb(var(--text-heading));
  letter-spacing: -0.1px;
}
.resource-desc {
  font-size: 13px; line-height: 1.4;
  color: rgb(var(--text-muted));
  margin-top: 2px;
}
.resource-arrow {
  color: rgb(var(--text-muted));
  font-weight: 600; font-size: 16px;
  transition: color 150ms ease;
  flex-shrink: 0;
}
.resource:hover .resource-arrow { color: rgb(var(--color-primary)); }

/* Theme card — when an override is saved, the icon slot gets replaced
   by a circular swatch in the meeting's accent color. The chip
   communicates "a custom look is set" at a glance. */
.theme-card .resource-icon { display: flex; align-items: center; justify-content: center; }
.theme-swatch {
  display: inline-block;
  width: 22px; height: 22px;
  border-radius: 999px;
  border: 1px solid rgb(var(--border-default));
  box-shadow: 0 0 0 3px rgb(var(--surface-card)), 0 0 0 4px rgb(var(--border-subtle));
}

/* Inert placeholder — content not built yet. No hover, no arrow chevron;
   the right-hand text reads e.g. "Not built yet" or "After the meeting" */
.resource-pending {
  opacity: 0.62;
  cursor: default;
  background: rgb(var(--surface-card-alt, var(--surface-card)));
}
.resource-pending:hover {
  border-color: rgb(var(--border-subtle));
  box-shadow: var(--shadow-sm);
}
.resource-pending-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: rgb(var(--text-muted));
}

/* Action-button card (e.g. "Edit agenda" — opens the editor in place).
   Same shape as the link cards; reset the native button defaults. */
button.resource.resource-action {
  font: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
  appearance: none;
}
button.resource.resource-action:focus-visible {
  outline: 2px solid rgb(var(--color-primary));
  outline-offset: 2px;
}

.agenda-editor-wrap { margin-top: 16px; }

/* Operator-only shortcut — small, low-visual-weight */
.operator-shortcut {
  margin-top: 28px;
  padding: 10px 14px;
  background: rgb(var(--surface-card-alt));
  border: 1px dashed rgb(var(--border-default));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.operator-shortcut + .operator-shortcut.alt {
  margin-top: 8px;
}
.operator-shortcut a {
  font-weight: 600;
  color: rgb(var(--text-heading));
}
.operator-shortcut a:hover { color: rgb(var(--color-primary)); text-decoration: none; }
.operator-note {
  color: rgb(var(--text-muted));
  font-size: 12px;
}

/* ───── ARTIFACT PAGES (summary, action items, transcript) ───────── */
.artifact { margin-top: 28px; }
.artifact-eyebrow {
  font-size: 12px; font-weight: 700;
  color: rgb(var(--color-primary));
  letter-spacing: 1.5px; text-transform: uppercase;
}
.artifact-title {
  margin-top: 6px;
  font-weight: 700;
  font-size: 32px;
  color: rgb(var(--text-heading));
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.artifact-meta {
  margin-top: 6px;
  color: rgb(var(--text-muted));
  font-size: 14px;
}
.artifact-actions {
  margin-top: 18px;
  display: flex; gap: 10px;
}
.artifact-body {
  margin-top: 22px;
  font-size: 16px; line-height: 1.65;
  color: rgb(var(--text-body));
}
.artifact-body p { margin: 0 0 14px; }
.artifact-body strong { color: rgb(var(--text-heading)); font-weight: 600; }
.artifact-body em { font-style: italic; }
.artifact-body h2 {
  font-size: 18px; font-weight: 700;
  color: rgb(var(--text-heading));
  margin-top: 28px; margin-bottom: 10px;
  letter-spacing: -0.2px;
}
.artifact-body ul {
  list-style: none;
  margin: 0 0 14px; padding: 0;
}
.artifact-body ul li {
  padding-left: 22px; position: relative;
  margin-bottom: 8px;
}
.artifact-body ul li::before {
  content: ""; position: absolute; left: 4px; top: 11px;
  width: 6px; height: 6px; border-radius: 999px;
  background: rgb(var(--color-primary));
}

/* Pager (next / prev artifact within the same week) */
.artifact-pager {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgb(var(--border-subtle));
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
}
.pager-link {
  font-size: 14px; font-weight: 600;
  color: rgb(var(--text-heading));
  padding: 8px 14px;
  border-radius: var(--radius-md);
  transition: background 150ms ease, color 150ms ease;
}
.pager-link:hover {
  background: rgb(var(--surface-card-alt));
  color: rgb(var(--color-primary));
  text-decoration: none;
}

/* ───── ACTION ITEMS PAGE ───────── */
.action-groups {
  margin-top: 22px;
  display: flex; flex-direction: column; gap: 16px;
}
.action-group {
  background: rgb(var(--surface-card));
  border: 1px solid rgb(var(--border-subtle));
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}
.action-owner {
  font-size: 11px; font-weight: 700;
  color: rgb(var(--color-primary));
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 10px;
}
.action-list { list-style: none; padding: 0; margin: 0; }
.action-list li {
  display: flex; gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgb(var(--border-subtle));
}
.action-list li:first-child { border-top: none; padding-top: 0; }
.action-list li:last-child { padding-bottom: 0; }
.action-list .check {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border: 1.5px solid rgb(var(--border-strong));
  border-radius: 4px;
  margin-top: 2px;
  background: white;
}
.action-text {
  flex: 1;
  font-size: 15px; line-height: 1.5;
  color: rgb(var(--text-body));
}

/* ───── TRANSCRIPT PAGE ───────── */
.transcript-note {
  background: rgb(var(--surface-card-alt));
  border-left: 3px solid rgb(var(--color-primary));
  padding: 12px 14px;
  font-size: 13px; line-height: 1.5;
  color: rgb(var(--text-body));
  border-radius: var(--radius-sm);
  margin: 22px 0;
}
.transcript-body {
  margin-top: 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.utt {
  display: flex; flex-direction: column; gap: 4px;
}
.utt-meta {
  display: flex; gap: 10px; align-items: baseline;
}
.utt .spk {
  font-size: 13px; font-weight: 700;
  color: rgb(var(--text-heading));
  letter-spacing: -0.1px;
}
.utt .ts {
  font-size: 11px;
  color: rgb(var(--text-muted));
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.utt-text {
  font-size: 15px; line-height: 1.55;
  color: rgb(var(--text-body));
  padding-left: 0;
}

/* Color-code Jason / each director's name (subtle) */
.utt.spk-jason .spk    { color: rgb(var(--color-primary)); }
.utt.spk-eboni .spk    { color: rgb(217 119 6); }
.utt.spk-mia .spk      { color: rgb(5 150 105); }
.utt.spk-zeirdre .spk  { color: rgb(124 58 237); }
.utt.spk-caress .spk   { color: rgb(37 99 235); }
.utt.spk-lola .spk     { color: rgb(190 24 93); }

/* Print styles for "Save as PDF" */
@media print {
  body { background: white; font-size: 11pt; }
  .no-print { display: none !important; }
  .page { padding: 0; max-width: none; }
  .pin-gate { display: none !important; }
  #content { display: block !important; }
  .artifact-title { font-size: 20pt; }
  .artifact-eyebrow { font-size: 9pt; }
  .transcript-body { gap: 10px; }
  .utt { page-break-inside: avoid; }
}

.summary {
  margin-top: 28px;
  background: rgb(var(--surface-card));
  border: 1px solid rgb(var(--border-subtle));
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}
.summary h2 {
  font-size: 12px; font-weight: 700;
  color: rgb(var(--text-muted));
  letter-spacing: 1.4px; text-transform: uppercase;
  margin-bottom: 12px;
}
.summary ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.summary li {
  font-size: 15px; line-height: 1.45;
  color: rgb(var(--text-body));
  padding-left: 22px; position: relative;
}
.summary li::before {
  content: ""; position: absolute; left: 4px; top: 9px;
  width: 6px; height: 6px; border-radius: 999px;
  background: rgb(var(--color-primary));
}

.footer-nav {
  margin-top: 36px;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 18px;
  border-top: 1px solid rgb(var(--border-subtle));
  font-size: 13px;
  color: rgb(var(--text-muted));
}
.footer-nav .arrow-link {
  color: rgb(var(--text-heading));
  font-weight: 600;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  margin-left: -10px;
  transition: background 150ms ease, color 150ms ease;
}
.footer-nav .arrow-link:hover {
  background: rgb(var(--surface-card-alt));
  color: rgb(var(--color-primary));
  text-decoration: none;
}

/* ───── ARCHIVE LIST ──────────────────────── */
.archive-title {
  margin-top: 28px;
  font-size: 28px;
  color: rgb(var(--text-heading));
  font-weight: 700; letter-spacing: -0.5px;
}
.archive-subtitle {
  color: rgb(var(--text-muted));
  font-size: 14px;
  margin-top: 4px;
}
.archive-list {
  margin-top: 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.archive-row {
  background: rgb(var(--surface-card));
  border: 1px solid rgb(var(--border-subtle));
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 100ms ease;
  text-decoration: none; color: inherit;
}
.archive-row:hover {
  border-color: rgb(var(--border-strong));
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.archive-row:active { transform: scale(0.99); }
.archive-row .date {
  font-size: 12px; font-weight: 700;
  color: rgb(var(--text-muted));
  letter-spacing: 1px;
  min-width: 110px;
}
.archive-row .title {
  flex: 1;
  font-size: 15px; font-weight: 600;
  color: rgb(var(--text-heading));
}
.archive-row .arrow {
  color: rgb(var(--text-muted));
  font-weight: 600; font-size: 16px;
  transition: color 150ms ease;
}
.archive-row:hover .arrow { color: rgb(var(--color-primary)); }
.archive-row.latest {
  border-color: rgb(var(--color-primary));
}

/* Theme indicator — small color dot before the title and a thin
   accent on the left edge. Light touch so the operator can scan the
   archive and tell which meetings have themes set. */
.archive-row .archive-theme-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: 1px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}
.archive-row.has-theme {
  /* Slightly tighter padding-left so the colored border doesn't push
     the date column. */
  padding-left: 17px;
}
.archive-row.latest .latest-pill {
  background: rgb(var(--color-primary) / 0.10);
  color: rgb(var(--color-primary));
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
  letter-spacing: 0.3px;
}

/* ───── RESPONSIVE ────────────────────────── */
@media (max-width: 700px) {
  .week-title { font-size: 28px; }
  .archive-title { font-size: 24px; }
  .page {
    padding: 16px 16px calc(80px + var(--safe-bottom));
    padding-left: max(16px, var(--safe-left));
    padding-right: max(16px, var(--safe-right));
  }
  .actions .btn { flex: 1; justify-content: center; }
  .archive-row .date { min-width: 90px; font-size: 11px; }

  /* PIN letter-spacing — 12px is cramped on a 4-digit input narrower than
     ~340px. Drops to a comfortable 8px on phone widths. */
  .pin-input-row input { letter-spacing: 8px; }
  .pin-card { padding: 28px 22px 24px; }

  /* Topbar — bigger nav tap targets, slightly tighter padding to keep
     the brand + nav on a single row at iPhone-mini width. */
  .topbar { padding: 10px 4px 14px; }
  .topbar .nav a {
    padding: 10px 12px;
    font-size: 14px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }

  /* Meeting prev/next nav — stretch to full width with bigger taps. */
  .meeting-nav { font-size: 14px; }
  .meeting-nav a {
    padding: 10px 12px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }

  /* Editor card — tighter side padding so inputs have more room. */
  .next-meeting { padding: 18px 16px; }
  .nm-edit-grid, .nm-grid { gap: 14px; }

  /* Bigger tap targets on form controls. */
  .nm-field input,
  .nm-field select,
  .action-row .action-text,
  .item-row input.item-input,
  .nm-textarea-md,
  .team-update-input,
  .action-scope-select {
    padding: 12px 14px;
    min-height: 44px;
  }
  .nm-field select,
  .action-scope-select {
    background-position: right 12px center;
  }
  .item-row .rm {
    font-size: 26px;
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .btn-add-item {
    padding: 12px;
    font-size: 14px;
    min-height: 44px;
  }
  .btn-edit, .btn-cancel, .btn-save {
    padding: 11px 18px;
    min-height: 44px;
    font-size: 14px;
  }

  /* Action-item rows — owners pills wrap, give them breathing room and
     ensure each pill is a real 36px+ tap target. */
  .action-row {
    padding: 12px;
  }
  .owner-pill {
    padding: 8px 14px;
    font-size: 13px;
    min-height: 36px;
  }
  .action-scope { gap: 10px; flex-wrap: wrap; }
  .action-scope-label { flex-basis: 100%; }

  /* Sticky save bar — the editor form gets long on phone; the floating
     bottom bar means Save is always one tap away. Only the LAST button row
     pins (marked by .nm-edit-buttons-sticky); the middle inline saves stay
     in flow so the user has explicit checkpoints. */
  .nm-edit-buttons-sticky {
    position: sticky;
    bottom: 0;
    left: 0; right: 0;
    background: rgb(var(--surface-card));
    margin: 18px -16px -18px;
    padding: 14px 16px calc(14px + var(--safe-bottom));
    border-top: 1px solid rgb(var(--border-subtle));
    box-shadow: 0 -2px 12px rgb(15 23 42 / 0.06);
    z-index: 5;
  }
  .nm-edit-buttons-sticky .btn-save {
    flex: 1;
    justify-content: center;
    font-size: 15px;
  }

  /* Inline help text could push the layout — let it wrap nicely. */
  .nm-help, .nm-date-help { font-size: 13px; line-height: 1.45; }

  /* Resource cards — bigger row, tighter info packing for one-handed scan. */
  .resource { padding: 16px 18px; }
  .resource-icon { font-size: 24px; width: 36px; }
  .resource-label { font-size: 16px; }
  .resource-desc { font-size: 13px; }

  /* Operator shortcut — let it wrap */
  .operator-shortcut { flex-wrap: wrap; }
}

/* Even narrower (iPhone SE / Mini width). */
@media (max-width: 380px) {
  .topbar .brand .name { font-size: 13px; }
  .week-title { font-size: 24px; letter-spacing: -0.4px; }
  .pin-input-row input { letter-spacing: 6px; font-size: 18px; }
  /* Two-column action-row scope label can collide with select; keep stacked. */
  .nm-edit-grid.two-col { grid-template-columns: 1fr; }
}
