/* Stickmate account pages. The colours, radii and focus ring are the app's own (src/Stickmate.App/Styles/Tokens.axaml),
   so the website and the app read as one product. System fonts only: no font or tracker loads from anyone else. */

:root {
  --bg: #fff7ed;
  --surface: #ffffff;
  --surface-2: #f7f2ea;
  --ink: #1b2028;
  --muted: #5b6473;
  --line: #fed7aa;
  --accent: #f97316;
  --on-accent: #1b2028;
  --trust: #2563eb;
  --good: #15803d;
  --danger: #d01f1f;
  --focus: #2563eb;
  --r-card: 14px;
  --r-control: 10px;
  --shadow: 0 1px 2px rgb(124 45 18 / 0.06), 0 8px 24px rgb(124 45 18 / 0.06);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c2028;
    --surface: #262b35;
    --surface-2: #2f3542;
    --ink: #f4f1ea;
    --muted: #aeb6c2;
    --line: #3b4350;
    --accent: #fb923c;
    --on-accent: #1b2028;
    --trust: #60a5fa;
    --good: #4ade80;
    --danger: #fa7878;
    --focus: #93c5fd;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.25), 0 8px 24px rgb(0 0 0 / 0.25);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Noto Sans",
    "Noto Sans Devanagari", "PingFang SC", "Hiragino Sans", sans-serif;
  display: flex;
  flex-direction: column;
}

a { color: var(--trust); text-underline-offset: 3px; }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10; padding: 10px 16px; border-radius: var(--r-control);
  background: var(--ink); color: var(--bg); font-weight: 650;
}
.skip:focus-visible { top: 12px; }

button.link {
  background: none; border: 0; padding: 0; font: inherit; color: var(--trust); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
button.link:hover { text-decoration-thickness: 2px; }
a:hover { text-decoration-thickness: 2px; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── frame ── */

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; max-width: 1080px; margin: 0 auto; padding: 18px 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-header nav { display: flex; gap: 8px; align-items: center; }

main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 8px 24px 64px; }
.narrow { max-width: 728px; }
/* pages with one column: the header and footer line up with it */
body:has(main.narrow) .site-header, body:has(main.narrow) .site-footer { max-width: 728px; }

.site-footer {
  width: 100%; max-width: 1080px; margin: 0 auto; padding: 24px; color: var(--muted); font-size: 14px;
  display: flex; flex-wrap: wrap; gap: 8px 20px;
}
.site-footer a { color: var(--muted); }

h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; }
h2 { font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; margin: 0 0 4px; }
p { margin: 0 0 12px; }
.lead { color: var(--muted); font-size: 17px; max-width: 52ch; margin-bottom: 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ── controls ── */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 650; white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}
.button:active { transform: translateY(1px); }
.button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.button.primary { background: var(--accent); color: var(--on-accent); }
.button.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.button.quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.button.quiet:hover:not(:disabled) { background: var(--surface-2); }
.button.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.button.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.button.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.button.wide { width: 100%; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 15px; }
.field .hint { color: var(--muted); font-size: 14px; }
.field .error { color: var(--danger); font-size: 14px; min-height: 0; }
input[type="email"], input[type="text"] {
  width: 100%; min-height: 46px; padding: 10px 14px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: var(--r-control);
}
input::placeholder { color: color-mix(in srgb, var(--muted) 85%, transparent); }
input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
input[aria-invalid="true"] { border-color: var(--danger); }
.code-input { font-size: 22px; letter-spacing: 0.3em; font-variant-numeric: tabular-nums; text-align: center; }

.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ── surfaces ── */

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 24px; box-shadow: var(--shadow);
}
.section { padding: 28px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }

.notice { border-radius: var(--r-control); padding: 12px 14px; font-size: 15px; margin: 12px 0 0; }
.notice.good { background: color-mix(in srgb, var(--good) 12%, transparent); color: var(--ink); }
.notice.bad { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--ink); }
.notice.info { background: var(--surface-2); color: var(--ink); }
.notice:empty { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; font-weight: 600;
}

.rows { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
}
.row .what { min-width: 0; }
.row .what strong { display: block; overflow-wrap: anywhere; }
.row .what span { color: var(--muted); font-size: 14px; }

.empty { padding: 18px; border: 1px dashed var(--line); border-radius: var(--r-card); color: var(--muted); }

.skeleton { border-radius: var(--r-card); background: var(--surface-2); height: 64px; }
@media (prefers-reduced-motion: no-preference) {
  .skeleton { animation: breathe 1.4s ease-in-out infinite; }
  @keyframes breathe { 50% { opacity: 0.55; } }
}

/* ── sign-in ── */

.split { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 48px; align-items: center; padding-top: 24px; }
.split figure { margin: 0; }
.split figure img { width: 100%; height: auto; display: block; border-radius: var(--r-card); box-shadow: var(--shadow); }
.split figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 28px; padding-top: 4px; }
  .split figure { order: -1; max-width: 520px; }
  .split figcaption { display: none; }
}

/* ── buy ── */

.price { font-size: 40px; font-weight: 750; letter-spacing: -0.02em; line-height: 1; margin: 8px 0 6px; font-variant-numeric: tabular-nums; }
.pay-switch { margin-top: 14px; font-size: 15px; }
.steps { counter-reset: step; display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 700;
}

dialog {
  border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; max-width: 440px; width: calc(100% - 32px);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
dialog::backdrop { background: rgb(27 32 40 / 0.45); }
dialog[open] { overscroll-behavior: contain; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

@media (max-width: 560px) {
  main { padding: 4px 16px 48px; }
  .site-header { padding: 14px 16px; }
  .row { flex-direction: column; align-items: stretch; }
  .row .button { width: 100%; }
  .card { padding: 20px; }
}
