/* Hail — "the envelope" (note #33, 18 Nov 2026), on the familiar social-app
   structure of notes #18/#19. A paper page with no boxes and no shadows;
   blue-black ink; ONE blue for actions and your own words; amber ONLY for
   what waits for your decision. Another person's words arrive in a flat
   bubble (.env), marked as text, the same in the app and on the start page. Atkinson Hyperlegible Next for everything, its Mono only where
   people compare characters (codes, addresses). Fonts are served from
   /static/fonts/ (font-src 'self'). Text pairs meet WCAG AA in both schemes. */
@font-face { font-family: "Atkinson Next"; src: url(fonts/atkinson-hyperlegible-next-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url(fonts/atkinson-hyperlegible-next-latin-700-normal.woff2) format("woff2"); font-weight: 600 800; font-display: swap; }
@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: #F6F7F9; --surface: #FFFFFF; --ink: #1A2233; --muted: #5A6476; --line: #DDE2EA;
  --blue: #1F5FCC; --on-blue: #FFFFFF; --link: #1F5FCC; --blue-tint: #E4ECFA; --grey-btn: #E6E9EF;
  --ok: #157A47; --ok-bg: #E4F4EA; --warn: #8A5200; --warn-bg: #FCF1DE; --danger: #C0261C;
  --amber: #B86E00; --on-amber: #FFFFFF; --badge: var(--amber);
  --env: #E9EEF8; --seal: #1F5FCC; /* --seal: the notification email only */
  --info-bg: #E4ECFA; --input-line: #B6BECB;
  --sans: "Atkinson Next", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, sans-serif;
  --mono: "Atkinson Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1624; --surface: #162033; --ink: #D9DFEA; --muted: #9AA6BA; --line: #26324A;
    --blue: #2F6BD9; --link: #8DB4FF; --blue-tint: #1B2A47; --grey-btn: #222E45;
    --ok: #6FD6A0; --ok-bg: #132B22; --warn: #F0B357; --warn-bg: #2A2112; --danger: #FF8A80;
    --amber: #F0B357; --on-amber: #1A1206;
    --env: #1A2740; --seal: #2F6BD9;
    --info-bg: #1B2A47; --input-line: #3A4866;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 var(--sans); }
a { color: var(--link); font-weight: 700; text-decoration: none; }
a:hover { text-decoration: underline; }
p a, dd a, small a, .steps a, .rules a { text-decoration: underline; text-underline-offset: 2px; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .6rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; line-height: 1.25; margin: 0 0 .6rem; font-weight: 700; }
p { margin: 0 0 .9rem; }
code, .code { font-family: var(--mono); }
code { background: var(--bg); padding: .1em .35em; border-radius: 6px; font-size: .92em; }
.handle { font-weight: 600; }
.device { font-weight: 700; overflow-wrap: anywhere; }
.muted, small { color: var(--muted); }
small { display: block; font-size: .88rem; font-weight: 400; margin-top: .25rem; }
.fine { color: var(--muted); font-size: .9rem; }
.lead { color: var(--muted); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
@media (prefers-color-scheme: dark) { :focus-visible { outline-color: var(--link); } }

/* 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: 24px; height: 24px; 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-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); }
/* 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; }
}

/* Top bar: the mark and name, flat on the page (signed out: Sign in on the right). */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 1rem; background: var(--bg); }
.brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { display: block; }
.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: 40px; height: 40px; border-radius: 99px; background: var(--blue-tint); color: var(--link); font-weight: 700; padding: 0 .9rem 0 0; }
.round > span:first-child { width: 40px; 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: 600; color: var(--link); cursor: pointer; }
button.link:hover { text-decoration: underline; }
@media (max-width: 520px) {
  .round { padding: 0; }
  .round .handle { display: none; }
}

/* Tabs: four icons with labels (Messages, People, Sent, You); the current one
   is blue with a bar under it. A hairline under the row, no shadow. */
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bg); border-bottom: 1px solid var(--line); }
.tabs a { position: relative; display: grid; justify-items: center; gap: .1rem; padding: .45rem 0 .5rem; color: var(--muted); font-weight: 400; font-size: .8rem; border-bottom: 3px solid transparent; min-width: 0; }
.tabs a:hover { text-decoration: none; background: var(--bg); }
.tabs a[aria-current="page"] { color: var(--link); border-bottom-color: var(--link); font-weight: 700; }
.t-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { position: absolute; top: .2rem; left: calc(50% + 4px); background: var(--badge); color: var(--on-amber); font-size: .7rem; font-weight: 700; min-width: 1.25rem; padding: 0 .3rem; border-radius: 99px; text-align: center; line-height: 1.25rem; border: 2px solid var(--bg); }
@media (min-width: 720px) {
  .tabs { grid-template-columns: repeat(4, minmax(0, 120px)); justify-content: center; }
  .tabs a { font-size: .8rem; }
}

main { max-width: 640px; margin: 0 auto; padding: 1rem 1rem 2rem; display: grid; gap: 1.5rem; align-content: start; }
main > * { margin: 0; min-width: 0; }
.page-title { font-size: 1.6rem; padding-top: .2rem; margin: 0; }
footer { text-align: center; color: var(--muted); font-size: .82rem; padding: .5rem 1rem 1.5rem; }
footer p { margin: 0; }

/* Sections. A .card is a section straight on the page: no box, no shadow,
   space between. A box appears only around something you act on or must
   compare (.box, the waiting strips, the decision, forms, the code). */
.card { background: none; border-radius: 0; padding: 0; }
.card > :last-child { margin-bottom: 0; }
.box, .card.find, .card.decide { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1rem; }
.card.decide { background: var(--warn-bg); border-color: transparent; }
.cards { display: grid; gap: 1.5rem; }
.narrow { width: 100%; max-width: 480px; justify-self: center; }
.card-head { display: flex; gap: .75rem; align-items: center; margin: 0 0 .9rem; }
.card-head h1, .card-head h2 { margin: 0; }
.sub { margin: .15rem 0 0; color: var(--muted); font-size: .92rem; }
.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.count { display: inline-block; background: var(--grey-btn); color: var(--ink); font-size: .8rem; border-radius: 99px; padding: 0 .5rem; vertical-align: .15em; }

/* Round things: avatars (a letter on a soft colour), icon circles. */
.avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; line-height: 1; }
.avatar.small { width: 36px; height: 36px; font-size: .95rem; }
.avatar.large { width: 56px; height: 56px; font-size: 1.35rem; }
.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: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--grey-btn); color: var(--ink); display: grid; place-items: center; }
.round-ic.blue { background: var(--blue-tint); color: var(--link); }
.round-ic.amber { background: var(--amber); color: var(--on-amber); }
.round-ic.ok { background: var(--ok-bg); color: var(--ok); }
.round-ic.big { width: 52px; height: 52px; }

/* Buttons: blue for the main action, grey for the rest. */
.button, button.button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 700 .9375rem/1.2 var(--sans); padding: .5rem 1.05rem; min-height: 40px; border-radius: 99px; border: 0; cursor: pointer; text-decoration: none; text-align: center; }
.button:hover { text-decoration: none; filter: brightness(.96); }
/* A plain .button is the blue one; .ghost is another name for the grey one. */
.button, .primary { background: var(--blue); color: var(--on-blue); }
.secondary, .button.ghost { background: var(--grey-btn); color: var(--ink); }
.danger, .button.danger { background: var(--grey-btn); color: var(--danger); }
.button.small { padding: .3rem .75rem; min-height: 32px; font-size: .875rem; }
/* 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: 44px; padding-left: 1.05rem; padding-right: 1.05rem; }
  .button.small { min-height: 40px; }
}
.button.copy::before { content: ""; width: 18px; height: 18px; 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: 600; }
label.check { font-weight: 400; display: flex; gap: .65rem; align-items: flex-start; }
label.check input { width: 22px; height: 22px; flex: none; margin: .05rem 0 0; accent-color: var(--blue); }
input:not([type=checkbox]):not([type=hidden]) {
  display: block; width: 100%; margin-top: .35rem; padding: .7rem .8rem; font: inherit; font-weight: 400;
  color: var(--ink); background: var(--surface); border: 1px solid var(--input-line); border-radius: 10px; min-height: 44px;
}
input.code { font-family: var(--mono); font-size: 1.3rem; letter-spacing: .12em; text-transform: uppercase; text-align: center; }

/* Notices: soft colour boxes. */
.notice { padding: .75rem .9rem; border-radius: 10px; background: var(--info-bg); color: var(--ink); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice a { color: inherit; }

/* Rows inside a card, and tappable list rows with a chevron. */
.list { padding: .3rem 0; }
.li { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; color: var(--ink); font-weight: 400; }
.li + .li { border-top: 1px solid var(--line); }
.li:hover { text-decoration: none; background: var(--bg); }
.card.li { padding: .8rem 1rem; }
/* Something waits for your decision: the one amber strip. */
.card.alert { background: var(--warn-bg); border-radius: 16px; }
.card.alert:hover { background: var(--warn-bg); filter: brightness(.98); }
.card.alert .chev { color: var(--warn); }
.li.status { padding: .4rem 0; }
.li.status:hover { background: none; }
.li.status .li-text { font-weight: 400; }
.li-text { flex: 1; min-width: 0; display: grid; }
.li-text strong { font-weight: 600; }
.li-text span { color: var(--muted); font-size: .9rem; }
.chev { width: 18px; height: 18px; color: var(--muted); }
.rows { list-style: none; margin: 0 0 .9rem; padding: 0; }
.rows li { display: flex; align-items: flex-start; gap: .8rem; padding: .75rem 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; padding-top: .2rem; }
.p-main { flex: 1; min-width: 0; }
.p-main .muted { font-size: .9rem; }
.actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .45rem; }
.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: .6rem; }
.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: .95rem; }
.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 grey round icon, a bold line, a helpful sentence. */
.empty { display: flex; gap: .8rem; align-items: center; padding: .2rem 0 .9rem; }
.empty p { margin: 0; color: var(--muted); font-size: .95rem; }
.empty strong { display: block; color: var(--ink); font-size: 1rem; }

/* Home: the line a person pastes to their agent. One tap selects all of it,
   so it copies easily even where the Copy button does not run. */
.copyline { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .85rem .95rem; margin: 0 0 .7rem; }
.copyline code { display: block; background: none; padding: 0; font: 400 1rem/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: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--blue-tint); color: var(--link); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.after-copy { margin-top: .9rem; }

/* What an agent did to a connection, wherever it shows. */
.agent-mark { display: flex; gap: .4rem; align-items: flex-start; font-size: .86rem; color: var(--muted); margin-top: .3rem; }
.agent-mark .ic { width: 18px; height: 18px; margin-top: .05rem; }
.agent-mark .device { font-size: inherit; }
.agent-activity .rows { margin-bottom: 0; }
.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); }

/* Messages: familiar chat rows. */
.convos { list-style: none; margin: 0; padding: 0; }
.convos li + li { border-top: 1px solid var(--line); }
.convos a { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; color: var(--ink); font-weight: 400; }
.convos a:hover { text-decoration: none; background: var(--bg); }
.c-main { flex: 1; min-width: 0; display: grid; }
.c-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.c-head time { flex: none; color: var(--muted); font-size: .82rem; font-weight: 400; }
.c-prev { display: flex; color: var(--muted); font-size: .95rem; min-width: 0; }
.c-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-note { font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.c-note .device { font-size: inherit; font-weight: 500; }
.unread .c-prev { color: var(--ink); font-weight: 700; }
.unread .c-note strong { color: var(--link); }
.dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--blue); }
@media (prefers-color-scheme: dark) { .dot { background: var(--link); } }
.back { margin: 0; }
.back a { display: inline-flex; align-items: center; gap: .2rem; }
.back .ic { width: 22px; height: 22px; }

/* A conversation: a bar with the way back and who it is with, then the
   thread. No tabs on this page; the back arrow leads to Messages. */
body.bare main { padding-top: .6rem; }
.convo-head { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 1; margin: 0 -1rem; }
.convo-head .back { display: grid; place-items: center; width: 44px; height: 44px; color: var(--link); }
.convo-head .back .ic { width: 28px; height: 28px; }
.convo-head h1 { margin: 0; font-size: 1.25rem; }
.chat { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.chat .day { justify-self: center; color: var(--muted); font-size: .9rem; margin: .9rem 0 .35rem; }
.chat .mine, .chat .theirs { display: grid; min-width: 0; }
.chat .mine { justify-items: end; }
.chat .theirs { justify-items: start; }
.chat .body { margin: 0; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.chat .meta { margin: .25rem .2rem .7rem; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; max-width: 86%; }
.chat .mine .meta { text-align: right; }
.bubble { max-width: 82%; background: var(--blue); color: var(--on-blue); border-radius: 20px 20px 6px 20px; padding: .6rem .95rem; min-width: 0; }
.chat .held .bubble { background: var(--blue-tint); color: var(--ink); outline: 2px dashed var(--blue); outline-offset: -2px; }
.chat .declined .bubble, .chat .undeliverable .bubble { background: var(--grey-btn); color: var(--ink); }
/* Another person's words (.env): a flat bubble, the mirror of your own
   (Adam, 19 Nov 2026: no envelope look, no flap, no seal). 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-radius: 20px 20px 20px 6px; padding: .55rem .95rem .65rem; }
.env .env-head { display: flex; justify-content: space-between; gap: 1.5rem; margin: 0 0 .2rem; font-size: .82rem; color: var(--muted); }
.env .env-head .handle { color: var(--muted); font-weight: 700; }
@media (forced-colors: active) { .env { border: 1px solid CanvasText; } }

/* You: who is signed in, then the settings, then Sign out. */
.you-head { display: flex; align-items: center; gap: .9rem; }
.you-head .page-title { margin: 0; }
.you-head p { margin: 0; overflow-wrap: anywhere; }

/* Message bubbles: theirs grey on the left, yours tinted blue on the right. */
/* A held message shown on its own (the per-message approval page,
   connector/views.js heldPage): the same text panel as the Sent card's
   .held-text, full width on the page's left edge — no dashed box. */
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.msg { min-width: 0; }
.msg .body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.msg.held { padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.msg.held .body { font: 400 1.15rem/1.5 var(--sans); color: var(--ink); }

/* Device approval: the code, what the device says, what Hail checked; then
   the person's own card with the decision. */
.code-box { display: grid; justify-items: center; gap: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.2rem 1rem; margin: 0 0 1.2rem; color: var(--muted); font-size: .95rem; text-align: center; }
.code-box code { background: none; padding: 0; font-size: 2.6rem; line-height: 1.1; font-weight: 700; letter-spacing: .06em; color: var(--ink); overflow-wrap: anywhere; }
.sec { display: flex; align-items: center; gap: .4rem; font-size: 1rem; margin: 1rem 0 .4rem; }
.sec .ok { color: var(--ok); width: 20px; height: 20px; }
.tag { font-size: .72rem; font-weight: 700; color: var(--warn); background: var(--warn-bg); border-radius: 99px; padding: .1rem .5rem; }
.kv { display: grid; grid-template-columns: 7.5rem 1fr; gap: .4rem .6rem; margin: 0 0 .3rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.decide h2 { font-size: 1.2rem; }
.decide .stack { margin: 0; }

/* The agent instructions page: the same colours; plain semantic HTML. */
/* How to add Hail to an app (/agent; note #33's language, phone first).
   Read by people and by agents: plain HTML, no script. The address is the
   one box on the page — the thing you act on — and one tap selects all of
   it. Each app is a short section between hairlines; 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.85rem; line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .6rem; }
.agent-doc .lead { color: var(--ink); font-size: 1.1rem; 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); border: 1px solid var(--line); border-radius: 12px; }
.agent-doc pre code { background: none; padding: 0; font-size: .95rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.agent-doc p code, .agent-doc dd > code { white-space: nowrap; }
.agent-doc .address pre { padding: .95rem 1rem; border-radius: 16px; }
.agent-doc .address pre code { font-size: 1.1rem; -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: 700; font-size: 1.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); border: 1px solid var(--line); border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; }
.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 (note #38): what each tool does, in the same rows as "App by app". */
.setup.tools dt { font-size: 1rem; }
.setup .kind { display: block; margin-top: .15rem; color: var(--muted); font-size: .9rem; }
.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 full-width 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: 1.15rem; font-weight: 700; margin: 0 0 .6rem; }
.find-row { display: flex; gap: .5rem; align-items: center; }
.find-row input:not([type=hidden]) { flex: 1; min-width: 0; margin: 0; border-radius: 99px; background: var(--bg); border-color: transparent; padding-left: 1rem; }
.find-row input:focus-visible { border-color: var(--blue); }
.find-row .button { flex: none; border-radius: 99px; }
.people-list { list-style: none; margin: 0; padding: 0; }
.people-list > li { display: flex; gap: .8rem; align-items: flex-start; padding: .75rem 0; border-top: 1px solid var(--line); }
.people-list > li:first-child { border-top: 0; padding-top: .1rem; }
.p-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.p-head > div { min-width: 0; padding-top: .3rem; }
.p-head .handle { font-size: 1.05rem; }
.p-head .muted { display: block; font-size: .85rem; }
.p-head form { margin: 0; flex: none; }
.people-list .actions.pair { margin-top: .6rem; }
.people-list + .notice { margin: .6rem 0 0; font-size: .92rem; }
/* "More": opens in place, no script. */
details.more { flex: none; }
details.more > summary { list-style: none; cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--ink); background: var(--grey-btn); border-radius: 99px; padding: .4rem .85rem; min-height: 36px; display: inline-flex; align-items: center; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { background: var(--blue-tint); color: var(--link); }
.more-actions { display: flex; gap: .4rem; margin-top: .5rem; justify-content: flex-end; }
.more-actions form { margin: 0; }
.block-someone > summary { cursor: pointer; font-weight: 600; color: var(--link); }
.block-someone[open] > summary { margin-bottom: .8rem; }
/* Open "More": the buttons take their own full-width line under the name,
   while the More button itself stays where it was. */
.p-head { position: relative; flex-wrap: wrap; }
details.more[open] { flex-basis: 100%; }
details.more[open] > summary { position: absolute; top: 0; right: 0; }
.p-head:has(> details.more[open]) > div { padding-right: 5.5rem; }
details.more[open] .more-actions { margin-top: .6rem; }
.more-actions .button { flex: 1; }
.more-actions form { flex: 1; display: flex; }
.p-head > div { flex: 1 1 0; }
/* The owner's connect link card (src/connect-link-views.js). */
.connect-link .actions.pair + .fine { margin: .8rem 0 0; }
.decide .notice { padding: 0; background: none; color: var(--ink); }
.env .env-head strong { color: var(--muted); font-weight: 700; }
/* Signed in: Privacy 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.4rem; }
/* "Help and contact": a line of its own under the others, also beside Sign out. */
footer .contact { flex-basis: 100%; margin-top: .3rem; overflow-wrap: anywhere; }
footer > form { margin: 0; }
footer button.link { font-size: .82rem; color: var(--link); }
.li.status .li-text strong { font-weight: 400; }
.chat .meta .new { color: var(--link); }

/* Sent (note #33): a message waiting for your OK is an amber card on the
   page's left edge; its text, in a white panel, is the most readable thing
   on it. Shared with any page that asks about one held message. */
.held-list { display: grid; gap: 1rem; }
.held-card { background: var(--warn-bg); border-radius: 16px; padding: 1rem; display: grid; gap: .75rem; min-width: 0; }
.held-card > * { margin: 0; }
.held-to { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.held-text { margin: 0; padding: .85rem 1rem; background: var(--surface); border-radius: 12px; font: 400 1.15rem/1.5 var(--sans); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.held-meta { font-size: .9rem; color: var(--muted); }
.held-card .actions { margin: 0; }
.held-card .notice.warn { background: var(--surface); }
/* History: open rows between hairlines. */
.sent-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.sent-row { padding: .8rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .3rem; min-width: 0; }
.sent-row > * { margin: 0; }
.sent-head { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; font-weight: 700; }
.sent-head time { font-weight: 400; font-size: .9rem; color: var(--muted); flex: none; }
.sent-row .body { font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.sent-row .meta { font-size: .85rem; color: var(--muted); }
.sent-row.declined .body, .sent-row.undeliverable .body { color: var(--muted); }
.held-card .actions.pair { grid-template-columns: auto auto; justify-content: start; }
.held-card .actions.pair .button { width: auto; min-width: 7.5rem; }
/* A held message's own page (connector/views.js heldPage): Sent's card, with room for the line under it. */
.card > .held-card + .fine { margin-top: .9rem; }
/* The owner's connect link page: the link is the one box, large, one tap
   selects all of it; Copy under it; Replace and Turn off below. */
.copyline.link-big { padding: 1rem 1.05rem; border-radius: 16px; }
.copyline.link-big code { font-size: 1.1rem; 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; }
.back a { text-decoration: none; }
/* People: the way to your connect link — a blue card with the link mark, the
   start of the link itself, and a chevron, so it reads as the link at a glance. */
.ic-link { -webkit-mask-image: url(icons/link.svg); mask-image: url(icons/link.svg); }
.link-row { display: flex; align-items: center; gap: .85rem; padding: .9rem 1rem; border-radius: 16px; background: var(--blue-tint); color: var(--ink); font-weight: 400; }
.link-row:hover { text-decoration: none; filter: brightness(.98); }
.link-ic { width: 44px; height: 44px; flex: none; border-radius: 50%; 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: 1.1rem; font-weight: 700; }
.link-row-text span { color: var(--muted); font-size: .92rem; }
.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: 700; }
.md .md-h1 { font-size: 1.1em; }
.md blockquote { border-left: 3px solid var(--line); padding-left: .75em; }
.md code { font-family: var(--mono); font-size: .9em; }
.md .md-code { padding: .5em .75em; border: 1px solid var(--line); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.md .md-info { display: block; color: var(--muted); font-size: .8em; }
.md hr { border: 0; border-top: 1px solid var(--line); }
/* 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; }
.md-raw summary { cursor: pointer; color: var(--link); font-size: .9rem; }
.md-raw > pre { margin-top: .5rem; }
/* The app-by-app steps outside /agent too (Messages, before an app is
   connected): commands wrap inside their own box instead of widening the page. */
.setup pre { margin: .45rem 0 .7rem; padding: .7rem .85rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.setup pre code { background: none; padding: 0; font-size: .95rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
