/* Econect HQ. Brand blue #1DA1F2; light and dark follow the computer. */
:root {
  --brand: #1DA1F2;
  --brand-ink: #0B7BC0;
  --brand-soft: rgba(29, 161, 242, 0.12);
  --bg: #F4F7FA;
  --surface: #FFFFFF;
  --raised: #F8FAFC;
  --line: #E3E9EF;
  --text: #0F1419;
  --muted: #5B7083;
  --good: #00BA7C;
  --warn: #E5A21A;
  --bad: #E0245E;
  --bad-soft: rgba(224, 36, 94, 0.1);
  --shadow: 0 1px 2px rgba(15, 20, 25, 0.04), 0 8px 24px rgba(15, 20, 25, 0.06);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand-ink: #4DB5F5;
    --brand-soft: rgba(29, 161, 242, 0.16);
    --bg: #0B0F14;
    --surface: #131A21;
    --raised: #18212A;
    --line: #243140;
    --text: #E7EDF2;
    --muted: #8B9AA8;
    --bad-soft: rgba(224, 36, 94, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* Sign-in steps */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow); padding: 32px 28px;
  animation: rise 0.35s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; }
.brand img { width: 52px; height: 52px; }
.wordmark { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.wordmark .eco { color: var(--brand); }
.wordmark .hq {
  margin-left: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; vertical-align: 3px;
  padding: 3px 7px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-ink);
}
.card h1 { font-size: 19px; margin: 0 0 4px; text-align: center; }
.card .lead { margin: 0 0 22px; color: var(--muted); text-align: center; font-size: 14px; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--raised); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.code-input { text-align: center; font-size: 26px !important; letter-spacing: 0.4em; font-variant-numeric: tabular-nums; }
.btn {
  width: 100%; border: 0; border-radius: 10px; padding: 12px 16px; font-weight: 600; cursor: pointer;
  background: var(--brand); color: #fff; transition: filter 0.15s, opacity 0.15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.55; cursor: default; filter: none; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); width: auto; padding: 8px 14px; }
.btn.ghost:hover { color: var(--text); }
.btn.danger { background: var(--bad-soft); color: var(--bad); width: auto; padding: 8px 14px; }
.link { background: none; border: 0; color: var(--brand-ink); cursor: pointer; padding: 0; font-weight: 600; }
.note { margin-top: 14px; font-size: 13px; color: var(--muted); text-align: center; }
.error {
  margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--bad-soft); color: var(--bad);
  font-size: 14px;
}
.captcha { display: flex; justify-content: center; min-height: 0; margin-bottom: 14px; }
.qr { display: grid; place-items: center; margin: 4px 0 16px; }
.qr img { width: 184px; height: 184px; background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--line); }
.steps { margin: 0 0 18px; padding-left: 20px; color: var(--muted); font-size: 14px; }
.steps li { margin-bottom: 4px; }
.secret {
  display: block; margin: -6px 0 16px; text-align: center; font: 13px/1.4 Consolas, "SF Mono", monospace;
  color: var(--muted); word-break: break-all; user-select: all;
}

/* The console (H8): a grouped menu on the left; on phones a top bar and a
   menu that slides in. */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.topbar, .scrim, .side .menu-close { display: none; }
.side {
  background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px 14px; display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-top { display: flex; align-items: center; justify-content: space-between; }
.side .wordmark, .topbar .wordmark { font-size: 18px; padding: 0 8px; display: flex; align-items: center; gap: 8px; }
.side .wordmark img, .topbar .wordmark img { width: 28px; height: 28px; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent;
  background: none; color: var(--muted); cursor: pointer; transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--raised); color: var(--text); }
.icon-btn:focus-visible, .nav button:focus-visible, .search-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.search-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--raised); color: var(--muted); font-size: 14px; transition: border-color 0.15s;
}
.search-btn:hover { border-color: var(--brand); color: var(--text); }
.search-btn span { margin-right: auto; }
kbd {
  font: 600 11px/1 "Segoe UI", system-ui, sans-serif; padding: 3px 6px; border-radius: 6px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-bottom-width: 2px;
}
.nav { display: flex; flex-direction: column; gap: 14px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-heading { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0 10px 4px; opacity: 0.8; }
.nav button {
  position: relative; display: flex; align-items: center; gap: 10px; text-align: left;
  background: none; border: 0; border-radius: 9px; padding: 8px 10px; cursor: pointer; color: var(--muted); font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav button .nav-label { flex: 1; min-width: 0; }
.nav button:hover { background: var(--raised); color: var(--text); }
.nav button[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.nav button[aria-current="page"]::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand);
  animation: grow 0.2s ease-out both;
}
@keyframes grow { from { transform: scaleY(0); } to { transform: none; } }
.side .me { margin-top: auto; padding: 12px 4px 0 8px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.me-who { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 12px; color: var(--muted); }
.me-who strong { display: block; color: var(--text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-who .avatar { width: 32px; height: 32px; font-size: 12px; flex: none; }

.page { padding: 28px 32px 48px; max-width: 1120px; width: 100%; outline: none; }
.page.enter { animation: page-in 0.28s ease-out both; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Loading shapes */
.skeleton .panel { margin-bottom: 16px; }
.sk {
  height: 12px; border-radius: 6px; margin: 10px 0; background: linear-gradient(90deg, var(--raised) 0%, var(--line) 50%, var(--raised) 100%);
  background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite;
}
.sk-big { height: 26px; margin: 14px 0; }
.sk-head { height: 16px; margin-bottom: 18px; }
.sk-chart { height: 200px; border-radius: 12px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.failed { text-align: center; padding: 32px 20px; }
.failed strong { display: block; font-size: 16px; }
.failed p { margin: 4px 0 14px; color: var(--muted); }

/* Dialogs: search and the fresh-code check */
.backdrop {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: start center; padding: 12vh 16px 16px;
  background: rgba(8, 12, 16, 0.45); backdrop-filter: blur(3px); animation: fade-in 0.16s ease-out both;
}
.backdrop.leaving { animation: fade-out 0.16s ease-in both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
.dialog {
  width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28); padding: 22px; animation: pop-in 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.dialog:has(.palette) { max-width: 560px; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: none; } }
.dialog h3 { margin: 0 0 4px; font-size: 17px; text-align: center; }
.dialog .sub { text-align: center; margin: 0 0 16px; }
.step-up-icon { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.cancel-link { display: block; margin: 12px auto 0; color: var(--muted); }
.palette-search { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-input { flex: 1; border: 0; outline: none; background: none; font-size: 16px; color: var(--text); }
.palette-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px;
  background: none; cursor: pointer; text-align: left; color: var(--text);
}
.palette-item[aria-selected="true"] { background: var(--brand-soft); color: var(--brand-ink); }
.palette-label { flex: 1; min-width: 0; font-weight: 500; }
.palette-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.palette-hint { font-size: 12px; color: var(--muted); }
.palette-empty { padding: 16px 12px; }
.palette-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.palette-foot kbd { margin-right: 2px; }
.badge.warn-badge { background: rgba(229, 162, 26, 0.16); color: var(--warn-ink); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 24px; letter-spacing: -0.01em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.panel h3 { margin: 0 0 12px; font-size: 15px; }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .value { font-size: 22px; font-weight: 700; margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(0, 186, 124, 0.15); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 4px rgba(229, 162, 26, 0.15); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; padding: 0 0 8px; }
td { padding: 10px 0; border-top: 1px solid var(--line); }
td.when { color: var(--muted); white-space: nowrap; padding-right: 16px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); margin-left: 8px; }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
.coming { text-align: center; padding: 48px 20px; }
.coming h3 { font-size: 18px; margin-bottom: 6px; }
.coming p { color: var(--muted); margin: 0 auto; max-width: 440px; }
.coming ul { display: inline-block; text-align: left; color: var(--muted); margin: 16px auto 0; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow); animation: toast-in 0.25s ease-out; z-index: 10;
}

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; z-index: 15;
    padding: 10px 12px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .side {
    position: fixed; z-index: 25; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: 100%;
    transform: translateX(-104%); transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); box-shadow: 0 0 40px rgba(0, 0, 0, 0.25);
  }
  .menu-open .side { transform: none; }
  .side .menu-close { display: inline-grid; }
  .scrim {
    display: block; position: fixed; inset: 0; z-index: 20; background: rgba(8, 12, 16, 0.4);
    opacity: 0; pointer-events: none; transition: opacity 0.2s;
  }
  .menu-open .scrim { opacity: 1; pointer-events: auto; }
  .page { padding: 20px 16px 40px; }
  .page-head h2 { font-size: 22px; }
  .backdrop { padding-top: 8vh; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Charts. Series steps validated (dataviz checker) on these surfaces:
   light #FFFFFF, dark #131A21. The lighter third line wears an end label
   and every chart has a table view. */
:root {
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
  --grid: #EDF1F5; --axis: #C9D3DC; --tick: #7A8A99;
  --good-ink: #0A7D4F; --warn-ink: #9A6400; --bad-ink: #C21A4E;
}
@media (prefers-color-scheme: dark) {
  :root {
    --s1: #3987e5; --s2: #d95926; --s3: #199e70;
    --grid: #1E2833; --axis: #2E3B48; --tick: #7F8E9C;
    --good-ink: #2BD49A; --warn-ink: #F5BE4F; --bad-ink: #FF6B93;
  }
}
.filters { display: flex; gap: 12px; margin-bottom: 16px; }
.segmented { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.segmented button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 500; font-size: 14px; }
.segmented button:hover { color: var(--text); background: var(--raised); }
.segmented button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.updated { color: var(--muted); font-size: 13px; margin-right: 10px; }
.page-head .actions { display: flex; align-items: center; gap: 8px; }
.loading { opacity: 0.55; transition: opacity 0.2s; }
.panel { margin-bottom: 16px; }
.grid .panel { margin-bottom: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two > .panel { min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.card-head h3 { margin-bottom: 2px; }
.sub { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.link.small { font-size: 13px; padding: 4px 2px; }

.chart { position: relative; width: 100%; min-height: 220px; }
.chart svg { display: block; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--tick); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .end-label { fill: var(--muted); font-size: 12px; }
.chart .mark.s1 { fill: var(--s1); }
.chart .mark.live { opacity: 0.55; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.s1 { stroke: var(--s1); } .chart .line.s2 { stroke: var(--s2); } .chart .line.s3 { stroke: var(--s3); }
.chart .area.s1 { fill: var(--s1); opacity: 0.1; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot.s1 { fill: var(--s1); } .chart .dot.s2 { fill: var(--s2); } .chart .dot.s3 { fill: var(--s3); }
.chart .cross { stroke: var(--axis); stroke-width: 1; }
.chart .cross.hidden { display: none; }
.chart .hit { fill: transparent; outline: none; cursor: crosshair; }
.chart .hit:focus-visible { stroke: var(--brand); stroke-width: 1.5; }
.tip {
  position: absolute; z-index: 2; pointer-events: none; min-width: 120px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 8px 10px; font-size: 13px;
}
.tip-title { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.tip-row { display: flex; align-items: center; gap: 8px; }
.tip-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.tip-name { color: var(--muted); }
.key { width: 12px; height: 2px; border-radius: 1px; flex: none; }
.key.s1 { background: var(--s1); } .key.s2 { background: var(--s2); } .key.s3 { background: var(--s3); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend .key { width: 16px; height: 3px; }

.barlist { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 34%) 1fr auto; align-items: center; gap: 12px; font-size: 14px; border-radius: 8px; }
.bar-row:hover .bar-fill { filter: brightness(1.12); }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 14px; }
.bar-fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--s1); }
.bar-value { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 32px; text-align: right; }

.tiles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 4px; }
.tile-value { font-size: 28px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.15; }
.tile-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.spark { flex: none; }
.spark-line { fill: none; stroke: var(--tick); stroke-width: 1.5; stroke-linejoin: round; }
.spark-dot { fill: var(--s1); stroke: var(--surface); stroke-width: 2; }

.watch { display: flex; flex-direction: column; }
.watch-row { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 6px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.watch-row:first-child { border-top: 0; }
.watch-row .meter { grid-column: 2; }
.watch-row .meter + .watch-text { grid-column: 2; }
.watch-label { font-weight: 600; font-size: 14px; }
.watch-text { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.meter { height: 8px; border-radius: 4px; background: var(--brand-soft); overflow: hidden; }
.meter.warn { background: rgba(229, 162, 26, 0.18); }
.meter.bad { background: var(--bad-soft); }
.meter-fill { height: 100%; border-radius: 4px; background: var(--s1); }
.meter-fill.warn { background: var(--warn); }
.meter-fill.bad { background: var(--bad); }
.status { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.status.good { color: var(--good-ink); background: rgba(0, 186, 124, 0.12); }
.status.warn { color: var(--warn-ink); background: rgba(229, 162, 26, 0.16); }
.status.bad { color: var(--bad-ink); background: var(--bad-soft); }
.status-icon { font-size: 12px; line-height: 1; }

table.data th.num, table.data td.num { text-align: right; font-variant-numeric: tabular-nums; padding-left: 12px; }
table.data td.muted { color: var(--muted); }
table.data td { padding: 8px 0; }
.table-box { max-height: 320px; overflow: auto; }
.table-scroll { overflow-x: auto; }
td.heat { border-radius: 6px; }
td.heat.q0 { background: rgba(42, 120, 214, 0.06); }
td.heat.q1 { background: rgba(42, 120, 214, 0.14); }
td.heat.q2 { background: rgba(42, 120, 214, 0.24); }
td.heat.q3 { background: rgba(42, 120, 214, 0.34); }
td.heat.q4 { background: rgba(42, 120, 214, 0.46); }
table.data td.heat { padding-right: 10px; }
table.data th + th, table.data td + td { padding-left: 16px; }
.page { min-width: 0; }

@media (max-width: 820px) {
  .two { grid-template-columns: 1fr; }
  .watch-row { grid-template-columns: 1fr; }
  .watch-row .meter, .watch-row .meter + .watch-text { grid-column: 1; }
  .tile-value { font-size: 24px; }
}

/* Motion: pages and lists settle in; nothing loops. */
.page > * { animation: rise 0.32s ease-out both; }
.page > *:nth-child(2) { animation-delay: 0.03s; }
.page > *:nth-child(3) { animation-delay: 0.06s; }
.page > *:nth-child(4) { animation-delay: 0.09s; }
.toast.leaving { opacity: 0; transform: translate(-50%, 6px); transition: opacity 0.3s, transform 0.3s; }
.nav .count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; animation: pop 0.3s ease-out;
}
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.segmented .pill {
  margin-left: 6px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: var(--raised); color: var(--muted);
}
.segmented button[aria-pressed="true"] .pill { background: var(--brand); color: #fff; }
.subfilters { margin-bottom: 12px; }
.fb-col .subfilters .segmented { width: 100%; }
.fb-col .subfilters .segmented button { flex: 1; padding: 6px 8px; }

/* Inbox: list on the left, the message on the right. */
.inbox { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.fb-col { padding: 14px; margin-bottom: 0; position: sticky; top: 20px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.fb-list { overflow-y: auto; margin: 0 -6px; padding: 0 6px; display: flex; flex-direction: column; gap: 4px; }
.fb-item {
  position: relative; text-align: left; width: 100%; border: 1px solid transparent; background: none; cursor: pointer;
  border-radius: 12px; padding: 12px 12px 12px 22px; display: flex; flex-direction: column; gap: 4px;
  transition: background 0.15s, border-color 0.15s; animation: rise 0.25s ease-out both;
}
.fb-item:nth-child(2) { animation-delay: 0.02s; } .fb-item:nth-child(3) { animation-delay: 0.04s; }
.fb-item:nth-child(4) { animation-delay: 0.06s; } .fb-item:nth-child(5) { animation-delay: 0.08s; }
.fb-item:nth-child(n+6) { animation-delay: 0.1s; }
.fb-item:hover { background: var(--raised); }
.fb-item.selected { background: var(--brand-soft); border-color: rgba(29, 161, 242, 0.35); }
.fb-item.unread::before {
  content: ""; position: absolute; left: 9px; top: 19px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
}
.fb-item.unread .fb-who { font-weight: 700; }
.fb-top { display: flex; align-items: center; gap: 8px; }
.fb-when { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.fb-who { font-size: 14px; font-weight: 600; }
.fb-excerpt {
  font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mood { font-size: 15px; line-height: 1; }
.replied-mark { font-size: 13px; color: var(--brand-ink); }
.more { margin: 8px auto 4px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px 2px 8px;
  border-radius: 999px; background: var(--raised); border: 1px solid var(--line);
}
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.chip.idea .chip-dot { background: #1DA1F2; }
.chip.problem .chip-dot { background: var(--bad); }
.chip.praise .chip-dot { background: var(--good); }
.chip.other .chip-dot { background: var(--warn); }
.tag { font-size: 12px; color: var(--muted); padding: 2px 9px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); }

.fb-empty, .fb-none { text-align: center; padding: 56px 24px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fb-none { padding: 40px 16px; color: var(--muted); font-size: 14px; }
.fb-none strong { color: var(--text); font-size: 15px; }
.fb-empty h3 { margin: 6px 0 0; }
.fb-empty p { margin: 0; color: var(--muted); max-width: 340px; }
.fb-empty-icon, .fb-none-icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 24px;
  background: var(--brand-soft); color: var(--brand-ink); margin-bottom: 6px;
}
.fb-read { animation: rise 0.28s ease-out both; margin-bottom: 0; }
.fb-read .back { display: none; margin-bottom: 12px; }
.fb-head, .vr-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.fb-id { min-width: 0; flex: 1; }
.fb-id h3 { margin: 0; font-size: 17px; }
.fb-id .meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 15px;
  background: linear-gradient(135deg, rgba(29, 161, 242, 0.22), rgba(29, 161, 242, 0.08)); color: var(--brand-ink);
}
.fb-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.bubble { padding: 12px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; max-width: 92%; }
.bubble.them { background: var(--raised); border: 1px solid var(--line); border-top-left-radius: 4px; align-self: flex-start; }
.bubble.us { background: var(--brand-soft); border-top-right-radius: 4px; align-self: flex-end; animation: rise 0.3s ease-out both; }
.bubble-meta { font-size: 12px; color: var(--brand-ink); font-weight: 600; margin-bottom: 4px; }
.composer { border: 1px solid var(--line); border-radius: 14px; background: var(--raised); transition: border-color 0.15s, box-shadow 0.15s; }
.composer:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.composer.off { opacity: 0.6; }
.reply-input {
  display: block; width: 100%; border: 0; background: transparent; resize: none; outline: none;
  padding: 12px 14px; font: inherit; min-height: 52px; line-height: 1.5;
}
.composer-bar { display: flex; align-items: center; gap: 12px; padding: 8px 10px 10px 14px; }
.composer-bar .hint { margin-right: auto; font-size: 12px; color: var(--muted); }
.composer-bar .counter { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.composer-bar .btn { width: auto; padding: 9px 16px; }
.field-error { margin: 0 14px; color: var(--bad); font-size: 13px; }

.vr-list { display: grid; gap: 16px; }
.vr-card { margin-bottom: 0; animation: rise 0.28s ease-out both; }
.facts { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0 0 16px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.decision { margin: 0; color: var(--muted); font-size: 14px; }
.status.good, .status.bad { white-space: nowrap; }

@media (max-width: 820px) {
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .fb-col { position: static; max-height: none; }
  .inbox.reading .fb-col { display: none; }
  .inbox:not(.reading) .fb-detail { display: none; }
  .fb-read .back { display: inline-block; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.nav button { gap: 8px; }

/* Inbox polish: search, status, ready answers, the letter preview. */
.fb-search {
  width: 100%; margin: 0 0 10px; padding: 9px 12px 9px 34px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--raised) no-repeat 11px 50% / 15px 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A8A99' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  outline: none; font-size: 14px; transition: border-color 0.15s, box-shadow 0.15s;
}
.fb-search:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fb-id h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.state { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; padding: 2px 8px; border-radius: 999px; }
.state.new { background: var(--brand-soft); color: var(--brand-ink); }
.state.replied { background: rgba(0, 186, 124, 0.12); color: var(--good-ink); }
.state.done { background: var(--raised); color: var(--muted); border: 1px solid var(--line); }
.bubble-greet { font-weight: 600; margin-bottom: 4px; }
.bubble-sign { margin-top: 8px; font-size: 13px; color: var(--muted); }

.templates { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.templates-label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.template {
  border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.template:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.template:active { transform: scale(0.97); }

.letter-preview { margin-top: 14px; }
.letter-preview summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--brand-ink); list-style: none; display: inline-flex; align-items: center; gap: 6px;
}
.letter-preview summary::-webkit-details-marker { display: none; }
.letter-preview summary::before { content: "\25B8"; transition: transform 0.2s; display: inline-block; }
.letter-preview[open] summary::before { transform: rotate(90deg); }
.lp-card {
  margin-top: 12px; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg);
  max-width: 460px; animation: rise 0.25s ease-out both;
}
.lp-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.lp-head img { width: 34px; height: 34px; }
.lp-head strong { display: block; font-size: 14px; }
.lp-head span { font-size: 12px; color: var(--muted); }
.lp-check {
  display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 9px; font-weight: 800; vertical-align: 1px;
}
.lp-title { margin: 14px 0 10px; font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.lp-paper { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.lp-greet { font-weight: 600; }
.lp-body { margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); font-size: 14px; line-height: 1.6; }
.lp-empty { color: var(--muted); font-style: italic; }
.lp-sign { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.lp-team { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); font-size: 14px; }
.lp-team img { width: 22px; height: 22px; }
.lp-quote-label { margin: 16px 0 8px 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); }
.lp-quote {
  padding: 12px 14px; border-radius: 14px; background: var(--raised); border-left: 3px solid var(--brand);
  font-size: 13px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere;
}
.chart .mark.s2 { fill: var(--s2); } .chart .mark.s3 { fill: var(--s3); }

/* Money, Costs and switches */
.env-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  color: var(--warn-ink); background: rgba(229, 162, 26, 0.14); border: 1px solid rgba(229, 162, 26, 0.3);
}
.env-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.danger-link { color: var(--bad-ink); }
.field-input {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--raised);
  outline: none; font: inherit; transition: border-color 0.15s, box-shadow 0.15s;
}
.field-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
select.field-input { cursor: pointer; }
.grant-form {
  margin: 4px 0 18px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--raised);
  animation: rise 0.25s ease-out both;
}
.grant-form .field-input { background: var(--surface); }
.grant-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; }
.grant-actions { display: flex; justify-content: flex-end; }
.grant-actions .btn { width: auto; padding: 10px 20px; }
.pick-list { display: flex; flex-direction: column; gap: 4px; margin: -6px 0 12px; }
.pick, .picked {
  display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); font-size: 14px;
}
.pick { cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.pick:hover { border-color: var(--brand); background: var(--brand-soft); }
.picked { margin: -6px 0 14px; border-color: rgba(29, 161, 242, 0.4); background: var(--brand-soft); }
.picked .link { margin-left: auto; }
.picked-kind {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted);
  padding: 2px 7px; border-radius: 6px; background: var(--raised);
}
.picked-sub { font-size: 13px; color: var(--muted); }

.switches .switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line);
}
.switches .switch-row:first-of-type { border-top: 0; }
.switch-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.switch-text strong { font-size: 15px; }
.switch-text span { font-size: 13px; color: var(--muted); max-width: 520px; }
.switch-control { display: flex; align-items: center; gap: 8px; flex: none; }
.switch-state { font-size: 13px; font-weight: 600; color: var(--muted); min-width: 24px; text-align: right; }
.switch {
  position: relative; width: 46px; height: 28px; border-radius: 999px; border: 0; cursor: pointer; padding: 0;
  background: var(--line); transition: background 0.2s;
}
.switch .knob {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.22s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.switch.on { background: var(--brand); }
.switch.on .knob { transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.num-input { width: 110px; text-align: right; font-variant-numeric: tabular-nums; }
.unit { font-size: 13px; color: var(--muted); white-space: nowrap; }
.switch-control .btn { width: auto; padding: 9px 14px; }

@media (max-width: 820px) {
  .switches .switch-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .switch-control { justify-content: flex-end; }
  .grant-row { grid-template-columns: 1fr; }
}

/* Health, Announcements, Record */
.nav .count.warn { background: var(--warn); color: #1a1200; }
.cell-sub { font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.tables-title { margin: 18px 0 6px; }
code.cron { font: 12px Consolas, "SF Mono", monospace; color: var(--muted); background: var(--raised); padding: 2px 6px; border-radius: 6px; white-space: nowrap; }

.problems { display: flex; flex-direction: column; gap: 10px; }
.problem { border: 1px solid var(--line); border-radius: 14px; background: var(--raised); transition: border-color 0.15s; }
.problem[open] { border-color: rgba(29, 161, 242, 0.35); }
.problem.back { border-left: 3px solid var(--bad); }
.problem.open { border-left: 3px solid var(--warn); }
.problem.fixed { opacity: 0.75; }
.problem summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.problem summary::-webkit-details-marker { display: none; }
.problem-head { display: flex; align-items: center; gap: 8px; }
.problem-title { font-weight: 600; font-family: Consolas, "SF Mono", monospace; font-size: 13.5px; overflow-wrap: anywhere; }
.problem-meta { font-size: 13px; color: var(--muted); }
.problem-body { padding: 0 16px 16px; animation: rise 0.2s ease-out both; }
pre.stack {
  margin: 0 0 12px; padding: 12px; max-height: 260px; overflow: auto; border-radius: 10px; background: var(--bg);
  border: 1px solid var(--line); font: 12px/1.5 Consolas, "SF Mono", monospace; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere;
}

.ann-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.announce-text { resize: vertical; min-height: 84px; line-height: 1.5; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; margin-top: 4px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.check em { color: var(--muted); font-style: normal; font-size: 13px; }
.ann-phone {
  padding: 18px 14px; border-radius: 22px; border: 1px solid var(--line); min-height: 150px;
  background: linear-gradient(180deg, var(--raised), var(--bg));
}
.ann-preview {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 18px; border: 1px solid; animation: rise 0.25s ease-out both;
  --tone: #1DA1F2;
  background: color-mix(in srgb, var(--tone) 8%, var(--surface)); border-color: color-mix(in srgb, var(--tone) 30%, transparent);
}
.ann-preview.maintenance { --tone: #E5A21A; }
.ann-preview.important { --tone: #E0245E; }
.ann-icon {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; flex: none;
  background: color-mix(in srgb, var(--tone) 18%, transparent);
}
.ann-text { flex: 1; min-width: 0; }
.ann-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tone); }
.ann-title { font-weight: 650; margin-top: 2px; overflow-wrap: anywhere; }
.ann-body { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.5; overflow-wrap: anywhere; }
.ann-x { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--muted); flex: none; }
.ann-compose .composer-bar { padding: 14px 0 0; }
.ann-compose .composer-bar .counter { margin-right: auto; }
.chip.info .chip-dot { background: #1DA1F2; }
.chip.maintenance .chip-dot { background: var(--warn); }
.chip.important .chip-dot { background: var(--bad); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); animation: rise 0.25s ease-out both; }
.timeline li:first-child { border-top: 0; }
.tl-icon {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; font-size: 14px;
  background: var(--brand-soft); color: var(--brand-ink);
}
.tl-text { flex: 1; min-width: 0; font-size: 14px; }
.timeline time { padding-top: 6px; }

/* Announcements 2.0 (H6) */
.ann-compose .segmented { flex-wrap: wrap; max-width: 100%; }
.ann-grid > div { min-width: 0; }
.field-hint { display: inline; font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.field > span .field-hint { display: inline; margin-bottom: 0; }
.field-note { margin: -4px 0 14px; padding: 8px 12px; border-radius: 10px; font-size: 13px; }
.field-note.bad { background: var(--bad-soft); color: var(--bad-ink); animation: rise 0.2s ease-out both; }
.word-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.word-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--raised); color: var(--text); font: inherit; font-size: 12px;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.word-chip code { font: 600 11px/1 Consolas, "SF Mono", monospace; padding: 3px 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); }
.word-chip:hover { border-color: var(--brand); background: var(--brand-soft); }
.word-chip:active { transform: scale(0.96); }
.word-chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.start-row { margin-top: 8px; max-width: 260px; }
.start-row[hidden] { display: none; }
.clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ann-preview { position: relative; overflow: hidden; padding-left: 16px; }
.ann-preview::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tone); }
.ann-title-row { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.ann-title-row .ann-title { margin-top: 0; flex: 0 1 auto; }
.ann-chev { color: var(--muted); font-size: 17px; line-height: 1; }
.ann-side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ann-side-head > span { margin-bottom: 0; }
.ann-side { position: sticky; top: 16px; align-self: start; }
.ann-note { margin: 8px 2px 0; }
.ann-page {
  --tone: #1DA1F2; display: flex; flex-direction: column; gap: 12px; animation: rise 0.25s ease-out both;
}
.ann-page.maintenance { --tone: #E5A21A; }
.ann-page.important { --tone: #E0245E; }
.ann-hero {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 12px 16px; border-radius: 20px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 16%, var(--surface)), color-mix(in srgb, var(--tone) 3%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--tone) 25%, transparent);
}
.ann-big-icon {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; background: var(--tone);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--tone) 40%, transparent); animation: breathe 2.2s ease-out infinite;
}
@keyframes breathe { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tone) 40%, transparent); } 100% { box-shadow: 0 0 0 18px transparent; } }
.ann-hero-kicker {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tone);
  padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--tone) 14%, transparent);
}
.ann-page-title { font-size: 19px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.ann-from { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ann-from img { width: 26px; height: 26px; border-radius: 8px; }
.verified { color: var(--brand); }
.ann-paper {
  padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; line-height: 1.6; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto;
}
.ann-btn {
  text-align: center; padding: 10px; border-radius: 12px; font-size: 14px; font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); color: var(--brand-ink); background: var(--brand-soft);
}
.ann-btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.ann-cell { max-width: 420px; }
.cell-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); }
.tag.quiet { background: var(--raised); color: var(--muted); font-weight: 500; }
.state-word { font-size: 13px; font-weight: 600; }
.state-word.live { color: var(--good-ink); }
.state-word.later { color: var(--brand-ink); }
.state-word.ended { color: var(--muted); }
.reach { white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .ann-big-icon { animation: none; }
}
@media (max-width: 820px) {
  .ann-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ann-side { position: static; }
}

/* People and Safety (H9) */
.nav .count.bad { background: var(--bad); color: #fff; }
.dialog.wide { max-width: 560px; }
.dialog:has(.palette) { padding: 0; overflow: hidden; }
.action-dialog h3 { text-align: left; }
.action-dialog .sub { text-align: left; }
.action-dialog .segmented { flex-wrap: wrap; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.dialog-actions .btn { width: auto; }
.btn.danger-solid { background: var(--bad); }
.btn.warn-btn { color: var(--warn-ink); border-color: rgba(229, 162, 26, 0.45); }
.letter-preview {
  margin-top: 4px; padding: 12px 14px; border-radius: 12px; background: var(--raised); border-left: 3px solid var(--brand);
  font-size: 13px; color: var(--muted);
}
.letter-preview strong { display: block; color: var(--text); font-size: 14px; margin: 2px 0 4px; }
.letter-preview p { margin: 0; overflow-wrap: anywhere; }
.letter-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-ink); }

.level {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  background: var(--raised); color: var(--muted);
}
.level-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.level.bad { background: var(--bad-soft); color: var(--bad-ink); }
.level.warn { background: rgba(229, 162, 26, 0.16); color: var(--warn-ink); }
.level.info { background: var(--brand-soft); color: var(--brand-ink); }
.level.held { font-weight: 700; }
.row-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag.good-tag { background: rgba(0, 186, 124, 0.12); color: var(--good-ink); }
.signals { display: flex; flex-wrap: wrap; gap: 6px; }
.signal { font-size: 12px; padding: 4px 10px; border-radius: 8px; background: var(--bad-soft); color: var(--bad-ink); }
.signal.heavy { background: var(--brand-soft); color: var(--brand-ink); }
.signal strong { font-weight: 650; }

.risk-list { display: grid; gap: 12px; margin-bottom: 16px; }
.risk-card {
  display: block; width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; margin: 0;
  border-left: 3px solid var(--line); transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; animation: rise 0.3s ease-out both;
}
.risk-card:hover { transform: translateY(-1px); border-color: var(--brand); }
.risk-card.bad { border-left-color: var(--bad); }
.risk-card.warn { border-left-color: var(--warn); }
.risk-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.risk-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.risk-who { flex: 1; min-width: 0; }
.risk-who strong { display: block; }
.risk-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.calm { text-align: center; padding: 36px 20px; }
.calm strong { display: block; font-size: 16px; }
.calm p { margin: 4px 0 0; color: var(--muted); }
.calm-mark {
  width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 22px;
  background: rgba(0, 186, 124, 0.14); color: var(--good-ink);
}
.how summary { cursor: pointer; font-weight: 600; }
.how-list { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.how-list strong { color: var(--text); }

.people-filters { flex-wrap: wrap; align-items: center; }
.people-filters .segmented { flex-wrap: wrap; }
.people-filters .fb-search { flex: 1; min-width: 200px; max-width: 320px; margin: 0; }
.person-link {
  display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; color: inherit; font: inherit;
}
.person-link strong { display: block; }
.person-link:hover strong { color: var(--brand-ink); }
.person-link .avatar { width: 34px; height: 34px; font-size: 12px; flex: none; }
.back-link { display: inline-block; margin-bottom: 14px; }
.person-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 28px; align-items: start; margin-bottom: 16px; }
.person-id { display: flex; gap: 16px; align-items: center; }
.person-id .avatar { width: 64px; height: 64px; font-size: 22px; flex: none; }
.person-id h2 { margin: 0; font-size: 22px; }
.person-id .row-tags { margin-top: 8px; }
.person-head .facts { margin: 0; grid-template-columns: 110px 1fr; }
.person-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.person-actions .btn { width: auto; padding: 8px 14px; }

@media (max-width: 900px) {
  .person-head { grid-template-columns: minmax(0, 1fr); }
  .risk-head { flex-wrap: wrap; }
}

/* Backend and Services (H10) */
.health-strip { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.strip-title strong { display: block; }
.strip-items { display: flex; flex-wrap: wrap; gap: 14px; }
.strip-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.mono { font: 12px/1.45 Consolas, "SF Mono", monospace; color: var(--text); overflow-wrap: anywhere; }
.mono.query { display: block; max-width: 640px; color: var(--muted); }
.missing { padding: 12px 14px; border-radius: 12px; background: var(--raised); border: 1px dashed var(--line); }
.missing strong { display: block; font-size: 14px; }
.missing p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.panel.missing { border-style: dashed; }
.lints { list-style: none; margin: 0; padding: 0; }
.lints li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.lints li:first-child { border-top: 0; }
.bad-text { color: var(--bad-ink); font-weight: 600; }
.warn-text { color: var(--warn-ink); font-weight: 600; }
.center-note { text-align: center; margin-top: 4px; }
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.services .panel { margin-bottom: 0; }
.service { display: flex; flex-direction: column; gap: 12px; animation: rise 0.3s ease-out both; }
.service-head { display: flex; align-items: center; gap: 12px; }
.service-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 16px;
  background: var(--brand-soft); color: var(--brand-ink); flex: none;
}
.service-name { flex: 1; min-width: 0; }
.service-lines { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13px; }
.service-lines dt { color: var(--muted); }
.service-lines dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.service-link { margin-top: auto; align-self: flex-start; text-decoration: none; }
.service .watch-row { padding: 0; border: 0; }
.slim-meter { display: grid; gap: 6px; }

/* Go live (H11) */
.golive-hero { display: flex; align-items: center; gap: 28px; padding: 24px 28px; border-left: 4px solid var(--warn); }
.golive-hero.is-live { border-left-color: var(--good); }
.golive-text { flex: 1; min-width: 0; }
.golive-text h3 { margin: 4px 0 6px; font-size: 20px; }
.golive-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--warn-ink); }
.is-live .golive-kicker { color: var(--good-ink); }
.go-btn { width: auto; padding: 11px 26px; margin-top: 10px; }
.ring {
  --p: 0; width: 112px; height: 112px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--good) calc(var(--p) * 1%), var(--raised) 0); animation: pop-in 0.4s ease-out both;
}
.ring-in { width: 86px; height: 86px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; align-content: center; }
.ring-in strong { font-size: 22px; line-height: 1; }
.ring-in span { font-size: 12px; color: var(--muted); }
.checklist { list-style: none; margin: 0; padding: 0; }
.check-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); animation: rise 0.25s ease-out both; }
.check-row:first-child { border-top: 0; }
.check-mark {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 14px;
  background: rgba(229, 162, 26, 0.16); color: var(--warn-ink);
}
.check-row.good .check-mark { background: rgba(0, 186, 124, 0.14); color: var(--good-ink); }
.check-row.skip .check-mark, .check-row.wait .check-mark { background: var(--raised); color: var(--muted); }
.check-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.check-row.skip .check-text strong { color: var(--muted); }
.tick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tick input { width: 18px; height: 18px; accent-color: var(--good); }
@media (max-width: 900px) {
  .golive-hero { flex-direction: column; align-items: flex-start; }
  .check-row { flex-wrap: wrap; }
}

/* Access (0104): the switch for everyone and the closed screen's preview */
.acc-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; position: relative; overflow: hidden;
  --tone: var(--good); animation: rise 0.25s ease-out both;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tone) 10%, var(--surface)), var(--surface) 60%);
  border-color: color-mix(in srgb, var(--tone) 28%, var(--line));
}
.acc-hero.closed { --tone: var(--bad); }
.acc-state { display: flex; align-items: flex-start; gap: 14px; min-width: 0; flex: 1 1 320px; }
.acc-state h3 { margin: 2px 0 4px; font-size: 20px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.acc-state .sub { margin: 0; }
.acc-dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--tone); flex: none; margin-top: 6px;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--tone) 45%, transparent); animation: breathe 2.2s ease-out infinite;
}
.acc-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tone); }
.acc-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: 0 1 auto; max-width: 100%; }
.acc-actions .btn { width: auto; padding: 11px 18px; }
.acc-msg-now { margin: 0; max-width: 360px; font-size: 13px; color: var(--muted); text-align: right; overflow-wrap: anywhere; }
.acc-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.acc-phone {
  width: 236px; min-height: 430px; border-radius: 34px; padding: 18px 18px 16px; position: relative;
  background: var(--surface); border: 7px solid color-mix(in srgb, var(--text) 85%, transparent);
  box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; text-align: center;
  animation: rise 0.25s ease-out both;
}
.acc-notch { width: 64px; height: 6px; border-radius: 3px; background: var(--line); margin-bottom: 10px; }
.acc-word { font-weight: 800; font-size: 16px; letter-spacing: -0.02em; }
.acc-eco { color: var(--brand); }
.acc-stage { position: relative; width: 112px; height: 104px; display: grid; place-items: end center; margin: 14px 0 10px; }
.acc-halo { position: absolute; top: 2px; left: 8px; width: 96px; height: 96px; border-radius: 50%; background: var(--brand-soft); }
.acc-ama { position: relative; width: 88px; height: 88px; object-fit: contain; }
.acc-pill { font-size: 9.5px; font-weight: 600; color: var(--brand-ink); background: var(--brand-soft); padding: 4px 9px; border-radius: 999px; }
.acc-title { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; margin-top: 9px; overflow-wrap: anywhere; }
.acc-msg { font-size: 11px; line-height: 1.5; color: var(--muted); margin-top: 5px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.acc-until { font-size: 10px; font-weight: 600; background: var(--raised); border-radius: 8px; padding: 4px 8px; margin: 9px 0 14px; }
.acc-btn { margin-top: auto; width: 100%; padding: 8px 0; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; }
.acc-btn.ghost { margin-top: 6px; background: var(--brand-soft); color: var(--brand-ink); }
.acc-out { font-size: 10px; color: var(--muted); margin-top: 7px; }
@media (max-width: 760px) {
  .acc-actions { align-items: stretch; width: 100%; }
  .acc-msg-now { text-align: left; max-width: none; }
}
.action-dialog .dialog-actions .counter { margin-right: auto; font-size: 12px; color: var(--muted); }
.chip.mail-reply .chip-dot { background: var(--brand); }
.fb-re { font-size: 12px; font-weight: 600; color: var(--brand-ink); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-re-line { margin: 4px 0 10px; font-size: 13px; color: var(--muted); }

/* Mail (0105): letters from the team */
.mail-who { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.mail-picker { position: relative; }
.mail-results { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.mail-result {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 0; background: transparent;
  font: inherit; color: var(--text); text-align: left; cursor: pointer; animation: rise 0.2s ease-out both;
}
.mail-result:hover, .mail-result:focus-visible { background: var(--brand-soft); outline: none; }
.mail-result > span { display: flex; flex-direction: column; min-width: 0; }
.mail-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mail-chips:empty { display: none; }
.mail-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 6px 4px 4px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--brand-soft); color: var(--brand-ink); animation: rise 0.2s ease-out both;
}
.mail-chip .avatar { width: 24px; height: 24px; font-size: 10px; }
.mail-chip button {
  width: 22px; height: 22px; border-radius: 50%; border: 0; background: transparent; color: inherit; font-size: 16px; line-height: 1; cursor: pointer;
}
.mail-chip button:hover { background: color-mix(in srgb, var(--brand) 18%, transparent); }
.letter-phone {
  padding: 18px; border-radius: 26px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--raised), var(--bg));
  display: flex; flex-direction: column; gap: 10px; animation: rise 0.25s ease-out both;
}
.lp-from { display: flex; align-items: center; gap: 10px; }
.lp-from > div { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.lp-from strong { font-size: 14px; color: var(--text); }
.lp-mark {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #33B4F7, #148FE4);
}
.lp-tick { color: var(--brand); font-size: 12px; }
.lp-kicker { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--brand-ink); margin-top: 4px; }
.lp-subject { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.3; overflow-wrap: anywhere; }
.lp-paper { padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; line-height: 1.6; }
.lp-hi { font-weight: 650; font-size: 14px; margin-bottom: 6px; }
.lp-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); max-height: 320px; overflow: auto; }
.lp-sign { margin-top: 12px; color: var(--muted); }
.lp-sign strong { color: var(--text); }
.lp-btn { padding: 12px; border-radius: 14px; background: var(--brand); color: #fff; font-weight: 650; font-size: 13px; text-align: center; }
.lp-reply { padding: 10px; border-radius: 14px; border: 1px solid var(--line); text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.mail-sent { display: flex; flex-direction: column; }
.mail-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line);
  animation: rise 0.25s ease-out both;
}
.mail-row:first-child { border-top: 0; }
.mail-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.mail-stats { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); flex: none; }
.mail-stats b { color: var(--text); font-weight: 650; }
@media (max-width: 760px) {
  .mail-row { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* Waitlist and Beta test (0115) */
.acc-hero.gated { --tone: var(--brand); }
.code-chip {
  display: inline-flex; align-items: center; gap: 2px; padding: 2px 3px 2px 9px; border-radius: 8px;
  background: var(--raised); border: 1px solid var(--line); white-space: nowrap;
}
.code-chip .mono { font-weight: 700; letter-spacing: 0.06em; }
.code-copy {
  display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 6px; padding: 0;
  background: none; color: var(--muted); cursor: pointer; transition: background 0.15s, color 0.15s;
}
.code-copy:hover { background: var(--brand-soft); color: var(--brand-ink); }
.code-copy:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.bt-state {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; white-space: nowrap; background: var(--raised); color: var(--muted);
}
.bt-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.bt-state.live { background: rgba(0, 186, 124, 0.12); color: var(--good-ink); }
.bt-state.info { background: var(--brand-soft); color: var(--brand-ink); }
.bt-state.warn { background: rgba(229, 162, 26, 0.14); color: var(--warn-ink); }
.bt-email { font-weight: 600; white-space: nowrap; }
.bt-scroll table.data { min-width: 700px; }
.bt-scroll td, .bt-scroll th { white-space: nowrap; }
.bt-invite { animation: rise 0.25s ease-out both; }
.bt-invite-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 22px; }
.bt-invite-row .field { margin-bottom: 0; }
.bt-invite-row .num-input { width: 96px; height: 44px; text-align: left; }
.bt-invite-row .segmented { height: 44px; align-items: stretch; }
.bt-invite-row .btn { width: auto; height: 44px; padding: 0 18px; display: inline-flex; align-items: center; gap: 8px; }
.bt-result {
  margin: 16px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; overflow-wrap: anywhere;
  background: rgba(0, 186, 124, 0.1); color: var(--good-ink); animation: rise 0.25s ease-out both;
}
.bt-result.warn { background: rgba(229, 162, 26, 0.14); color: var(--warn-ink); }
.btn.bt-add { width: auto; padding: 9px 14px; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.row-actions { display: inline-flex; gap: 14px; justify-content: flex-end; white-space: nowrap; }
.bt-search { max-width: 320px; }
.bt-count { margin: 10px 0 0; }
.bt-inline { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.bt-inline[hidden], .bt-date[hidden] { display: none; }
.bt-date { margin-top: 10px; max-width: 220px; }
.bt-code-input { font: 700 15px/1.3 Consolas, "SF Mono", monospace; letter-spacing: 0.08em; }
.bt-code-input::placeholder { font: 400 14px/1.3 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; letter-spacing: 0; }
.url-input { width: 340px; }
@media (max-width: 820px) {
  .url-input { width: 100%; }
  .switch-control:has(.url-input) { justify-content: stretch; }
  .bt-invite-row { align-items: stretch; flex-direction: column; }
  .bt-invite-row .btn { justify-content: center; }
}
