/* ============================================================================
 * DiSilence OS — brand polish layer (loads after keystone.css)
 * "Composed from Silence": condensed display type, bone ink, ONE amber signal.
 * Scoped to [data-tenant="disilence"] so it only ever styles our own tenant.
 * Status doctrine: --ok pass · --bad veto · --warn is THE amber signal ·
 * --info stays neutral · categorical chips stay muted — no second accent hue.
 * ==========================================================================*/
:root[data-tenant="disilence"] {
  --ok: #7bd9a0;
  --bad: #e4584e;
  --warn: #f2a03d;
  --info: #9aa3ad;
}

:root[data-tenant="disilence"] h1,
:root[data-tenant="disilence"] h2,
:root[data-tenant="disilence"] h3,
:root[data-tenant="disilence"] .view-head h2,
:root[data-tenant="disilence"] #loginTitle,
:root[data-tenant="disilence"] .brand .name b {
  font-family: "Archivo", var(--sans);
  font-weight: 800;
  letter-spacing: -.015em;
}

/* KPI values + spec lines lean on the mono "system voice" */
:root[data-tenant="disilence"] .kpi .val { letter-spacing: -.01em; }

/* The login + rail mark chip: let the SVG breathe on a near-black tile rather
 * than the default brand-gradient fill (our mark carries its own amber signal —
 * a gradient tile is the same pattern that camouflaged the Solid lion). */
:root[data-tenant="disilence"] #loginLogo,
:root[data-tenant="disilence"] #railMark {
  background: #0a0b0d !important;
  border: 1px solid var(--line-2);
  box-shadow: 0 0 0 1px rgba(242,160,61,.12), 0 8px 24px rgba(0,0,0,.5);
  overflow: hidden;
}
:root[data-tenant="disilence"] #loginLogo img,
:root[data-tenant="disilence"] #railMark img { width: 100%; height: 100%; object-fit: cover; }

/* Date inputs: the native calendar glyph is near-invisible on the dark theme.
 * color-scheme lets the picker itself render dark; the indicator gets lifted. */
:root[data-tenant="disilence"] input[type="date"] { color-scheme: dark; }
:root[data-tenant="disilence"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(.8);
  opacity: .85;
  cursor: pointer;
}

/* Signal accent: a hairline amber underline motif on view heads */
:root[data-tenant="disilence"] .view-head h2::after {
  content: "";
  display: block;
  width: 34px; height: 2px;
  margin-top: 8px;
  background: var(--brand);
  box-shadow: 0 0 12px rgba(242,160,61,.45);
}

/* env chip reads as a quiet mono tag, on-brand */
:root[data-tenant="disilence"] #envTag {
  font-family: var(--mono);
  letter-spacing: .12em;
}

/* Signal-dot helper for inline "system speaking" accents in module bodies */
:root[data-tenant="disilence"] .sig-dot {
  display: inline-block; width: .5em; height: .5em; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 10px rgba(242,160,61,.5);
  vertical-align: middle; margin-right: .45em;
}

/* Autonomous-activity feed (home) — one row per decision, clean two-line layout */
:root[data-tenant="disilence"] .actlist { display: flex; flex-direction: column; gap: 2px; }
:root[data-tenant="disilence"] .act-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
:root[data-tenant="disilence"] .act-row:last-child { border-bottom: 0; }
:root[data-tenant="disilence"] .act-row > span { color: var(--txt); }
:root[data-tenant="disilence"] .act-row small { color: var(--txt-3); white-space: nowrap; font-family: var(--mono); font-size: 11px; }

/* Role list (admin) + key/value rows in drills + cards */
:root[data-tenant="disilence"] .rolelist { display: flex; flex-direction: column; }
:root[data-tenant="disilence"] .kv {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
:root[data-tenant="disilence"] .kv:last-child { border-bottom: 0; }
:root[data-tenant="disilence"] .kv > b { color: var(--txt-2); font-weight: 500; flex: none; }
:root[data-tenant="disilence"] .kv > span { color: var(--txt); text-align: right; }

/* Inline record links inside kv rows / cells */
:root[data-tenant="disilence"] .lnk { color: var(--brand-2); cursor: pointer; }
:root[data-tenant="disilence"] .lnk:hover { text-decoration: underline; }

/* ---- Kanban stage board (pipeline) --------------------------------------- */
:root[data-tenant="disilence"] .kb-q { max-width: 320px; margin-bottom: 10px; }
:root[data-tenant="disilence"] .kb-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(148px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
:root[data-tenant="disilence"] .kb-col {
  background: var(--panel-2, rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  min-height: 120px;
}
:root[data-tenant="disilence"] .kb-col.kb-over {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(242,160,61,.35) inset;
}
:root[data-tenant="disilence"] .kb-h {
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--txt-3); margin-bottom: 8px;
}
:root[data-tenant="disilence"] .kb-h .mono { font-weight: 400; }
:root[data-tenant="disilence"] .kb-card {
  display: flex; flex-direction: column; gap: 2px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel, rgba(255,255,255,.03));
  padding: 8px 9px; margin-bottom: 7px;
  cursor: grab; font-size: 12px;
}
:root[data-tenant="disilence"] .kb-card:active { cursor: grabbing; }
:root[data-tenant="disilence"] .kb-card b { font-size: 12px; line-height: 1.3; }
:root[data-tenant="disilence"] .kb-card small { color: var(--txt-3); font-size: 10.5px; }
:root[data-tenant="disilence"] .kb-card .mono { color: var(--txt-2); font-size: 11px; }
:root[data-tenant="disilence"] .kb-more { color: var(--txt-3); font-size: 11px; padding: 4px 2px; }

/* ---- 14-day calendar (command home) -------------------------------------- */
:root[data-tenant="disilence"] .cal-day { padding: 6px 0; border-bottom: 1px solid var(--line); }
:root[data-tenant="disilence"] .cal-day:last-child { border-bottom: 0; }
:root[data-tenant="disilence"] .cal-date {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--txt-3);
  margin-bottom: 4px;
}
:root[data-tenant="disilence"] .cal-date.late { color: var(--bad); }
:root[data-tenant="disilence"] .cal-item {
  padding: 4px 6px; margin: 2px 0; border-radius: 6px;
  font-size: 12.5px; cursor: pointer;
}
:root[data-tenant="disilence"] .cal-item:hover { background: rgba(255,255,255,.04); }

/* ---- Deliverables checklist (engagement drill) --------------------------- */
:root[data-tenant="disilence"] .dl-row input[type="checkbox"] { accent-color: var(--brand); }
