/*
 * The look of the Synthcade login test applet. The colours follow the theme:
 * light-dark() picks by color-scheme, which follows the browser until app.js
 * sets data-theme from what the Synthcade page says.
 */
:root {
    color-scheme: light dark;
    --bg: light-dark(#f5f6f8, #15171a);
    --card: light-dark(#ffffff, #1e2126);
    --ink: light-dark(#1c1e21, #eceef1);
    --muted: light-dark(#5c6470, #a4abb5);
    --line: light-dark(#dcdfe4, #363b42);
    --accent: light-dark(#b13300, #ff8a5c);
    --on-accent: light-dark(#ffffff, #1c1e21);
    --ok: light-dark(#1c7c3c, #6fd48f);
    --bad: light-dark(#b3261e, #ff8a80);
    --code: light-dark(#f1f2f4, #111316);
}
[data-theme="light"] { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px 48px;
    display: grid;
    gap: 16px;
}
h1 { font-size: 1.5rem; margin: 0 0 4px; }
h2 { font-size: 1.05rem; margin: 0 0 10px; }
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
}
.muted { color: var(--muted); font-size: .9375rem; margin: 0 0 10px; }
.state { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.state p { margin: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--line); flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
    font: inherit;
    padding: 9px 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    cursor: pointer;
    text-decoration: none;
}
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--quiet { background: transparent; }
.btn--sm { padding: 4px 10px; font-size: .875rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.checks { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.checks li::before { content: "✓ "; color: var(--ok); }
.checks li.is-bad::before { content: "✗ "; color: var(--bad); }
.redirect { margin: 12px 0 0; overflow-wrap: anywhere; }
code {
    font: 14px/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    background: var(--code);
    padding: 2px 5px;
    border-radius: 4px;
    overflow-wrap: anywhere;
}
details.card > summary { font-weight: 600; cursor: pointer; margin-bottom: 10px; }
details.card > p:last-of-type { margin-bottom: 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.section-head h2 { margin: 0; }
.log { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; display: grid; gap: 10px; }
.log pre {
    margin: 4px 0 0;
    padding: 8px;
    background: var(--code);
    border-radius: 6px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font: 13px/1.45 ui-monospace, Menlo, Consolas, monospace;
}
.result--failed h1 { color: var(--bad); }
.checks li.is-note::before { content: "• "; color: var(--muted); }
.is-offscreen { position: absolute; left: -9999px; }
