:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #eef0f8;
  --ink: #151a2e;
  --muted: #5a6180;
  --line: #dde1ee;
  --brand: #5b3df5;
  --brand-ink: #ffffff;
  --accent: #0b9c8f;
  --good: #15803d;
  --bad: #d61f45;
  --warn: #b45309;
  --code-key: #7c3aed;
  --code-str: #0f7b55;
  --code-num: #b4540a;
  --code-lit: #c0267a;
  --radius: 12px;
  --font: "Segoe UI Variable Text", "SF Pro Text", system-ui, -apple-system, Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0f1d;
    --surface: #141a2d;
    --surface-2: #1c2339;
    --ink: #e5e8f5;
    --muted: #9aa2c0;
    --line: #2a3250;
    --brand: #8f7dff;
    --brand-ink: #0c0f1d;
    --accent: #3fd1c2;
    --good: #4ade80;
    --bad: #ff6b8a;
    --warn: #fbbf24;
    --code-key: #b9a6ff;
    --code-str: #6ee7b7;
    --code-num: #fdba74;
    --code-lit: #f9a8d4;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--font); overflow-x: hidden; }
a { color: var(--brand); }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -.01em; font-size: 1.05rem; }
.logo .tld { color: var(--muted); font-weight: 500; }
.head-links { display: flex; gap: 14px; font-size: .88rem; flex-wrap: wrap; }
.head-links a { color: var(--muted); text-decoration: none; }
.head-links a:hover { color: var(--brand); }

.hero { padding: 20px 0 4px; }
.hero h1 { margin: 0 0 4px; font-size: clamp(1.5rem, 4.6vw, 2.2rem); letter-spacing: -.02em; line-height: 1.2; }
.hero p { margin: 0; color: var(--muted); max-width: 75ch; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 10px; }
.toolbar .grp { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar .spacer { flex: 1 1 auto; }
.btn { font: inherit; font-size: .88rem; padding: 7px 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
.btn.fix { background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; border: 0; font-weight: 700; }
.btn:focus-visible, select:focus-visible, textarea:focus-visible, input:focus-visible, .tab:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
select { font: inherit; font-size: .88rem; padding: 6px 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: .88rem; color: var(--muted); cursor: pointer; }

.panes { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 880px) { .panes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.pane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; min-height: 44px; }
.pane-head h2 { margin: 0; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pane-head .grp { display: flex; gap: 6px; flex-wrap: wrap; }
.pane-head .btn { padding: 4px 10px; font-size: .8rem; }
.pane textarea { flex: 1; width: 100%; min-height: 320px; border: 0; resize: vertical; padding: 12px; background: var(--surface); color: var(--ink); font: 13px/1.55 var(--mono); tab-size: 2; white-space: pre; overflow: auto; }
@media (min-width: 880px) { .pane textarea, .tree { min-height: 480px; } }
.drop { position: relative; display: flex; flex-direction: column; flex: 1; }
.drop.over::after { content: "Drop your .json file to open it"; position: absolute; inset: 8px; border: 2px dashed var(--brand); border-radius: 10px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--brand); font-weight: 600; pointer-events: none; }

.tabs { display: flex; gap: 4px; }
.tab { font: inherit; font-size: .8rem; padding: 4px 10px; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 600; }
.tree { flex: 1; min-height: 320px; max-height: 70vh; overflow: auto; padding: 10px 12px; font: 13px/1.6 var(--mono); }
.tree[hidden] { display: none; }
.tree details { margin-left: 14px; }
.tree > details { margin-left: 0; }
.tree summary { cursor: pointer; white-space: nowrap; }
.tree .row { margin-left: 28px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tree .k { color: var(--code-key); }
.tree .s { color: var(--code-str); }
.tree .n { color: var(--code-num); }
.tree .l { color: var(--code-lit); }
.tree .meta { color: var(--muted); font-size: .85em; }
.tree .more { margin: 4px 0 4px 28px; }
.tree .placeholder { color: var(--muted); font-family: var(--font); }

.status { margin-top: 10px; border-radius: var(--radius); padding: 10px 14px; border: 1px solid var(--line); background: var(--surface); font-size: .92rem; overflow-wrap: anywhere; }
.status.ok { border-color: color-mix(in srgb, var(--good) 50%, var(--line)); }
.status.ok strong { color: var(--good); }
.status.err { border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); }
.status.err strong { color: var(--bad); }
.status p { margin: 4px 0; }
.status pre { margin: 6px 0; padding: 8px; background: var(--surface-2); border-radius: 8px; overflow-x: auto; font: 12.5px/1.45 var(--mono); }
.status .btn { margin-top: 4px; margin-right: 6px; }
.changes { margin: 6px 0 0; padding-left: 20px; }
.changes li { margin: 2px 0; }
.changes .lines { color: var(--muted); font-size: .85em; }

.ad-slot { border: 2px dashed var(--line); border-radius: 10px; min-height: 100px; margin: 28px 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; background: var(--surface); }
.ad-slot.tall { min-height: 600px; margin: 0; }
@media (max-width: 899px) { .ad-slot.tall { min-height: 250px; } }

.content { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); margin-bottom: 32px; }
@media (min-width: 900px) { .content { grid-template-columns: minmax(0, 1fr) 300px; } .content aside { position: sticky; top: 16px; align-self: start; } }
.content h2 { font-size: 1.35rem; margin: 26px 0 8px; letter-spacing: -.01em; }
.content article > h2:first-child { margin-top: 0; }
.content p, .content li { max-width: 74ch; }
.content code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; margin: 8px 0; }
details.faq summary { cursor: pointer; padding: 11px 0; font-weight: 600; }
details.faq[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
details.faq p { margin: 0 0 12px; }

.site-foot { background: var(--surface); border-top: 1px solid var(--line); padding: 20px 0 28px; color: var(--muted); font-size: .88rem; }
.site-foot nav { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.page { padding: 26px 16px 40px; max-width: 760px; }

/* No manual ad units yet: AdSense Auto ads places ads itself, so hide the empty placeholder boxes. */
.ad-slot { display: none; }

/* Problem pages */
.crumbs { margin: 0 0 6px; font-size: .9rem; color: var(--muted); }
.crumbs a { color: inherit; }
.hero .try { margin-top: 12px; }
ul.related { columns: 2 240px; column-gap: 24px; padding-left: 1.1em; }
ul.related li { break-inside: avoid; margin: 4px 0; }
