/* Agentrooms — "the quiet instrument" (Adam, 22 Nov 2026: slick, Linear-level).
   Graphite neutrals; hairlines rather than fills; ONE blue — the logo's, #1F5FCC — for the main
   action, where you are, and focus; amber ONLY for what waits for your
   decision (an invitation, a warning). Controls 8px, panels 12px. The system's own UI face (SF Pro,
   Segoe UI Variable, Inter where installed) for everything, set tight;
   Atkinson Hyperlegible Mono only where people compare characters (codes,
   addresses, states). On a wide screen the sections sit in a sidebar and the
   page in a raised panel; on a phone the sections are a sticky bar. A room's
   messages sit on one side, as in a team chat, another person's marked as text. Text
   pairs meet WCAG AA in both schemes (test/email.test.js checks the tokens). */
@font-face { font-family: "Atkinson Mono"; src: url(fonts/atkinson-hyperlegible-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Mono"; src: url(fonts/atkinson-hyperlegible-mono-latin-700-normal.woff2) format("woff2"); font-weight: 600 800; font-display: swap; }
:root {
  --bg: #F7F7F8; --surface: #FFFFFF; --surface-2: #F0F0F2; --ink: #17181C; --muted: #5F626B; --line: #E3E4E8; --line-strong: #D3D4DA;
  --blue: #1F5FCC; --on-blue: #FFFFFF; --link: #1F5FCC; --blue-tint: #E7EEFB; --grey-btn: #F0F0F2;
  --ok: #1A7346; --ok-bg: #E8F5EE; --warn: #8A5200; --warn-bg: #FCF3E2; --danger: #BF2F1F;
  --amber: #B86E00; --on-amber: #FFFFFF; --badge: var(--amber);
  --env: #F0F1F4; --seal: #1F5FCC; /* --seal: the notification email only */
  --info-bg: #F0F1F5; --input-line: #D3D4DA;
  --shadow: 0 1px 2px rgba(16, 17, 20, .05), 0 0 0 1px rgba(16, 17, 20, .02);
  --shadow-raised: 0 1px 3px rgba(16, 17, 20, .06), 0 8px 24px -12px rgba(16, 17, 20, .12);
  --ring: color-mix(in srgb, var(--blue) 28%, transparent);
  --sans: "Inter var", Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, sans-serif;
  --mono: "Atkinson Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1013; --surface: #16171B; --surface-2: #1D1E23; --ink: #E4E5E9; --muted: #9799A3; --line: #25262C; --line-strong: #33343B;
    --blue: #356DF3; --link: #8DB4FF; --blue-tint: #18233D; --grey-btn: #1F2026;
    --ok: #6FD6A0; --ok-bg: #10261C; --warn: #F0B357; --warn-bg: #251D0F; --danger: #FF8A80;
    --amber: #F0B357; --on-amber: #1A1206;
    --env: #1D1E24; --seal: #356DF3;
    --info-bg: #1B1C22; --input-line: #33343B;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .02);
    --shadow-raised: 0 1px 3px rgba(0, 0, 0, .5), 0 12px 32px -12px rgba(0, 0, 0, .6);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "cv11", "ss01"; text-rendering: optimizeLegibility; }
@media (max-width: 520px) { body { font-size: 16px; } }
a { color: var(--link); font-weight: 500; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
p a, dd a, small a, .steps a, .rules a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
p a:hover, dd a:hover { text-decoration-color: currentColor; }
h1 { font-size: 1.375rem; line-height: 1.25; margin: 0 0 .6rem; font-weight: 600; letter-spacing: -.02em; }
h2 { font-size: 1rem; line-height: 1.35; margin: 0 0 .6rem; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 .9rem; }
code, .code { font-family: var(--mono); }
code { background: var(--surface-2); border: 1px solid var(--line); padding: .05em .35em; border-radius: 5px; font-size: .86em; }
.handle { font-weight: 600; }
.device { font-weight: 600; overflow-wrap: anywhere; }
.muted, small { color: var(--muted); }
small { display: block; font-size: .8125rem; font-weight: 400; margin-top: .25rem; }
.fine { color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.lead { color: var(--muted); }
.center { text-align: center; }
/* A lone link under a form ("Start again", "Keep my account"): no underline until hovered. */
.fine.center a, .center.lone a { text-decoration: none; }
.fine.center a:hover, .center.lone a:hover { text-decoration: underline; }
::selection { background: color-mix(in srgb, var(--blue) 24%, transparent); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
@media (prefers-color-scheme: dark) { :focus-visible { outline-color: var(--link); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* Icons: same-origin SVG files used as masks, so they take the text colour.
   Every icon sits next to a text label and is hidden from screen readers. */
.ic { display: inline-block; width: 20px; height: 20px; flex: none; background: currentColor;
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.ic-home { -webkit-mask-image: url(icons/home.svg); mask-image: url(icons/home.svg); }
.ic-people { -webkit-mask-image: url(icons/people.svg); mask-image: url(icons/people.svg); }
.ic-chat { -webkit-mask-image: url(icons/chat.svg); mask-image: url(icons/chat.svg); }
.ic-outbox { -webkit-mask-image: url(icons/outbox.svg); mask-image: url(icons/outbox.svg); }
.ic-activity { -webkit-mask-image: url(icons/activity.svg); mask-image: url(icons/activity.svg); }
.ic-laptop { -webkit-mask-image: url(icons/laptop.svg); mask-image: url(icons/laptop.svg); }
.ic-sliders { -webkit-mask-image: url(icons/sliders.svg); mask-image: url(icons/sliders.svg); }
.ic-chevron { -webkit-mask-image: url(icons/chevron.svg); mask-image: url(icons/chevron.svg); }
.ic-shield { -webkit-mask-image: url(icons/shield.svg); mask-image: url(icons/shield.svg); }
.ic-check { -webkit-mask-image: url(icons/check.svg); mask-image: url(icons/check.svg); }
.ic-mail { -webkit-mask-image: url(icons/mail.svg); mask-image: url(icons/mail.svg); }
.ic-lock { -webkit-mask-image: url(icons/lock.svg); mask-image: url(icons/lock.svg); }
.ic-user { -webkit-mask-image: url(icons/user.svg); mask-image: url(icons/user.svg); }
.ic-back { -webkit-mask-image: url(icons/back.svg); mask-image: url(icons/back.svg); }
.ic-link { -webkit-mask-image: url(icons/link.svg); mask-image: url(icons/link.svg); }
.ic-dots { -webkit-mask-image: url(icons/dots.svg); mask-image: url(icons/dots.svg); }
.ic-download { -webkit-mask-image: url(icons/download.svg); mask-image: url(icons/download.svg); }
.ic-upload { -webkit-mask-image: url(icons/upload.svg); mask-image: url(icons/upload.svg); }
.ic-close { -webkit-mask-image: url(icons/close.svg); mask-image: url(icons/close.svg); }
/* Windows high contrast replaces backgrounds, which would erase a mask icon:
   paint icons in the system text colour instead. */
@media (forced-colors: active) {
  .ic { background: CanvasText; forced-color-adjust: none; }
  .tabs a[aria-current="page"] .ic { background: Highlight; }
}

/* ---- The frame ------------------------------------------------------------------
   Top bar: the mark and the name (signed out: Sign in on the right). */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; background: var(--bg); }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); font-size: 1.0625rem; font-weight: 600; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { display: block; width: 26px; height: 26px; }
.who { display: flex; align-items: center; gap: .7rem; }
.who form { margin: 0; }
.round { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-width: 36px; height: 36px; border-radius: 99px; background: var(--blue-tint); color: var(--link); font-weight: 600; padding: 0 .9rem 0 0; }
.round > span:first-child { width: 36px; text-align: center; }
.round:hover { text-decoration: none; }
.round .handle { color: var(--ink); font-weight: 600; }
button.link { background: none; border: 0; padding: .45rem .2rem; font: inherit; font-weight: 500; color: var(--link); cursor: pointer; }
button.link:hover { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 520px) {
  .round { padding: 0; }
  .round .handle { display: none; }
}

/* Signed in: ONE bar — the mark and the name on the left, the sections
   (Rooms, Sent, You) on the right, sticky and blurred over the page. The one
   you are on is raised; what waits for you is counted beside its label. */
.top.with-tabs { position: sticky; top: 0; z-index: 5; min-height: 56px; padding: .5rem .75rem .5rem 1rem; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); }
.tabs { display: flex; align-items: center; gap: 2px; min-width: 0; }
.tabs a { display: inline-flex; align-items: center; gap: .45rem; height: 34px; padding: 0 .7rem; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: .875rem; min-width: 0; white-space: nowrap; transition: background-color .12s, color .12s; }
.tabs a:hover { text-decoration: none; color: var(--ink); background: var(--surface-2); }
.tabs a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) { .tabs a[aria-current="page"] { background: var(--surface-2); } }
.tabs .ic { width: 17px; height: 17px; }
/* The You tab: your own avatar, in place of an icon. */
.avatar.tab { width: 20px; height: 20px; font-size: .625rem; }
.t-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-block; background: var(--badge); color: var(--on-amber); font-size: .6875rem; font-weight: 600; min-width: 1.15rem; padding: 0 .3rem; border-radius: 99px; text-align: center; line-height: 1.15rem; font-variant-numeric: tabular-nums; }
/* A phone: the mark alone (its name stays for screen readers), so the three
   sections fit beside it on the one bar. */
@media (max-width: 520px) {
  .top.with-tabs { padding: .5rem .5rem .5rem .9rem; gap: .5rem; }
  .top.with-tabs .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tabs a { gap: .35rem; padding: 0 .55rem; height: 36px; font-size: .8125rem; }
  .tabs .ic { width: 16px; height: 16px; }
}

/* A short page still has its footer at the foot of the window: the page is a
   column at least as tall as the window, and main takes the room left over. */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
main { max-width: 680px; margin: 0 auto; padding: 1.25rem 1rem 2.5rem; display: grid; gap: 1.75rem; align-content: start; }
main > * { margin: 0; min-width: 0; }
.page-title { font-size: 1.5rem; line-height: 1.2; font-weight: 600; letter-spacing: -.025em; padding-top: .1rem; margin: 0; }
footer { text-align: center; color: var(--muted); font-size: .75rem; padding: .5rem 1rem 1.75rem; }
footer p { margin: 0; }
footer a { color: var(--muted); font-weight: 500; }
footer a:hover { color: var(--ink); }

/* A wide screen, signed in: the same header is a sidebar on the left — the
   name at its top, the sections under it, the footer at its foot — and the
   page beside it, past a thin line. */
@media (min-width: 960px) {
  body:has(> .top.with-tabs) { padding-left: 232px; }
  .top.with-tabs { position: fixed; top: 0; left: 0; bottom: 0; width: 232px; z-index: 6; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: .9rem;
    padding: .9rem .6rem; border: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .top.with-tabs .brand { padding: 0 .5rem; }
  .top.with-tabs .tabs { flex-direction: column; align-items: stretch; }
  .top.with-tabs .tabs a { height: 32px; padding: 0 .6rem; gap: .6rem; border-radius: 7px; }
  .top.with-tabs .badge { margin-left: auto; }
  body:has(> .top.with-tabs) > main { max-width: none; margin: 0; min-height: 100vh; padding: 2.5rem max(2rem, calc((100% - 720px) / 2)) 3rem;
    background: var(--surface); border-left: 1px solid var(--line); }
  body.bare:has(> .top.with-tabs) > main { --px: max(2rem, calc((100vw - 232px - 720px) / 2)); padding-top: 0; padding-inline: var(--px); }
  body.bare:has(> .top.with-tabs) .convo-head { background: color-mix(in srgb, var(--surface) 84%, transparent); }
  body:has(> .top.with-tabs) > footer { position: fixed; left: 0; bottom: 0; width: 232px; z-index: 7; padding: .8rem 1.1rem 1rem; text-align: left; display: grid; gap: .2rem; justify-content: start; }
  body:has(> .top.with-tabs) > footer .contact { margin-top: .2rem; }
  body:has(> .top.with-tabs) > p.notice { margin: 0; border-radius: 0; border-width: 0 0 1px 1px; }
}

/* ---- Sections -------------------------------------------------------------------
   A .card is a section straight on the page, its heading small and quiet. A
   panel appears around what you act on or must compare: the lists, a form,
   a decision, a code. */
.card { background: none; border-radius: 0; padding: 0; }
.card > :last-child { margin-bottom: 0; }
.card > h2 { display: flex; align-items: center; gap: .45rem; font-size: .9375rem; margin-bottom: .65rem; }
.box, .card.find, .card.decide { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.card.decide { background: color-mix(in srgb, var(--warn-bg) 70%, var(--surface)); border-color: color-mix(in srgb, var(--amber) 30%, var(--line)); }
.cards { display: grid; gap: 1.5rem; }
/* A page of its own (signing in, a question, a message): one centred panel. */
.narrow { width: 100%; max-width: 440px; justify-self: center; }
.card.narrow { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem 1.5rem 1.4rem; box-shadow: var(--shadow-raised); margin-top: 1.5rem; }
.card.narrow h1 { font-size: 1.25rem; }
.card-head { display: flex; gap: .75rem; align-items: center; margin: 0 0 1rem; }
.card-head h1, .card-head h2 { margin: 0; }
.sub { margin: .15rem 0 0; color: var(--muted); font-size: .875rem; }
.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.35rem; height: 1.25rem; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: .7rem; font-weight: 600; border-radius: 99px; padding: 0 .4rem; vertical-align: .1em; font-variant-numeric: tabular-nums; }

/* Round things: avatars (a letter on a soft colour), icon tiles. */
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 600; font-size: .9rem; line-height: 1; letter-spacing: 0; }
.avatar.small { width: 26px; height: 26px; font-size: .72rem; }
.avatar.large { width: 40px; height: 40px; font-size: 1rem; }
.avatar.huge { width: 88px; height: 88px; font-size: 2rem; }
/* A person's picture (src/avatars.js) covers their letter; should it not load, the letter shows. */
.avatar.pic { position: relative; overflow: hidden; }
.avatar.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
canvas.avatar { display: block; padding: 0; }
.avatar.gone { background: var(--surface-2); border: 1px solid var(--line); }
.avatar.mark { background: var(--blue-tint); }
.avatar.mark img { display: block; }
.t0 { background: #DCE8FF; color: #183F8C; } .t1 { background: #DDF3E4; color: #155C34; } .t2 { background: #FDE2D3; color: #8A3410; }
.t3 { background: #EEE0FB; color: #5B2A8C; } .t4 { background: #FFF0C2; color: #6B4A00; } .t5 { background: #D8F1F4; color: #0F5560; }
@media (prefers-color-scheme: dark) {
  .t0 { background: #22345A; color: #CFE0FF; } .t1 { background: #1D3A29; color: #C9F0D6; } .t2 { background: #43271A; color: #FFD9C6; }
  .t3 { background: #33224A; color: #E7D6FF; } .t4 { background: #3D3112; color: #FFE7A3; } .t5 { background: #173A40; color: #C6F0F5; }
}
.round-ic { width: 32px; height: 32px; flex: none; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); display: grid; place-items: center; }
.round-ic .ic { width: 17px; height: 17px; }
.round-ic.blue { background: var(--blue-tint); border-color: transparent; color: var(--link); }
.round-ic.amber { background: var(--amber); border-color: transparent; color: var(--on-amber); }
.round-ic.ok { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.round-ic.big { width: 40px; height: 40px; border-radius: 10px; }
.round-ic.big .ic { width: 20px; height: 20px; }

/* ---- Buttons: blue for the main action, quiet for the rest ---------------------- */
.button, button.button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 500 .875rem/1.2 var(--sans); letter-spacing: -.005em; padding: .45rem .9rem; min-height: 34px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; text-align: center;
  transition: background-color .12s, border-color .12s, color .12s, box-shadow .12s; }
.button:hover { text-decoration: none; }
/* A plain .button is the blue one; .ghost is another name for the quiet one. */
.button, .primary { background: var(--blue); color: var(--on-blue); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 2px rgba(16, 17, 20, .18); }
.button:not(.secondary):not(.ghost):not(.danger):hover { background: color-mix(in srgb, var(--blue) 88%, #000); }
.secondary, .button.secondary, .button.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: 0 1px 1px rgba(16, 17, 20, .04); }
.secondary:hover, .button.secondary:hover, .button.ghost:hover { background: var(--surface-2); }
.danger, .button.danger { background: var(--surface); color: var(--danger); border-color: var(--line-strong); box-shadow: 0 1px 1px rgba(16, 17, 20, .04); }
.danger:hover, .button.danger:hover { background: color-mix(in srgb, var(--danger) 7%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 35%, var(--line-strong)); }
.button.small { padding: .3rem .65rem; min-height: 28px; font-size: .8125rem; border-radius: 7px; }
.button:active { transform: translateY(.5px); }
/* Buttons are as wide as their words, everywhere: .block no longer stretches
   one across its card (kept as a class so existing markup needs no change). */
.block { display: inline-flex; width: auto; }
/* On a touch screen every button keeps a comfortable target. */
@media (pointer: coarse), (max-width: 520px) {
  .button, button.button { min-height: 42px; padding-left: 1rem; padding-right: 1rem; font-size: .9375rem; }
  .button.small { min-height: 36px; font-size: .875rem; }
}
.button.copy::before { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: url(icons/copy.svg) center / contain no-repeat; mask: url(icons/copy.svg) center / contain no-repeat; }
@media (forced-colors: active) { .button.copy::before { background: ButtonText; forced-color-adjust: none; } .button { border: 1px solid ButtonText; } }

/* ---- Forms ---------------------------------------------------------------------- */
.stack { display: grid; gap: 1rem; margin: 0 0 1rem; }
.inline { display: flex; gap: .6rem; align-items: end; flex-wrap: wrap; margin: 0 0 .8rem; }
.grow { flex: 1 1 200px; }
label { display: block; font-weight: 500; font-size: .875rem; }
label.check { font-weight: 400; font-size: .9375rem; display: flex; gap: .65rem; align-items: flex-start; }
label.check input { width: 18px; height: 18px; flex: none; margin: .15rem 0 0; accent-color: var(--blue); }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]) {
  display: block; width: 100%; margin-top: .4rem; padding: .55rem .75rem; font: inherit; font-size: 16px; font-weight: 400;
  color: var(--ink); background: var(--surface); border: 1px solid var(--input-line); border-radius: 8px; min-height: 40px;
  box-shadow: 0 1px 1px rgba(16, 17, 20, .03); transition: border-color .12s, box-shadow .12s;
}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--input-line)); }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--ring); }
input::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
input.code { font-family: var(--mono); font-size: 1.25rem; letter-spacing: .14em; text-transform: uppercase; text-align: center; }

/* Notices: one quiet line in a hairline box, tinted by what it says. */
.notice { padding: .6rem .8rem; border-radius: 8px; background: var(--info-bg); border: 1px solid var(--line); color: var(--ink); font-size: .875rem; line-height: 1.5; }
.notice.ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); }
.notice.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--amber) 26%, transparent); color: var(--warn); }
.notice a { color: inherit; }

/* ---- Lists: grouped in one hairline panel, a row each ---------------------------- */
.list { padding: .3rem 0; }
.li { display: flex; align-items: center; gap: .8rem; padding: .65rem .9rem; color: var(--ink); font-weight: 400; transition: background-color .12s; }
.li + .li { border-top: 1px solid var(--line); }
.li:hover { text-decoration: none; background: var(--surface-2); }
.card.li { padding: .75rem .9rem; }
/* Something waits for your decision: the one amber strip. */
.card.alert { background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); border-radius: 12px; }
.card.alert:hover { background: color-mix(in srgb, var(--warn-bg) 85%, var(--amber)); }
.card.alert .li-text strong { color: var(--warn); font-weight: 600; }
.card.alert .chev { color: var(--warn); }
nav.card:not(.find) { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
nav.card > p { margin: 0; padding: .7rem .9rem; }
.li.status { padding: .6rem .9rem; }
.li.status .li-text { font-weight: 400; }
.li-text { flex: 1; min-width: 0; display: grid; }
.li-text strong { font-weight: 500; }
.li-text span { color: var(--muted); font-size: .875rem; }
.chev { width: 16px; height: 16px; color: var(--muted); }
.rows, .convos, .people-list, .notes-list, .sent-list { list-style: none; margin: 0 0 .9rem; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.rows li { display: flex; align-items: flex-start; gap: .8rem; padding: .75rem .9rem; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.p-main { flex: 1; min-width: 0; }
.p-main .muted { font-size: .8125rem; }
.actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.actions form { margin: 0; }
/* Two choices side by side at equal size (Approve / Deny, Accept / Decline);
   equal halves on a phone, no wider than 11rem each on a wide screen. */
.actions.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 11rem)); gap: .5rem; }
.actions.pair .button { width: 100%; }
@media (max-width: 520px) { .actions.pair { grid-template-columns: 1fr 1fr; } }
.actions button.link { padding: .3rem 0; margin-right: .6rem; font-size: .875rem; }
.people { list-style: none; margin: .2rem 0 1rem; padding: 0; display: grid; gap: .3rem; }
.people a { display: flex; align-items: center; gap: .7rem; padding: .3rem 0; color: var(--ink); }

/* Empty states: a quiet tile, a line, what to do next. */
.empty { display: flex; gap: .85rem; align-items: center; padding: 1.1rem 1rem; border: 1px dashed var(--line-strong); border-radius: 12px; }
.empty p { margin: 0; color: var(--muted); font-size: .875rem; }
.empty strong { display: block; color: var(--ink); font-size: .9375rem; font-weight: 600; margin-bottom: .1rem; }

/* Home: the address a person gives their app. One tap selects all of it,
   so it copies easily even where the Copy button does not run. */
.copyline { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .85rem; margin: 0 0 .7rem; }
.copyline code { display: block; background: none; border: 0; padding: 0; font: 400 .9375rem/1.5 var(--mono); overflow-wrap: anywhere;
  -webkit-user-select: all; user-select: all; cursor: text; }
.steps { list-style: none; padding: 0; margin: 1rem 0 .9rem; display: grid; gap: .6rem; }
.steps li { display: flex; gap: .7rem; align-items: center; }
.steps .n { width: 24px; height: 24px; flex: none; border-radius: 7px; background: var(--blue-tint); color: var(--link); display: grid; place-items: center; font-weight: 600; font-size: .8rem; }
.after-copy { margin-top: .9rem; }
.agent-signin { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.15rem; box-shadow: var(--shadow); }
.agent-signin .card-head { margin-bottom: .7rem; }
.agent-signin .avatar.mark { width: 32px; height: 32px; border-radius: 8px; }
.agent-signin .avatar.mark img { width: 22px; height: 22px; }
/* Compact (Adam, 22 Nov 2026): one line of why, the address with Copy inside
   it, then the apps as a row of tabs showing one app's steps at a time.
   The tabs are radio buttons (no script); their labels are the tabs. */
.agent-signin .card-head { margin-bottom: .5rem; }
.agent-signin .lead-line { color: var(--muted); font-size: .875rem; margin: 0 0 .75rem; }
.agent-signin .copyline { display: flex; align-items: center; gap: .5rem; padding: .3rem .3rem .3rem .8rem; min-height: 44px; }
.agent-signin .copyline code { flex: 1; min-width: 0; }
.agent-signin .copyline .button { flex: none; min-height: 30px; padding: .3rem .7rem; font-size: .8125rem; border-radius: 7px; }
.agent-signin > .fine { margin: .8rem 0 0; }
.app-steps { margin: .85rem 0 0; }
.app-pick { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.app-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; max-width: 100%; }
.app-tabs label { padding: .28rem .7rem; border-radius: 7px; font-size: .8125rem; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background-color .12s, color .12s; }
.app-tabs label:hover { color: var(--ink); }
#app-claude:checked ~ .app-tabs label[for="app-claude"], #app-claude-code:checked ~ .app-tabs label[for="app-claude-code"],
#app-chatgpt:checked ~ .app-tabs label[for="app-chatgpt"], #app-cursor:checked ~ .app-tabs label[for="app-cursor"],
#app-codex:checked ~ .app-tabs label[for="app-codex"], #app-grok:checked ~ .app-tabs label[for="app-grok"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) {
  #app-claude:checked ~ .app-tabs label[for="app-claude"], #app-claude-code:checked ~ .app-tabs label[for="app-claude-code"],
  #app-chatgpt:checked ~ .app-tabs label[for="app-chatgpt"], #app-cursor:checked ~ .app-tabs label[for="app-cursor"],
#app-codex:checked ~ .app-tabs label[for="app-codex"], #app-grok:checked ~ .app-tabs label[for="app-grok"] { background: var(--line-strong); }
}
#app-claude:focus-visible ~ .app-tabs label[for="app-claude"], #app-claude-code:focus-visible ~ .app-tabs label[for="app-claude-code"],
#app-chatgpt:focus-visible ~ .app-tabs label[for="app-chatgpt"], #app-cursor:focus-visible ~ .app-tabs label[for="app-cursor"],
#app-codex:focus-visible ~ .app-tabs label[for="app-codex"], #app-grok:focus-visible ~ .app-tabs label[for="app-grok"] { outline: 2px solid var(--blue); outline-offset: 1px; }
.app-steps .setup { border-top: 0; margin: .65rem 0 0; font-size: .875rem; }
.app-steps .setup dt, .app-steps .setup dd { display: none; }
.app-steps .setup dd { margin: 0; padding: 0; border: 0; }
#app-claude:checked ~ .setup dd.app-claude, #app-claude-code:checked ~ .setup dd.app-claude-code,
#app-chatgpt:checked ~ .setup dd.app-chatgpt, #app-cursor:checked ~ .setup dd.app-cursor,
#app-codex:checked ~ .setup dd.app-codex, #app-grok:checked ~ .setup dd.app-grok { display: block; }
.app-steps .setup pre, .app-steps .setup code.snippet { margin: 0 0 .45rem; }
@media (max-width: 520px) { .app-tabs label { padding: .28rem .5rem; font-size: .78rem; } }

/* What an agent did, wherever it shows. */
.agent-mark { display: flex; gap: .4rem; align-items: flex-start; font-size: .8125rem; color: var(--muted); margin-top: .3rem; }
.agent-mark .ic { width: 15px; height: 15px; margin-top: .15rem; }
.agent-mark .device { font-size: inherit; }
.button.copy + .fine { margin-top: .9rem; }

/* The signed-out start page. */
.hero { padding: 1.4rem .4rem .4rem; }
.hero h1 { font-size: 2rem; line-height: 1.15; }
.feature { display: flex; gap: .9rem; align-items: flex-start; }
.feature h2 { font-size: 1.05rem; margin-bottom: .3rem; }
.feature p { margin: 0; color: var(--muted); }

/* Rooms: one row each. */
.convos li + li { border-top: 1px solid var(--line); }
.convos a { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; color: var(--ink); font-weight: 400; transition: background-color .12s; }
.convos a:hover { text-decoration: none; background: var(--surface-2); }
.c-main { flex: 1; min-width: 0; display: grid; gap: .05rem; }
.c-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.c-head .handle { font-weight: 600; }
.c-head time { flex: none; color: var(--muted); font-size: .75rem; font-weight: 400; font-variant-numeric: tabular-nums; }
.c-prev { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .875rem; min-width: 0; }
/* Who wrote the latest message, as a small face before it. */
.avatar.tiny { width: 18px; height: 18px; font-size: .58rem; }
.c-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-note { font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }
.c-note .device { font-size: inherit; font-weight: 500; }
.unread .c-prev { color: var(--ink); font-weight: 500; }
.unread .c-note strong { color: var(--link); font-weight: 600; }
.dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
@media (prefers-color-scheme: dark) { .dot { background: var(--link); } }
.back { margin: 0; }
.back a { display: inline-flex; align-items: center; gap: .2rem; color: var(--muted); font-size: .875rem; text-decoration: none; }
.back a:hover { color: var(--ink); text-decoration: none; }
.back .ic { width: 18px; height: 18px; }

/* A room: a sticky bar with the way back and its name, then what is in it.
   On a phone the room has the whole screen (no tabs at the top); on a wide
   screen the sidebar stays beside it. */
body.bare main { --px: max(1rem, calc((100vw - 720px) / 2)); padding-top: 0; padding-inline: var(--px); max-width: none; gap: 1.25rem; }
@media (max-width: 959.98px) { body.bare > .top { display: none; } }
.convo-head { display: flex; align-items: center; gap: .4rem; min-height: 46px; padding: .3rem var(--px, 1rem); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 4; margin: 0 calc(-1 * var(--px, 1rem));
  background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); }
.convo-head .back { display: grid; place-items: center; width: 30px; height: 30px; margin-left: -6px; border-radius: 7px; color: var(--muted); }
.convo-head .back:hover { background: var(--surface-2); color: var(--ink); }
.convo-head .back .ic { width: 18px; height: 18px; }
.convo-head h1 { margin: 0; font-size: .9375rem; font-weight: 600; letter-spacing: -.01em; }
.chat { list-style: none; margin: 0; padding: 0; display: grid; }
/* The day: a hairline across with the date in the middle. */
.chat .day { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .75rem; font-weight: 500; margin: 1.1rem 0 .5rem; font-variant-numeric: tabular-nums; }
.chat > .day:first-child { margin-top: 0; }
.chat .day::before, .chat .day::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.chat .day span { padding: .1rem .6rem; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
/* A message, as in a team chat: everybody's on one side, yours too. The
   avatar, then the name and time over the words; the next ones of a run
   follow under them. ⋯ on your own, at the right. */
.chat .msg { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; column-gap: .75rem; padding: .45rem 0 .15rem; min-width: 0; }
.chat .msg.goes-on { padding-top: 0; }
.chat .msg > .avatar, .chat .msg > .m-gutter { grid-column: 1; grid-row: 1; }
.chat .msg > .m-main { grid-column: 2; grid-row: 1; min-width: 0; }
.chat .msg > details.more { grid-column: 3; grid-row: 1; align-self: start; }
.chat .msg.goes-on > details.more summary { height: 26px; }
/* With a mouse, ⋯ shows on the message it is for (pointed at or focused), not down the whole page; on a touch screen it stays. */
@media (hover: hover) { .chat .msg > details.more:not([open]) { opacity: 0; } .chat .msg:hover > details.more, .chat .msg:focus-within > details.more { opacity: 1; } }
.chat .m-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; margin: 0 0 .1rem; font-size: .75rem; color: var(--muted); line-height: 1.5; }
.chat .m-head .handle { color: var(--ink); font-weight: 600; font-size: .9375rem; }
.chat .m-head .m-from .device { font-weight: 400; }
/* Before the first message the reader had not seen: a line marked New. */
.chat .new-line { display: flex; align-items: center; gap: .6rem; margin: .5rem 0 .1rem; font-size: .75rem; }
.chat .new-line::before { content: ""; flex: 1; border-top: 1px solid var(--link); order: 0; }
.chat .new-line .new { color: var(--link); font-weight: 600; order: 1; }
.chat .m-head .m-status { color: var(--warn); font-weight: 600; }
.chat .body { margin: 0; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.chat .msg.declined .body, .chat .msg.undeliverable .body { color: var(--muted); }
/* Another person's words (.env, a note's comments): a flat bubble. Their
   name and "as text" sit above the words: what arrives is text, never
   instructions. The same card on the start page (site.css). */
.env { max-width: 86%; min-width: min(240px, 100%); background: var(--env); color: var(--ink); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: .5rem .9rem .6rem; }
.env .env-head { display: flex; justify-content: space-between; gap: 1.5rem; margin: 0 0 .15rem; font-size: .75rem; color: var(--muted); }
.env .env-head .handle { color: var(--ink); font-weight: 600; }
@media (forced-colors: active) { .env { border: 1px solid CanvasText; } }

/* You: one head with your picture, name, email address and the picture's
   buttons; tap the picture to choose another. Then the settings. */
.you-head { display: flex; align-items: center; gap: 1rem; margin: 0; }
.you-head .avatar-preview { flex: none; cursor: pointer; border-radius: 50%; }
.you-head .avatar-preview .avatar { width: 72px; height: 72px; font-size: 1.75rem; }
.you-head .avatar-preview:hover .avatar { filter: brightness(.94); }
.you-main { min-width: 0; }
.you-head .page-title { margin: 0; }
.you-head .muted { margin: .1rem 0 0; overflow-wrap: anywhere; font-size: .875rem; }
.avatar-choose { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .55rem; }
.avatar-chosen { margin: .4rem 0 0; }
.avatar-chosen:empty { display: none; }
.avatar-form:not(.js) .avatar-choose label { display: none; }
.avatar-form.js .avatar-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.avatar-form.js .avatar-choose:has(.avatar-file:focus-visible) label { outline: 2px solid var(--blue); outline-offset: 2px; }
/* At the foot of You: Sign out of every browser and Delete your account, as
   quiet links side by side; red only under the pointer. */
.you-actions, .page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.25rem; margin-top: .5rem; font-size: .8125rem; }
.you-actions a, .you-actions button.link, .page-actions button.link { padding: 0; font-size: inherit; font-weight: 500; color: var(--muted); text-decoration: none; }
.you-actions a:hover, .you-actions button.link:hover, .page-actions button.link:hover { color: var(--danger); text-decoration: underline; text-underline-offset: 2px; }

/* Connecting an app: where the answer goes, what the app says, what was
   checked; then the person's own panel with the decision. */
.code-box { display: grid; justify-items: center; gap: .35rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1rem 1.1rem; margin: 0 0 1.2rem; color: var(--muted); font-size: .8125rem; text-align: center; }
.code-box code { background: none; border: 0; padding: 0; font-size: 2.2rem; line-height: 1.1; font-weight: 700; letter-spacing: .02em; color: var(--ink); overflow-wrap: anywhere; }
.code-box code.long { font-size: 1.5rem; letter-spacing: 0; }
.code-box .target-what { font-size: 1.125rem; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
@media (max-width: 520px) { .code-box code { font-size: 2rem; } .code-box code.long { font-size: 1.3rem; } }
.sec { display: flex; align-items: center; gap: .4rem; font-size: .9375rem; margin: 1.1rem 0 .45rem; }
.sec .ok { color: var(--ok); width: 17px; height: 17px; }
.tag { font-size: .6875rem; font-weight: 600; color: var(--warn); background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--amber) 26%, transparent); border-radius: 99px; padding: .05rem .45rem; }
.kv { display: grid; grid-template-columns: 8rem 1fr; gap: .45rem .75rem; margin: 0 0 .3rem; font-size: .875rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.decide h2 { font-size: 1rem; }
.decide .stack { margin: 0; }
.approve > .card-head h1 { font-size: 1.25rem; }

/* How to add Agentrooms to an app (/agent), and the privacy page and terms:
   documents, read by people and by agents. Plain HTML, no script. The
   address is the one box on the page; commands sit in their own boxes so
   they wrap cleanly on a phone. */
.agent-doc { padding: 0; display: grid; gap: 2rem; }
.agent-doc > * { margin: 0; min-width: 0; }
.agent-doc h1 { font-size: 1.875rem; line-height: 1.15; letter-spacing: -.03em; margin: 0 0 .6rem; }
.agent-doc h2 { font-size: 1.125rem; letter-spacing: -.015em; }
.agent-doc .lead { color: var(--ink); font-size: 1.0625rem; margin: -1.4rem 0 0; max-width: 36rem; }
.agent-doc section > p { max-width: 38rem; }
.agent-doc pre { margin: .45rem 0 .7rem; padding: .7rem .85rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.agent-doc pre code { background: none; border: 0; padding: 0; font-size: .875rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.agent-doc section.card > pre { overflow: hidden; }
.agent-doc p code, .agent-doc dd > code { white-space: nowrap; }
.agent-doc .address pre { padding: .9rem 1rem; border-radius: 10px; }
.agent-doc .address pre code { font-size: 1.0625rem; -webkit-user-select: all; user-select: all; cursor: text; }
.agent-doc .steps { list-style: decimal; padding-left: 1.3rem; display: block; }
.agent-doc .steps li { display: list-item; margin-bottom: .45rem; }
.setup { margin: 0 0 1.1rem; border-top: 1px solid var(--line); }
.setup dt { font-weight: 600; font-size: 1rem; padding-top: .9rem; }
.setup dd { margin: .2rem 0 0; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.setup dd pre:last-child { margin-bottom: 0; }
/* A snippet that is longer than a phone is wide gets its own box. */
.setup code.snippet { display: block; margin: .45rem 0 .5rem; padding: .7rem .85rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .875rem; }
.rules { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.rules li { padding: .8rem 0; border-bottom: 1px solid var(--line); margin: 0; }
/* /agent as documentation: what each tool does, in the same rows as "App by app". */
.setup.tools dt { font-size: .9375rem; }
/* Whether a tool only reads or changes something: a small tag after its line. */
.setup .kind { display: inline-block; margin-left: .3rem; padding: 0 .4rem; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: .6875rem; font-weight: 500; line-height: 1.35rem; vertical-align: 1px; }
.setup .kind.changes { color: var(--ink); }
/* /agent: the reference parts, folded under their headings; the tools in two columns. */
.agent-doc .fold { border-top: 1px solid var(--line); margin-top: -1rem; }
.agent-doc .fold summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; }
.agent-doc .fold summary::-webkit-details-marker { display: none; }
.agent-doc .fold summary::after { content: ""; width: 8px; height: 8px; margin: -4px 4px 0 0; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; flex: none; }
.agent-doc .fold details[open] summary::after { margin-top: 4px; transform: rotate(225deg); }
@media (prefers-reduced-motion: reduce) { .agent-doc .fold summary::after { transition: none; } }
.agent-doc .fold summary h2 { margin: 0; }
.agent-doc .fold details > :last-child { margin-bottom: 1rem; }
.agent-doc .fold + .contact-line { border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: -1rem; }
@media (min-width: 640px) {
  .setup.tools { display: grid; grid-template-columns: 11rem 1fr; }
  .setup.tools dt { padding: .7rem 1rem .7rem 0; border-bottom: 1px solid var(--line); }
  .setup.tools dd { margin: 0; padding: .7rem 0; }
}
.setup.tools dd { font-size: .9375rem; }
.agent-doc .approve-step { padding: .75rem .95rem; background: var(--blue-tint); border-radius: 10px; color: var(--ink); }
table.limits { width: 100%; border-collapse: collapse; font-size: .9375rem; }
table.limits th, table.limits td { text-align: left; vertical-align: top; padding: .6rem 0; border-top: 1px solid var(--line); }
table.limits th { font-weight: 600; padding-right: 1rem; width: 11rem; }
@media (max-width: 639.98px) { table.limits th, table.limits td { display: block; width: auto; } table.limits td { border-top: 0; padding-top: 0; } }
.agent-doc .contact-line { overflow-wrap: anywhere; }

@media (max-width: 520px) {
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dd { margin-bottom: .55rem; }
}

/* A short note under a form button. */
.card form + p { margin-top: .7rem; }

/* ---- People ------------------------------------------------------------------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.find label { display: block; font-size: .9375rem; font-weight: 600; margin: 0 0 .6rem; }
.find-row { display: flex; align-items: center; gap: .35rem; padding: 3px; background: var(--surface); border: 1px solid var(--input-line); border-radius: 9px;
  box-shadow: 0 1px 1px rgba(16, 17, 20, .03); transition: border-color .12s, box-shadow .12s; }
.find-row:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--input-line)); }
.find-row:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--ring); }
/* Block by username opens its dialog only once a name is typed (the field is required). */
#block-form:has(#block-name:invalid) [popovertarget] { opacity: .45; pointer-events: none; }
.find-row + .fine { margin-top: .55rem; }
/* One slim control (Adam, 22 Nov 2026): the field has no box of its own and
   the button sits inside, on the right. The rule is as specific as the
   general field rule, so it wins over its margin, border and ring. */
.find-row input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),
.find-row input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):hover,
.find-row input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):focus {
  flex: 1; min-width: 0; margin: 0; min-height: 32px; padding: .3rem .55rem; border: 0; background: transparent; box-shadow: none; outline: none; }
.find-row .button { flex: none; min-height: 32px; padding: .3rem .85rem; border-radius: 6px; font-size: .8125rem; }
@media (pointer: coarse), (max-width: 520px) {
  .find-row input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]) { min-height: 38px; }
  .find-row .button { min-height: 38px; font-size: .875rem; }
}
.people-list > li { display: flex; gap: .8rem; align-items: flex-start; padding: .75rem .9rem; border-top: 1px solid var(--line); }
.people-list > li:first-child { border-top: 0; }
/* The People page, flat (Adam, 24 Nov 2026): no frames, just rows on the page
   with hairlines between, small avatars, one line a person. */
/* Devices: one app a row, its name over one muted line, Sign out as a quiet
   link at the right; the signed-out ones folded away under the list. */
.device-list { list-style: none; margin: 0; padding: 0; }
.device-list > li { display: flex; align-items: center; gap: .8rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.device-list > li:first-child { border-top: 0; }
.device-list .p-main { flex: 1; min-width: 0; }
.device-list .device { font-weight: 600; overflow-wrap: anywhere; }
.device-list .muted { font-size: .8125rem; overflow-wrap: anywhere; }
.device-list button.link { flex: none; padding: .3rem 0; font-size: .8125rem; color: var(--muted); }
.device-list button.link:hover { color: var(--danger); }
.signed-out > summary { cursor: pointer; color: var(--muted); font-size: .875rem; font-weight: 500; }
.signed-out[open] > summary { margin-bottom: .4rem; }
.signed-out .device { font-weight: 500; color: var(--muted); }
.people-list.flat { background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; margin: 0; }
.people-list.flat > li { align-items: center; gap: .65rem; padding: .5rem 0; }
.people-list.flat .p-head { align-items: center; }
.people-list.flat .handle { font-weight: 600; }
.people-list.flat .muted { font-size: .8125rem; }
.people-list.flat .muted .device { font-weight: 500; }
.card.find.flat { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
.card.find.flat label { display: block; margin: 0 0 .45rem; }
.switch-row.flat { background: none; border: 0; border-radius: 0; box-shadow: none; padding: .25rem 0; }
.p-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.p-head > div { min-width: 0; padding-top: .2rem; }
.p-head .handle { font-size: .9375rem; }
.p-head .muted { display: block; font-size: .8125rem; }
.p-main .muted .handle { font-size: inherit; } /* A name inside a grey line keeps that line's size. */
.p-head form { margin: 0; flex: none; }
/* A row that is only a name: the name and its button sit on the avatar's middle
   line. With more lines under the name, they start at the avatar's top. */
.p-head:not(:has(.muted, .agent-mark)) { align-items: center; min-height: 40px; }
.p-head:not(:has(.muted, .agent-mark)) > div { padding-top: 0; }
.people-list .actions.pair { margin-top: .6rem; }
.people-list + .notice { margin: .6rem 0 0; }
/* An on/off row: the setting's name and a switch (a form button, no script;
   role="switch" tells screen readers whether it is on). */
.switch-row { display: flex; align-items: center; gap: .65rem; margin: 0; padding: .7rem .8rem .7rem .95rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.switch-row > .ic { width: 18px; height: 18px; color: var(--muted); }
.switch-row h2 { flex: 1; margin: 0; font-size: .9375rem; font-weight: 500; }
/* One line under a switch, saying what it does. */
.switch-fine { margin: .5rem .95rem 0; overflow-wrap: anywhere; }
.switch { flex: none; position: relative; width: 42px; height: 24px; padding: 0; border: 0; border-radius: 99px; cursor: pointer; background: var(--line-strong); transition: background-color .15s; }
.switch::before { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16, 17, 20, .25); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--blue); }
.switch[aria-checked="true"]::before { transform: translateX(18px); }
.switch:hover { filter: brightness(.96); }
.switch:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
@media (prefers-reduced-motion: reduce) { .switch, .switch::before { transition: none; } }
@media (forced-colors: active) { .switch { border: 1px solid ButtonText; } .switch::before { background: ButtonText; } .switch[aria-checked="true"] { background: Highlight; } }
.switch-note { font-size: .8125rem; color: var(--muted); font-weight: 500; }
/* "More" (⋯): a dropdown under the button, no script. While it is open, a
   clear layer over the whole page belongs to the button, so a tap anywhere
   outside the menu closes it. */
details.more { flex: none; position: relative; }
details.more > summary { list-style: none; cursor: pointer; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 7px; width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; transition: background-color .12s, border-color .12s, color .12s; }
details.more > summary .ic { width: 18px; height: 18px; }
details.more > summary:hover, details.more > summary:focus-visible { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { background: var(--blue-tint); border-color: transparent; color: var(--link); }
details.more[open] > summary::before { content: ""; position: fixed; inset: 0; z-index: 30; cursor: default; }
.more-actions { position: absolute; top: calc(100% + 4px); right: 0; z-index: 31; display: flex; flex-direction: column; gap: 1px;
  width: max-content; min-width: 12rem; max-width: min(20rem, calc(100vw - 2rem)); padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-raised); }
.more-actions form { margin: 0; display: flex; }
.more-actions > .button { width: 100%; }
.more-actions .button, .more-actions .button.danger { flex: 1; justify-content: flex-start; text-align: left; min-height: 34px; padding: .45rem .7rem; border: 0; border-radius: 7px;
  background: transparent; box-shadow: none; color: var(--ink); font-size: .875rem; font-weight: 500; }
/* One line of text, not flex items: "Block" and the name sit on one baseline, a plain space apart. */
.more-actions .button { display: block; line-height: 1.4; overflow-wrap: anywhere; }
.more-actions .handle { font-size: inherit; }
.more-actions .button:hover { background: var(--surface-2); }
.more-actions .button.danger { color: var(--danger); }
.more-actions .button.danger:hover { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
/* A list that clips its rounded corners lets an open menu hang out of it. */
:is(.rows, .people-list, .files-list):has(details.more[open]) { overflow: visible; }
/* "Are you sure?": a popover dialog over the page (views.js confirmAction), no script.
   Its margins are set as .confirm[popover], so that a rule for the box it sits
   in (.card > :last-child, which zeroes the bottom margin) cannot pull it off centre. */
.confirm[popover] { margin: auto; }
.confirm { inset: 0; inset: 0; width: min(25rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; padding: 1.25rem 1.25rem 1.1rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px -16px rgba(16, 17, 20, .4); }
.confirm::backdrop { background: rgba(16, 17, 20, .38); }
/* The ⋯ menu that opened it steps aside while it asks. */
body:has(.confirm:popover-open) .more-actions { visibility: hidden; }
.confirm h2 { margin: 0 0 .45rem; font-size: 1.0625rem; line-height: 1.35; letter-spacing: -.01em; overflow-wrap: anywhere; }
.confirm p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.confirm-actions { display: flex; justify-content: flex-end; gap: .5rem; margin: 1.15rem 0 0; }
.confirm-actions .button { min-width: 6.5rem; }
@media (max-width: 520px) {
  .confirm[popover] { margin: auto auto 1rem; }
  .confirm-actions .button { flex: 1; }
}
.block-someone > summary { cursor: pointer; font-weight: 500; color: var(--link); }
.block-someone[open] > summary { margin-bottom: .8rem; }
.p-head > div { flex: 1 1 0; }
.connect-link .actions.pair + .fine { margin: .8rem 0 0; }
.decide .notice { padding: 0; background: none; border: 0; color: var(--ink); }
.decide .notice.warn strong { color: var(--warn); }
.env .env-head strong { color: var(--muted); font-weight: 600; }
/* Signed in: Privacy, Terms and Sign out, quietly, at the foot of every page. */
footer:has(> form) { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .3rem 1.2rem; }
/* "Help and contact": a line of its own under the others. */
footer .contact { flex-basis: 100%; margin-top: .3rem; overflow-wrap: anywhere; }
footer > form { margin: 0; }
footer button.link { font-size: .75rem; color: var(--muted); padding: 0; }
footer button.link:hover { color: var(--ink); }
.li.status .li-text strong { font-weight: 500; }

/* ---- Activity ------------------------------------------------------------------
   Everything an agent did, as a record: one line each, a small tile for its
   kind, the app and the time beneath. Days are quiet headings inside the one
   panel. Nothing on it acts, so nothing on it is blue but the links. */
.activity { list-style: none; margin: 0 0 .9rem; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.activity .day { padding: .45rem .9rem; font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.activity .act + .day { border-top: 1px solid var(--line); }
.act { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: .75rem; align-items: start; padding: .7rem .9rem; }
.act + .act { border-top: 1px solid var(--line); }
.act-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.act-ic .ic { width: 15px; height: 15px; }
.act-main { min-width: 0; }
.act-main > p { margin: 0; }
.act-line { font-size: .875rem; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.act-line a { color: inherit; text-decoration: none; }
.act-line a:hover { color: var(--link); }
.act-line a:hover .handle { color: inherit; }
.act-line .state { font-size: .6875rem; padding: .05rem .45rem; vertical-align: .05em; }
.act-text { margin-top: .25rem !important; font-size: .8125rem; line-height: 1.45; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.act-meta { margin-top: .2rem !important; font-size: .75rem; color: var(--muted); }
.act-meta .device { font-size: inherit; font-weight: 500; color: var(--ink); }
.act-meta time { font-variant-numeric: tabular-nums; }
.page-title + .lead-line { margin-top: -1.35rem; font-size: .875rem; }
.copyline.link-big { padding: 1rem 1.05rem; border-radius: 10px; }
.copyline.link-big code { font-size: 1.0625rem; line-height: 1.45; }
.link-share > :last-child, .link-manage > :last-child { margin-bottom: 0; }
.link-share .copy-row { margin: 0 0 .9rem; }
.link-share .copy-row:has(> [hidden]) { display: none; }
.link-manage .actions.pair { margin-top: .2rem; }
.link-row { display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; border-radius: 12px; background: var(--blue-tint); color: var(--ink); font-weight: 400; }
.link-row:hover { text-decoration: none; filter: brightness(.98); }
.link-ic { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--blue); color: var(--on-blue); display: grid; place-items: center; }
.link-row-text { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.link-row-text strong { font-size: 1rem; font-weight: 600; }
.link-row-text span { color: var(--muted); font-size: .875rem; }
.link-row-text .link-peek { font-family: var(--mono); color: var(--link); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-row .chev { color: var(--link); }

/* Markdown in a message (note #34, src/markdown.js): formatting inside the
   message's own panel, quiet, never larger than the page's own headings. */
.md :where(p, ul, ol, blockquote, pre, hr) { margin: 0; }
.md > * + *, .md li > * + *, .md blockquote > * + * { margin-top: .6em; }
.md ul, .md ol { padding-left: 1.4em; }
.md ul { list-style: disc; }
.md ol { list-style: decimal; }
.md ul ul { list-style: circle; }
.md li + li { margin-top: .2em; }
.md .md-h { font-weight: 600; }
.md .md-h1 { font-size: 1.1em; }
.md blockquote { border-left: 2px solid color-mix(in srgb, currentColor 25%, transparent); padding-left: .75em; }
.md code { font-family: var(--mono); font-size: .86em; }
.md .md-code { font-family: var(--mono); font-size: .86em; padding: .5em .75em; border: 1px solid color-mix(in srgb, currentColor 16%, transparent); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Inside a code block the code is the block's own text: no chip of its own. */
.md .md-code code { background: none; border: 0; padding: 0; border-radius: 0; font-size: inherit; }
.md .md-info { display: block; color: var(--muted); font-size: .8em; }
.md hr { border: 0; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
/* A link takes the text's own colour (so it shows on any bubble) and is
   underlined; it and its address are isolated, left to right, so no
   direction mark in the text around them can reorder what they say. */
.md a { color: inherit; font-weight: 400; text-decoration: underline; unicode-bidi: isolate; direction: ltr; }
.md small { display: inline; }
.md .md-href { color: inherit; opacity: .75; font-size: .85em; overflow-wrap: anywhere; unicode-bidi: isolate; direction: ltr; }
/* The app-by-app steps outside /agent too: commands wrap inside their own box. */
.setup pre { margin: .45rem 0 .7rem; padding: .7rem .85rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.setup pre code { background: none; border: 0; padding: 0; font-size: .875rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- Notes in a room (docs/rooms-spec.md, section 7) ------------------------------
   A room's own row: Messages, Notes, Files, People — a segmented control
   under the room's name; the one you are on is raised. */
/* A room's bar: its name, then its tabs flat along the bar's foot, the
   current one underlined. */
.convo-head.room-head { display: grid; gap: 0; padding-top: .3rem; padding-bottom: 0; }
.room-head .rh-name { display: flex; align-items: center; gap: .4rem; min-width: 0; min-height: 36px; }
.room-tabs { display: flex; gap: 1.25rem; overflow-x: auto; scrollbar-width: none; margin-bottom: -1px; }
.room-tabs::-webkit-scrollbar { display: none; }
.room-tabs a { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem 0 .55rem; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; font-size: .875rem; white-space: nowrap; transition: color .12s, border-color .12s; }
.room-tabs a:hover { text-decoration: none; color: var(--ink); }
.room-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.room-tabs .n { color: var(--muted); font-weight: 500; font-size: .75rem; font-variant-numeric: tabular-nums; }
.convo-head .crumb { margin: 0; font-size: .875rem; min-width: 0; overflow-wrap: anywhere; }
/* A state: a short label a note carries. Mono, because people compare them
   letter for letter; a hairline pill with a dot, so it reads as a label and
   not a button. */
.state { display: inline-flex; align-items: center; gap: .35rem; font: 500 .75rem/1.3 var(--mono); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 99px; padding: .12rem .55rem; white-space: nowrap; }
span.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--blue) 70%, var(--muted)); flex: none; }
.states { display: inline-flex; flex-wrap: wrap; gap: .3rem; vertical-align: middle; }
/* Narrowing the notes to one state: the same labels as links, with how many notes carry each. */
.state-filter { display: flex; flex-wrap: wrap; gap: .35rem; }
.state-filter a.state { padding: .3rem .65rem; font-weight: 500; min-height: 30px; transition: border-color .12s, background-color .12s; }
.state-filter a.state:hover { text-decoration: none; border-color: color-mix(in srgb, var(--ink) 30%, var(--line-strong)); }
.state-filter a.state.on { background: var(--blue-tint); border-color: color-mix(in srgb, var(--blue) 40%, transparent); color: var(--link); font-weight: 600; }
.state-filter .n { color: var(--muted); font-family: var(--sans); font-variant-numeric: tabular-nums; }
.state-filter a.state.on .n { color: inherit; }
/* The list: one row a note, its title first, then its states and who changed it last. */
.notes-list li { border-bottom: 1px solid var(--line); }
.notes-list li:last-child { border-bottom: 0; }
.notes-list a { display: grid; gap: .3rem; padding: .75rem .9rem; color: var(--ink); font-weight: 400; min-width: 0; transition: background-color .12s; }
.notes-list a:hover { text-decoration: none; background: var(--surface-2); }
.n-title { font-weight: 600; font-size: .9375rem; color: var(--ink); overflow-wrap: anywhere; letter-spacing: -.005em; }
.n-meta { font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }
/* A note's own page: the title, one quiet line on who wrote this version,
   then the text on the page itself — it is the thing to read. */
.note { display: grid; gap: .55rem; min-width: 0; }
.note > * { margin: 0; }
.note-title { font-size: 1.5rem; line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
.note-meta { font-size: .75rem; color: var(--muted); }
.note-meta .handle { color: var(--ink); }
.note-body { font: inherit; font-size: 1rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; padding-top: .9rem; border-top: 1px solid var(--line); }
.note-body.md { white-space: normal; }
.note-body.md .md-h1 { font-size: 1.25em; }
.note-body.md .md-h2 { font-size: 1.1em; }
/* Comments: each as its writer's text, in the flat bubble messages use. */
.comments { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .15rem; }
.comments > li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; column-gap: .6rem; padding: .35rem 0; min-width: 0; position: relative; }
.comments > li > .avatar { width: 24px; height: 24px; font-size: .68rem; margin-top: .1rem; }
.comments .c-main { display: grid; gap: .1rem; }
.comments .env-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .45rem; margin: 0; font-size: .75rem; color: var(--muted); }
.comments .env-head .handle { color: var(--ink); font-weight: 600; font-size: .8125rem; }
.comments .env-head .m-from .device { font-weight: 400; }
.comments .body { margin: 0; font: inherit; font-size: .875rem; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.comments .body.md { white-space: normal; }
.comments > li > details.more { grid-column: 3; align-self: start; }
.comments > li > details.more summary { width: 26px; height: 26px; }
@media (hover: hover) { .comments > li > details.more:not([open]) { opacity: 0; } .comments > li:hover > details.more, .comments > li:focus-within > details.more { opacity: 1; } }
/* The record of state changes, and the versions: rows, the action at the right. */
.state-history li, .versions li { align-items: center; }
.state-history .p-main, .versions .p-main { flex: 1; min-width: 0; }
.state-history form, .versions form { margin: 0; flex: none; }
.state-history .muted, .versions .muted { font-size: .8125rem; }
.state-history .device { font-weight: 500; }
ol.versions { list-style: none; padding: 0; }
.versions li { position: relative; flex-wrap: wrap; }

/* A table in a message or a note (docs/rooms-spec.md, section 6.1). It scrolls
   sideways inside its own box, so a wide one never widens the page. Lines and
   the header's tint come from the text's own colour, so it reads on the page,
   in the flat bubble and in your own blue one. */
.md .md-scroll { overflow-x: auto; max-width: 100%; }
.md-table { border-collapse: collapse; font-size: .92em; white-space: normal; }
.md-table th, .md-table td { border: 1px solid color-mix(in srgb, currentColor 18%, transparent); padding: .3em .65em; text-align: left; vertical-align: top; overflow-wrap: normal; word-break: normal; }
.md-table th { font-weight: 600; background: color-mix(in srgb, currentColor 6%, transparent); }
.md-table .md-c { text-align: center; }
.md-table .md-r { text-align: right; }
.md-table .md-l { text-align: left; }
/* A table is as wide as it needs; the boxes around it must be allowed to be
   narrower, or it would widen the page instead of scrolling in its own box. */
.note > *, .comments > li > *, .comments .c-main > * { min-width: 0; }
/* In a narrow box (a phone, a bubble) a table takes up to 30rem and scrolls,
   so a cell of several words is not squeezed to one word a line. */
.md-table { width: max-content; max-width: max(100%, 30rem); }

/* Files in a room (docs/rooms-spec.md, section 8): the upload form, the list, a fingerprint. */
.upload { margin: 0 0 .5rem; }
/* One box: icon, the browser's picker (its button and the chosen name), Upload. Dashed and quiet
   while empty; solid and blue once a file is chosen. The picker fills the box, so a file can be
   dropped anywhere on it. */
.upload-box { display: flex; align-items: center; gap: .5rem; padding: .5rem .5rem .5rem .8rem; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface-2); transition: border-color .15s, background-color .15s; }
.upload-box:hover { border-color: var(--blue); }
.upload-box:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.upload-box:has(input:valid) { border-style: solid; border-color: var(--blue); background: color-mix(in srgb, var(--blue) 6%, var(--surface)); }
.upload-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: .65rem; cursor: pointer; color: var(--muted); }
.upload-box:has(input:valid) .upload-pick .ic { color: var(--blue); }
.upload-pick input { flex: 1; min-width: 0; font: inherit; font-size: .875rem; color: var(--muted); cursor: pointer; }
.upload-pick input:focus { outline: none; }
.upload-pick input:valid { color: var(--ink); font-weight: 500; }
.upload-pick input::file-selector-button { font: 500 .8125rem var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 7px; padding: .35rem .7rem; margin-right: .7rem; cursor: pointer; }
.upload-pick:hover input::file-selector-button { border-color: var(--blue); }
.upload-box .button { flex: none; }
.upload-box:has(input:invalid) .button { opacity: .5; }
@media (max-width: 520px) {
  .upload-box { flex-wrap: wrap; padding: .6rem; }
  .upload-box .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .upload-box { transition: none; } }
@media (forced-colors: active) { .upload-box:has(input:valid) { border-color: Highlight; } }
.files-list .n-title { overflow-wrap: anywhere; }
/* A file looks like a file: a sheet with a folded corner, its kind on it
   (views.js fileKind), and a way to download it without opening it. */
.ftile { --ft: #6B7080; position: relative; flex: none; width: 34px; height: 42px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px;
  border-radius: 5px; background: color-mix(in srgb, var(--ft) 13%, var(--surface)); color: color-mix(in srgb, var(--ft) 88%, #000);
  font: 700 .5625rem/1 var(--sans); letter-spacing: .03em; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); }
.ftile::after { content: ""; position: absolute; top: 0; right: 0; width: 10px; height: 10px; border-bottom-left-radius: 3px; background: color-mix(in srgb, var(--ft) 32%, var(--surface)); }
.ftile.k-pdf { --ft: #D92D20; }
.ftile.k-doc { --ft: #2463D6; }
.ftile.k-sheet { --ft: #17924A; }
.ftile.k-image { --ft: #7C4BD8; }
.ftile.k-text { --ft: #4B5565; }
.ftile.k-archive { --ft: #B76E00; }
.ftile.k-media { --ft: #0E8A8A; }
@media (prefers-color-scheme: dark) {
  .ftile { background: color-mix(in srgb, var(--ft) 24%, var(--surface)); color: color-mix(in srgb, var(--ft) 45%, #fff); }
  .ftile::after { background: color-mix(in srgb, var(--ft) 45%, var(--surface)); }
}
@media (forced-colors: active) { .ftile { border: 1px solid CanvasText; clip-path: none; } .ftile::after { display: none; } }
.files-list li { display: flex; align-items: center; }
.files-list a.f-row { flex: 1; display: flex; align-items: center; gap: .8rem; }
/* A row is the file: tapping it opens its preview, or downloads a file that has none (the arrow inside
   says so); the arrow beside a preview's row downloads; ⋯ beside it, for whoever may delete it. */
.files-list li > a.f-dl { margin-right: .6rem; padding: 0; }
.files-list li > a.f-dl + details.more { margin-left: -.35rem; }
.files-list .f-text { flex: 1; display: grid; gap: .2rem; min-width: 0; }
.files-list .f-dl { flex: none; display: grid; place-items: center; width: 30px; height: 30px; color: var(--muted); border: 1px solid transparent; border-radius: 7px; transition: background-color .12s, border-color .12s, color .12s; }
/* The arrow answers its own hover as ⋯ does (details.more > summary); the row itself has no hover effect
   (Adam, 23 Nov 2026), and keyboard focus keeps the browser's ring. */
.files-list .f-dl:hover { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.files-list a.f-row { transition: none; }
.files-list a.f-row:hover { background: none; }
.files-list .f-dl .ic { width: 18px; height: 18px; }
.files-list li > details.more { flex: none; margin-right: .6rem; }
.files-list .n-warn { color: var(--warn); font-weight: 500; }
/* A file's own page: its tile, name and who uploaded it, Download and ⋯ at the right; then the file
   itself — a picture on a quiet checkered ground (so a transparent one reads), or its text. */
.fv-head { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.fv-text { flex: 1; display: grid; gap: .25rem; min-width: 0; }
.fv-text > * { margin: 0; }
.fv-head .note-title { font-size: 1.375rem; }
.fv-actions { flex: none; display: flex; align-items: center; gap: .4rem; }
.fv-actions .button .ic { width: 15px; height: 15px; margin-right: .35rem; }
.fv-image { margin: 0; padding: .9rem; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center;
  background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 18px 18px; }
.fv-image img { display: block; max-width: 100%; max-height: 75vh; height: auto; }
.fv-pdf { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.fv-pdf iframe { display: block; width: 100%; height: min(80vh, 1100px); border: 0; }
.fv-code { margin: 0; padding: .9rem 1rem; font: .8125rem/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; tab-size: 4; }
.pager { display: flex; align-items: center; justify-content: center; gap: .8rem; font-size: .8125rem; }
@media (max-width: 520px) {
  .fv-head { flex-wrap: wrap; }
  .fv-actions { width: 100%; }
}
.mono { font-family: var(--mono); font-size: .85em; overflow-wrap: anywhere; }
/* The files chosen, listed inside the upload box by files.js (the Files tab's one script): a row
   each, name and size; a line in the warning colour when they are more than one upload takes. */
.upload-box:has(.chosen:not([hidden])) { flex-wrap: wrap; }
.chosen { flex-basis: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); list-style: none; margin: .1rem 0 0; padding: .35rem 0 0; display: grid; gap: 2px; border-top: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line)); font-size: .8125rem; }
.chosen[hidden] { display: none; }
.chosen li { display: flex; align-items: center; gap: .75rem; padding: .15rem .1rem .15rem 2.05rem; min-height: 32px; }
.chosen .c-name { flex: 1; }
.chosen .c-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.chosen .c-size { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.chosen li.warn { margin-top: .2rem; padding: .45rem .6rem; border-radius: 8px; background: var(--warn-bg); color: var(--warn); }
.chosen li.warn .c-name { white-space: normal; }
/* A name the room already has, or chosen twice: the server would refuse it. */
.chosen li.taken .c-name { color: var(--warn); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.chosen .c-tag { flex: none; padding: .05rem .45rem; border-radius: 99px; background: var(--warn-bg); color: var(--warn); font-size: .75rem; font-weight: 500; }
.chosen .c-remove { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-left: -.35rem; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.chosen .c-remove .ic { width: 16px; height: 16px; }
.chosen .c-remove:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.chosen .c-remove:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
@media (max-width: 520px) {
  .chosen { order: 1; }
  .upload-box .button { order: 2; }
  .chosen li { padding-left: .3rem; }
}
