:root {
  --bg: #07111f;
  --bg2: #0a1728;
  --panel: #0e1d31;
  --panel2: #11243b;
  --border: #203852;
  --text: #edf5ff;
  --muted: #9eb0c8;
  --accent: #3fe0b6;
  --accent2: #5fa8ff;
  --danger: #ff6f7d;
  --warning: #f7bf58;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --line: #203852; /* FIX: was used by Program Intelligence but never defined */
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: linear-gradient(135deg, #06101d 0%, #09182a 55%, #07111f 100%);
  color: var(--text);
  min-height: 100vh;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.app-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(6, 16, 29, 0.96);
  border-right: 1px solid var(--border);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  z-index: 30;
  backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 24px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #04121b;
  box-shadow: 0 10px 30px rgba(63, 224, 182, 0.18);
}
.brand strong {
  display: block;
  font-size: 15px;
}
.brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
nav {
  display: grid;
  gap: 7px;
}
.nav-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 12px;
  text-align: left;
  font-weight: 700;
  transition: 0.2s;
}
.nav-btn:hover,
.nav-btn.active {
  background: linear-gradient(
    90deg,
    rgba(63, 224, 182, 0.14),
    rgba(95, 168, 255, 0.08)
  );
  color: var(--text);
}
.nav-btn.active {
  box-shadow: inset 3px 0 var(--accent);
}
.privacy-card {
  margin-top: auto;
  background: rgba(63, 224, 182, 0.06);
  border: 1px solid rgba(63, 224, 182, 0.18);
  border-radius: 15px;
  padding: 14px;
}
.privacy-card strong {
  font-size: 13px;
}
.privacy-card p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin: 6px 0 0;
}
.main {
  min-width: 0;
  padding: 0 28px 28px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -28px 24px;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
  background: rgba(7, 17, 31, 0.86);
  border-bottom: 1px solid rgba(32, 56, 82, 0.8);
  backdrop-filter: blur(18px);
}
.title-wrap {
  flex: 1;
}
.topbar h1 {
  font-size: 22px;
  margin: 0;
}
.topbar p {
  font-size: 12px;
  color: var(--muted);
  margin: 3px 0 0;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}
.pill.status.cloud {
  color: var(--accent);
  border-color: rgba(63, 224, 182, 0.35);
}
.pill.status.demo {
  color: var(--warning);
  border-color: rgba(247, 191, 88, 0.35);
}
.cycle-select {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
select,
input,
textarea {
  width: 100%;
  background: #091727;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 11px;
  outline: none;
  transition: 0.2s;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(95, 168, 255, 0.1);
}
textarea {
  resize: vertical;
}
.cycle-select select {
  width: auto;
  padding: 7px 28px 7px 10px;
}
.demo-banner {
  border: 1px solid rgba(247, 191, 88, 0.25);
  background: rgba(247, 191, 88, 0.07);
  color: #eac889;
  border-radius: 13px;
  padding: 10px 13px;
  font-size: 12px;
  margin-bottom: 18px;
}
.demo-banner.cloud {
  border-color: rgba(63, 224, 182, 0.2);
  background: rgba(63, 224, 182, 0.06);
  color: #9ff0d9;
}
.view {
  display: none;
}
.active-view {
  display: block;
}
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: center;
  border: 1px solid var(--border);
  background:
    radial-gradient(
      circle at 80% 15%,
      rgba(95, 168, 255, 0.17),
      transparent 30%
    ),
    linear-gradient(135deg, rgba(17, 36, 59, 0.96), rgba(10, 23, 40, 0.96));
  border-radius: 24px;
  padding: 34px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.hero h2 {
  font-size: clamp(30px, 4.6vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 900px;
  margin: 8px 0 14px;
}
.hero p {
  color: var(--muted);
  max-width: 700px;
  line-height: 1.6;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
}
.hero-badge {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background: rgba(63, 224, 182, 0.08);
  border: 1px solid rgba(63, 224, 182, 0.25);
  box-shadow: inset 0 0 40px rgba(63, 224, 182, 0.08);
}
.hero-badge span {
  font-size: 34px;
  font-weight: 900;
  display: block;
}
.hero-badge small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.hero-actions,
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.btn {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 14px;
  font-weight: 850;
  background: #13263d;
  color: var(--text);
  transition: 0.18s;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: #3b5874;
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #4bc9ed);
  color: #04151a;
  border: 0;
}
.btn.ghost {
  background: transparent;
}
.btn.danger {
  background: rgba(255, 111, 125, 0.08);
  color: #ff9aa4;
  border-color: rgba(255, 111, 125, 0.28);
}
.btn.small {
  padding: 7px 10px;
  font-size: 11px;
}
.btn.full {
  width: 100%;
  margin-top: 14px;
}
.text-btn {
  border: 0;
  background: transparent;
  color: var(--accent2);
  padding: 12px 0;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.kpi {
  border: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(17, 36, 59, 0.88),
    rgba(12, 28, 47, 0.88)
  );
  border-radius: 16px;
  padding: 18px;
}
.kpi span {
  font-size: 11px;
  color: var(--muted);
  display: block;
}
.kpi strong {
  font-size: 30px;
  display: block;
  margin-top: 5px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.align-start {
  align-items: start;
}
.panel {
  background: rgba(14, 29, 49, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
  margin-bottom: 16px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.panel h3 {
  margin: 4px 0 0;
  font-size: 18px;
}
.filters-panel {
  padding: 13px;
}
.filters-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.program-card {
  border: 1px solid var(--border);
  background: rgba(14, 29, 49, 0.9);
  border-radius: 17px;
  padding: 18px;
}
.program-card h3 {
  font-size: 16px;
  margin: 0 0 5px;
}
.program-card .meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 14px;
}
.metric-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.metric {
  background: #091727;
  border: 1px solid rgba(32, 56, 82, 0.75);
  border-radius: 10px;
  padding: 9px;
  text-align: center;
}
.metric strong {
  display: block;
  font-size: 16px;
}
.metric span {
  font-size: 9px;
  color: var(--muted);
}
.detail-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
}
.bars {
  display: grid;
  gap: 10px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.6fr) 3fr 36px;
  gap: 10px;
  align-items: center;
}
.bar-row .label {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-track {
  height: 9px;
  background: #091727;
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 999px;
}
.bar-row b {
  font-size: 11px;
}
.distribution {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-height: 150px;
  padding-top: 12px;
}
.dist-col {
  flex: 1;
  text-align: center;
}
.dist-bar {
  background: linear-gradient(180deg, var(--accent2), rgba(63, 224, 182, 0.65));
  border-radius: 7px 7px 2px 2px;
  min-height: 5px;
}
.dist-col small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 7px;
}
.activity-list,
.timeline {
  display: grid;
  gap: 10px;
}
.activity,
.timeline-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border: 1px solid rgba(32, 56, 82, 0.8);
  background: #091727;
  border-radius: 12px;
  padding: 12px;
}
.activity strong,
.timeline-item strong {
  font-size: 13px;
}
.activity span,
.timeline-item span {
  font-size: 10px;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
.form-grid.compact {
  gap: 10px;
}
.form-grid label,
.stack-form label {
  display: grid;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
}
.span-2 {
  grid-column: 1/-1;
}
.stack-form {
  display: grid;
  gap: 12px;
}
.table-wrap {
  overflow: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.data-table th,
.data-table td {
  padding: 10px 9px;
  border-bottom: 1px solid rgba(32, 56, 82, 0.65);
  font-size: 11px;
  text-align: left;
  vertical-align: top;
}
.data-table th {
  color: #8fa7c3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 9px;
}
.tag {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 9px;
  font-weight: 800;
  background: rgba(95, 168, 255, 0.1);
  color: #9cc8ff;
  border: 1px solid rgba(95, 168, 255, 0.18);
}
.tag.good {
  background: rgba(63, 224, 182, 0.08);
  color: #9ff0d9;
  border-color: rgba(63, 224, 182, 0.2);
}
.tag.warn {
  background: rgba(247, 191, 88, 0.08);
  color: #f4cb7f;
  border-color: rgba(247, 191, 88, 0.2);
}
.tag.bad {
  background: rgba(255, 111, 125, 0.08);
  color: #ff9aa4;
  border-color: rgba(255, 111, 125, 0.22);
}
.row-actions {
  display: flex;
  gap: 6px;
}
.row-actions button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 5px 7px;
  font-size: 9px;
}
.empty-state {
  border: 1px dashed var(--border);
  border-radius: 13px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}
.state-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.state-card {
  background: #091727;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.state-card strong {
  display: block;
  font-size: 23px;
}
.state-card span {
  color: var(--muted);
  font-size: 10px;
}
.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-color: rgba(95, 168, 255, 0.25);
}
.account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #091727;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #04121b;
  font-weight: 900;
}
.account-card strong,
.account-card span {
  display: block;
}
.account-card span {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.status-box {
  margin-top: 13px;
  font-size: 11px;
  color: var(--muted);
  min-height: 18px;
}
.backend-status {
  display: grid;
  gap: 10px;
}
.backend-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #091727;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px;
  font-size: 11px;
}
.notice {
  margin-top: 14px;
  border-left: 3px solid var(--accent2);
  background: rgba(95, 168, 255, 0.06);
  padding: 12px 14px;
  border-radius: 0 10px 10px 0;
}
.notice strong {
  font-size: 11px;
}
.notice p,
.prose p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.prose {
  max-width: 900px;
}
.toast-wrap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
  z-index: 100;
}
.toast {
  background: #13263d;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 13px;
  box-shadow: var(--shadow);
  font-size: 11px;
  max-width: 340px;
}
.toast.good {
  border-color: rgba(63, 224, 182, 0.35);
}
.toast.bad {
  border-color: rgba(255, 111, 125, 0.35);
}
.mobile-only {
  display: none;
}
.icon-btn {
  border: 1px solid var(--border);
  background: #0f2034;
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: #7188a2;
  font-size: 10px;
  padding: 18px 4px 6px;
  border-top: 1px solid rgba(32, 56, 82, 0.55);
  margin-top: 10px;
}
.ownership-footer > div {
  display: grid;
  gap: 4px;
}
.ownership-footer strong {
  color: #bdd0e4;
  font-size: 11px;
}
.ownership-footer > div:last-child {
  text-align: right;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #acd1ff;
}
@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .state-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: -280px;
    width: 260px;
    transition: 0.22s;
    box-shadow: var(--shadow);
  }
  .sidebar.open {
    left: 0;
  }
  .main {
    padding: 0 16px 20px;
  }
  .topbar {
    margin: 0 -16px 18px;
    padding: 14px 16px;
  }
  .mobile-only {
    display: block;
  }
  .grid-2,
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-badge {
    display: none;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .filters-row {
    grid-template-columns: 1fr;
  }
  .state-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  /* FIX: the cycle selector used to be hidden on phones, so mobile users
     could never change the Match cycle. It is now kept, compact. */
  .topbar-actions .cycle-select {
    font-size: 0;
    gap: 0;
  }
  .topbar-actions .cycle-select select {
    font-size: 12px;
  }
  .topbar-actions .pill.status {
    display: none;
  }
  .hero {
    padding: 24px;
  }
  .hero h2 {
    font-size: 38px;
  }
  .callout {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: auto;
  }
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metric-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .state-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  footer {
    flex-direction: column;
  }
  .topbar h1 {
    font-size: 18px;
  }
}

.brand-owner {
  display: block;
  max-width: 165px;
  line-height: 1.35;
  color: #9eb3ca;
  font-size: 9px;
  margin-top: 4px;
}
.brand-copy {
  min-width: 0;
}

/* Program Intelligence v3 */
.nav-btn .nav-badge {
  margin-left: auto;
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff7381;
  color: white;
  font-size: 10px;
  display: inline-grid;
  place-items: center;
}
.source-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  font-size: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
}
.source-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.intel-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 8px 0;
  background: rgba(255, 255, 255, 0.02);
}
.intel-item.unread {
  border-color: rgba(69, 223, 177, 0.42);
  background: rgba(69, 223, 177, 0.045);
}
.intel-item strong {
  display: block;
  margin-bottom: 4px;
}
.intel-item small {
  color: var(--muted);
  line-height: 1.45;
}
.intel-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 620px) {
  .intel-item {
    grid-template-columns: 1fr;
  }
  .intel-actions {
    justify-content: flex-start;
  }
}

/* v3.3 fixes */
.muted {
  color: var(--muted);
}
.nav-overlay {
  display: none;
}
@media (max-width: 820px) {
  body.nav-open .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 25;
  }
  .sidebar {
    overflow-y: auto;
  }
}
.row-actions {
  flex-wrap: wrap;
}
.row-actions button:hover {
  color: var(--text);
  border-color: #3b5874;
}
.row-actions button.danger,
.row-actions button[data-delete-cycle],
.row-actions button[data-delete-report] {
  color: #ff9aa4;
  border-color: rgba(255, 111, 125, 0.28);
}
.status-box.good {
  color: #9ff0d9;
}
.status-box.bad {
  color: #ff9aa4;
}
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
input[readonly] {
  opacity: 0.75;
}
.btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}
.password-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.password-panel h4 {
  margin: 4px 0 12px;
  font-size: 15px;
}
.password-panel.highlight {
  border: 1px solid rgba(63, 224, 182, 0.45);
  border-radius: 14px;
  padding: 16px;
  background: rgba(63, 224, 182, 0.05);
}
.admin-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 820px) {
  .admin-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.empty-state.span-2 {
  grid-column: 1 / -1;
}
.filters-row .btn {
  white-space: nowrap;
}

/* v3.6 Applicant Explorer cohort */
.cohort-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cohort-metrics .metric strong {
  font-size: 20px;
}
.cohort-metrics .metric span {
  font-size: 10px;
}
.cohort-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  margin: 12px 0 0;
}
.cohort-table td {
  vertical-align: middle;
}
.cohort-detail td {
  background: #091727;
}
.cohort-programs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 10px;
  background: rgba(95, 168, 255, 0.06);
}
.chip small {
  color: var(--muted);
  font-size: 9px;
}
.chip small.sig {
  color: var(--warning);
}
.chip.matched {
  border-color: rgba(63, 224, 182, 0.5);
  background: rgba(63, 224, 182, 0.1);
  color: #9ff0d9;
  font-weight: 800;
}
.text-btn.small-link {
  padding: 0;
  font-size: 11px;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .cohort-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* v4.0 decision workspace: scoped additions preserve the existing application. */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.program-link { color: var(--accent2); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.link-button { border: 0; background: none; padding: 0; text-align: inherit; font: inherit; }
.workspace-title { font-size: clamp(1.4rem, 3vw, 2.2rem); overflow-wrap: anywhere; }
.workspace-toolbar, .workspace-pager, .my-match-intro { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.workspace-toolbar label, .my-match-intro label { display: grid; gap: 8px; color: var(--muted); max-width: 100%; }
.workspace-toolbar select, .my-match-intro select { min-height: 44px; max-width: 100%; }
.workspace-kpis { display: grid; grid-template-columns: repeat(auto-fit,minmax(175px,1fr)); gap: 14px; margin: 18px 0; }
.workspace-kpis .kpi { min-width: 0; }
.workspace-kpis .kpi strong { font-size: 1.55rem; overflow-wrap: anywhere; }
.workspace-kpis .kpi strong .muted { font-size: 1rem; font-weight: 500; }
.workspace-kpis .kpi small { color: var(--muted); line-height: 1.5; }
.workspace-note { font-size: .88rem; color: var(--muted); line-height: 1.65; overflow-wrap: anywhere; }
.workspace-warning { border-left: 3px solid var(--warning); background: rgba(247,191,88,.07); padding: 14px; line-height: 1.6; border-radius: 4px; }
.workspace-details { margin: 12px 0; }
.workspace-details > div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); padding: 12px 0; }
.workspace-details dt { color: var(--muted); }
.workspace-details dd { margin: 0; }
.program-timeline { list-style: none; padding: 0; }
.program-timeline li { display: grid; grid-template-columns: 70px minmax(30px,1fr) 30px; align-items: center; gap: 10px; margin: 15px 0; }
.program-timeline .bar-track, .match-funnel .bar-track { height: 9px; }
.program-timeline .bar-fill, .match-funnel .bar-fill { height: 100%; }
.match-funnel { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); list-style: none; gap: 12px; padding: 0; margin: 24px 0; }
.match-funnel li { border: 1px solid var(--border); background: var(--panel2); padding: 18px; border-radius: 12px; }
.match-funnel strong { display: block; font-size: 1.8rem; margin: 12px 0; }
.compare-tray { position: sticky; bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; width: fit-content; max-width: 100%; padding: 10px 16px; margin: 24px auto; background: #11243bf5; border: 1px solid var(--border); border-radius: 16px; z-index: 15; box-shadow: var(--shadow); }
.compare-tray span { color: var(--muted); font-size: .8rem; }
.compare-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--border); border-radius: 12px; overscroll-behavior-x: contain; }
.compare-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.compare-table th, .compare-table td { min-width: 240px; max-width: 320px; padding: 16px; vertical-align: top; border: 1px solid var(--border); text-align: left; white-space: normal; overflow-wrap: anywhere; }
.compare-table th:first-child { min-width: 155px; width: 155px; }
.compare-table thead th { background: var(--panel2); }
.compare-table small { display: block; color: var(--muted); margin: 12px 0; font-weight: 400; }
.compare-table .empty-state { padding: 8px; text-align: left; }
.compare-table .source-links { display: grid; gap: 8px; }
.compare-table .btn { margin-top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.my-match { border-color: #286054; }
.section-title { margin: 28px 0 18px; }
.program-card h3 { line-height: 1.45; }
.program-card .eyebrow { line-height: 1.5; }
.program-card .row-actions { flex-wrap: wrap; }
@media(max-width:600px) {
  .workspace-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .workspace-kpis .kpi { padding: 14px; }
  .workspace-kpis .kpi strong { font-size: 1.25rem; }
  .workspace-toolbar { align-items: stretch; }
  .workspace-toolbar label, .my-match-intro label { width: 100%; }
  .match-funnel { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .match-funnel li { padding: 12px; }
  .compare-tray { bottom: 8px; padding: 9px; gap: 8px; }
  .compare-tray .btn { padding: 10px 14px; }
  .topbar-actions { flex-wrap: wrap; }
  .compare-table th, .compare-table td { min-width: 230px; }
  .compare-table th:first-child { min-width: 140px; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* v4.1 private season workspace */
.season-card{padding:18px;border:1px solid var(--border,#dce2ec);border-radius:14px;margin:12px 0;overflow-wrap:anywhere;background:var(--panel,#0e1d31)}
.season-card h3{margin:8px 0}.season-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.season-form-grid label,#seasonForm>label,[data-watch-meta] label{display:flex;flex-direction:column;gap:7px;margin:10px 0}#seasonForm textarea,[data-watch-meta] textarea{min-height:90px;max-width:100%;width:100%;box-sizing:border-box}#seasonForm details label{display:block;margin:12px 0}.calendar-export-option{display:block;margin:16px 0;max-width:70ch}.season-month{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin:16px 0}.calendar-day{min-height:110px;border:1px solid #dce2ec;border-radius:10px;padding:8px;overflow-wrap:anywhere}.calendar-day button{font-size:12px;white-space:normal;width:100%;margin:4px 0}.season-month-agenda{display:none}#seasonFormError{color:var(--danger,#ff6f7d);padding:8px 0}.row-actions{flex-wrap:wrap}#seasonContent,#watchlistContent,#seasonDashboard{min-width:0}
@media(max-width:700px){.season-form-grid{grid-template-columns:minmax(0,1fr)}.season-month{display:none}.season-month-agenda{display:block}.season-card .btn{min-height:44px}.workspace-toolbar label{max-width:100%}.workspace-toolbar select{max-width:100%}}

#seasonContent .btn,#watchlistContent .btn,#seasonDashboard .btn{min-height:44px;font-size:14px}.calendar-export-option input[type="checkbox"]{width:auto;min-height:0;margin-right:8px}.season-form-grid input[type="checkbox"]{width:auto;align-self:flex-start}

/* v4.2 private communication controls */
.notification-check{display:flex;align-items:center;gap:10px;min-height:44px}.notification-check input{width:auto}.notification-unread{border-left:4px solid var(--accent,#4eb7ee)}.nav-btn[hidden],.nav-badge[hidden]{display:none!important}#notificationPreferences form{margin-block:16px}#notificationPreferences button,#notificationCenter button{min-height:44px}#radarContent article{overflow-wrap:anywhere}
