/* Same look as butlerbots.dev: black on white, Geist, lots of space. */
:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #9b9b9b;
  --soft: #6e6e6e;
  --line: #e7e7e7;
  --wash: #f6f6f6;
  --bad: #b3261e;
  --good: #1f7a3a;
  --font: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 88px);
  --radius: 14px;
  --ease: cubic-bezier(.22, .8, .2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
p { margin: 0 0 8px; }
[hidden] { display: none !important; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter); }

/* Top bar */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px var(--gutter); max-width: 1040px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; }
.brand img { width: 28px; height: 28px; }
.top nav { display: flex; align-items: center; gap: 16px; font-size: 15px; }
.top nav .who { color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }

/* Holding / message pages */
.hold {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: var(--gutter); max-width: 640px;
}
.mark { display: block; margin-bottom: 28px; }
.hold h1 { font-size: clamp(36px, 7vw, 64px); letter-spacing: -0.03em; line-height: 1; margin: 0 0 16px; }
.hold p { font-size: 18px; }

/* Landing */
.hero { padding: clamp(32px, 8vw, 96px) 0 clamp(24px, 5vw, 56px); }
.hero h1 { font-size: clamp(38px, 7vw, 72px); letter-spacing: -0.035em; line-height: 1; max-width: 12ch; }
.hero p { font-size: clamp(17px, 2vw, 20px); color: var(--soft); max-width: 34em; margin-top: 20px; }
.hero .actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }

section { padding: clamp(28px, 5vw, 56px) 0; }
section > h2 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 20px; }
.lede { color: var(--soft); max-width: 36em; margin: -8px 0 24px; }

.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); counter-reset: s; padding: 0; margin: 0; list-style: none; }
.steps li { border-top: 1px solid var(--ink); padding-top: 14px; counter-increment: s; }
.steps li::before { content: counter(s); display: block; font-size: 13px; color: var(--soft); margin-bottom: 6px; }
.steps b { font-weight: 500; display: block; margin-bottom: 4px; }
.steps span { color: var(--soft); font-size: 15px; }

/* App cards */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 12px; background: var(--bg);
}
.card-head { display: flex; align-items: center; gap: 14px; }
.icon {
  width: 52px; height: 52px; border-radius: 12px; flex: none; object-fit: cover;
  background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 500; font-size: 22px;
}
.card h3 { font-size: 20px; }
.kind { font-size: 13px; color: var(--soft); }
.card p { color: var(--soft); font-size: 15px; margin: 0; }
.card .grow { flex: 1; }
.card details { border-top: 1px solid var(--line); padding-top: 10px; font-size: 15px; }
.card summary { cursor: pointer; font-weight: 500; list-style-position: outside; }
.card details ul, .card details p { margin: 8px 0 0; color: var(--soft); }
.card details ul { padding-left: 18px; }
.version { font-size: 13px; color: var(--soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; font: inherit; font-size: 15px; font-weight: 500;
  text-decoration: none; cursor: pointer; transition: opacity .2s var(--ease);
}
.btn:hover { opacity: .85; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 14px; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--line); }
.btn.wide { width: 100%; }

/* Forms */
form.panel, .panel { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 28px); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > span, fieldset legend { font-size: 14px; font-weight: 500; }
.field small { color: var(--soft); font-weight: 400; }
input[type=text], input[type=email], input[type=number], input[type=url], textarea, select {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
textarea { min-height: 96px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.checks { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ts { min-height: 65px; margin: 4px 0 16px; }
.msg { font-size: 15px; margin-top: 12px; }
.msg.bad { color: var(--bad); }
.msg.good { color: var(--good); }
.done { padding: 8px 0; }
.done h3 { font-size: 22px; margin-bottom: 8px; }

.foot { color: var(--soft); font-size: 14px; padding: 40px var(--gutter) 48px; max-width: 1040px; margin: 0 auto; border-top: 1px solid var(--line); margin-top: 40px; }

/* Admin */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 24px; scrollbar-width: none; }
.tabs button {
  font: inherit; font-size: 15px; background: none; border: 0; padding: 12px 14px; cursor: pointer;
  color: var(--soft); border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--ink); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; line-height: 20px; text-align: center; margin-left: 4px; }
.cap { font-size: 15px; color: var(--soft); }
.cap b { color: var(--ink); font-weight: 500; }
.cap.full b { color: var(--bad); }
.meter { height: 4px; background: var(--line); border-radius: 2px; margin-top: 6px; overflow: hidden; width: 160px; }
.meter i { display: block; height: 100%; background: var(--ink); }
.cap.full .meter i { background: var(--bad); }

.list { display: flex; flex-direction: column; gap: 12px; }
.row { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.row-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.row .who b { font-weight: 500; display: block; }
.row .who span { color: var(--soft); font-size: 14px; word-break: break-all; }
.row .note { background: var(--wash); border-radius: 10px; padding: 10px 12px; font-size: 15px; white-space: pre-wrap; }
.row .meta { color: var(--soft); font-size: 13px; }
.row .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--soft); white-space: nowrap; }
.pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.toggle {
  font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
  background: var(--bg); color: var(--soft); cursor: pointer;
}
.toggle[aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { color: var(--soft); padding: 24px 0; }
.split { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 340px; align-items: start; } }
.sub { font-size: 18px; margin: 28px 0 12px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }
.log { font-size: 14px; }
.log li { padding: 8px 0; border-bottom: 1px solid var(--line); list-style: none; }
.log ul { padding: 0; margin: 0; }
.log time { color: var(--soft); font-size: 13px; margin-right: 8px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 12px; font-size: 15px; max-width: calc(100vw - 32px); z-index: 10;
}
.toast.bad { background: var(--bad); }
