/* JoyPro website: the app's colours (gui/JoyPro.Gui/Styles/Design.axaml), light and dark. */
:root {
  --bg: #EEF2F7; --surface: #FFFFFF; --surface-2: #F6F8FB; --text: #0F172A; --muted: #475569; --border: #D5DCE6;
  --accent: #2563EB; --accent-text: #1D4ED8; --accent-soft: #2563EB1F; --accent-strong: #2563EB; --line: #475569; --banner: #0B1A33; --banner-text: #F1F5F9;
  --ok: #166534; --ok-soft: #DCFCE7; --warn: #9A4A08; --warn-soft: #FEF3C7; --bad: #B91C1C; --bad-soft: #FEE2E2;
  --code-bg: #EEF2F7; --shadow: 0 1px 2px #0F172A14, 0 4px 14px #0F172A0D;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1220; --surface: #111A2B; --surface-2: #0F1726; --text: #E2E8F0; --muted: #94A3B8; --border: #233046;
    --accent: #3B82F6; --accent-text: #93C5FD; --accent-soft: #3B82F62E; --accent-strong: #2563EB; --line: #CBD5E1; --banner: #08101F; --banner-text: #F1F5F9;
    --ok: #4ADE80; --ok-soft: #14532D66; --warn: #FBBF24; --warn-soft: #78350F66; --bad: #F87171; --bad-soft: #7F1D1D66;
    --code-bg: #0B1322; --shadow: 0 1px 2px #0006;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1220; --surface: #111A2B; --surface-2: #0F1726; --text: #E2E8F0; --muted: #94A3B8; --border: #233046;
  --accent: #3B82F6; --accent-text: #93C5FD; --accent-soft: #3B82F62E; --accent-strong: #2563EB; --line: #CBD5E1; --banner: #08101F; --banner-text: #F1F5F9;
  --ok: #4ADE80; --ok-soft: #14532D66; --warn: #FBBF24; --warn-soft: #78350F66; --bad: #F87171; --bad-soft: #7F1D1D66;
  --code-bg: #0B1322; --shadow: 0 1px 2px #0006;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-text-size-adjust: 100%; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--code-bg); border: 1px solid var(--border); border-radius: 5px; padding: 0.05em 0.35em; overflow-wrap: anywhere; }
pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; overflow-x: auto; line-height: 1.45; }
pre code { background: none; border: 0; padding: 0; overflow-wrap: normal; }
img { max-width: 100%; height: auto; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 16px;
  background: var(--banner); color: var(--banner-text); border-bottom: 2px solid #38BDF8; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--banner-text); font-weight: 700; font-size: 20px; letter-spacing: 0.5px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand sup { color: #38BDF8; font-size: 0.65em; }
.search { position: relative; flex: 1; max-width: 520px; margin-left: auto; }
.search input { width: 100%; height: 38px; border-radius: 8px; border: 1px solid #33415580; background: #FFFFFF14; color: var(--banner-text); padding: 0 12px; font: inherit; font-size: 15px; }
.search input::placeholder { color: #CBD5E1B0; }
.results { position: absolute; top: 44px; left: 0; right: 0; max-height: 70vh; overflow: auto; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; }
.results a { display: block; padding: 8px 10px; border-radius: 7px; color: var(--text); }
.results a:hover, .results a.sel { background: var(--accent-soft); text-decoration: none; }
.results .r-t { font-weight: 600; }
.results .r-s { font-size: 12px; color: var(--muted); }
.results .r-x { font-size: 13px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-link { color: #CBD5E1; font-size: 14px; white-space: nowrap; }
.theme-btn, .menu-btn { background: #FFFFFF14; color: var(--banner-text); border: 1px solid #33415580; border-radius: 8px; height: 38px; min-width: 38px; font-size: 18px; cursor: pointer; }
.menu-btn { display: none; }

/* Layout */
.layout { display: grid; grid-template-columns: 270px minmax(0, 1fr) 220px; max-width: 1500px; margin: 0 auto; }
.sidenav { position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; padding: 16px 10px 40px 16px; border-right: 1px solid var(--border); font-size: 14.5px; }
.sidenav details { margin-bottom: 6px; }
.sidenav summary { cursor: pointer; font-weight: 700; padding: 4px 6px; color: var(--text); list-style-position: outside; }
.sidenav ul { list-style: none; margin: 2px 0 8px; padding: 0 0 0 8px; }
.sidenav li { display: flex; align-items: center; gap: 6px; }
.sidenav li a { display: block; padding: 3px 8px; border-radius: 6px; color: var(--muted); flex: 1; }
.sidenav li a:hover { background: var(--accent-soft); color: var(--text); text-decoration: none; }
.sidenav li a.current { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot.skeleton { background: var(--warn); opacity: 0.7; }
.en-mark { flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; line-height: 1.5; }
main { min-width: 0; padding: 22px 34px 40px; }
.toc { position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; padding: 22px 16px; font-size: 13.5px; border-left: 1px solid var(--border); }
.toc-title { font-weight: 700; margin-bottom: 6px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 3px 0; }
.toc li.l3 { padding-left: 12px; }
.toc a { color: var(--muted); }

.page-head { margin-bottom: 8px; }
.crumb { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
h1 { font-size: 34px; line-height: 1.2; margin: 4px 0 10px; }
h2 { font-size: 25px; margin: 34px 0 10px; padding-top: 6px; border-top: 1px solid var(--border); }
h3 { font-size: 19px; margin: 24px 0 8px; }
h4 { font-size: 16px; margin: 18px 0 6px; }
.content > h2:first-child { border-top: 0; }
.anchor { opacity: 0; margin-left: -0.9em; padding-right: 0.25em; color: var(--muted); font-weight: 400; }
h2:hover .anchor, h3:hover .anchor, h4:hover .anchor { opacity: 1; text-decoration: none; }
.lead { font-size: 18px; color: var(--muted); }
.muted { color: var(--muted); }
.content { max-width: 920px; }
.content p, .content li { overflow-wrap: break-word; }
.source-note { font-size: 13px; color: var(--muted); }
.foot { margin-top: 50px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--border); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; background: var(--surface); }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 650; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
/* A phone: headers wrap and long code breaks, so a table of two or three columns fits without sideways scrolling. */
@media (max-width: 700px) { th { white-space: normal; } th, td { padding: 6px 8px; } td code { overflow-wrap: anywhere; } }

/* Badges and callouts */
.badge { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 9px; vertical-align: middle; white-space: nowrap; }
.badge.full { background: var(--ok-soft); color: var(--ok); }
.badge.basic { background: var(--accent-soft); color: var(--accent-text); }
.badge.missing { background: var(--warn-soft); color: var(--warn); }
h1 .badge { font-size: 13px; position: relative; top: -5px; }
.callout { border: 1px solid var(--border); border-left: 4px solid var(--accent); background: var(--surface); border-radius: 8px; padding: 10px 16px; margin: 16px 0; }
.callout-title { font-weight: 700; margin-bottom: 2px; }
.callout.warn { border-left-color: var(--warn); }
.callout.tip { border-left-color: var(--ok); }
.callout.ingame { border-left-color: #38BDF8; background: linear-gradient(90deg, #38BDF814, transparent 60%), var(--surface); }
.callout > :last-child { margin-bottom: 4px; }

/* Layers */
.layer { position: relative; border: 1px solid var(--border); border-radius: 12px; padding: 30px 20px 8px; margin: 22px 0; background: var(--surface); box-shadow: var(--shadow); }
.layer-badge { position: absolute; top: -12px; left: 16px; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 2px 12px; color: #fff; letter-spacing: 0.03em; }
.layer-beginner .layer-badge { background: #15803D; }
.layer-advanced .layer-badge { background: #2563EB; }
.layer-technical .layer-badge { background: #7C3AED; }
.layer > h2:first-of-type, .layer > h3:first-of-type { margin-top: 4px; border-top: 0; }
.layer-switch { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; margin: 4px 0 6px; }
.layer-switch span { color: var(--muted); margin-right: 2px; }
.layer-switch button { font: inherit; font-size: 13.5px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 3px 12px; cursor: pointer; }
.layer-switch button.on { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
:root[data-show="beginner"] .layer:not(.layer-beginner),
:root[data-show="advanced"] .layer:not(.layer-advanced),
:root[data-show="technical"] .layer:not(.layer-technical) { display: none; }
/* At the Beginner level: no command line in the menu, no source facts under the controls. */
:root[data-show="beginner"] .nav-engine-cli, :root[data-show="beginner"] .entries .facts.power,
:root[data-show="beginner"] .entries .entry header .badge { display: none; }
.nav-power { margin-top: 14px; padding-top: 8px; border-top: 1px solid var(--border); }
.nav-sep { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 2px 6px 6px; }

/* Screenshots and video slots */
.shot { margin: 18px 0; }
.shot img { display: block; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.shot figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.shot.missing { padding: 30px; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); text-align: center; }
.only-dark { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .only-dark { display: block !important; } :root:not([data-theme="light"]) .only-light { display: none !important; } }
:root[data-theme="dark"] .only-dark { display: block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
.video-slot { display: flex; gap: 14px; align-items: center; border: 2px dashed var(--border); border-radius: 12px; padding: 14px 18px; margin: 18px 0; color: var(--muted); background: var(--surface-2); }
.video-icon { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #DC2626; color: #fff; font-size: 20px; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 18px 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px; }
.diagram-fig { margin: 18px 0; }
.diagram-fig .diagram { margin: 0; }
.diagram-fig figcaption { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.diagram-fig figcaption p { margin: 0; }
.diagram { margin: 18px 0; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; text-align: center; }
pre.mermaid { background: none; border: 0; margin: 0; padding: 0; font-family: var(--font); color: var(--text); }
pre.mermaid:not([data-processed]) { white-space: pre; text-align: left; font-family: var(--mono); color: var(--muted); }
pre.mermaid .nodeLabel, pre.mermaid .edgeLabel, pre.mermaid .cluster-label { line-height: 1.35; }
/* Dotted lines ("only when ..."): thicker dashes, so they stay visible on the dark page too. */
pre.mermaid svg path.edge-pattern-dotted { stroke-width: 2px !important; stroke-dasharray: 6 4 !important; }

/* Step cards (:::steps): a numbered row of boxes with arrows; a column on a phone. */
.steps ol { list-style: none; counter-reset: step; display: flex; align-items: stretch; gap: 30px; padding: 0; margin: 18px 0; }
.steps li { counter-increment: step; position: relative; flex: 1 1 0; min-width: 0; background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--accent); border-radius: 10px; padding: 10px 14px 10px; box-shadow: var(--shadow); font-size: 15px; line-height: 1.45; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-strong); color: #fff; font-size: 13px; font-weight: 700; margin: 0 8px 4px 0; vertical-align: 1px; }
.steps li:not(:last-child)::after { content: "\2192"; position: absolute; right: -26px; top: 50%; transform: translateY(-50%); width: 22px; text-align: center;
  color: var(--muted); font-size: 22px; font-weight: 700; line-height: 1; }
.steps li p { margin: 0 0 4px; display: inline; }
.steps li ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }

/* Box-and-arrow flows (:::flow): columns from left to right, one line per row. */
.flow { display: grid; gap: 12px 0; align-items: stretch; margin: 18px 0; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.flow-head { grid-row: 1; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 0 2px; }
.flow-head p { margin: 0; }
.flow-row { display: contents; }
.flow-box { background: var(--surface-2); border: 1.5px solid var(--accent); border-radius: 8px; padding: 8px 12px; font-size: 15px; line-height: 1.45;
  display: flex; flex-direction: column; justify-content: center; min-width: 0; overflow-wrap: anywhere; }
.flow-box p { margin: 0; }
.flow-lead { border-width: 2px; }
.flow-arrow { position: relative; align-self: center; height: 2px; background: var(--muted); margin: 0 9px 0 3px; }
.flow-arrow::after { content: ""; position: absolute; right: -9px; top: -5px; border: 6px solid transparent; border-left: 9px solid var(--muted); border-right: 0; }

/* Generated entries (controls, commands) */
.entries { display: grid; gap: 12px; }
.entry { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px; }
.entry header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.entry h3 { margin: 0; font-size: 17px; flex: 1 1 260px; }
.entry .kind { font-size: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 0 6px; }
.entry p { margin: 6px 0; font-size: 15px; }
.entry .lbl { display: inline-block; min-width: 92px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
p.lbl { margin-bottom: 0; }
.entry .src { font-size: 13px; }
.entry .hand { border-left: 3px solid var(--ok); padding-left: 12px; margin: 8px 0; }
/* The layers of an engine command's text: lighter boxes inside the entry, so a phone keeps the width for the text. */
.entry .hand .layer { padding: 24px 14px 4px; margin: 18px 0 12px; box-shadow: none; }
.entry .hand ul, .entry .hand ol { padding-left: 20px; }
.entry .hand code.opt { white-space: nowrap; overflow-wrap: normal; }
.entry.cli h3 code { font-size: 16px; background: none; border: 0; padding: 0; }
.entry pre.sig { white-space: pre-wrap; word-break: break-word; font-size: 13px; }
.entry details { margin: 6px 0; font-size: 14.5px; }
.entry summary { cursor: pointer; color: var(--accent-text); }
.cmd-index ul { columns: 3 220px; padding-left: 18px; font-size: 14px; }

/* Start page */
.hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 26px; align-items: center; background: linear-gradient(135deg, #0B1A33, #12305E); color: #F1F5F9;
  border-radius: 16px; padding: 28px; margin: 6px 0 24px; }
.hero h2 { border: 0; margin: 0 0 8px; font-size: 28px; line-height: 1.25; color: #fff; }
.hero .btns { gap: 8px; }
.hero .btns .btn { padding: 8px 14px; }
.hero p { color: #CBD5E1; }
.hero .btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn { display: inline-block; padding: 9px 16px; border-radius: 9px; font-weight: 600; background: #2563EB; color: #fff; }
.btn.ghost { background: #FFFFFF1F; }
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.hero img { border-radius: 10px; box-shadow: 0 6px 30px #0008; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 14px 0; }
.card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; color: var(--text); box-shadow: var(--shadow); }
.card:hover { border-color: var(--accent); text-decoration: none; }
.card b { display: block; margin-bottom: 4px; }
.card span { color: var(--muted); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.stats > div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; color: var(--muted); font-size: 13.5px; }
.stats b { display: block; color: var(--text); font-size: 24px; }
.game-card { margin: 14px 0 18px; }
.support-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px; margin: 10px 0; box-shadow: var(--shadow); }
.support-card summary { cursor: pointer; font-size: 17px; }
.support-card .lvl { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 9px; margin-left: 6px; background: var(--accent-soft); color: var(--accent-text); vertical-align: 2px; }
.support-card .lvl-native { background: var(--ok-soft); color: var(--ok); }
.support-card .lvl-documented { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.support-card dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 10px 0; font-size: 14.5px; }
.support-card dt { color: var(--muted); font-weight: 600; }
.support-card dd { margin: 0; overflow-wrap: anywhere; }
.support-card ul.features { list-style: none; padding: 0; margin: 8px 0 4px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 14px; font-size: 14px; }
.support-card ul.features li { display: block; }
.support-card ul.features .m { display: inline-block; width: 1.3em; text-align: center; font-weight: 700; }
.support-card ul.features li.yes .m { color: var(--ok); }
.support-card ul.features li.part .m { color: var(--warn); }
.support-card ul.features li.no, .support-card ul.features li.na { color: var(--muted); }
.support-card ul.features .n { display: block; margin-left: 1.6em; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.small { font-size: 13px; }
.picture-slot { display: flex; gap: 14px; align-items: center; border: 2px dashed var(--border); border-radius: 12px; padding: 14px 18px; margin: 18px 0; color: var(--muted); background: var(--surface-2); }
.picture-icon { flex: none; width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-size: 22px; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 14px 0; }

/* Phones and tablets */
@media (max-width: 1180px) { .layout { grid-template-columns: 250px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 820px) {
  .layout { display: block; }
  .menu-btn { display: block; }
  .sidenav { display: none; position: fixed; top: 60px; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--bg); border-right: 0; height: auto; }
  body.nav-open .sidenav { display: block; }
  main { padding: 16px 16px 30px; }
  .top-link { display: none; }
  .brand span { display: none; }
  h1 { font-size: 27px; }
  h2 { font-size: 21px; }
  .hero { grid-template-columns: 1fr; padding: 18px; }
  .hero h2 { font-size: 24px; }
  .layer { padding: 26px 14px 6px; }
  .entry { padding: 10px 10px; }
  .entry .lbl { display: block; }
  .entry .hand { padding-left: 8px; }
  .entry .hand .layer { padding: 22px 10px 2px; }
  .entry .hand ul, .entry .hand ol { padding-left: 16px; }
  .steps ol { flex-direction: column; gap: 22px; }
  .steps li:not(:last-child)::after { content: "\2193"; right: auto; left: calc(50% - 11px); top: auto; bottom: -22px; transform: none; }
  .flow { display: block; padding: 10px; }
  .flow-head { display: none; }
  .flow-box::before { content: attr(data-col); display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
  .flow-lead { margin-bottom: 26px; position: relative; }
  .flow-lead::after { content: "\2193"; position: absolute; left: calc(50% - 6px); bottom: -27px; color: var(--muted); font-size: 22px; font-weight: 700; line-height: 1; }
  .flow-row { display: block; border: 1px solid var(--border); border-radius: 10px; padding: 8px; margin: 0 0 10px; }
  .flow-row:empty { display: none; }
  .flow-arrow { height: 22px; width: 2px; margin: 4px auto 10px; }
  .flow-arrow::after { right: auto; left: -5px; top: auto; bottom: -9px; border: 6px solid transparent; border-top: 9px solid var(--muted); border-bottom: 0; }
  .flow-arrow.from-lead { display: none; }
  .diagram { padding: 10px 6px; overflow-x: hidden; }
  .diagram svg { max-width: 100% !important; height: auto; }
  .diagram { position: relative; cursor: zoom-in; }
  .diagram::after { content: attr(data-tap); position: absolute; right: 8px; bottom: 4px; font-size: 11px; color: var(--muted); }
  .diagram.zoom { overflow-x: auto; cursor: zoom-out; }
  .diagram.zoom svg { max-width: none !important; width: auto !important; min-width: 640px; }
  .diagram.zoom::after { content: attr(data-tap-fit); position: sticky; left: 100%; }
  .support-card dl.facts { grid-template-columns: 1fr; gap: 0; }
  .support-card dt { margin-top: 6px; }
}
.entry table.opts td:first-child code { white-space: nowrap; }

/* Languages */
.lang-select { height: 38px; max-width: 170px; border-radius: 8px; border: 1px solid #33415580; background: #FFFFFF14; color: var(--banner-text); font: inherit; font-size: 14px; padding: 0 6px; }
.lang-select option { color: #0F172A; background: #fff; }
.lang-note p { margin: 4px 0; }
.link-btn { border: 0; background: none; color: var(--accent-text); font: inherit; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
[data-en]:not(h1):not(h2):not(h3):not(h4)::after { content: "EN"; display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 3px; vertical-align: 1px; }
.mostly-en [data-en]::after { display: none !important; }
.entry .en-more { font-size: 13.5px; }
.entry .easy { font-weight: 600; }
@media (max-width: 820px) { .lang-select { max-width: 118px; font-size: 13px; padding: 0 2px; } }
.lang-slot { position: relative; display: inline-flex; }
.lang-face { display: none; }
/* Small phones: the picker shrinks to a short code with the select invisibly on top (a tap opens the full list), so the
   search box keeps room for its word in every language. */
@media (max-width: 480px) {
  .topbar { gap: 10px; padding: 0 12px; }
  .lang-face { display: inline-flex; align-items: center; justify-content: center; height: 38px; min-width: 44px; padding: 0 6px;
    box-sizing: border-box; border-radius: 8px; border: 1px solid #33415580; background: #FFFFFF14; color: var(--banner-text);
    font-size: 13px; font-weight: 600; white-space: nowrap; }
  .lang-slot .lang-select { position: absolute; inset: 0; width: 100%; max-width: none; opacity: 0; cursor: pointer; }
  .lang-slot:focus-within .lang-face { outline: 2px solid #38BDF8; outline-offset: 1px; }
  .search input { padding: 0 8px; }
}
