:root {
  --bg: #f6f1e9;
  --surface: rgba(255, 252, 247, 0.9);
  --surface-strong: #fffdf9;
  --line: rgba(39, 54, 54, 0.12);
  --text: #1e2725;
  --muted: #66716d;
  --accent: #12686a;
  --accent-soft: rgba(18, 104, 106, 0.1);
  --done: #2d8b57;
  --done-soft: rgba(45, 139, 87, 0.12);
  --shadow: 0 24px 56px rgba(31, 39, 37, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 1320px;
  --font-ui: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  --font-display: "Baskerville", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --type-heading-weight: 400;
  --type-ui-weight: 500;
  --type-label-weight: 600;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(18, 104, 106, 0.12), transparent 22%),
    radial-gradient(circle at top right, rgba(176, 130, 66, 0.1), transparent 18%),
    linear-gradient(180deg, #f8f4ed 0%, var(--bg) 100%);
  font-family: var(--font-ui);
  font-size: 16px;
  letter-spacing: -0.012em;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* A clear keyboard indicator improves navigation without changing behavior or
   the component architecture. Mouse users continue to see the same design. */
:focus-visible {
  outline: 3px solid rgba(18, 104, 106, 0.78);
  outline-offset: 3px;
}

p,
ul,
ol {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-weight: var(--type-heading-weight);
}

.app-shell {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 24px;
}

.admin-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 30px 20px 24px;
  background: rgba(255, 253, 249, 0.76);
  border-right: 1px solid rgba(39, 54, 54, 0.1);
  backdrop-filter: blur(18px);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}

.admin-brand .brand-mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 0.82rem;
}

.admin-brand .eyebrow {
  display: block;
  margin-bottom: 1px;
}

.admin-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.16rem;
  letter-spacing: -0.035em;
}

.admin-nav {
  display: grid;
  gap: 12px;
  margin-top: 38px;
}

.admin-nav-home,
.admin-nav-tree summary,
.admin-nav-children a {
  display: flex;
  align-items: center;
  border-radius: 12px;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: var(--type-ui-weight);
}

.admin-nav-home {
  gap: 11px;
  padding: 10px 12px;
  color: var(--muted);
}

.admin-nav-home:hover {
  background: #f0f4f1;
  color: var(--text);
}

.admin-nav-tree {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.admin-nav-tree summary {
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.admin-nav-tree summary::-webkit-details-marker {
  display: none;
}

.admin-nav-tree summary:hover {
  background: #f0f4f1;
}

.admin-nav-chevron {
  color: var(--accent);
  font-size: 1rem;
  transition: transform 180ms ease;
}

.admin-nav-tree:not([open]) .admin-nav-chevron {
  transform: rotate(-90deg);
}

.admin-nav-children {
  display: grid;
  gap: 3px;
  margin-top: 6px;
  padding-left: 12px;
}

.admin-nav-children a {
  padding: 9px 12px;
  color: var(--muted);
}

.admin-nav-children a:hover {
  background: #e8f0ed;
  color: var(--accent);
}

.admin-sidebar-note {
  margin: auto 8px 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-content {
  width: min(100%, calc(var(--max-width) + 80px));
  margin: 0 auto;
  padding: 30px clamp(24px, 4vw, 56px) 40px;
}

.admin-page-header {
  margin-bottom: 26px;
}

.admin-page-header .eyebrow {
  margin-bottom: 4px;
}

.admin-page-header h1,
.brand-lockup h1,
.hero h2,
.section-heading h2,
.report-tile h3,
.accordion-trigger strong,
.usage-card h3 {
  font-family: var(--font-display);
  font-weight: var(--type-heading-weight);
}

.admin-page-header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 2.4vw, 2.5rem);
  font-weight: var(--type-heading-weight);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.legal-links a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-links a:hover {
  color: var(--accent);
}

.app-legal-links {
  padding: 4px 0 16px;
}

.legal-shell {
  width: min(100% - 32px, 860px);
  margin: 0 auto;
  padding: 56px 0;
}

.legal-card {
  padding: clamp(28px, 6vw, 64px);
}

.legal-brand {
  display: inline-block;
  margin-bottom: 44px;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal-card h1,
.legal-card h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  letter-spacing: -0.025em;
}

.legal-card h1 {
  margin: 0 0 8px;
  font-size: clamp(2.3rem, 6vw, 3.6rem);
}

.legal-card h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.legal-card section {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.legal-card p {
  max-width: 72ch;
  line-height: 1.7;
}

.legal-intro {
  margin-top: 28px;
  color: var(--muted);
  font-size: 1.08rem;
}

.legal-contact a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-action .button {
  display: inline-flex;
  margin-top: 8px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 24px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(31, 39, 37, 0.08);
}

.brand-mark img,
.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-lockup h1,
.hero h2,
.section-heading h2,
.report-tile h3,
.accordion-trigger strong,
.usage-card h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: var(--type-label-weight);
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  appearance: none;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  transition: 180ms ease;
}

/* Keep every native button visibly and behaviorally distinct when an action
   is unavailable, regardless of its component-specific visual treatment. */
button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  filter: saturate(0.3);
  box-shadow: none;
}

button:disabled:hover {
  transform: none;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-pill,
.token-pill,
.status-chip,
.provider-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
}

.mode-link {
  appearance: none;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.mode-link:hover {
  transform: translateY(-1px);
  border-color: rgba(18, 104, 106, 0.26);
  background: rgba(255, 255, 255, 0.84);
}

.token-pill strong {
  font-size: 1rem;
}

.main-column {
  display: grid;
  gap: 22px;
  padding-bottom: 40px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 36px 20px;
}

.auth-card {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 22px;
  align-items: stretch;
}

.auth-copy,
.auth-panel {
  position: relative;
  z-index: 1;
}

.auth-copy {
  display: grid;
  align-content: center;
  gap: 20px;
  min-width: 0;
}

.auth-copy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.auth-copy-links .button.is-selected {
  background: var(--accent);
  color: white;
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(18, 104, 106, 0.18);
}

.auth-copy h1 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  /* Keep the sign-in headline two pixels below the original display scale. */
  font-size: clamp(calc(2.8rem - 2px), calc(5vw - 2px), calc(4.8rem - 2px));
  line-height: 0.92;
  letter-spacing: -0.05em;
  max-width: 12ch;
}

.auth-panel {
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: 1px solid rgba(39, 54, 54, 0.08);
  padding: 28px;
}

.auth-panel h2 {
  margin: 0 0 8px;
}

.auth-panel-copy {
  margin: 0 0 18px;
  line-height: 1.7;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-oauth {
  margin-bottom: 14px;
}

.auth-divider {
  position: relative;
  margin: 8px 0 20px;
  text-align: center;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid var(--line);
}

.auth-divider span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 6px 12px;
  background: var(--surface-strong);
  border: 1px solid rgba(18, 104, 106, 0.2);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(18, 104, 106, 0.08);
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.auth-note {
  margin: 16px 0 0;
}

.auth-inline-link {
  margin: 4px 0 0;
}

.auth-inline-link a {
  color: var(--accent);
  font-weight: var(--type-label-weight);
}

.auth-result,
.auth-notice,
#login-error {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(18, 104, 106, 0.14);
  background: rgba(18, 104, 106, 0.06);
  line-height: 1.6;
}

#login-error {
  border-color: rgba(145, 49, 49, 0.18);
  background: rgba(145, 49, 49, 0.06);
  color: #7a3636;
}

.auth-result a,
.auth-notice a {
  color: var(--accent);
  font-weight: 700;
}

.auth-value-grid {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.auth-value-card {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.72);
  border: 1px solid rgba(39, 54, 54, 0.08);
  box-shadow: 0 12px 28px rgba(31, 39, 37, 0.04);
}

.auth-value-card strong {
  display: block;
  margin-bottom: 6px;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.auth-value-card p {
  margin: 0;
  line-height: 1.65;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(255, 253, 249, 0.96), rgba(252, 248, 241, 0.84));
  box-shadow: 0 18px 42px rgba(31, 39, 37, 0.055);
  backdrop-filter: blur(12px);
  padding: 24px;
}

.card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 8%;
  left: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(18, 104, 106, 0.3), transparent);
  pointer-events: none;
}

.admin-dashboard-main,
.admin-dashboard-grid {
  display: grid;
  gap: 18px;
}

.admin-filter-form,
.admin-summary-grid,
.admin-dashboard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-filter-form {
  display: grid;
  align-items: end;
  gap: 14px;
}

.admin-filter-form label {
  display: grid;
  gap: 6px;
}

.admin-summary-grid {
  display: grid;
  gap: 18px;
}

.admin-summary-card strong {
  display: block;
  font-size: 2rem;
}

.admin-dashboard-grid {
  display: grid;
}

.admin-dashboard-grid > .card {
  grid-column: span 2;
}

.admin-dashboard-grid > .admin-dashboard-wide {
  grid-column: 1 / -1;
}

.admin-table-wrap { overflow-x: auto; }
.admin-table-wrap table { width: 100%; border-collapse: collapse; }
.admin-table-wrap th, .admin-table-wrap td { padding: 10px 8px; border-bottom: 1px solid rgba(39, 54, 54, 0.08); text-align: left; white-space: nowrap; }
.admin-table-wrap th { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }

.operations-source-filter { display: grid; gap: 6px; min-width: 200px; }
.operations-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 16px; }
.operations-trace { display: grid; gap: 12px; }
.operations-trace-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.operations-trace-card h3 { margin: 0 0 12px; font-size: 1rem; }
.operations-trace-card dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.operations-trace-card dt { color: var(--muted); font-weight: 700; }
.operations-trace-card dd { margin: 0; overflow-wrap: anywhere; }
.operations-trace-button { padding: 7px 12px; font-size: 0.84rem; }
.ingestion-visual-chart { display: grid; grid-template-columns: repeat(14, minmax(28px, 1fr)); gap: 8px; height: 180px; align-items: end; margin-top: 18px; }
.ingestion-visual-bar { min-height: 32px; height: var(--bar-height); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; border-radius: 9px 9px 4px 4px; overflow: hidden; color: white; text-align: center; }
.ingestion-visual-stack { display: flex; min-height: 0; flex-direction: column-reverse; }
.ingestion-visual-segment { display: block; width: 100%; }
.ingestion-visual-segment-direct { background: var(--accent); }
.ingestion-visual-segment-coverage { background: #597bb8; }
.ingestion-visual-segment-fallback { background: #b17b45; }
.ingestion-visual-legend-direct { --legend-color: var(--accent); }
.ingestion-visual-legend-coverage { --legend-color: #597bb8; }
.ingestion-visual-legend-fallback { --legend-color: #b17b45; }
.ingestion-visual-value { padding-top: 3px; font-weight: 800; font-size: 0.84rem; background: rgba(28, 43, 45, 0.28); }
.ingestion-visual-label { padding: 3px 1px; font-size: 0.68rem; background: rgba(28, 43, 45, 0.28); white-space: nowrap; }
.ingestion-visual-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 0.8rem; }
.ingestion-visual-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ingestion-visual-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--legend-color); }
.ingestion-visual-data { margin-top: 14px; }
.ingestion-visual-data summary { cursor: pointer; color: var(--muted); font-weight: 700; }
.ingestion-controls-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ingestion-control-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: rgba(255, 255, 255, 0.55); }
.ingestion-control-card h2 { margin: 4px 0 8px; font-size: 1.05rem; }
.ingestion-control-card p { margin: 7px 0; }
.ingestion-control-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ingestion-control-actions .button { padding: 8px 11px; font-size: 0.82rem; }
.ingestion-control-enabled { color: var(--accent); font-weight: 800; }
.direct-ats-cohort-card { grid-column: 1 / -1; padding: 24px; }
.direct-ats-cohort-form { display: grid; gap: 16px; }
.direct-ats-cohort-form-actions { margin-top: 4px; padding-top: 20px; border-top: 1px solid var(--line); }
.cohort-installation-list { display: grid; gap: 8px; margin-top: 12px; }
.cohort-installation { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.cohort-installation strong { overflow-wrap: anywhere; }
.cohort-installation .muted { margin: 0; font-size: 0.86rem; overflow-wrap: anywhere; }
.cohort-installation .muted a { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.cohort-installation .button { justify-self: start; margin-top: 6px; padding: 8px 11px; font-size: 0.82rem; }
.cohort-candidate-controls { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(150px, 1fr) minmax(130px, 1fr); gap: 10px; margin-top: 12px; }
.cohort-candidate-controls label { gap: 5px; font-size: 0.86rem; font-weight: 700; }
.cohort-candidate-controls input, .cohort-candidate-controls select { padding: 9px 10px; }
.cohort-candidate-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.cohort-candidate-pagination .button { padding: 8px 11px; font-size: 0.82rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: stretch;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(18, 104, 106, 0.09), transparent 34%),
    linear-gradient(315deg, rgba(176, 130, 66, 0.08), transparent 26%);
  pointer-events: none;
}

.hero-copy,
.hero-panel {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  gap: 18px;
  padding-right: 8px;
}

.hero h2 {
  margin-bottom: 14px;
}

.hero .hero-title {
  font-size: clamp(1.35rem, 1.8vw, 2.15rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  width: 100%;
  max-width: none;
  white-space: normal;
  text-wrap: pretty;
}

.section-heading h2,
.report-tile h3,
.accordion-trigger strong,
.usage-card h3 {
  font-weight: var(--type-heading-weight);
}

.section-heading h2 {
  font-size: clamp(1.18rem, 1.45vw, 1.5rem);
  line-height: 1.1;
}

.lede,
.muted,
label span,
.summary-label,
.accordion-meta,
.markdown-output li,
.accordion-trigger p {
  color: var(--muted);
}

.lede {
  max-width: 60ch;
  line-height: 1.7;
}

.hero-actions,
.form-actions,
.status-chip-row,
.accordion-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  padding: 13px 20px;
  background: var(--accent);
  color: white;
  font-weight: var(--type-ui-weight);
  box-shadow: 0 14px 30px rgba(18, 104, 106, 0.18);
}

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

.button-secondary {
  background: rgba(255, 255, 255, 0.58);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--line);
}

.button-full {
  display: block;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.hero-panel,
.workflow-step,
.report-tile,
.usage-card,
.credential-card,
.accordion-item {
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: 1px solid rgba(39, 54, 54, 0.08);
}

.hero-panel {
  padding: 20px;
}

.hero-panel {
  width: 100%;
  align-self: stretch;
}

.hero-panel ul {
  margin: 12px 0 0;
  padding-left: 18px;
  line-height: 1.8;
}

.section-heading {
  margin-bottom: 18px;
}

.section-divider {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(39, 54, 54, 0.12);
}

.section-divider-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.section-divider-heading h3,
.section-divider-heading .muted {
  margin: 0;
}

.section-divider-heading h3 {
  font-size: 1.15rem;
}

.results-subheading {
  margin: 0 0 14px;
  font-size: 1.15rem;
}

.section-heading-split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.token-pill-analysis {
  flex-shrink: 0;
  align-self: flex-start;
}

.analysis-form,
.credential-form {
  display: grid;
  gap: 16px;
}

.analysis-form .form-actions,
.credential-form .form-actions {
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid rgba(39, 54, 54, 0.12);
}

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

/* The analysis form moves through clear stages: role context, source resume,
   job description, saved name, and submission. */
#analysis-form > label.field-wide {
  padding-top: 20px;
  border-top: 1px solid rgba(39, 54, 54, 0.12);
}

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

.opportunity-search-form {
  align-items: start;
}

.source-tuning {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid rgba(39, 54, 54, 0.12);
}

.source-tuning summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
}

.source-tuning summary span {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.9em;
  font-weight: 500;
}

.source-tuning-content {
  max-width: 480px;
  padding-top: 16px;
}

.ranking-priorities {
  max-width: 680px;
}

.ranking-priorities > p {
  margin: 0;
}

.ranking-priority-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 14px 0;
  list-style: none;
}

.ranking-priority-list li {
  display: grid;
  grid-template-columns: 28px minmax(120px, 1fr) minmax(130px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(39, 54, 54, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  cursor: grab;
}

.ranking-priority-list li.is-dragging {
  opacity: 0.5;
}

.ranking-priority-position {
  color: var(--accent);
  font-weight: 800;
}

.ranking-priority-controls {
  display: flex;
  gap: 6px;
}

.icon-button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(39, 54, 54, 0.18);
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

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

.opportunity-search-form .form-actions {
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid rgba(39, 54, 54, 0.12);
  justify-content: space-between;
}

.opportunity-search-form .form-actions .muted {
  margin: 0;
  max-width: 62ch;
}

.opportunity-search-form .form-actions .button {
  margin-left: auto;
}

.job-detail-primary-action {
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(39, 54, 54, 0.12);
}

.tailored-application-output {
  margin-top: 24px;
}

.tailored-application-output h3 {
  margin-top: 0;
}

.tailored-resume,
.tailored-cover-letter {
  padding: 26px 0;
}

.tailored-cover-letter {
  margin-top: 28px;
}

.document-title {
  margin: 0 0 18px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(39, 54, 54, 0.18);
  color: var(--text);
  font-family: "Baskerville", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.tailored-section-title {
  color: var(--accent);
  font-family: "Baskerville", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.16rem;
  font-weight: 800;
}

.tailored-resume-headline,
.tailored-experience-title {
  color: var(--text);
  font-family: inherit;
  font-size: 1.08rem;
  font-weight: 500;
}

.tailored-application-output h4 {
  margin: 22px 0 8px;
}

.tailored-experience + .tailored-experience {
  margin-top: 18px;
}

.tailored-experience .tailored-experience-title {
  margin-bottom: 2px;
}

.application-actions {
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(39, 54, 54, 0.18);
}

.active-profile-status {
  color: var(--muted);
  font-size: 1.02rem;
}

.active-profile-status strong {
  color: var(--text);
}

.active-profile-name {
  color: var(--accent);
  font-weight: 700;
}

.analysis-title-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 18px 0;
  padding: 16px 0;
  border-top: 1px solid rgba(39, 54, 54, 0.12);
  border-bottom: 1px solid rgba(39, 54, 54, 0.12);
}

.analysis-title-editor label {
  flex: 1 1 18rem;
}

.analysis-title-editor .muted {
  margin: 0 0 10px;
}

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

.credential-required-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 248, 232, 0.95), rgba(248, 252, 250, 0.94));
  border: 1px solid rgba(18, 104, 106, 0.12);
}

.credential-required-copy {
  display: grid;
  gap: 6px;
}

.credential-required-copy strong,
.credential-required-copy .muted {
  margin: 0;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: rgba(39, 54, 54, 0.82);
  font-size: 1.08rem;
  font-weight: 500;
}

input,
textarea,
select {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  padding: 14px 15px;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%2312686a' d='M0 0h12L6 8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 12px 8px;
}

textarea {
  resize: vertical;
}

input[type="file"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0.1px;
  height: 0.1px;
}

.upload-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 18px;
}

.upload-file-name {
  color: var(--muted);
  font-size: 0.98rem;
}

.field-hint {
  margin: 0;
}

.jobvis-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
}

.jobvis-panel {
  position: fixed;
  right: 24px;
  bottom: 16px;
  z-index: 20;
  width: min(420px, calc(100vw - 32px));
  height: min(760px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.jobvis-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.jobvis-header .section-heading {
  margin-bottom: 0;
}

.jobvis-discussion-controls,
.jobvis-context-controls {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(39, 54, 54, 0.12);
}

.jobvis-discussion-controls {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.jobvis-discussion-controls label,
.jobvis-context-controls label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.jobvis-discussion-controls select,
.jobvis-context-controls select {
  min-width: 0;
  padding: 9px 32px 9px 10px;
  font-size: 0.9rem;
}

.jobvis-context-controls {
  margin-top: 10px;
}

.jobvis-context-controls .muted {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.jobvis-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  font-size: 1.7rem;
  line-height: 1;
}

.jobvis-close:hover {
  border-color: rgba(18, 104, 106, 0.3);
  background: var(--accent-soft);
}

.jobvis-messages {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 10px;
  overflow: auto;
  margin: 16px 0;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.jobvis-form {
  flex: 0 0 auto;
  padding-top: 16px;
  border-top: 1px solid rgba(39, 54, 54, 0.12);
}

.jobvis-message {
  justify-self: start;
  width: fit-content;
  max-width: 94%;
  padding: 10px 12px;
  border: 1px solid rgba(39, 54, 54, 0.09);
  border-radius: 16px 16px 16px 4px;
  background: rgba(247, 250, 249, 0.98);
  box-shadow: 0 8px 20px rgba(31, 39, 37, 0.05);
  line-height: 1.5;
}

.jobvis-message.user {
  justify-self: end;
  border-radius: 16px 16px 4px 16px;
  background: var(--accent-soft);
}

.jobvis-message.assistant {
  background: rgba(255, 253, 249, 0.98);
}

.jobvis-message.error {
  border-color: rgba(170, 62, 57, 0.22);
  background: rgba(255, 243, 241, 0.98);
}

.jobvis-status {
  flex: 1 1 170px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.jobvis-status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: jobvis-pulse 1.1s ease-in-out infinite;
}

@keyframes jobvis-pulse {
  50% { opacity: 0.35; transform: scale(0.75); }
}

.workflow-card {
  display: grid;
  gap: 18px;
}

.status-chip {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
  font-weight: 800;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(39, 54, 54, 0.12);
}

.workflow-step {
  position: relative;
  padding: 18px;
  min-height: 130px;
  isolation: isolate;
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.workflow-step strong {
  display: block;
  margin-bottom: 10px;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
}

.workflow-step.is-active {
  border-color: rgba(18, 104, 106, 0.28);
  box-shadow: 0 16px 34px rgba(18, 104, 106, 0.1);
  transform: translateY(-2px);
}

.workflow-step.is-active::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      120deg,
      rgba(18, 104, 106, 0.04) 0%,
      rgba(18, 104, 106, 0.16) 25%,
      rgba(137, 208, 203, 0.22) 45%,
      rgba(18, 104, 106, 0.16) 65%,
      rgba(18, 104, 106, 0.04) 100%
    );
  background-size: 220% 100%;
  animation: flow 2s linear infinite;
  z-index: -1;
}

.workflow-step.is-done {
  border-color: rgba(45, 139, 87, 0.36);
  box-shadow: inset 0 0 0 1px rgba(45, 139, 87, 0.2);
  background: linear-gradient(180deg, var(--done-soft), #fffdf9);
}

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

.result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(18, 104, 106, 0.08), rgba(255, 255, 255, 0.54));
  border: 1px solid rgba(18, 104, 106, 0.12);
}

.summary-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.86rem;
}

.report-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.report-tile {
  padding: 18px;
  min-width: 0;
}

.report-tile-wide {
  grid-column: 1 / -1;
}

.report-card-header {
  position: relative;
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.report-card-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(18, 104, 106, 0.78) 0%,
    rgba(18, 104, 106, 0.24) 34%,
    rgba(39, 54, 54, 0.08) 100%
  );
}

.report-card-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
}

.report-card-header h3 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.report-card-description {
  margin: 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.45;
}

.report-tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0 0 16px;
}

.report-tile-actions .muted {
  margin: 0;
}

.markdown-output {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.7;
}

.topic-stack,
.qa-stack {
  display: grid;
  gap: 14px;
}

.topic-entry-stack {
  display: grid;
  gap: 12px;
}

.topic-card,
.qa-card {
  border-radius: 18px;
  border: 1px solid rgba(18, 104, 106, 0.12);
  background: linear-gradient(180deg, rgba(18, 104, 106, 0.05), rgba(255, 253, 249, 1));
  overflow: hidden;
}

.topic-card-header,
.qa-question,
.qa-answer {
  padding: 16px 18px;
}

.topic-entry,
.topic-summary {
  margin: 0 18px 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(18, 104, 106, 0.08);
}

.topic-entry h5 {
  margin: 0 0 10px;
  font-size: 1.02rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}

.topic-summary p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
}

.topic-card-header,
.qa-question {
  border-bottom: 1px solid rgba(18, 104, 106, 0.12);
}

.topic-card-kicker,
.qa-label,
.qa-group-title {
  margin: 0 0 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
}

.topic-card-header h4,
.qa-question h4 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
  line-height: 1.16;
}

.qa-group {
  display: grid;
  gap: 14px;
}

.qa-group-band {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(18, 104, 106, 0.14);
  background:
    linear-gradient(135deg, rgba(18, 104, 106, 0.09), rgba(137, 208, 203, 0.08)),
    rgba(255, 255, 255, 0.76);
}

.qa-group-title {
  margin: 0;
  font-size: 0.78rem;
}

.qa-group-description {
  margin: 0;
  color: var(--text);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.08rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.qa-group-likely .qa-group-band {
  border-color: rgba(18, 104, 106, 0.16);
  background:
    linear-gradient(135deg, rgba(18, 104, 106, 0.1), rgba(137, 208, 203, 0.1)),
    rgba(255, 255, 255, 0.78);
}

.qa-group-system .qa-group-band {
  border-color: rgba(30, 72, 128, 0.16);
  background:
    linear-gradient(135deg, rgba(30, 72, 128, 0.11), rgba(163, 196, 243, 0.12)),
    rgba(255, 255, 255, 0.78);
}

.qa-group-system .qa-group-title {
  color: #1e4880;
}

.qa-group-behavioral .qa-group-band {
  border-color: rgba(128, 79, 30, 0.16);
  background:
    linear-gradient(135deg, rgba(128, 79, 30, 0.11), rgba(233, 207, 156, 0.14)),
    rgba(255, 255, 255, 0.78);
}

.qa-group-behavioral .qa-group-title {
  color: #804f1e;
}

.qa-group-tactical .qa-group-band {
  border-color: rgba(56, 92, 98, 0.16);
  background:
    linear-gradient(135deg, rgba(56, 92, 98, 0.1), rgba(195, 225, 223, 0.12)),
    rgba(255, 255, 255, 0.78);
}

.qa-group-tactical .qa-group-title {
  color: #385c62;
}

.qa-group + .qa-group {
  margin-top: 6px;
}

.qa-answer {
  background: rgba(255, 255, 255, 0.55);
}

.qa-card-tactical-summary .qa-answer {
  padding: 20px 22px;
}

.tactical-note-list {
  display: grid;
  gap: 12px;
}

.tactical-note-line {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.tactical-note-line strong {
  color: var(--text);
  font-weight: 700;
}

#report-output {
  font-family: "Charter", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.03rem;
  line-height: 1.82;
  letter-spacing: 0.002em;
}

#report-output p,
#report-output li {
  font-size: 1.03rem;
}

.markdown-output > *:first-child {
  margin-top: 0;
}

.markdown-output > *:last-child {
  margin-bottom: 0;
}

.markdown-output h1,
.markdown-output h2,
.markdown-output h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.markdown-output ul,
.markdown-output ol {
  margin: 10px 0 0;
  padding-left: 1.65rem;
}

.markdown-output .markdown-sublist {
  margin-top: 2px;
  padding-left: 2rem;
}

.markdown-output li + li {
  margin-top: 6px;
}

.markdown-section-label {
  margin: 14px 0 4px;
  color: var(--text);
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.markdown-section-label strong {
  font-weight: 600;
}

.markdown-keyword-row {
  margin: 10px 0 0;
  color: var(--text);
  line-height: 1.7;
}

.markdown-output pre,
.markdown-output code {
  font-family: "SFMono-Regular", "Menlo", monospace;
}

.markdown-output pre {
  overflow: auto;
  padding: 14px;
  border-radius: 12px;
  background: #f8f4ee;
  border: 1px solid rgba(39, 54, 54, 0.08);
}

.compact-output {
  min-height: 180px;
  max-height: 380px;
  overflow: auto;
}

.accordion-list {
  display: grid;
  gap: 12px;
}

.job-results-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 18px;
  margin: 20px 0;
  padding-top: 20px;
}

.job-results-controls label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.job-results-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.job-results-pagination .muted {
  min-width: 110px;
  margin: 0;
  text-align: center;
}

@media (max-width: 860px) {
  .job-results-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .job-results-controls { grid-template-columns: 1fr; }
  .job-results-pagination { justify-content: space-between; gap: 8px; }
}

.accordion-item {
  overflow: hidden;
}

.resume-card-header {
  cursor: default;
  padding-bottom: 12px;
}

.resume-card-status {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 700;
}

.resume-card-actions {
  justify-content: flex-end;
  padding: 0 18px 18px;
}

.resume-card-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}

.resume-card-progress {
  color: var(--accent);
  font-weight: 700;
  min-width: 11rem;
}

.resume-card-progress.is-error {
  color: #a23d32;
}

.profile-editor {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid rgba(18, 104, 106, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(247, 252, 251, 0.72);
}

.profile-editor-check {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: end;
  padding: 14px 0;
}

.profile-editor-check input,
.application-history-check input {
  width: auto;
  accent-color: var(--accent);
}

.credential-advanced {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.38);
}

.credential-advanced summary {
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
}

.credential-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.application-history-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.application-history-main strong,
.application-history-main p {
  display: block;
  margin: 0 0 6px;
}

.application-event-summary {
  margin: 0 18px 18px;
  font-size: 0.9rem;
}

.application-history-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.application-history-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.application-history-link {
  padding: 10px 14px;
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  text-align: left;
  padding: 18px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.accordion-trigger-content {
  min-width: 0;
}

.accordion-trigger strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.accordion-indicator {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 180ms ease, color 180ms ease;
}

.accordion-panel {
  display: none;
  padding: 0 18px 18px;
}

.accordion-item.is-open .accordion-panel {
  display: block;
}

.saved-opportunity-actions {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(39, 54, 54, 0.12);
  justify-content: flex-end;
}

.saved-tailored-output {
  margin-top: 24px;
}

.saved-draft-actions {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(39, 54, 54, 0.12);
  justify-content: flex-end;
}

.accordion-item.is-open .accordion-indicator {
  transform: rotate(180deg);
}

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

.credential-row-grid,
.usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

#results-accordion:not(:empty),
#job-results:not(:empty),
#usage-grid:not(:empty) {
  padding-top: 20px;
  border-top: 1px solid rgba(39, 54, 54, 0.12);
}

.credential-guide {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(239, 247, 246, 0.9), rgba(255, 252, 247, 0.92));
  border: 1px solid rgba(18, 104, 106, 0.12);
}

.credential-guide-copy {
  display: grid;
  gap: 8px;
}

.credential-guide-copy h3,
.credential-guide-card h4 {
  margin: 0;
}

.credential-guide-copy .muted,
.credential-guide-card .muted {
  margin: 0;
}

.credential-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(39, 54, 54, 0.12);
}

.credential-guide-coupon {
  margin-top: 18px;
}

.credential-form-compact {
  grid-template-columns: minmax(0, 1fr);
}

.credential-guide-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(39, 54, 54, 0.08);
}

.credential-guide code {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(18, 104, 106, 0.08);
  color: var(--accent);
  font-size: 0.92em;
}

.credential-card,
.coupon-card,
.usage-card {
  padding: 18px;
}

.coupon-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.credential-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.provider-tag {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
  font-size: 0.8rem;
  font-weight: 700;
}

.stack,
.session-summary {
  display: grid;
  gap: 12px;
}

.meta-list {
  display: grid;
  gap: 0;
}

.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(39, 54, 54, 0.08);
}

.meta-list div:last-child {
  border-bottom: none;
}

.meta-list dt {
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 26px;
  bottom: 26px;
  max-width: 340px;
  padding: 14px 18px;
  border-radius: 16px;
  background: #1e2725;
  color: #fffdf9;
  box-shadow: var(--shadow);
  z-index: 30;
}

@media (max-width: 560px) {
  .toast {
    right: 16px;
    left: 16px;
    bottom: 16px;
    max-width: none;
  }

}

.empty-state {
  padding: 10px 0 16px;
}

@media (max-width: 1120px) {
  .hero,
  .auth-card {
    grid-template-columns: 1fr;
  }

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

  .analysis-form {
    grid-template-columns: 1fr;
  }

  .opportunity-profile-form {
    grid-template-columns: 1fr;
  }

  .accordion-grid,
  .report-tile-grid {
    grid-template-columns: 1fr;
  }

  .credential-guide-grid {
    grid-template-columns: 1fr;
  }

  .admin-filter-form,
  .admin-summary-grid,
  .admin-dashboard-grid,
  .ingestion-controls-list {
    grid-template-columns: 1fr 1fr;
  }

  .admin-dashboard-grid > .card { grid-column: span 2; }

  .credential-required-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 16px;
  }

  .admin-shell {
    display: block;
    padding: 0;
  }

  .admin-sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 18px 16px 12px;
    border-right: none;
    border-bottom: 1px solid rgba(39, 54, 54, 0.1);
  }

  .admin-nav {
    margin-top: 18px;
  }

  .admin-sidebar-note {
    display: none;
  }

  .admin-content {
    width: 100%;
    padding: 20px 16px 32px;
  }

  .admin-page-header {
    margin-bottom: 20px;
  }

  .auth-shell {
    padding: 20px 16px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topnav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 0 8px;
    scrollbar-width: thin;
  }

  .result-summary,
  .workflow-steps {
    grid-template-columns: 1fr;
  }

  .section-heading-split {
    flex-direction: column;
    align-items: stretch;
  }

  .token-pill-analysis {
    align-self: flex-start;
  }

  .card {
    padding: 18px;
    border-radius: 22px;
  }

  .hero .hero-title {
    font-size: 2.3rem;
    white-space: normal;
  }

  .credential-advanced-grid {
    grid-template-columns: 1fr;
  }

  .application-history-main {
    flex-direction: column;
  }

  .ranking-priority-list li {
    grid-template-columns: 26px minmax(0, 1fr) auto;
  }

  .ranking-priority-label {
    grid-column: 2;
  }

  .application-history-actions {
    justify-content: flex-start;
  }

  .admin-filter-form,
  .admin-summary-grid,
  .admin-dashboard-grid,
  .ingestion-controls-list { grid-template-columns: 1fr; }
  .admin-dashboard-grid > .card { grid-column: span 1; }
  .ingestion-visual-chart { grid-template-columns: repeat(14, minmax(16px, 1fr)); gap: 3px; }
}

.operations-trace-row > td { padding: 20px; background: var(--surface-strong); }
.operations-trace-row .operations-trace { min-width: 0; }
.operations-trace-row dd { overflow-wrap: anywhere; }
