/* ============================================================
   07 — Professional · "Operations Console"
   Dark instrument panel. Mono labels, dense rows, cyan accent.
   ============================================================ */

@font-face {
  font-family: "JetBrains Mono";
  src: url("/onboarding/after/demos/product-ready-20261106/community/assets/fonts/JetBrainsMono-Variable.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #0F1729;
  --panel: #16203A;
  --panel-2: #1D2947;
  --hairline: #27324F;
  --ink: #E6ECF7;
  --muted: #8898B8;
  --accent: #46E5D0;
  --accent-dim: #1F6E66;
  --warn: #FFB454;

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

/* The UA's `[hidden] { display: none }` loses to any author `display` rule
   below, and every demo here toggles `element.hidden` to show and hide
   panels. Without this, hiding silently stops working. */
[hidden] { display: none !important; }

/* A long unbroken token -- a pasted URL, a 200-character "word" -- must wrap
   rather than push its container past its grid track and break the row.
   `anywhere` rather than `break-word` on purpose: only `anywhere` reduces the
   element's min-content width, and a grid or flex item defaults to
   `min-width: auto`, which refuses to shrink below its longest word. With
   `break-word` alone, demo-06 and demo-10 still blew 1.4k px past the viewport.
   The `min-width: 0` below is the other half of the same fix. */
h1, h2, h3, h4, p, li, a, span, strong, em, code, label, time,
button, input, textarea { overflow-wrap: anywhere; }
.card, .post, .listing, .idea, .topic, .question, .profile-card, .submission,
.lesson, .resource, .nominee, .archive-item, .member-card, .comment, .reply,
.answer, .idea-body-wrap { min-width: 0; }


body {
  margin: 0;
  padding-block-end: 104px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
}

.wrap { max-width: 1060px; margin-inline: auto; padding: 0 20px; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.topbar {
  padding-block: clamp(32px, 5vw, 56px) 20px;
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: flex-end;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 22px;
}
.topbar h1 {
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(22px, 2.8vw, 31px); line-height: 1.2;
  letter-spacing: -0.03em;
}
.topbar > div > p { color: var(--muted); max-width: 58ch; margin-top: 10px; font-size: 14px; }

.identity-picker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.identity-picker select {
  font: inherit; font-size: 13px; letter-spacing: 0; text-transform: none;
  margin-left: 6px; min-height: 44px; padding: 9px 12px;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--hairline); border-radius: 7px;
}

/* ---------- Tabs (left rail on wide screens) ---------- */

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.tab {
  position: relative;
  font-family: var(--mono); font-size: 12px; font-weight: 700; cursor: pointer;
  letter-spacing: 0.09em; text-transform: uppercase;
  min-height: 44px; padding: 12px 18px;
  background: var(--panel); color: var(--muted);
  border: 1px solid var(--hairline); border-radius: 7px;
  transition: color 140ms ease, border-color 140ms ease;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--bg); background: var(--accent); border-color: var(--accent); }

@media (min-width: 900px) {
  /* No grid here. An earlier version declared `grid-template-columns: 11.5rem 1fr`
     for a left rail, but every child spanned `1 / -1`, so the rail track existed
     with nothing in it and the layout was identical to normal flow. The sticky
     tab bar is the part that was actually doing work. */
  .tabs { position: sticky; top: 0; z-index: 20; background: var(--bg); padding-block: 8px; }
}

/* ---------- Directory ---------- */

.member-grid {
  list-style: none; margin: 0 0 20px; padding: 0;
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.member-card {
  display: block;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 16px 18px;
  color: inherit;
  font: inherit;
  text-align: left;
  appearance: none;
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease;
}
.member-card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.member-card.is-selected { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.member-name { display: block; font-family: var(--mono); font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.member-title { display: block; font-size: 13px; color: var(--muted); margin: 0; }

.activity-panel {
  background: var(--panel-2);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 20px 22px;
}
.activity-panel h3 { font-family: var(--mono); font-size: 13px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.activity-panel ul { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.activity-panel li { font-size: 14px; padding-left: 14px; border-left: 1px solid var(--hairline); }
.activity-panel h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; font-weight: 700; }

/* ---------- Forms ---------- */

.new-form {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 22px;
}
.new-form h2 { font-family: var(--mono); font-size: 13px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; font-weight: 700; }

.field { display: block; margin-bottom: 14px; }
.field label { font-family: var(--mono); display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--hairline);
  border-radius: 7px; padding: 11px 13px; min-height: 44px;
}
.field textarea { resize: vertical; min-height: 5rem; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }

.btn {
  font-family: var(--mono); font-size: 13px; font-weight: 700; cursor: pointer;
  letter-spacing: 0.06em;
  min-height: 44px; padding: 12px 22px;
  background: var(--accent); color: var(--bg);
  border: 0; border-radius: 7px;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -14px var(--accent); }

.btn-ghost {
  font-family: var(--mono); font-size: 12px; cursor: pointer;
  letter-spacing: 0.06em;
  min-height: 44px; padding: 10px 15px;
  background: transparent; color: var(--muted);
  border: 1px solid var(--hairline); border-radius: 7px;
}
.btn-ghost:hover { color: var(--accent); border-color: var(--accent-dim); }

/* ---------- Topics + resources ---------- */

.topic-list, .resource-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.topic, .resource {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 18px 20px;
  transition: border-color 140ms ease;
}
.topic:hover, .resource:hover { border-color: var(--accent-dim); }

.topic-title, .resource-title { font-size: 17px; line-height: 1.35; margin-bottom: 8px; }
.resource-title a { text-decoration: none; }
.resource-title a:hover { text-decoration: underline; }

.topic-meta, .resource-meta {
  font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.05em; color: var(--muted); margin-top: 12px;
}
.topic-meta strong, .resource-meta strong { color: var(--ink); font-weight: 700; }

.topic > .btn-ghost { margin-top: 12px; }

.replies { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.replies:empty { margin: 0; }
.reply {
  background: var(--bg);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  border-left: 2px solid var(--accent-dim);
}
.reply-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 4px; }
.reply-meta strong { color: var(--ink); font-weight: 700; }
.reply-body { margin: 0; }

/* ---------- Reply panel ---------- */

.new-comment {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
  background: var(--panel-2);
  border-top: 1px solid var(--accent-dim);
  padding: 16px 20px;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
}
.reply-panel-body { flex: 1 1 18rem; }
.new-comment textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--hairline);
  border-radius: 7px; padding: 10px 12px; min-height: 44px; resize: vertical;
}

/* ---------- Toasts ---------- */

.toast-stack { position: fixed; right: 16px; bottom: 116px; display: grid; gap: 8px; z-index: 50; }
.toast {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--accent-dim);
  border-radius: 8px; padding: 12px 16px;
  box-shadow: 0 16px 34px -18px rgba(0,0,0,0.9);
}
.toast.error { border-color: #A5423B; color: var(--warn); }

/* ---------- Motion ---------- */

.motion .member-card, .motion .topic, .motion .resource { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .motion .member-card, .motion .topic, .motion .resource { opacity: 1 !important; transform: none !important; }
  .btn, .tab, .member-card, .topic, .resource { transition: none !important; }
}

/* ---------- Console telemetry strip ---------- */
/* The Directory tab was six small cards over two-thirds of empty dark screen.
   A console should look instrumented: real counts, read from the DOM, plus a
   per-member activity bar so the fold carries information. */

.console-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 22px;
}
@media (min-width: 860px) {
  .console-strip { grid-template-columns: repeat(4, 7.5rem) minmax(0, 1fr); }
}
.stat-cell {
  background: var(--panel);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0;
}
.stat-k {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.stat-v {
  font-family: var(--mono); font-size: 30px; font-weight: 700; line-height: 1;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.stat-wide { justify-content: space-between; }

.spark { display: flex; align-items: flex-end; gap: 9px; height: 46px; }
.spark span {
  flex: 0 0 14px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
  border-radius: 2px 2px 0 0;
  position: relative;
}
.spark span::after {
  content: attr(data-who);
  position: absolute; left: 50%; top: calc(100% + 5px);
  transform: translateX(-50%);
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
  white-space: nowrap;                 /* 14px bars wrapped "ALI" to two lines */
}
.stat-wide { padding-bottom: 26px; }
/* The activity panel is the whole point of this demo, so it opens on load
   with the first member selected rather than waiting for a click on an
   otherwise-empty screen. */
.activity-panel { margin-top: 18px; }

/* Monogram + tally turn a name into a record. */
.member-card { position: relative; padding-left: 62px; }
.member-card::before {
  content: attr(data-initial);
  position: absolute; left: 16px; top: 16px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--accent-dim); color: var(--accent);
  font-family: var(--mono); font-size: 13px; font-weight: 700;
}
.member-activity {
  display: block;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin: 8px 0 0;
}
.member-activity b { color: var(--accent); font-weight: 700; }

.quality-search{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin:20px 0}.quality-search label{flex:1;min-width:180px;display:grid;gap:8px;font:inherit;font-size:14px;letter-spacing:0;text-transform:none}.quality-search input{min-height:44px;width:100%;font:inherit;font-size:16px;border:1px solid #667e88;border-radius:6px;padding:10px 12px;color:var(--text,#e4edf0);background:transparent}.quality-search button{min-height:44px;border:1px solid #667e88;border-radius:6px;padding:10px 16px;background:transparent;color:inherit;font:inherit;font-size:14px}.quality-search p{flex-basis:100%;margin:0;font-size:14px}.tab:focus-visible,.member-card:focus-visible{outline:2px solid currentColor;outline-offset:4px}.tab-panel [hidden]{display:none!important}@media(max-width:650px){.quality-search label{flex-basis:100%}.tabs{overflow:auto}.tab{min-height:44px;white-space:nowrap}}

/* Telemetry labels stay readable; the graph spans the mobile rows. */
.stat-k{white-space:nowrap;overflow-wrap:normal;word-break:normal}@media(max-width:520px){.console-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-wide{grid-column:1/-1}}
