/* DEVOTED platform. Ink, bone, oxblood and ember; the vigil gradient is atmosphere only. Dark and light
   follow the system. Archivo for everything, JetBrains Mono for code. Radii 10, 18, 28. */
:root {
  --ink: #0a0a0b;
  --bone: #f2f1ec;
  --oxblood: #4a0f1a;
  --ember: #e8403e;
  --bg: var(--bone);
  --fg: var(--ink);
  --muted: rgba(10, 10, 11, 0.66);
  --line: rgba(10, 10, 11, 0.12);
  --surface: rgba(10, 10, 11, 0.035);
  --surface-2: rgba(10, 10, 11, 0.07);
  --primary-bg: var(--ink);
  --primary-fg: var(--bone);
  --bar: var(--ink);
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --vigil: linear-gradient(180deg, #0a0a0b 0%, #4a0f1a 68%, #e8403e 100%);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink);
    --fg: var(--bone);
    --muted: rgba(242, 241, 236, 0.7);
    --line: rgba(242, 241, 236, 0.14);
    --surface: rgba(242, 241, 236, 0.045);
    --surface-2: rgba(242, 241, 236, 0.09);
    --primary-bg: var(--bone);
    --primary-fg: var(--ink);
    --bar: var(--bone);
  }
}
:root[data-theme="dark"] {
  --bg: var(--ink);
  --fg: var(--bone);
  --muted: rgba(242, 241, 236, 0.7);
  --line: rgba(242, 241, 236, 0.14);
  --surface: rgba(242, 241, 236, 0.045);
  --surface-2: rgba(242, 241, 236, 0.09);
  --primary-bg: var(--bone);
  --primary-fg: var(--ink);
  --bar: var(--bone);
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font:
    400 17px/1.5 Archivo,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h2 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}
.muted {
  color: var(--muted);
}
.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14px;
}
.display {
  font-size: clamp(44px, 9vw, 64px);
  font-weight: 800;
  font-stretch: 118%;
  line-height: 1.02;
  letter-spacing: -0.015em;
}
.label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.lede {
  font-size: 17px;
  color: var(--muted);
  max-width: 46ch;
  margin-top: 14px;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 56px;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
}
.chip {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-s);
  background: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.chip svg {
  width: 20px;
  height: 20px;
}
.wordmark {
  font-size: 15px;
  font-weight: 800;
  font-stretch: 118%;
  letter-spacing: 0.08em;
}
.account {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  min-width: 0;
}
.account #account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 36vw;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  font:
    500 14px/1 Archivo,
    system-ui,
    sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease;
}
.btn:hover {
  border-color: var(--fg);
}
.btn.primary {
  background: var(--primary-bg);
  color: var(--primary-fg);
  border-color: transparent;
}
.btn.primary:hover {
  opacity: 0.9;
}
.btn.danger {
  color: var(--fg);
}
.btn:disabled {
  opacity: 0.5;
  cursor: default;
}
:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

.vigil {
  background: var(--vigil);
  color: #f2f1ec;
  border-radius: var(--radius-l);
  padding: 44px 28px 36px;
  margin-top: 16px;
}
.vigil .lede {
  color: rgba(242, 241, 236, 0.8);
}
.vigil .btn.primary {
  background: #f2f1ec;
  color: #0a0a0b;
  margin-top: 28px;
}
.vigil .fine {
  color: rgba(242, 241, 236, 0.72);
  font-size: 14px;
  margin-top: 14px;
}

section {
  margin-top: 48px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 20px;
}
.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}
.model-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.badge.free {
  border-color: var(--fg);
}
.model .mono {
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.facts {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
}
.facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
.facts dt {
  color: var(--muted);
}
.facts dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.tags li {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: var(--radius-s);
  background: var(--surface-2);
}

.today {
  display: grid;
  gap: 10px;
}
.today-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}
.today-line strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
progress {
  width: 100%;
  height: 10px;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: var(--radius-s);
  overflow: hidden;
  background: var(--surface-2);
  color: var(--bar);
}
progress::-webkit-progress-bar {
  background: var(--surface-2);
}
progress::-webkit-progress-value {
  background: var(--bar);
}
progress::-moz-progress-bar {
  background: var(--bar);
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 160px;
  margin: 24px 0 8px;
  padding: 0;
  list-style: none;
}
.bars li {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
}
.bars span {
  display: block;
  width: 100%;
  height: var(--h, 0%);
  border-radius: 4px 4px 1px 1px;
  background: var(--bar);
}
.axis {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.scroll {
  overflow-x: auto;
  margin-top: 20px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 12px 8px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.keys-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.keys-form input {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font:
    400 17px Archivo,
    system-ui,
    sans-serif;
}
.keys-form input:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 1px;
}
.created {
  margin-top: 16px;
  padding: 20px;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.created code {
  display: block;
  margin: 12px 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-s);
  background: var(--bg);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14px;
  overflow-wrap: anywhere;
  user-select: all;
}
.list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.list li > div {
  min-width: 0;
}
.list .meta {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.empty {
  padding: 20px 0;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}

.error {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-s);
  border-left: 3px solid var(--ember);
  background: rgba(232, 64, 62, 0.1);
  font-size: 14px;
}
.loading {
  color: var(--muted);
}
.gap {
  margin-top: 24px;
}
.note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 16px 48px;
  }
  .vigil {
    padding: 36px 22px 30px;
  }
  section {
    margin-top: 40px;
  }
  .account #account-name {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
}
