
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/site/bricolage-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/site/instrument-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/site/jetbrains-mono-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: Sora;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/site/sora-latin-700.woff2") format("woff2");
}

:root {
  --bg: #fbf8f0;
  --card: #ffffff;
  --paper: #fffdf7;
  --tint: #fff4d6;
  --honey: #f6b93b;
  --ink: #17140f;
  --muted: #4a4234;
  --soft: #6b6253;
  --line: #eadfc4;
  --line-soft: #f1e9d4;
  --field: #d9cba6;
  --good-bg: #e3f4ea;
  --good: #1f6b45;
  --danger: #a32a1e;
  --danger-line: #e7b4ae;
  --danger-bg: #fff7f5;
  --display: "Bricolage Grotesque", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html, body { margin: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--honey); color: var(--ink); }

a { color: inherit; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--card);
  color: var(--ink);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-weight: 600;
}

.skip:focus { top: 1rem; outline: 2px solid var(--ink); outline-offset: 2px; }

main:focus { outline: none; }

/* Guest pages (sign in, sign up, claim) use a narrow column. The account page and
   pages with a passkey or sign-in action use the wider one. */
.page {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem) 3rem;
}

.page.wide,
.page:has([data-options="/sign-up/passkey/options"]),
.page:has([data-options="/sign-in/passkey/options"]),
.page:has([data-options="/hive/passkeys/options"]),
.page:has(.actions > a.btn[href="/sign-in"]) {
  width: min(1080px, 100%);
}

.page.account-page { width: min(1360px, 100%); }

@media (max-width: 420px) {
  .page.wide,
  .page:has([data-options="/sign-up/passkey/options"]),
  .page:has([data-options="/sign-in/passkey/options"]),
  .page:has([data-options="/hive/passkeys/options"]),
  .page:has(.actions > a.btn[href="/sign-in"]) {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 1.1rem 0;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-family: Sora, var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.035em;
  line-height: 1;
  text-decoration: none;
}

.brand .hex {
  position: relative;
  width: 1.3em;
  height: 1.15em;
  flex: none;
  background: var(--ink);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

.brand .hex::after {
  content: "";
  position: absolute;
  inset: 30% 30%;
  background: var(--honey);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

.brand:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; border-radius: 8px; }

.nav,
.session {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
}

.session form { margin: 0; }

.who {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.who { white-space: nowrap; min-width: 0; max-width: 18rem; overflow: hidden; text-overflow: ellipsis; }
.who strong { color: var(--ink); }

.docs-link {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.docs-link:hover { color: var(--ink); text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn.secondary { background: var(--card); color: var(--ink); }
.btn.quiet { background: var(--card); color: var(--ink); border-color: #e1d5b6; }
.btn.danger { background: var(--card); color: var(--danger); border-color: var(--danger-line); }

.btn:hover:not(:disabled) { background: #2e281e; color: var(--paper); }
.btn.secondary:hover:not(:disabled),
.btn.quiet:hover:not(:disabled) { background: var(--tint); color: var(--ink); border-color: var(--ink); }
.btn.danger:hover:not(:disabled) { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.delete-account .delete-warning { margin: 0 0 16px; max-width: 64ch; }
.delete-account .actions { margin-top: 0; }

.btn:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Guest page content */
h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }

.lede {
  max-width: 38rem;
  margin: 1rem 0 0;
  font-size: 1.15rem;
  color: var(--muted);
}

.aside {
  margin: 0.5rem 0 0;
  color: var(--soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.hint {
  margin: 0;
  color: var(--soft);
  font-size: 0.875rem;
  line-height: 1.45;
}

.text-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration-color: #e9a21e;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.claim-sites {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  max-width: 38rem;
}

.claim-site {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.claim-site-hex {
  position: relative;
  flex: none;
  width: 1.5rem;
  height: 1.3rem;
  background: var(--honey);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

.claim-site-text { flex: 1; min-width: 0; display: grid; }

.claim-site-title,
.claim-site-address {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.claim-site-title { font-weight: 600; }
.claim-site-address { color: var(--soft); font-size: 0.875rem; font-family: var(--mono); letter-spacing: 0; }
.claim-site-note { flex: none; padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--tint); color: var(--muted); font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.claim-site .text-link { flex: none; white-space: nowrap; }

.claim-when {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.claim-when.urgent { color: var(--danger); }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.status {
  min-height: 1.2em;
  margin: 0.75rem 0 0;
  color: var(--good);
  font-weight: 600;
  font-size: 0.9rem;
}

.status.error { color: var(--danger); }

.state,
.banner {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--tint);
  color: var(--ink);
  font-weight: 500;
}


.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1.25rem;
  font-weight: 600;
  max-width: 24rem;
}

input, select, textarea {
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--field);
  border-radius: 10px;
  min-height: 40px;
  padding: 0.45rem 0.75rem;
  max-width: 100%;
}

textarea { min-height: 5rem; width: min(100%, 28rem); }

.account select {
  appearance: none;
  width: auto;
  max-width: 100%;
  padding-right: 1.9rem;
  cursor: pointer;
  background-color: var(--card);
  background-image: url("/hive/select-arrow.svg");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 0.7rem;
}

fieldset {
  margin: 1rem 0 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

legend { padding: 0 0.35rem; font-weight: 600; }

fieldset label,
.apps label { display: inline-flex; align-items: center; gap: 0.4rem; margin-right: 1rem; }

fieldset ul,
.apps ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.empty {
  margin: 0.75rem 0 0;
  color: var(--soft);
}

code { font-family: var(--mono); font-size: 0.88em; }

/* /hive: the menu column beside the content (see .hive-v2 below). */
.account-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2rem 2.75rem;
}

/* A number next to a label (Sites 15, Agents 2): a small neutral pill. Honey .badge is for unread. */
.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 400;
  line-height: 1.4;
  vertical-align: 0.1em;
  white-space: nowrap;
}

main.account {
  container: hive-main / inline-size;
  flex: 999 1 640px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

main.account > .state,
main.account > .banner,

.account-title {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.account-title h1 { font-size: clamp(2.2rem, 4vw, 2.9rem); }

/* Hive name, edited in place: looks like the title until focused. */
.hive-name { display: flex; flex-direction: column; gap: 0.2rem; margin: 0; }
.hive-name h1 { margin: 0; min-width: 0; }
.title-input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 0 -0.35rem;
  padding: 0.05rem 0.35rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  field-sizing: content;
}
.title-input:hover { border-color: var(--line); }
.title-input:focus { outline: none; border-color: var(--ink); background: var(--paper, transparent); text-overflow: clip; }
.hive-name .save-status:empty { display: none; }
.hive-name-row { display: flex; align-items: flex-start; gap: 0.5rem; min-width: 0; }
.hive-name-row h1 { flex: 0 1 auto; min-width: 0; }
/* The field is as wide as the name: a hidden copy of it sizes the grid cell both share (the script keeps it in step). */
.title-fit { display: inline-grid; max-width: calc(100% + 0.35rem); }
.hive-name .title-fit { margin: 0 0 0 -0.35rem; }
.title-fit > .title-sizer,
.title-fit > .title-input { grid-area: 1 / 1; }
.title-sizer {
  visibility: hidden;
  min-width: 2ch;
  margin: 0;
  padding: 0.05rem calc(0.35rem + 0.08em) 0.05rem 0.35rem;
  border: 1px solid transparent;
  white-space: pre;
  overflow: hidden;
}
/* width 0 keeps the field out of the cell's size; min-width fills the cell. */
.title-fit > .title-input { width: 0; min-width: 100%; margin: 0; field-sizing: fixed; }
.tier-badge {
  flex: none;
  margin-top: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--honey);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Your profile: one field per row, each saves on its own. */
.profile-field {
  display: grid;
  grid-template-columns: 6rem minmax(0, 28rem) auto;
  align-items: center;
  gap: 0.4rem 0.8rem;
  margin: 0.6rem 0 0;
}
.profile-field label { font-weight: 600; white-space: nowrap; }
.profile-field input { min-width: 0; text-overflow: ellipsis; }
.profile-field textarea { width: 100%; min-width: 0; min-height: 0; box-sizing: border-box; resize: vertical; font: inherit; }
.profile-field label:has(+ textarea) { align-self: start; padding-top: 0.45rem; }
.profile-field .save-status { white-space: nowrap; }
.profile-field .chips { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  white-space: nowrap;
  cursor: pointer;
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip-value { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) {
  .profile-field { grid-template-columns: minmax(0, 1fr) auto; }
  .profile-field label { grid-column: 1 / -1; }
  .profile-field .chips { grid-column: 1 / -1; }
}

.plan { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Usage meters */
.usage-strip .aside { margin-top: 0.6rem; font-size: 0.8rem; }

/* Eight tiles: four to a row where four fit (4 x 170px), otherwise two, so the rows stay even. */
.usage-strip { container-type: inline-size; }
.usage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* Every row as tall as the tallest tile (a tile with a meter), so the rows match. */
  grid-auto-rows: 1fr;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@container (min-width: 716px) {
  .usage { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.usage li {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.usage-label { color: var(--soft); font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* What's left and when it resets, under the number. Every tile has this line, empty or not, and it sits at the bottom, so the tiles line up. */
.usage-note { display: block; min-height: 1.35em; margin-top: auto; color: var(--soft); font-size: 0.75rem; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usage li.near { border-color: #e9a21e; }
.usage li.near .usage-note { color: #8a5a00; }
.usage li.full { border-color: var(--danger); }
.usage li.full .usage-note { color: var(--danger); }

.usage strong {
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.meter {
  display: block;
  height: 5px;
  border-radius: 3px;
  background: var(--line-soft);
  overflow: hidden;
}

.meter .fill { display: block; height: 100%; border-radius: 3px; background: var(--honey); }
.fill-0 { width: 0; }
.fill-10 { width: 10%; }
.fill-20 { width: 20%; }
.fill-30 { width: 30%; }
.fill-40 { width: 40%; }
.fill-50 { width: 50%; }
.fill-60 { width: 60%; }
.fill-70 { width: 70%; }
/* .meter .fill sets the honey colour, so the colours near the limit need the same weight. */
.meter .fill-80 { width: 80%; background: #e9a21e; }
.meter .fill-90 { width: 90%; background: #d9822b; }
.meter .fill-100 { width: 100%; background: var(--danger); }

/* Sections */
.block,
.panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scroll-margin-top: 1rem;
}

.panel {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.panel > .aside,
.section-head .aside { margin: 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.explain {
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
}

.explain summary {
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.explain p {
  margin: 0;
  padding: 0 0.9rem 0.9rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--good-bg);
  color: var(--good);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.pill.offline { background: #efeae0; color: var(--soft); }

/* Site cards: a compact header, with sharing, keys and settings folded below. */
.site-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  overflow: hidden;
}

.site-card p { margin: 0; }

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 1.1rem 1.4rem;
}

.site-id {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.site-card .site {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
}

.site-card .name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.vis {
  display: inline-flex;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.site-card .title { color: var(--muted); font-size: 0.9rem; }

.url {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--soft);
  overflow-wrap: anywhere;
}

a.url { color: var(--muted); text-decoration-color: var(--line); text-underline-offset: 3px; }
a.url:hover { color: var(--ink); text-decoration-color: currentColor; }

.site-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.row-form { margin: 0; }

.site-manage { border-top: 1px solid var(--line); }

.site-manage > summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 1.4rem;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.site-manage > summary::-webkit-details-marker { display: none; }

.site-manage > summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.15rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.site-manage[open] > summary { color: var(--ink); border-bottom: 1px solid var(--line); }
.site-manage[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.site-manage > summary:hover { color: var(--ink); }

.site-panels { padding: 0 1.4rem 1.25rem; }

.site-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 1.1rem;
}

.site-panel > h3 { font-size: 0.95rem; }

.site-panels.tabbed .site-panel > h3 { display: none; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0 -0.25rem;
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 44px;
  padding: 0.6rem 0.75rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--soft);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tab[aria-selected="true"] .count { background: var(--tint); color: var(--ink); }
.tab:hover { color: var(--ink); }

.site-card .site-row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem 0.9rem;
}

/*
 * A box on a site's tabs: one subject per box, the same border and radius as
 * the Settings boxes (.setting). A list or explainer inside a box drops its
 * own border, so no two lines run side by side.
 */
.panel-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
}
.box-head { display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; margin: 0; }
.box-name { margin: 0; font-weight: 600; white-space: nowrap; }
.box-note { min-width: 0; font-size: 0.875rem; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.box-head .pill { align-self: center; }
.panel-box .links { border: 0; border-radius: 0; padding: 0; border-top: 1px solid var(--line-soft); }
/* PIN rows: what it's for (editable), when it was used, role, Remove. */
.pins > li .pin-edit { display: flex; align-items: center; gap: 0.5rem; flex: 1 1 auto; min-width: 0; margin: 0; }
.pins > li .pin-label { flex: 1 1 9rem; min-width: 0; }
.pins > li .pin-used { flex: none; color: var(--soft); font-size: 0.85rem; white-space: nowrap; }
.pins > li .save-status:empty { display: none; }
.pin-new { display: flex; flex-direction: column; gap: 0.75rem; }
@media (max-width: 600px) {
  .links.pins > li, .links.pins > li:not(.has-url) { flex-wrap: wrap; }
  .pins > li .pin-edit { flex-wrap: wrap; flex: 1 1 100%; }
  .pins > li .pin-label { flex: 1 1 100%; }
  .pins > li .pin-used { flex: 1 1 100%; }
  html.js .pins > li .pin-edit .picker { flex: 1 1 0; min-width: 0; }
  html.js .pins > li .pin-edit .picker-button { width: 100%; min-width: 0; }
  .pins > li > .row-form { margin-left: auto; }
}

.links:empty { display: none; }
.panel-box .explain { border: 0; border-radius: 0; background: none; }
.panel-box .explain summary { padding: 0.1rem 0; }
.panel-box .member-help .role-list { padding: 0; }
.panel-box > .hint, .panel-box .pin-block > .hint { margin: 0; }
.pin-block { display: flex; flex-direction: column; gap: 0.75rem; }
.access-head {
  margin: 0.4rem 0 -0.35rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--soft);
}

.row-label { white-space: nowrap; }

.row-label { font-weight: 600; font-size: 0.9rem; }

.row-fields {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  min-width: 0;
}

.row-fields input { width: min(100%, 18rem); }

.account .check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
}

.account .check input {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  accent-color: var(--ink);
}

.setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 1rem;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
}

.setting > div { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; flex: 1 1 18rem; }
.setting-name { font-weight: 600; }

.agent-panel { display: flex; flex-direction: column; gap: 0.85rem; }

.agent-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.15rem 1.25rem 1.25rem;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--card);
}
.agent-card.ok { border-color: #bfe3cd; background: linear-gradient(180deg, var(--good-bg), var(--card) 85%); }
.agent-card.wait { border-color: #e8dcc0; background: linear-gradient(180deg, #faf3e1, var(--card) 85%); }
.agent-card.error { border-color: #f0c9c3; background: linear-gradient(180deg, var(--danger-bg), var(--card) 85%); }
.agent-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.agent-title { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin: 0; font-size: 1.05rem; font-weight: 700; }
.agent-card.error .agent-title { color: var(--danger); }
.agent-text { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; max-width: 42rem; }
.agent-meta { margin: 0; color: var(--soft); font-size: 0.8125rem; }
.agent-url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; overflow-wrap: anywhere; }
.agent-card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.45rem; }
.agent-services { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.15rem 0 0; padding: 0; list-style: none; }
.agent-services li {
  padding: 0.2rem 0.65rem;
  border: 1px solid #e1d5b6;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
}

.help-dot {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #e1d5b6;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
.help-dot:hover { border-color: var(--ink); background: var(--tint); }
.help-dot:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.link-button { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; text-decoration-line: underline; cursor: pointer; }

dialog.agent-dialog { width: min(36rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; }
dialog.agent-dialog > p { font-size: 0.9rem; line-height: 1.5; }
.agent-form { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 1.1rem; }
.agent-form .field-label { margin-top: 0.55rem; font-weight: 600; font-size: 0.875rem; }
.agent-form input[name="url"],
.agent-form input[type="password"] { width: 100%; }
.agent-choices { min-width: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.agent-choice-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; margin-top: 0.4rem; }
.agent-choice { position: relative; display: block; margin: 0; }
.agent-choices legend { padding: 0; }
.agent-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.agent-choice span {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.4rem 0.5rem;
  border: 1px solid #e1d5b6;
  border-radius: 12px;
  background: var(--card);
  font-weight: 600;
  font-size: 0.875rem;
  text-align: center;
}
.agent-choice input:checked + span { border-color: var(--ink); background: var(--tint); box-shadow: inset 0 0 0 1px var(--ink); }
.agent-choice input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.agent-where { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
@media (max-width: 460px) { .agent-choice-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.agent-detect { min-height: 1.2em; margin: 0.1rem 0 0; font-size: 0.8125rem; color: var(--good); }
.agent-detect.unknown { color: var(--soft); }
.agent-actions-check { margin-top: 0.75rem; }
.agent-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.agent-remove { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.agent-help { display: flex; flex-direction: column; gap: 0.85rem; margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: none; }
.agent-help li { padding: 0.85rem 1rem; border-radius: 14px; background: var(--card); border: 1px solid var(--line-soft); }
.agent-help li p { margin: 0.3rem 0 0; font-size: 0.875rem; line-height: 1.5; color: var(--muted); }
.agent-help .agent-help-name { margin: 0; color: var(--ink); font-weight: 700; font-size: 0.95rem; }
.agent-help-kind { margin-left: 0.35rem; color: var(--soft); font-weight: 600; font-size: 0.8rem; }
.agent-help-more { font-size: 0.875rem; }

/* Without the account script, the connect form shows in place. */
html:not(.js) .agent-panel dialog.agent-dialog[id^="agent-connect"] { display: block; position: static; width: auto; margin: 0; box-shadow: none; border: 1px solid var(--line-soft); }
html:not(.js) .help-dot,
html:not(.js) [data-dialog-open],
html:not(.js) [data-dialog-close] { display: none; }

.site-card .site-danger {
  padding: 1rem;
  border: 1px solid #f0c9c3;
  border-radius: 14px;
  background: var(--danger-bg);
  align-items: start;
}

.site-danger .row-label { color: var(--danger); }
.site-danger .row-fields { flex-direction: column; align-items: flex-start; }

/* Lists of links, passkeys and apps */
.keys {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.keys > li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.9rem;
}

.keys > li:last-child { border-bottom: 0; }

.keys > li > span:first-child { font-weight: 600; }

.keys > li > span:not(:first-child):not(.share):not(.kind):not(.email) { color: var(--soft); font-size: 0.85rem; }

.keys > li > .email { min-width: 0; overflow-wrap: anywhere; }

.keys > li .row-form { margin-left: auto; }

.members > li > .email { flex: 1 1 12rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.members > li > .pill { flex: none; }
.members .member-role { display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.members .member-role + .row-form { margin-left: 0; }
@media (max-width: 600px) {
  /* The list is also .links, which keeps rows on one line: members need two. */
  .links.members > li, .links.members > li:not(.has-url) { flex-wrap: wrap; }
  .members > li > .email { flex: 1 1 0; min-width: 6rem; }
  .members > li > .row-form:not(.member-role) { order: 1; margin-left: auto; }
  .members .member-role { order: 2; flex: 1 1 100%; margin-left: 0; }
  html.js .members .member-role .picker { flex: 1 1 0; min-width: 0; }
  html.js .members .member-role .picker-button { width: 100%; min-width: 0; }
}
.members .member-role .status:empty { display: none; }

.links:empty { display: none; }

.links {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 0.85rem;
}

.links > li .kind {
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--tint);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}
/* The last characters of a share link's secret, to tell links apart. */
.links > li .link-hint { font-family: var(--mono); font-size: 0.8rem; color: var(--ink); white-space: nowrap; }
.links > li .link-hint.none { font-family: var(--body); color: var(--soft); }
.links > li .expires { white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* One line per link: kind, hint, end date, Revoke. A fresh link's URL (no script) may wrap. */
.links > li:not(.has-url) { flex-wrap: nowrap; }

.revoked { color: var(--soft); font-size: 0.8rem; margin-left: auto; }
.links > li .expires { color: var(--soft); font-size: 0.8rem; }

.site-card .keys .share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  min-width: 0;
  flex: 1 1 14rem;
}

.site-card .keys .share .url { margin-top: 0; font-size: 0.8rem; }

.panel .status:empty { display: none; }

.account .btn {
  min-height: 36px;
  padding: 0.4rem 0.95rem;
  font-size: 0.875rem;
}

.account .keys .btn {
  min-height: 34px;
  padding: 0.3rem 0.8rem;
  font-size: 0.8125rem;
}

/* Activity */
.activity {
  margin: 0;
  padding: 0 1.2rem;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.activity li {
  display: grid;
  grid-template-columns: 11rem 9rem minmax(0, 1fr);
  grid-template-areas: "when actor what";
  gap: 0.1rem 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.9rem;
}

.activity li:last-child { border-bottom: 0; }
.activity .when { grid-area: when; color: var(--soft); font-variant-numeric: tabular-nums; }
.activity .actor { grid-area: actor; font-weight: 600; overflow-wrap: anywhere; }
.activity .what { grid-area: what; font-family: var(--mono); font-size: 0.8rem; }
.activity .summary { grid-area: what; color: var(--ink); }
.activity .summary:empty { display: none; }

.sites {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sites .site {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.save-status {
  margin: 0;
  min-height: 1.1em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--good);
}

.save-status.error { color: var(--danger); }

@media (max-width: 860px) {
  .activity li {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "actor" "what" "when";
  }
}

@media (max-width: 720px) {
  .site-head {
    flex-direction: column;
    align-items: stretch;
  }
  .site-tools .row-form,
  .site-tools .btn { width: 100%; }
  .site-card .site-row { grid-template-columns: minmax(0, 1fr); }
  .site-head,
  .site-manage > summary { padding-left: 1rem; padding-right: 1rem; }
  .site-panels { padding: 0 1rem 1rem; }
  .panel { padding: 1.1rem; }
  .top { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}

/* Dialogs */
dialog.secret-dialog::backdrop,
dialog.opening::backdrop { background: rgba(23, 20, 15, 0.5); }

dialog.secret-dialog {
  width: min(34rem, calc(100vw - 2rem));
  padding: 1.5rem;
  border: 0;
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 70px rgba(23, 20, 15, 0.3);
}

dialog.secret-dialog[open] { position: fixed; inset: 0; margin: auto; z-index: 20; }

dialog.secret-dialog h2 { font-size: 1.6rem; }

dialog.secret-dialog p { margin: 0.75rem 0 0; color: var(--muted); }

dialog.secret-dialog .secret-value {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: var(--tint);
}

dialog.secret-dialog code {
  font-size: 0.85rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}

dialog.secret-dialog form,
dialog.secret-dialog .opening-actions { margin-top: 1.1rem; }

dialog.opening {
  width: min(38rem, calc(100vw - 2.5rem));
  max-width: calc(100vw - 2rem);
  margin: auto;
  padding: 1.6rem;
  border: 0;
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  box-shadow: 0 30px 70px rgba(23, 20, 15, 0.3);
}

dialog.opening h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); }

dialog.opening p {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.opening-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.opening-go,
.opening-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1.2rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.opening-go { background: var(--ink); color: var(--honey); }
.opening-close { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

dialog.opening :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (max-width: 420px) {
  .opening-actions .opening-go,
  .opening-actions .opening-close { flex: 1 1 100%; }
}

/* Custom select menu. The native select stays for no-JS. */
.picker-button[hidden],
.picker-list[hidden] { display: none !important; }

html.js .picker { position: relative; display: inline-block; vertical-align: middle; }

html.js .picker-native,
html.js .picker select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html.js .picker-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  min-width: 9.5rem;
  padding: 0.3rem 2rem 0.3rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--field);
  background: var(--card) url("/hive/select-arrow.svg") no-repeat right 0.65rem center;
  background-size: 0.7rem;
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
}

html.js .picker-list {
  position: absolute;
  z-index: 6;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(23, 20, 15, 0.14);
}

html.js .picker-list [role="option"] {
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
}

html.js .picker-list [role="option"].active,
html.js .picker-list [role="option"]:hover { background: var(--tint); }

html.js .picker-list [role="option"][aria-selected="true"] { color: var(--ink); box-shadow: inset 3px 0 0 var(--honey); }

html.js form[data-live="visibility"] > .save { display: none; }

@media (forced-colors: active) {
  .brand .hex, .brand .hex::after, .btn, .opening-go { forced-color-adjust: none; }
  .brand .hex, .brand .hex::after { background: CanvasText; }
  .btn, .opening-go { background: CanvasText; color: Canvas; }
  .btn.secondary, .btn.quiet, .btn.danger, .opening-close { background: Canvas; color: CanvasText; border: 1px solid CanvasText; }
  dialog.opening, dialog.secret-dialog { background: Canvas; color: CanvasText; border: 1px solid CanvasText; }
  html.js .picker-button { background: Canvas; color: CanvasText; border: 1px solid CanvasText; }
  .meter .fill { background: CanvasText; }
}

/* Sign-in methods. The visitor-page redesign restyles these. */
.providers { display: grid; gap: 10px; max-width: 360px; margin: 18px 0; }
.providers .btn { justify-content: center; width: 100%; background: var(--card); color: var(--ink); }
.providers .btn:hover:not(:disabled) { background: var(--tint); color: var(--ink); border-color: var(--ink); }
.or { display: flex; align-items: center; gap: 12px; max-width: 360px; color: var(--soft); font-size: 0.9rem; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
#sign-in h3 { font-family: var(--display); font-size: 1rem; margin: 22px 0 8px; }
#sign-in .panel > h3:first-of-type { margin-top: 0; }
.panel > .apps:first-child > li:first-child { padding-top: 0; }
.panel > .apps:first-child > li:last-child { padding-bottom: 0; }
.method-name { font-weight: 600; }
.muted { color: var(--soft); }
.setup-card { border: 2px solid var(--honey); background: var(--tint); border-radius: 14px; padding: 18px 20px; margin: 18px 0; }
.setup-card h2 { margin: 0 0 6px; font-size: 1.15rem; }
.setup-card p { margin: 0 0 12px; color: var(--muted); }
.recovery-codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 10px 40px; padding: 20px 24px 20px 56px; margin: 18px 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.recovery-codes li { padding-left: 6px; }
.recovery-codes li::marker { color: var(--soft); font-size: 0.85rem; }
.recovery-codes code { font-family: var(--mono); font-size: 1.02rem; letter-spacing: 0.02em; }
@media (max-width: 420px) { .recovery-codes { grid-template-columns: 1fr; } }
.status.error { color: var(--danger); }

/* Auth layout: sign in, sign up, claim, connect, recovery, and notices.
   A honey panel on the left carries the brand and one statement. The form
   sits on paper to the right. Below 860px the panel becomes a top band. */
body.auth { background: var(--paper); }

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(340px, 44%) minmax(0, 1fr);
}

.auth-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  padding: 1.6rem clamp(1.5rem, 4vw, 3.5rem) 2rem;
  background: var(--honey);
  color: var(--ink);
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: -1;
  background-image: url("/site/comb.svg");
  background-size: 144px 83.138px;
  -webkit-mask-image: radial-gradient(70% 60% at 85% 75%, #000 30%, transparent 75%);
  mask-image: radial-gradient(70% 60% at 85% 75%, #000 30%, transparent 75%);
  animation: auth-drift 120s linear infinite;
}

@keyframes auth-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-144px, -83.138px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-panel::before { animation: none; }
}

.auth-panel .brand { align-self: flex-start; }

.panel-copy { max-width: 34rem; }

.panel-line {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 4.4vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-wrap: balance;
  max-width: 11ch;
}

.panel-sub {
  margin: 1.25rem 0 0;
  max-width: 26rem;
  font-size: 1.1rem;
  line-height: 1.45;
  color: var(--muted);
}

.panel-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  font-size: 0.9rem;
}

.panel-links a { color: var(--ink); text-decoration: none; font-weight: 500; }
.panel-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

.auth-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 clamp(1.25rem, 6vw, 5rem) 3rem;
}

.auth .top {
  justify-content: flex-end;
  border-bottom: 0;
  margin-bottom: 0;
  padding: 1.6rem 0 0;
}

.auth .top .brand { display: none; }

.auth main {
  width: min(480px, 100%);
  margin: clamp(2.5rem, 12vh, 7.5rem) 0 0;
}

.auth h1 { font-size: clamp(2.1rem, 3.4vw, 2.75rem); }

.auth .lede { font-size: 1.05rem; max-width: none; }

.auth main > .actions,
.auth main > form.actions {
  flex-direction: column;
  align-items: stretch;
}

.auth main > .actions > .btn,
.auth main > form.actions > .btn,
.auth main > .actions > .opening-go { width: 100%; }

.auth main > .actions > .btn + .btn { margin-top: 0.1rem; }

.auth .providers { max-width: none; margin: 1rem 0 0; }
.auth .or { max-width: none; margin: 1.25rem 0; }
.auth .field { max-width: none; }
.auth .field input { width: 100%; min-height: 48px; font-size: 1rem; }
.auth .aside { margin-top: 0.85rem; }
.auth main > .actions + .aside { margin-top: 1.5rem; }

.auth .panel { margin-top: 1.5rem; }

.auth-side > main:first-child { margin-top: clamp(4.5rem, 20vh, 11rem); }
.auth main form > .actions { flex-direction: column; align-items: stretch; }
.auth main form > .actions > .btn { width: 100%; }

/* An empty status line takes no room until a passkey message fills it. */
.auth .status:empty { min-height: 0; margin: 0; }
.auth .or + .status:empty + input[type="hidden"] + .actions { margin-top: 0; }
.auth input[type="radio"], .auth input[type="checkbox"] { accent-color: var(--ink); }

/* "This is a public or shared computer" on the sign-in pages. */
.auth .shared-device { display: flex; align-items: flex-start; gap: 0.65rem; margin: 1.25rem 0 0; font-weight: 500; cursor: pointer; }
.auth .shared-device[hidden] { display: none; }
.auth .shared-device input { flex: none; width: 1.15rem; height: 1.15rem; min-height: 0; margin: 0.2rem 0 0; }
.auth .shared-device span { display: grid; gap: 0.1rem; }
.auth .shared-device small { font-size: 0.875rem; font-weight: 400; color: var(--soft); }
.auth form > .shared-device { margin: 0 0 1rem; }

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-panel { gap: 1.75rem; padding: 1.1rem 1.25rem 1.6rem; }
  .auth-panel::before { -webkit-mask-image: radial-gradient(80% 90% at 100% 100%, #000 20%, transparent 70%); mask-image: radial-gradient(80% 90% at 100% 100%, #000 20%, transparent 70%); }
  .panel-line { font-size: clamp(2rem, 8vw, 2.8rem); max-width: 14ch; }
  .panel-sub { font-size: 1rem; margin-top: 0.75rem; }
  .panel-links { display: none; }
  .auth-panel .brand { font-size: 1.3rem; }
  .auth .top { position: absolute; top: 0.9rem; right: 1.25rem; padding: 0; }
  .auth .top .btn { min-height: 38px; padding: 0.4rem 0.95rem; font-size: 0.9rem; }
  .auth .top .btn.secondary { background: transparent; border-color: var(--ink); }
  .auth-side { padding: 0 1.25rem 2.5rem; }
  .auth main { margin-top: 2rem; }
}

/* Support */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--honey);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.banner.error { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-line); }
.banner.plan-hold p { margin: 0.35rem 0; }
.banner.plan-hold ul { margin: 0.35rem 0; padding-left: 1.2rem; }

.support-form { gap: 0.75rem; }
.support-form h2 { margin: 0; }
.support-form label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.9rem; }
.support-form input[name="title"],
.support-form textarea { width: 100%; box-sizing: border-box; }
.support-form label.check { flex-direction: row; align-items: center; font-weight: 500; }
.support-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.75rem 1.25rem; }
.support-fields select { width: 100%; box-sizing: border-box; }

.tickets,
.conversation { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }

.ticket-row {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.ticket-row.unread { border-color: var(--honey); background: var(--paper); }
.ticket-row > a { display: flex; align-items: center; gap: 0.6rem; min-width: 0; color: var(--ink); text-decoration: none; }
.ticket-row > a .badge { flex: none; }
.ticket-row > a:hover .ticket-title { text-decoration: underline; text-underline-offset: 3px; }
.ticket-title { min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ticket-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.5rem; margin-top: 0.4rem; }
.ticket-meta .aside { margin: 0; }
.hive-v2 .ticket-heading { font-size: clamp(1.6rem, 3vw, 2.2rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pill.kind { background: #efeae0; color: var(--muted); }
.pill.wait { background: var(--tint); color: var(--muted); }
.pill.turn { background: var(--honey); color: var(--ink); }
.pill.status-declined { background: #efeae0; color: var(--soft); }

.message {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--card);
}

.message.from-support { background: var(--paper); border-color: var(--line); }
.message-head { margin: 0 0 0.4rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.message-head .aside { margin: 0; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.message-link { margin: 0.5rem 0 0; overflow-wrap: anywhere; }
.ticket-event { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.875rem; }

/* Taken offline by Pagehive */
.pill.taken-down { background: var(--danger-bg); color: var(--danger); }
.takedown { margin-top: 0.6rem; padding: 0.75rem 0.9rem; border: 1px solid var(--danger-line); border-left: 4px solid var(--danger); border-radius: 12px; background: var(--danger-bg); }
.takedown p { margin: 0; }
.takedown p + p { margin-top: 0.35rem; }
.takedown strong { color: var(--danger); }
.takedown-statement { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Messages: a read one folds to one row (title, type, site, date); an unread one opens. */
.inbox-message { padding: 0; }
.inbox .message-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0;
  min-height: 44px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  list-style: none;
}
.inbox .message-head::-webkit-details-marker { display: none; }
.inbox .message-head::after {
  content: "";
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--soft);
  border-bottom: 2px solid var(--soft);
  transform: translateY(-2px) rotate(45deg);
}
.message-fold[open] > .message-head::after { transform: translateY(2px) rotate(-135deg); }
.message-fold[open] > .message-head { border-bottom: 1px solid var(--line-soft); }
.inbox .message-head:hover .message-title { text-decoration: underline; text-underline-offset: 3px; }
.message-title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 1rem; font-weight: 650; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox .message-head .badge { flex: none; }
.inbox .message-head .ticket-meta { flex: none; flex-wrap: nowrap; margin: 0; }
.inbox .message-head .pill,
.inbox .message-head .aside { white-space: nowrap; }
.message-open { padding: 0.75rem 1rem 0.9rem; }
.message-open .message-from { display: block; margin: 0 0 0.5rem; }
@container hive-main (max-width: 640px) {
  .inbox .message-head { flex-wrap: wrap; }
  .message-title { flex-basis: 0; }
  .inbox .message-head .ticket-meta { order: 3; flex-basis: 100%; flex-wrap: wrap; row-gap: 0.3rem; }
}

/* Search and type filter, above the list once there is more than one page. */
.message-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 0 0 1rem; }
.message-search { display: flex; align-items: center; gap: 0.5rem; flex: 1 1 18rem; min-width: 0; margin: 0; }
.message-search-field { position: relative; display: flex; align-items: center; flex: 1 1 auto; min-width: 0; }
.message-search-field svg { position: absolute; left: 0.75rem; color: var(--soft); pointer-events: none; }
.message-search-field input { width: 100%; min-height: 44px; padding-left: 2.1rem; text-overflow: ellipsis; }
.message-kinds { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.message-kinds .chip { min-height: 32px; text-decoration: none; }
.message-kinds .chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.message-empty p { margin: 0; }
.message-empty p + p { margin-top: 0.35rem; }
.pager { display: flex; justify-content: flex-end; gap: 0.5rem; margin: 1rem 0 0; }
.inbox-message.unread { border-color: var(--honey); }
.inbox-message.kind-moderation { border-left: 4px solid var(--danger); }
.pill.kind-moderation { background: var(--danger-bg); color: var(--danger); }
.pill.kind-update { background: var(--tint); color: var(--ink); }
.pill.site { background: var(--tint); color: var(--muted); }
.message-help { margin: 0.75rem 0 0; font-size: 0.875rem; }
.message-from { font-size: 0.875rem; font-weight: 600; color: var(--ink); white-space: nowrap; }

/* Message bodies: the safe Markdown subset (src/messages/markdown.ts) */
.message-body.md { white-space: normal; }
.message-body.md > :first-child { margin-top: 0; }
.message-body.md > :last-child { margin-bottom: 0; }
.message-body.md p { margin: 0 0 0.75em; }
.message-body.md h3, .message-body.md h4, .message-body.md h5 { margin: 1em 0 0.4em; line-height: 1.3; font-weight: 650; }
.message-body.md h3 { font-size: 1.05rem; }
.message-body.md h4 { font-size: 1rem; }
.message-body.md h5 { font-size: 0.95rem; color: var(--muted); }
.message-body.md ul, .message-body.md ol { margin: 0 0 0.75em; padding-left: 1.4em; }
.message-body.md li + li { margin-top: 0.2em; }
.message-body.md code { padding: 0.05em 0.35em; border-radius: 6px; background: var(--tint); font-size: 0.9em; overflow-wrap: anywhere; }
.message-body.md a { overflow-wrap: anywhere; }


/* OAuth consent: what the app can open */
.auth main > form.consent { gap: 0.6rem; }
.coverage {
  display: grid;
  gap: 0.5rem;
  margin: 0.25rem 0 0.6rem;
  padding: 0;
  border: 0;
  background: none;
}
.coverage legend { padding: 0; margin-bottom: 0.5rem; font-weight: 600; }
.coverage .coverage-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.coverage .coverage-choice:hover { border-color: var(--field); }
.coverage .coverage-choice:has(input:checked) { border-color: var(--ink); background: var(--tint); }
.coverage .coverage-choice:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.coverage-choice input { margin: 0.2rem 0 0; accent-color: var(--ink); }
.coverage-choice span { display: grid; gap: 0.1rem; }
.coverage-choice small { color: var(--soft); font-size: 0.85rem; }

/* Connect <app> as: the name of a new agent, shown while A new agent is picked. */
.consent-name {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0 2.1rem;
  font-weight: 500;
  white-space: nowrap;
}
.consent-name input { width: 100%; min-width: 0; margin: 0; }
.consent-agents:has(input[name="agent"]:checked):not(:has(input[value="new"]:checked)) .consent-name { display: none; }
.consent-agents .aside { margin: 0.2rem 0 0; }
.consent-agents .coverage-choice > span { min-width: 0; }
.consent-agents .coverage-choice strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.consent-notice {
  margin: 0 0 0.6rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--tint);
}

@media (forced-colors: active) {
  .auth-panel { border-right: 1px solid CanvasText; }
  .auth-panel::before { display: none; }
}

/* Stats (/hive/stats). No script: charts are server-drawn SVG coloured here. */
main.account.stats-page { gap: 1.25rem; }
.stats-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}
.stats-title { min-width: 0; }
.stats-title h1 {
  font-size: clamp(2rem, 4vw, 2.7rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-title .eyebrow { margin: 0 0 0.35rem; font-size: 0.85rem; font-weight: 600; }
.stats-title .eyebrow a { color: var(--soft); text-decoration: none; }
.stats-title .eyebrow a:hover { color: var(--ink); }
.stats-title .aside { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-title .aside a { color: var(--muted); }
.stats-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.period-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.period-tabs a {
  padding: 0.4rem 0.7rem;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.period-tabs a:hover { background: var(--tint); color: var(--ink); }
.period-tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.site-switch { position: relative; }
.site-switch summary {
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  list-style: none;
}
.site-switch summary::-webkit-details-marker { display: none; }
.site-switch ul {
  position: absolute;
  right: 0;
  z-index: 5;
  min-width: 12rem;
  max-height: 18rem;
  overflow-y: auto;
  margin: 0.35rem 0 0;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(23, 20, 15, 0.12);
  list-style: none;
}
.site-switch a {
  display: block;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-switch a:hover { background: var(--tint); }

.live {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.live strong { color: var(--ink); }
.live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #2f9e62;
  box-shadow: 0 0 0 0 rgba(47, 158, 98, 0.45);
  animation: live-pulse 2s ease-out infinite;
}
@keyframes live-pulse { 70% { box-shadow: 0 0 0 0.45rem rgba(47, 158, 98, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 158, 98, 0); } }
.live-pages { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; }
.live-page {
  max-width: 14rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--tint);
  font-family: var(--mono);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  overflow: hidden;
}
.kpi { padding: 1rem 1.15rem; border-right: 1px solid var(--line-soft); min-width: 0; }
.kpi:last-child { border-right: 0; }
.kpi dt { color: var(--soft); font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi dd { display: flex; align-items: baseline; gap: 0.45rem; margin: 0.3rem 0 0; white-space: nowrap; }
.kpi-value { font-family: var(--display); font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.delta { font-size: 0.78rem; font-weight: 600; color: var(--soft); }
.delta.up { color: var(--good); }
.delta.down { color: var(--danger); }

.chart-panel { padding: 1.1rem 1.25rem 0.9rem; }
.chart { margin: 0; }
.chart-plot { position: relative; height: 240px; }
.chart-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-max { position: absolute; top: -0.2rem; left: 0; color: var(--soft); font-family: var(--mono); font-size: 0.7rem; }
.chart-grid { stroke: var(--line-soft); stroke-width: 1; }
.chart-hit { fill: transparent; }
.chart-bar { fill: #f9d78c; }
g:hover .chart-bar { fill: var(--honey); }
g:hover .chart-hit { fill: rgba(246, 185, 59, 0.08); }
.chart-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-bots { fill: none; stroke: #7a8fb3; stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 0.45rem; color: var(--soft); font-family: var(--mono); font-size: 0.72rem; white-space: nowrap; }
.chart-key { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin-top: 0.6rem; color: var(--muted); font-size: 0.8rem; }
.chart-key span { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.chart-key span::before { content: ""; display: inline-block; width: 0.9rem; height: 0.55rem; border-radius: 2px; }
.key-bar::before { background: #f9d78c; }
.key-line::before { height: 2px !important; background: var(--ink); }
.key-bots::before { height: 0 !important; border-top: 2px dashed #7a8fb3; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1rem; }
.stat-card { gap: 0.6rem; min-width: 0; padding: 1.1rem 1.2rem; }
.stat-card h2 { font-size: 1.1rem; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card.locked { background: var(--paper); }
.stat-head { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0 0.5rem; color: var(--soft); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.2rem; margin: 0; padding: 0; list-style: none; }
.stat-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  min-height: 1.95rem;
  padding: 0 0.5rem;
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.86rem;
}
.stat-bar { position: absolute; inset: 0; width: 100%; height: 100%; }
.stat-bar rect { fill: var(--tint); }
.stat-row:hover .stat-bar rect { fill: #fde9b6; }
.stat-label { position: relative; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-num { position: relative; flex-shrink: 0; font-family: var(--mono); font-size: 0.8rem; white-space: nowrap; }
.stat-part + .stat-part { margin-top: 0.5rem; }
.stat-empty { margin: 0; color: var(--soft); font-size: 0.875rem; line-height: 1.5; }

.stats-foot-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem 1.5rem; }
.stats-foot { max-width: 46rem; margin: 0; color: var(--soft); font-size: 0.8rem; line-height: 1.5; }
.stats-foot a { color: var(--muted); }
.export summary { color: var(--ink); font-size: 0.875rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.export ul { margin: 0.5rem 0 0; padding-left: 1.1rem; font-size: 0.85rem; line-height: 1.8; }
.export a { color: var(--muted); }

.stats-sites { display: grid; margin: 0; padding: 0; list-style: none; }
.stats-site + .stats-site { border-top: 1px solid var(--line-soft); }
.stats-site-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px repeat(3, 6.5rem);
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0.5rem;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}
.stats-site-link:hover { background: var(--tint); }
.stats-site-name { display: grid; min-width: 0; }
.stats-site-name strong, .stats-site-name .host { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-site-name .host { color: var(--soft); font-family: var(--mono); font-size: 0.75rem; }
.stats-site-num { display: grid; justify-items: end; white-space: nowrap; }
.stats-site-num strong { font-family: var(--display); font-size: 1.15rem; }
.stats-site-num span { color: var(--soft); font-size: 0.72rem; }
.stats-site.quiet .stats-site-num strong { color: var(--soft); }
.spark { display: block; width: 120px; height: 32px; }
.spark polyline { fill: none; stroke: var(--honey); stroke-width: 2; stroke-linejoin: round; }

@media (max-width: 720px) {
  .stats-site-link { grid-template-columns: minmax(0, 1fr) repeat(2, 5.5rem); }
  .stats-site-spark, .stats-site-num.bots { display: none; }
  .kpi { border-bottom: 1px solid var(--line-soft); }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
@media (forced-colors: active) {
  .chart-bar, .stat-bar rect { fill: CanvasText; }
  .chart-line { stroke: Highlight; }
}

/* Custom domains (Domain tab). Names, labels and values stay on one line: long ones end in an ellipsis and keep a Copy button. */
.domain-panel { display: flex; flex-direction: column; gap: 0.75rem; }
.domains { border: 1px solid var(--line); border-radius: 12px; padding: 0 0.85rem; }
.domains > li.domain { flex-direction: column; align-items: stretch; gap: 0.6rem; }
.domain-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 0.75rem; min-width: 0; }
.domain-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  min-width: 0;
}
a.domain-name { color: var(--ink); text-underline-offset: 3px; }
.domain-role { color: var(--soft); font-size: 0.85rem; white-space: nowrap; }
.domain-tools { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; flex-wrap: wrap; }
.domain-tools .row-form { margin-left: 0; }
.domain-dns { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.domain-error { margin: 0; color: var(--danger); font-size: 0.85rem; line-height: 1.5; }
.dns-records { display: flex; flex-direction: column; font-size: 0.8rem; min-width: 0; }
.dns-record {
  display: grid;
  grid-template-columns: 4rem minmax(0, 2fr) minmax(0, 3fr);
  align-items: center;
  gap: 0.25rem 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line-soft);
  min-width: 0;
}
.dns-record:last-child { border-bottom: 0; }
.dns-head { color: var(--soft); font-weight: 600; white-space: nowrap; padding-top: 0; }
.dns-type { font-weight: 600; white-space: nowrap; }
.dns-cell { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
.dns-cell code {
  font-family: var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
}
.dns-cell .btn.copy { flex: 0 0 auto; padding: 0.15rem 0.5rem; font-size: 0.75rem; }
.domain-notice { margin: 0; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.dns-alternative summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.dns-alternative .dns-records { margin-top: 0.4rem; }
@media (max-width: 560px) {
  .dns-head { display: none; }
  .dns-record { grid-template-columns: 3.25rem minmax(0, 1fr); padding: 0.5rem 0; }
  .dns-record .dns-type { grid-row: span 2; align-self: start; padding-top: 0.2rem; }
  .dns-cell::before { content: attr(data-label); flex: 0 0 2.75rem; color: var(--soft); font-size: 0.75rem; white-space: nowrap; }
  .domain-tools { margin-left: 0; }
}

/* /hive (src/owner/hiveHtml.ts): the menu and its pages, scoped to .hive-v2. */
/* Menu beside the page down to 860px; below that the menu becomes a row of pills on top (see the 860px block). */
.hive-v2 { padding-top: clamp(1rem, 3vw, 1.75rem); flex-wrap: nowrap; }

.hive-v2 .hive-side {
  flex: 0 1 240px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  position: sticky;
  top: 1.25rem;
  /* As tall as the screen, so Connect your agent, Admin dashboard and Log out sit at its bottom. */
  height: calc(100dvh - 2.5rem);
  overflow-y: auto;
}

.hive-v2 .hive-side .brand { padding: 0.35rem 0.85rem 1.25rem; }
.hive-v2 .hive-nav { display: flex; flex-direction: column; gap: 0.2rem; }

.hive-v2 .hive-nav > a,
.hive-v2 .side-link > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  min-height: 42px;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}

.hive-v2 .hive-nav > a:hover,
.hive-v2 .side-link > a:hover { background: var(--tint); }
.hive-v2 .hive-nav > a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.hive-v2 .hive-nav > a[aria-current="page"] .count { background: rgba(246, 185, 59, 0.2); color: var(--honey); }
.hive-v2 .nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.hive-v2 .hive-connect {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: auto;
  padding: 1rem;
  border-radius: 14px;
  background: var(--ink);
  font-size: 0.875rem;
  line-height: 1.45;
}

.hive-v2 .hive-connect p { margin: 0; color: #d9cfbb; }
.hive-v2 .hive-connect a { color: var(--honey); font-weight: 600; text-underline-offset: 3px; }
.hive-v2 .hive-connect .connect-title { color: var(--honey); font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; }

.hive-v2 .hive-connect code {
  display: block;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background: #2a251c;
  color: var(--paper);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hive-v2 .side-link { margin: 0; }
.hive-v2 .side-link > a { font-weight: 500; }
.hive-v2 .hive-connect + .side-link { margin-top: 0.5rem; }

.hive-v2 .side-session {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.85rem 0.85rem 0;
  border-top: 1px solid var(--line);
}

.hive-v2 .side-session .who { flex: 1; font-weight: 600; color: var(--ink); }
.hive-v2 .side-session form { margin: 0; }
.hive-v2 .side-session .link-button { color: var(--soft); font-size: 0.875rem; white-space: nowrap; }

.hive-v2 main.account > .setup-card { margin: 0; }

.hive-v2 .attention-list,
.hive-v2 .site-tiles,
.hive-v2 .recent { list-style: none; margin: 0; padding: 0; }

.hive-v2 .attention-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 0.75rem;
}

.hive-v2 .attention-card {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--honey);
  border-radius: 14px;
  background: var(--tint);
  color: var(--ink);
  text-decoration: none;
}

.hive-v2 .attention-card:hover { border-color: var(--ink); }
.hive-v2 .attention-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.hive-v2 .attention-text strong,
.hive-v2 .attention-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .attention-text span { color: var(--muted); font-size: 0.8125rem; }

.hive-v2 .hex-bullet {
  width: 14px;
  height: 16px;
  flex: none;
  margin-top: 0.2rem;
  background: var(--ink);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

/*
 * One site tile is --tile-h tall (its padding, three lines, gaps and border).
 * Recent activity stretches to the Sites column beside it, but stays between
 * two and three tile rows high, whatever the number of sites.
 */
.hive-v2 .overview-grid {
  --tile-h: calc(6.86rem + 2px);
  --tile-gap: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 1.5rem 2rem;
}
.hive-v2 .overview-sites { flex: 2 1 480px; min-width: 0; align-self: flex-start; }
.hive-v2 .overview-activity { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; }
.hive-v2 .section-head .more { margin-left: auto; font-weight: 600; font-size: 0.875rem; white-space: nowrap; }

.hive-v2 .site-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: var(--tile-gap, 0.75rem);
}

.hive-v2 .site-tile {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  min-height: var(--tile-h, auto);
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.hive-v2 .site-tile:hover { border-color: var(--ink); }
.hive-v2 .tile-name { font-family: var(--mono); font-weight: 500; font-size: 0.875rem; }
.hive-v2 .tile-title { color: var(--muted); font-size: 0.8125rem; }
.hive-v2 .tile-by { color: var(--muted); font-size: 0.8125rem; }
.hive-v2 .tile-name,
.hive-v2 .tile-title,
.hive-v2 .tile-by { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .tile-meta { display: flex; align-items: center; gap: 0.4rem; }

.hive-v2 .recent {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  padding: 0.25rem 1rem;
}

/*
 * On the Overview the list fills the box. Entries that don't fit wrap into a
 * second column that is clipped away, so only whole entries show. The column
 * gap is wider than the padding, so none of that column peeks in.
 */
.hive-v2 .overview-activity .recent {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  column-gap: 2.5rem;
  min-height: calc(2 * var(--tile-h) + var(--tile-gap));
  max-height: calc(3 * var(--tile-h) + 2 * var(--tile-gap));
  overflow: hidden;
}
.hive-v2 .overview-activity .recent li { width: 100%; }

.hive-v2 .recent li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line-soft);
  font-size: 0.875rem;
}

.hive-v2 .recent li:first-child { border-top: 0; }
.hive-v2 .recent-what { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .recent time { flex: none; font-family: var(--mono); font-size: 0.75rem; color: var(--soft); }

@media (max-width: 860px) {
  .hive-v2 { flex-wrap: wrap; }
  .hive-v2 .hive-side { position: static; flex: 1 1 100%; min-width: 0; height: auto; overflow: visible; }
  .hive-v2 .hive-side .brand { padding-bottom: 0.75rem; }
  .hive-v2 .side-session { margin-top: 0.5rem; padding-top: 0.5rem; }
  .hive-v2 .side-link,
  .hive-v2 .hive-connect { display: none; }
  .hive-v2 .hive-nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 0.4rem; padding-bottom: 0.25rem; }
  .hive-v2 .hive-nav > a { flex: none; gap: 0.4rem; border: 1px solid #e1d5b6; border-radius: 999px; background: var(--card); }
  .hive-v2 .hive-nav > a[aria-current="page"] { border-color: var(--ink); background: var(--ink); }
}

/* /hive: Sites list and one site's page. */
.hive-v2 .site-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.hive-v2 .site-filters a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 36px;
  padding: 0 0.9rem;
  border: 1px solid #e1d5b6;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
}
.hive-v2 .site-filters a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.hive-v2 .site-filters a[aria-current="page"] .count { background: rgba(246, 185, 59, 0.2); color: var(--honey); }

/* position: relative keeps the screen-reader-only header text inside the scroll box. */
.hive-v2 .table-box { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); margin-bottom: 1.25rem; }
.hive-v2 .site-table { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; }
.hive-v2 .site-table th {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.hive-v2 .site-table th:nth-child(1) { width: 38%; }
.hive-v2 .site-table th:nth-child(2) { width: 14%; }
.hive-v2 .site-table th:nth-child(3) { width: 20%; }
.hive-v2 .site-table th:nth-child(4) { width: 16%; }
.hive-v2 .site-table th:nth-child(5) { width: 6.75rem; }
/* A narrow page column drops the Agent column (each site's page shows it) so Open stays in view without scrolling. */
@container hive-main (max-width: 760px) {
  .hive-v2 .site-table { min-width: 520px; }
  .hive-v2 #sites > .table-box .site-table th:nth-child(4),
  .hive-v2 #sites > .table-box .site-table td:nth-child(4) { display: none; }
  .hive-v2 #sites > .table-box .site-table th:nth-child(1) { width: 46%; }
  .hive-v2 #sites > .table-box .site-table th:nth-child(3) { width: 24%; }
}
.hive-v2 .site-table td {
  height: 62px;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hive-v2 .site-table tr:last-child td { border-bottom: 0; }
.hive-v2 .site-table tbody tr:hover { background: var(--tint); }
.hive-v2 .site-table tbody tr.empty-row:hover { background: none; }
.hive-v2 .site-table .empty-row td { white-space: normal; }
.hive-v2 .site-table .empty-row .empty { margin: 0; }
.hive-v2 .site-cell a,
.hive-v2 .site-cell-link { display: flex; align-items: center; gap: 0.75rem; min-width: 0; color: var(--ink); text-decoration: none; }
.hive-v2 .site-cell .hex-bullet { margin-top: 0; background: var(--honey); }
.hive-v2 .site-cell .hex-bullet.off { background: var(--field); }
.hive-v2 .site-cell-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.hive-v2 .site-cell a:hover .tile-name { text-decoration: underline; }
.hive-v2 .agent-line { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.hive-v2 .agent-line .cell-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .agent-line .badge { flex: none; }
.hive-v2 .cell-text.muted { color: var(--soft); }
.hive-v2 .open-cell { text-align: right; }
.hive-v2 .open-cell .row-form { display: inline-flex; margin: 0; }
/* Shared with you: the same column rhythm as your own sites, Open and Leave side by side. */
.hive-v2 .shared-table th:nth-child(1) { width: 30%; }
.hive-v2 .shared-table th:nth-child(2) { width: 24%; }
.hive-v2 .shared-table th:nth-child(3) { width: 28%; }
.hive-v2 .shared-table th:nth-child(4) { width: 11.5rem; }
.hive-v2 .shared-table .tile-by { display: none; }
.hive-v2 .shared-table .shared-by { display: block; overflow: hidden; text-overflow: ellipsis; }
/* Access: the role, and under it what that role lets you do there. */
.hive-v2 .role-cell-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.hive-v2 .role-name { align-self: flex-start; margin-bottom: 0.2rem; }
.hive-v2 .role-note { color: var(--muted); font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .actions-cell { text-align: right; }
.hive-v2 .row-actions { display: inline-flex; align-items: center; gap: 0.4rem; }
.hive-v2 .row-actions .row-form { display: inline-flex; margin: 0; }
/* A member's own agent: the panel sits under its site's row, across the table. */
.hive-v2 .shared-table .shared-agent-row td { height: auto; padding: 0.75rem 1rem 1rem; white-space: normal; overflow: visible; }
.hive-v2 .shared-table .shared-agent-row .hint { margin: 0 0 0.5rem; }
.btn.danger-quiet:hover:not(:disabled) { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
@container hive-main (max-width: 760px) {
  /* Narrow: who shared it moves under the site name, so Access and the buttons stay in view. */
  .hive-v2 .shared-table th:nth-child(2),
  .hive-v2 .shared-table td:nth-child(2),
  .hive-v2 .shared-table .tile-title { display: none; }
  .hive-v2 .shared-table .tile-by { display: block; }
  .hive-v2 .shared-table th:nth-child(1) { width: auto; }
  .hive-v2 .shared-table th:nth-child(3) { width: 40%; }
}

.hive-v2 .crumbs { display: flex; align-items: center; gap: 0.5rem; color: var(--soft); font-size: 0.875rem; white-space: nowrap; }
.hive-v2 .crumbs a { color: var(--soft); }
.hive-v2 .crumb-here { font-family: var(--mono); color: var(--ink); overflow: hidden; text-overflow: ellipsis; }

.hive-v2 .site-page { border: 0; background: transparent; padding: 0; box-shadow: none; display: flex; flex-direction: column; gap: 1.5rem; }
.hive-v2 .site-page .site-head { align-items: flex-start; padding: 0; }
.hive-v2 .site-page .site .name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.04em;
  line-height: 1;
}
.hive-v2 .site-page .site-panels {
  padding: 0.25rem 1.5rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

/* /hive: Settings. Its sections are sub-items under Settings in the main menu. */
.hive-v2 .settings-body { min-width: 0; display: flex; flex-direction: column; gap: 2rem; }
.hive-v2 .hive-nav > a.nav-sub { min-height: 34px; padding: 0.3rem 0.85rem 0.3rem 1.85rem; font-weight: 500; font-size: 0.875rem; color: var(--muted); }
.hive-v2 .hive-nav > a.nav-sub:hover { color: var(--ink); }
.hive-v2 .hive-nav > a.nav-sub[aria-current="true"] { color: var(--ink); font-weight: 600; background: var(--tint); }
@media (max-width: 860px) {
  .hive-v2 .hive-nav > a.nav-sub { padding: 0.3rem 0.85rem; }
}
.hive-v2 .settings-body > .setup-card { margin: 0; }
.hive-v2 .settings-body > .block { scroll-margin-top: 1.25rem; }
.hive-v2 .tier-field { grid-template-columns: 6rem auto; }
.hive-v2 .tier-label { font-weight: 600; white-space: nowrap; }
.hive-v2 .tier-value { display: flex; align-items: center; gap: 0.5rem; }

/* /hive: Activity. */
.hive-v2 .activity-log { list-style: none; margin: 0; padding: 0.25rem 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.hive-v2 .activity-log li {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 10rem) minmax(0, 1fr) minmax(0, 11rem);
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line-soft);
  font-size: 0.875rem;
}
.hive-v2 .activity-log li:first-child { border-top: 0; }
.hive-v2 .activity-log li > * { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .activity-log .when { color: var(--soft); font-family: var(--mono); font-size: 0.75rem; }
.hive-v2 .activity-log .actor { font-weight: 600; }
.hive-v2 .activity-log .what { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.hive-v2 .activity-log .activity-site { font-family: var(--mono); font-size: 0.75rem; text-align: right; color: var(--muted); }
.hive-v2 .older { margin: 1rem 0 0; }
.hive-v2 .older-back { margin: 0.5rem 0 0; font-size: 0.875rem; }
@media (max-width: 720px) {
  .hive-v2 .activity-log li { grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.75rem; }
  .hive-v2 .activity-log .when { grid-column: 2; grid-row: 1; text-align: right; }
  .hive-v2 .activity-log .actor { grid-column: 1; grid-row: 1; }
  .hive-v2 .activity-log .what,
  .hive-v2 .activity-log .summary { grid-column: 1; }
  .hive-v2 .activity-log .activity-site { grid-column: 2; text-align: right; }
}

/* /hive: API keys, whole hive and one site. */
.hive-v2 .key-kind { margin: 0.5rem 0 0.75rem; font-family: var(--mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: #8a5a00; }
.hive-v2 .key-kind-block { margin-top: -0.75rem; gap: 0.4rem; }
.hive-v2 .key-kind-block .key-kind { margin-bottom: 0; }
.hive-v2 .key-kind-block .aside { margin: 0; }
.hive-v2 .key-kind-block .empty { margin: 0.35rem 0 0; font-size: 0.9375rem; }
.hive-v2 .new-agent > .aside { flex: 1 1 100%; margin: 0; }

/* /hive: a site's page, "At a glance" as a row of facts under its header, and the Versions tab. */
.hive-v2 .site-page-body > .site-panels { min-width: 0; }
.hive-v2 .glance { margin-top: -0.5rem; }
.hive-v2 .glance dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hive-v2 .glance-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  padding: 0.9rem 1.4rem;
}
.hive-v2 .glance-row + .glance-row { border-left: 1px solid var(--line-soft); }
.hive-v2 .glance dt { color: var(--soft); font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .glance dd { display: flex; align-items: baseline; gap: 0.4rem; margin: 0; min-width: 0; }
.hive-v2 .glance-value {
  min-width: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hive-v2 .glance-sub { color: var(--soft); font-size: 0.8125rem; white-space: nowrap; }
.hive-v2 .glance-none { color: var(--soft); font-family: var(--body); font-weight: 400; font-size: 0.9375rem; letter-spacing: 0; }
.hive-v2 .glance-row.waiting .glance-value { display: inline-flex; align-items: center; gap: 0.45rem; }
.hive-v2 .glance-row.waiting .glance-value::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--honey); }
@media (max-width: 900px) {
  .hive-v2 .glance dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hive-v2 .glance-row { padding: 0.75rem 1rem; }
  .hive-v2 .glance-row + .glance-row { border-left: 0; }
  .hive-v2 .glance-row:nth-child(even) { border-left: 1px solid var(--line-soft); }
  .hive-v2 .glance-row:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
  .hive-v2 .glance-row:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.hive-v2 .version-list { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.hive-v2 .version {
  display: grid;
  grid-template-columns: 3.5rem 6rem minmax(0, 8rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.8125rem;
}
.hive-v2 .version:first-child { border-top: 0; }
.hive-v2 .version > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .version-number { font-family: var(--mono); font-weight: 500; }
.hive-v2 .version-when { font-family: var(--mono); font-size: 0.75rem; color: var(--soft); }
.hive-v2 .version-message { color: var(--muted); }
.hive-v2 .version-mark { justify-self: end; }
.hive-v2 .version-mark .row-form { margin: 0; }
@media (max-width: 720px) {
  .hive-v2 .version { grid-template-columns: 3rem minmax(0, 1fr) auto; }
  .hive-v2 .version-by,
  .hive-v2 .version-message { display: none; }
}

/* /hive: what each member choice allows, folded under the invite form. */
.member-help { margin: 0 0 0.75rem; }
.member-help .role-list { display: grid; gap: 0.35rem; margin: 0 0 0.6rem; padding: 0 0.9rem; font-size: 0.875rem; line-height: 1.45; }
.member-help .role-list > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.75rem; }
.member-help dt { font-weight: 600; white-space: nowrap; }
.member-help dd { margin: 0; color: var(--muted); }

/* /hive: what just happened, as a toast at the bottom of the screen (accountScript toast). */
.toast-region {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: min(26rem, calc(100vw - 2.5rem));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.6rem 0.5rem 0.6rem 0.9rem;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(23, 20, 15, 0.22);
  pointer-events: auto;
  animation: toast-in 180ms ease-out;
}
.toast.leaving { opacity: 0; transform: translateY(6px); transition: opacity 180ms ease, transform 180ms ease; }
.toast-mark { width: 10px; height: 11px; flex: none; background: var(--honey); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.toast.error { background: var(--danger); }
.toast.error .toast-mark { background: var(--paper); }
.toast-text { min-width: 0; overflow-wrap: anywhere; }
.toast-close {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.7;
  cursor: pointer;
}
.toast-close:hover { opacity: 1; background: rgba(255, 255, 255, 0.12); }
.toast-close:focus-visible { outline: 2px solid var(--honey); outline-offset: 1px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
  .toast.leaving { transition: none; }
}
@media (max-width: 560px) {
  .toast-region { left: 1rem; right: 1rem; bottom: 1rem; max-width: none; align-items: stretch; }
}

/* Security tab: the scan report. Labels and names stay on one line; long names are cut with an ellipsis. */
.scan-run { align-items: center; }
.scan-run .hint { margin: 0; }
.scan-report { margin-top: 1rem; }
.scan-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line-soft); }
.scan-summary .hint { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.scan-counts { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.scan-stale { margin: 0.75rem 0 0; padding: 0.55rem 0.8rem; border-radius: 10px; background: var(--tint); color: var(--ink); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill.sev-high { background: var(--danger-bg); color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger-line); }
.pill.sev-medium { background: var(--honey); color: var(--ink); }
.pill.sev-low { background: var(--tint); color: var(--muted); }
.pill.sev-info { background: #efeae0; color: var(--soft); }
.scan-group { margin-top: 1.25rem; }
.scan-group h4 { margin: 0 0 0.5rem; font-family: var(--mono); font-size: 0.6875rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.scan-group > .hint { margin: 0 0 0.6rem; }
.scan-findings { list-style: none; margin: 0; padding: 0; }
.scan-finding { padding: 0.7rem 0 0.7rem 0.85rem; border-top: 1px solid var(--line-soft); border-left: 3px solid transparent; }
.scan-finding:first-child { border-top: 0; }
.scan-finding.sev-high { border-left-color: var(--danger); }
.scan-finding.sev-medium { border-left-color: var(--honey); }
.scan-finding.sev-low { border-left-color: var(--field); }
.scan-finding-head { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.scan-title { font-weight: 600; font-size: 0.875rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scan-where { margin-left: auto; flex: none; max-width: 40%; font-family: var(--mono); font-size: 0.75rem; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scan-detail { margin: 0.3rem 0 0; font-size: 0.8125rem; color: var(--muted); }
.scan-fix { margin: 0.3rem 0 0; }
.scan-info { margin-top: 0.5rem; }
.scan-info summary { cursor: pointer; font-size: 0.8125rem; font-weight: 600; color: var(--soft); white-space: nowrap; }
.scan-info .scan-findings { margin-top: 0.4rem; }
.scan-table-box { margin-bottom: 0; }
.scan-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.8125rem; }
.scan-table th { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); color: var(--soft); font-family: var(--mono); font-size: 0.6875rem; font-weight: 400; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.scan-table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; white-space: nowrap; }
.scan-table tbody tr:last-child td { border-bottom: 0; }
.scan-item { max-width: 18rem; overflow: hidden; text-overflow: ellipsis; }
.scan-kind { display: inline-block; min-width: 4.25rem; color: var(--soft); font-size: 0.75rem; }
.scan-name { font-family: var(--mono); font-size: 0.75rem; }
.scan-access { margin-left: 0.4rem; color: var(--soft); font-size: 0.6875rem; }
.scan-cell.no { color: var(--soft); }
.scan-cell.na { color: var(--field); }
.scan-via { display: inline-block; margin-right: 0.25rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: var(--tint); color: var(--ink); font-size: 0.6875rem; font-weight: 600; }
/* Rights tab (rightsHtml.ts): one table per kind of thing, the same columns in each so they line up. */
.rights-who { margin: 0.25rem 0 0; font-size: 0.8125rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rights-state { margin: 0.75rem 0 0; padding: 0.6rem 0.85rem; border-left: 3px solid var(--honey); background: var(--tint); font-size: 0.8125rem; }
.rights-group { margin-top: 1.25rem; }
.rights-group h4 { margin: 0 0 0.25rem; font-family: var(--mono); font-size: 0.6875rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); white-space: nowrap; }
.rights-group h4 .count { margin-left: 0.25rem; }
.rights-group > .hint { margin: 0 0 0.6rem; }
.rights-table-box { margin-bottom: 0; }
.rights-table { width: 100%; min-width: 640px; table-layout: fixed; border-collapse: collapse; font-size: 0.8125rem; }
.rights-table thead th { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); color: var(--soft); font-family: var(--mono); font-size: 0.6875rem; font-weight: 400; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rights-table thead th:first-child { width: 34%; }
.rights-table td, .rights-table tbody th { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; white-space: nowrap; text-align: left; font-weight: 400; }
.rights-table tbody tr:last-child td, .rights-table tbody tr:last-child th { border-bottom: 0; }
.rights-item { position: sticky; left: 0; z-index: 1; background: var(--paper); overflow: hidden; }
.rights-what, .rights-how { display: flex; align-items: baseline; gap: 0.4rem; min-width: 0; }
.rights-how { margin-top: 0.1rem; }
.rights-how:empty { display: none; }
.rights-kind { flex: none; color: var(--soft); font-size: 0.75rem; }
.rights-name { min-width: 0; font-family: var(--mono); font-size: 0.75rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.rights-access { flex: none; color: var(--muted); font-size: 0.6875rem; font-weight: 600; }
.rights-note { min-width: 0; color: var(--soft); font-size: 0.6875rem; overflow: hidden; text-overflow: ellipsis; }
.rights-unused { flex: none; padding: 0 0.4rem; border-radius: 999px; border: 1px solid var(--honey); color: var(--muted); font-size: 0.6875rem; font-weight: 600; }
.rights-cell { overflow: hidden; }
.rights-cell.no { color: var(--soft); }
.rights-cell.na { color: var(--field); }
.rights-via { display: inline-block; margin-right: 0.25rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: var(--tint); color: var(--ink); font-size: 0.6875rem; font-weight: 600; }
.rights-help { margin-top: 1.25rem; }
@media (max-width: 720px) {
  /* Body text wraps on a phone; names, labels and cells stay on one line. */
  .rights-who { white-space: normal; }
  /* Fixed widths so the columns line up from one table to the next while it scrolls sideways. */
  .rights-table { min-width: 0; }
  .rights-table.cols-4 { width: 32.5rem; }
  .rights-table.cols-5 { width: 38.25rem; }
  .rights-table thead th:first-child { width: 9.5rem; }
  .rights-table thead th:not(:first-child) { width: 5.75rem; }
  .rights-table td, .rights-table tbody th { padding-left: 0.6rem; padding-right: 0.6rem; }
  .rights-item { max-width: 9.5rem; box-shadow: 1px 0 0 var(--line-soft); }
}
@media (max-width: 720px) {
  .scan-finding-head { flex-wrap: wrap; }
  .scan-where { margin-left: 0; max-width: 100%; }
}

/* /hive: Agents › Check these. A calm box above the list, one line per thing to check, each with Got it. */
.hive-v2 .agents-review .section-head { align-items: center; flex-wrap: nowrap; }
.hive-v2 .agents-review .section-head h2 { flex: 1; min-width: 0; white-space: nowrap; }
.hive-v2 .agents-review .section-head .row-form { flex: none; margin: 0; }
.hive-v2 .agents-review .panel { background: var(--tint); border-color: var(--honey); }
.hive-v2 .agents-review .panel > .aside { margin: 0 0 0.6rem; color: var(--muted); }
.hive-v2 .review-items { list-style: none; margin: 0; padding: 0; }
.hive-v2 .review-item { display: flex; align-items: center; gap: 0.75rem 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line-soft); }
.hive-v2 .review-item:first-child { border-top: 0; }
.hive-v2 .review-item p { flex: 1; min-width: 0; margin: 0; line-height: 1.5; }
.hive-v2 .review-item .row-form { flex: none; margin: 0; }
.hive-v2 .review-item .btn { white-space: nowrap; }
@container hive-main (max-width: 560px) {
  .hive-v2 .review-item { flex-wrap: wrap; }
}

/* /hive: Agents. One card per agent; the whole card opens the agent's page. */
.hive-v2 #agents .section-head { align-items: center; flex-wrap: nowrap; }
.hive-v2 #agents .section-head .aside { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .agents-add { flex: none; white-space: nowrap; }
.hive-v2 .agent-tiles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.hive-v2 .agent-tile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}
.hive-v2 .agent-tile:hover { border-color: var(--ink); }
.hive-v2 .agent-tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.hive-v2 .agent-tile .hex-bullet { margin-top: 0; background: var(--honey); }
.hive-v2 .agent-tile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.hive-v2 .agent-tile-side { flex: 0 1 auto; max-width: 45%; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; }
.hive-v2 .agent-tile-name { font-weight: 600; }
.hive-v2 .agent-tile-line, .hive-v2 .agent-tile-used { color: var(--soft); font-size: 0.8125rem; }
.hive-v2 .agent-tile-level { font-weight: 600; font-size: 0.875rem; }
.hive-v2 .agent-tile-name, .hive-v2 .agent-tile-line, .hive-v2 .agent-tile-level, .hive-v2 .agent-tile-used { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .agents-empty { padding: 1.25rem 1.4rem; border: 1px dashed var(--field); border-radius: 16px; background: var(--paper); }
.hive-v2 .agents-empty p { margin: 0; color: var(--muted); line-height: 1.5; }
.hive-v2 .agents-empty .agents-empty-title { margin-bottom: 0.3rem; color: var(--ink); font-weight: 600; }
@container hive-main (max-width: 560px) {
  .hive-v2 .agent-tile { flex-wrap: wrap; }
  .hive-v2 .agent-tile-side { flex: 1 1 100%; max-width: 100%; flex-direction: row; align-items: baseline; justify-content: space-between; padding-left: calc(14px + 0.85rem); }
  .hive-v2 #agents .section-head .aside { display: none; }
  .hive-v2 #agents .section-head .agents-add { margin-left: auto; }
}

/* Add agent: a dialog on the Agents page, a page of its own without script. */
.agent-add { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 1rem; }
.agent-add .field-label { margin-top: 0.55rem; font-weight: 600; font-size: 0.875rem; }
.agent-add > input[name="name"] { width: 100%; }
.panel > .agent-add { margin-top: 0; }
.agent-add .agent-options { margin-top: 0.5rem; }
.agent-add .hint { margin-top: 0.75rem; }
.agent-add .agent-add-site { width: 100%; margin-top: 0.4rem; }
.agent-add .agent-options:not(:has(input[value="site"]:checked)) .agent-add-site { display: none; }
html:not(.js) .add-agent-dialog { display: none; }

/* Choices on the agent pages: a radio, a title that never wraps, and a one-line hint. */
.agent-options { display: grid; gap: 0.4rem; min-width: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.agent-options legend { padding: 0; }
.agent-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
  margin: 0;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
}
.agent-option:hover { border-color: var(--field); }
.agent-option:has(input:checked) { border-color: var(--ink); background: var(--tint); }
.agent-option:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.agent-option:has(input:disabled) { cursor: default; opacity: 0.6; }
.agent-option input { flex: none; width: 1rem; height: 1rem; min-height: 0; margin: 0.15rem 0 0; padding: 0; accent-color: var(--ink); }
.agent-option-text { display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; }
.agent-option-title { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-option-hint { color: var(--soft); font-size: 0.8125rem; line-height: 1.4; }

/* One agent's page: the Settings boxes, one subject each. */
.hive-v2 .agent-head .agent-summary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .agent-head h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .agent-body { gap: 1.5rem; }
.agent-form-box { display: flex; flex-direction: column; gap: 0.75rem; margin: 0; }
.agent-form-box [data-autosave-fallback] { align-self: flex-start; }
html.js .agent-form-box [data-autosave-fallback] { display: none; }
.agent-levels { grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); }
.level-line { margin: 0; color: var(--muted); font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.level-line strong { color: var(--ink); }
.level-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: 0.5rem 1rem; margin: 0; padding: 0.75rem 0 0; border-top: 1px solid var(--line-soft); list-style: none; }
.agent-form-box:not(:has(input[name="level"][value="custom"]:checked)) .level-groups { display: none; }
.level-groups li { display: flex; flex-direction: column; min-width: 0; }
.level-groups label { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0; font-size: 0.875rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
.level-groups label:has(input:disabled) { cursor: default; color: var(--soft); }
.level-groups input { width: 1rem; height: 1rem; min-height: 0; margin: 0; padding: 0; accent-color: var(--ink); }
.level-groups .aside { margin: 0 0 0 1.45rem; color: var(--soft); font-size: 0.75rem; line-height: 1.35; }

/* A site's Webhook: the event switches under the status card, and the routing rule above it. */
.webhook-events { display: flex; flex-direction: column; gap: 0.6rem; margin: 0; padding: 1rem 1.25rem; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--card); }
.webhook-events .box-head { margin: 0; }
.webhook-events .level-groups { border-top: 0; padding-top: 0; }
.webhook-events [data-autosave-fallback] { align-self: flex-start; }
html.js .webhook-events [data-autosave-fallback] { display: none; }

/* Shared with you: my agents on the site, and my Webhook for commands meant for me. */
.shared-agent-details > summary { cursor: pointer; display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; list-style: none; padding: 0.15rem 0; }
.shared-agent-details > summary::-webkit-details-marker { display: none; }
.shared-agent-details > summary::before { content: "▸"; display: inline-block; width: 0.8em; transition: transform 0.15s ease; }
.shared-agent-details[open] > summary::before { transform: rotate(90deg); }
.shared-agent-details[open] > summary { margin-bottom: 0.75rem; }
.shared-agent-details > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 4px; }
.shared-agents, .shared-webhook { display: flex; flex-direction: column; gap: 0.6rem; margin: 0 0 0.85rem; }
.shared-agents .box-head, .shared-webhook .box-head { margin: 0; }
.shared-agents .aside { margin: 0; }
.shared-agents [data-autosave-fallback] { align-self: flex-start; }
html.js .shared-agents [data-autosave-fallback] { display: none; }

/* A site's Agents tab: the same cards as the Agents page, read-only, with Add agent beside the hint. */
.site-agents-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0 0 0.85rem; }
.site-agents-head .hint { margin: 0; }
.site-agents-head .agents-add { white-space: nowrap; }
.agent-sites { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.agent-sites label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 32px;
  margin: 0;
  padding: 0 0.75rem;
  border: 1px solid #e1d5b6;
  border-radius: 999px;
  background: var(--card);
  font-family: var(--mono);
  font-size: 0.75rem;
  white-space: nowrap;
  cursor: pointer;
}
.agent-sites label:has(input:checked) { border-color: var(--ink); background: var(--tint); }
.agent-sites input { width: 0.9rem; height: 0.9rem; min-height: 0; margin: 0; padding: 0; accent-color: var(--ink); }
.reach-sites, .itself-sites { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 0.75rem; border-top: 1px solid var(--line-soft); }
.agent-form-box:has(input[name="reach"][value="hive"]:checked) .reach-sites { display: none; }
.agent-form-box:not(:has(input[name="reach"][value="except"]:checked)) .except-note { display: none; }
.agent-form-box:has(input[name="reach"][value="except"]:checked) .agent-sites label:has(input:checked) span { text-decoration: line-through; }
.agent-form-box:not([data-needs-sites]) .itself-sites,
.agent-form-box:not(:has(input[name="works_as"][value="itself"]:checked)) .itself-sites { display: none; }

/* Connections: one row each, kind, name with its facts, and its buttons. */
.conns { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.conn { display: flex; align-items: center; gap: 0.85rem; min-width: 0; padding: 0.7rem 0; border-top: 1px solid var(--line-soft); }
.conn:first-child { border-top: 0; padding-top: 0; }
.conn-kind { flex: none; width: 4.5rem; color: #8a5a00; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.conn-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.conn-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
code.conn-name { font-weight: 500; font-size: 0.85rem; }
.conn-meta { display: flex; gap: 0 1rem; min-width: 0; color: var(--soft); font-size: 0.8125rem; white-space: nowrap; overflow: hidden; }
.conn-meta > span { overflow: hidden; text-overflow: ellipsis; }
.conn-actions { flex: none; display: inline-flex; gap: 0.4rem; }
.conn-actions .row-form { margin: 0; }
.conn-empty { display: flex; flex-direction: column; gap: 0.4rem; }
.conn-empty p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.conn-empty .conn-empty-title { color: var(--ink); font-weight: 600; }
.mcp-url { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; border-radius: 12px; background: var(--tint); }
.mcp-url code { color: var(--ink); overflow-wrap: anywhere; }
.conn-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.85rem; border-top: 1px solid var(--line-soft); }
.conn-buttons .row-form { margin: 0; }
html:not(.js) dialog.mcp-dialog { display: block; position: static; width: auto; margin: 0; box-shadow: none; border: 1px solid var(--line-soft); }
@container hive-main (max-width: 560px) {
  .conn { flex-wrap: wrap; }
  .conn-kind { width: auto; }
  .conn-text { flex: 1 1 calc(100% - 5rem); }
  .conn-actions { margin-left: auto; }
}

/* Site transfer: /hive/sites/<id>/transfer and /hive/transfer/<token>. */
.transfer-panel { display: flex; flex-direction: column; gap: 1rem; }
.transfer-checks { list-style: none; margin: 0; padding: 0; }
.transfer-checks > li { padding: 0.7rem 0 0.7rem 0.85rem; border-top: 1px solid var(--line-soft); border-left: 3px solid var(--danger); }
.transfer-checks > li:first-child { border-top: 0; }
.transfer-checks > li.ok { border-left-color: var(--field); }
.transfer-check-text { margin: 0; font-size: 0.9rem; }
.transfer-check-fix { margin: 0.3rem 0 0; font-size: 0.8125rem; color: var(--muted); }
.transfer-losses { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; }
.transfer-status { margin: 0; font-weight: 500; }
.transfer-form { display: flex; flex-direction: column; gap: 0.5rem; max-width: 32rem; }
.transfer-form input[type="email"], .transfer-form input[name="subdomain"] { width: 100%; box-sizing: border-box; }
.transfer-form .hint { margin: 0 0 0.5rem; }
.transfer-page h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transfer-understood { display: flex; align-items: center; gap: 0.5rem; margin: 0.25rem 0 0.5rem; font-size: 0.9rem; }
.transfer-understood input { margin: 0; flex: none; }
.transfer-actions form { margin: 0; }
.transfer-form .actions { margin-top: 0.25rem; }
.plan-table-box { overflow-x: auto; }
.plan-table { width: 100%; min-width: 820px; table-layout: fixed; border-collapse: collapse; font-size: 0.9rem; }
.plan-table .plan-label-col { width: 25%; }
.plan-table th, .plan-table td { overflow: hidden; text-overflow: ellipsis; padding: 0.55rem 0.75rem; text-align: left; white-space: nowrap; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.plan-table thead th { border-top: 0; vertical-align: bottom; }
.plan-table tbody th { font-weight: 500; color: var(--soft); }
.plan-table .plan-name { display: block; font-weight: 600; font-size: 1rem; color: var(--ink); }
.plan-table .plan-badge { display: inline-block; margin-bottom: 0.25rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: var(--honey); font-size: 0.75rem; font-weight: 600; }
.plan-table .plan-current { background: #fff8e6; }
.plan-table .plan-price { display: block; font-weight: 600; }
/* Prices and Free share one line; the yearly saving sits beside the plan name. */
.plan-table .plan-price-row th, .plan-table .plan-price-row td { vertical-align: top; }
.plan-table .plan-save { display: inline-block; margin-left: 0.4rem; vertical-align: middle; padding: 0.05rem 0.4rem; border-radius: 999px; background: #fff3d1; color: #8a5a00; font-size: 0.75rem; font-weight: 600; }
.plan-table .plan-yes { font-weight: 700; }
.plan-table .plan-no { color: var(--soft); }
.plan-table .plan-action-row td { padding-top: 0.8rem; }
.plan-table .plan-action-row .row-form + .row-form { margin-top: 0.4rem; }
.billing-panel { display: flex; flex-direction: column; gap: 1rem; }
.plan-table .plan-action-row td { vertical-align: top; white-space: normal; }
dialog.fit-dialog { max-width: 30rem; width: calc(100% - 2rem); padding: 1.5rem; border: 0; border-radius: 18px; box-shadow: 0 20px 60px rgba(23, 20, 15, 0.25); color: var(--ink); white-space: normal; text-align: left; }
dialog.fit-dialog::backdrop { background: rgba(23, 20, 15, 0.45); }
dialog.fit-dialog h2 { margin: 0 0 0.5rem; font-size: 1.25rem; }
dialog.fit-dialog p { margin: 0.5rem 0; color: var(--soft); font-size: 0.95rem; }
dialog.fit-dialog ul { margin: 0.5rem 0; padding-left: 1.2rem; font-size: 0.95rem; line-height: 1.45; }
dialog.fit-dialog li { margin: 0.25rem 0; }
.fit-dialog-actions { display: flex; justify-content: flex-end; margin-top: 1rem; }
.plan-compare { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.plan-compare[data-period-show="month"] [data-period="year"],
.plan-compare[data-period-show="year"] [data-period="month"] { display: none; }
.plan-compare > .pricing-switch { display: inline-flex; align-self: flex-start; gap: 0.2rem; padding: 0.2rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.pricing-period { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 34px; padding: 0 0.95rem; border-radius: 999px; color: var(--ink); font-size: 0.9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pricing-period span { font-size: 0.75rem; color: #8a5a00; }
.pricing-period.on { background: var(--ink); color: #fff; }
.pricing-period.on span { color: var(--honey); }
.pricing-period:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.billing-panel > .hint { margin: 0; }
.billing-status { margin: 0; font-size: 0.9rem; }
.transfer-members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.9rem; }
.transfer-members li { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.transfer-member-email { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Getting started (src/owner/onboardingHtml.ts): until the hive has a site. */
.hive-v2 .start-eyebrow { display: flex; align-items: center; gap: 0.5rem; margin: 0; color: #8a5a00; font-family: var(--mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.hive-v2 .start-eyebrow .hex-bullet { width: 11px; height: 13px; margin: 0; background: var(--honey); }

.hive-v2 .start-card,
.hive-v2 .start-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.25rem; margin: 0 0 1.25rem; padding: 1.4rem 1.6rem; border-radius: 18px; }
.hive-v2 .start-card { background: var(--honey); }
.hive-v2 .start-card .start-eyebrow { color: var(--ink); }
.hive-v2 .start-banner { background: var(--tint); box-shadow: inset 0 0 0 2px var(--honey); }
/* main.account spaces its children already, as for .setup-card. */
.hive-v2 main.account > .start-card { margin: 0; }
.hive-v2 .start-card-text { display: flex; flex-direction: column; gap: 0.3rem; flex: 1 1 26rem; min-width: 0; }
.hive-v2 .start-card h2,
.hive-v2 .start-banner h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 2.4vw, 1.85rem); line-height: 1.08; letter-spacing: -0.035em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .start-card p:not(.start-eyebrow) { margin: 0; color: var(--ink); }
.hive-v2 .start-banner p:not(.start-eyebrow) { margin: 0; color: var(--muted); }

.hive-v2 .start-box { display: flex; flex-direction: column; gap: 1.5rem; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.hive-v2 .start-head { display: flex; flex-direction: column; gap: 0.5rem; max-width: 46rem; }
.hive-v2 .start-head h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.05; letter-spacing: -0.035em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .start-head p:not(.start-eyebrow) { margin: 0; color: var(--muted); }

.hive-v2 .start-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-radius: 14px; background: var(--tint); box-shadow: inset 0 0 0 2px var(--honey); }
.hive-v2 .start-notice p { flex: 1 1 20rem; margin: 0; }

.hive-v2 .start-steps,
.hive-v2 .start-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0.9rem; margin: 0; padding: 0; list-style: none; }
.hive-v2 .start-step { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; padding: 1.25rem; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.hive-v2 .start-step.next { background: var(--tint); box-shadow: inset 0 0 0 2px var(--honey); }
.hive-v2 .start-step-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.hive-v2 .start-step h3,
.hive-v2 .start-prompt h3 { margin: 0; font-size: 1.125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .start-step p { margin: 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }

.hive-v2 .start-pill { display: inline-flex; align-items: center; padding: 0.15rem 0.6rem; border-radius: 999px; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.hive-v2 .start-pill.done { background: var(--good-bg); color: var(--good); }
.hive-v2 .start-pill.next { background: var(--honey); color: var(--ink); }
.hive-v2 .start-pill.todo { background: var(--line-soft); color: var(--soft); }

.hive-v2 .start-connector { display: flex; align-items: center; gap: 0.5rem; }
.hive-v2 .start-connector code { flex: 1; min-width: 0; padding: 0.65rem 0.75rem; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .start-help { font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-v2 .start-done { display: flex; align-items: center; gap: 0.5rem; color: var(--ink); font-size: 0.875rem; white-space: nowrap; }
.hive-v2 .start-done .hex-bullet { width: 10px; height: 12px; margin: 0; }

.hive-v2 .start-prompts { display: flex; flex-direction: column; gap: 0.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.hive-v2 .start-prompt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 0.9rem; }
.hive-v2 .start-prompt { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; padding: 1.35rem; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.hive-v2 .start-prompt.lead { box-shadow: inset 0 0 0 2px var(--ink); }
.hive-v2 .start-prompt blockquote { margin: 0; padding: 0.85rem 1rem; border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-soft); font-family: var(--mono); font-size: 0.84rem; line-height: 1.6; }
.hive-v2 .start-prompt-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; }
.hive-v2 .start-prompt-foot p { flex: 1 1 14rem; margin: 0; color: var(--soft); font-size: 0.875rem; line-height: 1.45; }
.hive-v2 .start-prompt.lead .start-copy { background: var(--ink); color: var(--paper); border-color: var(--ink); }
