/* FixMySlop site: same tokens and components as the local app (fixmyslop ui). */
:root {
  --bg: #fbfbfa; --panel: #ffffff; --sunken: #f4f4f2; --hover: #efefec; --select: #e9e9e5;
  --fg: #1d1d1b; --muted: #6e6e69; --faint: #9c9c96; --line: #e5e5e1; --line-strong: #d4d4cf;
  --crit: #b42318; --high: #c4320a; --med: #a15c07; --low: #4b5563; --ok: #067647;
  --radius: 8px; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111110; --panel: #181817; --sunken: #141413; --hover: #20201f; --select: #262624;
    --fg: #ededea; --muted: #a1a19b; --faint: #74746e; --line: #272725; --line-strong: #353532;
    --crit: #f97066; --high: #fb6514; --med: #f5b041; --low: #a3aab5; --ok: #47cd89;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111110; --panel: #181817; --sunken: #141413; --hover: #20201f; --select: #262624;
  --fg: #ededea; --muted: #a1a19b; --faint: #74746e; --line: #272725; --line-strong: #353532;
  --crit: #f97066; --high: #fb6514; --med: #f5b041; --low: #a3aab5; --ok: #47cd89;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 4px; }
code, .mono { font-family: var(--mono); font-size: 13px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; font-weight: 650; }
h2 { font-size: 22px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 30; background: var(--panel); padding: 6px 10px; border-radius: 6px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 16px; height: 56px; }
.wordmark { font-weight: 650; letter-spacing: -0.01em; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.wordmark svg { width: 20px; height: 20px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 6px; font-size: 14px; }
.nav a:hover { color: var(--fg); background: var(--hover); }
.spacer { flex: 1; }

/* buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: 6px; border: 1px solid var(--line-strong); background: var(--panel); cursor: pointer;
  white-space: nowrap; font-weight: 500; font-size: 14px; text-decoration: none; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.primary:hover { opacity: 0.88; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--fg); }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.large { height: 44px; padding: 0 18px; font-size: 15px; }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn .count { font-variant-numeric: tabular-nums; color: var(--muted); border-left: 1px solid var(--line); padding-left: 8px; }
.input { height: 44px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 14px; background: var(--panel);
  font-family: var(--mono); font-size: 14px; min-width: 0; }
.input:hover { border-color: var(--faint); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); font: 13px var(--mono); color: var(--muted); cursor: pointer; }
.pill:hover { color: var(--fg); border-color: var(--line-strong); }

/* hero */
.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.hero p.lead { font-size: 17px; color: var(--muted); max-width: 640px; margin-top: 14px; }
.scan-form { display: flex; gap: 8px; margin-top: 28px; max-width: 680px; }
.scan-form .input { flex: 1; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; font-size: 13px; }
.status { margin-top: 18px; max-width: 680px; min-height: 24px; }
.status .row { display: flex; gap: 10px; align-items: center; }
.status .error { border: 1px solid var(--line-strong); border-left: 3px solid var(--crit); border-radius: 6px;
  padding: 10px 14px; background: var(--panel); }
.status .error b { display: block; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line-strong); border-top-color: var(--fg); border-radius: 50%;
  animation: spin 0.7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* sections */
section.block { padding: 56px 0; border-bottom: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.section-head p { color: var(--muted); max-width: 560px; }
.grid { display: grid; gap: 16px; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h3 { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.card li + li { margin-top: 4px; }
.stat b { display: block; font-size: 28px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 14px; }
.steps { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: step; }
.steps li { list-style: none; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.steps { padding: 0; margin: 0; }

/* tabs */
.tabs { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.tablist { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--sunken); overflow-x: auto; }
.tab { border: 0; background: transparent; padding: 6px 12px; border-radius: 6px; cursor: pointer; color: var(--muted);
  font-size: 14px; white-space: nowrap; }
.tab:hover { color: var(--fg); background: var(--hover); }
.tab[aria-selected="true"] { background: var(--panel); color: var(--fg); font-weight: 550; border: 1px solid var(--line); }
.tabpanel { padding: 18px; }
.tabpanel > p { color: var(--muted); margin-bottom: 12px; max-width: 720px; }
.tabpanel > p + .code { margin-top: 0; }
.tabpanel .code + p { margin-top: 14px; }

/* code block with copy */
.code { position: relative; background: var(--sunken); border: 1px solid var(--line); border-radius: 6px; }
.code pre { margin: 0; padding: 12px 88px 12px 14px; overflow-x: auto; font: 13px/1.6 var(--mono); }
.code .copy { position: absolute; top: 8px; right: 8px; }
.code + .code { margin-top: 10px; }

/* badge preview */
.badge-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.badge-row img { height: 20px; }

/* footer */
.site-footer { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* toast */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--fg); color: var(--bg);
  padding: 8px 14px; border-radius: 6px; opacity: 0; transition: opacity 0.15s; pointer-events: none; z-index: 20;
  max-width: calc(100vw - 32px); font-size: 14px; }
.toast.show { opacity: 1; }

@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } .toast { transition: none; } }
@media (max-width: 860px) {
  .nav { display: none; }
  .cols-3, .cols-4, .cols-2, .steps { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  .scan-form { flex-direction: column; }
  .scan-form .input { flex: none; width: 100%; }
  .scan-form .btn { width: 100%; }
}
.note { margin-top: 16px; }
.note-sm { margin-top: 10px; }
.plain-list { margin: 10px 0 0; padding-left: 18px; }
.plain-list li + li { margin-top: 4px; }
section[id] { scroll-margin-top: 64px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
