:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1b1f24;
  --muted: #5b6470;
  --border: #dde1e6;
  --link: #1d5fbf;
  --button-bg: #1d5fbf;
  --button-text: #ffffff;
  --button-2-bg: transparent;
  --button-2-text: #1d5fbf;
  --code-bg: #eef1f4;
  --notice-bg: #fff6e0;
  --notice-border: #e9c46a;
  --accent: #7a1f2b;          /* the registry's maroon, used only as the ICVS cards' accent */
  --accent-text: #7a1f2b;
  --header-bg: #1f2933;
  --header-text: #ffffff;
  --header-muted: #c9d1da;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111418;
    --surface: #1a1f25;
    --text: #e7eaee;
    --muted: #9aa4b0;
    --border: #2c333c;
    --link: #7fb0ff;
    --button-bg: #3d7ee0;
    --button-text: #ffffff;
    --button-2-text: #7fb0ff;
    --code-bg: #232a32;
    --notice-bg: #2d2615;
    --notice-border: #8a6d1e;
    --accent: #d9a441;
    --accent-text: #e6b95c;
    --header-bg: #0b0e11;
    --header-text: #ffffff;
    --header-muted: #9aa4b0;
  }
}

:root[data-theme="dark"] {
  --bg: #111418;
  --surface: #1a1f25;
  --text: #e7eaee;
  --muted: #9aa4b0;
  --border: #2c333c;
  --link: #7fb0ff;
  --button-bg: #3d7ee0;
  --button-text: #ffffff;
  --button-2-text: #7fb0ff;
  --code-bg: #232a32;
  --notice-bg: #2d2615;
  --notice-border: #8a6d1e;
  --accent: #d9a441;
  --accent-text: #e6b95c;
  --header-bg: #0b0e11;
  --header-text: #ffffff;
  --header-muted: #9aa4b0;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

a { color: var(--link); }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 24px 0 20px;
}
.site-header h1 { margin: 0; font-size: 1.5rem; font-weight: 650; }
.site-header .lede { margin: 4px 0 0; color: var(--header-muted); }

main { padding-top: 8px; }

h2 {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 24px 0 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
h3 { margin: 0 0 4px; font-size: 1.1rem; }
h4 { margin: 20px 0 8px; font-size: 1rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card p { margin: 0 0 12px; }
.card .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card-accent { border-top: 4px solid var(--accent); }
.card-accent h3 { color: var(--accent-text); }

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

.button {
  display: inline-block;
  background: var(--button-bg);
  color: var(--button-text);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--button-bg);
}
.button:hover, .button:focus-visible { filter: brightness(1.08); }
.button-secondary {
  background: var(--button-2-bg);
  color: var(--button-2-text);
  border-color: var(--border);
}
.button-large { padding: 12px 20px; font-size: 1.05rem; }
button.button { font: inherit; font-weight: 600; cursor: pointer; }

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  margin: 12px 0 16px;
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; }

.hash-row { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
code.hash {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  background: var(--code-bg);
  padding: 4px 6px;
  border-radius: 4px;
  word-break: break-all;
  user-select: all;
  flex: 1 1 260px;
  min-width: 0;
}
.copy { padding: 4px 10px; font-size: 0.85rem; }

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

.steps { margin: 0 0 16px; padding-left: 1.4em; }
.steps li { margin-bottom: 6px; }

.notice {
  background: var(--notice-bg);
  border-left: 4px solid var(--notice-border);
  padding: 8px 12px;
  border-radius: 4px;
  margin: 0;
}

.site-footer { padding-top: 24px; padding-bottom: 32px; font-size: 0.9rem; }

.download-row + p { margin-top: 10px; }
