/* Store-facing satellite pages: same type and palette as mousetools.app, not the forum. */
:root {
  --paper: #f8f9fc;
  --ink: #1d2c40;
  --muted: #526176;
  --blue: #4670e9;
  --cta: #4670e9;
  --cta-edge: #3a62d3;
  --cta-hover: #3760d6;
  --line: #d4dce6;
  --surface: #fff;
  --soft: #f1f4f8;
  --site: "Avenir Next", "Avenir", "Trebuchet MS", sans-serif;
  --native: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --page: 760px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141b24;
    --ink: #eef3fa;
    --muted: #b5c2d3;
    --blue: #7aa0ff;
    --line: #43536a;
    --surface: #253246;
    --soft: #2e3e54;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--site);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
[hidden] { display: none !important; }
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 20;
  padding: 10px 14px; background: var(--surface); color: var(--ink); border-radius: 8px;
}
.skip:focus { top: 12px; }

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 16px;
  min-height: 72px;
  padding: 12px max(24px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.4px;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand img {
  width: 40px; height: 40px; border-radius: 10px; object-fit: contain; flex: none;
}
.topbar nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-self: center;
  gap: 4px;
}
.topbar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 11px;
  color: var(--muted);
  font: 600 14px/1.2 var(--site);
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.topbar nav a:hover { color: var(--ink); background: var(--soft); text-decoration: none; }
.topbar nav [aria-current] {
  color: var(--ink);
  background: var(--soft);
}
.topbar .button-primary,
.topbar .lang-switch { justify-self: end; }
.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--cta-edge);
  border-radius: 9px;
  background: var(--cta);
  color: #fff;
  font: 600 14px/1.2 var(--site);
  text-decoration: none;
  box-shadow: inset 0 1px #ffffff29, 0 3px 6px #254abd15;
  white-space: nowrap;
}
.button-primary:hover { background: var(--cta-hover); text-decoration: none; color: #fff; }
.button-primary:disabled,
button.button-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.button-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font: 600 14px/1.2 var(--site);
}
.button-quiet:hover { border-color: var(--muted); }

.wrap {
  width: min(var(--page), calc(100% - 48px));
  margin: 0 auto;
  padding: 40px 0 64px;
  flex: 1;
}
.hero { margin: 0 0 28px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font: 650 12px/1.3 var(--site);
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.hero h1, .document h1 {
  margin: 0 0 12px;
  font: 700 clamp(28px, 5vw, 40px)/1.12 var(--site);
  letter-spacing: -0.7px;
  text-wrap: balance;
}
.lead {
  margin: 0;
  max-width: 58ch;
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
}

.note, .status {
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  background: var(--soft);
  font-size: 15px;
  line-height: 1.5;
}
.status { border-left-color: var(--muted); min-height: 3.2em; }
.status:empty { display: none; }

.panel {
  margin: 0 0 22px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.panel h2 {
  margin: 0 0 8px;
  font: 650 20px/1.25 var(--site);
  letter-spacing: -0.2px;
}
.panel > p { margin: 0 0 16px; color: var(--ink); }
.panel .fine { margin: 16px 0 0; font-size: 13px; color: var(--muted); }

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

.link-row {
  display: flex;
  align-items: stretch;
  margin: 16px 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  overflow: hidden;
}
.link-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 12px 14px;
  font: 600 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.link-row input:focus { outline: none; }
.link-row:focus-within { outline: 2px solid #648df5; outline-offset: 1px; }
.link-row button {
  flex: none;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: var(--soft);
  color: var(--ink);
  font: 650 14px/1 var(--site);
  padding: 0 16px;
  min-height: 44px;
}
.link-row button:hover { background: var(--line); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 8px;
}
.stats div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.stats span {
  font: 600 12px/1.2 var(--site);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--muted);
}
.stats strong {
  font: 700 26px/1.1 var(--site);
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.restore {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.restore label {
  display: block;
  margin: 0 0 10px;
  font: 600 14px/1.3 var(--site);
}
.restore label span { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.restore input {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.restore input:focus { outline: 2px solid #648df5; outline-offset: 1px; border-color: #648df5; }

.token {
  display: block;
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px dashed var(--line);
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.rules { margin-top: 36px; }
.rules h2 { margin: 0 0 12px; font: 650 18px/1.3 var(--site); }
.rule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 12px;
  margin: 0 0 16px;
}
.rule {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  height: 100%;
}
.rule h3 {
  margin: 0 0 6px;
  font: 650 13px/1.2 var(--site);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.rule p { margin: 0; font-size: 15px; }
.fine { font-size: 13px; color: var(--muted); }
.fine a { text-decoration: underline; }

.document { max-width: 68ch; }
.document h2 {
  margin: 32px 0 8px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font: 650 19px/1.3 var(--site);
}
.document h2:first-of-type { border-top: 0; padding-top: 0; }
.document p { margin: 0 0 14px; overflow-wrap: anywhere; }
.document code {
  font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--soft);
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  color: var(--muted);
  font: 600 14px/1 var(--site);
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.lang-switch:hover { color: var(--ink); background: var(--soft); text-decoration: none; }
.german { margin-top: 48px; }
.german > h2 {
  border-top: 0;
  padding-top: 0;
  font: 700 26px/1.2 var(--site);
  letter-spacing: -0.4px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 22px max(24px, calc((100vw - 1120px) / 2)) 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.foot a { color: var(--muted); }
.foot a:hover { color: var(--blue); }

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid #648df5;
  outline-offset: 3px;
}

@media (max-width: 800px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 8px 12px;
    padding: 10px 16px;
  }
  .brand { grid-column: 1; grid-row: 1; }
  .topbar .button-primary,
  .topbar .lang-switch { grid-column: 2; grid-row: 1; }
  .topbar nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }
  .topbar .button-primary { font-size: 13px; padding: 0 12px; }
  .wrap { width: calc(100% - 32px); padding: 28px 0 48px; }
  .rule-grid, .stats { grid-template-columns: 1fr; }
  .panel { padding: 20px 18px; }
  .stats strong { font-size: 22px; }
  .link-row { flex-direction: column; }
  .link-row button { border-left: 0; border-top: 1px solid var(--line); }
  .document code { white-space: normal; overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
