/* Server-rendered pages: help, legal, changelog, status, receipts, 404/500. Uses app.css tokens. */
.static-page { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); color: var(--ink); padding: 10px 14px; border-radius: 10px; z-index: 50; box-shadow: var(--e3); }
.skip:focus { left: 12px; }
.sp-top { border-bottom: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.sp-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.sp-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 1.05rem; }
.sp-brand b { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sp-top nav { display: flex; align-items: center; gap: 10px; }
.sp-top nav > a:not(.btn) { color: var(--ink-2); font-size: .92rem; padding: 8px; }
.sp-main { flex: 1; padding: 40px 0 64px; }
.sp-narrow { max-width: 780px; }
.prose { line-height: 1.7; color: var(--ink-2); }
.prose h1 { color: var(--ink); margin-bottom: .6em; }
.prose h2 { color: var(--ink); margin: 1.8em 0 .5em; font-size: 1.25rem; }
.prose h3 { color: var(--ink); margin: 1.4em 0 .4em; }
.prose ul { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .3em 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.sp-contact { margin-top: 48px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--e2); }
.sp-contact h2 { margin-top: 0; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); background: var(--input); border-radius: var(--r-sm); padding: 11px 13px; min-height: 46px; }
.field.invalid input, .field.invalid textarea { border-color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sp-form-msg:empty { display: none; }
.sp-form-msg { border-radius: var(--r-sm); padding: 12px 14px; font-size: .9rem; }
.sp-form-msg.ok { background: var(--green-soft); color: var(--green); }
.sp-form-msg.bad { background: var(--red-soft); color: var(--red); }
.sp-release { border-top: 1px solid var(--line); padding: 22px 0; }
.sp-rel-head { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .85rem; margin-bottom: 6px; }
.sp-release h2 { margin: 0 0 .4em; }
.sp-status { display: flex; gap: 14px; align-items: center; border-radius: var(--r-lg); padding: 18px 20px; margin: 18px 0 24px; border: 1px solid var(--line); background: var(--card); }
.sp-status .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 6px var(--green-soft); flex: none; }
.sp-status.down .dot { background: var(--amber); box-shadow: 0 0 0 6px var(--amber-soft); }
.sp-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0; }
.sp-kv div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.sp-kv dt { color: var(--muted); font-size: .8rem; }
.sp-kv dd { margin: 4px 0 0; font-weight: 600; color: var(--ink); }
.sp-404 { text-align: center; padding: 40px 0; }
.sp-404 .row { justify-content: center; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--brand); }
.sp-foot { border-top: 1px solid var(--line); padding: 26px 0 34px; color: var(--muted); font-size: .85rem; }
.sp-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.sp-foot a { color: var(--ink-2); }
.sp-foot a[aria-current] { color: var(--brand); font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Receipt */
.receipt { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px; box-shadow: var(--e2); }
/* 2.57.6: the invoice, laid out evenly: brand and title centred, the details in a centred row */
.receipt { max-width: 820px; margin-inline: auto; }
.rc-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 1.05rem; }
.rc-title { text-align: center; margin: 14px 0 18px; font-size: 1.7rem; letter-spacing: .02em; }
.rc-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 24px; padding: 14px 0; border-block: 1px solid var(--line); text-align: center; }
.rc-meta div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rc-meta dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.rc-meta dd { margin: 0; font-weight: 600; font-size: .95rem; }
.rc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 22px; font-size: .92rem; }
.rc-from { text-align: right; }
.rc-lbl { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.rc-lines tfoot td { padding: 10px; border-top: 1px solid var(--line); }
.rc-lines th.num, .rc-lines td.num { text-align: right; }
.rc-total td { font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.rc-paid { text-align: center; color: var(--muted); font-size: .9rem; margin: 18px 0 6px; }
.rc-legal { text-align: center; color: var(--muted); font-size: .78rem; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.rc-actions { justify-content: center; }
.rc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 600px) {
  .sp-top nav > a:not(.btn), .sp-top .btn.ghost { display: none; }
  .rc-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-parties { grid-template-columns: 1fr; }
  .rc-from { text-align: left; }
  .receipt, .sp-contact { padding: 20px; }
}
@media print {
  .sp-top, .sp-foot, .no-print, .skip { display: none !important; }
  .static-page { background: #fff; }
  .receipt { box-shadow: none; border: 0; padding: 0; }
  body { color: #000; }
}

/* 2.52.1: public chat with an AI assistant (/chat, /chat/<agent>) */
.ac-list { display: grid; gap: 12px; margin-top: 20px; }
.ac-card { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); text-decoration: none; }
.ac-card:hover { border-color: var(--brand); }
.ac-card b { display: block; }
.ac-av { font-size: 32px; line-height: 1; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft, #eef2ff); flex: none; }
.ac-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.ac-head h1 { margin: 0; }
.ac-head p { margin: 4px 0 0; }
.ac-chat { border: 1px solid var(--line); border-radius: var(--r-lg, 16px); background: var(--card); padding: 14px; }
.ac-msgs { display: flex; flex-direction: column; gap: 10px; min-height: 200px; max-height: 60vh; overflow-y: auto; padding: 4px; }
.ac-msg { display: flex; }
.ac-msg.user { justify-content: flex-end; }
.ac-bubble { max-width: 85%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; background: var(--bg-2, #f3f4f6); color: var(--ink); }
.ac-msg.user .ac-bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.ac-msg.agent .ac-bubble { border-bottom-left-radius: 4px; }
.ac-msg.pending .ac-bubble { color: var(--muted); font-style: italic; }
.ac-msg.err .ac-bubble { background: #fef2f2; color: #991b1b; }
.ac-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.ac-compose { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.ac-compose textarea { flex: 1; min-height: 48px; resize: vertical; }
.ac-note { margin: 10px 0 0; }
