/*
 * Torus Forge — Bronze shell
 *
 * This file is intentionally loaded after styles.css. It skins the real
 * RAG Appliance DOM without replacing its ids, data attributes or runtime
 * behaviour. Risk keeps its own scoped Bronze styles when mounted later.
 */

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/newsreader-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* -------------------------------------------------------------------------
   Forge information architecture + compact administrative dashboard
   ------------------------------------------------------------------------- */
.forge-shell .sidebar-nav {
  gap: 0;
}

.forge-shell > .workspace > .skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 1000;
  transform: translate(-50%, -160%);
  padding: 9px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--sh-lg);
  transition: transform .15s ease;
}

.forge-shell > .workspace > .skip-link:focus {
  transform: translate(-50%, 0);
}

.forge-shell .sidebar-nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
}

.forge-shell .sidebar-nav-dashboard {
  margin-top: 0;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
}

.forge-shell .sidebar-nav-group > .nav-label {
  width: 100%;
}

/* 26/09/2026: one regular grid for the administrator's dashboard — the same
   20px between every row and every card, aligned edges, readable from 1280
   to 1920px. The rows used to touch: the container had no gap of its own. */
.forge-shell .dashboard-admin-content {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.forge-shell .dashboard-admin-content > * {
  min-width: 0;
  margin: 0;
}

.forge-shell .dashboard-command-center {
  display: grid;
  /* Recette 27/09/2026: the priority, then « Ouvrir un espace » on one row
     under it — no longer a second column beside it. */
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.forge-shell .dashboard-command-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: stretch;
  padding: clamp(24px, 3vw, 34px);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  background:
    radial-gradient(circle at 86% 18%, color-mix(in srgb, var(--accent-soft) 76%, transparent) 0, transparent 34%),
    linear-gradient(135deg, var(--card), color-mix(in srgb, var(--accent-soft) 42%, var(--card)));
}

.forge-shell .dashboard-command-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}

.forge-shell .dashboard-command-card.is-attention {
  border-color: var(--err-line);
  background: linear-gradient(135deg, var(--card), color-mix(in srgb, var(--err-bg) 62%, var(--card)));
}

.forge-shell .dashboard-command-card.is-attention::before { background: var(--err); }
.forge-shell .dashboard-command-card.is-progress::before { background: var(--warn); }
.forge-shell .dashboard-command-card.is-unavailable { opacity: .72; }

.forge-shell .dashboard-command-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.forge-shell .dashboard-command-heading {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.forge-shell .dashboard-command-heading .section-kicker { margin: 0; }

.forge-shell .dashboard-command-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.forge-shell .dashboard-command-card.is-attention .dashboard-command-status {
  border-color: var(--err-line);
  background: var(--err-bg);
  color: var(--err);
}

.forge-shell .dashboard-command-card.is-progress .dashboard-command-status {
  border-color: var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn);
}

.forge-shell .dashboard-command-copy h2 {
  max-width: 720px;
  margin-top: 12px;
  font-family: var(--serif);
  font-size: clamp(23px, 2.25vw, 31px);
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -.018em;
}

.forge-shell .dashboard-command-copy > p {
  max-width: 700px;
  margin-top: 9px;
  color: var(--tx-2);
  font-size: 13.5px;
  line-height: 1.58;
}

.forge-shell .dashboard-command-action {
  min-height: 40px;
  margin-top: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 15px;
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 16%, transparent);
  transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
}

.forge-shell .dashboard-command-action:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--accent-d);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 23%, transparent);
}

.forge-shell .dashboard-command-action:disabled { opacity: .55; cursor: not-allowed; }

.forge-shell .dashboard-command-signal {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--card) 78%, transparent);
}

.forge-shell .dashboard-command-signal-mark {
  width: 9px;
  height: 9px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--idle);
  box-shadow: 0 0 0 4px var(--idle-bg);
}

.forge-shell .dashboard-command-signal.is-ready .dashboard-command-signal-mark {
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-bg);
}

.forge-shell .dashboard-command-signal.is-progress .dashboard-command-signal-mark {
  background: var(--warn);
  box-shadow: 0 0 0 4px var(--warn-bg);
}

.forge-shell .dashboard-command-signal.is-attention .dashboard-command-signal-mark {
  background: var(--err);
  box-shadow: 0 0 0 4px var(--err-bg);
}

.forge-shell .dashboard-command-signal > span:not(.dashboard-command-signal-mark) {
  color: var(--tx-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.forge-shell .dashboard-command-signal strong {
  margin-top: 5px;
  color: var(--tx);
  font-size: 14px;
  line-height: 1.25;
}

.forge-shell .dashboard-command-signal small {
  margin-top: 7px;
  color: var(--tx-2);
  font-size: 11.5px;
  line-height: 1.45;
}

.forge-shell .dashboard-quick-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--sh);
}

.forge-shell .dashboard-quick-actions > .section-kicker {
  margin: 0;
  white-space: nowrap;
}

.forge-shell .dashboard-quick-actions-list {
  /* 26/09/2026: every label on one line. Under the priority, each entry
     takes its label's width and the row wraps only when it must. */
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.forge-shell .dashboard-quick-action {
  flex: 1 1 auto;
  min-height: 44px;
  text-align: left;
  line-height: 1.25;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--tx);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  box-shadow: var(--sh);
}

.forge-shell .dashboard-quick-action:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.forge-shell .dashboard-quick-actions-status:empty {
  display: none;
}

.forge-shell .dashboard-metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.forge-shell .dashboard-metric-card {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  padding: 18px 19px;
}

.forge-shell .dashboard-metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: color-mix(in srgb, var(--accent) 68%, var(--line));
}

.forge-shell .dashboard-metric-card strong {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 560;
}

.forge-shell .dashboard-operations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

/* 26/09/2026: the dashboard lists its bases compactly — name, state, count,
   last indexing; the corpus note stays on the Document bases page — so the
   two bottom columns balance. */
.forge-shell .dashboard-bases-section .base-card .base-pack-note { display: none; }
.forge-shell .dashboard-bases-section .base-card .metric,
.forge-shell .dashboard-bases-section .base-card .indexed-at { display: inline; margin: 0; font-size: 12.5px; }
.forge-shell .dashboard-bases-section .base-card { display: block; }
.forge-shell .dashboard-bases-section .base-card .indexed-at { color: var(--tx-3); padding: 0; border: 0; }
.forge-shell .dashboard-bases-section .base-card .indexed-at::before { content: " · "; }
.forge-shell .dashboard-bases-section .base-card .base-card-header { margin-bottom: 4px; }
.forge-shell .dashboard-operations-grid > #dashboard-activity-card { align-self: stretch; }

.forge-shell .dashboard-bases-section,
.forge-shell .dashboard-attention-card {
  margin: 0;
  min-width: 0;
  overflow: hidden;
}

.forge-shell .dashboard-bases-section .section-header,
.forge-shell .dashboard-attention-card .section-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.forge-shell .dashboard-bases-section .section-header h2,
.forge-shell .dashboard-attention-card .section-header h2 {
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}

.forge-shell .dashboard-bases-section .base-grid {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 4px 20px 14px;
}

.forge-shell .dashboard-bases-section .base-card {
  min-height: 0;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.forge-shell .dashboard-bases-section .base-card:last-child { border-bottom: 0; }
.forge-shell .dashboard-bases-section .base-card:hover { box-shadow: none; transform: none; }

.forge-shell .dashboard-bases-section .base-card-header h3 {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 680;
}

.forge-shell .dashboard-bases-section .base-card .metric {
  margin-top: 6px;
}

.forge-shell .dashboard-attention-card .table-wrap {
  max-height: 260px;
}

.forge-shell .dashboard-attention-empty {
  min-height: 174px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 4px 20px 14px;
  padding: 24px;
  border: 1px dashed var(--ok-line);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--ok-bg) 56%, var(--card));
}

.forge-shell .dashboard-attention-empty > span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 17px;
  font-weight: 750;
}

.forge-shell .dashboard-attention-empty strong { color: var(--tx); font-size: 13.5px; }
.forge-shell .dashboard-attention-empty p { margin-top: 4px; color: var(--tx-2); font-size: 12px; line-height: 1.5; }

.forge-shell .pill-warning {
  border-color: var(--err-line);
  background: var(--err-bg);
  color: var(--err);
}

.forge-shell .pill-warning::before { background: var(--err); }

/* Personal dashboard ------------------------------------------------------
   A normal user receives an intentionally separate surface. Administrative
   health, corpus totals and instance controls stay in #dashboard-admin-content
   and are never merely relabelled as personal data. */
.forge-shell .dashboard-personal-content {
  display: grid;
  gap: 18px;
}

.forge-shell .dashboard-personal-header {
  padding-bottom: 0;
}

.forge-shell .dashboard-personal-header .eyebrow {
  margin-bottom: 5px;
}

.forge-shell .personal-dashboard-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .34fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: stretch;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid color-mix(in srgb, var(--accent) 46%, #2d2119);
  border-radius: var(--r);
  background:
    radial-gradient(circle at 87% 14%, rgba(195, 145, 73, .24), transparent 30%),
    linear-gradient(135deg, #2b211b 0%, #3f2b1c 58%, #57391e 100%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(47, 31, 18, .16);
}

.forge-shell .personal-dashboard-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 55%, rgba(255, 255, 255, .035));
}

.forge-shell .personal-dashboard-hero-copy,
.forge-shell .personal-dashboard-stats {
  position: relative;
  z-index: 1;
}

.forge-shell .personal-dashboard-hero-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border: 1px solid rgba(239, 202, 145, .32);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #f4ce91;
  font-size: 17px;
}

.forge-shell .personal-dashboard-hero .section-kicker {
  color: #ddb579;
}

.forge-shell .personal-dashboard-hero h2 {
  max-width: 720px;
  margin-top: 8px;
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(27px, 3.2vw, 42px);
  font-weight: 540;
  line-height: 1.08;
  letter-spacing: -.022em;
}

.forge-shell .personal-dashboard-hero-copy > p:not(.section-kicker) {
  max-width: 680px;
  margin-top: 12px;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
  line-height: 1.65;
}

.forge-shell .personal-dashboard-primary {
  margin-top: 22px;
  border-color: #c89043;
  background: #b6792e;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}

.forge-shell .personal-dashboard-primary:hover:not(:disabled) {
  background: #c4883c;
}

.forge-shell .personal-dashboard-hero-copy > small {
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, .56);
  font-size: 11px;
}

.forge-shell .personal-dashboard-stats {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.forge-shell .personal-dashboard-stats > div {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .07);
  backdrop-filter: blur(5px);
}

.forge-shell .personal-dashboard-stats h3 {
  color: rgba(255, 255, 255, .64);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.forge-shell .personal-dashboard-stats strong {
  margin-top: 5px;
  color: #fff;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 550;
}

.forge-shell .personal-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(250px, .82fr) minmax(280px, .96fr);
  gap: 16px;
  align-items: stretch;
}

.forge-shell .personal-dashboard-grid > .section-card {
  min-width: 0;
  margin: 0;
  padding: 20px;
}

.forge-shell .personal-dashboard-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.forge-shell .personal-dashboard-card-heading .section-kicker {
  margin: 0 0 4px;
}

.forge-shell .personal-dashboard-card-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.forge-shell .personal-dashboard-recent-list {
  display: grid;
  gap: 7px;
}

.forge-shell .personal-dashboard-empty {
  min-height: 102px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--paper) 54%, var(--card));
}

.forge-shell .personal-dashboard-empty strong { color: var(--tx); font-size: 13px; }
.forge-shell .personal-dashboard-empty p { margin-top: 5px; color: var(--tx-3); font-size: 11.5px; line-height: 1.5; }

.forge-shell .personal-dashboard-recent-item {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--tx);
  text-align: left;
}

.forge-shell .personal-dashboard-recent-item:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.forge-shell .personal-dashboard-recent-item strong,
.forge-shell .personal-dashboard-recent-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forge-shell .personal-dashboard-recent-item strong {
  font-size: 12.5px;
}

.forge-shell .personal-dashboard-recent-item small {
  margin-top: 3px;
  color: var(--tx-3);
  font-size: 10.5px;
}

.forge-shell .personal-dashboard-recent-item > span:last-child {
  color: var(--accent);
  font-size: 16px;
}

.forge-shell .personal-dashboard-tip {
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 66%, var(--card)), var(--card));
}

.forge-shell .personal-dashboard-tip-icon,
.forge-shell .personal-dashboard-challenge-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 12px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 82%, var(--card)), var(--card));
  color: var(--accent);
  box-shadow: 0 6px 16px rgba(70, 45, 20, .08);
}

.forge-shell .personal-dashboard-glyph {
  width: 20px;
  height: 20px;
  display: block;
}

.forge-shell .personal-dashboard-tip h3 {
  margin-top: 5px;
  color: var(--tx);
  font-size: 15px;
  line-height: 1.35;
}

.forge-shell .personal-dashboard-tip > p {
  min-height: 80px;
  margin-top: 8px;
  color: var(--tx-2);
  font-size: 12.5px;
  line-height: 1.62;
}

.forge-shell .personal-dashboard-tip > button,
.forge-shell .personal-dashboard-challenge > button {
  margin-top: 14px;
}

.forge-shell .personal-dashboard-challenge-scenario {
  min-height: 58px;
  color: var(--tx-2);
  font-size: 12.5px;
  line-height: 1.55;
}

.forge-shell .personal-dashboard-challenge-options {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.forge-shell .personal-dashboard-challenge-option {
  min-height: 42px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--tx-2);
  font-size: 11.5px;
  line-height: 1.45;
  text-align: left;
}

.forge-shell .personal-dashboard-challenge-option:hover:not(:disabled) {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.forge-shell .personal-dashboard-challenge-option > span:first-child {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 750;
}

.forge-shell .personal-dashboard-challenge-option.is-correct {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok);
}

.forge-shell .personal-dashboard-challenge-option.is-wrong {
  border-color: var(--err-line);
  background: var(--err-bg);
  color: var(--err);
}

.forge-shell .personal-dashboard-challenge-option.is-muted {
  opacity: .55;
}

.forge-shell .personal-dashboard-challenge-result {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 11.5px;
  line-height: 1.48;
}

.forge-shell .personal-dashboard-challenge-result.is-correct {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok);
}

.forge-shell .personal-dashboard-challenge-result.is-wrong {
  border-color: var(--err-line);
  background: var(--err-bg);
  color: var(--err);
}

.forge-shell .personal-dashboard-modules {
  margin: 0;
  padding: 20px;
}

.forge-shell .personal-dashboard-module-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 9px;
}

.forge-shell .personal-dashboard-module {
  min-height: 62px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--tx);
  text-align: left;
}

.forge-shell .personal-dashboard-module:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.forge-shell .personal-dashboard-module > span:first-child {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
}

.forge-shell .personal-dashboard-module strong,
.forge-shell .personal-dashboard-module small {
  display: block;
}

.forge-shell .personal-dashboard-module strong { font-size: 12.5px; }
.forge-shell .personal-dashboard-module small { margin-top: 2px; color: var(--tx-3); font-size: 10.5px; }
.forge-shell .personal-dashboard-module > span:last-child { color: var(--accent); }

/* -------------------------------------------------------------------------
   Assistant: open conversation canvas, explicit templates and provenance
   ------------------------------------------------------------------------- */
.forge-shell #chat-view .page-header {
  padding-bottom: 2px;
}

.forge-shell #chat-view .chat-layout {
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 0;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--sh);
}

.forge-shell #chat-view .chat-conversations-panel {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background: color-mix(in srgb, var(--paper) 55%, var(--card));
}

.forge-shell #chat-view .chat-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--card);
}

.forge-shell #chat-view .chat-panel-header {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  gap: 20px;
  min-height: 64px;
  padding: 12px clamp(20px, 3vw, 42px);
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent-soft) 48%, var(--card)), var(--card) 42%);
  transition: border-color .16s ease, background .16s ease;
}

.forge-shell #chat-view[data-grounding-mode="general"] .chat-panel-header {
  border-top-color: var(--mode-general);
  background: linear-gradient(90deg, var(--mode-general-soft), var(--card) 42%);
}

.forge-shell #chat-view .chat-header-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.forge-shell #chat-view .chat-grounding-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.forge-shell #chat-view .chat-grounding-badge.is-general {
  border-color: var(--mode-general-line);
  background: var(--mode-general-soft);
  color: var(--mode-general);
}

.forge-shell #chat-view .chat-base-select {
  width: clamp(240px, 26vw, 340px);
  min-width: 240px;
  max-width: 100%;
  overflow: hidden;
}

.forge-shell #chat-view .chat-base-select select {
  width: 100%;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forge-shell #chat-view .answer-card {
  padding: 30px clamp(24px, 5vw, 76px);
  background: var(--card);
}

.forge-shell #chat-view .answer-card:not([data-has-answer="true"]) {
  display: grid;
  place-items: center;
}

.forge-shell #chat-view .chat-empty-state-card {
  width: min(100%, 620px);
  margin: 0 auto;
  gap: 9px;
}

.forge-shell #chat-view .quick-prompts-compact {
  width: min(100%, 520px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.forge-shell #chat-view .quick-prompts-compact .quick-prompt {
  min-height: 42px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: color-mix(in srgb, var(--paper) 62%, var(--card));
}

.forge-shell #chat-view .quick-prompts-compact .quick-prompt strong {
  font-size: 12px;
}

.forge-shell #chat-view .quick-prompts-compact .quick-prompt > span {
  color: var(--tx-4);
}

.forge-shell #chat-view .conversation-messages {
  width: min(100%, 920px);
  margin: 0 auto;
  gap: 28px;
}

.forge-shell .chat-message.assistant .chat-message-content {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.forge-shell .chat-message.user .chat-message-content {
  max-width: min(76%, 680px);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 15px 15px 4px 15px;
  background: var(--card-2);
  color: var(--tx);
}

.forge-shell #chat-view .message-export-button {
  margin-top: 8px;
}

.forge-shell #chat-view .chat-composer {
  padding: 14px clamp(24px, 5vw, 76px) 12px;
  border-top: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--card) 22%);
}

.forge-shell #chat-view .chat-grounding-control,
.forge-shell #chat-view .composer-shell,
.forge-shell #chat-view .composer-hint,
.forge-shell #chat-view .chat-ai-disclaimer {
  width: min(100%, 960px);
  margin-right: auto;
  margin-left: auto;
}

.forge-shell #chat-view .chat-grounding-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
}

.forge-shell #chat-view .chat-grounding-control-header {
  width: auto;
  margin: 0;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.forge-shell #chat-view .chat-grounding-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 70%, var(--card));
  flex: 0 0 auto;
}

.forge-shell #chat-view .chat-grounding-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--tx-2);
  font-size: 11.5px;
  font-weight: 700;
  transition: background .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.forge-shell #chat-view .chat-grounding-option:hover:not(:disabled) {
  background: var(--card);
  color: var(--tx);
}

.forge-shell #chat-view .chat-grounding-option[data-grounding-mode="documents"].is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(74, 52, 27, .18);
}

.forge-shell #chat-view .chat-grounding-option[data-grounding-mode="general"].is-active {
  border-color: var(--mode-general);
  background: var(--mode-general);
  color: #fff;
  box-shadow: 0 2px 8px rgba(38, 29, 20, .16);
}

.forge-shell #chat-view .chat-grounding-option:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.forge-shell #chat-view .chat-grounding-option.is-active:disabled {
  opacity: .82;
}

.forge-shell #chat-view .chat-grounding-option-icon {
  font-size: 12px;
  line-height: 1;
}

.forge-shell #chat-view .chat-grounding-context {
  min-width: 0;
  text-align: center;
}

.forge-shell #chat-view .chat-grounding-context > p {
  margin: 0;
  color: var(--tx-3);
  font-size: 10.5px;
  line-height: 1.4;
}

.forge-shell #chat-view .chat-grounding-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 2px;
  color: var(--tx-2);
  font-weight: 700;
}

.forge-shell #chat-view .chat-grounding-lock > span:first-child {
  color: var(--accent);
  font-size: 7px;
}

.forge-shell #chat-view .chat-grounding-policy-note {
  margin-top: 2px;
  color: var(--warn);
  font-weight: 650;
}

.forge-shell .scope-access-summary {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, #fff), #fff);
}

.forge-shell .scope-access-summary strong {
  color: var(--tx-1);
  font-size: 14px;
}

.forge-shell .scope-access-summary span {
  color: var(--tx-3);
  font-size: 12.5px;
  line-height: 1.5;
}

.forge-shell .scope-sector-field {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.forge-shell .scope-sector-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--tx-1);
  font-weight: 750;
}

.forge-shell .scope-sector-count {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--card-2);
  color: var(--tx-3);
  font-size: 11px;
  font-weight: 700;
}

.forge-shell .scope-sector-all {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 6%, #fff);
  cursor: pointer;
}

.forge-shell .scope-sector-all input {
  grid-row: 1 / span 2;
  accent-color: var(--accent);
}

.forge-shell .scope-sector-all span {
  color: var(--tx-1);
  font-weight: 750;
}

.forge-shell .scope-sector-all small {
  color: var(--tx-3);
  font-size: 11.5px;
}

.forge-shell .scope-sector-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.forge-shell .scope-sector-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--tx-2);
  cursor: pointer;
}

.forge-shell .scope-sector-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, #fff);
  color: var(--tx-1);
}

.forge-shell .scope-sector-option input {
  accent-color: var(--accent);
}

@media (max-width: 900px) {
  .forge-shell .scope-sector-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .forge-shell .scope-sector-options {
    grid-template-columns: 1fr;
  }
}

.forge-shell #chat-view .composer-shell {
  border-color: var(--line-2);
  box-shadow: 0 8px 24px rgba(54, 42, 24, .08);
}

.forge-shell #chat-view[data-grounding-mode="general"] .composer-shell {
  border-color: var(--mode-general-line);
  box-shadow: 0 8px 24px rgba(38, 29, 20, .09);
}

.forge-shell #chat-view[data-grounding-mode="general"] .composer-shell:focus-within {
  border-color: var(--mode-general);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mode-general) 9%, transparent), 0 8px 24px rgba(38, 29, 20, .09);
}

.forge-shell #chat-view[data-grounding-mode="general"] .composer-send-button {
  background: var(--mode-general);
}

.forge-shell #chat-view[data-grounding-mode="general"] .composer-send-button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--mode-general) 84%, #000);
}

.forge-shell #chat-view .conversation-grounding-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.forge-shell #chat-view .conversation-grounding-meta.is-general > span {
  color: var(--mode-general);
}

.forge-shell #chat-view .chat-scroll-latest {
  align-self: center;
  z-index: 4;
  margin: -44px 0 10px;
  padding: 7px 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--card);
  color: var(--tx-2);
  box-shadow: var(--sh);
  font-size: 11.5px;
  font-weight: 700;
}

.forge-shell #chat-view .chat-scroll-latest::before {
  content: "↓";
  margin-right: 6px;
}

.forge-shell #chat-view .chat-scroll-latest:hover {
  border-color: var(--accent-line);
  color: var(--accent);
}

.forge-shell #chat-view .conversation-grounding-meta.is-documents > span {
  color: var(--accent);
}

.forge-shell #chat-view .composer-hint {
  padding-top: 7px;
}

.forge-shell #chat-view .chat-ai-disclaimer {
  margin-top: 5px;
  color: var(--tx-3);
  font-size: 10.5px;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 1180px) {
  .forge-shell #chat-view .chat-panel-header {
    grid-template-columns: minmax(180px, 1fr) auto;
  }

  .forge-shell #chat-view .chat-grounding-control-header {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 980px) {
  .forge-shell #chat-view .chat-panel-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .forge-shell #chat-view .chat-header-actions {
    width: 100%;
    justify-content: center;
  }

  .forge-shell #chat-view .quick-prompts-compact {
    grid-template-columns: 1fr;
  }
}

.forge-shell #chat-view .chat-active-template-chip {
  max-width: 210px;
  overflow: hidden;
  border: 1px solid var(--accent-line);
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.forge-shell #chat-view .response-customizer-grid {
  width: min(430px, calc(100vw - 32px));
  max-height: min(560px, 72vh);
  overflow: hidden;
}

.forge-shell #chat-view .chat-template-picker {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.forge-shell #chat-view .chat-template-search {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper);
}

.forge-shell #chat-view .chat-template-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.forge-shell #chat-view .chat-template-options {
  min-height: 0;
  max-height: 300px;
  overflow-y: auto;
}

.forge-shell #chat-view .chat-template-group + .chat-template-group {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.forge-shell #chat-view .chat-template-group h4 {
  margin: 0 0 6px;
  color: var(--accent-text);
  font-family: var(--font-jetbrains);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.forge-shell #chat-view .chat-template-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--tx);
  text-align: left;
}

.forge-shell #chat-view .chat-template-option:hover,
.forge-shell #chat-view .chat-template-option.is-active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.forge-shell #chat-view .chat-template-option > span:first-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.forge-shell #chat-view .chat-template-option strong,
.forge-shell #chat-view .chat-template-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forge-shell #chat-view .chat-template-option strong {
  font-size: 12px;
}

.forge-shell #chat-view .chat-template-option small {
  color: var(--tx-3);
  font-size: 10.5px;
}

.forge-shell #chat-view .chat-template-actions {
  display: flex;
  gap: 8px;
}

.forge-shell #chat-view .message-sources-details {
  margin-top: 10px;
}

.forge-shell #chat-view .message-sources-details > summary {
  width: fit-content;
  padding: 4px 9px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  list-style-position: inside;
}

.forge-shell #chat-view .message-provenance.is-general {
  margin: 9px 0 0;
  color: var(--tx-3);
  font-size: 10.5px;
}

.forge-shell #chat-view .message-inline-sources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.forge-shell #chat-view .message-inline-sources .source-item {
  padding: 10px;
}

.forge-shell #chat-view .message-feedback {
  gap: 3px;
  margin-top: 6px;
  padding-top: 0;
  border-top: 0;
}

.forge-shell #chat-view .message-feedback .feedback-icon-button {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-color: transparent;
  border-radius: 8px;
  color: var(--tx-3);
}

.forge-shell #chat-view .message-feedback .feedback-icon-button:hover,
.forge-shell #chat-view .message-feedback .feedback-icon-button.is-selected {
  border-color: var(--line);
  background: var(--card-2);
  color: var(--accent);
}

.forge-shell #chat-view .feedback-panel {
  margin-top: 5px;
}

@media (max-width: 1180px) {
  .forge-shell .dashboard-command-center,
  .forge-shell .dashboard-operations-grid {
    grid-template-columns: 1fr;
  }

  .forge-shell .personal-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forge-shell .personal-dashboard-recent {
    grid-column: 1 / -1;
  }

  .forge-shell .dashboard-quick-actions {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
}

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

  .forge-shell .dashboard-command-card {
    grid-template-columns: 1fr;
  }

  .forge-shell .personal-dashboard-hero {
    grid-template-columns: 1fr;
  }

  .forge-shell .personal-dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .forge-shell .dashboard-command-signal {
    min-height: 116px;
  }

  .forge-shell #chat-view .chat-layout {
    grid-template-columns: 1fr;
  }

  .forge-shell #chat-view .chat-conversations-panel {
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .forge-shell #chat-view .chat-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .forge-shell #chat-view .chat-base-select {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .forge-shell .dashboard-metrics-grid,
  .forge-shell .dashboard-quick-actions-list {
    grid-template-columns: 1fr;
  }

  .forge-shell .dashboard-command-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .forge-shell .personal-dashboard-hero {
    padding: 23px 20px;
  }

  .forge-shell .personal-dashboard-stats,
  .forge-shell .personal-dashboard-grid,
  .forge-shell .personal-dashboard-module-list {
    grid-template-columns: 1fr;
  }

  .forge-shell .personal-dashboard-recent {
    grid-column: auto;
  }
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/newsreader-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #fbf8f3;
  --card: #ffffff;
  --card-2: #f5efe6;
  --tx: #241e16;
  --tx-2: #4d453a;
  --tx-3: #786e60;
  --tx-4: #a89d8c;
  --line: #eae2d5;
  --line-2: #dfd4c3;
  --line-card: #eae2d5;
  --accent: #4a341b;
  --accent-d: #5e4426;
  --accent-soft: #f4ead9;
  --accent-line: #dcc9aa;
  --accent-text: #8a6627;
  --accent-soft-ink: #6e5024;
  --mode-general: #2f4354;
  --mode-general-soft: #edf2f5;
  --mode-general-line: #b8c6d0;
  --ok: #3c7d58;
  --ok-bg: #e5f1e8;
  --ok-line: #cfe3d4;
  --warn: #a9692a;
  --warn-bg: #f6ecdc;
  --warn-line: #ead6b9;
  --err: #af4439;
  --err-bg: #f7e4e1;
  --err-line: #ebc9c4;
  --idle: #786e60;
  --idle-bg: #f5efe6;
  --idle-line: #eae2d5;
  --brand-gradient: linear-gradient(135deg, #4a341b, #7a5526);
  --nav-bar: #4a341b;
  --font-ui: 'Hanken Grotesk', system-ui, sans-serif;
  --font-display: 'Newsreader', Georgia, serif;
  --font-jetbrains: 'JetBrains Mono', ui-monospace, monospace;
  --sans: var(--font-ui);
  --serif: var(--font-display);
  --mono: var(--font-jetbrains);
  --r: 11px;
  --r-sm: 8px;
  --r-xs: 6px;
  --sh: 0 1px 2px rgba(54, 42, 24, .05);
  --sh-lg: 0 1px 2px rgba(54, 42, 24, .04), 0 10px 30px rgba(54, 42, 24, .06);
  --sh-modal: 0 24px 70px rgba(30, 22, 12, .3);
  --topbar-h: 70px;
}

body {
  background: var(--paper);
  color: var(--tx);
}

::selection {
  background: var(--accent-soft);
  color: var(--tx);
}

:focus-visible {
  outline-color: color-mix(in srgb, var(--accent) 48%, transparent);
  outline-width: 3px;
}

* {
  scrollbar-color: #d3c4ac transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  background: #e3d8c6;
  border: 2px solid var(--paper);
  border-radius: 8px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #d3c4ac;
}

/* Shell */
.forge-shell .sidebar {
  width: 272px;
  flex-basis: 272px;
  padding: 20px 16px 16px;
  background: var(--card);
  color: var(--tx);
  border-right: 1px solid var(--line);
  box-shadow: 4px 0 22px rgba(54, 42, 24, .05);
}

.forge-shell .brand {
  gap: 10px;
  padding: 0 4px 18px;
}

.forge-shell .brand-mark,
.signed-out-page .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--brand-gradient);
  box-shadow: 0 14px 26px rgba(74, 52, 27, .2);
}

.forge-shell .brand-mark::before,
.signed-out-page .brand-mark::before {
  content: "";
  position: absolute;
  width: 23px;
  height: 10px;
  border: 1.8px solid #fff;
  border-radius: 50%;
  transform: rotate(-27deg);
}

.forge-shell .brand-mark::after,
.signed-out-page .brand-mark::after {
  width: 8px;
  height: 3.5px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  transform: rotate(-27deg);
  box-shadow: 8px -5px 0 -2px #fff;
}

.forge-shell .brand-name {
  color: var(--tx);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.01em;
}

.forge-shell .brand-subtitle {
  margin-top: 3px;
  color: var(--tx-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.forge-shell .sidebar-nav {
  gap: 3px;
  margin-top: 8px;
}

.forge-shell .nav-label {
  padding: 12px 8px 5px;
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
}

.forge-shell .nav-item {
  min-height: 38px;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--tx-2);
  font-size: 14px;
  font-weight: 600;
}

.forge-shell .nav-item svg {
  opacity: .82;
}

.forge-shell .nav-item:hover {
  color: var(--tx);
  background: var(--card-2);
}

.forge-shell .nav-item.is-active {
  color: #fbf6ee;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(74, 52, 27, .13);
  font-weight: 700;
}

.forge-shell .nav-item.is-active::before {
  display: none;
}

.forge-shell .instance-card {
  margin-top: auto;
  padding: 12px;
  color: var(--tx);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.forge-shell .instance-host {
  color: var(--tx-2);
}

.forge-shell .instance-note {
  color: var(--tx-3);
}

.forge-shell .status-line {
  color: var(--ok);
}

.forge-shell .status-dot {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-bg);
}

.forge-shell .workspace {
  background: var(--paper);
}

.forge-shell .topbar {
  min-height: var(--topbar-h);
  padding: 15px 32px;
  background: rgba(251, 248, 243, .9);
  border-bottom: 1px solid rgba(234, 226, 213, .92);
  box-shadow: 0 1px 0 rgba(54, 42, 24, .04);
  backdrop-filter: blur(16px);
}

.forge-shell .topbar-title > strong {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.1;
}

.forge-shell .topbar-divider {
  background: var(--line);
}

.forge-shell .client-label,
.forge-shell .instance-label {
  color: var(--tx-3);
}

.forge-shell .client-label strong {
  color: var(--tx-2);
}

.forge-shell .language-select,
.forge-shell .user-menu-trigger {
  border-color: var(--line);
  background: var(--card);
  box-shadow: var(--sh);
}

.forge-shell .language-select select {
  color: var(--tx-2);
  font-weight: 700;
}

.forge-shell .topbar-sign-in {
  border-color: var(--accent);
  background: var(--accent);
  color: #fbf6ee;
}

.forge-shell .topbar-sign-in:hover {
  border-color: var(--accent-d);
  background: var(--accent-d);
}

.forge-shell .user-menu-panel {
  border-color: var(--line);
  border-radius: 12px;
  box-shadow: var(--sh-lg);
}

.forge-shell .avatar {
  background: #efe4d3;
  color: var(--accent);
}

.forge-shell .workspace-main {
  /*
   * Dense workspaces (Assistant, Agents, Dashboard and data tables) should
   * make use of large desktop displays. The base stylesheet already defines
   * the 1600px ceiling; keep the Bronze skin aligned instead of shrinking the
   * whole product back to 1280px.
   */
  max-width: 1600px;
  padding: 28px 32px 48px;
}

.forge-shell .view {
  gap: 18px;
}

.forge-shell .page-header h1 {
  color: var(--tx);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -.005em;
}

.forge-shell .eyebrow,
.forge-shell .section-kicker,
.forge-shell .conversation-group-label {
  color: var(--accent-text);
  font-family: var(--font-jetbrains);
  font-weight: 500;
  letter-spacing: .08em;
}

/* Shared primitives */
.forge-shell .pill {
  border-color: var(--line);
  background: var(--card);
  color: var(--tx-2);
  border-radius: 999px;
}

.forge-shell .pill-blue {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
}

.forge-shell .pill-success {
  border-color: transparent;
  background: var(--ok-bg);
  color: var(--ok);
}

.forge-shell .secondary-action,
.forge-shell .secondary-button,
.forge-shell .compact-action {
  border-color: var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--tx);
  box-shadow: var(--sh);
}

.forge-shell .secondary-action:hover:not(:disabled),
.forge-shell .secondary-button:hover:not(:disabled) {
  border-color: var(--tx-4);
  background: var(--card-2);
}

.forge-shell .btn-primary,
.forge-shell button[type="submit"]:not(.secondary-action):not(.secondary-button) {
  border-color: var(--accent);
  background: var(--accent);
  color: #fbf6ee;
}

.forge-shell .btn-primary:hover:not(:disabled),
.forge-shell button[type="submit"]:not(.secondary-action):not(.secondary-button):hover:not(:disabled) {
  border-color: var(--accent-d);
  background: var(--accent-d);
}

.forge-shell input,
.forge-shell select,
.forge-shell textarea {
  border-color: var(--line);
  color: var(--tx);
}

.forge-shell input:focus,
.forge-shell select:focus,
.forge-shell textarea:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.forge-shell .qa-panel,
.forge-shell .metric-card,
.forge-shell .panel,
.forge-shell .card,
.forge-shell .chat-conversations-panel,
.forge-shell .chat-panel,
.forge-shell .settings-panel,
.forge-shell .settings-card,
.forge-shell .base-card,
.forge-shell .document-table-wrap,
.forge-shell .audit-table-wrap {
  border-color: var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
}

.forge-shell .chat-conversation-search,
.forge-shell .conversation-empty-state button,
.forge-shell .chat-conversations-header button {
  border-color: var(--line);
  background: var(--card);
}

.forge-shell .conversation-item:hover,
.forge-shell .chat-conversations-header button:hover,
.forge-shell .conversation-empty-state button:hover {
  background: var(--card-2);
}

.forge-shell .conversation-item.is-active {
  background: var(--accent-soft);
}

.forge-shell .conversation-item.is-active .conversation-title,
.forge-shell .conversation-star,
.forge-shell .text-action {
  color: var(--accent-soft-ink);
}

.forge-shell .message-assistant,
.forge-shell .message-user {
  border-color: var(--line);
}

.forge-shell .toast-card {
  background: #2a2018;
  color: #f0e6d6;
}

/* -------------------------------------------------------------------------
   Agent library: outcome-led cards grouped by entitled product pack
   ------------------------------------------------------------------------- */
.forge-shell #agents-view {
  gap: 16px;
}

.forge-shell #agents-view .agents-page-header {
  padding-bottom: 0;
}

.forge-shell #agents-view .agents-page-header h1 {
  margin-bottom: 4px;
}

.forge-shell #agents-view .agents-page-header p {
  max-width: 620px;
}

.forge-shell #agents-view .client-contexts-bar {
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 8px 28px rgba(54, 42, 24, .045);
}

.forge-shell .client-context-new-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffaf1;
  font-size: 12px;
  font-weight: 650;
}

.forge-shell .client-context-new-button:hover:not(:disabled) {
  border-color: var(--accent-d);
  background: var(--accent-d);
}

.forge-shell #agents-view .agents-library {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.forge-shell #agents-view .agents-refresh-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--tx-2);
  box-shadow: none;
  margin-left: auto;
}

.forge-shell #agents-view .agents-refresh-button:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.forge-shell #agents-view .agents-catalog {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.forge-shell #agents-view .agents-catalog.is-hidden {
  display: none;
}

.forge-shell #agents-view .agents-catalog-toolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--sh);
}

.forge-shell #agents-view .agents-search {
  min-width: 260px;
  width: auto;
  flex: 1 1 360px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border-right: 1px solid var(--line);
  color: var(--tx-3);
}

.forge-shell #agents-view .agents-search input {
  width: 100%;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--tx);
  font-size: 13px;
}

.forge-shell #agents-view .agents-search input:focus {
  border: 0;
  box-shadow: none;
}

.forge-shell #agents-view .agents-pack-filters {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.forge-shell #agents-view .agents-pack-filters::-webkit-scrollbar {
  display: none;
}

.forge-shell #agents-view .agents-pack-filters.is-hidden {
  display: none;
}

.forge-shell #agents-view .agents-pack-filter {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--tx-2);
  font-size: 12px;
  font-weight: 650;
}

.forge-shell #agents-view .agents-pack-filter:hover {
  background: var(--card-2);
}

.forge-shell #agents-view .agents-pack-filter.is-active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
}

.forge-shell #agents-view .agents-pack-filter-count {
  min-width: 19px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: inherit;
  font: 500 10px/1.5 var(--font-jetbrains);
  text-align: center;
}

.forge-shell #agents-view .agents-results-status {
  min-height: 16px;
  margin: -2px 4px 0;
  color: var(--tx-3);
  font-size: 11px;
}

.forge-shell #agents-view .agents-results-status:empty {
  display: none;
}

.forge-shell #agents-view .agents-pack-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.forge-shell #agents-view .agent-pack-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.forge-shell #agents-view .agent-pack-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 0 2px;
}

.forge-shell #agents-view .agent-pack-kicker {
  margin: 0 0 5px;
  color: var(--accent-text);
  font: 500 10px/1.2 var(--font-jetbrains);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.forge-shell #agents-view .agent-pack-heading h3 {
  margin: 0 0 3px;
  font: 500 24px/1.1 var(--font-display);
  letter-spacing: -.01em;
}

.forge-shell #agents-view .agent-pack-heading > div > p:last-child {
  margin: 0;
  color: var(--tx-3);
  font-size: 12px;
}

.forge-shell #agents-view .agent-pack-count {
  flex: 0 0 auto;
  padding-bottom: 2px;
  color: var(--tx-3);
  font: 500 10px/1.4 var(--font-jetbrains);
}

.forge-shell #agents-view .agent-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.forge-shell #agents-view .agent-library-card {
  min-width: 0;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(244, 234, 217, .7), transparent 42%),
    var(--card);
  box-shadow: var(--sh);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.forge-shell #agents-view .agent-library-card:hover {
  border-color: var(--accent-line);
  box-shadow: var(--sh-lg);
}

.forge-shell #agents-view .agent-library-card.is-unavailable {
  background: var(--card);
}

.forge-shell #agents-view .agent-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.forge-shell #agents-view .agent-card-icon {
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.forge-shell #agents-view .agent-card-availability {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-top: 5px;
  color: var(--tx-3);
  font-size: 11px;
  font-weight: 650;
}

.forge-shell #agents-view .agent-card-availability > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--idle);
}

.forge-shell #agents-view .agent-card-availability.is-ready > span {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-bg);
}

.forge-shell #agents-view .agent-card-copy h3 {
  margin: 0 0 8px;
  font: 500 25px/1.1 var(--font-display);
  letter-spacing: -.015em;
}

.forge-shell #agents-view .agent-card-copy > p {
  min-height: 60px;
  margin: 0;
  color: var(--tx-2);
  font-size: 13px;
  line-height: 1.5;
}

.forge-shell #agents-view .agent-card-use-cases {
  margin-top: 18px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(251, 248, 243, .72);
}

.forge-shell #agents-view .agent-card-use-cases > p {
  margin: 0 0 8px;
  color: var(--accent-text);
  font: 500 9px/1.2 var(--font-jetbrains);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.forge-shell #agents-view .agent-card-use-cases ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.forge-shell #agents-view .agent-card-use-cases li {
  position: relative;
  padding-left: 14px;
  color: var(--tx-2);
  font-size: 12px;
  line-height: 1.38;
}

.forge-shell #agents-view .agent-card-use-cases li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: .52em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-text);
}

.forge-shell #agents-view .agent-card-trust {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  margin-top: auto;
  padding: 18px 0 14px;
  color: var(--tx-3);
  font-size: 11px;
  font-weight: 600;
}

.forge-shell #agents-view .agent-card-trust span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.forge-shell #agents-view .agent-card-trust svg {
  color: var(--accent-text);
}

.forge-shell #agents-view .agent-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.forge-shell #agents-view .agent-card-actions:has(.agent-card-configure) {
  grid-template-columns: minmax(0, 1fr) auto;
}

.forge-shell #agents-view .agent-card-launch,
.forge-shell #agents-view .agent-card-configure {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.forge-shell #agents-view .agent-card-launch {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fbf6ee;
  box-shadow: 0 8px 18px rgba(74, 52, 27, .12);
}

.forge-shell #agents-view .agent-card-launch:hover:not(:disabled) {
  border-color: var(--accent-d);
  background: var(--accent-d);
}

.forge-shell #agents-view .agent-card-launch:disabled {
  border-color: var(--line-2);
  background: var(--card-2);
  color: var(--tx-4);
  box-shadow: none;
  cursor: not-allowed;
}

.forge-shell #agents-view .agent-card-configure {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--tx-2);
}

.forge-shell #agents-view .agent-card-configure:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.forge-shell #agents-view .agents-empty-state {
  width: 100%;
  margin: 8px 0 0;
  padding: 40px 24px;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  background: rgba(255, 255, 255, .62);
  text-align: center;
}

.forge-shell #agents-view .agents-empty-state h3 {
  margin: 0 0 6px;
  font: 500 22px/1.2 var(--font-display);
}

.forge-shell #agents-view .agents-empty-state p {
  margin: 0 auto 16px;
  color: var(--tx-3);
}

/* Agent mode is intentionally more explicit than ordinary Assistant mode. */
.forge-shell:has(#agents-invoke-view:not(.is-hidden)) .topbar {
  border-bottom-color: #3a2a18;
  box-shadow: inset 0 -3px 0 var(--accent);
}

.forge-shell #agents-invoke-view .page-header {
  padding: 14px 16px;
  border: 1px solid #3a2a18;
  border-radius: var(--r);
  background: linear-gradient(180deg, #33261a, #2a2018);
  color: #f0e6d6;
  box-shadow: var(--sh);
}

.forge-shell #agents-invoke-view .page-header h1,
.forge-shell #agents-invoke-view .page-header p {
  color: inherit;
}

.forge-shell #agents-invoke-view .eyebrow {
  color: #c9a86a;
}

.forge-shell #agents-invoke-view .chat-panel {
  box-shadow: inset 0 3px 0 var(--accent), var(--sh);
}

.forge-shell #agents-invoke-view .agent-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 14px;
  border: 1px solid #3a2a18;
  border-radius: var(--r);
  background:
    radial-gradient(circle at 12% 0, rgba(201, 168, 106, .12), transparent 34%),
    linear-gradient(110deg, #2a2018, #3b2b1c);
  color: #f0e6d6;
  box-shadow: var(--sh);
}

.forge-shell #agents-invoke-view .agent-mode-identity {
  min-width: 0;
}

.forge-shell #agents-invoke-view .agent-mode-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 3px;
  color: #d6b777;
  font-family: var(--font-jetbrains);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.forge-shell #agents-invoke-view .agent-mode-live-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #d6b777;
  box-shadow: 0 0 0 4px rgba(214, 183, 119, .12);
}

.forge-shell #agents-invoke-view .agent-mode-banner h2 {
  margin: 0;
  color: #fffaf1;
  font-family: var(--font-display);
  font-size: clamp(19px, 1.7vw, 23px);
  font-weight: 500;
  line-height: 1.08;
}

.forge-shell #agents-invoke-view .agent-mode-purpose {
  max-width: 78ch;
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: #e9ddca;
  font-size: 11.5px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.forge-shell #agents-invoke-view .agent-mode-guarantees {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.forge-shell #agents-invoke-view .agent-mode-guarantees span {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 2px 7px;
  border: 1px solid rgba(234, 214, 180, .24);
  border-radius: 999px;
  background: rgba(255, 250, 241, .07);
  color: #f0e6d6;
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.2;
}

.forge-shell #agents-invoke-view .agent-mode-technical {
  max-width: 100%;
  margin-top: 5px;
  color: #e9ddca;
}

.forge-shell #agents-invoke-view .agent-mode-technical > summary {
  width: fit-content;
  color: #d6b777;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 650;
}

.forge-shell #agents-invoke-view .agent-mode-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.forge-shell #agents-invoke-view .agent-mode-meta-item {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid rgba(234, 214, 180, .2);
  border-radius: 999px;
  background: rgba(255, 250, 241, .06);
  color: #e9ddca;
  font-family: var(--font-jetbrains);
  font-size: 10.5px;
  line-height: 1.25;
}

.forge-shell #agents-invoke-view .agent-mode-ceiling {
  border-color: rgba(214, 183, 119, .36);
  background: rgba(214, 183, 119, .12);
  color: #f3dfb7;
}

.forge-shell #agents-invoke-view .agent-mode-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  gap: 8px;
}

.forge-shell #agents-invoke-view .agent-mode-action {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(240, 230, 214, .32);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .06);
  color: #fffaf1;
  font: 650 12px/1.2 var(--font-ui);
}

.forge-shell #agents-invoke-view .agent-mode-action:hover {
  border-color: rgba(240, 230, 214, .58);
  background: rgba(255, 255, 255, .12);
}

.forge-shell #agents-invoke-view .agent-mode-exit {
  border-color: #d6b777;
  background: #d6b777;
  color: #2a2018;
}

.forge-shell #agents-invoke-view .agent-mode-exit:hover {
  border-color: #ead09d;
  background: #ead09d;
}

.forge-shell .agent-run-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.forge-shell .agent-run-progress.is-hidden {
  display: none;
}

.forge-shell .agent-run-progress li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--tx-3);
}

.forge-shell .agent-run-progress li > span {
  display: inline-flex;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eee6d9;
  color: var(--accent);
  font: 650 10px/1 var(--font-jetbrains);
}

.forge-shell .agent-run-progress strong,
.forge-shell .agent-run-progress small {
  display: block;
}

.forge-shell .agent-run-progress strong {
  color: var(--tx);
  font-size: 11.5px;
}

.forge-shell .agent-run-progress small {
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.35;
}

.forge-shell .agent-run-progress li.is-active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.forge-shell .agent-run-progress li.is-active > span {
  animation: agent-phase-pulse 1.4s ease-in-out infinite;
  background: var(--accent);
  color: #fffaf1;
}

.forge-shell .agent-run-progress li.is-complete {
  border-color: #b7d7c3;
  background: #f1f8f3;
}

.forge-shell .agent-run-progress li.is-complete > span {
  background: #32704b;
  color: #fff;
}

.forge-shell .agent-run-progress li.is-failed {
  border-color: var(--err-line);
  background: var(--err-bg);
}

@keyframes agent-phase-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(121, 85, 34, .08); }
  50% { box-shadow: 0 0 0 5px rgba(121, 85, 34, .16); }
}

.forge-shell .agent-table-description {
  display: block;
  max-width: 36ch;
  margin-top: 4px;
  color: var(--tx-3);
  font-size: 10.5px;
  line-height: 1.35;
}

.forge-shell .agent-managed-pill {
  margin-left: 5px;
  padding: 2px 7px;
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
  font-size: 9.5px;
  vertical-align: 1px;
}

.forge-shell .agent-governance-shell {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
}

.forge-shell .agent-config-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--sh);
}

.forge-shell .agent-config-tab {
  min-height: 36px;
  padding: 8px 18px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--tx-2);
  font-size: 12px;
  font-weight: 650;
}

.forge-shell .agent-config-tab:hover {
  background: #f6efe4;
  color: var(--tx);
}

.forge-shell .agent-config-tab.is-active,
.forge-shell .agent-config-tab[aria-selected="true"] {
  background: var(--accent);
  color: #fffaf1;
  box-shadow: 0 8px 18px rgba(77, 52, 26, .14);
}

.forge-shell .agent-config-panel {
  min-width: 0;
}

.forge-shell .agent-config-global-status {
  min-height: 18px;
  margin: -6px 2px 0;
  color: var(--tx-2);
  font-size: 11.5px;
}

.forge-shell .governance-definition-summary {
  margin-bottom: 18px;
}

.forge-shell .governance-summary-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 19px;
}

.forge-shell .governance-summary-body .governance-purpose {
  flex: 1 1 auto;
  padding: 0;
}

.forge-shell .governance-guarantee-chips,
.forge-shell .governance-selection-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.forge-shell .governance-guarantee-chips {
  margin: 7px 19px 17px;
}

.forge-shell .governance-guarantee-chips span,
.forge-shell .governance-selection-chip {
  padding: 3px 8px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
}

.forge-shell .governance-details {
  min-width: 0;
}

.forge-shell .governance-details > summary {
  position: relative;
  padding: 13px 42px 13px 19px;
  border-top: 1px solid var(--line);
  color: var(--accent);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  list-style: none;
}

.forge-shell .governance-details > summary::-webkit-details-marker {
  display: none;
}

.forge-shell .governance-details > summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 19px;
  transform: translateY(-50%);
  color: var(--tx-3);
  font-size: 18px;
  font-weight: 400;
}

.forge-shell .governance-details[open] > summary::after {
  content: "−";
}

.forge-shell .governance-selection-summary {
  min-height: 54px;
  padding: 13px 19px;
}

.forge-shell .governance-selection-empty {
  color: var(--tx-3);
  font-size: 11.5px;
}

.forge-shell .governance-source-details > summary {
  border-top: 1px solid var(--line);
}

.forge-shell .governance-data-ceiling {
  border-top: 1px solid var(--line);
}

.forge-shell .governance-data-ceiling select {
  max-width: 320px;
}

.forge-shell .governance-advanced-options {
  overflow: hidden;
}

.forge-shell .governance-advanced-options > summary {
  padding-top: 17px;
  padding-bottom: 17px;
  border-top: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}

.forge-shell .governance-advanced-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.forge-shell .governance-nested-card {
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.forge-shell .governance-tab-intro {
  max-width: 78ch;
  padding: 15px 19px 0;
  color: var(--tx-2);
  font-size: 12px;
  line-height: 1.55;
}

.forge-shell .governance-test-card {
  width: min(920px, 100%);
  margin: 0 auto;
}

.forge-shell .governance-test-publish {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 19px 18px;
  border-top: 1px solid var(--line);
}

.forge-shell .governance-test-publish .primary-action {
  min-height: 38px;
  padding: 9px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--accent);
  color: #fffaf1;
  font-size: 12px;
  font-weight: 700;
}

.forge-shell .governance-test-publish .primary-action:disabled {
  border-color: var(--line);
  background: #f3eee6;
  color: var(--tx-3);
}

.forge-shell .governance-test-sources {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.forge-shell .governance-test-sources h3 {
  color: var(--tx);
  font-size: 12px;
}

.forge-shell .governance-test-sources .source-item {
  margin: 0;
}

.forge-shell .governance-action-help {
  margin: -6px 19px 16px;
  color: var(--tx-3);
  font-size: 10.5px;
  line-height: 1.45;
}

.forge-shell .agent-governance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(286px, 330px);
  gap: 18px;
  align-items: start;
}

.forge-shell .agent-governance-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
}

.forge-shell .agent-governance-rail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: calc(var(--topbar-h) + 18px);
}

.forge-shell .governance-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--sh);
}

.forge-shell .governance-definition-card {
  border-top: 3px solid var(--accent);
  background:
    radial-gradient(circle at 92% 0, rgba(138, 102, 39, .09), transparent 38%),
    var(--card);
}

.forge-shell .governance-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 19px 14px;
  border-bottom: 1px solid var(--line);
}

.forge-shell .governance-card-header h2 {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.15;
}

.forge-shell .governance-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.forge-shell .governance-purpose {
  max-width: 82ch;
  padding: 17px 19px 5px;
  color: var(--tx);
  font-size: 13.5px;
  line-height: 1.62;
}

.forge-shell .governance-facts,
.forge-shell .governance-status-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px 19px;
}

.forge-shell .governance-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.forge-shell .governance-facts > div,
.forge-shell .governance-status-list > div {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fbf8f2;
}

.forge-shell .governance-facts dt,
.forge-shell .governance-status-list dt {
  color: var(--tx-3);
  font-family: var(--font-jetbrains);
  font-size: 9.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.forge-shell .governance-facts dd,
.forge-shell .governance-status-list dd {
  margin: 5px 0 0;
  color: var(--tx);
  font-size: 12px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.forge-shell .governance-definition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 3px 19px 16px;
}

.forge-shell .governance-definition-grid > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .72);
}

.forge-shell .governance-definition-grid h3,
.forge-shell .governance-pending h3 {
  color: var(--tx);
  font-size: 12px;
  font-weight: 650;
}

.forge-shell .governance-list,
.forge-shell .governance-pending ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--tx-2);
  font-size: 12px;
  line-height: 1.55;
}

.forge-shell .governance-list li + li,
.forge-shell .governance-pending li + li {
  margin-top: 5px;
}

.forge-shell .governance-list .governance-empty {
  color: var(--tx-3);
  list-style: none;
  margin-left: -18px;
}

.forge-shell .governance-policy-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 19px 16px;
}

.forge-shell .governance-policy-strip > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
  font-size: 11px;
}

.forge-shell .governance-policy-strip strong {
  text-align: right;
  font-weight: 650;
}

.forge-shell .governance-managed-note {
  margin: 0 19px 18px;
  padding: 11px 13px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: #f8f1e6;
  color: var(--tx-2);
  font-size: 11.5px;
  line-height: 1.5;
}

.forge-shell .governance-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 16px 19px;
}

.forge-shell .governance-grid-span {
  grid-column: 1 / -1;
}

.forge-shell .governance-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  padding: 16px 19px;
}

.forge-shell .governance-form-grid label,
.forge-shell .governance-test-controls label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.forge-shell .governance-form-grid input,
.forge-shell .governance-form-grid select,
.forge-shell .governance-form-grid textarea,
.forge-shell .governance-field input,
.forge-shell .governance-field select,
.forge-shell .governance-field textarea {
  width: 100%;
}

.forge-shell .governance-help {
  color: var(--tx-3);
  font-size: 10.5px;
  line-height: 1.45;
}

.forge-shell .governance-switch-card {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fbf8f2;
  cursor: pointer;
}

.forge-shell .governance-switch-card input {
  width: auto;
  margin-top: 2px;
  accent-color: var(--accent);
}

.forge-shell .governance-switch-card strong,
.forge-shell .governance-switch-card small,
.forge-shell .agent-config-fieldset .toggle-label strong,
.forge-shell .agent-config-fieldset .toggle-label small,
.forge-shell .governance-kb-grid .toggle-label strong,
.forge-shell .governance-kb-grid .toggle-label small {
  display: block;
}

.forge-shell .governance-switch-card small,
.forge-shell .agent-config-fieldset .toggle-label small,
.forge-shell .governance-kb-grid .toggle-label small {
  margin-top: 3px;
  color: var(--tx-3);
  font-size: 10.5px;
  line-height: 1.4;
}

.forge-shell .agent-config-fieldset {
  min-width: 0;
  margin: 0 19px 16px;
  padding: 11px 13px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.forge-shell .agent-config-fieldset legend {
  padding: 0 5px;
  color: var(--tx);
  font-size: 12px;
  font-weight: 650;
}

.forge-shell .agent-config-fieldset > .toggle-label + .toggle-label {
  margin-top: 7px;
}

.forge-shell .governance-role-grid,
.forge-shell .governance-mode-grid,
.forge-shell .governance-kb-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.forge-shell .governance-mode-grid,
.forge-shell .governance-kb-grid {
  margin-top: 2px;
}

.forge-shell .governance-role-grid .toggle-label,
.forge-shell .governance-mode-grid .toggle-label,
.forge-shell .governance-kb-grid .toggle-label {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fbf8f2;
}

.forge-shell .governance-test-controls {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, .5fr) auto;
  align-items: end;
  gap: 10px;
  padding: 0 19px 16px;
}

.forge-shell .governance-test-controls span {
  color: var(--tx-2);
  font-size: 11px;
  font-weight: 650;
}

.forge-shell .governance-test-result {
  margin: 0 19px 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fbf8f2;
  color: var(--tx-2);
  font-size: 12px;
  line-height: 1.55;
}

.forge-shell .governance-test-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: var(--tx);
}

.forge-shell .governance-test-answer {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.forge-shell .governance-status-card .governance-card-header {
  align-items: center;
}

.forge-shell .governance-status-list {
  grid-template-columns: 1fr;
}

.forge-shell .governance-pending {
  margin: 0 19px 15px;
  padding: 12px 13px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-sm);
  background: var(--accent-soft);
}

.forge-shell .governance-actions {
  display: grid;
  gap: 8px;
  padding: 0 19px 17px;
}

.forge-shell .governance-actions button {
  width: 100%;
  justify-content: center;
}

.forge-shell .governance-actions button[type="submit"] {
  min-height: 38px;
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--accent);
  color: #fffaf1;
  font-size: 12.5px;
  font-weight: 650;
}

.forge-shell .governance-status-card > .form-status {
  margin: -5px 19px 17px;
}

/* Agent configuration: a single client-facing sheet. Operational testing,
   policy versions and Torus definition internals intentionally live elsewhere. */
.forge-shell #agent-config-view {
  width: min(1180px, 100%);
}

.forge-shell #agent-config-view .page-header {
  margin-bottom: 18px;
}

.forge-shell #agent-config-view .agent-governance-shell {
  gap: 0;
}

.forge-shell #agent-config-view [aria-labelledby="acfg-test-title"],
.forge-shell #agent-config-view [aria-labelledby="acfg-escalation-title"],
.forge-shell #agent-config-view .agent-governance-rail,
.forge-shell #agent-config-view .governance-definition-card .governance-facts,
.forge-shell #agent-config-view .governance-definition-card .governance-definition-grid,
.forge-shell #agent-config-view .governance-definition-card .governance-policy-strip,
.forge-shell #agent-config-view .governance-definition-card .governance-managed-note {
  display: none;
}

.forge-shell #agent-config-view .agent-config-sheet {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 12px 34px rgba(54, 42, 24, .07);
}

.forge-shell #agent-config-view .agent-config-sheet > .governance-card {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.forge-shell #agent-config-view .agent-config-sheet > .governance-card + .governance-card {
  border-top: 1px solid var(--line);
}

.forge-shell #agent-config-view .governance-definition-card {
  border-top: 0;
  background:
    radial-gradient(circle at 96% 0, rgba(138, 102, 39, .08), transparent 32%),
    transparent;
}

.forge-shell #agent-config-view .governance-definition-card .governance-card-header {
  padding-bottom: 7px;
  border-bottom: 0;
}

.forge-shell #agent-config-view .governance-definition-card .governance-card-header h2 {
  font-size: 22px;
}

.forge-shell #agent-config-view .governance-definition-card .governance-purpose {
  max-width: 76ch;
  padding: 0 19px 3px;
  font-size: 14px;
}

.forge-shell #agent-config-view .governance-guarantee-chips {
  margin: 10px 19px 18px;
}

.forge-shell #agent-config-view .governance-guarantee-chips:empty {
  display: none;
}

.forge-shell #agent-config-view .governance-card-header {
  align-items: center;
  padding: 20px 22px 12px;
  border-bottom: 0;
}

.forge-shell #agent-config-view .governance-card-header h2 {
  font-size: 22px;
}

.forge-shell #agent-config-view .governance-form-grid {
  gap: 12px;
  padding: 8px 22px 18px;
}

.forge-shell #agent-config-view .governance-preferences-card .governance-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.forge-shell #agent-config-view .governance-switch-card {
  align-items: center;
  flex-direction: row;
  grid-column: 1 / -1;
  padding: 14px 15px;
  background: #fcfaf6;
}

.forge-shell #agent-config-view .governance-switch-card > span {
  min-width: 0;
}

.forge-shell #agent-config-view .governance-switch-card > input[type="checkbox"] {
  position: relative;
  order: 2;
  flex: 0 0 42px;
  width: 42px;
  height: 24px;
  margin: 0 0 0 auto;
  border: 1px solid #cfc5b6;
  border-radius: 999px;
  appearance: none;
  background: #e7e0d5;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

.forge-shell #agent-config-view .governance-switch-card > input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(51, 38, 22, .22);
  transition: transform .18s ease;
}

.forge-shell #agent-config-view .governance-switch-card > input[type="checkbox"]:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.forge-shell #agent-config-view .governance-switch-card > input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}

.forge-shell #agent-config-view .governance-switch-card > input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(138, 102, 39, .23);
  outline-offset: 2px;
}

.forge-shell #agent-config-view .agent-config-fieldset {
  margin: 0 22px 20px;
  padding: 12px;
  border-color: #e7dfd2;
  background: #fff;
}

.forge-shell #agent-config-view .agent-config-fieldset > .toggle-label,
.forge-shell #agent-config-view .governance-role-grid .toggle-label,
.forge-shell #agent-config-view .governance-mode-grid .toggle-label,
.forge-shell #agent-config-view .governance-kb-grid .toggle-label {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fcfaf6;
  cursor: pointer;
}

.forge-shell #agent-config-view .agent-config-fieldset input[type="checkbox"],
.forge-shell #agent-config-view .agent-config-fieldset input[type="radio"],
.forge-shell #agent-config-view .governance-mode-grid input[type="checkbox"],
.forge-shell #agent-config-view .governance-kb-grid input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.forge-shell #agent-config-view .agent-config-fieldset .toggle-label > span,
.forge-shell #agent-config-view .governance-mode-grid .toggle-label > span,
.forge-shell #agent-config-view .governance-kb-grid .toggle-label > span {
  min-width: 0;
  flex: 1 1 auto;
}

.forge-shell #agent-config-view .governance-data-ceiling {
  max-width: 420px;
  padding: 3px 22px 17px;
  border-top: 0;
}

.forge-shell #agent-config-view .governance-data-ceiling select {
  max-width: none;
}

.forge-shell #agent-config-view .governance-mode-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.forge-shell #agent-config-view .governance-field {
  padding-right: 22px;
  padding-left: 22px;
}

.forge-shell #agent-config-view .agent-config-savebar {
  position: sticky;
  z-index: 4;
  bottom: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 249, .94);
  box-shadow: 0 -8px 28px rgba(54, 42, 24, .08);
  backdrop-filter: blur(12px);
}

.forge-shell #agent-config-view .agent-config-savebar .form-status {
  min-height: 0;
  margin: 0 auto 0 0;
  color: var(--tx-2);
  font-size: 11.5px;
}

.forge-shell #agent-config-view .agent-config-savebar button {
  min-width: 150px;
  min-height: 40px;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--accent);
  color: #fffaf1;
  font-size: 12.5px;
  font-weight: 700;
}

.forge-shell #agent-config-view .agent-config-savebar button:disabled {
  border-color: var(--line);
  background: #eee8df;
  color: var(--tx-3);
}

/* Signed-out state follows the same product language. */
/* Lot K (29/09/2026, recette G1): the sign-in page is light — Torus cream
   (#FFEAC8) softened toward white, a hint of yellow (#FECB48) — instead of the
   dark brown; in a dark system theme, a soft ink (#1D1D1B family), never brown. */
.signed-out-page {
  background:
    radial-gradient(900px 620px at 76% 18%, rgba(254, 203, 72, .22), transparent 66%),
    #fff3dc;
}

@media (prefers-color-scheme: dark) {
  .signed-out-page {
    background:
      radial-gradient(900px 620px at 76% 18%, rgba(241, 137, 16, .14), transparent 66%),
      #3a3935;
  }
}

.signed-out-page::before {
  background: none;
}

.signed-out-card {
  width: 500px;
  border: 1px solid rgba(234, 226, 213, .9);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(29, 29, 27, .16);
}

.signed-out-card h1 {
  font-family: var(--font-display);
  font-weight: 500;
}

.signed-out-brand .brand-name {
  color: var(--tx);
  font-size: 19px;
  font-weight: 800;
}

.signed-out-brand .brand-subtitle {
  color: var(--tx-3);
}

.signed-out-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fbf6ee;
}

.signed-out-button:hover {
  background: var(--accent-d);
}

.local-credential-card {
  width: min(520px, calc(100vw - 32px));
}

.local-credential-card .settings-form {
  gap: 14px;
}

.local-credential-card input,
#credential-link-modal input {
  width: 100%;
}

#credential-link-modal .login-panel {
  width: min(620px, calc(100vw - 32px));
}

/* AI quality — human review only, scoped to the administrative view. */
.forge-shell .quality-page-header {
  align-items: flex-start;
}

.forge-shell .quality-no-auto-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--tx-2);
}

.forge-shell .quality-no-auto-notice svg {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--accent);
}

.forge-shell .quality-no-auto-notice p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
}

.forge-shell .quality-monthly-card {
  position: relative;
  margin-bottom: 14px;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  background: linear-gradient(135deg, var(--card) 0%, color-mix(in srgb, var(--accent-soft) 65%, var(--card)) 100%);
}

.forge-shell .quality-monthly-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}

.forge-shell .quality-monthly-kicker {
  margin: 0 0 4px !important;
  color: var(--accent) !important;
  font-family: var(--font-mono);
  font-size: 9.5px !important;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.forge-shell .quality-monthly-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 0 18px 15px;
}

.forge-shell .quality-monthly-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--card);
  color: var(--accent);
}

.forge-shell .quality-monthly-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
}

.forge-shell .quality-monthly-meta div {
  min-width: 0;
  padding: 11px 13px;
  background: color-mix(in srgb, var(--card) 94%, transparent);
}

.forge-shell .quality-monthly-meta dt {
  margin-bottom: 4px;
  color: var(--tx-3);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.forge-shell .quality-monthly-meta dd {
  margin: 0;
  overflow: hidden;
  color: var(--tx);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forge-shell .quality-monthly-privacy {
  margin: 0;
  padding: 11px 18px 14px 80px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  color: var(--tx-3);
  font-size: 11px;
  line-height: 1.5;
}

.forge-shell .quality-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.forge-shell .quality-metric-card {
  min-height: 126px;
  padding: 18px;
}

.forge-shell .quality-metric-card p {
  margin: 0 0 12px;
  color: var(--tx-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.forge-shell .quality-metric-card strong {
  display: block;
  color: var(--tx);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.forge-shell .quality-metric-card span {
  display: block;
  margin-top: 8px;
  color: var(--tx-3);
  font-size: 11.5px;
  line-height: 1.45;
}

.forge-shell .quality-usage-card {
  margin-bottom: 14px;
}

.forge-shell .quality-usage-warning {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 18px 14px;
  padding: 11px 13px;
  border: 1px solid var(--warn-line);
  border-radius: 9px;
  background: var(--warn-bg);
  color: var(--tx-2);
  font-size: 12px;
  line-height: 1.5;
}

.forge-shell .quality-usage-warning strong {
  color: var(--tx);
  white-space: nowrap;
}

.forge-shell .quality-usage-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 18px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.forge-shell .quality-usage-metrics article {
  min-width: 0;
  padding: 14px;
  background: var(--card);
}

.forge-shell .quality-usage-metrics span {
  display: block;
  margin-bottom: 7px;
  color: var(--tx-3);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.forge-shell .quality-usage-metrics strong {
  color: var(--tx);
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 650;
}

.forge-shell .quality-usage-credentials {
  margin: 0 18px 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 72%, var(--card));
}

.forge-shell .quality-usage-credentials-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.forge-shell .quality-usage-credentials-heading h3 {
  margin: 0 0 3px;
  color: var(--tx);
  font-size: 14px;
}

.forge-shell .quality-usage-credentials-heading p {
  margin: 0;
  color: var(--tx-3);
  font-size: 12px;
}

.forge-shell .quality-usage-credential-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.forge-shell .quality-usage-credential-item {
  position: relative;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.forge-shell .quality-usage-credential-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.forge-shell .quality-usage-credential-title strong {
  overflow: hidden;
  color: var(--tx);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forge-shell .quality-usage-credential-title code {
  flex: 0 0 auto;
  color: var(--tx-3);
  font-size: 10px;
}

.forge-shell .quality-usage-credential-item dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}

.forge-shell .quality-usage-credential-item dl div {
  min-width: 0;
}

.forge-shell .quality-usage-credential-item dt {
  overflow: hidden;
  color: var(--tx-3);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.forge-shell .quality-usage-credential-item dd {
  margin: 3px 0 0;
  color: var(--tx);
  font-family: var(--font-mono);
  font-size: 13px;
}

.forge-shell .quality-usage-table-wrap {
  margin: 0 18px;
}

.forge-shell .quality-usage-table-wrap table {
  min-width: 780px;
  table-layout: fixed;
}

.forge-shell .quality-usage-table-wrap td {
  padding-right: 9px;
  padding-left: 9px;
  white-space: nowrap;
}

.forge-shell .quality-usage-table-wrap th {
  padding-right: 9px;
  padding-left: 9px;
  line-height: 1.3;
  white-space: normal;
}

.forge-shell .quality-usage-table-wrap :is(th, td):nth-child(1) { width: 12%; }
.forge-shell .quality-usage-table-wrap :is(th, td):nth-child(2) { width: 20%; }
.forge-shell .quality-usage-table-wrap :is(th, td):nth-child(3) { width: 10%; }
.forge-shell .quality-usage-table-wrap :is(th, td):nth-child(4) { width: 11%; }
.forge-shell .quality-usage-table-wrap :is(th, td):nth-child(5) { width: 11%; }
.forge-shell .quality-usage-table-wrap :is(th, td):nth-child(6) { width: 11%; }
.forge-shell .quality-usage-table-wrap :is(th, td):nth-child(7) { width: 11%; }
.forge-shell .quality-usage-table-wrap :is(th, td):nth-child(8) { width: 14%; }

.forge-shell .quality-usage-table-wrap th:first-child,
.forge-shell .quality-usage-table-wrap td:first-child {
  padding-left: 4px;
}

.forge-shell .quality-usage-table-wrap th:last-child,
.forge-shell .quality-usage-table-wrap td:last-child {
  padding-right: 4px;
}

.forge-shell .quality-usage-table-wrap code {
  color: var(--tx);
  font-size: 11px;
  white-space: nowrap;
}

.forge-shell .quality-usage-footnote {
  margin: 12px 18px 17px;
  color: var(--tx-3);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.forge-shell .quality-reasons-card {
  margin-bottom: 14px;
}

.forge-shell .quality-reasons-list {
  display: grid;
  gap: 9px;
  padding: 4px 18px 18px;
}

.forge-shell .quality-reason-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.2fr) minmax(160px, 3fr) auto;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.forge-shell .quality-reason-label {
  color: var(--tx);
  font-weight: 650;
}

.forge-shell .quality-reason-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.forge-shell .quality-reason-bar {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--accent);
}

.forge-shell .quality-reason-count {
  color: var(--tx-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  white-space: nowrap;
}

.forge-shell .quality-filters {
  align-items: end;
}

.forge-shell .quality-search-filter {
  flex: 1 1 210px;
}

.forge-shell .quality-table td {
  vertical-align: middle;
}

.forge-shell .quality-table .quality-user-cell {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forge-shell .quality-review-button {
  white-space: nowrap;
}

.quality-drawer-panel {
  width: min(620px, 92vw);
}

.quality-drawer-body {
  display: block;
  padding: 18px;
}

.quality-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
}

.quality-detail-meta div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.quality-detail-meta dt {
  margin-bottom: 3px;
  color: var(--tx-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.quality-detail-meta dd {
  margin: 0;
  color: var(--tx);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.quality-content-block {
  margin-bottom: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
}

.quality-content-block h3 {
  margin: 0 0 7px;
  color: var(--tx-3);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.quality-content-block p {
  margin: 0;
  color: var(--tx);
  font-size: 12.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.quality-review-form,
.quality-evaluation-section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.quality-form-heading h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}

.quality-form-heading p {
  margin: 4px 0 0;
  color: var(--tx-3);
  font-size: 11.5px;
  line-height: 1.5;
}

.quality-review-form label:not(.checkbox-label),
.quality-evaluation-form label:not(.checkbox-label) {
  display: grid;
  gap: 6px;
  color: var(--tx-2);
  font-size: 11.5px;
  font-weight: 650;
}

.quality-review-form select,
.quality-review-form textarea,
.quality-evaluation-form input,
.quality-evaluation-form textarea {
  width: 100%;
}

.quality-evaluation-form {
  display: grid;
  gap: 12px;
}

.quality-evaluation-state:empty {
  display: none;
}

.quality-evaluation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quality-confirm-label {
  align-items: flex-start;
}

.quality-confirm-label input {
  margin-top: 2px;
}

@media (max-width: 1180px) {
  .forge-shell #agents-view .agent-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forge-shell .agent-governance-layout {
    grid-template-columns: 1fr;
  }

  .forge-shell .agent-governance-rail {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .forge-shell #agents-view .agents-page-header,
  .forge-shell #agents-view .agent-pack-heading {
    align-items: flex-start;
  }

  .forge-shell #agents-view .agents-catalog-toolbar {
    align-items: center;
    flex-wrap: wrap;
    padding: 6px;
  }

  .forge-shell #agents-view .agents-search {
    width: auto;
    min-width: 0;
    flex: 1 1 calc(100% - 52px);
    padding: 0 8px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .forge-shell #agents-view .agents-pack-filters {
    flex: 1 0 100%;
    order: 3;
    padding: 6px 2px 0;
    border-top: 1px solid var(--line);
  }

  .forge-shell .quality-summary-grid {
    grid-template-columns: 1fr;
  }

  .forge-shell .quality-monthly-body {
    grid-template-columns: 1fr;
  }

  .forge-shell .quality-monthly-icon {
    display: none;
  }

  .forge-shell .quality-monthly-meta {
    grid-template-columns: 1fr;
  }

  .forge-shell .quality-monthly-privacy {
    padding-left: 18px;
  }

  .forge-shell .quality-usage-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forge-shell .quality-usage-warning {
    align-items: flex-start;
    flex-direction: column;
  }

  .forge-shell .quality-reason-row {
    grid-template-columns: minmax(110px, 1fr) minmax(120px, 2fr) auto;
  }

  .forge-shell .agent-run-progress {
    grid-template-columns: 1fr;
  }

  .forge-shell .governance-summary-body {
    align-items: flex-start;
    flex-direction: column;
  }

  .forge-shell .governance-facts,
  .forge-shell .governance-definition-grid,
  .forge-shell .governance-policy-strip,
  .forge-shell .governance-form-grid,
  .forge-shell .governance-advanced-grid,
  .forge-shell .agent-governance-rail {
    grid-template-columns: 1fr;
  }

  .forge-shell .governance-nested-card {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .forge-shell #agents-invoke-view .agent-mode-banner {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .forge-shell #agents-invoke-view .agent-mode-actions {
    flex-wrap: wrap;
  }

  .forge-shell .sidebar {
    width: 100%;
    flex-basis: auto;
    box-shadow: 0 4px 22px rgba(54, 42, 24, .05);
  }

  .forge-shell .workspace-main {
    padding: 20px 16px 36px;
  }

  .forge-shell .topbar {
    padding: 12px 16px;
  }
}

@media (max-width: 620px) {
  .forge-shell #agents-view .agent-pack-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .forge-shell #agents-view .agent-card-grid {
    grid-template-columns: 1fr;
  }

  .forge-shell #agents-view .agent-library-card {
    min-height: 0;
    padding: 19px;
  }

  .forge-shell #agents-view .agent-card-copy > p {
    min-height: 0;
  }

  .forge-shell #agents-view .agent-card-actions:has(.agent-card-configure) {
    grid-template-columns: 1fr;
  }

  .forge-shell .quality-reason-row,
  .quality-detail-meta {
    grid-template-columns: 1fr;
  }

  .forge-shell .quality-reason-count {
    justify-self: start;
  }

  .forge-shell .agent-config-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .forge-shell .agent-config-tab {
    flex: 1 0 auto;
  }

  .forge-shell .governance-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .forge-shell .governance-badges {
    justify-content: flex-start;
  }

  .forge-shell .governance-role-grid,
  .forge-shell .governance-mode-grid,
  .forge-shell .governance-kb-grid,
  .forge-shell .governance-test-controls {
    grid-template-columns: 1fr;
  }

  .forge-shell #agent-config-view .governance-preferences-card .governance-form-grid {
    grid-template-columns: 1fr;
  }

  .forge-shell #agent-config-view .agent-config-savebar {
    align-items: stretch;
    flex-direction: column;
  }

  .forge-shell #agent-config-view .agent-config-savebar button {
    width: 100%;
  }

  .forge-shell .governance-test-publish {
    align-items: stretch;
    flex-direction: column;
  }
}

/* -------------------------------------------------------------------------
   Cyber deliverables: native Forge wizard, history and governed review
   ------------------------------------------------------------------------- */
.artifact-prepare-button {
  width: fit-content;
  min-height: 36px;
  margin-top: 12px;
  padding: 8px 13px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.artifact-wizard-modal {
  z-index: 80;
  align-items: center;
  justify-items: center;
  padding: 22px;
}

.artifact-wizard-panel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(780px, calc(100vw - 44px));
  max-height: min(860px, calc(100vh - 44px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: 0 24px 80px rgba(43, 34, 21, .24);
}

.artifact-wizard-header,
.artifact-wizard-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
}

.artifact-wizard-header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--accent-soft), var(--card) 55%);
}

.artifact-wizard-header h2 {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
}

.artifact-wizard-header p:not(.eyebrow) {
  max-width: 58ch;
  margin-top: 6px;
  color: var(--tx-2);
  font-size: 13px;
}

.artifact-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 14px 24px;
  list-style: none;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 55%, var(--card));
}

.artifact-stepper li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tx-3);
  font-size: 11px;
}

.artifact-stepper li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 32px;
  right: 8px;
  top: 12px;
  height: 1px;
  background: var(--line);
}

.artifact-stepper span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
}

.artifact-stepper .is-active,
.artifact-stepper .is-complete { color: var(--accent); }
.artifact-stepper .is-active span,
.artifact-stepper .is-complete span { border-color: var(--accent); background: var(--accent); color: #fff; }

.artifact-wizard-body {
  min-height: 280px;
  padding: 24px;
  overflow: auto;
}

.artifact-wizard-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  background: var(--card);
}

.artifact-wizard-actions,
.artifact-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.artifact-live-status { min-height: 20px; }
.artifact-live-status.is-error { color: var(--err); }

.artifact-step-heading { margin-bottom: 18px; }
.artifact-step-heading.compact { margin-top: 24px; }
.artifact-step-heading h3,
.artifact-detail-content h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}
.artifact-step-heading p { margin-top: 5px; color: var(--tx-2); font-size: 13px; }

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

.artifact-template-card,
.artifact-evidence-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  cursor: pointer;
}

.artifact-template-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 16%, transparent);
}

.artifact-template-card input,
.artifact-evidence-card input { margin-top: 3px; accent-color: var(--accent); }
.artifact-template-card span,
.artifact-evidence-card span { display: grid; gap: 5px; min-width: 0; }
.artifact-template-card small,
.artifact-evidence-card small { color: var(--tx-2); overflow-wrap: anywhere; }
.artifact-evidence-card:has(input:disabled) { cursor: not-allowed; opacity: .56; }

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

.artifact-field { display: grid; gap: 6px; color: var(--tx-2); font-size: 12px; font-weight: 650; }
.artifact-field input,
.artifact-field select,
.artifact-field textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--tx);
  font: inherit;
  font-weight: 450;
}
.artifact-field textarea { resize: vertical; }
.artifact-completion-fields,
.artifact-evidence-list { display: grid; gap: 10px; margin-top: 16px; }
.artifact-evidence-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.artifact-review-summary,
.artifact-detail-facts {
  display: grid;
  grid-template-columns: minmax(140px, .6fr) minmax(0, 1.4fr);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.artifact-review-summary dt,
.artifact-review-summary dd,
.artifact-detail-facts dt,
.artifact-detail-facts dd { margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.artifact-review-summary dt,
.artifact-detail-facts dt { background: var(--paper); color: var(--tx-2); font-size: 12px; font-weight: 650; }

.artifact-generation-card { display: grid; justify-items: start; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--accent-soft); }
.artifact-state { display: inline-flex; width: fit-content; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--tx-2); font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.artifact-state.state-ready,
.artifact-state.state-approved { border-color: var(--ok-line); color: var(--ok); }
.artifact-state.state-rejected,
.artifact-state.state-failed,
.artifact-state.state-quarantined { border-color: var(--err-line); color: var(--err); }
.artifact-state.state-rendering,
.artifact-state.state-validating,
.artifact-state.state-queued { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }

.artifact-history-panel { width: min(560px, 100vw); }
.artifact-history-toolbar { padding: 10px 18px; border-bottom: 1px solid var(--line); }
.artifact-history-list { display: grid; align-content: start; gap: 10px; }
.artifact-history-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); }
.artifact-history-copy { display: grid; gap: 6px; min-width: 0; }
.artifact-history-copy h3 { overflow-wrap: anywhere; font-family: var(--serif); font-size: 16px; font-weight: 600; }
.artifact-history-copy p,
.artifact-history-copy small { color: var(--tx-2); font-size: 11px; }
.artifact-pagination { padding: 12px 18px; border-top: 1px solid var(--line); }

.artifact-detail-panel { width: min(720px, 100vw); }
.artifact-detail-content { display: grid; align-content: start; gap: 18px; padding: 20px; overflow: auto; }
.artifact-detail-summary { display: grid; gap: 12px; }
.artifact-detail-actions { justify-content: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); }
.artifact-detail-actions > .artifact-live-status { flex-basis: 100%; }
.artifact-reject-form { display: grid; flex: 1 0 100%; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.artifact-reject-form h4 { grid-column: 1 / -1; font-size: 13px; }
.artifact-revisions,
.artifact-provenance { display: grid; gap: 10px; }
.artifact-revision-card { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.artifact-revision-card small { grid-column: 1 / -1; color: var(--tx-2); }
.artifact-provenance ul { display: grid; gap: 6px; padding-left: 20px; color: var(--tx-2); font-size: 12px; }
.artifact-preview-wrap { display: grid; flex-basis: 100%; gap: 10px; width: 100%; }
.artifact-preview-frame { width: 100%; min-height: 420px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }

.artifact-prepare-button:focus-visible,
.artifact-template-card:has(input:focus-visible),
.artifact-evidence-card:has(input:focus-visible),
.artifact-wizard-panel :is(button, input, select, textarea):focus-visible,
.artifact-history-panel :is(button, input, select, textarea):focus-visible,
.artifact-detail-panel :is(button, input, select, textarea, iframe):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 38%, transparent);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .artifact-wizard-modal { align-items: stretch; padding: 0; }
  .artifact-wizard-panel { width: 100vw; max-height: 100dvh; min-height: 100dvh; border: 0; border-radius: 0; }
  .artifact-wizard-header,
  .artifact-wizard-footer,
  .artifact-wizard-body { padding-left: 16px; padding-right: 16px; }
  .artifact-stepper { padding-left: 16px; padding-right: 16px; }
  .artifact-stepper strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .artifact-template-grid,
  .artifact-evidence-list,
  .artifact-form-grid { grid-template-columns: 1fr; }
  .artifact-wizard-footer { align-items: stretch; flex-direction: column; }
  .artifact-wizard-actions { width: 100%; }
  .artifact-wizard-actions button { flex: 1; }
  .artifact-history-card { align-items: flex-start; flex-direction: column; }
  .artifact-reject-form { grid-template-columns: 1fr; }
  .artifact-review-summary,
  .artifact-detail-facts { grid-template-columns: 1fr; }
  .artifact-review-summary dd,
  .artifact-detail-facts dd { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .artifact-wizard-modal *,
  .artifact-history-drawer *,
  .artifact-detail-drawer * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.artifact-provenance-details { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px 16px; font-size: 12px; }
.artifact-provenance-details dt { font-weight: 600; }
.artifact-provenance-details dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .artifact-provenance-details { grid-template-columns: minmax(0, 1fr); } }

/* Carte d'agent (décision du 25/09/2026) : « Ce que l'agent garantit » puis « Ce qu'il fait ». */
.forge-shell #agents-view .agent-card-guarantees { margin-top: 18px; }
.forge-shell #agents-view .agent-card-does { margin-top: 10px; }

/* Lot I (28/09/2026): the Torus logo, as a file, on the sign-in and
   activation cards; it replaces the gradient mark and the subtitle. */
.signed-out-brand .brand-logo {
  display: block;
  /* Lot K (G1): at least 300 px wide on a normal screen, so that the
     signature « CYBER · RISK · AI » and the points of the torus read. */
  width: min(340px, 100%);
  height: auto;
}

/* =========================================================================
   Lot N (30/09/2026, recette K+L) — the « Crème » theme chosen by
   Jean-Charles (proposal 1): the bronze and the background of K back, with
   the Jost font and the logo of L. No ink #1D1D1B and no yellow in the
   application; the bronze #4a341b on the active item, the primary actions
   (gradient #4a341b → #7a5526, cream text) and the accents. The sign-in
   screen of L does not change. Declared last: it wins over the rules above.
   ========================================================================= */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/jost-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/jost-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #fbf8f3;
  --card: #ffffff;
  --card-2: #f5efe6;
  --tx: #241e16;
  --tx-2: #4d453a;
  --tx-3: #786e60;
  --tx-4: #a89d8c;
  --line: #eae2d5;
  --line-card: #eae2d5;
  --accent: #4a341b;
  --accent-d: #5e4426;
  --accent-soft: #f4ead9;
  --accent-line: #dcc9aa;
  --accent-text: #8a6627;
  --accent-soft-ink: #6e5024;
  --brand-gradient: linear-gradient(135deg, #4a341b, #7a5526);
  --brand-gradient-hover: linear-gradient(135deg, #5e4426, #8a6230);
  --nav-bar: #4a341b;
  --forge-accent: #4a341b;
  --font-ui: 'Jost', system-ui, sans-serif;
  --font-display: 'Jost', system-ui, sans-serif;
  --sans: var(--font-ui);
  --serif: var(--font-display);
}

body { background: var(--paper); }

/* Primary actions: the bronze gradient, cream text (#fbf6ee on #4a341b 11.4:1,
   on #7a5526 6.6:1). */
.forge-shell .btn-primary,
.forge-shell .primary-action,
.forge-shell button[type="submit"]:not(.secondary-action):not(.secondary-button) {
  border-color: #4a341b;
  background: var(--brand-gradient);
  color: #fbf6ee;
}
.forge-shell .btn-primary:hover:not(:disabled),
.forge-shell .primary-action:hover:not(:disabled),
.forge-shell button[type="submit"]:not(.secondary-action):not(.secondary-button):hover:not(:disabled) {
  border-color: #5e4426;
  background: var(--brand-gradient-hover);
  color: #fbf6ee;
}
.forge-shell :focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* Sign-in (G1 and livraison 1): bronze doré, ink in dark mode; the full logo
   large enough for its signature; the sign-in button in the production
   bronze #4a341b with cream text (9.9:1). */
.signed-out-page { background: #E3D5BE; }
@media (prefers-color-scheme: dark) { .signed-out-page { background: #1D1D1B; } }
.signed-out-card { width: min(560px, calc(100vw - 32px)); }
.signed-out-brand .brand-logo { width: min(440px, 100%); }
.signed-out-button { border-color: #4a341b; background: #4a341b; color: #FFEAC8; }
.signed-out-button:hover { border-color: #5e4426; background: #5e4426; color: #FFEAC8; }

/* Lot L, livraison 3: the « Déplacer vers… » dialog. */
.document-move-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(29, 29, 27, .45); }
.document-move-dialog { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--card); color: var(--tx); border-radius: 14px; box-shadow: var(--sh-modal); padding: 1.25rem 1.4rem; display: grid; gap: .75rem; }
.document-move-dialog h2 { margin: 0; font-size: 1.2rem; }
.document-move-sub, .document-move-class { margin: 0; color: var(--tx-2); overflow-wrap: anywhere; }
.document-move-form { display: grid; gap: .75rem; }
.document-move-targets { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; display: grid; gap: .35rem; margin: 0; }
.document-move-target { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.document-move-target small { color: var(--tx-3); }
.document-move-lower { display: grid; gap: .45rem; padding: .7rem .8rem; border-radius: 10px; background: var(--warn-bg); border: 1px solid var(--warn-line); }
.document-move-lower[hidden], .document-move-warning[hidden], .document-move-reason[hidden], .document-move-lower textarea[hidden] { display: none; }
.document-move-lower-toggle { display: flex; gap: .5rem; align-items: center; font-weight: 600; }
.document-move-warning { margin: 0; color: var(--warn); font-size: .9rem; }
.document-move-lower textarea { width: 100%; }
.document-move-actions { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.document-move-status { margin: 0; }
.forge-shell .document-error-line { display: block; margin-top: .2rem; color: var(--err); font-size: .82rem; overflow-wrap: anywhere; }
.document-move-lower-toggle[hidden] { display: none; }

/* Lot L (actions groupées, 30/09/2026): the selection column and the bar. */
.forge-shell .documents-card .documents-select-cell { width: 1.25rem; padding-inline: 0; text-align: center; }
.forge-shell .documents-bulk-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .75rem; margin: 0 0 .75rem; padding: .6rem .8rem; border: 1px solid var(--accent-line); border-radius: 10px; background: var(--accent-soft); }
.forge-shell .documents-bulk-count { align-self: center; margin-right: .25rem; }
.forge-shell .documents-bulk-field { display: grid; gap: .15rem; font-size: .82rem; }
.forge-shell .documents-bulk-status { flex-basis: 100%; margin: 0; }
.forge-shell .documents-bulk-status:empty { display: none; }

/* Lot N (30/09/2026, recette K+L KL-15, presentation d): « Déplacer vers… » —
   one line per base, left-aligned, the class as a chip on the right, grouped. */
.document-move-targets { gap: .15rem; padding: .5rem .6rem; }
.document-move-filter { width: 100%; margin: .25rem 0 .35rem; }
.document-move-group { display: grid; }
.document-move-group[hidden] { display: none; }
.document-move-group + .document-move-group { margin-top: .5rem; }
.document-move-group-title { margin: 0; padding: .3rem .4rem; color: var(--accent-text); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.document-move-target { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: .6rem; align-items: center; flex-wrap: nowrap; padding: .45rem .5rem; border-radius: 9px; text-align: left; cursor: pointer; }
.document-move-target[hidden] { display: none; }
.document-move-target + .document-move-target { border-top: 1px solid var(--line); }
.document-move-target:hover { background: var(--card-2); }
.document-move-target.is-selected { background: var(--accent-soft); outline: 1px solid var(--accent-line); }
.document-move-target input { margin: 0; accent-color: var(--accent); }
.document-move-target-name { min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.document-move-target .document-move-target-class { padding: .05rem .55rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card-2); color: var(--tx-2); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.document-move-target-class.is-public { border-color: var(--mode-general-line); background: var(--mode-general-soft); color: var(--mode-general); }
.document-move-target-class.is-interne { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-soft-ink); }
.document-move-target-class.is-confidentiel, .document-move-target-class.is-secret { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
