/* Tokens are lifted from a2wio/innkeeper-landing so the two halves of
   innkeeper.a2w.io are visibly one product. Forest is the brand; there is no
   second accent colour anywhere in here on purpose. */
:root {
  --forest: #0b341b;
  --forest-hover: #0f4526;
  --forest-wash: #eaf1ec;
  --ink: #111111;
  --muted: #5f5f5f;
  --faint: #8a8a8a;
  --hair: #e5e5e5;
  --hair-soft: #efefef;
  --paper: #ffffff;
  --sunk: #fafafa;

  /* Status, and status only. These four never carry a series or a category,
     and every one of them ships beside its own word. */
  --ok-bg: #e8f2ec;    --ok-ink: #12572f;
  --warn-bg: #fdf3e3;  --warn-ink: #7a5312;
  --bad-bg: #fbeaea;   --bad-ink: #8c1d1d;
  --idle-bg: #f2f2f2;  --idle-ink: #5f5f5f;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

code, .mono, pre {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

a { color: inherit; }

button { font: inherit; cursor: pointer; }

/* ---------- shell ------------------------------------------------- */

.shell { display: flex; min-height: 100vh; }

.side {
  width: 244px;
  flex: 0 0 244px;
  padding: 26px 16px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.lockup {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; padding: 0 8px 22px;
}
.lockup img { width: 30px; height: 30px; border-radius: 8px; display: block; }
.lockup span { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }

.side nav { display: flex; flex-direction: column; gap: 2px; }

.side nav a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
}
.side nav a:hover { background: var(--sunk); color: var(--ink); }
.side nav a.on { background: var(--forest-wash); color: var(--forest); font-weight: 500; }

.side-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--hair); }
.side-foot .who { padding: 0 10px 10px; }
.side-foot .who b { display: block; font-weight: 600; font-size: 14px; }
.side-foot .who span { font-size: 13px; color: var(--faint); }
.side-foot a { display: block; padding: 6px 10px; font-size: 13px; color: var(--faint); text-decoration: none; }
.side-foot a:hover { color: var(--ink); }

/* The dot grid is the landing's, and it stays on the working surface rather
   than the chrome so the sidebar reads as furniture. */
.main {
  flex: 1;
  min-width: 0;
  border-left: 1px solid var(--hair);
  background-image: radial-gradient(circle at 1px 1px, #ececec 1.15px, transparent 0);
  background-size: 26px 26px;
}

.page { max-width: 60rem; padding: 40px 44px 90px; }

/* ---------- type -------------------------------------------------- */

h1 {
  font-size: 30px; line-height: 1.15; letter-spacing: -0.025em;
  font-weight: 700; margin: 0 0 6px;
}
h2 {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 14px;
}
h3 { font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }

p { margin: 0 0 14px; max-width: 40rem; }
.lede { font-size: 17px; color: var(--muted); margin-bottom: 30px; max-width: 38rem; }
.small { font-size: 13px; color: var(--muted); }
.faint { color: var(--faint); }
.blank { color: var(--faint); font-size: 14px; padding: 6px 0; }

section.block { margin-bottom: 40px; }

/* ---------- cards ------------------------------------------------- */

.card {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 20px 22px;
}
.card + .card { margin-top: 14px; }
.card-row { display: flex; align-items: flex-start; gap: 20px; }
.card-row > :first-child { flex: 1; min-width: 0; }
.card-row.middle { align-items: center; }
.card-row .right { text-align: right; }
.card-row .right .btn-row { justify-content: flex-end; }

.rule { border: 0; border-top: 1px solid var(--hair-soft); margin: 16px 0; }

/* ---------- buttons ----------------------------------------------- */

.btn {
  display: inline-block;
  background: var(--forest); color: #fff;
  border: 1px solid var(--forest); border-radius: 9px;
  padding: 9px 18px; font-size: 15px; font-weight: 500;
  text-decoration: none; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--forest-hover); }
.btn:disabled { opacity: 0.45; cursor: default; }

.btn.ghost { background: transparent; color: var(--ink); border-color: var(--hair); }
.btn.ghost:hover:not(:disabled) { background: var(--sunk); border-color: #d4d4d4; }

.btn.danger { background: transparent; color: var(--bad-ink); border-color: #e8cfcf; }
.btn.danger:hover:not(:disabled) { background: var(--bad-bg); }

.btn.small { padding: 6px 13px; font-size: 13px; border-radius: 8px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- fields ------------------------------------------------ */

label.field { display: block; margin-bottom: 14px; }
label.field > span {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--muted); margin-bottom: 6px;
}

input[type=text], input[type=url] {
  width: 100%; padding: 10px 13px;
  border: 1px solid var(--hair); border-radius: 9px;
  font: inherit; color: var(--ink); background: var(--paper);
}
input:focus { outline: 2px solid var(--forest); outline-offset: -1px; border-color: var(--forest); }
input.mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 14px; }

/* ---------- the address you paste into Claude --------------------- */

.addr {
  display: flex; align-items: center; gap: 12px;
  background: var(--sunk); border: 1px solid var(--hair);
  border-radius: 10px; padding: 12px 14px;
}
.addr code { flex: 1; font-size: 15px; overflow-x: auto; white-space: nowrap; }

/* ---------- badges ------------------------------------------------ */

/* Every badge carries its own word. Nothing here is legible by colour alone. */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--idle-bg); color: var(--idle-ink);
}
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge.bad { background: var(--bad-bg); color: var(--bad-ink); }

/* ---------- tables ------------------------------------------------ */

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint);
  padding: 0 12px 9px 0; border-bottom: 1px solid var(--hair);
}
td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--hair-soft); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
/* Narrow columns hug their content, so the gap has to come from the left or
   `Calls` and `Last` run into each other in the header row. */
td.tight, th.tight { width: 1%; white-space: nowrap; padding-right: 0; padding-left: 18px; }

tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--sunk); }

.tool-name { font-size: 14px; font-weight: 500; }
.tool-desc { font-size: 13px; color: var(--muted); margin-top: 2px; max-width: 34rem; }

/* ---------- the ask-me switch ------------------------------------- */

.sw {
  appearance: none; -webkit-appearance: none;
  width: 40px; height: 24px; border-radius: 999px;
  background: #d7d7d7; border: 0; position: relative;
  transition: background 0.12s ease; flex: none;
}
.sw::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform 0.12s ease;
}
.sw:checked { background: var(--forest); }
.sw:checked::after { transform: translateX(16px); }
.sw:disabled { opacity: 0.5; }
.sw:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }

/* ---------- usage: numbers first, the bar second ------------------ */

.tiles { display: flex; gap: 34px; flex-wrap: wrap; }
.tile .n { font-size: 27px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.tile .k { font-size: 13px; color: var(--muted); margin-top: 2px; }

.meter { height: 8px; background: var(--hair); border-radius: 999px; margin-top: 18px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--forest); border-radius: 999px; }
.meter.over i { background: var(--bad-ink); }

/* ---------- onboarding -------------------------------------------- */

.steps { counter-reset: s; }
.step { display: flex; gap: 18px; padding: 22px 0; border-top: 1px solid var(--hair); }
.step:first-child { border-top: 0; padding-top: 0; }
.step > .num {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--forest); color: #fff;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.step.todo > .num { background: #fff; color: var(--faint); border: 1px solid var(--hair); }
.step.done > .num { background: var(--forest-wash); color: var(--forest); }
.step > .body { flex: 1; min-width: 0; }

.qr {
  width: 232px; height: 232px; padding: 14px;
  border: 1px solid var(--hair); border-radius: 12px; background: #fff;
}
.qr svg { width: 100%; height: 100%; display: block; }

/* The two-digit code the phone offers. It is the whole screen while it is up,
   because a wrong tap burns the pairing window. */
.tapcode {
  font-size: 72px; font-weight: 700; letter-spacing: -0.03em;
  line-height: 1; font-variant-numeric: tabular-nums;
}

.fingerprint { font-size: 14px; color: var(--muted); letter-spacing: 0.02em; }

/* ---------- audit detail ------------------------------------------ */

.drawer { background: var(--sunk); border: 1px solid var(--hair); border-radius: 10px; padding: 16px 18px; margin-top: 10px; }
.drawer h4 { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin: 0 0 8px; }
.drawer + .drawer { margin-top: 12px; }
pre.args {
  margin: 0; font-size: 13px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
  max-height: 22rem; overflow: auto;
}

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---------- misc -------------------------------------------------- */

.err {
  background: var(--bad-bg); color: var(--bad-ink);
  border-radius: 9px; padding: 11px 14px; font-size: 14px; margin-bottom: 16px;
}
.note {
  background: var(--warn-bg); color: var(--warn-ink);
  border-radius: 9px; padding: 11px 14px; font-size: 14px;
}

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 14px;
  padding: 10px 18px; border-radius: 999px; z-index: 50;
}

.centre { max-width: 30rem; margin: 0 auto; padding: 76px 24px 90px; }
.centre .lockup { justify-content: center; padding-bottom: 26px; }

.spin {
  display: inline-block; width: 15px; height: 15px; vertical-align: -2px;
  border: 2px solid var(--hair); border-top-color: var(--forest);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .side { width: auto; flex: none; height: auto; position: static;
          border-bottom: 1px solid var(--hair); padding: 16px; }
  .main { border-left: 0; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .side-foot { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; }
  .side-foot .who { padding-bottom: 0; }
  .page { padding: 28px 20px 70px; }
  .card-row { flex-direction: column; gap: 14px; }
}

/* The first column has no left neighbour, so its gap has to go on the right or
   the timestamp runs into the tool name. */
td.tight:first-child, th.tight:first-child { padding-left: 0; padding-right: 18px; }

/* Setup runs before there is a tenant, so it has no sidebar to sit beside and
   centres itself instead of hugging the left edge of a wide window. */
.page.solo { margin: 0 auto; max-width: 44rem; padding-top: 34px; }

/* A phone gets the tool and the switch. Call counts and timings are the first
   thing to go, because a table that runs off the edge loses the switch instead. */
@media (max-width: 640px) {
  .opt { display: none; }
  .card-row.middle { align-items: flex-start; }
  .card-row .right { text-align: left; }
  .card-row .right .btn-row { justify-content: flex-start; }
}
