/* Light and dark themes for every page. Pages keep their own dark :root colours;
   the light values below win because :root[data-theme] is more specific. */
:root {
  --panel-3: #1b1f27; --hover: #262b36; --well: #0b0d11;
  --line-strong: #3b4252; --line-hover: #47506a;
  --text-strong: #fff; --text-2: #c9cdd6;
  --danger-text: #ffb4b4; --warn-text: #f4d58d; --warn-line: #7a5a1f; --good: #6ee7a8;
  --glass: rgba(23, 26, 33, .94); --shadow: rgba(0, 0, 0, .45);
}
:root[data-theme="light"] {
  --bg: #f4f6fa; --panel: #ffffff; --panel-2: #f0f2f7; --panel-3: #e8ebf1; --line: #e1e5ec;
  --line-strong: #cbd2dd; --line-hover: #aeb8c8; --hover: #e7eaf0; --well: #e6e9ef;
  --text: #141821; --text-strong: #000; --text-2: #39404d; --muted: #5a6273;
  --accent: #2563eb; --accent-2: #1d4fd8; --danger: #dc2626;
  --danger-text: #b42318; --warn-text: #8a5a00; --warn-line: #e7c46a; --good: #15803d;
  --glass: rgba(255, 255, 255, .94); --shadow: rgba(16, 24, 40, .14);
  color-scheme: light;
}

/* The switch in the top bar */
.theme-toggle {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; padding: 0;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: var(--text);
  cursor: pointer; margin-left: auto; transition: background .15s, border-color .15s;
}
.theme-toggle:hover { border-color: var(--line-hover); background: var(--hover); }
.theme-toggle svg { width: 17px; height: 17px; }
.topbar-note ~ .theme-toggle, .spacer ~ * ~ .theme-toggle { margin-left: 4px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }

/* Light-mode touches that tokens alone can't express */
:root[data-theme="light"] .logo { color: #fff; }
:root[data-theme="light"] body { background: var(--bg); color: var(--text); }
:root[data-theme="light"] ::selection { background: rgba(37, 99, 235, .22); }
:root.theme-anim, :root.theme-anim * { transition: background-color .25s, border-color .25s, color .2s !important; }

/* Questions and answers under a tool */
.dx-faq { max-width: 860px; margin: 44px auto 8px; padding: 0 16px; }
.kit .dx-faq, .rw .dx-faq { padding: 0; }
.dx-faq h2 { font-size: 18px; margin: 0 0 12px; color: var(--text); }
.dx-faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.dx-faq summary { cursor: pointer; list-style: none; padding: 13px 16px; font-weight: 600; font-size: 14.5px; display: flex; justify-content: space-between; gap: 12px; color: var(--text); }
.dx-faq summary::-webkit-details-marker { display: none; }
.dx-faq summary { text-align: left; }
.dx-faq details > summary { padding: 13px 16px; font-size: 14.5px; color: var(--text); }
.dx-faq details > summary::before { content: none; }
.dx-faq summary::marker { content: ""; }
.dx-faq summary::after { content: "+"; color: var(--muted); font-size: 18px; line-height: 1; transition: transform .2s; }
.dx-faq details[open] summary::after { transform: rotate(45deg); }
.dx-faq p { margin: 0; padding: 0 16px 14px; color: var(--muted); font-size: 14px; line-height: 1.55; }
/* Doxtudio Pro: top-bar badge, offer and notices (see /pro.js) */
.pro-badge { display: inline-flex; align-items: center; margin-left: auto; margin-right: 6px; height: 32px; padding: 0 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap; color: #fff;
  background: linear-gradient(95deg, #f59e0b, #ec4899); box-shadow: 0 4px 14px -6px rgba(236, 72, 153, .7); }
.pro-badge:hover { filter: brightness(1.08); }
.pro-badge.is-pro { background: transparent; color: #16a34a; border: 1px solid rgba(22, 163, 74, .45); box-shadow: none; font-weight: 650; }
.topbar-note ~ .pro-badge, .nav ~ .pro-badge { margin-left: auto; }
.pro-badge ~ .theme-toggle { margin-left: 0 !important; }
@media (max-width: 520px) { .pro-badge.is-pro { display: none; } .pro-badge { height: 30px; padding: 0 10px; } }
.pro-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(8, 10, 14, .62);
  backdrop-filter: blur(4px); animation: pro-in .18s ease-out; }
.pro-card { position: relative; width: min(420px, 100%); background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 18px; padding: 26px 24px 20px; text-align: center; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.pro-card h2 { margin: 8px 0 6px; font-size: 20px; letter-spacing: -.3px; }
.pro-card p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.pro-card ul { text-align: left; margin: 0 0 18px; padding: 0; list-style: none; font-size: 14px; }
.pro-card li { padding: 5px 0 5px 24px; position: relative; }
.pro-card li::before { content: "✓"; position: absolute; left: 2px; color: #16a34a; font-weight: 800; }
.pro-star { width: 46px; height: 46px; margin: 0 auto; border-radius: 14px; display: grid; place-items: center; font-size: 22px; color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ec4899); }
.pro-go { display: block; padding: 12px; border-radius: 12px; background: linear-gradient(95deg, #f59e0b, #ec4899); color: #fff;
  font-weight: 700; text-decoration: none; font-size: 15px; }
.pro-later { margin-top: 8px; width: 100%; padding: 10px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.pro-small { margin: 6px 0 0 !important; font-size: 12.5px !important; }
.pro-small a { color: var(--accent); }
.pro-x { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.pro-toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); z-index: 1001; opacity: 0; pointer-events: none;
  background: #1f2430; color: #fff; padding: 10px 16px; border-radius: 10px; font: 600 13.5px system-ui, sans-serif; transition: all .25s; }
.pro-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.pro-toast a { color: #fbbf24; font-weight: 700; margin-left: 6px; text-decoration: none; white-space: nowrap; }
.pro-toast a:hover { text-decoration: underline; }
@keyframes pro-in { from { opacity: 0; } to { opacity: 1; } }
/* an on-screen tool waiting for a token */
html.dx-locked main { filter: blur(5px); pointer-events: none; user-select: none; transition: filter .2s; }
.pro-badge .pro-coin { color: #f59e0b; font-size: 10px; margin-right: 6px; }
.pro-badge .pro-plus { margin-left: 7px; padding-left: 7px; border-left: 1px solid currentColor; opacity: .7; font-weight: 800; }