/* Agentloft's website. Colours follow the web client's page shell
   (crates/loft-web/static/app.css). No inline styles (strict CSP). */
:root {
  --bg: #fbfbfa;
  --fg: #1c1c1a;
  --muted: #6b6b66;
  --border: #e4e4df;
  --card: #ffffff;
  --accent: #1c1c1a;
  --on-accent: #ffffff;
  --success: #2f9e5b;
  --danger: #c0392b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615;
    --fg: #ededeb;
    --muted: #9a9a94;
    --border: #2c2c29;
    --card: #1d1d1b;
    --accent: #ededeb;
    --on-accent: #161615;
    --success: #5cc98a;
    --danger: #ff7b6b;
  }
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); min-height: 1.5em; margin: 0; }
b { font-weight: 600; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 20px 14px;
  max-width: 760px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 600; }
.brand img { border-radius: 7px; }
.account { display: flex; align-items: center; gap: 10px; min-width: 0; }
.account #email { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account img { border-radius: 50%; }

main { padding: 12px 20px 40px; max-width: 760px; margin: 0 auto; }
main.center {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding-top: 0;
  margin-top: -40px;
}
#top:not([hidden]) ~ main.center { min-height: calc(100dvh - 60px); margin-top: 0; }
.logo { border-radius: 15px; }
h1 { margin: 4px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -0.015em; }
h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.lead { margin: 0; max-width: 420px; }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: default; }
button.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover { color: var(--fg); }
.button.google { height: 44px; padding: 0 20px; margin-top: 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
button:focus-visible, .button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; gap: 8px; margin-top: 6px; }

.heading { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 12px; }
.heading h1 { margin: 0; font-size: 22px; }
#machine-list { list-style: none; margin: 0 0 18px; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--card); overflow: hidden; }
#machine-list:empty { display: none; }
.machine { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.machine + .machine { border-top: 1px solid var(--border); }
.glyph { flex: none; opacity: 0.9; }
.about { flex: 1; min-width: 0; }
.name { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions { display: flex; gap: 4px; flex: none; }
.pill { font-size: 12px; font-weight: 500; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0 8px; line-height: 20px; }
.pill.on { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.note { border: 1px dashed var(--border); border-radius: 12px; padding: 18px; margin-bottom: 18px; }
.note p { margin: 0; color: var(--muted); }

.code-box { display: flex; flex-direction: column; gap: 4px; padding: 14px 22px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); margin-top: 6px; }
.code { font: 600 24px/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.08em; }

@media (max-width: 520px) {
  .machine { flex-wrap: wrap; }
  .actions { width: 100%; justify-content: flex-end; }
  .account #email { display: none; }
}
