/* The Parley website's look (docs/design/PDR-034-website.md). It started as the servers' public pages'
   (apps/server-rs/src/pages/page.css); the two no longer need to match. No text under 14px
   (docs/ui-design-rules.md); test/site.test.ts checks. */
:root { --bg0:#141416; --bg1:#1b1b1f; --bg2:#232328; --bg3:#2c2c33; --border:#34343c; --text:#ecebe8; --muted:#9c9aa3;
        --accent:#f2a65a; --accent-hover:#f6b97b; --on-accent:#2b1804; --live:#3ccfa0;
        --warn:#f5c451; --warn-bg:rgba(245,196,81,.10); --warn-border:rgba(245,196,81,.55); color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg0); color: var(--text); font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
       background-image: radial-gradient(circle at 15% 10%, rgba(242,166,90,.13), transparent 40%), radial-gradient(circle at 90% 85%, rgba(60,207,160,.10), transparent 40%);
       min-height: 100vh; }
main { max-width: 960px; margin: 0 auto; padding: 48px 24px 72px; }
/* The bar at the top of every page: Parley (home) on the left, Download and Help on the right. */
.site-nav { max-width: 960px; margin: 0 auto; padding: 20px 24px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.site-nav nav { display: flex; gap: 6px; }
.site-nav nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 14px; border-radius: 10px; }
.site-nav nav a:hover { background: var(--bg2); }
.site-nav nav a[aria-current="page"] { color: var(--accent); background: rgba(242,166,90,.12); }
.brand { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.logo { width: 48px; height: 48px; border-radius: 30%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; font-size: 20px; }
img.logo { object-fit: cover; background: none; }
.brand span { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 18px; max-width: 14ch; }
h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 19px; color: var(--muted); max-width: 56ch; margin: 0 0 40px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 0 0 56px; padding: 0; list-style: none; }
.features li { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; }
.features strong { display: block; margin-bottom: 4px; }
.features span { color: var(--muted); font-size: 15px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--live); margin-right: 8px; vertical-align: 1px; }
h2 { font-size: 26px; letter-spacing: -.015em; margin: 0 0 18px; }
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 56px; }
.platform { background: var(--bg1); border: 1px solid var(--border); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.platform.mine { border-color: var(--accent); }
.platform h3 { margin: 0 0 4px; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.platform.mine h3::after { content: 'Your system'; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.dl { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; background: var(--bg3); color: var(--text); text-decoration: none; font-weight: 600; transition: background .15s; }
.dl:hover { background: #383840; }
.dl.primary { background: var(--accent); color: var(--on-accent); }
.dl.primary:hover { background: var(--accent-hover); }
.dl small { font-weight: 500; opacity: .75; }
.unsigned { display: flex; gap: 14px; align-items: flex-start; margin: -32px 0 56px; padding: 16px 20px; border-radius: 14px;
            background: var(--warn-bg); border: 1px solid var(--warn-border); border-left-width: 4px; }
.unsigned svg { flex-shrink: 0; width: 24px; height: 24px; margin-top: 2px; color: var(--warn); }
.unsigned h3 { margin: 0 0 6px; font-size: 16px; color: var(--warn); }
.unsigned p { margin: 0 0 6px; font-size: 15px; }
.unsigned p:last-child { margin-bottom: 0; }
.none { margin: 0; color: var(--muted); font-size: 14px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: flex; gap: 14px; align-items: baseline; }
.steps li::before { content: counter(step); flex-shrink: 0; width: 28px; height: 28px; border-radius: 9px; background: var(--bg3); display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--accent); }
code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; color: var(--accent); }
.note { color: var(--muted); font-size: 14px; }
footer { margin-top: 64px; color: var(--muted); font-size: 14px; }
.version-badge { display: inline-block; vertical-align: middle; margin-left: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(60,207,160,.14); color: var(--live); font-size: 14px; font-weight: 700; letter-spacing: 0; }
main a:not(.dl) { color: var(--accent); }
.help h2 { margin-top: 48px; }
.help h3 { font-size: 18px; margin: 0 0 8px; }
.help h1, .help .lede { max-width: none; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin: 0 0 16px; }
.option { background: var(--bg1); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; }
.option.recommended { border-color: rgba(242,166,90,.55); }
.option .tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: rgba(242,166,90,.15); color: var(--accent); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; vertical-align: 2px; }
.option ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.safety { list-style: none; padding: 0; display: grid; gap: 10px; }
.safety li { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; }
@media (max-width: 520px) { main { padding-top: 32px; } .lede { font-size: 17px; } .steps code { word-break: break-all; } }
/* /help/raid-comms: contents, screenshots, keys, tables and the raid diagrams. */
.contents { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
main .contents a { color: var(--text); text-decoration: none; border: 1px solid var(--border); background: var(--bg2); padding: 4px 14px; border-radius: 999px; font-size: 14px; }
main .contents a:hover { border-color: var(--accent); color: var(--accent); }
.help section { scroll-margin-top: 16px; }
.help ul, .help ol { padding-left: 22px; display: grid; gap: 6px; }
.help .muted { color: var(--muted); }
.tree { margin: 0 0 16px; padding: 12px 16px; background: var(--bg1); border: 1px solid var(--border); border-radius: 12px; font: 14px/1.5 ui-monospace, 'Cascadia Mono', Consolas, monospace; overflow-x: auto; }
.shot { margin: 16px 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
/* Taken at 2x and shown at half their pixel size (the width and height on each img): the app's real size. */
.shot img { max-width: 100%; height: auto; border-radius: 16px; }
.shot figcaption { color: var(--muted); font-size: 14px; }
.beside { display: flex; gap: 28px; align-items: flex-start; }
.beside > div { flex: 1; min-width: 0; }
.beside > .shot { flex: none; max-width: 45%; margin-top: 0; }
@media (max-width: 720px) { .beside { flex-direction: column; } .beside > .shot { max-width: 100%; } }
kbd { display: inline-block; min-width: 26px; padding: 0 7px; font: 600 14px/22px ui-monospace, monospace; text-align: center; background: var(--bg3); border: 1px solid var(--border); border-bottom-width: 3px; border-radius: 6px; }
.table { overflow-x: auto; margin: 8px 0 16px; }
.table table { border-collapse: collapse; width: 100%; }
.table th, .table td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.table th { font-size: 14px; color: var(--muted); font-weight: 600; }
.table td:first-child { white-space: nowrap; }
.trouble { margin: 0; display: grid; grid-template-columns: minmax(200px, 2fr) 3fr; gap: 10px 20px; }
.trouble dt { font-weight: 600; }
.trouble dd { margin: 0; color: var(--muted); }
@media (max-width: 620px) { .trouble { grid-template-columns: 1fr; gap: 4px; } .trouble dd { margin-bottom: 10px; } }
.raid-diagram { display: block; width: 100%; max-width: 640px; height: auto; margin: 16px auto; }
.raid-diagram .rd-box { fill: var(--bg3); stroke: var(--border); stroke-width: 1.5; }
.raid-diagram .rd-box.lit { fill: rgba(60,207,160,.13); stroke: rgba(60,207,160,.4); }
.raid-diagram .rd-title { fill: var(--text); font-size: 16px; font-weight: 600; }
.raid-diagram .rd-text { fill: var(--live); font-size: 15px; font-weight: 600; }
.raid-diagram .rd-muted { fill: var(--muted); font-size: 15px; }
.raid-diagram .rd-chip { fill: rgba(242,166,90,.14); stroke: rgba(242,166,90,.4); }
.raid-diagram .rd-chip-text { fill: var(--accent); font-size: 14px; font-weight: 600; }
.raid-diagram .rd-label { fill: var(--text); font-size: 15px; paint-order: stroke; stroke: var(--bg0); stroke-width: 6px; stroke-linejoin: round; }
.raid-diagram .rd-arrow { stroke: var(--live); stroke-width: 2; }
.raid-diagram .rd-arrow.wide { stroke-width: 3.5; }
.raid-diagram .rd-arrow.talk { stroke: var(--accent); stroke-width: 3; }
.raid-diagram .rd-arrow.faint { opacity: .45; }
.raid-diagram .rd-head { fill: context-stroke; }
/* A help page's badges (Added in, Experimental), and the warning on an experimental feature's page. */
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: rgba(60,207,160,.14); color: var(--live); font-size: 14px; font-weight: 700; }
.badge.experimental-badge { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-border); }
.experimental { margin: 0 0 32px; padding: 14px 18px; border-radius: 14px; background: var(--warn-bg); border: 1px solid var(--warn-border); border-left-width: 4px; }
.experimental strong { color: var(--warn); }
.help-index .badges { margin: 8px 0 0; }
/* /help: one card per help page. */
.help .help-index { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
main .help-index a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 18px 20px; border-radius: 16px; background: var(--bg1); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: border-color .15s; }
main .help-index a:hover { border-color: var(--accent); }
.help-index strong { font-size: 17px; }
.help-index span { color: var(--muted); font-size: 15px; }
/* The home page's buttons. */
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: -16px 0 48px; }
.cta .dl { justify-content: center; padding: 12px 20px; font-size: 17px; }
/* Who turns a feature on, on a help page for one a server admin turns on. */
.turned-on { margin: 0 0 32px; padding: 14px 18px; border-radius: 14px; background: var(--bg1); border: 1px solid var(--border); border-left-width: 4px; }
/* Help for what isn't released yet: a page's badge, or a section (<div data-since="next">). */
.badge.coming-badge, .badge.coming { background: rgba(242,166,90,.15); color: var(--accent); }
[data-since] { border-left: 3px solid rgba(242,166,90,.55); padding-left: 16px; margin: 0 0 16px; }
[data-since]::before { display: block; margin-bottom: 6px; color: var(--accent); font-size: 14px; font-weight: 700; }
[data-since="next"]::before { content: "Coming in the next version"; }
[data-since].coming::before { content: attr(data-coming); }
[data-since]:not([data-since="next"]):not(.coming) { border-left: 0; padding-left: 0; }
