/* Relay rd1 production additions on top of the approved prototype CSS (tokens.css + relay.css).
   Only classes; no inline styles anywhere. */

/* ---- shell ------------------------------------------------------------- */
.offline-bar { padding: var(--space-3) var(--space-7) 0; }
.env.is-staging { color: #F5B54A; } /* rd2: rail is always navy, so a fixed amber (not the light-theme token) */
.env.is-staging .ldot { background: #F5B54A; box-shadow: 0 0 0 3px rgba(245,181,74,0.18); }
.conn-chip.is-bad { box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 1px var(--danger-line); }
.conn-chip.is-warn { box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 1px var(--warning-line); }
.conn-chip span:last-child { color: var(--ink-3); }
.route:focus { outline: none; }
#view:focus { outline: none; }

/* ---- forms ------------------------------------------------------------- */
.textarea { height: auto; min-height: 96px; padding-top: 10px; padding-bottom: 10px; resize: vertical; line-height: 1.5; }
.select-auto { width: auto; min-width: 160px; }
.form-btn { align-self: flex-end; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: var(--space-2); }
.lookup-form .input-group { min-width: 0; }

/* ---- toolbars ---------------------------------------------------------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.toolbar-2 { justify-content: flex-start; margin-bottom: var(--space-4); }
.toolbar-2 .input-group { max-width: 520px; }
.seg-labelled { align-items: center; }
.seg-labelled .seg-label { padding: 0 8px 0 10px; }
.act-search { width: min(360px, 100%); }

/* ---- inbox ------------------------------------------------------------- */
.inbox-table td { vertical-align: top; }
.inbox-table .cell-title { display: -webkit-box; }
.board.board-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.owner-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-pick { position: relative; display: inline-flex; }
.owner-pick.open { z-index: 30; }
.menu-opt.is-current .mo-name { font-weight: var(--weight-semibold); }

/* ---- case detail ------------------------------------------------------- */
.sys-text { color: var(--ink-2); margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble { white-space: pre-wrap; overflow-wrap: anywhere; }
.other-case { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-2); color: var(--ink); }
.other-case:hover { text-decoration: none; color: var(--accent); }
.link-proof span { min-width: 0; }
.expired-review-link { text-decoration: line-through; color: var(--ink-3); }
.external-link { overflow-wrap: anywhere; }
.case-head .actions { align-self: flex-start; margin-top: var(--space-3); }
/* rd5 (UI/UX): the meta row never uses dot separators (spacing only), so no line starts or ends with a stray
   bullet at any width. */
.case-head .meta-row { column-gap: 16px; row-gap: 6px; }
.case-head .meta-row .sep { display: none; }
/* rd6 (PO): at every width the title block keeps at least ~600px or the actions wrap to their own row, and a long
   title may use three lines instead of being clipped at two (fixes clipping at 1361+ px with four actions). */
.case-head { flex-wrap: wrap; row-gap: var(--space-3); }
.case-head > .grow { flex: 1 1 600px; min-width: 0; }
.case-head .actions { flex: 0 0 auto; }
.case-head .case-title.clamp-2 { -webkit-line-clamp: 3; }

/* ---- details / technical ---------------------------------------------- */
details.tech > summary, details.tech-inline > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: var(--text-xs); }
details.tech > summary::-webkit-details-marker, details.tech-inline > summary::-webkit-details-marker { display: none; }
details.tech[open] > summary .ico { transform: rotate(90deg); }
details.tech-inline pre { margin-top: 6px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--divider); font-size: var(--text-2xs); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 520px; }

/* ---- toasts ------------------------------------------------------------ */
.toast.toast-error .ico { color: #FF8A8A; filter: none; }

/* ---- native dialog (create case) -------------------------------------- */
dialog.modal-dialog { border: 0; padding: 0; background: transparent; color: inherit; max-width: min(560px, calc(100vw - 32px)); width: 100%; overflow: visible; }
dialog.modal-dialog::backdrop { background: rgba(5, 11, 38, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog.modal-dialog .modal { width: 100%; max-width: none; }
[data-transparency="reduced"] dialog.modal-dialog::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(5, 11, 38, 0.78); }

/* ---- legacy section content inside the new shell ------------------------ */
.status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: var(--text-xs); font-weight: var(--weight-semibold); background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--border); }
.status.status-ready { background: var(--success-soft); color: var(--success); border-color: var(--success-line); }
.moniic-actions .btn[disabled] { opacity: 0.55; }
.invite-url { overflow-wrap: anywhere; font-size: var(--text-xs); }
.invite-url:empty { display: none; }
.member-list .member-row { padding: 12px var(--space-5); }
.member-empty { padding: 12px var(--space-5); }
.email-facts { grid-template-columns: 180px 1fr; }
.steps-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); counter-reset: s; }
.steps-list li { display: grid; grid-template-columns: 28px 1fr; gap: 2px 10px; counter-increment: s; }
.steps-list li::before { content: counter(s); grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: var(--text-xs); font-weight: var(--weight-semibold); background: var(--accent-soft); color: var(--accent); }
.steps-list li span { color: var(--ink-2); font-size: var(--text-sm); }
.chauffeur-card .hub-name { font-size: var(--text-xl); }
.doc-table th, .doc-table td { font-size: var(--text-xs); }
.chauffeur-actions-frame { width: 100%; min-height: 720px; border: 1px solid var(--border); border-radius: var(--radius-lg); margin-top: var(--space-3); background: var(--surface); }
#chauffeur-result:empty { display: none; }
.lookup .banner { margin-top: var(--space-3); }

/* ---- planned + in-app 404 --------------------------------------------- */
.nf.nf-inline { min-height: 60vh; }

/* ---- reduce transparency: make the glass shell fully solid ------------- */
[data-transparency="reduced"] .rail,
[data-transparency="reduced"] .topbar,
[data-transparency="reduced"] .menu,
[data-transparency="reduced"] .palette,
[data-transparency="reduced"] .modal,
[data-transparency="reduced"] .toast { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

@media (max-width: 1100px) {
  .board.board-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .email-facts { grid-template-columns: 1fr; }
}
details.tech.card { padding: 14px var(--space-5); }

/* ==== rd2 (20261006-rd2): QA fix round ==================================== */
/* P1-3: programmatic focus on the view after a route change must not paint a frame */
#view:focus, #view:focus-visible, .route:focus-visible { box-shadow: none; outline: none; }
/* P1-4 (rd3 B1): SOON/SIM chip on the active pill: dark tint keeps white text >= 6:1 on the whole gradient */
.nav a[aria-current] .soon { color: #fff; border-color: rgba(255,255,255,.45); background: rgba(10,8,40,.18); }
/* P1-1: suggested next step */
.slot { display: contents; }
.card.suggest .overline { color: var(--accent-soft-ink); }
/* P1-2: saved views */
.chip-saved { display: inline-flex; align-items: center; }
.chip-saved .chip { border-top-right-radius: 0; border-bottom-right-radius: 0; padding-right: 10px; }
.chip-x { display: inline-grid; place-items: center; height: 32px; width: 30px; padding: 0; cursor: pointer; color: var(--ink-3);
  border: 1px solid var(--glass-edge); border-left: 0; border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  background: var(--sheen), var(--surface); box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 1px var(--border); }
.chip-x:hover { color: var(--danger); }
.chip-x:focus-visible { box-shadow: var(--focus-ring); }
/* P2-6: owner menu opens upward near the bottom of the window */
.owner-menu.up { top: auto; bottom: calc(100% + 8px); transform-origin: bottom left; }
.owner-pick.mini .owner-menu.up { transform-origin: bottom right; }
.owner-menu.end { left: auto; right: 0; transform-origin: top right; }
.owner-menu.end.up { transform-origin: bottom right; }
/* P2-7: board card ring follows the card link only, not the open owner menu */
.kcard:has(.kcard-link:focus-visible) { box-shadow: var(--focus-ring); }
/* P2-5: merged owner changes */
.owner-group .sys-text a { color: var(--ink-link); }
/* P2-8: smaller laptops */
.conn-chip { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 1100px) and (min-width: 961px) {
  .app { grid-template-columns: 76px minmax(0, 1fr); }
  .rail { padding: var(--space-4) 10px; }
  .brand { align-items: center; padding: 4px 0 14px; gap: 0; }
  .brand-logo, .brand-sub { display: none; }
  .brand-word { font-size: 15px; }
  .nav a { justify-content: center; width: 48px; height: 40px; padding: 0; margin: 0 auto; }
  .nav .nav-text, .nav .soon, .env #env-text, .me .who { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav .count { position: absolute; top: 1px; right: -4px; margin: 0; min-width: 18px; height: 17px; padding: 0 4px; }
  .nav-label { font-size: 0; padding: 10px 0 4px; }
  .nav-label::after { content: ""; display: block; height: 1px; margin: 0 10px; background: var(--rail-border); }
  .env { justify-content: center; padding: 0; }
  .me { flex-direction: column; padding: 6px 0; }
  #conn-sub { display: none; }
}

/* p2a3: Moniic connection card. One inline message (no duplicate error box); tone on the icon, text stays ink for AA. */
.conn-msg { display: flex; align-items: flex-start; gap: 10px; }
.conn-msg .conn-lead { color: var(--ink); font-weight: var(--weight-semibold); }
.conn-msg-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--border); }
.conn-msg.is-warning .conn-msg-ico { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-line); }
.conn-msg.is-danger .conn-msg-ico { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.conn-dl dd { color: var(--ink); }
.conn-form-err { color: var(--danger); font-weight: var(--weight-semibold); }
/* p2a3: a held button shows a countdown people need to read, so it keeps readable text (AA) while still looking unavailable */
.moniic-setup .btn[aria-disabled="true"], #hub-reload[aria-disabled="true"] { color: var(--ink-2); }
