/* per-page polish: system-instructions */

/* -- Page heading: CANON sec 10  -  h1 = 28 / 660 / -.025em. Override proto's
   31px inline. ── */
.shell .main .head .h1 {
  font-size: 28px !important;
  font-weight: 660 !important;
  letter-spacing: -.025em !important;
  line-height: 1.12 !important;
}
.shell .main .head p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-mute);
  margin-top: 5px;
  max-width: 56ch;
}

/* ── Stack banner (info box): cleaner ── */
.shell .main .rise.r2 > div[style*="border:1px solid var(--accent-line)"] {
  border-radius: var(--r-lg);
  padding: 14px 18px;
}

/* ── Panel cards (system instruction content) ── */
.shell .main .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-3);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  /* 2G: wrap so the "vN . active" chip (.pm) never overlaps the path
     (.pt) when the row is tight; .pm drops to its own line cleanly. */
  flex-wrap: wrap;
  gap: 4px 12px;
}
.shell .main .panel-head .pt {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}
.shell .main .panel-head .pm {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-mute);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Instruction body text: uniform 22px padding (canon spacing scale). ── */
.shell .main #pnlWs > div,
.shell .main #pnlAcc > div {
  padding: 22px !important;
}
.shell .main #pnlWs p,
.shell .main #pnlAcc p {
  font-size: 13.5px !important;
  line-height: 1.65 !important;
  color: var(--ink-soft) !important;
}
.shell .main #pnlWs p[style*="font-weight:600"],
.shell .main #pnlAcc p[style*="font-weight:600"] {
  color: var(--ink) !important;
  margin-top: 16px !important;
  margin-bottom: 5px !important;
  font-size: 12.5px !important;
  text-transform: uppercase;
  letter-spacing: .12em; /* CANON sec 10 eyebrow tracking */
  font-family: var(--font-mono);
}

/* ── Per-agent overrides details/summary ── */
.shell .main details {
  border-color: var(--line) !important;
  border-radius: var(--r-lg) !important;
  background: var(--surface-3) !important;
  margin-top: 16px;
}
.shell .main details summary {
  padding: 13px 18px !important;
  font-size: 13px !important;
  font-weight: 560 !important;
  color: var(--ink) !important;
  user-select: none;
}
.shell .main details summary:hover {
  color: var(--accent);
}
/* agent override rows */
.shell .main details > div > div[style*="border-top"] {
  border-color: var(--line-soft) !important;
}
.shell .main details > div p {
  font-size: 11.5px !important;
  color: var(--ink-mute) !important;
}

/* ── Rail sidebar cards ── */
.shell .main aside > .card {
  padding: 14px 16px !important;
}
.shell .main aside .card h4 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .12em; /* CANON sec 10 eyebrow tracking */
  color: var(--ink-mute);
  font-weight: 500;
  margin-bottom: 12px;
}
.shell .main aside .card .cmd {
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-2)) !important;
  border: 1px solid var(--accent-line) !important;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  padding: 9px 11px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.shell .main aside .card .cmd .pr {
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}
/* 2G: in the 290px aside the long `floom instruction pull ...`
   command wrapped, orphaning the `$` prompt on its own line. Keep
   the command on ONE line attached to `$` and let the .cmd scroll
   horizontally (overflow-x:auto above) instead of wrapping. */
.shell .main aside .card .cmd #pullCmd,
.shell .main aside .card .cmd > span[style*="flex:1"] {
  white-space: nowrap !important;
  overflow: visible;
}
.shell .main aside .card .cmd .cp {
  margin-left: auto;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-mute);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 2px 7px;
  cursor: pointer;
}
.shell .main aside .card .cmd .cp:hover {
  color: var(--accent);
  border-color: var(--accent-line);
}

/* ── Version list in rail card: better density ── */
.shell .main aside .card .badge-accent {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 1px 6px;
  display: inline-block;
}
.shell .main aside .card .badge {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink-mute);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 1px 6px;
  display: inline-block;
}

/* Sidebar active item: canonical treatment lives in space-ds.css
   (D4 ,  one consistent restrained active state across all pages).
   The old per-page accent left-border was the inconsistency. */

/* ── Mobile: single col layout ── */
@media (max-width: 900px) {
  .shell .main {
    padding: 20px 16px 60px;
  }
  .shell .main .head {
    flex-direction: column;
    gap: 14px;
  }
  /* Hide rail on mobile */
  .shell .main .rise.r2 > div > aside,
  .shell .main .rise.r2 > aside {
    display: none !important;
  }
  .shell .main .rise.r2 > div,
  .shell .main .rise.r2[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}
