/* QboxPlatform portal design system */

:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --surface: #12151c;
  --surface-2: #181c25;
  --surface-3: #1f2430;
  --border: #262c3a;
  --border-strong: #343b4d;
  --text: #e8eaf0;
  --muted: #9aa3b5;
  --subtle: #6b7385;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --accent-soft: rgba(88, 101, 242, .14);
  --success: #3ba55d;
  --success-soft: rgba(59, 165, 93, .14);
  --warning: #e0a526;
  --warning-soft: rgba(224, 165, 38, .14);
  --danger: #ed4245;
  --danger-soft: rgba(237, 66, 69, .14);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 32px rgba(0, 0, 0, .35);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #f8f9fb;
    --surface-3: #eef0f4;
    --border: #e3e6ec;
    --border-strong: #cfd4dd;
    --text: #151821;
    --muted: #5d6475;
    --subtle: #8a91a1;
    --accent-soft: rgba(88, 101, 242, .1);
    --shadow: 0 12px 32px rgba(20, 24, 33, .12);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
code { font-family: var(--mono); font-size: 12px; background: var(--surface-3); padding: 1px 6px; border-radius: 6px; }
small { font-size: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.content:focus { outline: none; }
.microcopy { color: var(--muted); margin: 0; }

.skip-link { position: absolute; left: -999px; top: 8px; padding: 8px 12px; background: var(--accent); color: #fff; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Shell ---------- */

.app-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }

.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 20px 12px; background: var(--surface); border-right: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand strong { display: block; font-size: 14px; }
.brand span { display: block; font-size: 12px; color: var(--muted); }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; font-size: 12px; flex: none; }
.brand-mark.large { width: 48px; height: 48px; border-radius: 12px; font-size: 16px; }

.nav { display: grid; align-content: start; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.nav-group { margin: 14px 10px 4px; font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--subtle); }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--muted); text-decoration: none; font-weight: 500; }
.nav-link:hover { background: var(--surface-3); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--text); }
.nav-link.active .nav-icon { color: var(--accent); }
.nav-icon { width: 18px; height: 18px; display: grid; place-items: center; flex: none; }
.nav-icon svg { width: 18px; height: 18px; }

.sidebar-card { margin-top: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.sidebar-card strong { font-size: 13px; }
.sidebar-card p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.status-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--subtle); flex: none; }
.status-dot.live { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.status-dot.danger { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 14px 32px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar > div:nth-child(2) { flex: 1; min-width: 0; }
.breadcrumbs { margin: 0; font-size: 12px; color: var(--subtle); }
.topbar h1 { font-size: 20px; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.account-menu { position: relative; }
.profile-button { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 500; }
.profile-button:hover { border-color: var(--border-strong); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-popover { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; display: grid; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.profile-popover .button { width: 100%; }

.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.mobile-only { display: none; }

.notification-area { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; gap: 8px; width: min(360px, calc(100vw - 40px)); }
.notice { padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--success); box-shadow: var(--shadow); font-weight: 500; animation: notice-in .18s ease-out; }
.notice.error { border-left-color: var(--danger); }
.notice.warning { border-left-color: var(--warning); }
@keyframes notice-in { from { opacity: 0; transform: translateY(6px); } }

.content { width: 100%; max-width: 1280px; padding: 24px 32px 64px; display: grid; gap: 20px; align-content: start; }

/* ---------- Layout ---------- */

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.main-detail { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); align-items: start; }
.grid.editor-layout { grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); align-items: start; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.card .card { background: var(--surface-2); }
.split-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.split-line h2, .split-line h3 { display: flex; align-items: center; gap: 8px; }

.empty-state { padding: 28px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); }

/* ---------- Metrics and tiles ---------- */

.metric { gap: 6px; }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.metric-value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }

.feature-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.feature-tile { display: grid; gap: 2px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--text); text-decoration: none; transition: border-color .12s, background .12s; }
.feature-tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.feature-tile strong { font-weight: 600; }
.feature-tile small { color: var(--muted); font-family: var(--mono); }

.sign-in-card { justify-items: start; padding: 32px; }
.sign-in-card h2 { font-size: 20px; }

/* ---------- Buttons ---------- */

.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.button:hover { background: var(--surface-3); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); background: transparent; }
.button.danger:hover { background: var(--danger-soft); }
.button.ghost { background: transparent; border-color: transparent; }
.button.compact { min-height: 30px; padding: 0 10px; font-size: 13px; }
.button.full { width: 100%; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.link-button { background: none; border: 0; padding: 0; color: var(--text); font-weight: 500; cursor: pointer; text-align: left; }
.link-button:hover { color: var(--accent); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar input { flex: 1 1 220px; }
.toolbar select { flex: 0 1 180px; }

/* ---------- Badges and chips ---------- */

.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 650; text-transform: capitalize; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--accent-soft); color: var(--accent); }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 4px 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--text); font-size: 12px; font-weight: 600; }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 5px; border-radius: 50%; }
.chip button:hover { color: var(--danger); }
.role-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* ---------- Tabs ---------- */

.tab-bar { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border); margin: -4px 0 4px; }
.tab { position: relative; background: none; border: 0; padding: 10px 12px; color: var(--muted); font-weight: 600; cursor: pointer; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }

/* ---------- Section menu (Discord Bot page) ---------- */

.subnav-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: start; }
.subnav { position: sticky; top: 84px; display: grid; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.subnav button { text-align: left; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted); font-weight: 500; cursor: pointer; }
.subnav button:hover { background: var(--surface-3); color: var(--text); }
.subnav button.active { background: var(--accent-soft); color: var(--text); }
.section-head { display: grid; gap: 4px; }
.section-head h2 { font-size: 18px; }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; align-content: start; }
.form-grid > h3, .form-grid > h4, .form-grid > p, .form-grid > fieldset, .form-grid > .full, .form-grid > button.full { grid-column: 1 / -1; }
.form-grid > h3 { font-size: 15px; }
.form-grid > h4 { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.readable-form { max-width: 820px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 500; }
input, select, textarea { font-weight: 400; width: 100%; min-height: 38px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--subtle); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 88px; resize: vertical; }
select[multiple] { min-height: 110px; }
label.checkbox { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 500; cursor: pointer; }
label.checkbox input { width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; accent-color: var(--accent); flex: none; }
fieldset { margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
fieldset { align-items: start; }
fieldset > .full { grid-column: 1 / -1; }
fieldset > .checkbox { align-self: end; min-height: 40px; }
legend { padding: 0 6px; color: var(--muted); font-size: 12px; font-weight: 650; }
.question-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 8px; align-items: center; }

.chip-picker { display: grid; gap: 8px; }
.picker-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.member-results { display: grid; gap: 4px; }
.member-result { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); text-align: left; cursor: pointer; }
.member-result:hover { border-color: var(--accent); }
.member-result img { width: 22px; height: 22px; border-radius: 50%; }
.member-result small { color: var(--muted); }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--subtle); background: var(--surface-2); border-bottom: 1px solid var(--border); }
td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr[data-t-select] { cursor: pointer; }
tbody tr[data-t-select]:hover td { background: var(--surface-2); }
tbody tr.selected td { background: var(--accent-soft); }
td small { color: var(--muted); }

/* ---------- Detail and timeline ---------- */

.detail-stack { display: grid; gap: 12px; }
.detail-stack h2 { font-size: 17px; }
.detail-stack h3 { margin-top: 8px; }
.detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.detail-row span { color: var(--muted); }
.detail-row strong { font-weight: 500; text-align: right; overflow-wrap: anywhere; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.timeline li { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.timeline li small { color: var(--subtle); }
.timeline li p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline li.internal-note { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 35%, var(--border)); }

/* ---------- Lists ---------- */

.reason-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.reason-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.reason-list li.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.reason-list li > div:first-child { display: grid; gap: 3px; min-width: 0; }
.reason-list small { color: var(--muted); }

/* ---------- Setup checklist ---------- */

.setup-card { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), var(--surface); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; align-items: center; gap: 10px; }
.checklist .check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.checklist li.done .check { background: var(--success); border-color: var(--success); color: #fff; }
.checklist li.done .link-button { color: var(--muted); text-decoration: line-through; }

/* ---------- Discord message preview ---------- */

.dc-message { display: flex; gap: 14px; padding: 16px; border-radius: var(--radius); background: #313338; color: #dbdee1; font-family: "gg sans", "Noto Sans", var(--font); }
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; }
.dc-body { display: grid; gap: 8px; min-width: 0; flex: 1; }
.dc-author { font-weight: 600; color: #f2f3f5; }
.dc-bot { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; margin-left: 4px; vertical-align: middle; }
.dc-embed { background: #2b2d31; border-left: 4px solid #5865f2; border-radius: 4px; padding: 12px 16px; display: grid; gap: 6px; max-width: 520px; }
.dc-embed strong { color: #f2f3f5; }
.dc-embed p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.dc-embed small { color: #b5bac1; }
.dc-buttons { display: flex; flex-wrap: wrap; gap: 8px; max-width: 560px; }
.dc-button { padding: 6px 16px; border-radius: 4px; font-weight: 500; color: #fff; }
.dc-button.primary { background: #5865f2; }
.dc-button.secondary { background: #4e5058; }
.dc-button.success { background: #248046; }
.dc-button.danger { background: #da373c; }
.dc-select { display: flex; justify-content: space-between; max-width: 400px; padding: 10px 12px; border-radius: 4px; background: #1e1f22; color: #b5bac1; }

/* ---------- Modal ---------- */

.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .55); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(440px, 100%); display: grid; gap: 12px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.modal p { margin: 0; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .grid.main-detail, .grid.editor-layout, .subnav-layout { grid-template-columns: 1fr; }
  .subnav { position: static; display: flex; overflow-x: auto; }
  .subnav button { white-space: nowrap; }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .mobile-only { display: grid; }
  .topbar { padding: 12px 16px; }
  .content { padding: 16px 16px 48px; }
  .grid.cols-2, .form-grid, fieldset { grid-template-columns: 1fr; }
  .question-row { grid-template-columns: 1fr; }
  #profileName { display: none; }
  .profile-button { padding: 4px; }
  .table-wrap { border: 0; }
  table, thead, tbody, tr, td { display: block; }
  thead { display: none; }
  tbody tr { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; background: var(--surface); }
  td { border-bottom: 0; padding: 8px 12px; }
  td::before { content: attr(data-label); display: block; color: var(--subtle); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
  td[data-label=""]::before { display: none; }
}

@media (max-width: 480px) {
  .grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .metric-value { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
.duration-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 8px; }
.answer-text { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
[data-show][hidden] { display: none; }
.dc-content { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.dc-mention { padding: 0 2px; border-radius: 3px; background: rgba(88, 101, 242, .3); color: #c9cdfb; font-weight: 500; }
.dc-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dc-field { display: grid; gap: 2px; min-width: 0; }
.dc-field.full { grid-column: 1 / -1; }
.field-list { display: grid; gap: 8px; }
.weekday-row { display: flex; flex-wrap: wrap; gap: 12px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 12px; }
.calendar-head { padding: 4px; text-align: center; font-size: 11px; font-weight: 650; text-transform: uppercase; color: var(--subtle); }
.calendar-cell { display: grid; align-content: start; gap: 2px; min-height: 76px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); min-width: 0; }
.calendar-cell.empty { background: transparent; border-color: transparent; }
.calendar-cell.has-birthday { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: var(--accent-soft); }
.calendar-cell.today .calendar-day { color: var(--accent); font-weight: 800; }
.calendar-day { font-size: 12px; color: var(--muted); }
.calendar-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .calendar-cell { min-height: 52px; padding: 4px; }
  .calendar-name { font-size: 10px; }
}
.category-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) 90px auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.markdown { line-height: 1.55; overflow-wrap: anywhere; }
.markdown h3, .markdown h4, .markdown h5 { margin: 12px 0 6px; }
.markdown p, .markdown ul, .markdown ol { margin: 0 0 8px; }
.markdown code { font-family: var(--mono); background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.markdown pre { background: var(--surface-3); padding: 10px 12px; border-radius: var(--radius-sm); overflow-x: auto; }
.markdown pre code { background: none; padding: 0; }
.markdown a { color: var(--accent); }
.player-chart { width: 100%; height: auto; display: block; }
.player-chart text { fill: var(--muted); font-size: 11px; }
.player-chart .chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.player-chart .chart-grid { stroke: var(--border); stroke-dasharray: 3 4; }
.player-chart .chart-axis { stroke: var(--border-strong); }
.player-chart .chart-down { fill: var(--danger); }
@media (max-width: 720px) { .category-row { grid-template-columns: 70px minmax(0, 1fr); } }
button.feature-tile { font: inherit; text-align: left; cursor: pointer; }
.builder-channels { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.builder-channel { display: grid; grid-template-columns: 24px minmax(120px, 1fr) auto auto; gap: 4px 8px; align-items: center; }
.builder-channel small { grid-column: 2 / -1; grid-row: 2; }
.builder-type { text-align: center; color: var(--muted); }
.inline-name { min-height: 30px; padding: 4px 8px; }
.inline-name.strong { font-weight: 650; max-width: 320px; }
td .inline-name { width: 150px; display: inline-block; margin-left: 6px; }
.builder-progress { width: 100%; height: 10px; accent-color: var(--accent); }
.builder-log { max-height: 420px; overflow-y: auto; }
@media (max-width: 720px) { .builder-channel { grid-template-columns: 24px minmax(0, 1fr) auto; } .builder-channel > span:nth-child(3) { display: none; } }
