/* CAS Total Solutions — Document Intelligence Platform
   Frontend-only styling. No backend behaviour is defined here. */

:root {
  color-scheme: light;

  /* Brand tokens sourced from https://castotal.com/ */
  --cas-primary: #0092cb;
  --cas-primary-hover: #0080b3;
  --cas-primary-soft: #e5f5fc;
  --cas-indigo: #3c3489;
  --cas-indigo-hover: #2f2870;
  --cas-periwinkle: #8b83e4;
  --cas-periwinkle-soft: #eeecfb;

  /* Surfaces */
  --canvas: #f4f6fb;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --surface-container: #eef1f7;

  /* Ink */
  --ink: #0b1320;
  --accent-ink: #191829;
  --headline: #1a2536;
  --body: #54595f;
  --muted: #676767;
  --slate: #64748b;

  /* Lines & state */
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --error: #ba1a1a;
  --error-soft: #fdedec;
  --warn: #b45309;
  --warn-soft: #fdf6e7;
  --ok: #0f7b5f;
  --ok-soft: #e6f5f0;

  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-pill: 9999px;

  --lift: 0 12px 32px -8px rgba(11, 19, 32, 0.06), 0 2px 6px -1px rgba(11, 19, 32, 0.02);
  --shadow-sm: 0 1px 2px rgba(11, 19, 32, 0.04);

  font-family: "Plus Jakarta Sans", system-ui, "Noto Sans Khmer", sans-serif;
  color: var(--headline);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
img { max-width: 100%; }

a { color: var(--cas-primary); }

:focus-visible { outline: 2px solid var(--cas-primary); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  background: var(--cas-primary); color: #fff; padding: 12px 18px;
  border-radius: 0 0 var(--radius) 0; font-size: 14px; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px max(5vw, 24px);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 20px; text-decoration: none; }
.brand-mark { height: 36px; width: auto; object-fit: contain; }
.brand-sub {
  padding-left: 20px; border-left: 1px solid var(--border);
  font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0.01em;
}

.pill, .badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 12px; border-radius: var(--radius-pill);
}
.pill-quiet { background: var(--surface-container); color: var(--body); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px max(5vw, 24px) 40px; }
.hero-glow { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.hero-glow-a { width: 380px; height: 380px; top: -140px; left: -110px; background: rgba(0, 146, 203, 0.16); }
.hero-glow-b { width: 320px; height: 320px; top: -100px; right: -60px; background: rgba(139, 131, 228, 0.18); }
.hero-watermark {
  position: absolute; right: 3vw; top: 50%; transform: translateY(-50%);
  font-size: 96px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-ink); opacity: 0.035; pointer-events: none; user-select: none;
  white-space: nowrap;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px;
}
.hero-copy { max-width: 720px; }
.eyebrow {
  margin: 0 0 14px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--slate);
}
.badge-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 7px 14px; border-radius: var(--radius-pill);
  background: var(--cas-periwinkle-soft); color: var(--cas-indigo);
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.badge-pill .material-symbols-outlined { font-size: 16px; }
.hero h1 {
  margin: 0 0 14px; font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; color: var(--headline);
}
.hero h1 em { font-style: italic; font-weight: 400; color: var(--cas-primary); }
.hero-lede { margin: 0; max-width: 62ch; font-size: 16px; line-height: 1.65; color: var(--body); }

.telemetry { display: flex; gap: 14px; flex-wrap: wrap; }
.telemetry-card {
  display: flex; align-items: center; gap: 12px; min-width: 190px;
  padding: 14px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.telemetry-icon { color: var(--cas-primary); font-size: 20px; }
.telemetry-label { margin: 0 0 2px; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate); }
.telemetry-value { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--headline); font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.workstation { max-width: 1280px; margin: 0 auto; padding: 8px max(5vw, 24px) 72px; }
.layout { display: grid; grid-template-columns: 5fr 7fr; gap: 28px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* Keep the ingestion rail in view while long result lists scroll past. */
@media (min-width: 1081px) {
  .col-ingest { position: sticky; top: 96px; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-sm);
  padding: 24px; display: flex; flex-direction: column; gap: 18px; min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.card-head h2 {
  display: flex; align-items: center; gap: 9px; margin: 0;
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--headline);
}
.icon { color: var(--cas-primary); font-size: 21px; }
.tag {
  padding: 5px 11px; border-radius: var(--radius-pill); background: var(--surface-container);
  color: var(--body); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
label { font-size: 13px; font-weight: 600; color: var(--headline); }
.hint { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.note { margin: 0; font-size: 12px; line-height: 1.55; color: var(--muted); }

.select-wrap { position: relative; }
select {
  width: 100%; appearance: none; font: inherit; font-size: 14px; color: var(--headline);
  background: var(--surface-subtle); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 12px 40px 12px 14px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
select:hover { background: var(--surface); border-color: var(--cas-primary); }
.select-chevron {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 20px; color: var(--slate); pointer-events: none;
}

#upload-form { display: flex; flex-direction: column; gap: 16px; }

.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; text-align: center; cursor: pointer;
  padding: 34px 20px; border-radius: var(--radius-lg);
  background: var(--surface-subtle); border: 1.5px dashed var(--border-strong);
  transition: background .18s ease, border-color .18s ease;
}
.dropzone:hover, .dropzone.is-over { background: var(--cas-primary-soft); border-color: var(--cas-primary); }
.dropzone input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; border: 0; padding: 0;
}
.dropzone-icon {
  display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 4px;
  border-radius: var(--radius-pill); background: var(--surface-container); color: var(--cas-primary);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.dropzone:hover .dropzone-icon, .dropzone.is-over .dropzone-icon {
  background: var(--cas-primary); color: #fff; transform: scale(1.05);
}
.dropzone-icon .material-symbols-outlined { font-size: 28px; }
.dropzone-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--headline); }
.link { color: var(--cas-primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(0, 146, 203, .4); }
.dropzone-sub { margin: 0; max-width: 34ch; font-size: 13px; line-height: 1.5; color: var(--muted); }
.format-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.format-tags span {
  padding: 3px 9px; border-radius: var(--radius-sm); background: var(--surface-container);
  color: var(--slate); font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
}

.filecard { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--radius-lg); background: var(--surface-subtle); border: 1px solid var(--border); }
.filecard-main { display: flex; align-items: center; gap: 12px; }
.filecard-icon {
  display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px;
  border-radius: var(--radius); background: var(--cas-primary); color: #fff;
}
.filecard-icon .material-symbols-outlined { font-size: 20px; }
.filecard-text { min-width: 0; flex: 1 1 auto; }
.filecard-name { margin: 0 0 3px; font-size: 14px; font-weight: 600; color: var(--headline); overflow-wrap: anywhere; }
.filecard-meta { margin: 0; font-size: 12px; color: var(--muted); }
.icon-btn {
  display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px;
  border: 0; border-radius: var(--radius-sm); background: transparent;
  color: var(--slate); cursor: pointer; transition: color .15s ease, background .15s ease;
}
.icon-btn:hover { color: var(--error); background: var(--error-soft); }
.icon-btn .material-symbols-outlined { font-size: 18px; }
.progress { height: 6px; border-radius: var(--radius-pill); background: var(--surface-container); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: var(--radius-pill); background: var(--cas-primary); transition: width .3s ease; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2;
  min-height: 40px; padding: 10px 18px; cursor: pointer;
  border-radius: var(--radius-pill); border: 1px solid transparent;
  background: transparent; color: var(--headline);
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.btn:disabled { cursor: not-allowed; opacity: .5; }
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn-icon { font-size: 19px; }
.btn-block { width: 100%; min-height: 50px; font-size: 15px; font-weight: 700; }
.btn-primary { background: var(--cas-primary); border-color: var(--cas-primary); color: #fff; box-shadow: 0 6px 16px -6px rgba(0, 146, 203, .6); }
.btn-primary:not(:disabled):hover { background: var(--cas-primary-hover); border-color: var(--cas-primary-hover); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--body); }
.btn-ghost:not(:disabled):hover { border-color: var(--cas-primary); color: var(--cas-primary); background: var(--surface); }
.btn-ghost[aria-pressed="true"] { background: var(--cas-primary); border-color: var(--cas-primary); color: #fff; }
.btn.is-done { background: var(--ok); border-color: var(--ok); color: #fff; }

/* ---------- Readiness ---------- */
.spec-list { margin: 0; display: flex; flex-direction: column; }
.spec-list > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.spec-list > div:last-child { border-bottom: 0; }
.spec-list dt { color: var(--body); }
.spec-list dd { margin: 0; text-align: right; font-weight: 600; color: var(--headline); }
.spec-list dd.is-ok { color: var(--ok); }
.spec-list dd.is-off { color: var(--warn); }

/* ---------- Messages ---------- */
.status, .alert {
  padding: 15px 18px; border-radius: var(--radius-lg);
  font-size: 13px; line-height: 1.6; border: 1px solid var(--border);
}
.status { background: var(--ok-soft); border-color: #bfe3d7; color: #0b5344; }
.status.is-busy { background: var(--cas-primary-soft); border-color: #b9e2f3; color: #065a80; }
.alert-error { background: var(--error-soft); border-color: #f3c4c0; color: var(--error); }
.alert-warn { background: var(--warn-soft); border-color: #ecd9ab; color: var(--warn); }
.alert ul { margin: 0; padding-left: 18px; }

/* ---------- Result header ---------- */
.card-head-status { align-items: flex-start; }
.status-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.status-icon {
  display: grid; place-items: center; flex: 0 0 auto; width: 46px; height: 46px;
  border-radius: var(--radius-lg); background: var(--surface-container); color: var(--cas-primary);
}
.status-icon .material-symbols-outlined { font-size: 24px; }
.status-icon.is-review { background: var(--warn-soft); color: var(--warn); }
.status-title { margin: 0 0 4px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.status-sub { margin: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--cas-primary-soft); color: #065a80;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.chip.is-review { background: var(--warn-soft); color: var(--warn); }
.chip.is-ok { background: var(--ok-soft); color: var(--ok); }

/* ---------- Toolbar & tabs ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-lg);
  background: var(--surface-subtle); border: 1px solid var(--border);
}
.tabs { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--headline); cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.2;
  transition: all .18s cubic-bezier(0.16, 1, 0.3, 1);
}
.tab .tab-icon { font-size: 16px; color: var(--slate); transition: color .15s ease; }
.tab:hover {
  border-color: var(--cas-primary);
  color: var(--cas-primary);
  background: var(--surface-subtle);
  transform: translateY(-1px);
}
.tab:hover .tab-icon { color: var(--cas-primary); }

/* Prominent Active Tab Highlight */
.tab.is-active,
.tab[aria-selected="true"] {
  background: var(--cas-primary) !important;
  border-color: var(--cas-primary) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 14px -2px rgba(0, 146, 203, 0.45);
  transform: translateY(-1px);
}
.tab.is-active .tab-icon,
.tab[aria-selected="true"] .tab-icon {
  color: #ffffff !important;
}

.toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.toolbar-sep { width: 1px; height: 24px; background: var(--border); }

/* ---------- Active section banner ---------- */
.doc-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; margin: 18px 0 20px 0;
  background: var(--surface-subtle); border: 1px solid var(--border);
  border-left: 5px solid var(--cas-primary); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.doc-head-main { min-width: 0; }
.doc-head-tag {
  display: inline-block; margin-bottom: 4px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cas-primary);
}
.doc-head h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--headline); }
.doc-head-meta { margin: 0; font-size: 13px; color: var(--body); }
.doc-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-review { background: var(--warn-soft); color: var(--warn); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.doc-note { margin: 0; padding: 12px 14px; border-radius: var(--radius); background: var(--warn-soft); color: var(--warn); font-size: 12px; line-height: 1.55; }

/* ---------- Views ---------- */
.view { min-width: 0; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.view-head h4 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; color: var(--headline); }
.view-head .icon { font-size: 18px; }
.view-count { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); }

.entity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.entity {
  display: flex; flex-direction: column; gap: 6px; padding: 15px 16px;
  border-radius: var(--radius-lg); background: var(--surface-subtle); border: 1px solid var(--border);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.entity:hover { background: var(--surface); border-color: var(--cas-primary); box-shadow: var(--lift); }
.entity.is-review { background: var(--warn-soft); border-color: #ecd9ab; }
.entity-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.entity-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); }
.entity-score { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--cas-primary); font-variant-numeric: tabular-nums; }
.entity-score.is-review { color: var(--warn); }
.entity-score::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.entity-value { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--headline); overflow-wrap: anywhere; }
.entity-value.is-empty { color: var(--slate); font-weight: 500; }
.entity-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.entity-engine { padding: 2px 8px; border-radius: var(--radius-pill); background: var(--surface-container); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; font-size: 9px; }
.entity-reason { margin: 0; font-size: 11px; color: var(--warn); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
th {
  padding: 12px 16px; background: var(--surface-subtle); color: var(--slate);
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--headline); background: var(--surface); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-subtle); }
tbody tr.is-review td { background: var(--warn-soft); }
tbody tr.is-review:hover td { background: #fbf0da; }
td.field-name { color: var(--headline); font-weight: 600; text-transform: capitalize; min-width: 170px; }
td.field-value { min-width: 200px; max-width: 420px; overflow-wrap: anywhere; }
td.field-score { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--cas-primary); }
td.field-score.is-review { color: var(--warn); }
.reason { display: block; margin-top: 5px; font-size: 11px; color: var(--warn); }

/* Field groups & Result cards (White & Light Grey Theme) */
.field-group-card {
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.field-group-card h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--cas-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--lift);
}

.kpi-card-label {
  margin: 0 0 6px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
}

.kpi-card-val {
  margin: 0 0 8px 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--headline);
  font-variant-numeric: tabular-nums;
}

.doc-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.doc-card h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--headline);
}

.code-block {
  margin: 0; padding: 18px; max-height: 480px; overflow: auto;
  border-radius: var(--radius-lg); background: var(--surface-subtle);
  border: 1px solid var(--border); color: var(--headline);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.65; white-space: pre;
}

.code {
  margin: 0; padding: 18px; max-height: 460px; overflow: auto;
  border-radius: var(--radius-lg); background: var(--ink); color: #cfe3f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.65; white-space: pre;
}

.empty-view { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 13px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }

/* ---------- Empty state ---------- */
.card-empty { align-items: center; text-align: center; padding: 52px 28px; }
.empty-icon {
  display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 18px;
  border-radius: var(--radius-pill); background: var(--surface-container); color: var(--cas-primary);
}
.empty-icon .material-symbols-outlined { font-size: 32px; }
.card-empty h2 { margin: 0 0 10px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.card-empty > p { margin: 0; max-width: 52ch; font-size: 14px; line-height: 1.6; color: var(--muted); }
.pipeline {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 26px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate);
}
.pipeline .material-symbols-outlined { font-size: 15px; color: var(--border-strong); }

/* ---------- Footer ---------- */
.site-footer {
  max-width: 1280px; margin: 0 auto; padding: 26px max(5vw, 24px) 40px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12px; color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .hero-watermark { display: none; }
}
@media (max-width: 720px) {
  .masthead { flex-wrap: wrap; gap: 12px; padding: 14px 18px; }
  .brand { flex-wrap: wrap; gap: 10px; }
  .brand-sub { padding-left: 0; border-left: 0; width: 100%; }
  .hero { padding: 34px 18px 28px; }
  .telemetry { width: 100%; }
  .telemetry-card { flex: 1 1 150px; min-width: 0; }
  .workstation { padding: 8px 18px 56px; }
  .card { padding: 20px 18px; }
  .toolbar { align-items: stretch; }
  .toolbar-actions { width: 100%; }
  .toolbar-sep { display: none; }
  .tab { max-width: 100%; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
