/* Shared base: reset, typography, buttons, inputs. Uses only semantic tokens from theme.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-size);
  line-height: var(--text-lh);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.container { max-width: var(--page-max); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }

.display { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); line-height: 1.04; margin: 0; text-wrap: balance; }
.heading { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--heading-tracking); line-height: 1.1; margin: 0; text-wrap: balance; }
.label { font-size: 12px; letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--muted); font-weight: 500; }
.lead { color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 60ch; }
.accent { color: var(--accent); }

/* buttons: square, as in the reference */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 24px;
  border: 1px solid var(--ink); border-radius: var(--radius);
  background: transparent; color: var(--ink);
  font-size: 14px; font-weight: 500; letter-spacing: .01em;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.primary { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--btn-ink); }
.btn.quiet { border-color: var(--line); }
.btn.quiet:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn.danger:hover { background: var(--err); border-color: var(--err); color: #fff; }
.btn[disabled] { opacity: .4; cursor: default; pointer-events: none; }
.btn.small { min-height: 36px; padding: 7px 14px; font-size: 13px; }
.link { border: 0; background: none; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.link:hover { color: var(--accent); }

/* inputs */
.input {
  width: 100%; min-height: 46px; padding: 11px 14px;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 15px;
}
.input::placeholder { color: var(--subtle); }
.input:hover { border-color: var(--subtle); }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.5; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.input:focus-visible { outline-offset: 0; border-color: var(--ink); }

.note { background: var(--note-bg); color: var(--note-ink); padding: 16px 20px; border-radius: var(--radius); }
.note b { display: block; margin-bottom: 6px; font-weight: 600; }
.note ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }

.status { font-size: 14px; min-height: 22px; margin: 8px 0 0; }
.status.ok { color: var(--ok); }
.status.bad { color: var(--err); }

/* the arch: the reference's one decorative shape */
.arch { background: var(--accent); border-radius: 999px 999px 0 0; aspect-ratio: 1 / 1; }

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