@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #e8eaef;
  --panel: #f7f8fa;
  --line: #d2d6e0;
  --ink: #2a3350;
  --muted: #666e89;
  --faint: rgba(42, 51, 80, 0.08);
  --accent: #3e4d8c;
  --on-accent: #ffffff;
  --sweep: #e3e7f3;
  --warn: #c24a3e;
  --warn-sweep: #f5e1dd;
  --focus: #3e4d8c;
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --stroke: 1.5px;
  --border: var(--stroke) solid var(--line);
  --hairline: 1px solid var(--line);
  --radius-pill: 999px;
  --radius-panel: 18px;
  --radius-card: 14px;
  --radius-field: 12px;
  --ease-glide: cubic-bezier(0.2, 0.9, 0.25, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #161a24;
  --panel: #1d2230;
  --line: #2f3647;
  --ink: #e0e3ed;
  --muted: #979eb5;
  --faint: rgba(224, 227, 237, 0.07);
  --accent: #8d9be6;
  --on-accent: #161a24;
  --sweep: #252c42;
  --warn: #ee8a7d;
  --warn-sweep: #3a2629;
  --focus: #a8b4f2;
  color-scheme: dark;
}

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

html, body { margin: 0; }

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px max(20px, env(safe-area-inset-right)) 14px max(20px, env(safe-area-inset-left));
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  min-height: 38px;
  font-size: 14px;
}
.wordmark {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  font-stretch: 125%;
}
.bar-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 22px; margin-left: auto; }
.bar-link { color: var(--muted); text-decoration: none; }
.bar-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.foot { font-size: 13px; color: var(--muted); }
.foot a { color: inherit; }
.foot a:hover { color: var(--ink); }

kbd {
  font-family: inherit;
  font-size: 12px;
  border: var(--hairline);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0 5px;
  margin: 0 3px 0 8px;
  background: var(--panel);
  color: var(--ink);
}
kbd:first-child { margin-left: 0; }
kbd + kbd { margin-left: 0; }

.panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 22px 20px;
  border: var(--border);
  border-radius: var(--radius-panel);
  background: var(--panel);
}

@media (max-width: 760px) {
  body { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .panel { padding: 0 16px 16px; border-radius: 16px; }
  .bar-link { font-size: 13px; }
}

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