/*
 * The type system encodes WHERE information came from: sans for words a person wrote, mono for
 * machine truth (URLs, ids, tokens, prices, endpoints). One glance tells you what a human named and
 * what the system returned — exactly the distinction that matters on an integration test bench.
 */
:root {
    --paper: #fbfbfd;
    --surface: #ffffff;
    --ink: #0e1116;
    --muted: #5b6472;
    --faint: #8b93a1;
    --rule: #e7e9ee;
    --cobalt: #1b4dff;
    --jade: #0f766e;
    --amber: #9a6700;
    --danger: #b42318;

    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", "SF Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--sans);
    background: var(--paper);
    margin: 0; min-height: 100vh; display: flex; justify-content: center;
    padding: 32px 20px; color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

/* `margin:auto` rather than `align-items:center`: centers the card without clipping its top when
   the content is taller than the viewport. */
.card {
    background: var(--surface); border-radius: 14px; border: 1px solid var(--rule);
    box-shadow: 0 1px 2px rgba(14, 17, 22, .04), 0 12px 32px rgba(14, 17, 22, .06);
    max-width: 520px; width: 100%; padding: 32px; margin: auto;
}
.card.wide { max-width: 940px; padding: 0; }

h1 { font-size: 21px; margin: 0 0 4px; letter-spacing: -.02em; font-weight: 640; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.muted { color: var(--faint); font-size: 12px; margin-top: 18px; word-break: break-all; }

.eyebrow {
    font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--faint); margin: 0 0 8px;
}

.btn {
    display: inline-block; background: var(--ink); color: #fff; text-decoration: none;
    padding: 13px 20px; border-radius: 9px; font-weight: 600; border: 1px solid transparent;
    cursor: pointer; font-size: 14.5px; font-family: inherit; line-height: 1.2;
    transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: #232833; }
.btn:active { transform: translateY(1px); }
.btn.green { background: var(--cobalt); }
.btn.green:hover { background: #1540e0; }
.btn.sm { padding: 8px 13px; font-size: 13px; border-radius: 7px; white-space: nowrap; }
.btn.ghost {
    background: transparent; color: var(--ink); border-color: var(--rule);
}
.btn.ghost:hover { background: #f3f4f7; }

:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; border-radius: 4px; }

pre {
    background: #0e1116; color: #d7e0f5; padding: 16px; border-radius: 10px;
    overflow: auto; font-size: 12px; white-space: pre-wrap; word-break: break-all;
    font-family: var(--mono); line-height: 1.6;
}
code { font-family: var(--mono); background: #f2f3f6; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

.row { display: flex; gap: 14px; align-items: center; margin: 10px 0; }
.avatar {
    width: 52px; height: 52px; border-radius: 50%; background: #eef1ff; display: flex;
    align-items: center; justify-content: center; font-weight: 700; color: var(--cobalt);
    font-size: 22px; object-fit: cover; overflow: hidden;
}

table { width: 100%; border-collapse: collapse; margin: 14px 0; }
td { padding: 9px 6px; border-bottom: 1px solid var(--rule); font-size: 14px; word-break: break-all; }
td.k { color: var(--muted); width: 130px; }

.linkbtn {
    background: none; border: none; padding: 0; color: var(--muted); font-size: 13px;
    cursor: pointer; text-decoration: underline; font-family: inherit;
}
.linkbtn:hover { color: var(--ink); }

.lbl { display: block; font-size: 13px; color: #374151; margin: 14px 0 6px; font-weight: 600; }
.inp {
    width: 100%; padding: 12px 14px; border: 1px solid #d5d8e0; border-radius: 9px;
    font-size: 15px; font-family: inherit; color: inherit; background: #fff;
}
.inp:focus { outline: 2px solid var(--cobalt); outline-offset: 1px; border-color: transparent; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 14px; }

.err {
    background: #fef3f2; color: var(--danger); border: 1px solid #fecdc9; border-radius: 9px;
    padding: 10px 12px; font-size: 13px; margin: 0 0 4px;
}
.ok {
    background: #ecfdf5; color: var(--jade); border: 1px solid #b6ebdd; border-radius: 9px;
    padding: 10px 12px; font-size: 13px; margin: 0 0 14px;
}

.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.head h1 { margin-bottom: 4px; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; display: block; background: #eef1ff; }
.src { color: var(--faint); font-size: 11px; text-decoration: none; font-family: var(--mono); }
.src:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
