/* ruffian.ai, the website (lane site-plain's plain words, lane site-frost's look; 2026-11-01).
   The look is the app's: K "Frost Compact" by day, Nord Polar Night when the device is dark, the Veil for the
   assistant. Every colour, font and radius here is a token from look-site.css, which look-gen.mjs makes from the
   app's own gated/client/look.tokens.json: there is no second palette (look.test.js fails on a colour named here).
   The site breathes a little more than the app (17 px prose, 44 px taps), but it is the same surfaces, type,
   radii and drawn icons (ruffian-glyphs.js). Plain words, no terminal role-play: monospace is for commands only. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 17px; line-height: 1.55;
}
@media (min-width: 900px) { body { font-size: 18px; } }
main { flex: 1; width: 100%; max-width: 44rem; margin: 0 auto; padding: 8px 20px 56px; }
main.wide { max-width: 64rem; }
p, ul, ol, dl, table, pre, details, form { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--font-head); color: var(--hd); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.015em; }
h1 { font-size: 2rem; font-weight: 650; margin-top: .9em; }
h2 { font-size: 1.3rem; font-weight: 600; margin-top: 1.8em; }
h3 { font-size: 1.05rem; font-weight: 600; margin-top: 1.2em; }
@media (min-width: 900px) { h1 { font-size: 2.5rem; } }
a { color: var(--acc); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: var(--r-s); }
code, kbd, pre { font-family: var(--mono); font-size: .88em; }
:not(pre) > code { background: var(--sel); color: var(--hi); padding: .1em .35em; border-radius: var(--r-s); overflow-wrap: anywhere; }
kbd { background: var(--comp-bg); box-shadow: inset 0 0 0 1px var(--rule); padding: .05em .35em; border-radius: var(--r-s); }
p, li, dd, td { overflow-wrap: break-word; }
b, strong { font-weight: 600; color: var(--hi); }
.muted { color: var(--dim); }
.lead { font-size: 1.15em; color: var(--fg); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--new-bg); color: var(--new-fg); padding: 8px 12px; z-index: 2; border-radius: var(--r); }
canvas.g { display: inline-block; vertical-align: -2px; flex: 0 0 auto; }

/* header: the bar of the app, full width; the mark and the name, a few plain links */
.site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 16px;
  padding: 6px max(20px, calc((100% - 64rem) / 2 + 20px)); background: var(--bar); border-bottom: 1px solid var(--rule); }
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--hd); text-decoration: none;
  font-family: var(--sans); font-weight: 650; font-size: 21px; letter-spacing: -0.02em; line-height: 1; }
.logo img { width: 28px; height: 28px; border-radius: var(--r); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 2px; margin-right: -10px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--fg); text-decoration: none; border-radius: var(--r); }
.site-nav a:hover { background: var(--sel); }
.site-nav a[aria-current="page"] { color: var(--hd); font-weight: 600; box-shadow: inset 0 -2px 0 var(--acc); border-radius: var(--r) var(--r) 0 0; }

/* phones: "Open Ruffian" (the nav's first link) sits at the right of the logo row; the rest get a row of their own */
@media (max-width: 560px) {
  .site-head { position: relative; }
  .site-nav { width: calc(100% + 16px); margin: 0 -8px; flex-wrap: nowrap; }
  .site-nav a { padding: 0 8px; font-size: 16px; white-space: nowrap; }
  .site-nav a:first-child { position: absolute; top: 6px; right: 12px; color: var(--acc); font-weight: 600; }
}

/* footer */
.site-foot { background: var(--bar); border-top: 1px solid var(--rule); color: var(--dim); font-size: .95em; }
.site-foot .in { max-width: 64rem; margin: 0 auto; padding: 14px 20px 30px; display: flex; flex-wrap: wrap; gap: 0 20px; align-items: center; }
.site-foot a { color: var(--dim); display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }
@media (max-width: 640px) { .site-foot.in-app { display: none; } } /* R8 (ux-impl-web): app pages on a phone end at their content */
.site-foot a[hidden] { display: none; }
.site-foot a:hover { color: var(--fg); }

/* hero: the Veil (the assistant's presence, drawn by ruffian-glyphs.js in the look's pres-* colours) beside the title */
.hero { display: flex; align-items: center; gap: 14px; margin: 1.1em 0 .4em; }
.hero h1 { margin: 0; }
.presence { width: 56px; height: 56px; flex: 0 0 auto; }
@media (min-width: 900px) { .presence { width: 64px; height: 64px; } }

/* buttons: the app's "New chat" button (new-bg), and the quiet one (a ruled box) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  font: inherit; font-weight: 600; border-radius: var(--r); border: 0; cursor: pointer; text-decoration: none;
  background: var(--new-bg); color: var(--new-fg); }
.btn:hover { filter: brightness(1.08); }
.btn.big { min-height: 52px; font-size: 1.1em; padding: 0 26px; }
.btn.second { background: var(--comp-bg); color: var(--fg); box-shadow: inset 0 0 0 1px var(--rule); }
.btn.second:hover { background: var(--sel); filter: none; }
.btn:disabled { opacity: .55; cursor: default; filter: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 1.2em 0; }
@media (max-width: 520px) { .actions.stack .btn { width: 100%; } }

/* checklist: a real sequence, numbered by state (a drawn tick when done) */
.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist > li { position: relative; padding: 14px 0 14px 46px; border-top: 1px solid var(--rule); }
.checklist > li:last-child { border-bottom: 1px solid var(--rule); }
.checklist .tick { position: absolute; left: 0; top: 13px; width: 30px; height: 30px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--rule); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--dim); }
.checklist li.done .tick { background: var(--acc); box-shadow: none; color: var(--on-acc); }
.checklist .t { font-weight: 600; display: block; color: var(--hd); }
.checklist .state { color: var(--dim); font-size: .92em; }
.checklist p { margin: .3em 0 0; }
.ideas { margin: .5em 0 0; padding-left: 1.2em; }
.ideas li { margin: .35em 0; }

/* panels: the device boxes, notes */
.panel { background: var(--panel); box-shadow: inset 0 0 0 1px var(--rule); border-radius: var(--r-l); padding: 14px 18px; margin: 1em 0; }
.panel > :last-child { margin-bottom: 0; }
.panel h3 { margin-top: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.mine { box-shadow: inset 0 0 0 2px var(--acc); }
.tag { display: inline-block; font-size: .78em; font-weight: 600; background: var(--acc); color: var(--on-acc); border-radius: var(--r-s); padding: 1px 8px; }

/* details: other devices, the developer section; a drawn chevron that turns when open */
details { box-shadow: inset 0 0 0 1px var(--rule); border-radius: var(--r-l); padding: 0 16px; background: var(--bg); }
details + details { margin-top: -0.5em; }
summary { cursor: pointer; min-height: 50px; display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--hd); list-style: none; }
summary::-webkit-details-marker { display: none; }
summary canvas.g { color: var(--dim); transition: transform .15s; }
details[open] > summary canvas.g { transform: rotate(90deg); }
details[open] { padding-bottom: 12px; }

/* commands: the only monospace blocks, in the app's code colours */
.cmd { display: flex; align-items: stretch; background: var(--code-bg); color: var(--code-fg); border-radius: var(--r); margin: .5em 0 1em; max-width: 100%; }
.cmd code { flex: 1 1 auto; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 12px 14px; font-size: 15px; background: none; color: inherit; border-radius: 0; }
.cmd .copy { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-width: 76px; min-height: 44px; padding: 0 12px; border: 0;
  box-shadow: inset 1px 0 0 var(--term-sel); background: transparent; color: var(--code-fg); font: inherit; font-size: 15px; cursor: pointer; border-radius: 0 var(--r) var(--r) 0; }
.cmd .copy:hover, .cmd .copy.done { background: var(--term-bar); }
pre.block { background: var(--code-bg); color: var(--code-fg); padding: 12px 14px; border-radius: var(--r); overflow-x: auto; }

/* key/value lists and tables (account, downloads, status) */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table.list { border-collapse: collapse; width: 100%; }
table.list th { text-align: left; font-weight: 600; color: var(--dim); font-size: .9em; }
table.list th, table.list td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.list button { min-height: 44px; }
@media (max-width: 560px) { #devices th:nth-child(2), #devices td:nth-child(2), #linked th:nth-child(3), #linked td:nth-child(3), .files th:nth-child(4), .files td:nth-child(4) { display: none; } }

/* status: a dot per service (green = the look's string green, red = bad, violet = not built yet) */
.svc { list-style: none; padding: 0; }
.svc li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.svc .dot { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; margin-top: .45em; background: var(--dim); }
.svc .active .dot, .svc li.active .dot { background: var(--syn-str); }
.svc li.down .dot, .svc li.degraded .dot { background: var(--bad); }
.svc li.stub .dot { background: var(--acc2); }
.svc p { margin: 0; }
.overall { font-weight: 600; }

/* forms (sign in, the invite request, the passcode, the device code): the app's composer box */
.form-page { max-width: 30rem; }
input[type=email], input[type=text], input[type=password], input:not([type]), select, textarea {
  font: inherit; font-size: 17px; min-height: 44px; padding: 0 12px; border-radius: var(--r); border: 0;
  box-shadow: inset 0 0 0 1px var(--dim); background: var(--comp-bg); color: var(--hi); width: 100%; }
input::placeholder { color: var(--dim); }
input:focus-visible { outline: 2px solid var(--acc); outline-offset: 0; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row input { flex: 1 1 14rem; width: auto; }
label { display: block; margin: .2em 0 .4em; }
.status-line { color: var(--dim); min-height: 1.5em; }
.status-line:empty { min-height: 0; margin: 0; }
#clerk-mount, #member-mount { margin: 1em 0; }
.code-big { font-family: var(--mono); font-size: 1.6em; letter-spacing: .08em; color: var(--hd); }
.or { color: var(--dim); margin: 1.4em 0 .6em; }
.bad { color: var(--bad); }

/* home: what you can ask for, as the app's idea cards with drawn icons */
.hero + .lead, .hero ~ p.lead { max-width: 36rem; }
.cards { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 1em 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } }
.cards li { background: var(--panel); box-shadow: inset 0 0 0 1px var(--rule); border-radius: var(--r-l); padding: 12px 16px 14px; }
.cards b { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; color: var(--hd); }
.cards canvas.g { color: var(--acc); }

/* the error page (404) and small one-message pages (Google connected, app sign-in) */
.oneliner { max-width: 32rem; }
.oneliner .actions { margin-top: 1.4em; }

/* admin (templates/admin/admin.html): the same tokens, denser, tables first */
body.admin-page main { max-width: 78rem; }
.admin table { border-collapse: collapse; width: 100%; font-size: .9em; }
@media (max-width: 900px) { .admin table { display: block; overflow-x: auto; } }
.admin th, .admin td { text-align: left; padding: .3em .7em .3em 0; vertical-align: top; border-bottom: 1px solid var(--rule); }
.admin th { color: var(--dim); font-weight: 600; }
.admin pre { white-space: pre-wrap; word-break: break-word; max-height: 40em; overflow: auto; background: var(--panel); box-shadow: inset 0 0 0 1px var(--rule); border-radius: var(--r); padding: .6em; }
.admin form.inline { display: inline; margin: 0; }
.admin .msg { box-shadow: inset 0 0 0 1px var(--acc); background: var(--panel); border-radius: var(--r); padding: .5em .8em; }
.admin .note { color: var(--dim); }
.admin details.tool > summary, .admin details.event > summary { min-height: 32px; font-weight: 500; color: var(--dim); }
.admin details { box-shadow: none; padding: 0; border-radius: 0; background: none; }
.admin .turn-user { border-left: 3px solid var(--acc); padding-left: .6em; margin: 1.2em 0 .4em; white-space: pre-wrap; }
.admin .turn-model { white-space: pre-wrap; margin: .4em 0; }
.admin .turn-end { font-size: .85em; color: var(--dim); }
.admin input, .admin select, .admin textarea { width: auto; min-height: 36px; font-size: .95em; }
.admin button, .admin input[type=submit] { font: inherit; font-size: .95em; min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--r);
  background: var(--new-bg); color: var(--new-fg); font-weight: 600; cursor: pointer; }
.admin img { max-width: 100%; box-shadow: 0 0 0 1px var(--rule); }
.admin-nav { display: flex; flex-wrap: wrap; gap: 0 2px; }
.admin-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 9px; color: var(--fg); text-decoration: none; border-radius: var(--r); }
.admin-nav a:hover { background: var(--sel); }

/* status page (/status/): compact, one state line, a facts row, incidents, checks */
.st-state { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; line-height: 1.25; margin: .7em 0 .5em; min-height: 2.5em; }
@media (min-width: 900px) { .st-state { font-size: 1.9rem; } }
.st-dot { flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%; background: var(--dim); }
.st-dot.ok { background: var(--syn-str); }
.st-dot.updating { background: var(--acc2); }
.st-dot.bad { background: var(--bad); }
.st-facts { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 0 0 1.2em; padding: 8px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: .92em; }
.st-facts div { display: flex; flex-direction: column; }
.st-facts dt { color: var(--dim); font-size: .85em; }
.st-facts dd { margin: 0; font-family: var(--mono); font-size: .92em; color: var(--hi); }
.st-inc, .st-checks { list-style: none; padding: 0; margin: 0 0 1em; }
.st-inc li { display: grid; grid-template-columns: 10.5rem 1fr auto; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: .95em; }
.st-inc .when, .st-inc .len { font-family: var(--mono); font-size: .88em; color: var(--dim); }
@media (max-width: 560px) { .st-inc li { grid-template-columns: 1fr auto; } .st-inc .when { grid-column: 1 / -1; } }
.st-checks li { align-items: baseline; padding: 7px 0; font-size: .95em; }
.st-checks .dot { margin-top: 0; width: 10px; height: 10px; align-self: center; }
.st-checks li.ok .dot { background: var(--syn-str); }
.st-checks li.trouble .dot { background: var(--bad); }
.st-checks li.limited .dot { background: var(--acc2); }
.st-checks .nm { flex: 1; }
.st-checks .stt { color: var(--dim); }
.st-foot { font-size: .9em; }

/* Report a bug from a page's footer (lane bug-everywhere1, static/bugfoot.js): the app's own form, in the page's look */
.bugdlg { width: min(32rem, calc(100vw - 32px)); border: 1px solid var(--rule); border-radius: var(--r, 6px); background: var(--bg); color: var(--fg); padding: 20px; }
.bugdlg::backdrop { background: var(--scrim); }
.bugdlg h2 { margin: 0 0 12px; font-size: 1.2em; }
.bugdlg input[type=text], .bugdlg textarea { width: 100%; box-sizing: border-box; margin: 0 0 10px; }
.bugdlg-ck { display: flex; gap: 8px; align-items: center; margin: 2px 0 8px; }
.bugdlg-note { color: var(--dim); font-size: .9em; margin: 6px 0; }
.bugdlg-acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.bugdlg-acts .btn { white-space: nowrap; }

/* br_740643550d62f0f3 (owner): "why does it say open ruffian when i am on desktop app". In the desktop app (html.in-desk,
   applook.js / site.js) the way to the app reads "Back to chats" and goes back to where you came from. */
.w-desk { display: none; }
html.in-desk .w-web { display: none; }
html.in-desk .w-desk { display: inline; }
/* br_5b2e480e015bc8ad: the header's bug icon, last in the row (its room kept while bugfoot.js waits for the sign-in) */
.site-nav .nav-bug { padding: 0 12px; }
.site-nav .nav-bug[hidden] { display: inline-flex; visibility: hidden; }
.site-nav .nav-bug canvas.g { width: 16px; height: 16px; }

/* onboard-build1 rec 8: Sessions is a place only for an account with a computer (applook.js sets html[data-pc]); its own page keeps it */
html:not([data-pc="1"]) [data-ruf="nav-sessions"]:not([aria-current]) { display: none; }
