:root {
  --bg: #f5f5f7;
  --surface: #fff;
  --text: #1d1d1f;
  --text-secondary: #86868b;
  --separator: rgba(60, 60, 67, 0.12);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --focus: rgba(0, 113, 227, 0.35);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "SF Pro Display",
    system-ui,
    sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 22px 64px;
}

.page-head {
  margin-bottom: 28px;
}

.page-title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.15;
  color: #1d1d1f;
}

.page-tagline {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 400;
  color: #86868b;
  letter-spacing: -0.01em;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px 20px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--separator);
}

.card--hidden {
  display: none;
}

.section-label {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.row-token {
  align-items: stretch;
}

.row-token .mono {
  flex: 1 1 200px;
  min-width: 0;
}

.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  margin-bottom: 8px;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 72px;
}

.metric-name {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.metric-value {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}

.metric-value.muted {
  color: var(--text-secondary);
}

.metric-value.ok {
  color: #34c759;
}

.metric-value.bad {
  color: #ff3b30;
}

input {
  flex: 1 1 200px;
  max-width: 100%;
  min-width: 0;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder {
  color: #aeaeb2;
}

input:hover:not(:read-only) {
  border-color: rgba(60, 60, 67, 0.22);
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus);
}

input.mono {
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

button {
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: -0.01em;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.1s ease;
}

button:hover {
  background: var(--accent-hover);
}

button:active {
  transform: scale(0.98);
}

button.secondary {
  color: var(--accent);
  background: rgba(0, 113, 227, 0.08);
}

button.secondary:hover {
  background: rgba(0, 113, 227, 0.14);
}

/* Anchors styled like dashboard buttons (e.g. landing page CTAs) */
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: -0.01em;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.1s ease;
  box-sizing: border-box;
}

a.btn:hover {
  background: var(--accent-hover);
}

a.btn:active {
  transform: scale(0.98);
}

a.btn.secondary {
  color: var(--accent);
  background: rgba(0, 113, 227, 0.08);
}

a.btn.secondary:hover {
  background: rgba(0, 113, 227, 0.14);
}

button.is-hidden {
  display: none;
}

.muted {
  color: var(--text-secondary);
}

.prose {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
}

.prose strong {
  font-weight: 600;
  color: var(--text);
}

.prose a {
  color: var(--accent);
  text-decoration: none;
}

.prose a:hover {
  text-decoration: underline;
}

.footnote {
  margin: 12px 0 0;
  font-size: 13px;
}

.ok {
  color: #34c759;
}

.bad {
  color: #ff3b30;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  padding: 1px 5px;
  background: rgba(60, 60, 67, 0.08);
  border-radius: 4px;
}

.raw-block {
  margin-top: 14px;
  border-top: 1px solid var(--separator);
  padding-top: 12px;
}

.raw-block summary {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.raw-block summary::-webkit-details-marker {
  display: none;
}

.raw-block summary::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-right: 1.5px solid var(--text-secondary);
  border-bottom: 1.5px solid var(--text-secondary);
  transform: rotate(-45deg) translateY(-1px);
  vertical-align: middle;
  opacity: 0.7;
}

.raw-block[open] summary::before {
  transform: rotate(45deg) translateY(-2px);
}

.raw-block pre {
  margin: 12px 0 0;
}

pre {
  background: #1c1c1e;
  color: #ebebf5;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  overflow: auto;
  font-size: 12px;
  line-height: 1.5;
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

@media (max-width: 520px) {
  .shell {
    padding: 32px 16px 48px;
  }

  .page-title {
    font-size: 24px;
  }

  button,
  input {
    width: 100%;
  }

  .row button {
    width: auto;
    flex: 1 1 auto;
  }
}
