/* Vestra Home. Colour tokens follow platform/DESIGN.md; fonts and the wordmark are self-hosted because the CSP only allows same-origin assets. */
@font-face { font-family:"Instrument Serif"; src:url(/assets/fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:"JetBrains Mono"; src:url(/assets/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:"Vestra Display"; src:url(https://cdn.vestra.lol/fonts/InterDisplay-Bold.woff2) format("woff2"); font-weight:100 900; font-style:normal; font-display:swap; }

:root { color-scheme:dark; --ground:#131312; --text:#ECEAE3; --text-2:#BEBCB5; --muted:#8C8A83; --rule:rgba(236,234,227,.1); --rule-strong:rgba(236,234,227,.22); --accent:#A3E7DE; --warn:#E8B36A; --serif:"Instrument Serif",Georgia,serif; --mono:"JetBrains Mono",ui-monospace,Consolas,monospace; --sans:"Vestra Display","Segoe UI",system-ui,sans-serif; }
:root[data-theme=light] { color-scheme:light; --ground:#FAF8F4; --text:#1B1A17; --text-2:#4A4843; --muted:#77746C; --rule:rgba(27,26,23,.1); --rule-strong:rgba(27,26,23,.24); --accent:#0E7C6E; --warn:#8A5A12; }

* { box-sizing:border-box; }
body { margin:0; background:var(--ground); color:var(--text); font:16px/1.6 var(--sans); -webkit-font-smoothing:antialiased; }
a { color:inherit; text-decoration:underline; text-decoration-color:var(--rule-strong); text-underline-offset:3px; }
a:hover { text-decoration-color:currentColor; }
button { font:inherit; cursor:pointer; }
button:disabled { cursor:not-allowed; opacity:.45; }
a:focus-visible,button:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.icon { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; vertical-align:middle; }
.skip-link { position:absolute; top:-60px; left:16px; padding:8px 12px; background:var(--text); color:var(--ground); z-index:10; }
.skip-link:focus { top:12px; }

.shell { width:min(1160px,calc(100% - 48px)); margin:0 auto; }

/* Header */
.topbar { width:min(1160px,calc(100% - 48px)); margin:0 auto; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px 28px; padding:28px 0 22px; border-bottom:1px solid var(--rule); }
.brand { display:inline-flex; align-items:center; gap:12px; text-decoration:none; }
.brand img { display:block; height:26px; width:auto; }
.brand span { padding-left:12px; border-left:1px solid var(--rule-strong); font-size:15px; color:var(--muted); line-height:1.2; }
:root[data-theme=light] .brand img { filter:brightness(.52) saturate(1.5); }
.topbar nav { display:flex; align-items:center; flex-wrap:wrap; gap:8px 24px; font-size:14px; }
.topbar nav a { text-decoration:none; color:var(--text-2); }
.topbar nav a:hover { color:var(--text); }
.topbar form { margin:0; }
.theme-button { display:grid; place-items:center; width:30px; height:30px; padding:0; border:0; background:none; color:var(--muted); }
.theme-button:hover { color:var(--text); }
.link-button { padding:0; border:0; background:none; color:var(--text-2); font-size:14px; text-decoration:underline; text-decoration-color:var(--rule-strong); text-underline-offset:3px; }
.link-button:hover { color:var(--text); text-decoration-color:currentColor; }

.notice { margin:28px 0 0; padding:12px 0 12px 16px; border-left:2px solid var(--warn); color:var(--text-2); }
.small { font-size:14px; color:var(--muted); }
.warn { color:var(--warn); }

.button { display:inline-block; padding:9px 16px; border:1px solid var(--text); border-radius:4px; background:var(--text); color:var(--ground); font-size:14px; font-weight:500; text-decoration:none; white-space:nowrap; }
.button:hover { background:transparent; color:var(--text); }
.button.quiet { background:transparent; color:var(--text); border-color:var(--rule-strong); }
.button.quiet:hover { border-color:var(--text); }

/* Signed out */
.signin { max-width:560px; padding:12vh 0 10vh; }
.signin h1 { font:400 clamp(44px,6vw,64px)/1.05 var(--serif); margin:0 0 20px; }
.signin > p:first-of-type { font-size:18px; color:var(--text-2); margin:0 0 32px; }
.signin form { margin:0 0 28px; }
.signin .button { padding:12px 22px; font-size:15px; }
.signin .small { max-width:480px; margin:0 0 12px; }

/* Signed in */
.account { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:16px 32px; padding:48px 0 36px; }
.account h1 { font:400 clamp(44px,6vw,68px)/1 var(--serif); margin:0 0 14px; overflow-wrap:anywhere; }
.account-line { display:flex; flex-wrap:wrap; gap:4px 20px; margin:0; font-size:15px; color:var(--text-2); }
.account-line .warn { color:var(--warn); }
.refresh { display:flex; align-items:center; gap:14px; margin:0; font-size:13px; color:var(--muted); }

.attention { margin:0 0 40px; border-left:2px solid var(--warn); padding:4px 0 4px 20px; }
.attention h2 { margin:0 0 8px; font-size:14px; font-weight:600; color:var(--warn); }
.attention ul { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.attention li { display:flex; flex-wrap:wrap; gap:4px 16px; }

.board { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(0,1fr); gap:56px; align-items:start; }
.side { display:grid; gap:48px; min-width:0; }
.panel { min-width:0; }
.panel-head { display:flex; align-items:baseline; justify-content:space-between; gap:16px; padding-bottom:12px; margin-bottom:20px; border-bottom:1px solid var(--rule-strong); }
.panel-head h2 { margin:0; font:400 30px/1.1 var(--serif); }
.panel-head a { font-size:14px; color:var(--text-2); }
.panel h3 { margin:24px 0 6px; font-size:13px; font-weight:600; color:var(--muted); }
.empty { margin:0; color:var(--text-2); }

.totals { display:flex; flex-wrap:wrap; gap:12px 48px; margin:0 0 20px; }
.totals dt, .facts dt { font-size:13px; color:var(--muted); }
.totals dd { margin:2px 0 0; font:400 30px/1.1 var(--serif); }
.totals small, .figure small { font:14px var(--sans); color:var(--muted); }

.servers { list-style:none; margin:0; padding:0; border-top:1px solid var(--rule); }
.server { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 24px; padding:18px 0; border-bottom:1px solid var(--rule); }
.server-id strong { display:block; font-weight:600; overflow-wrap:anywhere; }
.server-id strong a { text-decoration:none; }
.server-id strong a:hover { text-decoration:underline; }
.server-id span { display:block; margin-top:2px; font:12px/1.5 var(--mono); color:var(--muted); overflow-wrap:anywhere; }
.state { text-align:right; font-size:14px; color:var(--muted); white-space:nowrap; }
.state small { display:block; font-size:12px; }
.state-running { color:var(--accent); }
.state-starting, .state-stopping, .state-installing { color:var(--text); }
.state-suspended, .state-install-failed { color:var(--warn); }
.usage { grid-column:1 / -1; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 28px; }
.usage > div { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:4px 10px; font-size:12px; color:var(--muted); }
.usage > div > span:last-child { grid-column:1 / -1; font-family:var(--mono); color:var(--text-2); }
.usage-off { grid-column:1 / -1; margin:0; font:12px var(--mono); color:var(--muted); }

.bar { display:block; width:100%; height:4px; }
.bar .track { fill:var(--rule); }
.bar .fill { fill:var(--text-2); }
.bar.warm .fill { fill:var(--warn); }
.bar.high .fill { fill:var(--warn); }

.figure { margin:0 0 12px; font:400 40px/1.1 var(--serif); }
.figure + .bar { margin-bottom:20px; }
.spark { display:block; width:100%; height:48px; margin:4px 0 20px; }
.spark rect { fill:var(--rule-strong); }
.spark rect:last-child { fill:var(--accent); }
.facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 24px; margin:0; }
.facts dd { margin:2px 0 0; overflow-wrap:anywhere; }

.lines { list-style:none; margin:0; padding:0; }
.lines li { display:flex; justify-content:space-between; align-items:baseline; gap:16px; padding:10px 0; border-bottom:1px solid var(--rule); }
.lines li > span:first-child { min-width:0; overflow-wrap:anywhere; }
.lines li > span:last-child { white-space:nowrap; font-family:var(--mono); font-size:14px; }
.lines small { display:block; font:12px var(--sans); color:var(--muted); }
.lines li > span:last-child small { display:inline; }

.help { margin:64px 0 0; color:var(--muted); font-size:14px; }

footer { display:flex; justify-content:space-between; gap:16px; margin-top:48px; padding:24px 0 40px; border-top:1px solid var(--rule); font-size:13px; color:var(--muted); }

@media (max-width:980px) {
    .board { grid-template-columns:minmax(0,1fr); gap:48px; }
    .side { grid-template-columns:repeat(2,minmax(0,1fr)); gap:40px; }
}
@media (max-width:700px) {
    .side { grid-template-columns:minmax(0,1fr); }
    .usage { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:560px) {
    .shell, .topbar { width:calc(100% - 36px); }
    .brand img { height:22px; }
    .account { padding-top:36px; }
    .signin { padding:56px 0; }
    .totals { gap:12px 28px; }
}
