:root {
  /* Type scale -- 2026-09-04 legibility pass (2nd attempt, after
     UI/UX redesign #73). Every font-size in this file resolves to
     one of these. Floor is 12px (was 6px in places, 349 literal
     declarations total before this pass). Nudge the whole UI
     up/down later by editing these, not literals. */
  --fs-2xs: 12px;
  --fs-xs: 13px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-md: 18px;
  --fs-lg: 20px;
  --fs-xl: 24px;
  --fs-2xl: 32px;
  --fs-3xl: 36px;
  --ink: #17212b;
  --ink-soft: #34465a;
  --muted: #52606d;
  --line: #d7e1ea;
  --line-strong: #b8cad9;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --canvas: #f0eee9;
  --nav: #0f4c81;
  --nav-deep: #0b355d;
  --teal: #2c6fa6;
  --teal-deep: #0f4c81;
  --teal-pale: #dce9f5;
  --orange: #1f64a0;
  --orange-deep: #0f4c81;
  --orange-pale: #e7f0f8;
  --amber: #b26a00;
  --amber-pale: #fff1d6;
  --red: #c42b2b;
  --red-pale: #fdeaea;
  --green: #0f7a3e;
  --green-pale: #e6f3eb;
  --blue: #0f4c81;
  --blue-pale: #dce9f5;
  --glass-surface: rgb(255 255 255 / 0.7);
  --glass-surface-strong: rgb(255 255 255 / 0.86);
  --glass-line: rgb(255 255 255 / 0.74);
  --glass-shadow: 0 14px 36px rgb(15 76 129 / 0.12), inset 0 1px 0 rgb(255 255 255 / 0.78);
  --shadow-sm: 0 1px 2px rgb(15 76 129 / 0.05), 0 5px 16px rgb(15 76 129 / 0.06);
  --shadow-md: 0 16px 38px rgb(15 76 129 / 0.12), 0 3px 10px rgb(15 76 129 / 0.06);
  --shadow-lg: 0 22px 70px rgb(15 76 129 / 0.18);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --sidebar-width: 252px;
  --content-width: 1480px;
  font-family: Paperlogy, Pretendard, "Pretendard Variable", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 3000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--orange-deep);
  transform: translateY(-150%);
  transition: transform 150ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgb(239 113 60 / 0.45);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 100;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 28px 18px 20px;
  overflow-y: auto;
  color: #eff7f5;
  background:
    radial-gradient(circle at 10% 3%, rgb(52 129 117 / 0.36), transparent 28%),
    linear-gradient(180deg, var(--nav) 0%, var(--nav-deep) 100%);
  border-right: 1px solid rgb(255 255 255 / 0.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 7px 38px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 13px;
  background: rgb(255 255 255 / 0.08);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12);
}

.brand-mark svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #83d9c8;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark circle {
  fill: var(--orange);
  stroke: var(--orange);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  letter-spacing: 0.08em;
  font-size: var(--fs-base);
}

.brand small {
  margin-top: 1px;
  color: #8eaaa7;
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 5px;
}

.nav-group {
  display: grid;
  gap: 4px;
  margin-top: 9px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-group-toggle {
  display: flex;
  width: 100%;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 0 12px 3px;
  border: 0;
  color: #789894;
  background: transparent;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-align: left;
  cursor: pointer;
}

.nav-group-toggle:hover { color: #c6d9d5; }

.nav-group-toggle:focus-visible {
  outline: 2px solid rgb(255 255 255 / 0.62);
  outline-offset: -2px;
}

.nav-group-toggle svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  transition: transform 160ms ease;
}

.nav-group-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }

.nav-group-items {
  display: grid;
  gap: 4px;
}

.nav-group-items[hidden] { display: none; }

.nav-item--sub {
  min-height: 44px;
  margin-left: 8px;
  padding-left: 14px;
  color: #bfd1ce;
}

.nav-item--sub.is-active {
  box-shadow: inset 3px 0 0 var(--orange);
}

.nav-item {
  display: grid;
  min-height: 48px;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 0;
  border-radius: 11px;
  color: #a9bfbc;
  background: transparent;
  text-align: left;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-item:hover {
  color: #f8fffd;
  background: rgb(255 255 255 / 0.06);
}

.nav-item:active {
  transform: translateY(1px);
}

.nav-item.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgb(52 132 118 / 0.36), rgb(40 102 92 / 0.2));
  box-shadow: inset 3px 0 0 var(--orange);
}

.nav-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item[data-view="all"] .nav-icon svg {
  fill: currentcolor;
  stroke: none;
}

.nav-count {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #b9ceca;
  background: rgb(255 255 255 / 0.08);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-align: center;
}

.nav-count--warning {
  color: #ffdc9e;
  background: rgb(236 158 37 / 0.15);
}

.sidebar-status {
  display: grid;
  gap: 4px;
  margin: auto 7px 18px;
  padding: 14px 13px;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 12px;
  color: #b2c6c3;
  background: rgb(255 255 255 / 0.035);
  font-size: var(--fs-sm);
}

.sidebar-status > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sidebar-status small {
  color: #718d89;
  font-size: var(--fs-xs);
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #95a6a3;
  box-shadow: 0 0 0 4px rgb(149 166 163 / 0.1);
}

.status-dot.is-online {
  background: #65c799;
  box-shadow: 0 0 0 4px rgb(101 199 153 / 0.12);
}

.status-dot.is-demo {
  background: #f0b858;
  box-shadow: 0 0 0 4px rgb(240 184 88 / 0.12);
}

.status-dot.is-error {
  background: #e27870;
  box-shadow: 0 0 0 4px rgb(226 120 112 / 0.12);
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 8px 0;
  border-top: 1px solid rgb(255 255 255 / 0.08);
}

.sidebar-foot .avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 11px;
  color: #0d302c;
  background: #d9eee5;
  font-weight: 800;
}

.sidebar-foot strong,
.sidebar-foot small {
  display: block;
}

.sidebar-foot strong {
  font-size: var(--fs-sm);
}

.sidebar-foot small {
  margin-top: 2px;
  color: #758f8c;
  font-size: var(--fs-xs);
}

.workspace {
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.demo-banner {
  position: sticky;
  z-index: 80;
  top: 0;
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 7px 34px;
  color: #fff8e7;
  background: #8b5819;
  box-shadow: 0 2px 8px rgb(30 26 10 / 0.12);
  font-size: var(--fs-sm);
}

.demo-banner__icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 0.5);
  border-radius: 50%;
  font-size: var(--fs-xs);
  font-weight: 800;
}

.demo-banner div {
  display: flex;
  flex: 1;
  gap: 6px;
}

.demo-banner strong {
  font-weight: 800;
}

.topbar {
  position: sticky;
  z-index: 70;
  top: 0;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px clamp(24px, 3.2vw, 52px);
  border-bottom: 1px solid rgb(19 43 41 / 0.08);
  background: rgb(240 243 238 / 0.9);
  backdrop-filter: blur(18px);
}

.demo-banner:not([hidden]) + .topbar {
  top: 42px;
}

.topbar__context p,
.topbar__context h1 {
  margin: 0;
}

.topbar__context p {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.topbar__context h1 {
  font-size: clamp(20px, 2vw, 25px);
  letter-spacing: -0.035em;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.pai-bot-access {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.pai-bot-access__note {
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.button,
.icon-button,
.text-button,
.view-toggle button {
  border: 0;
  background: none;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border-radius: 10px;
  font-size: var(--fs-sm);
  font-weight: 750;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, opacity 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  box-shadow: 0 6px 14px rgb(217 87 35 / 0.2);
}

.button--primary:hover:not(:disabled) {
  box-shadow: 0 9px 20px rgb(217 87 35 / 0.28);
}

.button--primary:disabled {
  color: #5a6663;
  background: #e7eae6;
  box-shadow: none;
}

.button--secondary {
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: #fff;
}

.button--secondary:hover:not(:disabled) {
  border-color: #aebcb4;
  background: var(--surface-soft);
}

.source-dialog-button {
  min-height: 38px;
  padding-inline: 12px;
  white-space: nowrap;
}

.source-dialog-button svg {
  width: 17px;
  height: 17px;
}

.button--ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: rgb(255 255 255 / 0.78);
}

.button--ghost:hover:not(:disabled) {
  border-color: #b5c2ba;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.button--wide {
  width: 100%;
}

.icon-button {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  place-items: center;
  border-radius: 10px;
  color: var(--ink-soft);
  transition: background 150ms ease;
}

.icon-button:hover {
  background: var(--surface-soft);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.text-button {
  padding: 3px;
  color: var(--teal-deep);
  font-size: var(--fs-sm);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

.text-button:hover {
  text-decoration-color: currentcolor;
}

.text-button:disabled {
  color: #a4adaa;
  cursor: not-allowed;
  text-decoration: none;
}

.text-button--light {
  color: #fff8e7;
}

.mobile-menu-button {
  display: none;
}

.main-content {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  padding: 0 clamp(24px, 3.2vw, 52px) 28px;
}

.hero {
  position: relative;
  display: grid;
  min-height: 266px;
  grid-template-columns: minmax(0, 1.15fr) minmax(350px, 0.85fr);
  align-items: center;
  gap: 44px;
  margin-top: 16px;
  padding: 42px 50px 58px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #f5fbf9;
  background:
    linear-gradient(102deg, rgb(5 38 35 / 0.08), rgb(5 38 35 / 0.7)),
    radial-gradient(circle at 88% 18%, rgb(81 160 143 / 0.3), transparent 33%),
    linear-gradient(135deg, #164a45, #0d2928 72%);
  box-shadow: 0 18px 38px rgb(16 55 51 / 0.12);
}

.hero::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.028) 1px, transparent 1px);
  background-size: 26px 26px;
  content: "";
  mask-image: linear-gradient(90deg, transparent, #000);
}

.hero::after {
  position: absolute;
  top: -150px;
  right: -140px;
  width: 370px;
  height: 370px;
  border: 60px solid rgb(255 255 255 / 0.028);
  border-radius: 50%;
  content: "";
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--orange);
  font-size: var(--fs-xs);
  font-weight: 850;
  letter-spacing: 0.14em;
}

.eyebrow span {
  font-size: var(--fs-2xs);
}

.hero h2 {
  margin: 13px 0 12px;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.24;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 560px;
  margin: 0;
  color: #b9d0cb;
  font-size: var(--fs-base);
}

.hero__loop {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, auto);
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-bottom: 28px;
}

.hero__loop > svg {
  position: absolute;
  bottom: -20px;
  left: 50%;
  width: min(240px, 90%);
  transform: translateX(-50%);
  fill: none;
  stroke: rgb(143 206 193 / 0.46);
  stroke-width: 1.3;
  stroke-dasharray: 4 4;
}

.loop-node {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 0.13);
  border-radius: 50%;
  color: #e9f7f3;
  background: rgb(255 255 255 / 0.05);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08);
  font-size: var(--fs-base);
  font-weight: 750;
}

.loop-node span {
  display: block;
  margin-bottom: -22px;
  color: #79a79e;
  font-size: var(--fs-xs);
}

.loop-node--decide {
  border-color: rgb(244 131 83 / 0.55);
  color: #fff;
  background: rgb(239 113 60 / 0.19);
  box-shadow: 0 0 0 8px rgb(239 113 60 / 0.055);
}

.loop-node--decide span {
  color: #f5a37f;
}

.loop-arrow {
  color: #537a75;
}

.analysis-progress { margin: 0 18px 28px; }
.analysis-progress__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.analysis-progress .kpi-value { font-size: clamp(1.25rem, 2vw, 2rem); }
.analysis-progress .kpi-value::after { content: none; }
.analysis-progress .kpi-card p { line-height: 1.7; }
@media (max-width: 760px) { .analysis-progress__grid { grid-template-columns: 1fr; } }

.kpi-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: -30px 18px 28px;
}

.kpi-card {
  position: relative;
  min-width: 0;
  padding: 20px 20px 17px;
  border: 1px solid rgb(22 57 53 / 0.08);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.kpi-card:hover,
.kpi-card:focus-within {
  border-color: rgb(34 122 112 / 0.35);
  box-shadow: 0 16px 38px rgb(17 38 36 / 0.15), 0 3px 9px rgb(17 38 36 / 0.07);
  transform: translateY(-2px);
}

.kpi-card.is-active {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgb(34 122 112 / 0.14), var(--shadow-md);
}

.kpi-card__action {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
}

.kpi-card__action:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.kpi-card--accent {
  border-top: 3px solid var(--orange);
  padding-top: 18px;
}

.kpi-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 750;
}

.kpi-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--teal);
  background: var(--teal-pale);
}

.kpi-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kpi-icon--amber {
  color: var(--amber);
  background: var(--amber-pale);
}

.kpi-icon--green {
  color: var(--green);
  background: var(--green-pale);
}

.kpi-icon--red {
  color: var(--red);
  background: var(--red-pale);
}

.kpi-icon--slate {
  color: #596b70;
  background: #edf1f2;
}

.kpi-value {
  display: block;
  margin: 9px 0 5px;
  font-size: var(--fs-3xl);
  line-height: 1;
  letter-spacing: -0.06em;
}

.kpi-value::after {
  margin-left: 3px;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  content: "건";
}

.kpi-card p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.trend {
  margin-right: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-pale);
  font-size: var(--fs-xs);
  font-weight: 800;
}

.trend--up {
  color: var(--green);
  background: var(--green-pale);
}

.trend--amber {
  color: #9b6814;
  background: var(--amber-pale);
}

.trend--red {
  color: var(--red);
  background: var(--red-pale);
}

.trend--slate {
  color: #596b70;
  background: #edf1f2;
}

.notice-section {
  padding: 27px 29px 10px;
  border: 1px solid rgb(22 57 53 / 0.08);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2,
.section-heading p {
  margin: 0;
}

.section-heading h2 {
  margin: 3px 0;
  font-size: var(--fs-xl);
  letter-spacing: -0.04em;
}

.section-heading > div:first-child > p:last-child {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.view-toggle {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.view-toggle button {
  display: grid;
  width: 32px;
  height: 29px;
  place-items: center;
  border-radius: 6px;
  color: #8a9996;
}

.view-toggle button.is-active {
  color: var(--teal-deep);
  background: #fff;
  box-shadow: 0 1px 4px rgb(18 44 41 / 0.12);
}

.view-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.7;
}

.priority-search {
  display: grid;
  grid-template-columns: minmax(175px, 0.75fr) minmax(185px, 0.9fr) minmax(250px, 1.35fr) auto;
  gap: 8px;
  align-items: center;
  margin: 20px 0 8px;
  padding: 11px 12px;
  border: 1px solid #d6e5df;
  border-radius: 12px;
  background: #f2f8f5;
}

.priority-search__intro {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  color: var(--ink);
  font-size: var(--fs-xs);
}

.priority-search__intro span {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--fs-2xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-search__select,
.priority-search__keywords {
  min-width: 0;
}

.priority-search select,
.priority-search input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: var(--fs-xs);
}

.priority-search select:focus,
.priority-search input:focus {
  border-color: rgb(34 122 112 / 0.55);
  box-shadow: 0 0 0 3px rgb(34 122 112 / 0.08);
}

.priority-search__apply {
  min-height: 38px;
  padding-inline: 14px;
  white-space: nowrap;
}

.priority-search__help {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.filters {
  display: flex;
  gap: 8px;
  margin: 8px 0 14px;
}

.notice-search-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.notice-search-modes {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f4f6f3;
}

.notice-search-mode {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 800;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.notice-search-mode:hover { color: var(--ink); background: rgb(255 255 255 / 0.72); }

.notice-search-mode.is-active[data-notice-search-mode="stored"] {
  border-color: #bcd9d0;
  color: var(--teal-deep);
  background: #fff;
  box-shadow: 0 3px 10px rgb(24 85 77 / 0.08);
}

.notice-search-mode.is-active[data-notice-search-mode="pps"] {
  border-color: #d3caf4;
  color: #5140aa;
  background: #fff;
  box-shadow: 0 3px 10px rgb(74 58 168 / 0.1);
}

.notice-search-mode.is-active[data-notice-search-mode="prespec"] {
  border-color: #dfc89f;
  color: #855514;
  background: #fff;
  box-shadow: 0 3px 10px rgb(133 85 20 / 0.1);
}

.notice-search-mode__dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.notice-search-mode__dot--stored { background: var(--teal); }
.notice-search-mode__dot--pps { background: #6657c8; }
.notice-search-mode__dot--prespec { background: #c48324; }

.notice-search-help-button {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: #fff;
  font: inherit;
  font-size: var(--fs-base);
  font-weight: 900;
  cursor: pointer;
}

.notice-search-mode:focus-visible,
.notice-search-help-button:focus-visible {
  outline: 3px solid rgb(74 58 168 / 0.18);
  outline-offset: 2px;
}

.filters.is-pps-mode .stored-search-only { display: none; }

.filters.is-pps-mode .search-field {
  border-color: #cfc5f2;
  background: #faf9ff;
}

.filters.is-pps-mode .search-field:focus-within {
  border-color: rgb(92 73 183 / 0.62);
  box-shadow: 0 0 0 3px rgb(92 73 183 / 0.1);
}

.notice-search-scope {
  margin: -7px 2px 14px;
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.notice-search-scope.is-global {
  color: var(--teal-deep);
  font-weight: 700;
}

.notice-search-scope.is-pps {
  color: #5748a4;
  font-weight: 700;
}

.pps-search-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #d8d1f3;
  border-radius: 11px;
  background: #faf9ff;
}

.pps-search-suggestion > div { display: grid; gap: 2px; min-width: 0; }
.pps-search-suggestion strong { color: #39305f; font-size: var(--fs-xs); }
.pps-search-suggestion span { color: #6d6687; font-size: var(--fs-xs); }
.pps-search-suggestion .button { min-height: 34px; flex: 0 0 auto; font-size: var(--fs-xs); }

.search-field,
.select-field {
  position: relative;
  display: flex;
  min-height: 41px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-soft);
  transition: border 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.search-field:focus-within,
.select-field:focus-within {
  border-color: rgb(34 122 112 / 0.5);
  background: #fff;
  box-shadow: 0 0 0 3px rgb(34 122 112 / 0.08);
}

.search-field {
  min-width: 220px;
  flex: 1;
}

.search-field svg {
  width: 17px;
  height: 17px;
  margin-left: 13px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.search-field input,
.select-field select {
  width: 100%;
  height: 39px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: var(--fs-sm);
}

.search-field input {
  min-width: 0;
  padding: 0 42px 0 10px;
}

.search-field input::placeholder {
  color: #93a09e;
}

.search-field kbd {
  position: absolute;
  right: 11px;
  display: grid;
  width: 23px;
  height: 21px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: #5c6866;
  background: #fff;
  font-family: inherit;
  font-size: var(--fs-xs);
  box-shadow: 0 1px 1px rgb(14 43 42 / 0.04);
}

.select-field {
  min-width: 112px;
}

.select-field select {
  appearance: none;
  padding: 0 32px 0 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2373817f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 11px center;
  background-repeat: no-repeat;
}

.select-field--sort {
  min-width: 130px;
  margin-left: auto;
}

.filter-reset {
  min-height: 41px;
  padding: 0 12px;
}

.notice-panel {
  position: relative;
  min-height: 260px;
}

.table-scroll {
  overflow-x: auto;
  scrollbar-color: #c9d3cc transparent;
  scrollbar-width: thin;
}

.notice-table,
.quant-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.notice-table th {
  height: 42px;
  padding: 0 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #72817e;
  background: #f8faf7;
  font-size: var(--fs-xs);
  font-weight: 800;
  text-align: left;
}

.notice-table th:first-child {
  width: 38%;
  padding-left: 15px;
  border-radius: 8px 0 0 8px;
}

.notice-table th:nth-child(2) { width: 12%; }
.notice-table th:nth-child(3) { width: 10%; }
.notice-table th:nth-child(4) { width: 14%; }
.notice-table th:nth-child(5) { width: 10%; }
.notice-table th:nth-child(6) { width: 12%; }
.notice-table th:last-child { width: 4%; border-radius: 0 8px 8px 0; }

.notice-row {
  position: relative;
  border-bottom: 1px solid #edf0ed;
  cursor: pointer;
  transition: background 130ms ease;
}

.notice-row:hover,
.notice-row:focus-within {
  background: #fbfcfa;
}

.notice-row:hover .notice-title,
.notice-row:focus-within .notice-title {
  color: var(--teal-deep);
}

.notice-row td {
  height: 82px;
  padding: 12px;
  vertical-align: middle;
}

.notice-row td:first-child {
  padding-left: 15px;
}

.notice-title-button {
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  text-align: left;
}

.notice-title {
  display: -webkit-box;
  margin-bottom: 5px;
  overflow: hidden;
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 750;
  line-height: 1.45;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 130ms ease;
}

.notice-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.notice-meta span {
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-meta .dot-divider::before {
  margin-right: 6px;
  color: #c2cac5;
  content: "·";
}

.notice-analysis-reason {
  display: -webkit-box;
  max-width: 100%;
  margin-top: 6px;
  overflow: hidden;
  color: #765716;
  font-size: var(--fs-2xs);
  line-height: 1.45;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.manual-analysis-action {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid #b9d8ca;
  border-radius: 8px;
  color: #116756;
  background: #edf8f3;
  font-size: var(--fs-xs);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition: border-color 130ms ease, background 130ms ease, color 130ms ease;
}

.manual-analysis-action:hover:not(:disabled) {
  border-color: #75b8a4;
  color: #084e43;
  background: #dcf2e9;
}

.manual-analysis-action:disabled {
  cursor: wait;
  opacity: 0.72;
}

.manual-analysis-action--table {
  margin-top: 7px;
}

.button-spinner {
  width: 10px;
  height: 10px;
  border: 2px solid currentcolor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.department-priority {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 3px 7px;
  border: 1px solid #d9e2de;
  border-radius: 6px;
  color: #5d6b68;
  background: #f4f7f5;
  font-size: var(--fs-2xs);
  line-height: 1.25;
}

.department-priority strong {
  flex: 0 0 auto;
  color: #445451;
  font-size: var(--fs-2xs);
}

.department-priority span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.department-priority--high {
  border-color: #b9d8ca;
  color: #176354;
  background: #edf8f3;
}

.department-priority--high strong { color: #0d755f; }
.department-priority--medium { border-color: #d8ddbd; background: #f8faed; }
.department-priority--medium strong { color: #68731f; }
.department-priority--watch { border-color: #e3d8c2; background: #fff9ef; }
.department-priority--watch strong { color: #94640f; }

.deadline {
  display: block;
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: 700;
}

.deadline.is-urgent {
  color: var(--red);
}

.deadline small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 500;
}

.deadline.is-urgent small {
  color: var(--red);
  font-weight: 700;
}

.status-pill,
.recommendation-pill,
.evidence-status,
.source-badge,
.detail-tag,
.quant-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill {
  min-width: 58px;
  padding: 4px 9px;
  font-size: var(--fs-xs);
}

.status-pill::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentcolor;
  content: "";
}

.status-pill--pass {
  color: var(--green);
  background: var(--green-pale);
}

.status-pill--review {
  color: #9a6612;
  background: var(--amber-pale);
}

.status-pill--fail {
  color: var(--red);
  background: var(--red-pale);
}

.status-pill--unknown {
  color: var(--muted);
  background: #edf0ed;
}

.status-pill--pending {
  color: #4e6780;
  background: #eaf1f7;
}

.status-pill--pending::before {
  background: #7794ad;
  box-shadow: 0 0 0 2px rgb(119 148 173 / 0.14);
}

.source-kind-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 1px solid #c6d8d0;
  border-radius: 5px;
  color: #27675e;
  background: #eef8f4;
  font-size: var(--fs-2xs);
  font-weight: 850;
  letter-spacing: 0.02em;
}

.source-kind-badge::before {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentcolor;
  content: "";
}

.source-kind-badge--synthetic {
  border-color: #d7cdef;
  color: #70539d;
  background: #f4effb;
}

.source-kind-badge--manual {
  border-color: #d8ddda;
  color: #64716e;
  background: #f2f4f2;
}

.notice-lifecycle-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 2px 6px;
  border: 1px solid #ced7d9;
  border-radius: 5px;
  color: #56676c;
  background: #f0f3f4;
  font-size: var(--fs-2xs);
  font-weight: 850;
  letter-spacing: 0.02em;
}

.notice-lifecycle-badge--expired {
  border-color: #e0d3c2;
  color: #805f36;
  background: #fbf5ec;
}

.notice-lifecycle-badge--cancelled {
  border-color: #e7aaa5;
  color: #91342d;
  background: var(--red-pale);
}

.score-cell {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 7px;
}

.score-cell strong {
  min-width: 25px;
  color: var(--ink-soft);
  font-size: var(--fs-xs);
}

.mini-bar,
.progress-bar,
.risk-bar {
  overflow: hidden;
  border-radius: 999px;
  background: #e8ece8;
}

.mini-bar {
  width: 100%;
  height: 5px;
}

.mini-bar span,
.progress-bar span,
.risk-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.score-cell.is-low .mini-bar span { background: var(--red); }
.score-cell.is-medium .mini-bar span { background: var(--amber); }

.risk-score {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: var(--fs-xs);
  font-weight: 800;
}

.risk-score::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentcolor;
  box-shadow: 0 0 0 3px currentcolor;
  opacity: 0.78;
  content: "";
}

.risk-score.is-medium { color: var(--amber); }
.risk-score.is-high { color: var(--red); }
.risk-score.is-unknown { color: var(--muted); }

.recommendation-pill {
  padding: 4px 9px;
  font-size: var(--fs-xs);
}

.recommendation-pill--go {
  color: var(--green);
  background: var(--green-pale);
}

.recommendation-pill--conditional {
  color: #8d641d;
  background: var(--amber-pale);
}

.recommendation-pill--no {
  color: var(--red);
  background: var(--red-pale);
}

.recommendation-pill--unknown {
  color: var(--muted);
  background: #edf0ed;
}

.recommendation-pill--pending {
  color: #4e6780;
  background: var(--blue-pale);
}

.metric-pending {
  color: #5b7182 !important;
  font-size: var(--fs-xs) !important;
  font-weight: 750 !important;
}

.row-arrow {
  display: grid;
  width: 29px;
  height: 29px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #7e8c89;
  background: transparent;
  cursor: pointer;
  transition: background 130ms ease, color 130ms ease;
}

.notice-row:hover .row-arrow,
.row-arrow:hover,
.row-arrow:focus-visible {
  color: var(--teal-deep);
  background: var(--teal-pale);
}

.row-arrow:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.row-arrow svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notice-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.notice-card {
  position: relative;
  display: flex;
  min-width: 0;
  max-width: 100%;
  min-height: 230px;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: inherit;
  background: #fff;
  text-align: left;
  box-shadow: 0 1px 0 rgb(15 41 39 / 0.02);
  transition: transform 150ms ease, border 150ms ease, box-shadow 150ms ease;
}

.notice-card:hover,
.notice-card:focus-within {
  transform: translateY(-2px);
  border-color: #c1d5cc;
  box-shadow: var(--shadow-md);
}

.notice-card__body {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.notice-card__body:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 5px;
  border-radius: 8px;
}

.notice-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 13px;
}

.notice-card__deadline {
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 700;
}

.notice-card__deadline.is-urgent { color: var(--red); }

.notice-card h3 {
  display: -webkit-box;
  margin: 0 0 7px;
  overflow: hidden;
  font-size: var(--fs-base);
  line-height: 1.5;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.notice-card__body > p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--fs-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-card__analysis-reason {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  color: #765716;
  font-size: var(--fs-xs);
  line-height: 1.45;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notice-card__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: auto 0 13px;
  padding-top: 17px;
}

.notice-card__metric {
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--surface-soft);
}

.notice-card__metric small,
.notice-card__metric strong {
  display: block;
}

.notice-card__metric small {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.notice-card__metric strong {
  font-size: var(--fs-sm);
}

.notice-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #edf0ed;
}

.notice-card__actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.manual-analysis-action--card {
  min-height: 36px;
  padding-inline: 10px;
}

.recommendation-arrow {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: #14685f;
  background: #e1f4ef;
  transition: color 130ms ease, background 130ms ease, transform 130ms ease;
}

.recommendation-arrow:hover,
.recommendation-arrow:focus-visible {
  color: #083f3a;
  background: #c9ebe2;
  transform: translateX(2px);
}

.recommendation-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.state-view {
  display: grid;
  min-height: 300px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.state-view strong {
  margin-top: 12px;
  font-size: var(--fs-base);
}

.state-view p {
  max-width: 420px;
  margin: 5px 0 16px;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid #dce6e0;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 780ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.state-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: var(--red);
  background: var(--red-pale);
  font-size: var(--fs-lg);
  font-weight: 800;
}

.state-icon--search {
  color: var(--teal);
  background: var(--teal-pale);
}

.state-icon svg {
  width: 22px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.skeleton-row td {
  height: 82px;
  padding: 12px;
}

.skeleton {
  display: block;
  height: 9px;
  margin: 6px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #edf0ed 25%, #f6f8f5 50%, #edf0ed 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}

.skeleton--wide { width: 88%; }
.skeleton--medium { width: 62%; }
.skeleton--short { width: 45px; }
.skeleton--dot { width: 28px; height: 28px; border-radius: 8px; }

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 5px 0;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.page-footer p {
  margin: 0;
}

.sidebar-scrim,
.drawer-scrim {
  position: fixed;
  z-index: 180;
  inset: 0;
  background: rgb(6 23 22 / 0.48);
  backdrop-filter: blur(3px);
  animation: fadeIn 180ms ease;
}

.drawer-scrim {
  z-index: 190;
}

@keyframes fadeIn {
  from { opacity: 0; }
}

.detail-drawer {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: flex;
  width: 100vw;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
  background: var(--canvas);
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 260ms cubic-bezier(0.22, 0.9, 0.36, 1), visibility 0s linear 260ms;
}

.detail-drawer.is-open {
  transform: translateY(0);
  visibility: visible;
  transition: transform 260ms cubic-bezier(0.22, 0.9, 0.36, 1), visibility 0s;
}

.drawer-loading {
  position: absolute;
  z-index: 5;
  inset: 64px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  background: rgb(240 243 238 / 0.88);
  backdrop-filter: blur(6px);
  font-size: var(--fs-sm);
}

.drawer-loading .spinner {
  width: 21px;
  height: 21px;
}

.drawer-header {
  display: flex;
  min-height: 64px;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.drawer-header__meta {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.drawer-header__meta > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-header__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.manual-analysis-detail {
  min-height: 36px;
  padding: 0 11px;
  gap: 6px;
  white-space: nowrap;
}

.manual-analysis-detail svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.source-link-dialog {
  width: min(540px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: transparent;
  box-shadow: 0 28px 80px rgb(13 45 43 / 0.32);
}

.source-link-dialog::backdrop {
  background: rgb(12 30 29 / 0.58);
  backdrop-filter: blur(3px);
}

.source-link-dialog__panel {
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.55);
  border-radius: inherit;
  background: #fff;
}

.source-link-dialog__header,
.source-link-dialog__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.source-link-dialog__header {
  padding: 22px 24px 17px;
  border-bottom: 1px solid var(--line);
}

.source-link-dialog__header h2 {
  margin: 3px 0 0;
  font-size: var(--fs-lg);
}

.source-link-dialog__header .icon-button {
  font-size: var(--fs-xl);
}

.source-link-dialog__body {
  display: grid;
  gap: 9px;
  padding: 24px;
}

.source-link-dialog__body > strong {
  font-size: var(--fs-base);
  line-height: 1.5;
}

.source-link-dialog__body > p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.source-link-dialog__notice {
  padding: 12px 14px;
  border: 1px solid #cfe6df;
  border-radius: 10px;
  color: var(--teal-deep) !important;
  background: var(--teal-pale);
}

.source-link-dialog__actions {
  justify-content: flex-end;
  padding: 0 24px 24px;
}

.source-link-dialog__actions .button {
  text-decoration: none;
}

.source-link-dialog__actions [aria-disabled="true"] {
  pointer-events: none;
  color: #5a6663;
  background: #e7eae6;
  box-shadow: none;
}

.notice-search-help-dialog { width: min(620px, calc(100vw - 28px)); }

.notice-search-help-dialog__body > p:first-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: 1.65;
}

.notice-search-help-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.notice-search-help-compare section {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.notice-search-help-compare__stored { background: #f2f9f6; }
.notice-search-help-compare__pps { background: #f6f3fd; }
.notice-search-help-compare__prespec { background: #fff8ea; }

.notice-search-help-compare section > span {
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.notice-search-help-compare h3 { margin: 5px 0 9px; color: var(--ink); font-size: var(--fs-base); }
.notice-search-help-compare ul { display: grid; gap: 6px; margin: 0; padding-left: 17px; color: var(--ink-soft); font-size: var(--fs-xs); line-height: 1.5; }

.notice-search-help-cost {
  display: grid;
  gap: 3px;
  margin: 12px 0 0;
  padding: 11px 12px;
  border: 1px solid #f0d2c5;
  border-radius: 10px;
  color: #775347;
  background: var(--orange-pale);
  font-size: var(--fs-xs);
  line-height: 1.55;
}

.notice-search-help-cost strong { color: var(--orange-deep); }

.manual-token-field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: var(--fs-base);
  font-weight: 700;
}

.manual-token-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.manual-token-field input:focus-visible {
  border-color: var(--teal);
  outline: 3px solid rgb(20 184 166 / 18%);
}

.source-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  color: var(--teal-deep);
  background: var(--teal-pale);
  font-size: var(--fs-2xs);
}

.source-badge.is-demo {
  color: #8c5b0d;
  background: var(--amber-pale);
}

.drawer-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #c1cdc6 transparent;
  scrollbar-width: thin;
}

.detail-hero {
  padding: 30px 34px 26px;
  color: #f6fbf9;
  background:
    radial-gradient(circle at 90% 12%, rgb(87 176 157 / 0.24), transparent 30%),
    linear-gradient(135deg, #164a45, #0d2d2b);
}

.detail-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 11px;
}

.detail-tag {
  padding: 4px 8px;
  color: #bbe0d8;
  background: rgb(255 255 255 / 0.08);
  font-size: var(--fs-2xs);
}

.detail-tag--urgent {
  color: #ffc3ab;
  background: rgb(239 113 60 / 0.15);
}

.detail-tag--ended {
  color: #d8e1e3;
  background: rgb(216 225 227 / 0.12);
}

.detail-tag--cancelled {
  color: #ffd5d1;
  background: rgb(189 75 66 / 0.28);
}

.detail-hero h2 {
  max-width: 660px;
  margin: 0 0 7px;
  font-size: clamp(20px, 3vw, 27px);
  line-height: 1.4;
  letter-spacing: -0.045em;
}

.detail-agency {
  margin: 0;
  color: #9dbdb7;
  font-size: var(--fs-sm);
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 23px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 11px;
  background: rgb(255 255 255 / 0.08);
}

.detail-fact {
  min-width: 0;
  padding: 11px 13px;
  background: rgb(6 30 28 / 0.34);
}

.detail-fact small,
.detail-fact strong {
  display: block;
}

.detail-fact small {
  margin-bottom: 3px;
  color: #86aaa3;
  font-size: var(--fs-2xs);
}

.detail-fact strong {
  overflow: hidden;
  color: #eef8f5;
  font-size: var(--fs-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.summary-metric {
  padding: 13px 14px;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 11px;
  background: rgb(255 255 255 / 0.045);
}

.summary-metric small,
.summary-metric strong {
  display: block;
}

.summary-metric small {
  margin-bottom: 4px;
  color: #8fb0aa;
  font-size: var(--fs-2xs);
}

.summary-metric strong {
  font-size: var(--fs-base);
}

.summary-metric--recommendation {
  border-color: rgb(239 113 60 / 0.25);
  background: rgb(239 113 60 / 0.09);
}

.summary-metric--recommendation strong {
  color: #ffad89;
}

.summary-metric--pending {
  border-color: rgb(151 174 184 / 0.18);
  background: rgb(133 157 166 / 0.08);
}

.summary-metric--pending strong {
  color: #bed0d2;
  font-size: var(--fs-sm);
}

.analysis-pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.pipeline-step {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  background: #fff;
}

.pipeline-step__icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-pale);
}

.pipeline-step__icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pipeline-step.is-review .pipeline-step__icon {
  color: var(--amber);
  background: var(--amber-pale);
}

.pipeline-step.is-pending .pipeline-step__icon {
  color: var(--muted);
  background: #edf0ed;
}

.pipeline-step strong,
.pipeline-step small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-step strong { font-size: var(--fs-xs); }
.pipeline-step small { color: var(--muted); font-size: var(--fs-2xs); }

.detail-tabs {
  position: sticky;
  z-index: 4;
  top: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: blur(12px);
}

.detail-tabs button {
  position: relative;
  min-height: 52px;
  padding: 0 8px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: var(--fs-xs);
  font-weight: 750;
}

.detail-tabs button[aria-selected="true"] {
  color: var(--teal-deep);
}

.detail-tabs button[aria-selected="true"]::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--teal);
  content: "";
}

.detail-tabs button span {
  margin-left: 3px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: var(--fs-2xs);
}

.tab-panel {
  padding: 20px 24px 30px;
}

.detail-card {
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 1px 0 rgb(19 43 41 / 0.02);
}

.detail-card + .detail-card {
  margin-top: 12px;
}

.card-title-row,
.panel-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.card-title-row p,
.card-title-row h3,
.panel-intro p,
.panel-intro h3 {
  margin: 0;
}

.card-title-row h3,
.panel-intro h3 {
  margin-top: 2px;
  font-size: var(--fs-base);
  letter-spacing: -0.025em;
}

.panel-intro {
  align-items: end;
  margin: 2px 2px 14px;
}

.panel-intro > p {
  color: var(--muted);
  font-size: var(--fs-xs);
}

.verified-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-size: var(--fs-2xs);
  font-weight: 800;
}

.verified-label svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2.1;
  stroke-linecap: round;
}

.verified-label.is-pending {
  color: var(--blue);
}

.summary-card {
  border-left: 3px solid var(--teal);
}

.summary-copy {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: 1.85;
  white-space: pre-line;
}

.document-analysis-card {
  border-left: 3px solid var(--blue);
}

.document-analysis-state {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  color: #4e6780;
  background: var(--blue-pale);
  font-size: var(--fs-2xs);
  font-weight: 850;
  white-space: nowrap;
}

.document-analysis-state.is-ready {
  color: var(--green);
  background: var(--green-pale);
}

.document-analysis-state.is-review {
  color: #91610f;
  background: var(--amber-pale);
}

.document-analysis-list {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.document-analysis-item {
  padding: 11px 12px;
  border: 1px solid #e3e8e4;
  border-radius: 9px;
  background: var(--surface-soft);
}

.document-analysis-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.document-analysis-item__head strong {
  min-width: 0;
  overflow: hidden;
  font-size: var(--fs-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-analysis-item__head span {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-pale);
  font-size: var(--fs-2xs);
  font-weight: 850;
}

.document-analysis-item__head span.is-review {
  color: #91610f;
  background: var(--amber-pale);
}

.document-analysis-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--fs-2xs);
  line-height: 1.65;
}

.document-analysis-item dl {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin: 8px 0 0;
}

.document-analysis-item dl div {
  display: flex;
  align-items: center;
  gap: 4px;
}

.document-analysis-item dt,
.document-analysis-item dd {
  margin: 0;
  font-size: var(--fs-2xs);
}

.document-analysis-item dt { color: var(--muted); }
.document-analysis-item dd { color: var(--ink-soft); font-weight: 750; }

.document-analysis-waiting {
  padding: 12px;
  border: 1px dashed #cfd9d4;
  border-radius: 9px;
  color: var(--muted);
  background: #fafbfa;
  font-size: var(--fs-2xs);
  line-height: 1.6;
  text-align: center;
}

.document-analysis-waiting strong,
.document-analysis-waiting span { display: block; }
.document-analysis-waiting strong { margin-bottom: 2px; color: var(--ink-soft); font-size: var(--fs-xs); }

.document-privacy-note {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 10px 1px 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.document-privacy-note svg {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.private-match-preview {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e4e9e6;
}

.private-match-preview__head,
.private-match-preview__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.private-match-preview__head {
  justify-content: space-between;
  margin-bottom: 10px;
}

.private-match-preview__head h4 {
  margin: 1px 0 0;
  font-size: var(--fs-xs);
}

.private-match-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  color: #6a6f72;
  background: #eef1ef;
  font-size: var(--fs-2xs);
  font-weight: 900;
  white-space: nowrap;
}

.private-match-badge.is-review {
  color: #91610f;
  background: var(--amber-pale);
}

.private-match-badge.is-ready { color: var(--green); background: var(--green-pale); }
.private-match-badge.is-loading { color: var(--blue); background: var(--blue-pale); }
.private-match-badge.is-error { color: var(--red); background: var(--red-pale); }

.private-match-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.private-match-metric {
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid #e4e9e6;
  border-radius: 8px;
  background: #fbfcfb;
}

.private-match-metric small,
.private-match-metric strong {
  display: block;
}

.private-match-metric small {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--fs-2xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-match-metric strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: var(--fs-sm);
}

.private-match-metric strong span { color: var(--muted); font-size: var(--fs-2xs); font-weight: 700; }

.private-match-score-boundary {
  margin: 7px 1px 0;
  color: #816425;
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.private-match-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.private-match-item {
  padding: 10px;
  border: 1px solid #e3e8e5;
  border-radius: 8px;
  background: #fff;
}

.private-match-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.private-match-category {
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 850;
  letter-spacing: .04em;
}

.private-match-state {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  color: #8a631c;
  background: var(--amber-pale);
  font-size: var(--fs-2xs);
  font-weight: 900;
}

.private-match-state.is-action { color: var(--blue); background: var(--blue-pale); }
.private-match-state.is-unmapped { color: #676f72; background: #edf0ef; }
.private-match-state.is-pass { color: var(--green); background: var(--green-pale); }
.private-match-state.is-blocking { color: var(--red); background: var(--red-pale); }

.private-match-condition {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.private-match-message {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.private-match-details {
  display: grid;
  gap: 5px;
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}

.private-match-details li {
  display: grid;
  grid-template-columns: minmax(62px, auto) minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.private-match-details strong {
  color: var(--ink-soft);
  font-size: var(--fs-2xs);
  font-weight: 800;
}

.private-match-candidates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
}

.private-match-candidates > span:first-child { color: var(--muted); font-size: var(--fs-2xs); }

.private-fact-key {
  max-width: 100%;
  padding: 3px 6px;
  overflow: hidden;
  border: 1px solid #dbe5e0;
  border-radius: 5px;
  color: #285b52;
  background: #f1f8f5;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: var(--fs-2xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-match-waiting {
  padding: 13px 12px;
  border: 1px dashed #d1d9d5;
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfb;
  font-size: var(--fs-2xs);
  line-height: 1.6;
  text-align: center;
}

.private-match-waiting strong,
.private-match-waiting span { display: block; }
.private-match-waiting strong { margin-bottom: 2px; color: var(--ink-soft); font-size: var(--fs-xs); }

.private-match-note {
  margin: 9px 1px 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.requirement-list {
  margin-top: 13px;
  border-top: 1px solid #edf0ed;
}

.requirement-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 13px 2px;
  border-bottom: 1px solid #edf0ed;
}

.requirement-item:last-child { border-bottom: 0; padding-bottom: 2px; }

.requirement-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  color: var(--green);
  background: var(--green-pale);
}

.requirement-item.is-review .requirement-icon { color: var(--amber); background: var(--amber-pale); }
.requirement-item.is-fail .requirement-icon { color: var(--red); background: var(--red-pale); }
.requirement-item.is-unknown .requirement-icon { color: var(--muted); background: #edf0ed; }

.requirement-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.requirement-copy strong,
.requirement-copy small {
  display: block;
}

.requirement-copy strong {
  margin-bottom: 2px;
  font-size: var(--fs-xs);
}

.requirement-copy small {
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.55;
}

.evidence-jump {
  padding: 3px 0;
  border: 0;
  color: var(--teal-deep);
  background: none;
  font-size: var(--fs-2xs);
  font-weight: 750;
}

.action-list {
  display: grid;
  gap: 9px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.action-list li {
  position: relative;
  padding: 9px 11px 9px 31px;
  border-radius: 8px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: var(--fs-xs);
}

.action-list li::before {
  position: absolute;
  top: 10px;
  left: 11px;
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  border: 1px solid #b7c3bd;
  border-radius: 4px;
  content: "";
}

.evidence-list {
  display: grid;
  gap: 11px;
}

.evidence-card {
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.evidence-card__head,
.evidence-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.evidence-file {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: 750;
}

.evidence-file svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.evidence-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-status {
  padding: 3px 7px;
  color: var(--green);
  background: var(--green-pale);
  font-size: var(--fs-2xs);
}

.evidence-status.is-provisional { color: #936411; background: var(--amber-pale); }
.evidence-status.is-missing { color: var(--red); background: var(--red-pale); }

.evidence-quote {
  position: relative;
  margin: 14px 0;
  padding: 13px 15px 13px 18px;
  border-left: 2px solid var(--teal);
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: var(--fs-xs);
  line-height: 1.7;
}

.evidence-card__foot {
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.confidence {
  display: flex;
  align-items: center;
  gap: 6px;
}

.confidence .mini-bar {
  width: 65px;
}

.score-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.score-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.score-card small,
.score-card strong {
  display: block;
}

.score-card small {
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.score-card strong {
  margin: 6px 0 9px;
  font-size: var(--fs-xl);
  letter-spacing: -0.04em;
}

.score-card strong span {
  color: var(--muted);
  font-size: var(--fs-xs);
}

.progress-bar {
  height: 5px;
}

.score-card--readiness .progress-bar span { background: var(--teal); }
.score-card--coverage .progress-bar span { background: var(--blue); }
.score-card--risk .progress-bar span { background: var(--orange); }

.quant-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.quant-table th,
.quant-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #edf0ed;
  font-size: var(--fs-xs);
  text-align: left;
}

.quant-table th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: var(--fs-2xs);
}

.quant-table th:first-child { border-radius: 7px 0 0 7px; }
.quant-table th:last-child { border-radius: 0 7px 7px 0; }
.quant-table td:first-child { width: 45%; font-weight: 700; }

.quant-status {
  padding: 3px 6px;
  color: var(--green);
  background: var(--green-pale);
  font-size: var(--fs-2xs);
}

.quant-status.is-provisional { color: #936411; background: var(--amber-pale); }
.quant-status.is-missing { color: var(--red); background: var(--red-pale); }
.quant-status.is-confirmed { color: var(--green); background: var(--green-pale); }
.quant-status.is-estimated,
.quant-status.is-review { color: #936411; background: var(--amber-pale); }
.quant-status.is-unscorable { color: var(--red); background: var(--red-pale); }

.quant-separation-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #cfdced;
  border-radius: 9px;
  color: #31577d;
  background: #f3f7fc;
  font-size: var(--fs-xs);
  line-height: 1.55;
}

.quant-opinion-card,
.quant-observation-list + .detail-card {
  margin-top: 12px;
}

.quant-source-status {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: var(--fs-2xs);
  font-weight: 800;
  white-space: nowrap;
}

.quant-source-status.is-available { color: var(--green); background: var(--green-pale); }
.quant-source-status.is-auto-active { color: var(--green); background: var(--green-pale); }
.quant-source-status.is-review-required { color: #936411; background: var(--amber-pale); }
.quant-source-status.is-not-applicable { color: #31577d; background: #eef4fb; }
.quant-source-status.is-incomplete,
.quant-source-status.is-loading { color: #936411; background: var(--amber-pale); }
.quant-source-status.is-missing,
.quant-source-status.is-error { color: var(--red); background: var(--red-pale); }
.quant-source-status.is-demo { color: #31577d; background: #eef4fb; }

.quant-opinion {
  margin-top: 13px;
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.65;
}

.quant-source-anchor {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.quant-assumption-list {
  display: grid;
  gap: 5px;
  margin: 11px 0 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.quant-summary-card .quant-card-detail {
  display: block;
  min-height: 22px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.quant-row-formula,
.quant-row-source,
.quant-row-rationale,
.quant-row-floor,
.quant-row-base {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.45;
}

.quant-row-source { color: #61758a; }
.quant-row-rationale { max-width: 230px; }
.quant-row-floor { color: #936411; }
.quant-row-base { color: #31577d; }
.quant-score-range { white-space: nowrap; }

.quant-observation-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.quant-observation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.quant-observation span strong,
.quant-observation span small { display: block; }
.quant-observation span strong { font-size: var(--fs-xs); }
.quant-observation span small { margin-top: 3px; color: var(--muted); font-size: var(--fs-2xs); }
.quant-observation-value { color: var(--teal-deep); font-size: var(--fs-sm); }
.quant-observation p,
.quant-observation code { grid-column: 1 / -1; }
.quant-observation p { color: var(--ink-soft); font-size: var(--fs-2xs); line-height: 1.5; }
.quant-observation code {
  color: var(--muted);
  background: transparent;
  font-size: var(--fs-2xs);
  overflow-wrap: anywhere;
}

.risk-bars {
  display: grid;
  gap: 11px;
  margin-top: 16px;
}

.risk-row {
  display: grid;
  grid-template-columns: 92px 1fr 33px;
  align-items: center;
  gap: 9px;
  font-size: var(--fs-xs);
}

.risk-row strong {
  color: var(--ink-soft);
  font-size: var(--fs-xs);
}

.risk-row > span:last-child {
  color: var(--muted);
  text-align: right;
}

.risk-bar { height: 6px; }
.risk-bar span { background: var(--green); }
.risk-row.is-medium .risk-bar span { background: var(--amber); }
.risk-row.is-high .risk-bar span { background: var(--red); }

.history-list {
  display: grid;
  gap: 10px;
}

.history-intro-meta {
  display: flex;
  max-width: 420px;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  text-align: right;
}

.history-intro-meta p { margin: 0; }

.history-status-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: #626b70;
  background: #eef1ef;
  font-size: var(--fs-2xs);
  font-weight: 900;
  white-space: nowrap;
}

.history-status-badge.is-ready { color: var(--green); background: var(--green-pale); }
.history-status-badge.is-loading { color: var(--blue); background: var(--blue-pale); }
.history-status-badge.is-empty { color: #6d7374; background: #edf0ef; }
.history-status-badge.is-error { color: var(--red); background: var(--red-pale); }
.history-status-badge.is-demo { color: #655096; background: #f4effb; }

.history-storage-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 11px;
  padding: 10px 12px;
  border: 1px solid #d9e4df;
  border-radius: 9px;
  color: #52625d;
  background: #f4f8f6;
  font-size: var(--fs-2xs);
  line-height: 1.6;
}

.history-storage-note strong { flex: 0 0 auto; color: var(--teal-deep); font-size: var(--fs-2xs); }

.history-intelligence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.history-intel-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.history-intel-card--strategy {
  border-color: #b9d8cc;
  background: linear-gradient(145deg, #f4faf7, #fff);
}

.history-intel-card h4 { margin: 3px 0 8px; font-size: var(--fs-xs); }
.history-intel-card > p:not(.section-kicker) { margin: 7px 0 3px; color: var(--ink-soft); font-size: var(--fs-2xs); line-height: 1.5; }
.history-intel-card > small { display: block; color: var(--muted); font-size: var(--fs-2xs); line-height: 1.5; }

.history-intel-value {
  display: block;
  color: var(--teal-deep);
  font-size: var(--fs-md);
  letter-spacing: -0.04em;
}

.history-intel-value small { font-size: var(--fs-2xs); letter-spacing: 0; }

.history-coverage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.history-coverage-grid span { padding: 6px; border-radius: 7px; background: var(--canvas); }
.history-coverage-grid strong,
.history-coverage-grid small { display: block; }
.history-coverage-grid strong { font-size: var(--fs-2xs); }
.history-coverage-grid small { margin-top: 2px; color: var(--muted); font-size: var(--fs-2xs); }

.history-warnings {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #f0dca8;
  border-radius: 9px;
  color: #6b5728;
  background: #fffaf0;
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.history-warnings:empty { display: none; }
.history-warnings strong { font-size: var(--fs-2xs); }
.history-warnings ul { margin: 4px 0 0; padding-left: 16px; }
.history-fact-line { margin-top: 5px; color: #66716d !important; font-size: var(--fs-2xs) !important; line-height: 1.5; }

.history-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.history-year {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  align-content: center;
  gap: 1px;
  border-radius: 12px;
  color: var(--teal-deep);
  background: var(--teal-pale);
  font-size: var(--fs-sm);
  font-weight: 850;
}

.history-year strong { font-size: var(--fs-sm); }
.history-year small { color: var(--teal); font-size: var(--fs-2xs); }

.history-copy strong,
.history-copy span {
  display: block;
}

.history-copy strong {
  margin-bottom: 4px;
  font-size: var(--fs-xs);
}

.history-copy span {
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.history-copy small {
  display: block;
  margin-top: 4px;
  color: #7d8582;
  font-size: var(--fs-2xs);
}

.history-price {
  text-align: right;
}

.history-price strong,
.history-price span {
  display: block;
}

.history-price strong { font-size: var(--fs-xs); }
.history-price span { color: var(--muted); font-size: var(--fs-2xs); }
.history-price em {
  display: inline-block;
  margin-top: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #735d29;
  background: var(--amber-pale);
  font-size: var(--fs-2xs);
  font-style: normal;
  font-weight: 800;
}

.teams-panel {
  background:
    radial-gradient(circle at 100% 0%, rgb(98 100 167 / 0.07), transparent 36%),
    var(--canvas);
}

.mock-only-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #d7cdef;
  border-radius: 999px;
  color: #655096;
  background: #f4effb;
  font-size: var(--fs-2xs);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.teams-mock-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 13px;
  padding: 11px 12px;
  border: 1px solid #d9d4ec;
  border-radius: 10px;
  color: #574e75;
  background: #f6f3fc;
}

.teams-mock-notice svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 1px;
  fill: none;
  stroke: #696aa8;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.teams-mock-notice p {
  margin: 0;
  font-size: var(--fs-2xs);
  line-height: 1.65;
}

.teams-mock-notice strong {
  display: block;
  margin-bottom: 1px;
  font-size: var(--fs-xs);
}

.teams-preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(210px, 0.72fr);
  gap: 12px;
  align-items: start;
}

.teams-window,
.teams-mock-tools {
  overflow: hidden;
  border: 1px solid #dcdfe5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgb(38 42 62 / 0.08);
}

.teams-window {
  background: #f5f5f8;
}

.teams-window__header {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 12px 13px;
  border-bottom: 1px solid #e0e1e5;
  background: #fff;
}

.teams-app-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(145deg, #7779bd, #53569e);
  box-shadow: 0 4px 10px rgb(86 89 157 / 0.2);
  font-size: var(--fs-base);
  font-weight: 900;
}

.teams-window__header strong,
.teams-window__header small {
  display: block;
}

.teams-window__header strong { font-size: var(--fs-xs); }
.teams-window__header small { color: #7b7e89; font-size: var(--fs-2xs); }
.teams-more { color: #81838c; font-size: var(--fs-xs); letter-spacing: 0.08em; }

.adaptive-card-preview {
  margin: 13px;
  padding: 15px;
  border: 1px solid #e0e1e6;
  border-left: 3px solid #6264a7;
  border-radius: 5px 11px 11px 5px;
  background: #fff;
  box-shadow: 0 3px 9px rgb(36 39 60 / 0.06);
}

.adaptive-card-preview__brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.adaptive-logo {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--nav);
  font-size: var(--fs-sm);
  font-weight: 900;
}

.adaptive-card-preview__brand strong,
.adaptive-card-preview__brand small {
  display: block;
}

.adaptive-card-preview__brand strong { font-size: var(--fs-xs); }
.adaptive-card-preview__brand small { margin-top: 1px; color: var(--muted); font-size: var(--fs-2xs); }

.adaptive-card-preview h4 {
  margin: 15px 0 4px;
  color: #242533;
  font-size: var(--fs-base);
  line-height: 1.5;
  letter-spacing: -0.025em;
}

.adaptive-agency {
  margin: 0 0 12px;
  color: #6f717d;
  font-size: var(--fs-2xs);
}

.adaptive-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 11px;
}

.adaptive-status-row span {
  padding: 4px 7px;
  border-radius: 5px;
  color: #4f528f;
  background: #eeeeF8;
  font-size: var(--fs-2xs);
  font-weight: 800;
}

.adaptive-status-row span:last-child {
  color: #8f591b;
  background: #fff2dd;
}

.adaptive-reason {
  margin: 0 0 12px;
  padding: 9px 10px;
  border-radius: 7px;
  color: #4c4e59;
  background: #f6f6f8;
  font-size: var(--fs-2xs);
  line-height: 1.6;
}

.adaptive-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0 0 12px;
  overflow: hidden;
  border: 1px solid #e4e4e8;
  border-radius: 7px;
  background: #e4e4e8;
}

.adaptive-facts div {
  min-width: 0;
  padding: 8px;
  background: #fff;
}

.adaptive-facts dt,
.adaptive-facts dd { margin: 0; }
.adaptive-facts dt { color: #81838c; font-size: var(--fs-2xs); }
.adaptive-facts dd { margin-top: 2px; overflow: hidden; color: #353641; font-size: var(--fs-2xs); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }

.adaptive-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.adaptive-actions button {
  min-height: 31px;
  padding: 0 8px;
  border: 1px solid #c9cadc;
  border-radius: 5px;
  color: #50528f;
  background: #fff;
  font-size: var(--fs-2xs);
  font-weight: 800;
}

.adaptive-actions button:first-child {
  border-color: #6264a7;
  color: #fff;
  background: #6264a7;
}

.teams-window > footer {
  padding: 0 14px 12px;
  color: #8b8d96;
  font-size: var(--fs-2xs);
  text-align: center;
}

.teams-mock-tools {
  padding: 14px;
}

.teams-mock-tools__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
}

.teams-mock-tools__head strong,
.teams-mock-tools__head small { display: block; }
.teams-mock-tools__head strong { font-size: var(--fs-xs); }
.teams-mock-tools__head small { margin-top: 2px; color: var(--muted); font-size: var(--fs-2xs); }

.button--teams {
  color: #fff;
  background: linear-gradient(135deg, #7779bd, #56599e);
  box-shadow: 0 6px 14px rgb(86 89 158 / 0.19);
}

.button--teams:hover:not(:disabled) {
  box-shadow: 0 9px 20px rgb(86 89 158 / 0.26);
}

.button--teams:disabled {
  border: 1px solid var(--line-strong);
  color: #5a6663;
  background: #e7eae6;
  box-shadow: none;
  opacity: 0.82;
}

.teams-send-boundary {
  margin: 7px 0 12px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  text-align: center;
}

.teams-send-boundary span {
  margin-right: 3px;
  color: var(--green);
  font-size: var(--fs-2xs);
}

.teams-log-list {
  display: grid;
  max-height: 210px;
  gap: 7px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.teams-log-item {
  padding: 9px 10px;
  border: 1px solid #e3e5e3;
  border-radius: 8px;
  background: #fafbfa;
}

.teams-log-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.teams-log-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #52639b;
  font-size: var(--fs-2xs);
  font-weight: 900;
}

.teams-log-status::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7779bd;
  content: "";
}

.teams-log-status.is-fallback {
  color: #946215;
}

.teams-log-status.is-fallback::before {
  background: var(--amber);
}

.teams-log-status.is-loading {
  color: var(--muted);
}

.teams-log-status.is-loading::before {
  background: var(--muted);
  animation: pulse 1s ease-in-out infinite alternate;
}

@keyframes pulse {
  to { opacity: 0.35; }
}

.teams-log-item time { color: var(--muted); font-size: var(--fs-2xs); }
.teams-log-item strong { display: block; overflow: hidden; font-size: var(--fs-2xs); text-overflow: ellipsis; white-space: nowrap; }
.teams-log-item p { margin: 3px 0 0; color: var(--muted); font-size: var(--fs-2xs); }

.teams-log-empty {
  display: grid;
  min-height: 92px;
  place-items: center;
  align-content: center;
  border: 1px dashed #d5d8d5;
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfb;
  text-align: center;
}

.teams-log-empty strong,
.teams-log-empty span { display: block; }
.teams-log-empty strong { color: var(--ink-soft); font-size: var(--fs-2xs); }
.teams-log-empty span { margin-top: 2px; font-size: var(--fs-2xs); }

.adaptive-json-details {
  margin-top: 12px;
  border-top: 1px solid #e7e9e7;
  padding-top: 10px;
}

.adaptive-json-details summary {
  color: #5b5e69;
  font-size: var(--fs-2xs);
  font-weight: 750;
}

.adaptive-json-details pre {
  max-height: 220px;
  margin: 8px 0 0;
  padding: 10px;
  overflow: auto;
  border-radius: 7px;
  color: #dbe8e5;
  background: #182726;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: var(--fs-2xs);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.empty-panel {
  display: grid;
  min-height: 210px;
  place-items: center;
  align-content: center;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
  color: var(--muted);
  background: rgb(255 255 255 / 0.5);
  text-align: center;
}

.empty-panel strong { margin-bottom: 4px; color: var(--ink-soft); font-size: var(--fs-sm); }
.empty-panel p { max-width: 360px; margin: 0; font-size: var(--fs-xs); }

.decision-dock {
  flex: 0 0 auto;
  padding: 14px 24px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 -12px 24px rgb(20 43 40 / 0.06);
}

.decision-dock__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.decision-dock__head span,
.decision-dock__head small {
  display: block;
}

.decision-dock__head span {
  font-size: var(--fs-sm);
  font-weight: 800;
}

.decision-dock__head small {
  margin-top: 1px;
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.decision-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 9px;
}

.decision-option {
  position: relative;
}

.decision-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.decision-option span {
  display: flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: var(--fs-xs);
  font-weight: 800;
  transition: border 130ms ease, color 130ms ease, background 130ms ease, box-shadow 130ms ease;
}

.decision-option svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
}

.decision-option input:focus-visible + span {
  outline: 3px solid rgb(239 113 60 / 0.35);
  outline-offset: 2px;
}

.decision-option--go input:checked + span {
  border-color: rgb(35 122 76 / 0.4);
  color: var(--green);
  background: var(--green-pale);
  box-shadow: inset 0 0 0 1px rgb(35 122 76 / 0.08);
}

.decision-option--hold input:checked + span {
  border-color: rgb(201 131 23 / 0.4);
  color: #956313;
  background: var(--amber-pale);
}

.decision-option--no input:checked + span {
  border-color: rgb(189 75 66 / 0.4);
  color: var(--red);
  background: var(--red-pale);
}

.decision-selection-guide {
  margin: -2px 0 9px;
  color: #667976;
  font-size: var(--fs-xs);
  line-height: 1.45;
  font-weight: 650;
  text-align: center;
}

#saveDecisionButton.is-awaiting-selection {
  border-color: #b8c6c3;
  color: #526864;
  background: #eef2f1;
  box-shadow: none;
}

#saveDecisionButton.is-awaiting-selection:hover {
  border-color: #819d97;
  color: #284b45;
  background: #e4ece9;
}

.comment-field {
  position: relative;
  margin-bottom: 9px;
}

.comment-field label {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: var(--fs-2xs);
  font-weight: 750;
}

.comment-field textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  padding: 10px 12px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.comment-field textarea:focus {
  border-color: rgb(34 122 112 / 0.5);
  box-shadow: 0 0 0 3px rgb(34 122 112 / 0.08);
}

.comment-field > span {
  position: absolute;
  right: 9px;
  bottom: 6px;
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.decision-disclaimer {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  text-align: center;
}

.toast-region {
  position: fixed;
  z-index: 400;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 25px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid rgb(22 57 53 / 0.1);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 13px 35px rgb(10 38 35 / 0.2);
  pointer-events: auto;
  animation: toastIn 220ms ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast__icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-pale);
  font-size: var(--fs-sm);
  font-weight: 800;
}

.toast.is-error .toast__icon { color: var(--red); background: var(--red-pale); }
.toast.is-warning .toast__icon { color: var(--amber); background: var(--amber-pale); }

.toast__copy strong,
.toast__copy span {
  display: block;
}

.toast__copy strong { font-size: var(--fs-xs); }
.toast__copy span { margin-top: 1px; color: var(--muted); font-size: var(--fs-2xs); }

.toast__close {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
}

.toast__close:hover { background: var(--surface-soft); }

/* Explicit PPS discovery: stored DB first, external lookup only on click. */
.button--pps {
  color: #fff;
  background: linear-gradient(135deg, #6657c8, #4a3aa8);
  box-shadow: 0 6px 14px rgb(74 58 168 / 0.18);
}

.button--pps:hover:not(:disabled) {
  box-shadow: 0 9px 20px rgb(74 58 168 / 0.25);
}

.button--pps:disabled {
  color: #5f5a80;
  background: #e8e6f3;
  box-shadow: none;
}

.pps-discovery {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid #d8d1f3;
  border-radius: 15px;
  background:
    radial-gradient(circle at 100% 0, rgb(112 91 201 / 0.09), transparent 34%),
    linear-gradient(135deg, #faf9ff, #f5f3fd);
  box-shadow: 0 7px 20px rgb(68 51 143 / 0.06);
}

.pps-discovery__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.pps-discovery__head > div { min-width: 0; }

.pps-discovery__badge,
.pps-discovery__query {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 850;
}

.pps-discovery__badge {
  padding: 4px 8px;
  color: #5644b1;
  background: #e9e4fb;
  letter-spacing: 0.04em;
}

.pps-discovery__query {
  max-width: 36%;
  padding: 6px 9px;
  overflow: hidden;
  border: 1px solid #ded8f2;
  color: #635b83;
  background: rgb(255 255 255 / 0.74);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pps-discovery h3 {
  margin: 7px 0 3px;
  color: #302758;
  font-size: var(--fs-base);
  letter-spacing: -0.035em;
}

.pps-discovery__head p {
  margin: 0;
  color: #6d6687;
  font-size: var(--fs-xs);
  line-height: 1.6;
}

.pps-discovery__form {
  display: grid;
  grid-template-columns: minmax(145px, 0.3fr) minmax(145px, 0.3fr) auto;
  gap: 9px;
  margin-top: 14px;
}

.pps-discovery__form label,
.award-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.pps-discovery__form label > span,
.award-field > span,
.award-scope-field legend {
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: 800;
}

.pps-discovery__form input,
.award-field input {
  width: 100%;
  height: 41px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: var(--fs-sm);
}

.pps-discovery__form input:focus,
.award-field input:focus {
  border-color: rgb(92 73 183 / 0.55);
  box-shadow: 0 0 0 3px rgb(92 73 183 / 0.08);
}

.pps-discovery__form .button { align-self: end; min-height: 41px; }

.pps-discovery__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.pps-discovery__steps li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #e1dcf1;
  border-radius: 10px;
  color: #736c8a;
  background: rgb(255 255 255 / 0.62);
}

.pps-discovery__steps li > span {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #6e648e;
  background: #ece9f6;
  font-size: var(--fs-xs);
  font-weight: 900;
}

.pps-discovery__steps li > div { display: grid; gap: 1px; min-width: 0; }
.pps-discovery__steps strong { color: #4b426c; font-size: var(--fs-xs); }
.pps-discovery__steps small { overflow: hidden; font-size: var(--fs-2xs); text-overflow: ellipsis; white-space: nowrap; }

.pps-discovery__steps li.is-current {
  border-color: #cfc5f2;
  color: #594b9d;
  background: #fff;
}

.pps-discovery__steps li.is-current > span { color: #fff; background: #6657c8; }

.pps-discovery__boundary,
.award-search-boundary {
  margin: 11px 0 0;
  padding: 9px 11px;
  border-radius: 9px;
  color: #655e7d;
  background: rgb(255 255 255 / 0.72);
  font-size: var(--fs-xs);
  line-height: 1.55;
}

.pps-discovery__boundary {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pps-discovery__boundary span { color: #6d6687; }

.pps-discovery__boundary strong,
.award-search-boundary strong { color: #4b3aa5; }

.pps-discovery__results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.pps-discovery__loading {
  display: flex;
  grid-column: 1 / -1;
  min-height: 90px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #635b83;
  font-size: var(--fs-xs);
}

.pps-candidate {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 14px;
  border: 1px solid #ddd8ef;
  border-radius: 12px;
  background: #fff;
}

.pps-candidate.is-stored { border-color: #b9d9ce; background: #fbfefc; }
.pps-candidate.is-complete { box-shadow: inset 3px 0 0 var(--green); }
.pps-candidate.is-pending { box-shadow: inset 3px 0 0 var(--orange); }
.pps-candidate.is-ended { box-shadow: inset 3px 0 0 #8a9290; }
.pps-candidate.is-stored-unknown { box-shadow: inset 3px 0 0 #6a9e91; }

.pps-candidate__head,
.award-result-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.pps-candidate__badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.pps-candidate__source-state,
.pps-candidate__state,
.award-result-card__head > span {
  padding: 4px 7px;
  border-radius: 999px;
  color: #5542ad;
  background: #eeeafd;
  font-weight: 850;
}

.pps-candidate.is-stored .pps-candidate__source-state { color: var(--green); background: var(--green-pale); }
.pps-candidate.is-pending .pps-candidate__state { color: var(--orange-deep); background: var(--orange-pale); }
.pps-candidate.is-complete .pps-candidate__state { color: var(--green); background: var(--green-pale); }
.pps-candidate.is-ended .pps-candidate__state { color: #5f6866; background: #edf0ef; }
.pps-candidate.is-stored-unknown .pps-candidate__state { color: #53635f; background: #edf3f1; }

.pps-candidate h4,
.award-result-card h4 {
  margin: 10px 0 5px;
  color: var(--ink);
  font-size: var(--fs-base);
  line-height: 1.45;
  letter-spacing: -0.025em;
}

.pps-candidate__title-link {
  color: inherit;
  text-decoration-color: rgb(34 122 112 / 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.pps-candidate__title-link:hover { color: var(--teal-deep); text-decoration-color: currentcolor; }
.pps-candidate__title-link:focus-visible { border-radius: 3px; outline: 3px solid rgb(34 122 112 / 0.16); outline-offset: 2px; }

.pps-candidate > p,
.award-result-card__agency {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.pps-candidate dl,
.award-result-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 11px 0;
}

.pps-candidate dl div,
.award-result-card dl div {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: #f7f7fa;
}

.pps-candidate dt,
.pps-candidate dd,
.award-result-card dt,
.award-result-card dd { margin: 0; }

.pps-candidate dt,
.award-result-card dt { color: var(--muted); font-size: var(--fs-2xs); }
.pps-candidate dd,
.award-result-card dd { margin-top: 2px; overflow-wrap: anywhere; color: var(--ink-soft); font-size: var(--fs-xs); font-weight: 750; }

.pps-candidate .pps-candidate__warning {
  margin: 0 0 8px;
  color: #9a6314;
  font-size: var(--fs-2xs);
}

.pps-candidate .pps-candidate__guidance {
  margin: 0 0 9px;
  padding: 8px 9px;
  border-radius: 8px;
  color: #5d5772;
  background: #f6f4fc;
  font-size: var(--fs-xs);
  line-height: 1.55;
}

.pps-candidate.is-stored .pps-candidate__guidance { color: #35665d; background: #eff8f4; }

.pps-candidate footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

.pps-candidate__source-link { flex: 0 0 auto; color: #5644b1; font-size: var(--fs-xs); font-weight: 800; }
.pps-candidate__actions { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.pps-candidate footer .button { min-height: 34px; padding-inline: 11px; font-size: var(--fs-xs); }

.pps-candidate__detail-link {
  color: var(--teal-deep);
  border-color: #bcd9d0;
  background: #f3faf7;
  text-decoration: none;
}

.pps-candidate__detail-link:hover { border-color: #8fc4b4; background: #eaf6f1; }
.pps-candidate__detail-link:focus-visible,
.pps-candidate__source-link:focus-visible { outline: 3px solid rgb(34 122 112 / 0.16); outline-offset: 2px; }

.pps-candidate__cost {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  text-align: right;
}

/* Company award lookup stays separate from verified company performance. */
.award-results-hero {
  background:
    radial-gradient(circle at 88% 20%, rgb(241 192 100 / 0.23), transparent 34%),
    linear-gradient(135deg, #203c58, #13283f 72%);
}

.award-data-classification {
  border-color: rgb(244 205 126 / 0.35);
  color: #f2cd86;
  background: rgb(244 205 126 / 0.1);
}

.award-data-classification span { color: #f1b95d; }
.award-results-boundary .performance-boundary__icon { color: #f1cd83; background: rgb(241 205 131 / 0.12); }
.award-results-explorer { margin-top: 24px; }

.award-search-form {
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) minmax(170px, 0.7fr) minmax(140px, 0.48fr) minmax(140px, 0.48fr);
  gap: 10px;
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8fafb;
}

.award-field small { color: var(--muted); font-size: var(--fs-2xs); }

.award-scope-field {
  display: flex;
  grid-column: 1 / -2;
  min-width: 0;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.award-scope-field legend { float: left; margin-right: 9px; }
.award-scope-field label { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-soft); font-size: var(--fs-xs); }
.award-scope-field input { accent-color: var(--teal); }
.award-search-submit { align-self: end; }

.award-search-boundary {
  color: #5e6874;
  background: #f1f5f8;
}

.award-search-boundary strong { color: #325f83; }

.award-results-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.award-result-warnings {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid #ecd49e;
  border-radius: 10px;
  color: #785b1e;
  background: #fff8e8;
  font-size: var(--fs-xs);
}

.award-result-warnings p { margin: 0; }
.award-result-warnings p + p { margin-top: 4px; }

.award-result-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(180deg, #fff, #fbfcfd);
}

.award-result-card__head > span { color: #315f82; background: #e7f0f7; }
.award-result-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.award-result-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #edf0ed;
}

.award-result-card footer span { color: #315f82; font-size: var(--fs-2xs); font-weight: 850; }
.award-result-card footer small { color: var(--muted); font-size: var(--fs-2xs); text-align: right; }

/* Public, de-identified company performance explorer */
.performance-section {
  min-width: 0;
  margin-top: 16px;
}

.performance-hero {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(30px, 4vw, 52px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #f4fbf8;
  background:
    radial-gradient(circle at 88% 20%, rgb(101 194 172 / 0.24), transparent 34%),
    linear-gradient(135deg, #133f3b, #0b2726 72%);
  box-shadow: 0 18px 38px rgb(16 55 51 / 0.12);
}

.performance-hero::after {
  position: absolute;
  top: -116px;
  right: -86px;
  width: 330px;
  height: 330px;
  border: 52px solid rgb(255 255 255 / 0.025);
  border-radius: 50%;
  content: "";
}

.performance-hero > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.data-classification {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  padding: 5px 9px;
  border: 1px solid rgb(137 218 199 / 0.3);
  border-radius: 999px;
  color: #9ce1d2;
  background: rgb(90 178 158 / 0.12);
  font-size: var(--fs-xs);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.data-classification span {
  color: #65c799;
  font-size: var(--fs-2xs);
}

.performance-hero .section-kicker {
  display: block;
  color: #f5a37f;
}

.performance-hero h2 {
  margin: 9px 0 10px;
  font-size: clamp(29px, 3.4vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.055em;
}

.performance-hero__copy > p:last-child {
  max-width: 620px;
  margin: 0;
  color: #b9d0cb;
  font-size: var(--fs-base);
  line-height: 1.7;
}

.performance-boundary {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr);
  gap: 13px;
  padding: 18px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 16px;
  background: rgb(255 255 255 / 0.07);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
  backdrop-filter: blur(8px);
}

.performance-boundary__icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
  color: #90dfcf;
  background: rgb(123 211 193 / 0.12);
}

.performance-boundary__icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.performance-boundary strong {
  display: block;
  margin-bottom: 5px;
  color: #f5fbf9;
  font-size: var(--fs-sm);
}

.performance-boundary p {
  margin: 0;
  color: #b9d0cb;
  font-size: var(--fs-xs);
  line-height: 1.7;
}

.performance-kpi-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: -24px 18px 26px;
}

.performance-kpi-card {
  min-width: 0;
  padding: 18px 19px 15px;
  border: 1px solid rgb(22 57 53 / 0.08);
  border-top: 3px solid #74ab9f;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.performance-kpi-card--safe { border-top-color: var(--green); }

.performance-kpi-card span,
.performance-kpi-card small { display: block; }

.performance-kpi-card span {
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: 750;
}

.performance-kpi-card strong {
  display: block;
  margin: 7px 0 4px;
  overflow: hidden;
  font-size: clamp(20px, 2.25vw, 28px);
  line-height: 1.1;
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-kpi-card small {
  color: var(--muted);
  font-size: var(--fs-xs);
}

.performance-explorer {
  min-width: 0;
  padding: 27px 29px 25px;
  border: 1px solid rgb(22 57 53 / 0.08);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.performance-explorer__heading h3 {
  margin: 3px 0;
  font-size: var(--fs-xl);
  letter-spacing: -0.04em;
}

.performance-explorer__heading p { margin: 0; }

.performance-explorer__heading > div > p:last-child {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.read-only-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid #cfe0d9;
  border-radius: 999px;
  color: var(--teal-deep);
  background: var(--teal-pale);
  font-size: var(--fs-xs);
  font-weight: 850;
}

.read-only-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.performance-filters {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(220px, 1fr) minmax(145px, 0.28fr) minmax(170px, 0.38fr) auto auto;
  gap: 8px;
  margin: 18px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8faf7;
}

.performance-filters > * { min-width: 0; }

.performance-search-field,
.performance-select-field { background-color: #fff; }

.performance-filter-submit,
.performance-filter-reset {
  min-height: 41px;
  padding-inline: 15px;
}

.performance-panel {
  position: relative;
  min-width: 0;
  min-height: 260px;
}

.performance-list {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.performance-card {
  display: flex;
  min-width: 0;
  min-height: 292px;
  flex-direction: column;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fcfdfb);
  box-shadow: 0 2px 8px rgb(18 43 40 / 0.035);
}

.performance-card__head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.performance-card__head time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.performance-division {
  display: block;
  min-width: 0;
  overflow: hidden;
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--teal-deep);
  background: var(--teal-pale);
  font-size: var(--fs-xs);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-card h4 {
  display: -webkit-box;
  margin: 13px 0 7px;
  overflow: hidden;
  color: var(--ink);
  font-size: var(--fs-base);
  line-height: 1.48;
  letter-spacing: -0.025em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.performance-overview {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 13px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.performance-overview.is-empty {
  color: #899491;
  font-style: italic;
}

.performance-facts {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 11px;
  border-radius: 9px;
  background: #f4f7f4;
}

.performance-facts div { min-width: 0; }
.performance-facts div:last-child { text-align: right; }

.performance-facts dt,
.performance-facts dd { margin: 0; }

.performance-facts dt {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.performance-facts dd {
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: 750;
}

.performance-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 13px;
}

.performance-keywords span {
  max-width: 100%;
  overflow: hidden;
  padding: 3px 6px;
  border: 1px solid #dce5e0;
  border-radius: 999px;
  color: #526460;
  background: #fff;
  font-size: var(--fs-2xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-keywords .performance-keyword--more {
  color: var(--teal-deep);
  background: var(--teal-pale);
}

.performance-keywords .performance-keyword--empty {
  color: var(--muted);
  border-style: dashed;
}

.performance-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid #edf0ed;
}

.performance-card > footer span {
  color: var(--green);
  font-size: var(--fs-2xs);
  font-weight: 900;
  letter-spacing: 0.06em;
}

.performance-card > footer small {
  color: var(--muted);
  font-size: var(--fs-2xs);
  text-align: right;
}

.performance-state { min-height: 320px; }

.performance-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.performance-pagination > div strong,
.performance-pagination > div span { display: block; }

.performance-pagination > div strong {
  color: var(--ink-soft);
  font-size: var(--fs-xs);
}

.performance-pagination > div span {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.performance-pagination nav {
  display: flex;
  align-items: center;
  gap: 9px;
}

.performance-pagination nav .button {
  min-height: 34px;
  padding-inline: 12px;
}

#performancePageLabel {
  min-width: 48px;
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: 800;
  text-align: center;
}

.result-learning-hero {
  background:
    radial-gradient(circle at 88% 8%, rgb(141 112 209 / 0.28), transparent 32%),
    linear-gradient(135deg, #223d4d, #172938);
}

.operator-editor {
  margin-bottom: 18px;
  border-color: #d7e2df;
}

.performance-editor {
  padding-block: 20px;
  background: linear-gradient(180deg, #f7fbf9, #fff);
}

.operator-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.operator-filters {
  grid-template-columns: minmax(260px, 1fr) minmax(130px, 0.25fr) minmax(140px, 0.26fr) auto auto;
}

.operator-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.operator-list--compact {
  margin-top: 16px;
}

.operator-record {
  display: flex;
  min-width: 0;
  min-height: 230px;
  flex-direction: column;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 2px 8px rgb(18 43 40 / 0.035);
}

.operator-record > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.operator-record > div:first-child small { color: var(--muted); font-size: var(--fs-2xs); }

.record-status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #765716;
  background: var(--amber-pale);
  font-size: var(--fs-2xs);
  font-weight: 850;
}

.record-status--validated { color: var(--green); background: var(--green-pale); }
.record-status--archived { color: #65716e; background: #edf0ee; }
.record-status--missing { color: #8a4d47; background: var(--red-pale); }

.operator-record h4 {
  margin: 12px 0 5px;
  color: var(--ink);
  font-size: var(--fs-base);
  line-height: 1.45;
}

.operator-record > p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.operator-record dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 14px;
}

.operator-record dl div {
  min-width: 0;
  padding: 9px;
  border-radius: 8px;
  background: #f4f7f4;
}

.operator-record dt,
.operator-record dd { margin: 0; }
.operator-record dt { margin-bottom: 3px; color: var(--muted); font-size: var(--fs-2xs); }
.operator-record dd { overflow: hidden; color: var(--ink-soft); font-size: var(--fs-xs); font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }

.operator-record footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid #edf0ed;
}

.operator-record footer small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--fs-2xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operator-record footer .button { min-height: 34px; flex: 0 0 auto; padding-inline: 12px; }
.operator-empty { min-height: 170px; }

.record-editor-dialog { width: min(760px, calc(100vw - 28px)); }

.record-editor-dialog .source-link-dialog__panel {
  display: flex;
  max-height: min(860px, calc(100vh - 32px));
  flex-direction: column;
}

.record-editor-dialog .source-link-dialog__header p:last-child {
  max-width: 580px;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--fs-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-editor-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow-y: auto;
}

.record-field {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: 750;
}

.record-field--wide { grid-column: 1 / -1; }

.record-field input,
.record-field select,
.record-field textarea {
  width: 100%;
  min-height: 41px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 500;
}

.record-field textarea { resize: vertical; line-height: 1.55; }
.record-field input:focus-visible,
.record-field select:focus-visible,
.record-field textarea:focus-visible { border-color: var(--teal); outline: 3px solid rgb(20 184 166 / 18%); }

.record-check {
  display: flex;
  min-height: 41px;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: 750;
}

.record-editor-note {
  margin: 2px 0 0;
  padding: 10px 11px;
  border-radius: 9px;
  color: #765716;
  background: var(--amber-pale);
  font-size: var(--fs-xs);
  line-height: 1.55;
}

/* Pre-specification workspace: stored records and live PPS discovery stay visually distinct. */
.prespec-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.prespec-hero {
  background:
    radial-gradient(circle at 82% 18%, rgb(129 140 248 / 0.2), transparent 32%),
    linear-gradient(135deg, #102f38 0%, #173c43 54%, #252f55 100%);
}

.prespec-classification {
  border-color: rgb(199 210 254 / 0.38);
  color: #e0e7ff;
  background: rgb(99 102 241 / 0.18);
}

.prespec-boundary {
  position: relative;
  border-color: rgb(199 210 254 / 0.28);
  background: rgb(8 26 37 / 0.34);
}

.prespec-help-button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(224 231 255 / 0.44);
  border-radius: 50%;
  color: #fff;
  background: rgb(99 102 241 / 0.3);
  font-size: var(--fs-md);
  font-weight: 900;
  transition: transform 140ms ease, background 140ms ease;
}

.prespec-help-button:hover { transform: translateY(-1px); background: rgb(99 102 241 / 0.48); }
.prespec-help-button:focus-visible { outline: 3px solid rgb(199 210 254 / 0.55); outline-offset: 2px; }

.prespec-track-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: -24px 18px 24px;
  position: relative;
  z-index: 2;
}

.prespec-track {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.prespec-track--stored { border-top: 5px solid var(--teal); }
.prespec-track--live { border-top: 5px solid #6366f1; background: linear-gradient(180deg, #fbfbff, #fff 150px); }

.prespec-track__head {
  display: flex;
  min-height: 116px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.prespec-track__head h3 { margin: 7px 0 4px; font-size: var(--fs-lg); letter-spacing: -0.025em; }
.prespec-track__head p { max-width: 560px; margin: 0; color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.6; }

.prespec-track__badge,
.prespec-zero-cost,
.prespec-status,
.prespec-analysis-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.prespec-track__badge { padding: 6px 9px; color: var(--teal-deep); background: var(--teal-pale); letter-spacing: 0.04em; }
.prespec-track--live .prespec-track__badge { color: #4338ca; background: #e9e9ff; }
.prespec-zero-cost { padding: 7px 9px; color: #3e615d; background: var(--surface-soft); }
.prespec-track--live .prespec-zero-cost { color: #4f46e5; background: #efefff; }

.prespec-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 0.55fr);
  gap: 8px;
  align-items: end;
  margin: 14px 0 12px;
  padding: 12px;
  border: 1px solid #dce7e3;
  border-radius: 13px;
  background: #f5faf8;
}

.prespec-search-form:not(.prespec-search-form--live) .prespec-field--query {
  grid-column: 1 / -1;
}

.prespec-search-form--live {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-color: #ddddf8;
  background: #f4f4ff;
}

.prespec-search-form--live .prespec-field--query { grid-column: 1 / -1; }
.prespec-search-form--live .button { width: 100%; }

.prespec-field { display: grid; min-width: 0; gap: 5px; }
.prespec-field > span { color: var(--ink-soft); font-size: var(--fs-xs); font-weight: 800; }
.prespec-field input,
.prespec-field select {
  width: 100%;
  min-height: 41px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font-size: var(--fs-sm);
}

.prespec-field input:focus-visible,
.prespec-field select:focus-visible { border-color: #6366f1; outline: 3px solid rgb(99 102 241 / 0.15); }

.button--prespec {
  border: 1px solid #5653d5;
  color: #fff;
  background: #5b57d9;
  box-shadow: 0 6px 14px rgb(79 70 229 / 0.2);
}

.button--prespec:hover:not(:disabled) { border-color: #4338ca; background: #4944c4; }
.button--prespec:disabled { opacity: 0.58; }

.prespec-track__summary { min-height: 20px; margin: 0 2px 10px; color: var(--muted); font-size: var(--fs-xs); font-weight: 700; }
.prespec-card-list { display: grid; gap: 10px; }

.prespec-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 15px;
  border: 1px solid #dfe8e4;
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.prespec-card--live { border-color: #dedff6; box-shadow: 0 3px 14px rgb(79 70 229 / 0.07); }
.prespec-card__head { display: flex; align-items: center; gap: 6px; }
.prespec-card__head small { margin-left: auto; overflow-wrap: anywhere; color: var(--muted); font-size: var(--fs-xs); }
.prespec-card h4 { margin: 0; color: var(--ink); font-size: var(--fs-base); line-height: 1.45; letter-spacing: -0.015em; }
.prespec-card > p { margin: -4px 0 0; color: var(--ink-soft); font-size: var(--fs-xs); }
.prespec-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; }
.prespec-card dl div { min-width: 0; padding: 8px 9px; border-radius: 8px; background: var(--surface-soft); }
.prespec-card--live dl div { background: #f6f6ff; }
.prespec-card dt { color: var(--muted); font-size: var(--fs-2xs); font-weight: 750; }
.prespec-card dd { margin: 2px 0 0; overflow-wrap: anywhere; color: var(--ink); font-size: var(--fs-xs); font-weight: 750; }
.prespec-status, .prespec-analysis-badge { padding: 6px 8px; }
.prespec-status { color: #765716; background: var(--amber-pale); }
.prespec-status--open_for_opinion { color: var(--green); background: var(--green-pale); }
.prespec-status--linked_to_bid { color: var(--blue); background: var(--blue-pale); }
.prespec-analysis-badge { color: #4f46e5; background: #efefff; }
.prespec-analysis-badge--failed,
.prespec-analysis-badge--review { color: var(--red); background: var(--red-pale); }
.prespec-linked { padding: 7px 9px; border-radius: 8px; color: var(--muted); background: #f6f7f5; font-size: var(--fs-xs); font-weight: 700; }
.prespec-linked.is-linked { color: var(--blue); background: var(--blue-pale); }
.prespec-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 2px; }
.prespec-card footer > small { color: var(--muted); font-size: var(--fs-2xs); }
.prespec-state { min-height: 164px; border-radius: 12px; background: transparent; }

.prespec-help-dialog__body > p { margin: 0 0 14px; color: var(--ink-soft); }
.prespec-guide-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: prespec-step; }
.prespec-guide-steps li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 2px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); counter-increment: prespec-step; }
.prespec-guide-steps li::before { display: grid; width: 28px; height: 28px; grid-row: 1 / 3; place-items: center; border-radius: 50%; color: #fff; background: #5b57d9; content: counter(prespec-step); font-size: var(--fs-xs); font-weight: 900; }
.prespec-guide-steps strong { font-size: var(--fs-sm); }
.prespec-guide-steps span { color: var(--ink-soft); font-size: var(--fs-xs); line-height: 1.55; }

.prespec-detail-dialog { width: min(920px, calc(100vw - 32px)); }
.prespec-detail-dialog .source-link-dialog__panel { max-height: calc(100vh - 36px); overflow: auto; }
.prespec-detail-body { display: grid; gap: 14px; }
.prespec-detail-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.prespec-detail-facts > div { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.prespec-detail-facts span { display: block; color: var(--muted); font-size: var(--fs-2xs); font-weight: 800; }
.prespec-detail-facts strong { display: block; margin-top: 3px; overflow-wrap: anywhere; font-size: var(--fs-xs); }
.prespec-detail-keywords, .prespec-detail-documents { display: flex; flex-wrap: wrap; gap: 6px; }
.prespec-detail-keywords span { padding: 5px 8px; border-radius: 999px; color: var(--teal-deep); background: var(--teal-pale); font-size: var(--fs-xs); font-weight: 750; }
.prespec-detail-documents { align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.prespec-detail-documents h3 { width: 100%; margin: 0 0 3px; font-size: var(--fs-sm); }
.prespec-detail-documents a,
.prespec-detail-documents > span { padding: 6px 8px; border-radius: 7px; color: var(--blue); background: var(--blue-pale); font-size: var(--fs-xs); font-weight: 700; text-decoration: none; }
.prespec-detail-loading,
.prespec-detail-error { display: grid; min-height: 180px; place-items: center; align-content: center; gap: 8px; text-align: center; }
.prespec-detail-error p { margin: 0; color: var(--red); font-size: var(--fs-xs); }

.prespec-analysis-panel { margin: 0 22px; padding: 14px; border: 1px solid #dedff6; border-radius: 12px; background: #f7f7ff; }
.prespec-analysis-panel h3 { margin: 1px 0 5px; font-size: var(--fs-base); }
.prespec-analysis-panel p { margin: 0; color: var(--ink-soft); font-size: var(--fs-xs); }
.prespec-analysis-panel strong { color: #4338ca; }
.prespec-analysis-status { display: flex; align-items: center; gap: 8px; }
.prespec-analysis-result { display: grid; gap: 9px; padding: 13px; border: 1px solid #dce5e1; border-radius: 11px; background: #fbfdfc; }
.prespec-analysis-result__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prespec-analysis-result__head h3 { margin: 0; font-size: var(--fs-base); }
.prespec-analysis-result__head span { color: var(--teal); font-size: var(--fs-xs); font-weight: 850; }
.prespec-analysis-result p { margin: 0; color: var(--ink-soft); font-size: var(--fs-xs); line-height: 1.6; }
.prespec-analysis-requirements { display: grid; gap: 5px; margin: 0; }
.prespec-analysis-requirements div { padding: 8px 9px; border-radius: 8px; background: var(--surface-soft); }
.prespec-analysis-requirements dt { color: var(--muted); font-size: var(--fs-2xs); font-weight: 800; }
.prespec-analysis-requirements dd { margin: 2px 0 0; font-size: var(--fs-xs); }
.prespec-analysis-audits { display: flex; flex-wrap: wrap; gap: 5px; }
.prespec-analysis-audits span { padding: 5px 7px; border-radius: 6px; color: #4f46e5; background: #efefff; font-size: var(--fs-2xs); font-weight: 700; }
.prespec-analysis-boundary { padding: 8px 9px; border-radius: 8px; color: #765716 !important; background: var(--amber-pale); font-weight: 750; }

body.teams-context .prespec-hero,
body.teams-context .prespec-track { scroll-margin-top: 78px; }

@media (max-width: 1180px) {
  :root { --sidebar-width: 222px; }
  .sidebar { padding-inline: 13px; }
  .hero { grid-template-columns: 1fr 380px; padding-inline: 38px; }
  .loop-node { width: 70px; height: 70px; }
  .notice-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notice-table th:first-child { width: 34%; }
}

@media (max-width: 980px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prespec-track-grid { grid-template-columns: 1fr; }
  .prespec-track__head { min-height: 0; }
  .hero { grid-template-columns: 1fr; min-height: 235px; }
  .hero__loop { display: none; }
  .priority-search { grid-template-columns: 1fr 1fr; }
  .priority-search__keywords { grid-column: 1 / 2; }
  .filters { flex-wrap: wrap; }
  .search-field { flex-basis: calc(100% - 145px); }
  .select-field--sort { margin-left: 0; }
  .notice-table th:nth-child(5),
  .notice-table td:nth-child(5) { display: none; }
  .notice-table th:first-child { width: 40%; }
  .performance-hero { grid-template-columns: 1fr; }
  .performance-boundary { max-width: 720px; }
  .performance-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .performance-filters { grid-template-columns: 1fr 1fr; }
  .performance-search-field { grid-column: 1 / -1; }
  .performance-filter-submit,
  .performance-filter-reset { width: 100%; }
  .award-search-form { grid-template-columns: 1fr 1fr; }
  .award-scope-field { grid-column: 1 / -1; }
  .award-search-submit { width: 100%; }
}

@media (max-width: 820px) {
  :root { --sidebar-width: 252px; }
  .sidebar {
    z-index: 170;
    transform: translateX(-104%);
    transition: transform 220ms ease;
  }
  .sidebar.is-open { transform: translateX(0); box-shadow: 15px 0 40px rgb(5 28 26 / 0.28); }
  .workspace { margin-left: 0; }
  .mobile-menu-button { display: grid; }
  .topbar { padding-inline: 20px; }
  .topbar__context { flex: 1; }
  .main-content { padding-inline: 20px; }
  .demo-banner { padding-inline: 20px; }
  .notice-section { padding-inline: 20px; }
  .performance-list { grid-template-columns: 1fr; }
  .operator-list { grid-template-columns: 1fr; }
  .prespec-track-grid { margin-inline: 8px; }
  .pps-discovery__results,
  .award-results-list { grid-template-columns: 1fr; }
  .detail-drawer { width: 100vw; }
}

@media (max-width: 680px) {
  .demo-banner { align-items: flex-start; flex-wrap: wrap; padding: 9px 15px; }
  .demo-banner div { display: block; }
  .demo-banner div span { display: block; }
  .demo-banner .text-button { margin-left: 31px; }
  .demo-banner:not([hidden]) + .topbar { top: 77px; }
  .topbar { min-height: 70px; padding: 10px 14px; }
  .topbar__context p { display: none; }
  .topbar__context h1 { font-size: var(--fs-md); }
  .topbar__actions { gap: 5px; }
  .topbar__actions .button { width: 39px; min-height: 39px; padding: 0; }
  .topbar__actions .button span { display: none; }
  .pai-bot-access__note { display: none; }
  .main-content { padding: 0 12px 22px; }
  .hero { min-height: 215px; margin-top: 10px; padding: 29px 25px 42px; border-radius: 17px; }
  .hero h2 { font-size: var(--fs-2xl); }
  .hero p { font-size: var(--fs-sm); }
  .kpi-grid { gap: 8px; margin: -22px 9px 20px; }
  .kpi-card { padding: 15px 14px 13px; border-radius: 12px; }
  .kpi-card--accent { padding-top: 13px; }
  .kpi-icon { width: 27px; height: 27px; }
  .kpi-value { font-size: var(--fs-xl); }
  .notice-section { padding: 21px 13px 8px; border-radius: 17px; }
  .performance-section { margin-top: 10px; }
  .performance-hero { padding: 28px 24px 43px; border-radius: 17px; }
  .performance-hero h2 { font-size: var(--fs-2xl); }
  .performance-boundary { grid-template-columns: 34px minmax(0, 1fr); padding: 14px; }
  .performance-boundary__icon { width: 34px; height: 34px; }
  .prespec-boundary { grid-template-columns: 38px minmax(0, 1fr); }
  .prespec-track-grid { gap: 12px; margin: -22px 0 18px; }
  .prespec-track { padding: 15px 12px; border-radius: 15px; }
  .prespec-track__head { display: grid; }
  .prespec-zero-cost { justify-self: start; }
  .prespec-search-form,
  .prespec-search-form--live { grid-template-columns: 1fr; padding: 10px; }
  .prespec-search-form--live .prespec-field--query { grid-column: auto; }
  .prespec-search-form .button { width: 100%; }
  .prespec-card { padding: 13px; }
  .prespec-card footer { align-items: flex-start; }
  .prespec-card footer .button { flex: 0 0 auto; }
  .prespec-help-dialog,
  .prespec-detail-dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .prespec-detail-dialog .source-link-dialog__panel { max-height: calc(100vh - 18px); }
  .prespec-detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prespec-analysis-panel { margin-inline: 12px; }
  .performance-kpi-grid { gap: 8px; margin: -22px 9px 20px; }
  .performance-kpi-card { padding: 14px 13px 12px; border-radius: 12px; }
  .performance-kpi-card strong { font-size: var(--fs-lg); }
  .performance-explorer { padding: 21px 13px 17px; border-radius: 17px; }
  .performance-explorer__heading { align-items: center; }
  .performance-explorer__heading h3 { font-size: var(--fs-lg); }
  .performance-filters { grid-template-columns: 1fr; padding: 10px; }
  .operator-filters { grid-template-columns: 1fr; }
  .operator-heading-actions { width: 100%; justify-content: stretch; }
  .operator-heading-actions .button { flex: 1 1 150px; }
  .record-editor-dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .record-editor-dialog .source-link-dialog__panel { max-height: calc(100vh - 18px); }
  .record-editor-grid { grid-template-columns: 1fr; }
  .record-field--wide { grid-column: auto; }
  .performance-search-field { grid-column: auto; }
  .performance-card { min-height: 0; padding: 15px; }
  .performance-facts { grid-template-columns: 1fr; }
  .performance-facts div:last-child { text-align: left; }
  .performance-card > footer { align-items: flex-start; }
  .performance-card > footer small { text-align: right; }
  .performance-pagination { align-items: flex-start; }
  .performance-pagination > div span { max-width: 150px; }
  .pps-discovery { padding: 14px; }
  .pps-discovery__head { display: block; }
  .pps-discovery__query { max-width: 100%; margin-top: 8px; }
  .pps-discovery__form { grid-template-columns: 1fr; }
  .pps-discovery__form .button { width: 100%; }
  .pps-discovery__steps { grid-template-columns: 1fr; }
  .pps-discovery__boundary { display: grid; gap: 3px; }
  .pps-candidate dl { grid-template-columns: 1fr; }
  .pps-candidate footer { align-items: flex-start; }
  .pps-candidate__actions { width: 100%; }
  .pps-candidate__actions .button { flex: 1 1 145px; }
  .award-results-explorer { margin-top: 14px; }
  .award-search-form { grid-template-columns: 1fr; padding: 10px; }
  .award-scope-field { display: grid; grid-template-columns: 1fr 1fr; }
  .award-scope-field legend { float: none; grid-column: 1 / -1; }
  .award-result-card { padding: 15px; }
  .section-heading { align-items: center; }
  .section-heading h2 { font-size: var(--fs-lg); }
  .priority-search { grid-template-columns: 1fr; padding: 10px; }
  .priority-search__keywords { grid-column: auto; }
  .priority-search__apply { width: 100%; }
  .notice-search-toolbar { align-items: stretch; }
  .notice-search-modes { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .notice-search-mode { justify-content: center; padding-inline: 8px; }
  .pps-search-suggestion { align-items: stretch; flex-direction: column; }
  .pps-search-suggestion .button { width: 100%; }
  .notice-search-help-dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .notice-search-help-compare { grid-template-columns: 1fr; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  .search-field { grid-column: 1 / -1; min-width: 0; }
  .select-field { min-width: 0; }
  .select-field--sort { min-width: 0; }
  .filter-reset { display: none; }
  .notice-card-grid {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }
  .notice-card__foot,
  .notice-card__actions { flex-wrap: wrap; }
  .notice-card { min-height: 215px; }
  .page-footer { display: block; }
  .page-footer span { display: block; margin-top: 4px; }
  .detail-drawer { width: 100vw; }
  .drawer-header { min-height: 58px; padding-inline: 12px; }
  .manual-analysis-detail { width: 36px; padding: 0; }
  .manual-analysis-detail span { display: none; }
  .drawer-loading { top: 58px; }
  .detail-hero { padding: 23px 18px 20px; }
  .detail-hero h2 { font-size: var(--fs-lg); }
  .detail-facts { grid-template-columns: 1fr 1fr; }
  .detail-fact:last-child { grid-column: 1 / -1; }
  .decision-summary { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .summary-metric { padding: 10px 9px; }
  .summary-metric strong { font-size: var(--fs-sm); }
  .analysis-pipeline { grid-template-columns: repeat(2, 1fr); }
  .detail-tabs { padding-inline: 8px; }
  .detail-tabs button { min-height: 48px; font-size: var(--fs-xs); }
  .tab-panel { padding: 15px 12px 24px; }
  .detail-card { padding: 16px 14px; }
  .private-match-summary { grid-template-columns: 1fr 1fr; }
  .private-match-preview__head { align-items: flex-start; }
  .score-overview { grid-template-columns: 1fr 1fr; }
  .score-card--risk { grid-column: 1 / -1; }
  .quant-observation-list { grid-template-columns: 1fr; }
  .history-intelligence { grid-template-columns: 1fr; }
  .history-card { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 13px; }
  .history-year { width: 48px; height: 48px; }
  .history-price { grid-column: 2; text-align: left; }
  .history-intro-meta { display: block; max-width: 48%; }
  .history-intro-meta p { margin-top: 4px; }
  .history-storage-note { display: block; }
  .history-storage-note strong { display: block; margin-bottom: 2px; }
  .teams-preview-layout { grid-template-columns: 1fr; }
  .adaptive-card-preview { margin: 10px; padding: 13px; }
  .teams-mock-tools { padding: 12px; }
  .decision-dock { padding-inline: 12px; }
  .toast-region { right: 16px; bottom: 16px; }
}

@media (max-width: 390px) {
  .kpi-card p { display: none; }
  .kpi-card { min-height: 104px; }
  .view-toggle { display: none; }
  .decision-summary { grid-template-columns: 1fr; }
  .summary-metric { display: flex; align-items: center; justify-content: space-between; }
  .summary-metric small { margin: 0; }
  .pipeline-step { padding: 10px; }
  .pipeline-step small { display: none; }
  .detail-tabs button { padding-inline: 2px; font-size: var(--fs-2xs); }
  .private-match-preview__head { display: block; }
  .private-match-preview__actions { justify-content: space-between; margin-top: 7px; }
  .adaptive-facts { grid-template-columns: 1fr; }
  .adaptive-actions { grid-template-columns: 1fr; }
  .performance-hero { padding-inline: 19px; }
  .prespec-card dl,
  .prespec-detail-facts { grid-template-columns: 1fr; }
  .prespec-card footer { display: grid; }
  .prespec-card footer .button { width: 100%; }
  .prespec-guide-steps li { grid-template-columns: 28px minmax(0, 1fr); padding: 10px; }
  .performance-boundary { grid-template-columns: 1fr; }
  .performance-kpi-grid { grid-template-columns: 1fr 1fr; }
  .performance-explorer__heading { align-items: flex-start; }
  .performance-card__head { align-items: flex-start; }
  .performance-card__head time { padding-top: 4px; }
  .performance-card > footer { display: block; }
  .performance-card > footer small { display: block; margin-top: 3px; text-align: left; }
  .performance-pagination { display: grid; }
  .performance-pagination nav { justify-content: space-between; }
}

body.teams-context .sidebar-status,
body.teams-context .sidebar-foot {
  display: none;
}

body.teams-context .sidebar {
  padding-bottom: 12px;
}

body.teams-context .performance-hero,
body.teams-context .performance-explorer {
  scroll-margin-top: 78px;
}

/* UX readability baseline: key navigation and work surfaces stay legible at a glance. */
body {
  font-size: var(--fs-base);
}

.nav-item {
  font-size: var(--fs-base);
  font-weight: 700;
}

.nav-count,
.trend,
.eyebrow,
.section-kicker {
  font-size: var(--fs-sm);
}

.topbar__context p,
.kpi-card p,
.section-heading > div:first-child > p:last-child,
.priority-search__intro span,
.priority-search__help,
.notice-search-scope {
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.hero p {
  font-size: var(--fs-base);
  line-height: 1.65;
}

.kpi-card__head,
.button,
.text-button,
.priority-search__intro,
.priority-search select,
.priority-search input,
.notice-search-mode {
  font-size: var(--fs-base);
}

.notice-table th,
.notice-table td,
.notice-card p,
.notice-card small,
.detail-card p,
.detail-card li,
.performance-card p,
.performance-card small,
.award-result-card p,
.award-result-card small,
.prespec-card > p,
.prespec-card dd {
  font-size: var(--fs-sm);
  line-height: 1.6;
}

/* 2026-09-04 UI/UX decision contract: action-first home, three state axes, full-screen detail. */
:root {
  --eligibility-pass: #0f7a3e;
  --eligibility-exception: #f5a524;
  --eligibility-current: #b26a00;
  --eligibility-review: #b26a00;
  --eligibility-fail: #c42b2b;
  --focus-ring: #1976d2;
}

:focus-visible,
.kpi-card__action:focus-visible,
.decision-option input:focus-visible + span {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.hero--work {
  display: block;
  min-height: 0;
  margin-top: 18px;
  padding: 26px 30px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.hero--work::before { display: none; }
.hero--work .eyebrow { color: var(--teal-deep); }
.hero--work h2 { max-width: none; margin-top: 8px; color: var(--ink); font-size: clamp(24px, 3vw, 34px); }
.hero--work p { max-width: none; color: var(--ink-soft); }

.kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 16px 0 28px;
}

.kpi-card--action,
.kpi-card--reference {
  grid-column: span 2;
}

.kpi-card--action {
  min-height: 148px;
  border-color: #d6e1dc;
}

.kpi-card--action .kpi-card__head > span:first-child::after {
  margin-left: 7px;
  color: var(--teal-deep);
  content: "열기 →";
  font-size: var(--fs-xs);
}

.kpi-card--reference {
  min-height: 118px;
  padding-top: 16px;
  background: #f8faf9;
  box-shadow: none;
}

.kpi-card--reference:hover,
.kpi-card--reference:focus-within {
  border-color: rgb(22 57 53 / 0.08);
  box-shadow: none;
  transform: none;
}

.notice-table { min-width: 1320px; }
.notice-table th:first-child { width: 25%; }
.notice-table th:nth-child(2) { width: 9%; }
.notice-table th:nth-child(3) { width: 9%; }
.notice-table th:nth-child(4) { width: 9%; }
.notice-table th:nth-child(5) { width: 10%; }
.notice-table th:nth-child(6) { width: 10%; }
.notice-table th:nth-child(7) { width: 12%; }
.notice-table th:nth-child(8) { width: 8%; }
.notice-table th:last-child { width: 8%; }

.notice-row:hover,
.notice-row:focus,
.notice-row:focus-within {
  background: #f3f6fb;
}

.notice-row:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

.notice-row td:first-child { border-left: 4px solid #aab5b2; }
.notice-row.decision-participate td:first-child,
.notice-card.decision-participate { border-left-color: #1976d2; }
.notice-row.decision-hold td:first-child,
.notice-card.decision-hold { border-left-color: #7b61a8; }
.notice-row.decision-decline td:first-child,
.notice-card.decision-decline { border-left-color: #5e6872; }
.notice-row.decision-undecided td:first-child,
.notice-card.decision-undecided { border-left-color: #aab5b2; }

.budget-cell {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 750;
}

.status-pill::before { width: auto; height: auto; border-radius: 0; background: transparent; font-weight: 900; }
.status-pill--pass::before { content: "✓"; }
.status-pill--pass_exception::before { content: "!"; }
.status-pill--pass_current::before { content: "◷"; }
.status-pill--review::before,
.status-pill--unknown::before { content: "!"; }
.status-pill--fail::before { content: "×"; }
.status-pill--pass { color: #fff; background: var(--eligibility-pass); border-color: var(--eligibility-pass); }
.status-pill--pass_exception { color: #1f2933; background: var(--eligibility-exception); border-color: var(--eligibility-exception); }
.status-pill--pass_current { color: #000; background: var(--eligibility-current); border-color: var(--eligibility-current); }
.status-pill--review,
.status-pill--unknown { color: #000; background: var(--eligibility-review); border-color: var(--eligibility-review); }
.status-pill--fail { color: #fff; background: var(--eligibility-fail); border-color: var(--eligibility-fail); }

.analysis-state {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid #c8d0d6;
  border-radius: 999px;
  color: #52606b;
  background: #fff;
  font-size: var(--fs-xs);
  font-weight: 800;
}
.analysis-state--error { border-color: #d8a7a7; color: #8e2525; background: #fff8f8; }

.ai-judgment {
  display: inline-flex;
  max-width: 100%;
  flex-direction: column;
  gap: 2px;
  padding: 3px 0 3px 8px;
  border-left: 2px solid #7462a8;
  color: #40365f;
  background: transparent;
  font-size: var(--fs-xs);
  line-height: 1.35;
}

.ai-judgment__main {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-judgment__main svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-judgment__main span,
.ai-judgment__main small,
.ai-judgment__main strong { display: block; }
.ai-judgment__main small { color: #766d8e; font-size: var(--fs-xs); font-weight: 700; }
.ai-judgment__main strong { font-size: var(--fs-sm); }
.ai-judgment__evidence { color: #6f687d; font-size: var(--fs-xs); }
.ai-judgment__condition {
  color: #8a5c08;
  font-size: var(--fs-xs);
  line-height: 1.45;
  white-space: normal;
}
.ai-judgment--go { border-left-color: #4f6fad; color: #24487e; }
.ai-judgment--conditional { border-left-color: #8b66a9; color: #5b3976; }
.ai-judgment--no { border-left-color: #59636d; color: #343c44; }
.ai-judgment--pending,
.ai-judgment--unknown { border-left-color: #89939c; color: #59636d; }

.operator-decision {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 8px;
  border: 1px solid #cfd6dc;
  border-radius: 6px;
  color: #3e4b57;
  background: #fff;
}

.operator-decision small { color: #78828b; font-size: var(--fs-xs); }
.operator-decision strong { font-size: var(--fs-sm); }
.operator-decision--participate { border-color: #92b7de; color: #155a9b; }
.operator-decision--hold { border-color: #b7a5d0; color: #654780; }
.operator-decision--decline { border-color: #aeb6bd; color: #46505a; }
.operator-decision--undecided { border-style: dashed; color: #68747e; }

.detail-link-button {
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid #8aaea7;
  border-radius: 7px;
  color: var(--teal-deep);
  background: #fff;
  font-size: var(--fs-xs);
  font-weight: 800;
  white-space: nowrap;
}

.detail-link-button:hover { background: #edf6f3; }

.notice-card {
  border-left: 4px solid #aab5b2;
}

.notice-card__axes {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.requirement-item {
  grid-template-columns: 26px minmax(0, 1fr) auto auto;
}

.requirement-status {
  padding: 4px 8px;
  border-radius: 999px;
  color: #1f2933;
  background: #fff;
  border: 1px solid var(--eligibility-review);
  box-shadow: inset 3px 0 var(--eligibility-review);
  font-size: var(--fs-xs);
  font-weight: 800;
  white-space: nowrap;
}

.requirement-item.is-pass .requirement-status { color: var(--eligibility-pass); background: #fff; border-color: var(--eligibility-pass); box-shadow: inset 3px 0 var(--eligibility-pass); }
.requirement-item.is-pass_exception .requirement-status { color: #1f2933; background: #fff; border-color: var(--eligibility-exception); box-shadow: inset 3px 0 var(--eligibility-exception); }
.requirement-item.is-pass_current .requirement-status { color: #1f2933; background: #fff; border-color: var(--eligibility-current); box-shadow: inset 3px 0 var(--eligibility-current); }
.requirement-item.is-review .requirement-status,
.requirement-item.is-unknown .requirement-status { color: #1f2933; background: #fff; border-color: var(--eligibility-review); box-shadow: inset 3px 0 var(--eligibility-review); }
.requirement-item.is-fail .requirement-status { color: var(--eligibility-fail); background: #fff; border-color: var(--eligibility-fail); box-shadow: inset 3px 0 var(--eligibility-fail); }
.requirement-item.is-pass_exception .requirement-icon { color: #8a5a00; background: #fff2cf; }
.requirement-item.is-pass_current .requirement-icon { color: var(--eligibility-current); background: #fff0d5; }

.detail-drawer {
  inset: 0;
  width: 100vw;
  max-width: none;
  box-shadow: none;
  transform: translateY(100%);
  transition: transform 220ms ease, visibility 0s linear 220ms;
}

.detail-drawer.is-open {
  transform: translateY(0);
  transition: transform 220ms ease, visibility 0s;
}

.drawer-scrim { display: none !important; }
.drawer-header { padding-inline: max(20px, calc((100vw - 1180px) / 2)); }
.drawer-header__meta { flex: 1 1 auto; }
.drawer-header__actions { flex: 0 0 auto; }

.detail-sequence {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.detail-sequence .button { min-height: 36px; padding: 0 10px; }
.detail-sequence span { min-width: 110px; color: var(--muted); font-size: var(--fs-xs); text-align: center; }

.detail-hero > *,
.analysis-pipeline,
.detail-tabs,
.tab-panel {
  width: min(100%, 1180px);
  margin-inline: auto;
}

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

.summary-metric--eligibility {
  border-color: rgb(15 122 62 / 0.35);
}

.summary-metric--eligibility-pass { border-color: var(--eligibility-pass); }
.summary-metric--eligibility-pass_exception { border-color: var(--eligibility-exception); }
.summary-metric--eligibility-pass_current { border-color: var(--eligibility-current); }
.summary-metric--eligibility-review { border-color: var(--eligibility-review); }
.summary-metric--eligibility-fail { border-color: var(--eligibility-fail); }

.private-match-state.is-pass_current { color: #1f2933; background: #fff; border-color: var(--eligibility-current); box-shadow: inset 3px 0 var(--eligibility-current); }
.private-match-state.is-pass_exception { color: #1f2933; background: #fff; border-color: var(--eligibility-exception); box-shadow: inset 3px 0 var(--eligibility-exception); }
.private-match-state.is-review { color: #1f2933; background: #fff; border-color: var(--eligibility-review); box-shadow: inset 3px 0 var(--eligibility-review); }

.summary-metric--operator {
  border-color: rgb(25 118 210 / 0.35);
  background: rgb(25 118 210 / 0.09);
}

.recommendation-condition {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgb(245 165 36 / 0.55);
  border-radius: 10px;
  color: #1f2933;
  background: #fffaf0;
}

.recommendation-condition[hidden] { display: none; }
.recommendation-condition strong { flex: 0 0 auto; color: #8a5c08; font-size: var(--fs-sm); }
.recommendation-condition span,
.recommendation-condition ul { margin: 0; font-size: var(--fs-sm); line-height: 1.55; }
.recommendation-condition ul { padding-left: 18px; }
.recommendation-condition li + li { margin-top: 4px; }

.decision-dock {
  padding-inline: max(24px, calc((100vw - 1180px) / 2));
}

@media (max-width: 980px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-card--action,
  .kpi-card--reference { grid-column: auto; }
  .notice-table { min-width: 1180px; }
  .notice-table th:nth-child(5),
  .notice-table td:nth-child(5) { display: table-cell; }
  .decision-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .hero--work { min-height: 0; margin-top: 10px; padding: 22px 20px; }
  .hero--work h2 { font-size: var(--fs-xl); }
  .detail-sequence span { display: none; }
  .detail-sequence .button { width: auto; min-height: 36px; }
  .drawer-header__meta { display: none; }
  .decision-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .requirement-item { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .requirement-status { grid-column: 2; justify-self: start; }
  .evidence-jump { grid-column: 3; grid-row: 1 / span 2; }
  .recommendation-condition { display: grid; gap: 4px; }
}

@media (max-width: 390px) {
  .decision-summary { grid-template-columns: 1fr; }
}

/* Cloud Dancer + Classic Blue theme. Glass is reserved for navigation and fixed controls. */
html {
  background: var(--canvas);
}

body {
  background:
    radial-gradient(circle at 88% -4%, rgb(188 215 238 / 0.72), transparent 34rem),
    radial-gradient(circle at 12% 28%, rgb(255 255 255 / 0.92), transparent 30rem),
    linear-gradient(145deg, #f0eee9 0%, #f6f7f6 50%, #eaf2f8 100%);
  background-attachment: fixed;
}

::selection {
  color: #fff;
  background: var(--blue);
}

.skip-link {
  background: var(--blue);
}

.sidebar {
  border-right-color: rgb(255 255 255 / 0.2);
  background:
    radial-gradient(circle at 16% 8%, rgb(140 190 228 / 0.3), transparent 30%),
    linear-gradient(165deg, #1c659e 0%, var(--nav) 52%, var(--nav-deep) 100%);
  box-shadow: 10px 0 34px rgb(15 76 129 / 0.12);
}

.brand-mark {
  border-color: rgb(255 255 255 / 0.34);
  background: rgb(255 255 255 / 0.12);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.32), 0 8px 20px rgb(5 41 72 / 0.16);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.brand-mark svg {
  stroke: #dce9f5;
}

.brand-mark circle {
  fill: #f0eee9;
  stroke: #f0eee9;
}

.brand small,
.sidebar-foot small,
.sidebar-status small {
  color: #bfd4e5;
}

.nav-group-toggle {
  color: #c6d9e8;
}

.nav-group-toggle:hover {
  color: #fff;
}

.nav-item,
.nav-item--sub {
  color: #d7e5f0;
}

.nav-item:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.1);
}

.nav-item.is-active,
.nav-item--sub.is-active {
  border: 1px solid rgb(255 255 255 / 0.3);
  color: #fff;
  background: linear-gradient(135deg, rgb(255 255 255 / 0.22), rgb(255 255 255 / 0.1));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.24), 0 12px 28px rgb(4 39 70 / 0.18);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
}

.nav-item--sub.is-active {
  box-shadow: inset 3px 0 0 #f0eee9, inset 0 1px 0 rgb(255 255 255 / 0.2), 0 10px 24px rgb(4 39 70 / 0.14);
}

.nav-count,
.sidebar-status {
  border-color: rgb(255 255 255 / 0.2);
  color: #e8f1f7;
  background: rgb(255 255 255 / 0.09);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sidebar-foot .avatar {
  color: var(--nav-deep);
  background: #eaf2f8;
}

.topbar {
  border-bottom-color: rgb(15 76 129 / 0.12);
  background: rgb(240 238 233 / 0.78);
  box-shadow: 0 8px 26px rgb(15 76 129 / 0.06);
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
}

.button--primary {
  background: linear-gradient(135deg, #2775b3 0%, var(--blue) 100%);
  box-shadow: 0 8px 20px rgb(15 76 129 / 0.2);
}

.button--primary:hover:not(:disabled) {
  box-shadow: 0 11px 26px rgb(15 76 129 / 0.26);
}

.button--teams,
.button--pps,
.button--prespec {
  border-color: rgb(255 255 255 / 0.24);
  color: #fff;
  background: linear-gradient(135deg, #2b79b6 0%, var(--blue) 100%);
  box-shadow: 0 8px 20px rgb(15 76 129 / 0.2);
}

.button--teams:hover:not(:disabled),
.button--pps:hover:not(:disabled),
.button--prespec:hover:not(:disabled) {
  border-color: rgb(255 255 255 / 0.36);
  background: linear-gradient(135deg, #236ca7 0%, var(--nav-deep) 100%);
}

.source-kind-badge--synthetic {
  border-color: #bdd0df;
  color: #315d7f;
  background: #eaf2f8;
}

.button--secondary,
.button--ghost,
.icon-button,
.notice-search-help-button {
  border-color: rgb(184 202 217 / 0.82);
  background: rgb(255 255 255 / 0.7);
  backdrop-filter: blur(12px) saturate(125%);
  -webkit-backdrop-filter: blur(12px) saturate(125%);
}

.button--secondary:hover:not(:disabled),
.button--ghost:hover:not(:disabled),
.icon-button:hover {
  border-color: #8eabc3;
  background: rgb(255 255 255 / 0.92);
}

.hero--work,
.notice-section,
.kpi-card,
.performance-explorer,
.performance-kpi-card,
.prespec-card,
.award-result-card {
  border-color: rgb(184 202 217 / 0.58);
  background: var(--glass-surface);
  box-shadow: var(--shadow-sm);
}

.hero--work {
  background:
    linear-gradient(120deg, rgb(255 255 255 / 0.86), rgb(220 233 245 / 0.7)),
    var(--glass-surface);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}

.hero--work h2 {
  word-break: keep-all;
  text-wrap: balance;
}

.hero--work .eyebrow,
.section-kicker {
  color: var(--blue);
}

.kpi-card:hover,
.kpi-card:focus-within {
  border-color: rgb(15 76 129 / 0.36);
  box-shadow: 0 16px 34px rgb(15 76 129 / 0.13);
}

.kpi-card.is-active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgb(15 76 129 / 0.13), var(--shadow-md);
}

.kpi-card--accent {
  border-top-color: var(--blue);
}

.kpi-icon,
.trend,
.source-kind-badge,
.source-badge {
  color: var(--blue);
  background: var(--blue-pale);
}

.notice-section,
.performance-explorer {
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(14px) saturate(118%);
  -webkit-backdrop-filter: blur(14px) saturate(118%);
}

.priority-search,
.performance-filters,
.award-search-form {
  border-color: #c5d6e4;
  background: rgb(220 233 245 / 0.46);
}

.notice-search-modes,
.view-toggle {
  border-color: var(--glass-line);
  background: rgb(255 255 255 / 0.52);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.8), 0 8px 22px rgb(15 76 129 / 0.08);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
}

.notice-search-mode:hover {
  color: var(--blue);
  background: rgb(255 255 255 / 0.7);
}

.notice-search-mode.is-active[data-notice-search-mode="stored"],
.notice-search-mode.is-active[data-notice-search-mode="pps"],
.notice-search-mode.is-active[data-notice-search-mode="prespec"],
.view-toggle button.is-active {
  border-color: rgb(15 76 129 / 0.2);
  color: #fff;
  background: linear-gradient(135deg, #2b79b6, var(--blue));
  box-shadow: 0 7px 16px rgb(15 76 129 / 0.2), inset 0 1px 0 rgb(255 255 255 / 0.24);
}

.notice-search-mode__dot--stored,
.notice-search-mode__dot--pps,
.notice-search-mode__dot--prespec {
  background: currentcolor;
}

.notice-table th,
.quant-table th {
  border-color: #cfdae4;
  color: #415568;
  background: #e9f1f8;
}

.notice-row {
  border-bottom-color: #e3e9ee;
}

.notice-row:hover,
.notice-row:focus,
.notice-row:focus-within {
  background: rgb(220 233 245 / 0.42);
}

.manual-analysis-action,
.detail-link-button {
  border-color: #9ebbd2;
  color: var(--blue);
  background: #edf4fa;
}

.manual-analysis-action:hover:not(:disabled),
.detail-link-button:hover {
  border-color: #6f9fc4;
  color: #0b3b64;
  background: #dce9f5;
}

input,
select,
textarea,
.priority-search select,
.priority-search input,
.comment-field textarea {
  border-color: #c3d1dd;
  color: var(--ink);
  background-color: rgb(255 255 255 / 0.82);
}

input:focus,
select:focus,
textarea:focus,
.priority-search select:focus,
.priority-search input:focus,
.comment-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(15 76 129 / 0.12);
}

.performance-hero,
.prespec-hero,
.result-learning-hero,
.award-results-hero {
  border: 1px solid rgb(184 202 217 / 0.62);
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 12%, rgb(130 180 219 / 0.28), transparent 34%),
    linear-gradient(125deg, rgb(255 255 255 / 0.86), rgb(220 233 245 / 0.78));
  box-shadow: var(--glass-shadow);
}

.performance-hero .section-kicker,
.performance-hero h2 {
  color: var(--ink);
}

.performance-hero__copy > p:last-child {
  color: var(--ink-soft);
}

.detail-drawer {
  background:
    radial-gradient(circle at 90% 0%, rgb(185 214 238 / 0.68), transparent 34rem),
    linear-gradient(155deg, #f0eee9 0%, #f7f8f8 56%, #eaf2f8 100%);
}

.drawer-header {
  border-bottom-color: rgb(15 76 129 / 0.13);
  background: rgb(247 248 248 / 0.78);
  box-shadow: 0 9px 24px rgb(15 76 129 / 0.08);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.drawer-header .icon-button,
.drawer-header .button {
  min-width: 44px;
  min-height: 44px;
}

.drawer-loading {
  background: rgb(240 238 233 / 0.86);
}

.detail-hero {
  border-bottom: 1px solid rgb(15 76 129 / 0.1);
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 8%, rgb(117 174 219 / 0.24), transparent 34%),
    linear-gradient(125deg, rgb(255 255 255 / 0.84), rgb(220 233 245 / 0.7));
}

.detail-hero h2 {
  width: min(100%, 1180px);
  max-width: 1180px;
  margin: 0 auto 7px;
}

.detail-tag {
  border: 1px solid rgb(15 76 129 / 0.16);
  color: var(--blue);
  background: rgb(255 255 255 / 0.62);
}

.detail-tag--urgent {
  border-color: rgb(196 43 43 / 0.24);
  color: var(--red);
  background: var(--red-pale);
}

.detail-tag--ended {
  border-color: #c9d2da;
  color: #46596b;
  background: #eff3f6;
}

.detail-tag--cancelled {
  border-color: rgb(196 43 43 / 0.28);
  color: var(--red);
  background: var(--red-pale);
}

.detail-agency {
  color: var(--muted);
}

.detail-facts {
  gap: 10px;
  border: 0;
  background: transparent;
}

.detail-fact,
.summary-metric {
  border: 1px solid rgb(184 202 217 / 0.58);
  background: rgb(255 255 255 / 0.66);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.8), 0 8px 22px rgb(15 76 129 / 0.06);
  backdrop-filter: blur(13px) saturate(125%);
  -webkit-backdrop-filter: blur(13px) saturate(125%);
}

.detail-fact small,
.summary-metric small {
  color: var(--muted);
}

.detail-fact strong,
.summary-metric strong {
  color: var(--ink);
}

.summary-metric--recommendation strong {
  color: var(--blue);
}

.analysis-pipeline {
  gap: 8px;
  padding: 12px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 0;
  background: transparent;
}

.pipeline-step {
  min-height: 58px;
  border: 1px solid rgb(184 202 217 / 0.56);
  border-radius: 13px;
  background: rgb(255 255 255 / 0.68);
  box-shadow: 0 7px 18px rgb(15 76 129 / 0.06);
}

.pipeline-step__icon {
  color: var(--blue);
  background: var(--blue-pale);
}

.detail-tabs {
  top: 10px;
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--glass-line);
  border-radius: 17px;
  background: rgb(255 255 255 / 0.7);
  box-shadow: var(--glass-shadow);
  scrollbar-width: none;
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
}

.detail-tabs::-webkit-scrollbar {
  display: none;
}

.detail-tabs button {
  min-width: 112px;
  min-height: 44px;
  flex: 1 0 auto;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  white-space: nowrap;
}

.detail-tabs button:hover {
  border-color: rgb(15 76 129 / 0.12);
  color: var(--blue);
  background: rgb(220 233 245 / 0.46);
}

.detail-tabs button[aria-selected="true"] {
  border-color: rgb(255 255 255 / 0.32);
  color: #fff;
  background: linear-gradient(135deg, #2b79b6 0%, var(--blue) 100%);
  box-shadow: 0 8px 18px rgb(15 76 129 / 0.22), inset 0 1px 0 rgb(255 255 255 / 0.24);
}

.detail-tabs button[aria-selected="true"]::after {
  display: none;
}

.detail-tabs button[aria-selected="true"] span {
  color: var(--blue);
  background: #fff;
}

.tab-panel {
  padding-top: 18px;
}

.detail-card {
  border-color: rgb(184 202 217 / 0.58);
  background: rgb(255 255 255 / 0.78);
  box-shadow: 0 9px 24px rgb(15 76 129 / 0.07);
}

.evidence-jump,
#toggleCommentButton {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 9px;
  color: var(--blue);
  background: rgb(220 233 245 / 0.72);
  text-decoration: none;
}

.adaptive-actions button {
  min-height: 44px;
  font-size: var(--fs-sm);
}

.recommendation-condition {
  border-color: rgb(178 106 0 / 0.36);
  color: var(--ink);
  background: rgb(255 241 214 / 0.88);
}

.decision-dock {
  border-top-color: rgb(15 76 129 / 0.15);
  background: rgb(255 255 255 / 0.84);
  box-shadow: 0 -14px 34px rgb(15 76 129 / 0.12), inset 0 1px 0 rgb(255 255 255 / 0.86);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.decision-option span {
  min-height: 44px;
  border-color: #c4d2dd;
  color: var(--ink-soft);
  background: rgb(247 249 251 / 0.78);
}

.decision-option--go input:checked + span,
.decision-option--hold input:checked + span,
.decision-option--no input:checked + span {
  border-color: var(--blue);
  color: var(--blue);
  background: #e5eff8;
  box-shadow: 0 0 0 2px rgb(15 76 129 / 0.11), inset 0 1px 0 #fff;
}

.decision-selection-guide {
  color: var(--muted);
}

#saveDecisionButton.is-awaiting-selection {
  border-color: #c5d1db;
  color: #657584;
  background: #e9eef2;
}

.source-link-dialog__panel,
.record-editor-dialog .source-link-dialog__panel {
  border-color: var(--glass-line);
  background: var(--glass-surface-strong);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}

@media (min-width: 821px) {
  .decision-dock {
    display: grid;
    grid-template-columns: minmax(170px, 0.72fr) minmax(360px, 2fr) minmax(150px, 0.62fr);
    align-items: end;
    gap: 8px 14px;
  }

  .decision-dock__head,
  .decision-options,
  .decision-selection-guide {
    margin: 0;
  }

  .decision-dock__head {
    grid-column: 1;
    grid-row: 1;
  }

  .decision-options {
    grid-column: 2;
    grid-row: 1;
  }

  #saveDecisionButton {
    grid-column: 3;
    grid-row: 1;
    min-height: 44px;
  }

  .decision-selection-guide {
    grid-column: 2;
    grid-row: 2;
    text-align: left;
  }

  .decision-disclaimer {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    text-align: left;
  }

  .comment-field {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-bottom: 0;
  }
}

@media (max-width: 820px) {
  .sidebar {
    background: rgb(15 76 129 / 0.94);
    box-shadow: 18px 0 48px rgb(4 39 70 / 0.24);
    backdrop-filter: blur(22px) saturate(135%);
    -webkit-backdrop-filter: blur(22px) saturate(135%);
  }

  .topbar {
    min-height: 68px;
    padding-inline: 18px;
  }

  .mobile-menu-button {
    background: rgb(255 255 255 / 0.66);
  }

  .main-content {
    padding-inline: 16px;
  }

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

  .detail-tabs {
    width: calc(100% - 24px);
    margin-inline: 12px;
  }

  .detail-tabs button {
    min-width: 96px;
    font-size: var(--fs-sm);
  }
}

@media (max-width: 680px) {
  .mobile-menu-button,
  .topbar__actions .button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    flex-basis: 44px;
  }

  .notice-search-mode,
  .notice-search-help-button {
    min-height: 44px;
  }

  .drawer-scroll {
    display: flex;
    flex-direction: column;
  }

  .drawer-scroll > * {
    flex: 0 0 auto;
  }

  .detail-tabs {
    order: 0;
    scrollbar-color: rgb(15 76 129 / 0.36) transparent;
    scrollbar-width: thin;
  }

  .detail-tabs::-webkit-scrollbar {
    display: block;
    height: 3px;
  }

  .detail-tabs::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgb(15 76 129 / 0.36);
  }

  .detail-hero {
    order: 1;
  }

  .analysis-pipeline {
    order: 2;
  }

  .tab-panel {
    order: 3;
  }

  .drawer-header {
    min-height: 64px;
    padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  }

  .drawer-header .icon-button,
  .drawer-header .button {
    min-width: 44px;
    min-height: 44px;
  }

  .source-dialog-button span {
    display: none;
  }

  .manual-analysis-detail:disabled {
    display: none;
  }

  .detail-hero {
    padding: 22px 18px 20px;
  }

  .detail-hero h2 {
    font-size: var(--fs-xl);
    line-height: 1.35;
  }

  .detail-tag,
  .detail-fact small,
  .summary-metric small,
  .requirement-status,
  .decision-dock__head small {
    font-size: var(--fs-sm);
  }

  .requirement-copy strong {
    font-size: var(--fs-sm);
  }

  .requirement-copy small {
    font-size: var(--fs-sm);
  }

  .detail-agency {
    font-size: var(--fs-sm);
  }

  .detail-facts {
    grid-template-columns: 1fr 1fr;
  }

  .detail-fact {
    min-height: 68px;
    padding: 11px 12px;
  }

  .detail-fact strong {
    overflow: visible;
    font-size: var(--fs-sm);
    white-space: normal;
  }

  .decision-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .summary-metric {
    min-height: 72px;
    padding: 11px 12px;
  }

  .analysis-pipeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 12px;
  }

  .pipeline-step {
    min-height: 54px;
    padding: 10px 11px;
  }

  .pipeline-step strong {
    font-size: var(--fs-sm);
  }

  .detail-tabs {
    top: 8px;
  }

  .tab-panel {
    padding: 16px 12px 24px;
  }

  .detail-card {
    padding: 17px 15px;
  }

  .decision-dock {
    padding: 8px 12px max(8px, env(safe-area-inset-bottom));
  }

  .decision-dock__head {
    margin-bottom: 6px;
  }

  .decision-options {
    margin-bottom: 6px;
  }

  .decision-dock__head span {
    font-size: var(--fs-base);
  }

  .decision-option span,
  #saveDecisionButton {
    min-height: 46px;
    font-size: var(--fs-sm);
  }

  .decision-selection-guide {
    margin: 0 0 6px;
    font-size: var(--fs-sm);
    line-height: 1.35;
  }

  .decision-disclaimer {
    margin-top: 4px;
    font-size: var(--fs-xs);
  }
}

@media (max-width: 390px) {
  .main-content {
    padding-inline: 12px;
  }

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

  .detail-tabs button {
    min-width: 92px;
    padding-inline: 12px;
    font-size: var(--fs-sm);
  }

  .decision-options {
    gap: 6px;
  }

  .decision-option span {
    min-height: 46px;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar,
  .drawer-header,
  .detail-tabs,
  .decision-dock,
  .notice-search-modes,
  .view-toggle,
  .source-link-dialog__panel {
    background: #fff;
  }

  .sidebar {
    background: var(--nav);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .sidebar,
  .topbar,
  .demo-banner,
  .filters,
  .view-toggle,
  .decision-dock,
  .page-footer {
    display: none !important;
  }
  .workspace { margin: 0; }
  .main-content { max-width: none; padding: 0; }
  .hero { color: #000; background: #fff; box-shadow: none; }
  .hero p { color: #444; }
  .notice-section { box-shadow: none; }
  .performance-hero { color: #000; background: #fff; box-shadow: none; }
  .performance-boundary { border-color: #ccc; background: #fff; }
  .performance-hero__copy > p:last-child,
  .performance-boundary p { color: #444; }
  .performance-explorer,
  .performance-kpi-card { box-shadow: none; }
  .performance-filters,
  .performance-pagination nav { display: none !important; }
}
