:root {
  --ink-900: #0d0d0c;
  --ink-850: #141413;
  --ink-800: #1a1a19;
  --ink-700: #232320;
  --ink-600: #2e2e2a;
  --ink-500: #3d3d38;
  --fg: #ecebe6;
  --fg-dim: #a5a49c;
  /* Lifted from Coordinator's #6f6e68 for 10–12 px text on ink-900: about 5:1 instead of 3.8:1. */
  --fg-faint: #85847d;
  --accent: #d97757;
  --claude: #d97757;
  --claude-soft: #39231b;
  --codex: #4a9d8e;
  --codex-soft: #17302c;
  --good: #5aa469;
  --warn: #d9a24a;
  --bad: #d16a5e;
  --divider: rgb(35 35 32 / 0.6);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ink-900);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

h1,
h2,
h3,
p,
pre {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

main a:not([class]),
.sheet a:not([class]) {
  color: var(--accent);
}

button,
input,
select,
textarea {
  margin: 0;
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

table {
  border-collapse: collapse;
}

code,
pre {
  font-family: var(--mono);
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.field:focus-visible {
  outline: none;
}

input[type="checkbox"] {
  accent-color: var(--accent);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
  background: transparent;
}
::-webkit-scrollbar-button {
  display: none;
}
::-webkit-scrollbar-thumb {
  border-radius: 9999px;
  background: var(--ink-600);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ink-500);
}
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--ink-600) transparent;
  }
  *:hover {
    scrollbar-color: var(--ink-500) transparent;
  }
  .chip-row:not(:hover) {
    scrollbar-color: transparent transparent;
  }
}

.card {
  border-radius: 0.75rem;
  border: 1px solid var(--ink-700);
  background: var(--ink-850);
}

.panel {
  border-radius: 0.75rem;
  border: 1px solid var(--ink-700);
  background: var(--ink-850);
}
.panel > * + * {
  border-top: 1px solid var(--divider);
}

.label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-faint);
}

.chip {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.25rem;
  border-radius: 9999px;
  border: 1px solid var(--ink-600);
  background: var(--ink-800);
  padding: 0.25rem 0.625rem;
  font-size: 12px;
  line-height: 1rem;
  white-space: nowrap;
  color: var(--fg-dim);
}
button.chip:active {
  background: var(--ink-700);
}
.chip.on {
  border-color: var(--accent);
  color: var(--fg);
}

.chip-row {
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
  white-space: nowrap;
}
.chip-row:not(:hover)::-webkit-scrollbar-thumb {
  background: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  background: var(--ink-700);
  padding: 0.375rem 0.75rem;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25rem;
  white-space: nowrap;
  color: var(--fg);
}
.btn:active {
  background: var(--ink-600);
}
.btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--ink-900);
}
.btn-primary:active {
  background: rgb(217 119 87 / 0.8);
}
.btn-ghost {
  border-color: var(--ink-600);
  background: transparent;
  color: var(--fg-dim);
}
.btn-ghost:active {
  background: var(--ink-800);
}
.btn-sm {
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  font-size: 12px;
  line-height: 1rem;
}

/* A word-sized action at the end of a line; the padding the margin takes back is for the finger. */
.link {
  margin: -0.375rem 0;
  padding: 0.375rem 0;
  font-size: 12px;
  white-space: nowrap;
  color: var(--accent);
}
.link:active {
  opacity: 0.6;
}
.link:disabled {
  opacity: 0.4;
}
.link.quiet {
  color: var(--fg-dim);
}
.link.danger {
  color: var(--bad);
}

.field {
  display: block;
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--ink-600);
  background: var(--ink-800);
  padding: 0.5rem 0.75rem;
  font-size: 14px;
  line-height: 1.25rem;
  color: var(--fg);
}
.field::placeholder {
  color: var(--fg-faint);
}
.field:focus {
  outline: none;
  border-color: var(--ink-500);
}

.wide-column {
  margin-left: auto;
  margin-right: auto;
  max-width: 72rem;
}
.narrow-column {
  margin-left: auto;
  margin-right: auto;
  max-width: 48rem;
}

.dim {
  color: var(--fg-dim);
}
.faint {
  color: var(--fg-faint);
}
.good {
  color: var(--good);
}
.warn {
  color: var(--warn);
}
.bad {
  color: var(--bad);
}
.mono {
  font-family: var(--mono);
}
.num {
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}
.small {
  font-size: 11px;
}
.err {
  font-size: 12px;
  color: var(--bad);
}
.err:empty {
  display: none;
}
.truncate {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.grow {
  flex: 1 1 0%;
  min-width: 0;
}

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--ink-800);
  background: rgb(13 13 12 / 0.9);
  padding-top: env(safe-area-inset-top);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.top-in {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25rem;
}
.brand img {
  flex-shrink: 0;
}
.brand-un {
  color: var(--accent);
}
.who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  font-size: 12px;
  color: var(--fg-dim);
}

.page {
  padding: 0.75rem 0.75rem calc(env(safe-area-inset-bottom) + 2.5rem);
}
.page > * + * {
  margin-top: 1rem;
}
.page > :empty {
  display: none;
}
.page > [id] {
  scroll-margin-top: 3.5rem;
}
.stack > * + * {
  margin-top: 0.75rem;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 1.25rem;
  margin-bottom: 0.375rem;
  padding: 0 0.25rem;
}
.section-title > :last-child:not(:first-child) {
  min-width: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.375rem 0.75rem;
  text-align: left;
}
button.row {
  font-size: 12px;
  color: var(--fg-dim);
}
button.row:active {
  background: var(--ink-800);
}

.loading {
  padding: 0.5rem 0.25rem;
  font-size: 12px;
  color: var(--fg-faint);
}

/* A wide table scrolls sideways in its own box, its first column pinned. */
.table-box {
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--ink-700);
  background: var(--ink-850);
}
.t {
  width: 100%;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.t th {
  padding: 0.375rem;
  font-size: 10px;
  font-weight: 500;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
  color: var(--fg-faint);
}
.t td {
  padding: 0.25rem 0.375rem;
  text-align: right;
  white-space: nowrap;
}
.t tbody tr {
  border-top: 1px solid var(--divider);
}
.t tr.group th {
  padding-bottom: 0;
}
.t th.grouped {
  text-align: center;
  letter-spacing: 0.05em;
  color: var(--fg-dim);
  border-bottom: 1px solid var(--ink-600);
}
.t th:first-child,
.t td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--ink-850);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  text-align: left;
}
.t td:first-child {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--fg-dim);
}
.t .l {
  text-align: left;
}
.t td.empty {
  position: static;
  max-width: none;
  padding: 0.625rem 0.5rem;
  color: var(--fg-faint);
}
.t tr.sub {
  border-top: 0;
}
.t tr.sub td {
  position: static;
  max-width: none;
  overflow: visible;
  padding-top: 0;
  white-space: normal;
}
.t tr.sub td > div {
  position: sticky;
  left: 0.5rem;
  max-width: min(calc(100vw - 3rem), 60rem);
  font-size: 11px;
  overflow-wrap: anywhere;
  color: var(--bad);
}
@media (min-width: 640px) {
  .t td:first-child {
    max-width: 16rem;
  }
}
/* Long names and IPv6 addresses get cut, with the whole value on hover, so a table stays inside its box. */
.t td.clip {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.two .t td:first-child {
  max-width: 8rem;
}

.bar {
  display: inline-block;
  vertical-align: middle;
  width: 3rem;
  height: 0.375rem;
  overflow: hidden;
  border-radius: 0.125rem;
  background: var(--ink-700);
}
.bar > i {
  display: block;
  height: 100%;
  background: var(--fg-faint);
}
.bar > .good {
  background: var(--good);
}
.bar > .warn {
  background: var(--warn);
}
.bar > .bad {
  background: var(--bad);
}
.bar > .claude {
  background: var(--claude);
}
.bar > .codex {
  background: var(--codex);
}

.dot {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  width: 0.375rem;
  height: 0.375rem;
  margin-right: 0.375rem;
  border-radius: 9999px;
  background: var(--ink-500);
}
.dot.claude {
  background: var(--claude);
}
.dot.codex {
  background: var(--codex);
}
.dot.good {
  background: var(--good);
}
.dot.warn {
  background: var(--warn);
}
.dot.bad {
  background: var(--bad);
}

.tag {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid var(--ink-600);
  background: var(--ink-800);
  padding: 0 0.375rem;
  font-size: 10.5px;
  line-height: 1rem;
  white-space: nowrap;
  color: var(--fg-dim);
}
.tag.good {
  border-color: rgb(90 164 105 / 0.3);
  background: rgb(90 164 105 / 0.1);
  color: var(--good);
}
.tag.warn {
  border-color: rgb(217 162 74 / 0.3);
  background: rgb(217 162 74 / 0.1);
  color: var(--warn);
}
.tag.bad {
  border-color: rgb(209 106 94 / 0.3);
  background: rgb(209 106 94 / 0.1);
  color: var(--bad);
}
.tag.claude {
  border-color: rgb(217 119 87 / 0.3);
  background: var(--claude-soft);
  color: var(--claude);
}
.tag.codex {
  border-color: rgb(74 157 142 / 0.3);
  background: var(--codex-soft);
  color: var(--codex);
}
.tag.accent {
  border-color: rgb(217 119 87 / 0.45);
  background: rgb(217 119 87 / 0.12);
  color: var(--accent);
}

code {
  border-radius: 0.25rem;
  background: var(--ink-800);
  padding: 0.0625rem 0.25rem;
  font-size: 12px;
  overflow-wrap: anywhere;
}
pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  overflow-wrap: normal;
}

/* Landing page */

.lede {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--fg-dim);
}
.lede strong {
  font-weight: 600;
  color: var(--fg);
}

.notice {
  border-radius: 0.75rem;
  border: 1px solid rgb(217 162 74 / 0.35);
  background: rgb(217 162 74 / 0.08);
  padding: 0.625rem 0.75rem;
  color: var(--fg-dim);
}
.notice strong {
  font-weight: 600;
  color: var(--warn);
}

.kv {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--fg-dim);
}
.kv-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
@media (max-width: 420px) {
  .kv {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.125rem;
  }
}

.examples-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem 0.5rem 0.5rem;
}
.examples-head .chip-row {
  flex: 1;
}
.examples pre {
  overflow-x: auto;
  padding: 0.625rem 0.75rem;
  font-size: 12px;
  line-height: 1.6;
  tab-size: 2;
}

.ep {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  align-items: baseline;
  column-gap: 0.5rem;
  padding: 0.375rem 0.75rem;
}
.ep .method {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-faint);
}
.ep .path {
  font-family: var(--mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.ep .what {
  grid-column: 2;
  font-size: 12px;
  color: var(--fg-dim);
}
@media (min-width: 640px) {
  .ep {
    grid-template-columns: 3.25rem 16.5rem minmax(0, 1fr);
  }
  .ep .what {
    grid-column: 3;
  }
}

.item {
  padding: 0.5rem 0.75rem;
  color: var(--fg-dim);
}
.item strong {
  font-weight: 600;
  color: var(--fg);
}

.caption {
  margin-top: 0.375rem;
  padding: 0 0.25rem;
  font-size: 11px;
  line-height: 1.5;
  color: var(--fg-faint);
}

/* Dashboard */

.signin {
  display: grid;
  gap: 0.625rem;
  max-width: 22rem;
  margin: 12vh auto 0;
  padding: 1rem;
}
.signin h1 {
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.signin p {
  text-align: center;
}
.signin p:empty {
  display: none;
}
.signin .fine {
  text-align: left;
}
.check.privacy {
  padding: 0;
  font-size: 13px;
  color: var(--fg);
}
.signin .check.privacy {
  justify-self: center;
}
.signin .btn {
  width: 100%;
}
.signin-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
}
.or {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 11px;
  color: var(--fg-faint);
}
.or::before,
.or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--ink-700);
}

.pad {
  padding: 0 0.25rem 0.5rem;
}

.banner {
  border-radius: 0.75rem;
  border: 1px solid rgb(209 106 94 / 0.4);
  background: rgb(209 106 94 / 0.1);
  padding: 0.5rem 0.75rem;
  font-size: 12px;
  color: var(--fg-dim);
}

.reveal {
  display: grid;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(217 119 87 / 0.5);
  background: rgb(217 119 87 / 0.1);
  padding: 0.625rem 0.75rem;
}
.reveal-head,
.reveal-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.reveal-line code {
  flex: 1;
  min-width: 0;
  border-radius: 0.375rem;
  background: var(--ink-900);
  padding: 0.375rem 0.5rem;
  font-size: 12.5px;
  word-break: break-all;
  color: var(--fg);
  -webkit-user-select: all;
  user-select: all;
}

.key {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "main main" "use use" "lim act";
  align-items: center;
  gap: 0.375rem 0.75rem;
  padding: 0.5rem 0.75rem;
}
.key.off > :not(.k-act) {
  opacity: 0.55;
}
.k-main {
  grid-area: main;
  min-width: 0;
}
.k-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem 0.5rem;
  min-width: 0;
}
.k-name .name {
  max-width: 100%;
  font-size: 13px;
  font-weight: 500;
}
.k-use {
  grid-area: use;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}
.k-lim {
  grid-area: lim;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.k-act {
  grid-area: act;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .key {
    grid-template-areas: "main act" "use lim";
  }
  .k-lim {
    justify-content: flex-end;
  }
}
@media (min-width: 1024px) {
  .key {
    grid-template-columns: minmax(0, 1fr) 22rem 12rem 10.5rem;
    grid-template-areas: "main use lim act";
  }
  .k-lim {
    justify-content: flex-start;
  }
}

.stat {
  min-width: 0;
}
.stat .v {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.stat .bar {
  display: block;
  width: 100%;
  margin-top: 0.1875rem;
}

.filters {
  display: grid;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem 0.875rem;
  padding: 0.5rem 0.75rem;
  font-size: 12px;
  color: var(--fg-faint);
}

.two {
  display: grid;
  gap: 0.75rem;
}
.two > * {
  min-width: 0;
}
@media (min-width: 1024px) {
  .two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.conn {
  display: inline-flex;
  align-items: center;
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.row-err {
  grid-column: 1 / -1;
}

.acct {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "main" "wins" "act";
  align-items: center;
  gap: 0.375rem 0.75rem;
  padding: 0.5rem 0.75rem;
}
.acct.off > :not(.acct-act) {
  opacity: 0.55;
}
.acct-main {
  grid-area: main;
  min-width: 0;
}
.acct-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem 0.5rem;
}
.acct-name .name {
  max-width: 100%;
  font-size: 13px;
  font-weight: 500;
}
.acct-wins {
  grid-area: wins;
  display: grid;
  gap: 0.125rem;
}
.acct-act {
  grid-area: act;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem 0.75rem;
}
.acct-pick {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.75rem;
}
.win {
  display: grid;
  grid-template-columns: 3.25rem minmax(2.5rem, 7rem) 2.25rem minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.win .bar {
  width: 100%;
}
.win .num {
  text-align: right;
}
@media (min-width: 640px) {
  .acct {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "main main" "wins act";
  }
}
@media (min-width: 1024px) {
  .acct {
    grid-template-columns: minmax(0, 1fr) 21rem 15rem;
    grid-template-areas: "main wins act";
  }
}

.routing {
  margin-top: 0.75rem;
}
.routing-box {
  display: grid;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
}
.positions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.25rem 0.75rem;
}
.field.pos {
  width: 4.5rem;
  flex-shrink: 0;
  padding: 0.25rem 0.5rem;
  font-size: 12px;
}

.entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  padding: 0.5rem 0.75rem;
}
.entry.off > :not(.entry-act) {
  opacity: 0.55;
}
.entry-main {
  flex: 1 1 14rem;
  min-width: 0;
}
.entry-act {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.inline {
  margin-bottom: 0.5rem;
}
.inline-form,
.mini-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.inline-form .field {
  flex: 1;
  min-width: 0;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}
.inline .err {
  margin-top: 0.25rem;
}

.tree {
  gap: 0.5rem;
}
.tree .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.tree > :last-child {
  flex-shrink: 0;
  white-space: nowrap;
}

.users {
  margin-top: 0.75rem;
}

.fld-stack {
  display: grid;
  gap: 1rem;
}
.fld-stack:empty {
  display: none;
}
.device-code {
  font-size: 18px !important;
  letter-spacing: 0.08em;
}

.more-link {
  display: inline-block;
  margin-top: 0.375rem;
  margin-left: 0.25rem;
}

dialog.sheet {
  width: 100%;
  max-width: 36rem;
  max-height: 92dvh;
  margin: auto auto 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--ink-600);
  border-radius: 1rem 1rem 0 0;
  background: var(--ink-850);
  color: var(--fg);
  box-shadow: 0 -12px 40px rgb(0 0 0 / 0.6);
}
dialog.sheet::backdrop {
  background: rgb(0 0 0 / 0.6);
}
html:has(dialog[open]) {
  overflow: hidden;
}
@media (min-width: 640px) {
  dialog.sheet {
    border-left: 1px solid var(--ink-600);
    border-right: 1px solid var(--ink-600);
  }
}
.sheet form {
  display: flex;
  flex-direction: column;
  max-height: 92dvh;
}
.sheet-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0.375rem;
}
.sheet-head::before {
  content: "";
  position: absolute;
  top: 0.375rem;
  left: 50%;
  width: 2.5rem;
  height: 0.25rem;
  margin-left: -1.25rem;
  border-radius: 9999px;
  background: var(--ink-500);
}
.sheet-head h2 {
  font-size: 15px;
  font-weight: 600;
}
.sheet-x {
  padding: 0.25rem;
  color: var(--fg-dim);
}
.sheet-x svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}
.sheet-body {
  display: grid;
  align-content: start;
  gap: 1rem;
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 1rem 1rem;
}
.sheet-foot {
  display: grid;
  gap: 0.5rem;
  border-top: 1px solid var(--ink-700);
  padding: 0.75rem 1rem calc(env(safe-area-inset-bottom) + 0.5rem);
}
.sheet-actions {
  display: flex;
  gap: 0.5rem;
}
.fld {
  display: grid;
  gap: 0.375rem;
}
.fld-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
}
.checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0 0.75rem;
}
.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 12.5px;
  color: var(--fg-dim);
}
.check .dot {
  margin-right: -0.125rem;
}

.runner {
  display: grid;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
}
.runner-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem 0.5rem;
}
.runner-head .dot {
  margin-right: 0;
}
.runner-head .name {
  font-size: 13px;
  font-weight: 500;
}
.racct {
  display: grid;
  gap: 0.25rem 0.75rem;
  padding-left: 0.875rem;
}
.racct .acct-wins {
  grid-area: auto;
}
@media (min-width: 1024px) {
  .racct {
    grid-template-columns: minmax(0, 1fr) 21rem 15rem;
    align-items: center;
  }
}
.field.short {
  width: 12rem;
  padding: 0.25rem 0.5rem;
  font-size: 12px;
}

.pairing .expiry {
  flex-shrink: 0;
}
.pair-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem 0.75rem;
}
.steps {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding-left: 1.25rem;
  font-size: 12px;
}
.steps li::marker {
  color: var(--fg-faint);
}
.cmd {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.cmd code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  border-radius: 0.375rem;
  background: var(--ink-900);
  padding: 0.25rem 0.5rem;
  overflow-wrap: normal;
}

.title {
  margin-bottom: 0.375rem;
  font-size: 15px;
  font-weight: 600;
}
.walk {
  margin: 0.375rem 0 0;
  padding-left: 1.25rem;
}
.walk li + li {
  margin-top: 0.125rem;
}
.note-line {
  margin-top: 0.375rem;
  font-size: 12px;
}
.sub-caption {
  margin: 0 0 0.375rem;
}
.ep.cmd-ref {
  grid-template-columns: minmax(0, 1fr);
}
.ep.cmd-ref .what {
  grid-column: 1;
}
@media (min-width: 640px) {
  .ep.cmd-ref {
    grid-template-columns: 19rem minmax(0, 1fr);
  }
  .ep.cmd-ref .what {
    grid-column: 2;
  }
}

@media (hover: hover) {
  .btn:hover {
    background: var(--ink-600);
  }
  .btn-primary:hover {
    background: var(--accent);
    filter: brightness(1.08);
  }
  .btn-ghost:hover {
    background: var(--ink-800);
    color: var(--fg);
  }
  .link:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  button.chip:hover,
  button.row:hover {
    color: var(--fg);
  }
}

/* iOS zooms into a field under 16 px and never zooms back out; a finger needs a taller small button. */
@media (pointer: coarse) {
  input,
  textarea,
  select {
    font-size: 16px !important;
  }
  .btn-sm {
    min-height: 1.75rem;
  }
}

/* Docs page: the three parts, and the copy-for-an-agent callout. */

.part {
  margin-top: 1.75rem !important;
  padding: 1.25rem 0.25rem 0;
  border-top: 1px solid var(--ink-700);
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}
.page > .part + * {
  margin-top: 0.75rem;
}
.llm {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-color: rgb(217 119 87 / 0.45);
  background: rgb(217 119 87 / 0.07);
}
.llm-text {
  flex: 1;
  min-width: 0;
  color: var(--fg-dim);
}
.llm-text {
  display: grid;
  gap: 0.25rem;
}
.llm-text strong {
  font-weight: 600;
  color: var(--fg);
}
.llm-url {
  justify-self: start;
  font-size: 13px;
  color: var(--fg);
}
/* The header's copy button: on a phone the Runner link makes room for it. */
.llm-head {
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .top .link.quiet {
    display: none;
  }
}
.llm .btn {
  flex-shrink: 0;
}
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  padding: 0 0.25rem;
  font-size: 12px;
}
.toc a {
  color: var(--accent);
}
@media (max-width: 520px) {
  .llm {
    flex-direction: column;
    align-items: stretch;
  }
}
/* On a phone, commands wrap instead of hiding half a line off-screen, and the models table keeps model,
   subscription and API in/out prices so it fits without scrolling. */
@media (max-width: 600px) {
  pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 11px !important;
  }
  .models-t tr:not(.group) > :nth-child(2),
  .models-t tr:not(.group) > :nth-child(3),
  .models-t tr:not(.group) > :nth-child(6),
  .models-t tr.group > :nth-child(2),
  .models-t tr.group > :nth-child(3) {
    display: none;
  }
}
