.cmt-btn { margin-left: auto; flex: none; align-self: center; font: 500 .78rem var(--f-body, system-ui); color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; cursor: pointer; opacity: .75; }
h2:hover .cmt-btn, .cmt-btn[aria-expanded="true"], .cmt-btn:focus-visible { opacity: 1; color: var(--accent-ink); border-color: var(--accent); }
@media (hover: none) { .cmt-btn { opacity: 1; } }
.cmt-panel { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 16px; margin: 0 0 22px; }
.cmt-note { margin: 0 0 8px; font-size: .85rem; color: var(--muted); }
.brand .back { color: var(--muted); text-decoration: none; font: 500 .8rem var(--f-body, system-ui); margin-right: 6px; }
.brand .back:hover { color: var(--accent-ink); }
.rfcno.st { text-transform: uppercase; letter-spacing: .04em; }
pre.mermaid { background: transparent; border: 0; padding: 0; font-family: inherit; white-space: pre; overflow-x: auto; }
/* Comments stored on the page (Supabase) */
.cmt-n { display: inline-block; min-width: 1.4em; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; text-align: center; }
.cmt-n[hidden] { display: none; }
.cmt-list { display: grid; gap: 10px; margin-bottom: 12px; }
.cmt-thread { display: grid; gap: 8px; }
.cmt-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); transition: box-shadow .3s; }
.cmt-reply { margin-left: 22px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; }
.cmt-flash { box-shadow: 0 0 0 2px var(--accent); }
.cmt-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: .82rem; }
.cmt-meta time { color: var(--muted); }
.cmt-lang { font: 600 .68rem var(--f-mono, ui-monospace, monospace); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.cmt-body { margin: 6px 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; }
.cmt-quote { margin: 6px 0; padding: 4px 10px; border-left: 3px solid var(--accent); color: var(--muted); font-size: .85rem; font-style: italic; background: var(--accent-soft); border-radius: 0 6px 6px 0; overflow-wrap: anywhere; }
.cmt-link { background: none; border: 0; padding: 0; color: var(--accent-ink); font: 500 .8rem var(--f-body, system-ui); cursor: pointer; }
.cmt-link:hover { text-decoration: underline; }
.cmt-form { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.cmt-form input, .cmt-form textarea { width: 100%; box-sizing: border-box; font: 400 .92rem var(--f-body, system-ui); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.cmt-form input:focus, .cmt-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.cmt-form textarea { resize: vertical; min-height: 72px; }
.cmt-form .cmt-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cmt-replying, .cmt-quote-pre { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .84rem; }
.cmt-replying[hidden], .cmt-quote-pre[hidden], .cmt-err[hidden] { display: none; }
.cmt-quote-pre .cmt-quote { flex: 1 1 100%; margin: 0; }
.cmt-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cmt-row .cmt-note { margin: 0; }
.cmt-send { font: 600 .85rem var(--f-body, system-ui); color: var(--bg); background: var(--accent-ink); border: 0; border-radius: 8px; padding: 8px 16px; cursor: pointer; }
.cmt-send:disabled { opacity: .6; cursor: progress; }
.cmt-err { margin: 0; color: var(--bad, #b3261e); font-size: .85rem; }
mark.cmt-mark { background: var(--accent-soft); color: inherit; border-bottom: 2px solid var(--accent); border-radius: 2px; cursor: pointer; padding: 0 1px; }
mark.cmt-mark:hover { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.cmt-fab { position: absolute; z-index: 50; font: 600 .8rem var(--f-body, system-ui); color: #fff; background: var(--ink); border: 0; border-radius: 999px; padding: 7px 13px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.cmt-fab[hidden] { display: none; }
/* Versions: history popover in the header and the banner on archived versions */
.vers { position: relative; display: inline-block; }
.vers > summary { list-style: none; cursor: pointer; user-select: none; }
.vers > summary::-webkit-details-marker { display: none; }
.vers > summary::after { content: " ▾"; font-size: .7em; }
.vers[open] > summary, .vers > summary:hover { border-color: var(--accent); color: var(--accent-ink); }
.vers-pop { position: absolute; left: 0; top: calc(100% + 8px); z-index: 60; width: min(380px, 88vw); max-height: 70vh; overflow-y: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 28px rgba(0,0,0,.18); font: 400 .85rem/1.45 var(--f-body, system-ui); }
.vers-pop h3 { margin: 0 0 8px; font: 600 .72rem var(--f-body, system-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vers-pop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vers-pop li { border-left: 3px solid var(--line); padding-left: 10px; }
.vers-pop li[aria-current] { border-left-color: var(--accent); }
.vers-pop li > a, .vers-pop li > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; color: inherit; text-decoration: none; }
.vers-pop li > a:hover b { color: var(--accent-ink); text-decoration: underline; }
.vers-pop b { font: 700 .9rem var(--f-mono, ui-monospace, monospace); }
.vers-pop time { color: var(--muted); font-size: .78rem; }
.vers-pop .vtag { font: 600 .66rem var(--f-body, system-ui); text-transform: uppercase; letter-spacing: .05em; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; }
.vers-pop .vnote-wrap { margin-top: 2px; color: var(--muted); }
.ver-banner { background: var(--warn-soft, #fbf0d6); color: var(--warn, #9a6408); border-bottom: 1px solid var(--line); padding: 9px 16px; text-align: center; font: 500 .88rem var(--f-body, system-ui); }
.ver-banner a { color: inherit; font-weight: 700; margin-left: 6px; }
@media (max-width: 600px) { .vers { position: static; } .vers-pop { position: fixed; left: 12px; right: 12px; top: 56px; width: auto; } }
/* All comments of the RFC: header button + side drawer */
.cmt-all { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; margin-right: 10px; font: 600 .8rem var(--f-body, system-ui); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.cmt-all:hover, .cmt-all[aria-expanded="true"] { border-color: var(--accent); color: var(--accent-ink); }
.cmt-all .cmt-n { margin-left: 0; }
.cmt-new { font: 700 .68rem var(--f-body, system-ui); text-transform: uppercase; letter-spacing: .04em; color: #fff; background: #c2410c; border-radius: 999px; padding: 2px 8px; }
@media (max-width: 640px) { .cmt-all-l { display: none; } .cmt-all { margin-right: 6px; padding: 5px 9px; } }
.cmt-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(440px, 100vw); display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border-left: 1px solid var(--line); box-shadow: -10px 0 32px rgba(0,0,0,.16); font: 400 .9rem/1.5 var(--f-body, system-ui); }
.cmt-d-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 8px; }
.cmt-d-head h2 { margin: 0; font: 700 1.05rem var(--f-display, system-ui); }
.cmt-x { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; font-size: .95rem; }
.cmt-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; border-bottom: 1px solid var(--line); }
.cmt-chip { font: 500 .8rem var(--f-body, system-ui); border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.cmt-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #052e16; }
.cmt-d-body { flex: 1; overflow-y: auto; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.cmt-d-sec { margin: 10px 0 0; font: 600 .74rem var(--f-body, system-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cmt-d-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.cmt-d-item.is-new { border-left: 3px solid #c2410c; }
.cmt-newtag { font: 700 .64rem var(--f-body, system-ui); text-transform: uppercase; color: #fff; background: #c2410c; border-radius: 4px; padding: 1px 6px; }
.cmt-clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cmt-d-rep { margin: 4px 0 0; padding-left: 10px; border-left: 3px solid var(--accent); font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.cmt-d-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.cmt-d-foot .cmt-note { margin: 0; }
.cmt-open { color: #b3540f; font-weight: 600; }
.cmt-d-end { border-top: 1px solid var(--line); padding: 10px 16px 14px; }
.cmt-d-end .cmt-note { margin-bottom: 4px; }
.cmt-d-end a { color: var(--accent-ink); font-weight: 600; font-size: .86rem; }
.cmt-tr { margin: 2px 0 4px; font-size: .76rem; color: var(--muted); }
.cmt-tr .cmt-link { font-size: .76rem; }
/* Reply form opens under the comment being answered, aligned with the replies */
.cmt-thread > .cmt-form { margin-left: 22px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; padding: 12px; background: var(--bg); }
/* Live status: clickable badge with a picker, and pill colours that follow the status */
.rfcno.st.st-btn { cursor: pointer; user-select: none; }
.rfcno.st.st-btn::after { content: " ▾"; font-size: .7em; }
.rfcno.st.st-btn:hover, .rfcno.st.st-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent-ink); }
.rfcno.st.st-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-pop { position: absolute; z-index: 60; top: 52px; left: 16px; width: min(320px, 88vw); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 28px rgba(0,0,0,.18); font: 400 .85rem/1.45 var(--f-body, system-ui); display: grid; gap: 8px; }
.st-pop[hidden] { display: none; }
.st-title { margin: 0; font: 600 .72rem var(--f-body, system-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.st-pop input { width: 100%; box-sizing: border-box; font: 400 .9rem var(--f-body, system-ui); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.st-pop input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.st-err { margin: 0; color: var(--bad, #b3261e); font-size: .82rem; }
.st-err[hidden] { display: none; }
.st-list { display: grid; gap: 4px; }
.st-opt { text-align: left; font: 500 .85rem var(--f-body, system-ui); color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.st-opt:hover:not(:disabled) { border-color: var(--accent); }
.st-opt[aria-current="true"] { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.st-opt:disabled { opacity: .6; cursor: progress; }
.st-note { margin: 0; color: var(--muted); font-size: .78rem; }
.pill[data-st="in-review"] { background: var(--accent-soft); color: var(--accent-ink); }
.pill[data-st="approved"] { background: var(--ok-soft); color: var(--ok); }
.pill[data-st="implemented"] { background: var(--info-soft); color: var(--info); }
.pill[data-st="rejected"] { background: var(--bad-soft); color: var(--bad); }
.pill[data-st="superseded"] { background: var(--line); color: var(--muted); text-decoration: line-through; }
/* Delete comment */
.cmt-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.cmt-del { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.cmt-del .cmt-note { margin: 0; }
.cmt-link.cmt-danger { color: var(--bad, #b3261e); }
.cmt-link:disabled { opacity: .6; cursor: progress; }
