/* Release download site. Values are the semantic roles of coditect-core
 * standards/std-coditect-design.md §3 (logo palette, OD-1): colour §3.1, spacing §3.3,
 * radius §3.4, 24 px compact controls §3.5, elevation §3.6, motion §3.7. Light is the default;
 * dark applies only when theme.js sets html.dark from an explicit choice, never from the OS. */
:root {
  --surface: #ffffff;
  --ink: #082120;
  --muted: #5e5e5e;
  --border: #ebebeb;
  --accent: #15524f;
  --accent-text: #15524f;
  --accent-light: #e8eeed;
  --danger: #DC2626;
  --overlay: 0 4px 16px rgba(8, 33, 32, .12);
  --scrim: rgba(8, 33, 32, .40);
  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}
html.dark {
  --surface: #041010;
  --ink: #ebebeb;
  --muted: #a4a4a4;
  --border: #0d312f;
  --accent: #5fcb6c;
  --accent-text: #5fcb6c;
  --danger: #EF4444;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 13px; line-height: 20px; background: var(--surface);
       color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent-text); }
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 8px; }

.site-header { display: flex; align-items: center; justify-content: space-between;
               padding: 8px 16px; border-bottom: 1px solid var(--border); }
.site-header__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.site-header__logo { height: 28px; width: auto; }
.site-header__title { font-size: 16px; line-height: 24px; font-weight: 600; }
.site-header__subtitle { font-size: 12px; line-height: 16px; color: var(--muted); }

.site-main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 32px 16px; }
.card { border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.card h1 { font-size: 20px; line-height: 28px; margin-bottom: 8px; }
.card h2 { font-size: 16px; line-height: 24px; margin: 16px 0 8px; }
.muted { color: var(--muted); } .small { font-size: 12px; margin-top: 12px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 12px 0 16px; }
.facts dt { color: var(--muted); }
.facts code { font-family: var(--mono); font-size: 12px; word-break: break-all; }
ol { padding-left: 20px; } ol li { margin: 4px 0; }

.btn { height: 24px; min-width: 64px; padding: 0 12px; border-radius: 6px; font: inherit;
       font-size: 13px; cursor: pointer; transition: background 120ms var(--ease); }
.btn--primary { background: var(--accent-text); color: var(--surface); border: 1px solid var(--accent-text); }
.btn--secondary { background: transparent; color: var(--ink); border: 1px solid var(--muted); }
.btn:focus-visible, input:focus-visible, .theme-toggle:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.btn[aria-busy="true"] { opacity: .7; }
.theme-toggle { height: 24px; width: 24px; display: inline-flex; align-items: center; justify-content: center;
                background: transparent; border: 1px solid var(--muted); border-radius: 6px; color: var(--ink); cursor: pointer; }
.theme-toggle svg { width: 14px; height: 14px; }

.scrim { position: fixed; inset: 0; background: var(--scrim); }
.dialog { position: fixed; top: 20vh; left: 50%; transform: translateX(-50%); width: min(400px, calc(100% - 32px));
          background: var(--surface); border-radius: 8px; box-shadow: var(--overlay); padding: 16px; }
.dialog__title { font-size: 16px; line-height: 24px; margin-bottom: 12px; }
.dialog__body label { display: block; color: var(--muted); margin-bottom: 4px; }
.dialog__body input { width: 100%; height: 24px; padding: 0 8px; border: 1px solid var(--muted);
                      border-radius: 4px; background: var(--surface); color: var(--ink); font: inherit; }
.dialog__footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.error { color: var(--danger); margin-top: 8px; }
[hidden] { display: none !important; }

.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
               padding: 8px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.site-footer__left { display: flex; align-items: center; gap: 8px; }
.site-footer__logo { height: 16px; width: auto; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
