/* Base look shared with Squizzy (editor.css), trimmed to what the tracker uses. */
:root {
    --ed-bg: #eceef2;          /* work area, like a canvas */
    --ed-side-bg: #f5f6f8;
    --ed-panel: #ffffff;
    --ed-ink: #18202b;
    --ed-muted: #5b6575;
    --ed-line: #e3e6eb;
    --ed-line-strong: #cfd4dc;
    --ed-soft: #f2f4f7;
    --ed-accent: #1570ef;
    --ed-accent-ink: #1059c9;
    --ed-accent-soft: #e7effd;
    --ed-ok: #1d7a46;
    --ed-ok-soft: #e6f4ec;
    --ed-warn: #8a5a00;
    --ed-warn-soft: #fff4d6;
    --ed-err: #c4320a;
    --ed-err-soft: #fdecea;
    --ed-radius: 10px;
    --ed-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.07);
    --ed-shadow-lg: 0 4px 12px rgba(16, 24, 40, 0.08), 0 1px 3px rgba(16, 24, 40, 0.06);
    --ed-top-h: 60px;
    --ed-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--ed-font); font-size: 14px; line-height: 1.45; color: var(--ed-ink); background: var(--ed-bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--ed-soft); padding: 1px 5px; border-radius: 4px; }

.ed-skip { position: absolute; left: -9999px; }
.ed-skip:focus { left: 12px; top: 8px; z-index: 50; background: #fff; padding: 6px 10px; border-radius: 6px; }

/* Top bar */
.ed-top { position: sticky; top: 0; z-index: 20; height: var(--ed-top-h); display: flex; align-items: center; gap: 14px; padding: 0 16px; background: var(--ed-panel); border-bottom: 1px solid var(--ed-line); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }
.ed-brand { display: flex; align-items: center; gap: 10px; flex: none; }
.ed-logo { display: block; border-radius: 8px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.15); }
.ed-brand-name { font-weight: 700; font-size: 1.08rem; letter-spacing: -0.015em; }
.ed-doc { min-width: 0; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ed-ink); padding-left: 14px; border-left: 1px solid var(--ed-line); }
.ed-doc:empty { display: none; }
.ed-menubar { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.ed-status { margin-left: auto; font-size: 0.82rem; color: var(--ed-muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.ed-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3cc47c; }
@media (max-width: 900px) {
    .ed-top { height: auto; flex-wrap: wrap; padding: 10px 12px; }
    .ed-doc { display: none; }
    .ed-menubar { margin-left: 0; flex-wrap: wrap; order: 3; width: 100%; }
}

/* Shell */
.ed-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: calc(100vh - var(--ed-top-h)); }
.ed-side { position: sticky; top: var(--ed-top-h); height: calc(100vh - var(--ed-top-h)); display: flex; flex-direction: column; background: var(--ed-side-bg); border-right: 1px solid var(--ed-line); }
.ed-main { padding: 24px 28px 64px; outline: none; min-width: 0; }
@media (max-width: 860px) {
    .ed-shell { grid-template-columns: 1fr; }
    .ed-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--ed-line); }
    .ed-main { padding: 16px; }
}

/* Sidebar panes: quizzes on top, banks below */
.ed-pane { display: flex; flex-direction: column; min-height: 0; }
.ed-pane.is-quizzes { flex: 0 0 auto; max-height: 45%; }
.ed-pane.is-banks { flex: 1 1 auto; border-top: 1px solid var(--ed-line-strong); box-shadow: inset 0 1px 0 #fff; }
.ed-pane-head { display: flex; align-items: center; gap: 8px; padding: 14px 12px 8px 16px; }
.ed-pane-head h2 { margin: 0; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ed-muted); }
.ed-pane-count { font-size: 0.72rem; font-weight: 600; color: var(--ed-muted); background: #e7e9ee; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.ed-pane-body { overflow-y: auto; padding: 0 8px 12px; min-height: 0; }
.ed-icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--ed-ink); cursor: pointer; }
.ed-icon-btn:hover { background: #e7e9ee; }
.ed-icon-btn:focus-visible { outline: 2px solid var(--ed-accent); outline-offset: 1px; }
.ed-side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ed-side-item { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 8px; background: none; cursor: pointer; color: var(--ed-ink); }
.ed-side-item:hover { background: #eaecf0; }
.ed-side-item.is-active { background: var(--ed-accent-soft); color: var(--ed-accent-ink); }
.ed-side-line { display: flex; align-items: center; gap: 6px; }
.ed-side-title { flex: 1 1 auto; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-side-item.is-active .ed-side-title { font-weight: 600; }
.ed-side-count { flex: none; font-size: 0.8rem; color: var(--ed-muted); font-variant-numeric: tabular-nums; }
.ed-side-meta { display: block; font-size: 0.76rem; color: var(--ed-muted); margin-top: 1px; }
.ed-side-empty { color: var(--ed-muted); font-size: 0.85rem; padding: 0 8px; margin: 4px 0; }
.ed-in-quiz { flex: none; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em; padding: 1px 7px; border-radius: 999px; background: var(--ed-accent); color: #fff; }

/* Buttons */
.ed-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--ed-line-strong); border-radius: 8px; background: var(--ed-panel); color: var(--ed-ink); cursor: pointer; font-weight: 500; white-space: nowrap; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05); }
.ed-btn:hover:not(:disabled) { background: var(--ed-soft); }
.ed-btn:focus-visible, .ed-input:focus-visible, .rte-area:focus-visible, .ed-side-item:focus-visible, .ed-qitem:focus-visible, .ed-tab:focus-visible, .ed-chip:focus-visible { outline: 3px solid color-mix(in srgb, var(--ed-accent) 35%, transparent); outline-offset: 1px; }
.ed-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ed-btn.is-primary { background: var(--ed-accent); border-color: var(--ed-accent); color: #fff; }
.ed-btn.is-primary:hover:not(:disabled) { background: var(--ed-accent-ink); border-color: var(--ed-accent-ink); }
.ed-btn.is-danger { background: var(--ed-err); border-color: var(--ed-err); color: #fff; }
.ed-btn.is-danger-text { color: var(--ed-err); }
.ed-btn.is-small { height: 30px; padding: 0 10px; font-size: 0.84rem; }
.ed-btn.is-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.ed-btn.is-ghost:hover:not(:disabled) { background: var(--ed-soft); }

/* Inputs */
.ed-field { margin: 0 0 14px; min-width: 0; }
.ed-label { display: block; font-weight: 600; font-size: 0.84rem; margin-bottom: 5px; color: #2a3341; }
.ed-help { color: var(--ed-muted); font-size: 0.82rem; margin: 5px 0 0; }
.ed-input { width: 100%; padding: 7px 10px; border: 1px solid var(--ed-line-strong); border-radius: 8px; background: #fff; min-height: 36px; }
.ed-input:focus { border-color: var(--ed-accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ed-accent) 18%, transparent); }
select.ed-input { width: auto; max-width: 100%; }
.ed-num { width: 110px; }
.ed-title-input { font-size: 1.4rem; font-weight: 700; border-color: transparent; background: transparent; padding: 4px 8px; margin-left: -8px; }
.ed-title-input:hover { border-color: var(--ed-line); }
.ed-title-input:focus { background: #fff; border-color: var(--ed-line-strong); box-shadow: none; }
.ed-toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.ed-toggle input { width: 18px; height: 18px; accent-color: var(--ed-accent); }
.ed-toggle + .ed-help { margin-left: 26px; }
.ed-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ed-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.ed-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 18px; }
.ed-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 18px; align-items: start; }
.ed-badge { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--ed-soft); color: var(--ed-muted); }
.ed-tags { font-size: 0.75rem; color: var(--ed-muted); }
.ed-kicker { margin: 0; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ed-muted); }
.ed-meta { margin: 4px 0 0; color: var(--ed-muted); font-size: 0.85rem; }
.ed-list { margin: 0; padding-left: 1.2em; }
.ed-list li + li { margin-top: 6px; }

/* Rich text */
.rte { border: 1px solid var(--ed-line-strong); border-radius: 8px; background: #fff; }
.rte:focus-within { border-color: var(--ed-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ed-accent) 18%, transparent); }
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid var(--ed-line); background: #f9fafb; border-radius: 8px 8px 0 0; }
.rte-btn { border: 0; background: none; padding: 3px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; color: var(--ed-muted); cursor: pointer; min-width: 30px; }
.rte-btn:hover { background: var(--ed-soft); color: var(--ed-ink); }
.rte-area { min-height: 72px; padding: 8px 10px; outline: none; overflow-wrap: anywhere; }
.rte-area p { margin: 0 0 0.5em; }
.rte-area p:last-child { margin-bottom: 0; }
.rte-area img { max-width: 100%; max-height: 240px; height: auto; border-radius: 4px; }
.rte-single .rte-area { min-height: 0; padding: 6px 9px; }
.rte-area.is-empty::before { content: attr(data-placeholder); color: #98a1ab; pointer-events: none; position: absolute; }
/* Page head */
.ed-view { max-width: 1180px; }
.ed-pagehead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.ed-pagehead-main { flex: 1 1 360px; min-width: 0; }
.ed-pagehead-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Home */
.ed-home { max-width: 680px; }
.ed-home h1 { font-size: 2rem; margin: 8px 0 8px; outline: none; }
.ed-lede { font-size: 1.05rem; color: var(--ed-muted); }
.ed-steps { padding-left: 1.3em; }
.ed-steps li + li { margin-top: 6px; }
.ed-note { margin-top: 24px; padding: 12px 16px; border-radius: var(--ed-radius); background: var(--ed-panel); border: 1px solid var(--ed-line); color: var(--ed-muted); font-size: 0.9rem;  box-shadow: var(--ed-shadow);}
.ed-note p { margin: 0; }

.ed-seg { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.ed-seg legend { padding: 0; margin-bottom: 5px; }
.ed-seg-opt { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--ed-line-strong); border-radius: 8px; cursor: pointer; background: #fff; }
.ed-seg-opt:has(input:checked) { border-color: var(--ed-accent); background: var(--ed-accent-soft); color: var(--ed-accent-ink); font-weight: 600; }
.ed-seg-opt input { accent-color: var(--ed-accent); }

.ed-details { margin: 6px 0 14px; border: 1px solid var(--ed-line); border-radius: 6px; padding: 0 12px; background: #fcfcfd; }
.ed-details > summary { cursor: pointer; padding: 9px 0; font-weight: 600; font-size: 0.9rem; }
.ed-details[open] { padding-bottom: 4px; }
.ed-details[open] > summary { margin-bottom: 8px; }

.ed-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ed-line-strong); margin-bottom: 18px; }
.ed-tab { border: 0; background: none; padding: 9px 16px; font-weight: 600; color: var(--ed-muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.ed-tab:hover { color: var(--ed-ink); }
.ed-tab.is-active { color: var(--ed-accent-ink); border-bottom-color: var(--ed-accent); }

.ed-settings, .ed-sections { max-width: 900px; }
.ed-group { background: var(--ed-panel); border: 1px solid var(--ed-line); border-radius: var(--ed-radius); padding: 14px 18px 4px; margin-bottom: 16px;  box-shadow: var(--ed-shadow);}
.ed-group h3 { margin: 0 0 12px; font-size: 1rem; }

/* Dialog, toasts, dropzone */
.ed-dialog { border: 0; border-radius: 12px; padding: 22px 24px 18px; width: min(560px, calc(100vw - 32px)); box-shadow: 0 18px 50px rgba(15, 23, 32, 0.28); }
.ed-dialog::backdrop { background: rgba(20, 28, 38, 0.45); }
.ed-dialog-title { margin: 0 0 10px; font-size: 1.15rem; }
.ed-dialog-actions { display: flex; flex-direction: row-reverse; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ed-dialog-preview { max-height: 70vh; overflow-y: auto; }
.ed-import-report { max-height: 60vh; overflow-y: auto; }
.ed-import-report h3 { margin: 16px 0 6px; font-size: 1rem; }
.ed-dialog:has(.ed-import-report) { width: min(720px, calc(100vw - 32px)); }
.ed-dialog:has(.ed-dialog-preview) { width: min(820px, calc(100vw - 32px)); }

.ed-toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.ed-toast { background: #1f2a37; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); max-width: 380px; transition: opacity 0.4s; }
.ed-toast.is-error { background: var(--ed-err); }
.ed-toast.is-out { opacity: 0; }

.ed-dropzone { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; background: rgba(21, 112, 239, 0.14); border: 4px dashed var(--ed-accent); pointer-events: none; }
.ed-dropzone p { background: #fff; padding: 14px 22px; border-radius: 10px; font-weight: 600; }
.ed-dropzone[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ======================================================================
   Feedback tracker additions
   ====================================================================== */
:root {
    --fb-bug: #c4320a;
    --fb-bug-soft: #fdecea;
    --fb-idea: #1059c9;
    --fb-idea-soft: #e7effd;
}
a { color: var(--ed-accent-ink); }
a.ed-btn, a.ed-side-item { text-decoration: none; }
a.ed-brand { color: inherit; text-decoration: none; }
.ed-menubar .ed-btn.is-current:not(.is-primary) { background: var(--ed-accent-soft); border-color: var(--ed-accent); color: var(--ed-accent-ink); }
.ed-side-item { display: block; color: var(--ed-ink); }
.ed-side { overflow-y: auto; }
.ed-pane-body { overflow: visible; }
.fb-side-details { margin: 4px 2px 0; }
.fb-side-details > summary { cursor: pointer; padding: 6px 10px; font-size: 0.85rem; color: var(--ed-muted); font-weight: 600; }
.ed-main:focus { outline: none; }

.fb-who { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.fb-me { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; color: var(--ed-ink); text-decoration: none; border: 1px solid var(--ed-line); background: var(--ed-panel); max-width: 260px; }
.fb-me:hover { background: var(--ed-soft); }
.fb-me-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-avatar { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #ffb21e, #3cc47c 55%, #2f7cf6); color: #fff; font-weight: 700; font-size: 0.8rem; }
.fb-teambadge, .fb-opbadge { display: inline-block; margin-left: 6px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em; padding: 1px 7px; border-radius: 999px; background: var(--ed-accent); color: #fff; vertical-align: middle; }
.fb-opbadge { background: var(--ed-soft); color: var(--ed-muted); border: 1px solid var(--ed-line-strong); }
@media (max-width: 900px) { .fb-who { margin-left: auto; } .fb-me-name { max-width: 140px; } }

.fb-h1 { font-size: 1.6rem; margin: 4px 0 6px; outline: none; }
.fb-h2 { font-size: 1.05rem; margin: 0 0 10px; }
.fb-subhead { font-size: 0.9rem; margin: 14px 0 6px; }
.fb-card { background: var(--ed-panel); border: 1px solid var(--ed-line); border-radius: var(--ed-radius); box-shadow: var(--ed-shadow); }
.fb-narrow { max-width: 680px; }
.fb-num { color: var(--ed-muted); font-weight: 500; }

/* List */
.fb-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.fb-search { flex: 1 1 320px; min-height: 40px; font-size: 0.95rem; }
.fb-sorts { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 10px; background: #e2e5ea; }
.fb-sort { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 0.85rem; color: var(--ed-muted); cursor: pointer; }
.fb-sort:hover { color: var(--ed-ink); }
.fb-sort.is-active { background: var(--ed-panel); color: var(--ed-ink); box-shadow: var(--ed-shadow); }
.fb-sort:focus-visible { outline: 3px solid color-mix(in srgb, var(--ed-accent) 35%, transparent); }
.fb-results.is-loading { opacity: 0.55; transition: opacity 0.2s; }
.fb-count { margin: 0 0 8px; color: var(--ed-muted); font-size: 0.85rem; }
.fb-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fb-group-head { margin: 10px 0 0; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ed-muted); }
.fb-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; padding: 14px 18px 14px 12px; }
.fb-item.is-pinned { border-color: color-mix(in srgb, var(--ed-accent) 40%, var(--ed-line)); }
.fb-item.is-hidden, .fb-reply.is-hidden { opacity: 0.65; border-style: dashed; }
.fb-item-body { min-width: 0; }
.fb-item-title { margin: 6px 0 4px; font-size: 1.02rem; }
.fb-item-title a { color: var(--ed-ink); text-decoration: none; }
.fb-item-title a:hover { color: var(--ed-accent-ink); text-decoration: underline; }
.fb-excerpt { margin: 0 0 6px; color: #39424f; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fb-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0; }

.fb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; color: var(--ed-muted); font-size: 0.84rem; }
.fb-meta-part + .fb-meta-part::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; margin: 0 9px; vertical-align: middle; opacity: 0.7; }
.fb-meta strong { color: var(--ed-ink); font-weight: 600; }

/* Badges */
.fb-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fb-type, .fb-status, .fb-tag, .fb-pin, .fb-flagged { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; line-height: 1.5; text-decoration: none; white-space: nowrap; }
.fb-type.is-bug { background: var(--fb-bug-soft); color: var(--fb-bug); }
.fb-type.is-feedback { background: var(--fb-idea-soft); color: var(--fb-idea); }
.fb-tag { background: var(--ed-soft); color: #39424f; font-weight: 600; border: 1px solid var(--ed-line); }
a.fb-tag:hover { border-color: var(--ed-line-strong); background: #fff; }
.fb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.fb-pin { background: #1f2a37; color: #fff; }
.fb-flagged { background: var(--ed-warn-soft); color: var(--ed-warn); }
.fb-status { border: 1px solid transparent; }
.fb-status.is-open      { background: #f2f4f7; color: #39424f; border-color: var(--ed-line-strong); }
.fb-status.is-review    { background: #fff4d6; color: #8a5a00; }
.fb-status.is-planned   { background: #efe7fd; color: #6233b5; }
.fb-status.is-progress  { background: #e0f2fe; color: #075985; }
.fb-status.is-done      { background: var(--ed-ok-soft); color: var(--ed-ok); }
.fb-status.is-declined  { background: #f2f4f7; color: #5b6575; text-decoration: line-through; text-decoration-thickness: 1px; }
.fb-status.is-duplicate { background: #f2f4f7; color: #5b6575; }
.fb-sdot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #98a1ab; }
.fb-sdot.is-review { background: #e0a100; } .fb-sdot.is-planned { background: #7a3fd1; } .fb-sdot.is-progress { background: #0284c7; }
.fb-sdot.is-done { background: var(--ed-ok); } .fb-sdot.is-declined, .fb-sdot.is-duplicate { background: #cfd4dc; }

/* Votes */
.fb-vote { display: flex; flex-direction: column; align-items: center; gap: 0; align-self: start; }
.fb-vote-btn { display: inline-grid; place-items: center; width: 34px; height: 28px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--ed-muted); cursor: pointer; }
.fb-vote-btn:hover:not(:disabled) { background: var(--ed-soft); color: var(--ed-ink); }
.fb-vote-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--ed-accent) 35%, transparent); }
.fb-vote-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.fb-vote-btn.is-up[aria-pressed="true"] { color: #fff; background: var(--ed-accent); }
.fb-vote-btn.is-down[aria-pressed="true"] { color: #fff; background: #5b6575; }
.fb-score { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; padding: 2px 0; min-width: 2ch; text-align: center; }
.fb-vote.is-big { padding: 6px; border: 1px solid var(--ed-line); border-radius: 12px; background: var(--ed-panel); box-shadow: var(--ed-shadow); }
.fb-vote.is-big .fb-vote-btn { width: 42px; height: 34px; }
.fb-vote.is-big .fb-score { font-size: 1.35rem; }

/* Item page */
.fb-item-view { max-width: 900px; }
.fb-item-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 16px; }
.fb-item-head .fb-h1 { margin-top: 8px; }
.fb-post { padding: 18px 22px 12px; margin-bottom: 16px; }
.fb-content { overflow-wrap: anywhere; line-height: 1.6; }
.fb-content > :first-child { margin-top: 0; }
.fb-content p { margin: 0 0 0.75em; }
.fb-content img, .rte-area img { display: block; max-width: 100%; height: auto; margin: 8px 0; border-radius: 6px; border: 1px solid var(--ed-line); }
.fb-content pre, .rte-area pre { background: #1f2a37; color: #e9edf3; padding: 10px 12px; border-radius: 6px; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.86rem; white-space: pre-wrap; }
.fb-content blockquote, .rte-area blockquote { margin: 8px 0; padding: 4px 12px; border-left: 3px solid var(--ed-line-strong); color: #39424f; }
.fb-content h3, .rte-area h3 { font-size: 1.05rem; margin: 14px 0 6px; }
.fb-content h4, .rte-area h4 { font-size: 0.95rem; margin: 12px 0 4px; }
.rte-area { min-height: 140px; }
.rte-area ul, .rte-area ol, .fb-content ul, .fb-content ol { padding-left: 1.4em; }
.rte-msg { margin: 0; padding: 6px 10px; font-size: 0.84rem; color: var(--ed-muted); border-top: 1px solid var(--ed-line); }
.rte-msg.is-error { color: var(--ed-err); background: var(--ed-err-soft); }
.rte-area.is-empty::before { position: static; display: block; height: 0; }
.fb-post-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--ed-line); }
.fb-attachments { margin-top: 12px; }
.fb-files { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.fb-files li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 10px; border-radius: 6px; background: var(--ed-soft); }
.fb-files li > span:first-child { font-weight: 600; }
.fb-env table { border-collapse: collapse; font-size: 0.84rem; margin-bottom: 8px; }
.fb-env th, .fb-env td { text-align: left; padding: 3px 10px 3px 0; vertical-align: top; }
.fb-env th { color: var(--ed-muted); font-weight: 600; white-space: nowrap; }
.fb-notice { margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; background: var(--ed-warn-soft); color: var(--ed-warn); }
.fb-notice.is-info { background: var(--ed-accent-soft); color: var(--ed-accent-ink); }
.fb-team { background: #fbfcfe; border-color: color-mix(in srgb, var(--ed-accent) 30%, var(--ed-line)); margin-bottom: 18px; }
.fb-team .ed-seg { flex-wrap: wrap; }
.fb-toggles { display: grid; gap: 8px; margin: 6px 0 4px; }

.fb-thread { margin: 22px 0 16px; display: grid; gap: 10px; }
.fb-thread > .fb-h2 { margin: 0 0 2px; }
.fb-reply { padding: 12px 18px; scroll-margin-top: 90px; }
.fb-reply.is-team { border-left: 4px solid var(--ed-accent); }
.fb-reply.is-target { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ed-accent) 30%, transparent); }
.fb-reply-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 8px; }
.fb-reply-head .fb-teambadge, .fb-reply-head .fb-opbadge { margin-left: 0; }
.fb-reply-head .ed-meta { margin: 0 0 0 auto; }
.fb-event { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 12px; margin-left: 22px; border-left: 2px solid var(--ed-line-strong); font-size: 0.88rem; }
.fb-event .ed-meta { margin: 0; }
.fb-reply-form { padding: 18px 22px; margin-bottom: 40px; }
.fb-rule { margin: 0 0 14px; padding: 12px 14px; border-radius: 8px; background: var(--ed-warn-soft); border-left: 4px solid #e0a100; color: #4a3600; }
.fb-rule strong { display: block; margin-bottom: 2px; color: #3a2a00; font-size: 0.98rem; }
.fb-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Compose */
.fb-compose { max-width: 1120px; }
.fb-compose-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .fb-compose-grid { grid-template-columns: minmax(0, 1fr); } }
.fb-form { padding: 18px 22px 6px; margin-bottom: 16px; }
.fb-guide { padding: 16px 18px; position: sticky; top: calc(var(--ed-top-h) + 16px); font-size: 0.88rem; }
@media (max-width: 1100px) { .fb-guide { position: static; } }
.fb-guide .ed-list li + li { margin-top: 5px; }
.fb-typeseg { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.fb-typeseg legend { grid-column: 1 / -1; }
.fb-typeopt { align-items: flex-start; padding: 10px 12px; }
.fb-typeopt > span { display: grid; gap: 2px; }
.fb-typeopt-desc { font-size: 0.82rem; color: var(--ed-muted); font-weight: 400; }
.fb-typeopt input { margin-top: 3px; }
.ed-seg-opt:has(input:disabled) { cursor: default; opacity: 0.75; }
.fb-title { font-size: 1.05rem; min-height: 42px; }
.fb-similar:empty { display: none; }
.fb-similar { margin-top: 8px; padding: 10px 12px; border-radius: 8px; background: var(--ed-accent-soft); }
.fb-similar-head { margin: 0 0 6px; font-weight: 600; color: var(--ed-accent-ink); }
.fb-similar ul { margin: 0; padding-left: 1.1em; }
.fb-similar li + li { margin-top: 4px; }
.fb-bugbox { border-top: 1px solid var(--ed-line); padding-top: 12px; margin-bottom: 4px; }
.fb-bugbox[hidden] { display: none; }
.fb-seg-col { flex-direction: column; align-items: stretch; }
.ed-seg .fb-dot { margin-right: -2px; }
.fb-privacy p + p { margin-top: 6px; }

/* Feeds */
.fb-feeds { list-style: none; margin: 16px 0 40px; padding: 4px 18px; }
.fb-feed { padding: 12px 0; border-bottom: 1px solid var(--ed-line); }
.fb-feed:last-child { border-bottom: 0; }
.fb-feed .ed-help { margin: 2px 0 6px; }
.fb-feed-row { display: flex; gap: 6px; align-items: center; }
.fb-feedurl { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.82rem; background: var(--ed-soft); }

/* Server pages (sign in landing) */
body.fb-solo { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.fb-solo-card { width: min(460px, 100%); background: var(--ed-panel); border: 1px solid var(--ed-line); border-radius: 14px; padding: 26px 28px; box-shadow: var(--ed-shadow-lg); }
.fb-solo-brand { margin-bottom: 18px; }
.fb-solo-card h1 { font-size: 1.4rem; margin: 0 0 8px; }
.fb-wide { width: 100%; justify-content: center; height: 42px; font-size: 1rem; }

@media (max-width: 640px) {
    .fb-item { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; padding: 12px; }
    .fb-item-head { grid-template-columns: minmax(0, 1fr); }
    .fb-item-head .fb-vote.is-big { flex-direction: row; justify-self: start; gap: 6px; }
    .fb-post, .fb-reply-form, .fb-form { padding: 14px; }
    .fb-sorts { width: 100%; }
}

/* Filters fold away on phones */
.fb-filter-toggle { display: none; }
@media (max-width: 860px) {
    .ed-side { padding: 10px 12px; }
    .fb-filter-toggle { display: inline-flex; }
    .ed-side > .ed-pane { display: none; }
    .ed-side.is-open > .ed-pane { display: flex; }
    body:not(.fb-on-list) .ed-side { display: none; }
}

/* Products: header switcher, marks, badges, picker */
.fb-crumb { min-width: 0; padding-left: 14px; border-left: 1px solid var(--ed-line); }
.fb-crumb:empty { display: none; }
.fb-crumb-static, .fb-switch-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 260px; font-weight: 600; color: var(--ed-ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-switch { position: relative; }
.fb-switch-btn { height: 36px; padding: 0 10px 0 6px; border: 1px solid transparent; border-radius: 8px; background: none; cursor: pointer; }
.fb-switch-btn:hover, .fb-switch-btn[aria-expanded="true"] { background: var(--ed-soft); border-color: var(--ed-line); }
.fb-switch-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--ed-accent) 35%, transparent); }
.fb-switch-btn .ed-caret { margin-left: 2px; color: var(--ed-muted); }
.ed-menu.fb-switch-menu { left: 0; right: auto; width: min(340px, calc(100vw - 24px)); }
a.fb-switch-item { text-decoration: none; }
.fb-switch-item.is-current { background: var(--ed-accent-soft); }
.fb-switch-line { display: flex; align-items: center; gap: 8px; }
.fb-switch-line .ed-menu-title { flex: 1; }
.fb-switch-item .ed-menu-desc { padding-left: 30px; }
.fb-switch-all { border-top: 1px solid var(--ed-line); border-radius: 0 0 6px 6px; margin-top: 2px; }
.fb-pmark { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: #fff; font-weight: 700; font-size: 0.75rem; line-height: 1; object-fit: contain; }
.fb-pmark.is-all { background: linear-gradient(135deg, #ff5f45, #ffb21e 38%, #3cc47c 68%, #2f7cf6); }
.ed-side-line .fb-pmark { width: 18px; height: 18px; font-size: 0.66rem; border-radius: 5px; }
.fb-pbadge { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--ed-line-strong); color: var(--ed-ink); text-decoration: none; white-space: nowrap; }
.fb-pbadge:hover { border-color: var(--ed-muted); }

.fb-home { max-width: 1000px; }
.fb-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin: 20px 0 14px; }
.fb-pcard { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-top: 4px solid var(--fb-p, var(--ed-accent)); }
.fb-pcard-main { display: flex; gap: 12px; align-items: flex-start; color: var(--ed-ink); text-decoration: none; }
.fb-pcard-main .fb-pmark { border-radius: 10px; }
.fb-pcard-main:hover .fb-pcard-name { color: var(--ed-accent-ink); text-decoration: underline; }
.fb-pcard-text { display: grid; gap: 3px; min-width: 0; }
.fb-pcard-name { font-size: 1.1rem; }
.fb-pcard-desc { color: var(--ed-muted); font-size: 0.88rem; }
.fb-pcard-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.fb-home-all { margin: 4px 0 40px; }

.fb-feedgroup { margin-top: 22px; }
.fb-feedgroup-head { display: flex; align-items: center; gap: 8px; }
.fb-feedgroup .fb-feeds { margin-top: 8px; margin-bottom: 0; }

@media (max-width: 560px) { .fb-crumb-static, .fb-switch-btn { max-width: 150px; } .ed-brand-name { display: none; } }

/* Menus, from Squizzy (editor.css) */
.ed-caret { display: inline-block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid currentColor; }
.ed-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: min(360px, calc(100vw - 32px)); padding: 6px; background: var(--ed-panel); border: 1px solid var(--ed-line); border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 23, 32, 0.18); display: grid; gap: 2px; }
.ed-menu[hidden] { display: none; }
.ed-menu-item { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border: 0; border-radius: 6px; background: none; cursor: pointer; font: inherit; color: inherit; }
.ed-menu-item:hover, .ed-menu-item:focus-visible { background: var(--ed-accent-soft); outline: none; }
.ed-menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--ed-accent); }
.ed-menu-title { font-weight: 600; }
.ed-menu-desc { font-size: 0.85rem; color: var(--ed-muted); line-height: 1.35; }
