:root {
  --fg: #1a1a1a;
  --fg-muted: #6b7280;
  --bg: #fafaf9;
  --border: #e5e7eb;
  --accent: #1e40af;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
}

.site-header {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: white;
}

.site-header .brand {
  font-weight: 600;
  text-decoration: none;
  color: var(--fg);
  font-size: 1.05rem;
}

.site-header nav a {
  margin-right: 1rem;
  text-decoration: none;
  color: var(--fg-muted);
}

.site-header nav a:hover { color: var(--accent); }

main { padding: 2rem; max-width: 1100px; margin: 0 auto; }

h1 { font-size: 1.5rem; margin: 0 0 1rem; }

.muted { color: var(--fg-muted); }

table.data {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--border);
}

table.data th, table.data td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

table.data th {
  background: #f4f4f3;
  font-weight: 600;
  color: var(--fg-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table.data tr:last-child td { border-bottom: none; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: #f4f4f3;
  padding: 0.1em 0.4em;
  border-radius: 3px;
}

/* ---------- Detail page additions ---------- */

.breadcrumb { font-size: 0.85rem; color: var(--fg-muted); margin-bottom: 0.5rem; }
.breadcrumb a { color: var(--fg-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

.meta-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.4rem 1rem;
  margin: 1rem 0 2rem;
  font-size: 0.92rem;
}
.meta-grid dt { color: var(--fg-muted); font-weight: 500; }
.meta-grid dd { margin: 0; }

.pill {
  display: inline-block;
  padding: 0.1em 0.55em;
  border-radius: 99px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.82em;
  font-weight: 500;
}

section { margin: 2rem 0; }
section h2 {
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
section .count {
  color: var(--fg-muted);
  font-size: 0.85rem;
  font-weight: 400;
}

td.quote { font-style: italic; color: var(--fg-muted); max-width: 30ch; }

tr.disputed { background: #fef2f2; }

.flag {
  display: inline-block;
  padding: 0.05em 0.4em;
  border-radius: 3px;
  font-size: 0.72em;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.25em;
}
.flag.review { background: #fef3c7; color: #92400e; }
.flag.dispute { background: #fee2e2; color: #991b1b; }

.confidence {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  padding: 0.05em 0.4em;
  border-radius: 3px;
  background: #f4f4f3;
}
.confidence.c-9, .confidence.c-10 { background: #dcfce7; color: #166534; }
.confidence.c-7, .confidence.c-8 { background: #fef3c7; color: #92400e; }
.confidence.c-0, .confidence.c-1, .confidence.c-2, .confidence.c-3,
.confidence.c-4, .confidence.c-5, .confidence.c-6 { background: #fee2e2; color: #991b1b; }

/* ---------- Brief cards ---------- */

.brief-generate {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  font-size: 0.9rem;
}

.brief-generate label { display: flex; align-items: center; gap: 0.4rem; }

.brief-generate button {
  padding: 0.35rem 0.9rem;
  font-size: 0.88rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.brief-generate button:hover { filter: brightness(1.1); }

.brief-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  margin-bottom: 0.75rem;
}

.brief-card summary {
  padding: 0.6rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.9rem;
}

.brief-card[open] summary { border-bottom: 1px solid var(--border); }

.brief-version {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82em;
  background: #1e40af;
  color: white;
  padding: 0.15em 0.55em;
  border-radius: 3px;
  font-weight: 500;
}

.brief-time { font-weight: 500; }

.rating { color: #b45309; margin-left: auto; }

.brief-body { padding: 0.5rem 1.25rem 1.25rem; }
.brief-body h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  margin: 1.1rem 0 0.4rem;
}
.brief-body h3:first-of-type { margin-top: 0.5rem; }
.brief-body p { margin: 0.3rem 0; }

.moves { padding-left: 1.5rem; }
.moves li { margin-bottom: 0.75rem; }
.moves strong { display: block; margin-bottom: 0.15rem; }
.moves pre {
  background: #f4f4f3;
  padding: 0.5rem;
  font-size: 0.8em;
  overflow-x: auto;
  border-radius: 3px;
}

.risks li::marker { color: #dc2626; }

.brief-deps { font-size: 0.8rem; margin-top: 1rem; }

/* ---------- Public (BD-lead) surface ---------- */

.pursuit-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.pursuit-card {
  display: block;
  padding: 1.1rem 1.25rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.12s ease, transform 0.12s ease;
}

.pursuit-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.pursuit-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.pursuit-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-bottom: 0.35rem;
}

.pursuit-place { font-size: 0.9rem; }

.pursuit-created { font-size: 0.8rem; }

.pursuit-header {
  margin: 0.75rem 0 2rem;
}

.pursuit-header h1 { margin-bottom: 0.5rem; }

.brief-prose {
  max-width: 70ch;
  margin: 0 auto;
  padding: 0.5rem 0 1rem;
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg);
}

.brief-prose h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 2rem 0 0.4rem;
  letter-spacing: -0.01em;
}

.brief-prose h2:first-child { margin-top: 0; }

.brief-prose h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1.5rem 0 0.3rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.brief-prose p { margin: 0.5rem 0 0.9rem; }

.brief-prose ul,
.brief-prose ol {
  margin: 0.4rem 0 1rem;
  padding-left: 1.4rem;
}

.brief-prose li { margin-bottom: 0.4rem; }

.brief-prose strong { font-weight: 600; }

.brief-prose code {
  background: #f4f4f3;
  font-size: 0.9em;
}

.brief-prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.brief-footer {
  max-width: 70ch;
  margin: 2rem auto 0;
  font-size: 0.85rem;
  color: var(--fg-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
}

/* ---------- Form additions (knowledge entry) ---------- */

.entry-form {
  max-width: 760px;
  margin: 1rem 0 3rem;
}

.entry-form .form-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem 1.5rem;
  margin-bottom: 1.25rem;
}

.entry-form .form-section h2 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.entry-form .form-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

.entry-form .form-field {
  margin-bottom: 1rem;
}

.entry-form .form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: var(--fg);
}

.entry-form .req { color: #b91c1c; margin-left: 0.15rem; }

.entry-form input[type="text"],
.entry-form input[type="email"],
.entry-form input:not([type]),
.entry-form select,
.entry-form textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
  color: var(--fg);
}

.entry-form input:focus,
.entry-form select:focus,
.entry-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.15);
}

.entry-form textarea { resize: vertical; min-height: 4em; line-height: 1.5; }

.entry-form input[readonly] {
  background: #f4f4f3;
  color: var(--fg-muted);
}

.entry-form .form-locked {
  margin: 0;
  padding: 0.45rem 0.65rem;
  background: #f4f4f3;
  border-radius: 4px;
  font-size: 0.95rem;
}

.entry-form .form-help {
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin: 0.25rem 0 0;
}

.entry-form .form-inline {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.6rem;
}

.entry-form .form-inline .certainty { font-size: 0.88rem; }

.entry-form .form-subgrid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 0.6rem;
}

.entry-form .new-jurisdiction[hidden] { display: none; }
.entry-form .new-jurisdiction {
  margin-top: -0.4rem;
  padding: 0.85rem 1rem;
  background: #f4f4f3;
  border-radius: 4px;
}

.entry-form .form-repeat-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.entry-form .form-repeat-grid {
  display: grid;
  gap: 0.5rem;
  flex: 1;
}

.entry-form .form-repeat-grid--champion {
  grid-template-columns: 1fr 1fr 1.2fr 1.4fr 1fr;
}

.entry-form .form-repeat-grid--competitor {
  grid-template-columns: 1fr 2fr;
}

.entry-form .repeat-remove {
  flex: 0 0 auto;
  width: 1.85rem;
  height: 2.1rem;
  font-size: 1.1rem;
  line-height: 1;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  color: var(--fg-muted);
}

.entry-form .repeat-remove:hover {
  color: #b91c1c;
  border-color: #b91c1c;
}

.entry-form .repeat-add {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  background: white;
  border: 1px dashed var(--border);
  border-radius: 4px;
  cursor: pointer;
  color: var(--fg-muted);
}

.entry-form .repeat-add:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.entry-form .form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.entry-form button.primary {
  padding: 0.55rem 1.3rem;
  font-size: 0.95rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.entry-form button.primary:hover { filter: brightness(1.1); }

.entry-form .cancel {
  font-size: 0.9rem;
  color: var(--fg-muted);
  text-decoration: none;
}
.entry-form .cancel:hover { color: var(--accent); }

.form-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  color: #991b1b;
}
.form-errors strong { display: block; margin-bottom: 0.25rem; }
.form-errors ul { margin: 0; padding-left: 1.25rem; }

/* "+ New opportunity" affordance on the list page */
.new-opportunity-link {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 4px;
}
.new-opportunity-link:hover { filter: brightness(1.1); }

/* ============================================================
   Session 6 additions: upload form, error banner, job history
   ============================================================ */

.banner {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.banner-error {
  background: #fff4f4;
  border: 1px solid #e0a8a8;
  color: #6b1f1f;
}

form.upload-source {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 1rem 0;
  padding: 0.5rem 0;
}
form.upload-source button {
  /* match the look of the brief-generate button */
}
form.upload-source button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.upload-hint {
  font-size: 0.9em;
}

.job-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.job {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.95em;
}
.job-kind {
  display: inline-block;
  min-width: 5em;
  font-family: monospace;
  font-size: 0.9em;
}
.job-status {
  display: inline-block;
  min-width: 4em;
  font-weight: 600;
}
.job-done .job-status { color: #2a7a3f; }
.job-failed .job-status { color: #a13030; }
.job-time {
  color: #777;
  font-size: 0.9em;
  margin-left: 0.5rem;
}
.job-summary {
  margin-left: 0.5rem;
}
.job-error {
  background: #fdf4f4;
  border: 1px solid #e8d0d0;
  padding: 0.5rem;
  margin: 0.5rem 0 0 0;
  font-size: 0.85em;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 20em;
  overflow: auto;
}

/* ============================================================
   CivIntel design system (replaces previous Cover-voice layer)

   Plus Jakarta Sans, navy/sky two-tone palette, geometric
   confidence inspired by Starbridge but restrained for product
   surfaces. Existing styles above are untouched.
   ============================================================ */

:root {
  --navy:       #1A3A6B;
  --sky:        #5B8BC4;
  --navy-fill:  #EAF0F9;
  --sky-fill:   #DDE9F5;
  --pc-navy: #0b2342;
  --pc-blue: #4a7cb4;
  --pc-soft: #eaf2fb;
  --pc-soft-2: #f4f8fc;
  --pc-border: #d7e5f2;
  --pc-muted: #65748a;
  --pc-green: #4fce83;
  --pc-radius-card: 22px;
  --pc-radius-tile: 12px;
  --pc-shadow-card: 0 22px 55px rgba(11, 35, 66, 0.10);
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-body:    "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --accent: var(--navy);
}

/* ---------- Type system ---------- */

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  color: var(--fg);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--fg);
}

h1 { font-size: 2rem;    line-height: 1.15; margin: 0 0 1rem; }
h2 { font-size: 1.4rem;  line-height: 1.2;  margin: 0 0 0.75rem; }
h3 { font-size: 1.1rem;  line-height: 1.25; margin: 0 0 0.5rem; }

/* ---------- Wordmark ---------- */

.site-header .brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.site-header .brand .brand-civ   { color: var(--navy); }
.site-header .brand .brand-intel { color: var(--sky); }

/* ---------- Chip system ---------- */

.chip {
  display: inline-block;
  padding: 0.22em 0.7em;
  border-radius: 99px;
  background: var(--navy-fill);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.chip--muted {
  background: #f1f2f4;
  color: var(--fg-muted);
}

.chip--status {
  text-transform: lowercase;
  letter-spacing: 0.015em;
  font-weight: 700;
}

.chip--status-active  { background: var(--sky-fill);  color: var(--navy); }
.chip--status-dormant { background: #f1f2f4;          color: var(--fg-muted); }
.chip--status-won     { background: var(--sky);       color: white; }
.chip--status-lost    { background: #f1f2f4;          color: #8a3a3a; }

/* ---------- Pursuit hero (opportunity detail) ---------- */

.pursuit-hero {
  position: relative;
  margin: 1rem 0 2.5rem;
  padding: 0.25rem 0 1.75rem 1.25rem;
  border-left: 4px solid var(--navy);
  border-bottom: 1px solid var(--border);
}

.pursuit-hero__eyebrow {
  margin-bottom: 1rem;
}

.pursuit-hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--navy);
  margin: 0 0 1.25rem;
}

.pursuit-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ---------- Pursuit card ---------- */

.pursuit-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.2rem 1.3rem 1.3rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: white;
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.pursuit-card:hover {
  border-color: var(--sky);
  box-shadow: 0 4px 14px -6px rgba(26, 58, 107, 0.18);
  transform: translateY(-1px);
}

.pursuit-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.pursuit-card__date {
  font-size: 0.75rem;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.pursuit-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0;
}

.pursuit-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

/* ---------- Brief prose ---------- */

.brief-prose {
  max-width: 68ch;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg);
}

.brief-prose h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.022em;
  color: var(--navy);
  text-transform: none;
  margin: 2rem 0 0.5rem;
}

.brief-prose h2:first-child { margin-top: 0; }

.brief-prose h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
  color: var(--fg);
  text-transform: none;
  margin: 1.6rem 0 0.4rem;
}

/* ---------- Feed surface (public list) ---------- */

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 720px;
  margin: 1.5rem auto 0;
}

.feed-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 0;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--fg);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.feed-card:hover {
  border-color: var(--sky);
  box-shadow: 0 6px 18px -8px rgba(26, 58, 107, 0.22);
  transform: translateY(-1px);
}

.feed-card__thumb {
  height: 120px;
  width: 100%;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(135deg, var(--navy) 0%, var(--sky) 100%);
}

/* Jurisdiction gradient variants.
   Restrained civic-publication palette — not Spotify Wrapped. */

.feed-card--jurisdiction-pembroke-pines      .feed-card__thumb { background: linear-gradient(135deg, #0F5E5C 0%, #B8DDD0 100%); } /* deep teal → soft mint */
.feed-card--jurisdiction-city-of-cooper-city .feed-card__thumb { background: linear-gradient(135deg, #3F3A6B 0%, #C9C4E0 100%); } /* dusk purple → soft lavender */

/* Reserved variants (no jurisdiction currently mapped — defined for
   future opportunities so the palette is consistent when they land): */
.feed-card--variant-terracotta .feed-card__thumb { background: linear-gradient(135deg, #B85A3E 0%, #F2E4D0 100%); } /* terracotta → cream */
.feed-card--variant-forest     .feed-card__thumb { background: linear-gradient(135deg, #2E5A3B 0%, #B8CCB2 100%); } /* forest → sage */
.feed-card--variant-graphite   .feed-card__thumb { background: linear-gradient(135deg, #3A3F47 0%, #C8CBD0 100%); } /* graphite → silver */

.feed-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.feed-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}

.feed-card__path {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.feed-card__date {
  font-variant-numeric: tabular-nums;
}

.feed-heading {
  max-width: 720px;
  margin: 0 auto 0.5rem;
}

.feed-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0.4rem 0 0.6rem;
}

.feed-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}

/* ============================================================
   Chrome layout — sidebar + topbar
   Restructures base.html into product chrome.
   ============================================================ */

.app {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--navy-fill);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar .brand {
  font-size: 1.4rem;
  margin-bottom: 0.85rem;
  padding: 0 0.15rem;
}

.sidenav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidenav__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.sidenav__item:hover {
  background: white;
  color: var(--navy);
}

.sidenav__item--active {
  background: white;
  color: var(--navy);
  font-weight: 700;
}

.sidenav__item--disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: default;
}

.sidenav__icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  flex-shrink: 0;
}

.sidenav__label {
  flex: 1;
}

.sidenav__badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.1em 0.5em;
  border-radius: 99px;
  background: var(--sky-fill);
  color: var(--navy);
}

/* ---------- Main column ---------- */

.main-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ---------- Topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: white;
  border-bottom: 1px solid var(--border);
  min-height: 60px;
}

.topbar__search {
  flex: 1;
  max-width: 560px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  background: var(--navy-fill);
  border-radius: 8px;
}

.topbar__search-icon {
  width: 18px;
  height: 18px;
  color: var(--fg-muted);
  flex-shrink: 0;
}

.topbar__search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--fg);
  outline: none;
}

.topbar__search-input::placeholder {
  color: var(--fg-muted);
}

.topbar__search-input:disabled {
  cursor: not-allowed;
}

.topbar__user {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  user-select: none;
}

.topbar__account {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.topbar__account-name {
  color: var(--fg-muted);
  font-size: 0.82rem;
  font-weight: 700;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__logout {
  border: 1px solid var(--border);
  background: white;
  color: var(--navy);
  border-radius: 7px;
  padding: 0.42rem 0.65rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.topbar__logout:hover {
  border-color: var(--sky);
  background: var(--sky-fill);
}

/* ---------- Login ---------- */

.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy-fill), #ffffff 58%, var(--sky-fill));
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.login-panel {
  width: min(100%, 420px);
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(26, 58, 107, 0.12);
  padding: 2rem;
}

.login-logo {
  display: block;
  width: 172px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 1.65rem;
}

.login-panel h1 {
  margin: 0;
  color: var(--navy);
  font-size: 1.7rem;
}

.login-form {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.login-form label {
  color: var(--fg-muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.login-form input {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.78rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.login-form input:focus {
  border-color: var(--sky);
  outline: 3px solid var(--sky-fill);
}

.login-form button {
  margin-top: 0.6rem;
  border: none;
  border-radius: 7px;
  background: var(--navy);
  color: white;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-weight: 800;
  cursor: pointer;
}

.login-alert {
  margin-top: 1rem;
  border: 1px solid #f0c4c4;
  background: #fff4f4;
  color: #8a3a3a;
  border-radius: 7px;
  padding: 0.7rem 0.85rem;
  font-size: 0.86rem;
  font-weight: 700;
}

.login-alert--muted {
  border-color: var(--border);
  background: var(--navy-fill);
  color: var(--fg-muted);
}

/* ---------- Content page wrapper ---------- */

.page {
  padding: 2rem 2.5rem;
  max-width: none;
}

/* ---------- Wordmark (works in any context: sidebar, future surfaces) ---------- */

.brand {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.025em;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.brand .brand-civ   { color: var(--navy); }
.brand .brand-intel { color: var(--sky); }

.brand__logo {
  display: block;
  width: 176px;
  max-width: 100%;
  height: auto;
}

/* ---------- Feed grid (overrides single-column feed layout) ---------- */

.feed-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  max-width: 1100px;
  margin: 1.5rem auto 0;
}

.feed-heading {
  max-width: 1100px;
}

.feed-card {
  min-height: 280px;
}

.feed-card__thumb {
  height: 100px;
}

.feed-card__title {
  font-size: 1.25rem;
}

.feed-card__health {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.1rem 0 0.7rem;
}

.feed-card__health span {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
  padding: 0.55rem 0.45rem;
  border: 1px solid #dbe5f1;
  border-radius: 6px;
  background: #f8fbff;
}

.feed-card__health strong {
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.feed-card__health small {
  color: var(--fg-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
}

.feed-action {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.16rem 0.55rem;
  border-radius: 99px;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.2;
}

.feed-action--needed {
  border: 1px solid #d9b7b7;
  background: #fff7f7;
  color: #8a3a3a;
}

.feed-action--ready {
  border: 1px solid #c9d9ec;
  background: var(--navy-fill);
  color: var(--navy);
}

@media (max-width: 460px) {
  .feed-card__health {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.feed-page-head {
  max-width: 1100px;
  margin: 0 auto 1.2rem;
}

.feed-subhead {
  max-width: 54ch;
  margin: 0.25rem 0 0;
  color: var(--fg-muted);
}

.brief-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.brief-feed-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 300px;
  padding: 1.25rem 1.35rem 1.35rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 24px -22px rgba(26, 58, 107, 0.45);
}

.brief-feed-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  color: var(--fg-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brief-feed-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.22;
}

.brief-feed-card__title a {
  color: var(--navy);
  text-decoration: none;
}

.brief-feed-card__title a:hover {
  color: var(--sky);
}

.brief-feed-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.brief-feed-card__preview {
  margin: 0;
}

.brief-feed-card__preview h3 {
  margin: 0 0 0.25rem;
  color: var(--fg-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brief-feed-card__preview p {
  display: -webkit-box;
  margin: 0;
  color: var(--fg);
  font-size: 0.92rem;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.brief-feed-card__action {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--sky);
  border-radius: 4px;
  background: var(--navy-fill);
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.brief-feed-card__action:hover {
  background: var(--sky-fill);
}

.feed-empty {
  max-width: 1100px;
  margin: 1rem auto 0;
}

.brief-archive-feed {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.brief-archive-feed__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.brief-archive-feed__head h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.05rem;
}

.brief-archive-feed__head p {
  margin: 0;
}

.brief-history-list {
  display: grid;
  gap: 0.45rem;
}

.brief-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  color: var(--fg);
  text-decoration: none;
}

.brief-history-row:hover {
  border-color: var(--sky);
  background: #fbfdff;
}

.brief-history-row strong {
  display: block;
  color: var(--navy);
  line-height: 1.25;
}

.brief-history-row small {
  display: block;
  margin-top: 0.15rem;
  color: var(--fg-muted);
}

@media (max-width: 680px) {
  .brief-archive-feed__head {
    display: block;
  }

  .brief-history-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

/* ============================================================
   Internal command center additions
   ============================================================ */

.internal-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.internal-page-head h1 {
  margin-bottom: 0.45rem;
  color: var(--navy);
}

.internal-page-head--detail {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.internal-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky);
}

.internal-subhead {
  max-width: 62ch;
  margin: 0;
  color: var(--fg-muted);
}

.internal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.internal-primary-action {
  margin-top: 0;
  white-space: nowrap;
}

.secondary-action,
.table-action {
  display: inline-block;
  padding: 0.44rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.secondary-action:hover,
.table-action:hover {
  border-color: var(--sky);
  background: var(--sky-fill);
}

.table-action {
  min-width: 8.75rem;
  text-align: center;
  border-color: var(--sky);
  background: var(--navy-fill);
}

.user-add-form {
  margin-top: 0.9rem;
}

.user-add-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px) auto;
  gap: 0.85rem;
  align-items: end;
}

.user-add-actions {
  margin: 0;
}

.internal-head-chips {
  margin-top: 0.75rem;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.ops-grid--summary {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 0.85rem;
  margin: 0.75rem 0 1rem;
}

.ops-grid--detail {
  margin-top: 1.5rem;
}

.ops-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 104px;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
}

.ops-grid--summary .ops-card {
  position: relative;
  min-height: 118px;
  padding: 1.05rem 1.1rem;
  border: 1.5px solid #d8e2f0;
  background: linear-gradient(180deg, #ffffff 0%, var(--navy-fill) 100%);
  box-shadow: 0 8px 22px -18px rgba(26, 58, 107, 0.55);
  overflow: hidden;
}

.ops-grid--summary .ops-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--sky);
}

.ops-card--link {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.ops-card--link:hover {
  border-color: var(--sky);
  box-shadow: 0 4px 14px -8px rgba(26, 58, 107, 0.22);
}

.ops-card__label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.ops-card strong {
  color: var(--navy);
  font-size: 2rem;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.ops-grid--summary .ops-card strong {
  margin-top: 0.1rem;
  font-size: 2.45rem;
  font-weight: 800;
  letter-spacing: 0;
}

.ops-card__hint {
  color: var(--fg-muted);
  font-size: 0.86rem;
}

.ops-section {
  margin-top: 1.15rem;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.section-title-row h2 {
  margin-bottom: 0;
}

.data-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
}

.data-scroll table.data {
  border: none;
  min-width: 760px;
}

.ops-table {
  table-layout: fixed;
}

.ops-table th,
.ops-table td {
  vertical-align: top;
}

.ops-table th {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.ops-table td {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.ops-table tr:hover td {
  background: #fbfcfe;
}

.ops-table th:nth-child(1) { width: 28%; }
.ops-table th:nth-child(2) { width: 17%; }
.ops-table th:nth-child(3) { width: 11%; }
.ops-table th:nth-child(4) { width: 21%; }
.ops-table th:nth-child(5) { width: 13%; }
.ops-table th:nth-child(6) { width: 10%; }

.data-scroll table.data th:first-child,
.data-scroll table.data td:first-child {
  padding-left: 0.9rem;
}

.data-scroll table.data th:last-child,
.data-scroll table.data td:last-child {
  padding-right: 0.9rem;
}

.ops-title {
  display: inline-block;
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.ops-title:hover {
  color: var(--sky);
}

.pipeline-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-width: 22rem;
}

.pipeline-counts span {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 99px;
  background: var(--navy-fill);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.internal-alert {
  margin: 0 0 1.15rem;
  border-left: 4px solid #8a3a3a;
}

.job-status--done {
  color: var(--navy);
}

.job-status--failed {
  color: #8a3a3a;
}

.command-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.command-panel__item {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
}

.command-panel__item h2 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--navy);
}

.command-panel__item p {
  margin: 0 0 0.7rem;
}

.command-panel form.upload-source,
.command-panel .brief-generate {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  flex-wrap: wrap;
}

.section-nav {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1rem 0 1.5rem;
  padding: 0.65rem 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.section-nav a {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 99px;
  background: white;
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.section-nav a:hover {
  border-color: var(--sky);
  background: var(--sky-fill);
}

@media (max-width: 980px) {
  .internal-page-head,
  .command-panel {
    grid-template-columns: 1fr;
  }

  .internal-page-head {
    flex-direction: column;
  }

  .internal-actions {
    justify-content: flex-start;
  }

  .ops-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-grid--summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .page {
    padding: 1.25rem;
  }

  .ops-grid {
    grid-template-columns: 1fr;
  }

  .command-panel {
    display: block;
  }

  .command-panel__item + .command-panel__item {
    margin-top: 1rem;
  }

  .section-nav {
    position: static;
  }
}

/* ============================================================
   Internal operations visual QA refinements
   Page-specific overrides for the /internal/ command center.
   ============================================================ */

.internal-dashboard {
  padding-top: 0.1rem;
}

.internal-dashboard__head {
  align-items: center;
  margin-bottom: 0.85rem;
  padding-top: 0.1rem;
}

.internal-dashboard__head h1 {
  line-height: 1.08;
  margin: 0 0 0.45rem;
}

.internal-dashboard__head .internal-primary-action {
  align-self: flex-start;
  margin-top: 0.2rem;
  box-shadow: 0 4px 14px -10px rgba(26, 58, 107, 0.4);
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0.95rem 0 1.2rem;
}

.dashboard-metric-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 128px;
  padding: 1.05rem 1.1rem 1rem;
  border: 1.5px solid #d4e0ef;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, var(--navy-fill) 100%);
  box-shadow: 0 8px 24px -18px rgba(26, 58, 107, 0.5);
  overflow: hidden;
}

.dashboard-metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--sky);
}

.dashboard-metric-card__label {
  color: var(--fg-muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dashboard-metric-card__value {
  align-self: center;
  color: var(--navy);
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dashboard-metric-card__hint {
  color: var(--fg-muted);
  font-size: 0.86rem;
  line-height: 1.3;
}

.internal-dashboard .internal-alert {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.35rem;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  border-left: 4px solid #8a3a3a;
}

.dashboard-queue {
  margin-top: 0;
}

.dashboard-queue__head {
  align-items: end;
  margin-bottom: 0.75rem;
}

.dashboard-queue__head h2 {
  color: var(--navy);
  font-size: 1.15rem;
}

.dashboard-table-wrap {
  border-radius: 8px;
  border-color: #dce3ee;
  box-shadow: 0 8px 24px -22px rgba(26, 58, 107, 0.5);
}

.dashboard-table {
  min-width: 980px;
  table-layout: fixed;
}

.dashboard-table thead th {
  padding: 0.78rem 0.9rem;
  background: var(--navy-fill);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-bottom: 1px solid #d4e0ef;
}

.dashboard-table tbody td {
  padding: 1rem 0.9rem;
  vertical-align: top;
  border-bottom: 1px solid #edf1f6;
}

.dashboard-table tbody tr:last-child td {
  border-bottom: none;
}

.dashboard-table tbody tr:hover td {
  background: #fbfdff;
}

.dashboard-table th:nth-child(1) { width: 28%; }
.dashboard-table th:nth-child(2) { width: 15%; }
.dashboard-table th:nth-child(3) { width: 9%; }
.dashboard-table th:nth-child(4) { width: 18%; }
.dashboard-table th:nth-child(5) { width: 14%; }
.dashboard-table th:nth-child(6) { width: 16%; }

.dashboard-pursuit-link {
  color: var(--navy);
  font-size: 0.98rem;
  line-height: 1.25;
}

.dashboard-slug {
  margin-top: 0.35rem;
  color: var(--fg-muted);
}

.dashboard-slug code {
  background: #f7f9fc;
}

.dashboard-pipeline {
  gap: 0.26rem;
  max-width: 15rem;
}

.dashboard-pipeline span {
  padding: 0.18rem 0.46rem;
  border: 1px solid #d4e0ef;
  background: #f7fafd;
  color: var(--navy);
  font-size: 0.72rem;
  line-height: 1.25;
}

.dashboard-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  max-width: 10rem;
  padding: 0.5rem 0.58rem;
  border-color: var(--sky);
  background: var(--navy);
  color: white;
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: normal;
}

.dashboard-action:hover {
  background: var(--sky);
  color: white;
}

.internal-head-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.chip--status-archived {
  background: #f1f5f9;
  color: #526175;
}

.dashboard-archive-reason {
  margin-top: 0.45rem;
  color: var(--fg-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.archive-status-banner {
  margin: 0 0 1rem;
  border-left: 4px solid var(--sky);
}

.archive-panel {
  margin-top: 1rem;
}

.archive-form {
  display: grid;
  gap: 0.55rem;
}

.archive-form label {
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.archive-form textarea {
  width: 100%;
  border: 1px solid #cbd7e6;
  border-radius: 6px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  resize: vertical;
}

.danger-action {
  justify-self: start;
  border: 1px solid #a65050;
  background: #8a3a3a;
  color: white;
}

.danger-action:hover {
  background: #713030;
}

@media (max-width: 1100px) {
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .internal-dashboard__head {
    align-items: flex-start;
  }

  .dashboard-metrics {
    grid-template-columns: 1fr;
  }

  .internal-dashboard .internal-alert {
    display: block;
  }

  .user-add-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Pursuit Command platform card system
   Shared card language for app, briefs, and internal summaries.
   ============================================================ */

.pc-card {
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-card);
  background: #fff;
  box-shadow: var(--pc-shadow-card);
  overflow: hidden;
}

.pc-card--link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.pc-card--link:hover,
.pc-card--link:focus-visible {
  border-color: rgba(74, 124, 180, 0.56);
  box-shadow: 0 26px 64px rgba(11, 35, 66, 0.14);
  transform: translateY(-2px);
}

.pc-card--link:focus-visible {
  outline: 3px solid rgba(91, 139, 196, 0.28);
  outline-offset: 3px;
}

.pc-card__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.2rem;
  padding: 0.8rem 1.35rem;
  background: linear-gradient(135deg, var(--pc-navy) 0%, #143963 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.pc-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.45rem;
}

.pc-card__title {
  margin: 0;
  color: var(--pc-navy);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.026em;
  line-height: 1.12;
}

.pc-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  color: var(--pc-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 1.3;
  text-transform: uppercase;
}

.pc-card__status {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  min-height: 1.55rem;
  padding: 0.24rem 0.58rem;
  border: 1px solid rgba(79, 206, 131, 0.3);
  border-radius: 999px;
  background: rgba(79, 206, 131, 0.14);
  color: #dffbea;
  font-size: 0.66rem;
  letter-spacing: 0.055em;
}

.pc-card__status-dot {
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 999px;
  background: var(--pc-green);
  box-shadow: 0 0 0 3px rgba(79, 206, 131, 0.16);
}

.pc-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pc-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.pc-stat-tile {
  min-width: 0;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-tile);
  background: var(--pc-soft-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.pc-stat-tile strong {
  color: var(--pc-navy);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pc-stat-tile small,
.pc-stat-tile .dashboard-metric-card__label,
.pc-stat-tile .ops-card__label {
  color: var(--pc-muted);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pc-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.pc-insight {
  margin: 0;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-tile);
  background: #fff;
  padding: 0.9rem;
}

.pc-insight--blue {
  background: var(--pc-soft);
}

.pc-insight h3 {
  margin: 0 0 0.35rem;
  color: var(--pc-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.pc-insight p {
  margin: 0;
  color: var(--pc-navy);
  font-size: 0.9rem;
  line-height: 1.48;
}

.pc-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--pc-border);
  color: var(--pc-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 1.25;
  text-transform: uppercase;
}

.pc-card__footer strong,
.pc-card__footer a {
  color: var(--pc-navy);
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: none;
}

.pc-icon-button {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid var(--pc-border);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--pc-navy);
}

.feed-list {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.35rem;
  max-width: 1180px;
}

.feed-card.pc-card {
  min-height: 0;
  border-width: 1px;
  border-radius: var(--pc-radius-card);
}

.feed-card.pc-card:hover {
  border-color: rgba(74, 124, 180, 0.56);
}

.feed-card .pc-card__body {
  padding: 1.4rem;
}

.feed-card__title.pc-card__title {
  margin: 0.1rem 0 0.15rem;
  font-size: 1.34rem;
}

.feed-card__health.pc-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0.05rem 0 0;
  gap: 0.55rem;
}

.feed-card__health .pc-stat-tile {
  display: grid;
  gap: 0.15rem;
  min-height: 4.35rem;
  padding: 0.68rem 0.58rem;
  background: var(--pc-soft-2);
  border-radius: var(--pc-radius-tile);
}

.feed-card__health .pc-stat-tile strong {
  font-size: 1.24rem;
  line-height: 1;
}

.feed-card__health .pc-stat-tile small {
  font-size: 0.66rem;
  line-height: 1.1;
}

.feed-card__footer strong {
  text-align: right;
}

.brief-feed {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.35rem;
  max-width: 1180px;
}

.brief-feed-card.pc-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  padding: 0;
  border-width: 1px;
  border-radius: var(--pc-radius-card);
  box-shadow: var(--pc-shadow-card);
}

.brief-feed-card .pc-card__body {
  padding: 1.35rem;
}

.brief-feed-card__meta.pc-card__meta {
  color: var(--pc-muted);
  font-size: 0.74rem;
}

.brief-feed-card__title.pc-card__title {
  font-size: 1.28rem;
}

.brief-feed-card__preview.pc-insight p {
  -webkit-line-clamp: 4;
  color: var(--pc-navy);
}

.brief-feed-card__action {
  align-self: auto;
  margin-top: 0;
  border-color: var(--pc-border);
  border-radius: 999px;
  background: var(--pc-soft);
  color: var(--pc-navy);
}

.brief-feed-card__action:hover,
.brief-feed-card__action:focus-visible {
  border-color: var(--pc-blue);
  background: #dcecf9;
}

.dashboard-metric-card.pc-stat-tile {
  min-height: 132px;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-tile);
  background: var(--pc-soft-2);
  box-shadow: 0 14px 34px rgba(11, 35, 66, 0.08);
}

.dashboard-metric-card.pc-stat-tile::before {
  height: 0;
}

.ops-card.pc-stat-tile {
  min-height: 118px;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-tile);
  background: var(--pc-soft-2);
  box-shadow: 0 14px 34px rgba(11, 35, 66, 0.08);
}

.ops-card.pc-stat-tile strong {
  color: var(--pc-navy);
}

.ops-card--link.pc-stat-tile:hover,
.ops-card--link.pc-stat-tile:focus-visible {
  border-color: rgba(74, 124, 180, 0.56);
  box-shadow: 0 18px 42px rgba(11, 35, 66, 0.12);
}

.meta-grid.pc-card--overview {
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-card);
  background: #fff;
  box-shadow: var(--pc-shadow-card);
}

@media (max-width: 900px) {
  .pc-insight-grid {
    grid-template-columns: 1fr;
  }

  .feed-card__health.pc-stat-grid,
  .pc-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .pc-card__topbar,
  .pc-card__meta,
  .pc-card__footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .pc-card__body,
  .feed-card .pc-card__body,
  .brief-feed-card .pc-card__body {
    padding: 1.1rem;
  }

  .feed-list,
  .brief-feed {
    grid-template-columns: 1fr;
  }
}

.brief-feedback {
  max-width: 760px;
  margin: 2rem 0 0;
}

.brief-feedback h2 {
  margin: 0 0 0.3rem;
  color: var(--pc-navy);
  font-size: 1.24rem;
}

.brief-feedback .muted {
  margin: 0;
}

.brief-feedback__success,
.brief-feedback__error {
  margin: 0;
  border-radius: 12px;
}

.brief-feedback__success {
  border-left: 4px solid var(--pc-green);
}

.brief-feedback__form {
  display: grid;
  gap: 0.9rem;
}

.brief-feedback__form label {
  display: grid;
  gap: 0.4rem;
  color: var(--pc-navy);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.brief-feedback__form select,
.brief-feedback__form textarea {
  width: 100%;
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  background: var(--pc-soft-2);
  color: var(--fg);
  font: inherit;
  letter-spacing: 0;
  padding: 0.78rem 0.9rem;
  text-transform: none;
}

.brief-feedback__form textarea {
  resize: vertical;
}

.brief-feedback__form button {
  justify-self: start;
  border: none;
}

.collapsible-section {
  margin: 1rem 0;
}

.collapsible-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.2rem;
  border-radius: var(--pc-radius-card);
  background: var(--pc-soft-2);
  color: var(--pc-navy);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.collapsible-section > summary::-webkit-details-marker {
  display: none;
}

.collapsible-section > summary::after {
  content: "";
  width: 0.62rem;
  height: 0.62rem;
  border-right: 2px solid var(--pc-blue);
  border-bottom: 2px solid var(--pc-blue);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.collapsible-section[open] > summary {
  border-bottom: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-card) var(--pc-radius-card) 0 0;
}

.collapsible-section[open] > summary::after {
  transform: rotate(225deg);
}

.collapsible-section > summary .count {
  margin-left: auto;
  border: 1px solid var(--pc-border);
  border-radius: 999px;
  background: #fff;
  color: var(--pc-muted);
  font-size: 0.75rem;
  font-weight: 800;
  min-width: 2rem;
  padding: 0.22rem 0.55rem;
  text-align: center;
}

.collapsible-section__body {
  padding: 1rem 1.15rem 1.15rem;
}

.feedback-list {
  display: grid;
  gap: 0.8rem;
}

.feedback-item {
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-tile);
  background: #fff;
  padding: 0.95rem;
}

.feedback-item--open {
  background: var(--pc-soft-2);
}

.feedback-item__head,
.feedback-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
}

.feedback-item__head {
  justify-content: space-between;
}

.feedback-item__category,
.feedback-item__status {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.065em;
  padding: 0.2rem 0.55rem;
  text-transform: uppercase;
}

.feedback-item__category {
  background: var(--pc-soft);
  color: var(--pc-navy);
}

.feedback-item__status {
  background: rgba(79, 206, 131, 0.16);
  color: #247144;
}

.feedback-item p {
  margin: 0.65rem 0;
  color: var(--pc-navy);
  line-height: 1.5;
}

.feedback-item__meta {
  color: var(--pc-muted);
  font-size: 0.78rem;
}

.inline-delete-form {
  margin: 0;
}

.delete-inline {
  border: 1px solid #d6a8a8;
  border-radius: 999px;
  background: #fff8f8;
  color: #8a3a3a;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 0.28rem 0.58rem;
}

.delete-inline:hover,
.delete-inline:focus-visible {
  border-color: #a65050;
  background: #fff1f1;
  outline: none;
}

.job-delete-form,
.brief-delete-form {
  margin-top: 0.65rem;
}

.feedback-item .inline-delete-form {
  margin-top: 0.7rem;
}

.delete-status-banner {
  margin: 0.85rem 0 1rem;
  border-left: 4px solid var(--pc-blue);
}

.municipality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.35rem;
  max-width: 1180px;
  margin: 0 auto;
}

.municipality-card__title {
  font-size: 1.36rem;
}

.municipality-card__link {
  color: var(--pc-muted);
  display: block;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.municipality-card__stats .pc-stat-tile {
  display: grid;
  gap: 0.1rem;
  min-height: 4.2rem;
  min-width: 0;
  padding: 0.62rem 0.52rem;
}

.municipality-card__stats strong {
  font-size: 1.2rem;
  line-height: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.municipality-card__stats small {
  font-size: 0.68rem;
  letter-spacing: 0;
  line-height: 1.15;
  min-width: 0;
  overflow-wrap: normal;
  text-transform: none;
  white-space: normal;
}

.municipality-website-chip {
  text-decoration: none;
}

.municipality-overview .municipality-overview__text {
  font-size: 1rem;
  line-height: 1.3;
}

.municipality-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding-left: 1.1rem;
}

.municipality-list li {
  line-height: 1.45;
}

.municipality-list .muted {
  display: block;
  margin-top: 0.12rem;
}

.municipality-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.municipality-actions form,
.internal-head-actions form {
  margin: 0;
}

.municipality-back-link {
  display: inline-flex;
  margin-bottom: 18px;
}

.legistar-table-wrap {
  overflow-x: visible;
}

.legistar-review-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.legistar-review-table th:nth-child(n) {
  width: auto;
}

.legistar-configured-table th:nth-child(1) { width: 22%; }
.legistar-configured-table th:nth-child(2) { width: 13%; }
.legistar-configured-table th:nth-child(3) { width: 14%; }
.legistar-configured-table th:nth-child(4) { width: 27%; }
.legistar-configured-table th:nth-child(5) { width: 11%; }
.legistar-configured-table th:nth-child(6) { width: 13%; }

.legistar-candidate-table th:nth-child(1) { width: 18%; }
.legistar-candidate-table th:nth-child(2) { width: 10%; }
.legistar-candidate-table th:nth-child(3) { width: 20%; }
.legistar-candidate-table th:nth-child(4) { width: 11%; }
.legistar-candidate-table th:nth-child(5) { width: 14%; }
.legistar-candidate-table th:nth-child(6) { width: 10%; }
.legistar-candidate-table th:nth-child(7) { width: 10%; }
.legistar-candidate-table th:nth-child(8) { width: 11%; }

.legistar-needs-review-table th:nth-child(1),
.legistar-not-found-table th:nth-child(1) { width: 18%; }
.legistar-needs-review-table th:nth-child(2),
.legistar-not-found-table th:nth-child(2) { width: 10%; }
.legistar-needs-review-table th:nth-child(3),
.legistar-not-found-table th:nth-child(3) { width: 12%; }
.legistar-needs-review-table th:nth-child(4),
.legistar-not-found-table th:nth-child(4) { width: 11%; }
.legistar-needs-review-table th:nth-child(5),
.legistar-not-found-table th:nth-child(5) { width: 10%; }
.legistar-needs-review-table th:nth-child(6),
.legistar-not-found-table th:nth-child(6) { width: 10%; }
.legistar-needs-review-table th:nth-child(7),
.legistar-not-found-table th:nth-child(7) { width: 19%; }
.legistar-needs-review-table th:nth-child(8),
.legistar-not-found-table th:nth-child(8) { width: 10%; }

.legistar-url {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legistar-actions {
  align-items: stretch;
  flex-direction: column;
}

.legistar-actions .secondary-action,
.legistar-actions .table-action {
  width: 100%;
  min-width: 0;
  text-align: center;
}

@media (max-width: 900px) {
  .legistar-review-table {
    table-layout: auto;
  }

  .legistar-actions {
    min-width: 8.75rem;
  }
}

.municipality-command-link {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.municipality-command-link h2 {
  margin: 0 0 6px;
}

.municipality-command-link p {
  margin: 0;
}

.municipality-county-counts {
  margin: 0 0 18px;
}

.municipality-seed-warnings {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
}

.municipality-scrape-panel {
  align-items: center;
  background: var(--pc-soft-2);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-tile);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 0 1.25rem;
  padding: 1rem;
}

.municipality-scrape-panel h2,
.municipality-scrape-panel p,
.municipality-scrape-panel form {
  margin: 0;
}

.municipality-intel-status {
  background: var(--pc-soft-2);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-tile);
  margin: 0 0 1.25rem;
  padding: 1rem;
}

.municipality-intel-status h2,
.municipality-intel-status p {
  margin: 0;
}

.municipality-intel-status__grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1rem;
}

.municipality-intel-status__grid div {
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-tile);
  padding: 0.75rem;
}

.municipality-intel-status__grid strong,
.municipality-intel-status__grid span {
  display: block;
}

.municipality-intel-status__grid strong {
  color: var(--navy);
  font-size: 1.25rem;
  line-height: 1.2;
}

.municipality-intel-status__grid span {
  color: var(--pc-muted);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.municipality-admin-table th:nth-child(1) { width: 28%; }
.municipality-admin-table th:nth-child(2) { width: 18%; }
.municipality-admin-table th:nth-child(3) { width: 18%; }
.municipality-admin-table th:nth-child(4) { width: 22%; }
.municipality-admin-table th:nth-child(5) { width: 14%; }

@media (max-width: 760px) {
  .municipality-card__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .municipality-command-link {
    align-items: flex-start;
    flex-direction: column;
  }

  .municipality-scrape-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .municipality-intel-status__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================================
   Public landing page
   ============================================================ */

.landing-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 18%, rgba(91, 139, 196, 0.16), transparent 34rem),
    linear-gradient(180deg, #f6f9fd 0%, #ffffff 42%, #eef5fb 100%);
  color: var(--navy);
  font-family: var(--font-body);
}

.landing-shell {
  width: min(1400px, calc(100% - 4rem));
  margin: 0 auto;
}

.landing-nav {
  width: min(1400px, calc(100% - 4rem));
  margin: 0 auto;
  padding: 0.9rem 0 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.landing-shell .landing-nav {
  width: 100%;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  line-height: 0;
}

.landing-brand img {
  display: block;
  width: 210px;
  max-height: 72px;
  max-width: 58vw;
  height: auto;
  object-fit: contain;
}

.landing-nav nav {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.landing-nav a {
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.landing-nav__cta,
.landing-primary,
.landing-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.68rem 1rem;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.landing-nav__cta,
.landing-primary {
  background: var(--navy);
  color: white !important;
}

.landing-secondary {
  border: 1px solid #c9d8ea;
  background: white;
  color: var(--navy);
}

.landing-hero {
  padding: 2.5rem 0 2.35rem;
  display: grid;
  grid-template-columns: minmax(560px, 0.95fr) minmax(520px, 1.05fr);
  gap: clamp(3.25rem, 4.6vw, 4rem);
  align-items: center;
}

.landing-eyebrow {
  margin: 0 0 0.7rem;
  color: var(--sky);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.landing-hero__copy {
  max-width: 680px;
}

.landing-hero h1 {
  max-width: 720px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(4rem, 4.75vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.landing-lede {
  max-width: 660px;
  margin: 1.25rem 0 0;
  color: #45607f;
  font-size: 1.04rem;
  line-height: 1.58;
}

.landing-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.45rem;
}

.landing-preview {
  width: min(100%, 620px);
  justify-self: end;
  overflow: hidden;
  border: 1px solid #cddbea;
  border-radius: 10px;
  background: white;
  box-shadow: 0 28px 70px rgba(26, 58, 107, 0.18);
  padding: 0;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--navy);
  color: white;
  padding: 0.95rem 1rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.preview-status {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  padding: 0.32rem 0.65rem;
}

.preview-status span {
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 999px;
  background: #54d38a;
  box-shadow: 0 0 0 3px rgba(84, 211, 138, 0.22);
}

.preview-title-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1rem 0.8rem;
}

.preview-title-row h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.45rem;
  line-height: 1.1;
}

.preview-title-row p {
  margin: 0.35rem 0 0;
  color: #5d6f85;
  font-size: 0.92rem;
}

.preview-actions {
  display: flex;
  gap: 0.45rem;
}

.preview-actions span {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid #d4e0ee;
  border-radius: 999px;
  color: var(--navy);
  font-weight: 800;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0;
  padding: 0 1rem 0.95rem;
}

.preview-grid div,
.preview-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--navy-fill);
  padding: 0.82rem 0.9rem;
}

.preview-grid span,
.preview-label {
  display: block;
  color: var(--fg-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.preview-grid strong {
  display: block;
  margin-top: 0.18rem;
  color: var(--navy);
  font-size: 1.82rem;
}

.preview-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 0 1rem 1rem;
}

.preview-card {
  background: white;
}

.preview-card--blue {
  background: var(--sky-fill);
}

.preview-card p {
  margin: 0.3rem 0 0;
  color: #314c6d;
  line-height: 1.5;
}

.preview-card small,
.preview-card a {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--sky);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.preview-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 1rem;
  padding: 0.9rem 0 1rem;
  border-top: 1px solid #d4e0ee;
  color: var(--fg-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.preview-footer strong {
  color: var(--navy);
  text-align: right;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  padding: 0.35rem 0 1.75rem;
}

.feature-strip article {
  min-height: 156px;
  border: 1px solid #d4e0ee;
  border-radius: 10px;
  background: white;
  box-shadow: 0 14px 34px rgba(26, 58, 107, 0.07);
  padding: 1.05rem;
  position: relative;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.feature-strip article:hover {
  border-color: rgba(91, 139, 196, 0.56);
  box-shadow: 0 18px 42px rgba(26, 58, 107, 0.11);
  transform: translateY(-2px);
}

.feature-strip h3 {
  margin: 0.9rem 0 0.38rem;
  color: var(--navy);
  font-size: 0.96rem;
  line-height: 1.2;
}

.feature-strip p {
  color: #526175;
  font-size: 0.82rem;
  line-height: 1.42;
  margin: 0;
}

.feature-icon {
  display: inline-grid;
  width: 3.05rem;
  height: 3.05rem;
  place-items: center;
  border-radius: 999px;
  background:
    linear-gradient(135deg, var(--navy) 0%, var(--sky) 100%);
  color: white;
  box-shadow: 0 10px 22px rgba(26, 58, 107, 0.18);
}

.feature-icon svg {
  width: 1.48rem;
  height: 1.48rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.feature-arrow {
  position: absolute;
  right: 1rem;
  bottom: 0.9rem;
  color: var(--sky);
  font-weight: 800;
  opacity: 0.72;
}

.landing-trust-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 0 0 1.6rem;
  border-radius: 10px;
  background: var(--navy);
  color: white;
  padding: 1rem 1.15rem;
  box-shadow: 0 20px 48px rgba(26, 58, 107, 0.2);
}

.landing-trust-strip p {
  margin: 0;
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.trust-badges span {
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.36rem 0.62rem;
}

.request-access-shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.65rem 0 4.5rem;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.8fr);
  gap: 4rem;
  align-items: start;
}

.request-access-copy h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  line-height: 1;
}

.request-access-copy p:not(.landing-eyebrow) {
  color: #526175;
  font-size: 1.05rem;
  line-height: 1.7;
}

.request-access-panel {
  border: 1px solid #d4e0ee;
  border-radius: 8px;
  background: white;
  box-shadow: 0 22px 60px rgba(26, 58, 107, 0.12);
  padding: 1.5rem;
}

.request-access-form {
  display: grid;
  gap: 0.7rem;
}

.request-access-form label {
  color: var(--fg-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.request-access-form input,
.request-access-form textarea {
  width: 100%;
  border: 1px solid #cbd7e6;
  border-radius: 7px;
  padding: 0.75rem 0.85rem;
  font: inherit;
}

.request-access-form textarea {
  resize: vertical;
}

.request-access-form button {
  margin-top: 0.6rem;
  border: none;
  border-radius: 7px;
  background: var(--navy);
  color: white;
  padding: 0.85rem 1rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 1240px) {
  .landing-hero,
  .request-access-shell {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    min-height: auto;
    padding: 1.25rem 0 1.5rem;
    gap: 2rem;
  }

  .landing-preview {
    justify-self: start;
    width: min(100%, 620px);
  }

  .feature-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .landing-shell,
  .landing-nav {
    width: min(100% - 2rem, 1400px);
  }
}

@media (max-width: 640px) {
  .landing-nav {
    align-items: center;
    flex-wrap: wrap;
    padding: 0.8rem 0 0.7rem;
  }

  .landing-nav nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.55rem 0.75rem;
  }

  .landing-nav nav a:not(.landing-nav__cta) {
    display: inline-flex;
  }

  .landing-brand img {
    width: 176px;
    max-height: 60px;
  }

  .landing-hero h1 {
    font-size: clamp(2.45rem, 10vw, 3.1rem);
    line-height: 1.03;
  }

  .landing-lede {
    font-size: 1rem;
    line-height: 1.56;
  }

  .landing-actions {
    width: 100%;
  }

  .landing-actions .landing-primary,
  .landing-actions .landing-secondary {
    flex: 1 1 10rem;
  }

  .feature-strip,
  .preview-grid,
  .preview-card-grid {
    grid-template-columns: 1fr;
  }

  .preview-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .preview-footer strong {
    text-align: left;
  }

  .landing-trust-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .trust-badges {
    justify-content: flex-start;
  }

  .landing-nav a {
    font-size: 0.82rem;
  }
}
