/* Dozun palette: soft blue chrome, navy text and muted-blue actions. */
:root {
  --navy: #06142d;
  --cyan: #00b9e8;
  --cyan-soft: #eaf8fc;
  --accent: #2e66b1;
  --accent-hover: #24568f;
  --blue: var(--accent);
  --accent-soft: #eef4fb;
  --ink: #102440;
  --ink-soft: #53657c;
  --muted: #5e6e82;
  --line: #dfe7ef;
  --panel: #fff;
  --surface: #f4f7fa;
  --header-surface: #e4edf7;
  --sidebar-surface: #eaf0f7;
  --chrome-line: #cbd9e8;
  --nav-ink: #4a607b;
  --control-surface: #f7faff;
  --control-line: #c9d7e6;
  --control-hover: #f0f5fa;
  --control-hover-line: #b8cbdc;
  --row-hover: #f1f5fa;
  --row-pressed: #e7eff8;
  --control-pressed: #d4e3f4;
  --selected-surface: #dce9f8;
  --selected-hover: #d5e4f4;
  --selected-line: #89acd3;
  --selected-ink: #24558b;
  --focus-ring: #527fb4;
  --nav-active: var(--selected-ink);
  --nav-active-bg: var(--selected-surface);
  --stage-base: #e3ebf4;
  --stage-hover: #d3e2f2;
  --stage-selected: #bdd2ea;
  --stage-trim: #91abc5;
  --stage-line: #9ab6d3;
  --stage-packet: #4b8ead;
  --map-platform: #edf2f7;
  --map-deploy: #4b8793;
  --map-deploy-active: #326f7e;
  --map-traffic: #527fb4;
  --map-traffic-active: var(--accent);
  --code-bg: var(--navy);
  --code-line: #1b3150;
  --radius: 10px;
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 14px;
  --ease-out: cubic-bezier(.22,1,.36,1);
  color: var(--ink);
  background: var(--surface);
}
/* Keep the page width stable when a disclosure introduces vertical scrolling. */
html { scrollbar-gutter: stable; }
body { background: var(--surface); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font-family: inherit; }
body > header {
  height: 72px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(100deg,#dfeaf5,var(--header-surface) 55%,#edf3f9);
  border-bottom: 1px solid var(--chrome-line);
  box-shadow: 0 1px 4px #284b7310;
}
.brand { color: var(--navy); font-size: 24px; letter-spacing: -.9px; gap: 11px; }
.brandmark { width: 56px; height: 46px; object-fit: contain; flex-shrink: 0; }
.header-note { color: #536b86; font-size: 9px; letter-spacing: 2px; }
.header-actions { gap: 12px; flex-shrink: 0; }
/* Keep the language switch and brand in place when the sample action is hidden. */
#demo[hidden] { display: inline-flex; visibility: hidden; pointer-events: none; }
.tab-label-compact { display: none; }
.header-actions .lang-switch { background: #d8e4f1; border-color: #c7d7e8; }
main { max-width: 1360px; padding: 0 32px 20px; }
.category-tabs { gap: 8px; margin: 12px 0 0; border-bottom: 1px solid var(--line); }
.category-tabs button { gap: 9px; padding: 15px 12px; color: #586a82; font-size: 13px; font-weight: 500; }
.category-tabs button.active { color: var(--accent); }
.category-tabs button.active::after { background: linear-gradient(90deg,var(--accent),var(--cyan)); height: 2px; }
.category-tabs button:hover { background: var(--accent-soft); color: var(--ink); }
.studio-heading { min-height: 156px; height: auto; overflow: visible; gap: 24px; padding: 12px 0; }
.studio-heading > div:first-child { min-width: 0; }
.studio-heading h1 { font-size: clamp(28px, 2.8vw, 36px); font-weight: 600; letter-spacing: -1.15px; margin: 8px 0; text-wrap: balance; }
.studio-heading h1 span { color: var(--accent); font-weight: inherit; }
#workspace-label { color: #526982; font-size: 11px; letter-spacing: 1.2px; }
#workspace-lead { color: var(--ink-soft); font-size: 14px; line-height: 1.65; max-width: 590px; margin-bottom: 0; }
.scene-shell { position: relative; flex: 0 0 216px; height: 132px; align-self: center; border-radius: 16px; background: radial-gradient(ellipse at 50% 65%,#e6f3fb 0,transparent 68%); }
#scene { position: relative; inset: auto; width: 100%; height: 100%; opacity: 1; }
#scene canvas { width: 100%; height: 100%; }
.scene-fallback { width: 70px; height: 70px; top: 50%; left: 50%; transform: translate(-50%,-50%); opacity: .9; }
#scene.fallback canvas { display: none; }
#scene.fallback .scene-fallback { display: block; }
#workspace { min-width: 0; scroll-margin-top: 90px; container-type: inline-size; }
#workspace:focus { outline: none; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 6px #06142d03; background: var(--panel); }
.panel-title h2, h2, h3 { color: var(--ink); }
.panel-title { margin-bottom: 18px; }
.panel-title h2, .pack-head h2 { font-size: 17px; font-weight: 600; letter-spacing: -.3px; }
.small, .optional, .source-foot, .help, .hint { color: var(--muted); }
.tag, .chip { color: #465d7a; background: #f2f5f9; border: 1px solid #e1e7ef; border-radius: 6px; font-size: 11px; font-variant-numeric: tabular-nums; }
.tag.blue, .chip.blue { color: #0055c8; background: var(--accent-soft); border-color: #d8e7fa; }
.tag.violet { color: #086782; background: var(--cyan-soft); border-color: #d0eaf1; }
.tag .icon { width: 15px; height: 15px; }
.button { min-height: 40px; border-radius: 8px; padding: 10px 15px; font-size: 13px; font-weight: 600; background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 2px 3px #173f8d12; transition: background .15s, border-color .15s, box-shadow .15s; }
.button:hover:not(:disabled) { transform: none; background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 3px 9px #0062ea18; }
.button.ghost { color: #3b506c; border-color: #d7e0eb; background: #fff; box-shadow: none; }
.button.ghost:hover:not(:disabled) { background: #f0f4fa; border-color: #bccce2; }
.button.subtle { color: #0055c8; background: var(--accent-soft); border-color: #d8e7fa; box-shadow: none; }
.button.subtle:hover:not(:disabled) { background: #e3efff; border-color: #a9c9f3; }
.button.link { background: none; color: #526580; box-shadow: none; border: none; }
button:disabled { cursor: not-allowed; opacity: .5; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #69b9ed; outline-offset: 3px; }
label { font-size: 13px; color: #3e536e; font-weight: 500; }
input, select, textarea { color: var(--ink); background: #fff; border: 1px solid #cfd9e7; border-radius: 8px; }
input, select { min-height: 42px; padding: 10px 12px; font-size: 14px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid #0062ea15; }
input::placeholder { color: #7d8ba0; }
input[type="checkbox"] { min-height: initial; accent-color: var(--accent); }
details > summary { cursor: pointer; color: #455a76; }
details[open] > summary { color: var(--ink); }
.choice { border-radius: 9px; border-color: #dbe3ef; padding: 15px; min-height: 120px; gap: 10px; box-shadow: none; }
.choice:hover { border-color: #8dacdf; box-shadow: 0 2px 8px #1c478d0a; }
.choice.on { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 .5px var(--accent); }
.choice-icon { width: 32px; height: 32px; border-radius: 8px; color: #375d85; background: #edf3f8; }
.choice.on .choice-icon { background: var(--navy); color: #78dcf5; }
.choice-text strong { font-size: 14px; }
.choice-text small { font-size: 13px; color: #536981; line-height: 1.5; }
.choice-text { padding-right: 12px; }
.choice-check { width: 18px; height: 18px; right: 11px; top: 11px; }
.choice-badge { border-radius: 5px; font-size: 10px; padding: 2px 6px; }
.choices { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }
.choices.list { grid-template-columns: 1fr; }
.layout-toggle, .lang-switch { background: #f0f3f8; border-radius: 8px; border-color: var(--line); }
.layout-toggle button, .lang-switch button { color: #526580; min-height: 30px; }
.layout-toggle button.active, .lang-switch button.active { color: var(--accent); border-radius: 5px; box-shadow: 0 1px 3px #17314b15; }
.question { padding: 22px 0; border-color: var(--line); }
.q-head { gap: 10px; margin-bottom: 14px; }
.q-head h2 { font-size: 15px; font-weight: 600; }
.q-head p { color: #536981; font-size: 13px; }
.q-num { font-size: 10px; border-radius: 5px; padding: 4px 6px; color: var(--accent); background: var(--accent-soft); }
.path-grid { gap: 16px; }
.path-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 2px 6px #06142d03; gap: 12px; }
.path-card:hover { transform: translateY(-2px); border-color: #9cc4e8; box-shadow: 0 6px 18px #0622540c; }
.path-card:first-child { background: linear-gradient(135deg,#f0f8ff,#fff 75%); border-color: #b7d4ee; }
.path-card:first-child .path-icon { background: var(--navy); color: #72dcf6; }
.path-card strong { font-size: 18px; line-height: 1.4; }
.path-icon { width: 40px; height: 40px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.path-step { color: #657b9b; font-size: 10px; }
.path-desc { color: var(--ink-soft); font-size: 13px; min-height: 42px; }
.path-cta { color: var(--accent); font-size: 13px; margin-top: 10px; }
.home-lower { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 16px; margin-top: 18px; }
.home-lower .panel { padding: 22px; }
.menu-list button { padding: 12px 2px; gap: 12px; }
.menu-text { font-size: 13px; }
.menu-target { font-size: 11px; }
.glossary summary { font-size: 13px; }
.glossary details { padding: 10px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.compact-home { container: home / inline-size; }
.compact-home .path-grid { gap: 16px; }
.compact-home .path-card { padding: 20px; gap: 10px; }
.compact-home .path-icon { width: 34px; height: 34px; border-radius: 8px; }
.compact-home .path-step { font: 11px var(--mono); letter-spacing: .5px; }
.compact-home .path-card strong { font-size: 17px; }
.compact-home .path-desc { min-height: 0; font-size: 12px; }
.compact-home .path-cta { margin-top: 10px; font-size: 12px; }
.compact-home .home-lower { grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: 16px; margin-top: 16px; align-items: stretch; }
.compact-home .home-lower .panel { padding: 20px; }
.compact-home .panel-title { margin-bottom: 12px; }
.compact-home .panel-title h2 { font-size: 15px; }
.home-shortcut { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 14px 12px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; color: var(--ink); }
.home-shortcut > .icon { flex-shrink: 0; width: 20px; height: 20px; color: var(--accent); }
.home-shortcut > .icon:last-child { width: 15px; height: 15px; color: #7b91aa; }
.home-shortcut > span { flex: 1; min-width: 0; }
.home-shortcut strong { display: block; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.home-shortcut small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.home-shortcut:hover strong { color: var(--accent); }
.home-help .panel-title .button { font-size: 11px; padding: 6px 9px; min-height: 32px; }
.home-search { display: flex; align-items: center; gap: 10px; padding: 4px 5px 4px 12px; border: 1px solid #cddced; border-radius: 8px; background: #fff; }
.home-search > .icon { flex-shrink: 0; width: 18px; height: 18px; color: #7790ab; }
.home-search input { flex: 1; min-width: 0; border: 0; margin: 0; padding: 10px 0; background: none; font-size: 13px; }
.home-search input:focus { outline: 0; box-shadow: none; }
.home-search:focus-within { border-color: var(--accent); outline: 3px solid #0062ea10; }
.home-search > button { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; }
.home-search > button:hover { background: var(--accent-hover); }
.help-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.help-suggestion { min-height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; background: #f8fafd; color: #526981; font-size: 11px; }
.help-suggestion:hover { color: var(--accent); border-color: #9bbfe6; background: var(--accent-soft); }
.home-glossary { margin-top: 16px; padding: 0; }
.home-glossary > summary { display: flex; align-items: center; gap: 10px; padding: 16px 20px; cursor: pointer; list-style: none; }
.home-glossary > summary::-webkit-details-marker { display: none; }
.home-glossary > summary > .icon { width: 17px; height: 17px; color: var(--muted); }
.home-glossary > summary strong { font-size: 13px; font-weight: 500; }
.home-glossary > summary span { margin-left: auto; font-size: 11px; color: var(--muted); }
.home-glossary > summary::after { content: ''; flex-shrink: 0; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: -3px 2px 0 6px; }
.home-glossary[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.home-glossary .glossary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0 20px; padding: 0 20px 16px; }
.home-glossary .glossary > details { min-width: 0; padding: 10px 0; border-top: 1px solid var(--line); }
.home-glossary .glossary summary { font-size: 12px; }
.home-glossary .glossary p { font-size: 12px; line-height: 1.7; color: var(--ink-soft); }
.drop { border: 1px dashed #b9d0e6; border-radius: 10px; background: #f8fbfe; padding: 36px 24px; }
.drop:hover { background: #f0f8ff; border-color: #639fdb; }
.drop h3 { font-size: 22px; color: var(--ink); }
.upload-icon { color: var(--accent); border-color: #d8e7f4; box-shadow: 0 2px 6px #0062ea08; }
.service-icon { color: #156095; background: #edf5fb; }
.drop p { color: #5f728e; font-size: 12px; }
.drop-hint { display: block; width: 100%; margin: 20px auto 0; max-width: 500px; padding: 0; background: none; border: 0; font-size: 12px; }
.drop-hint > summary { width: fit-content; max-width: 100%; margin-inline: auto; color: #5e7495; }
.source-foot { font-size: 11px; }
.has-source { padding: 14px 16px; background: #fafcff; }
.has-source h3 { font-size: 16px; }
.has-source .upload-icon { width: 38px; height: 38px; box-shadow: none; border-radius: 8px; }
.component { background: #f8fafd; border: 1px solid #e3e9f1; border-radius: 9px; padding: 13px; box-shadow: none; }
.service-meta h3 { font-size: 14px; }
.service-meta code { font-size: 11px; color: #536981; overflow-wrap: anywhere; }
.section-label { color: #526781; font-size: 11px; letter-spacing: 1px; }
.section-label > span { color: #5e718c; }
.languages .chip { color: #365681; }
.source-details { gap: 12px; }
.source-details summary { font-size: 12px; }
.quick-package { margin: 22px 0 0; padding: 22px 0 0; min-width: 0; container: package / inline-size; }
.source-panel.analyzed > .has-source { border-style: solid; border-color: var(--line); background: #f8fafd; }
.has-source .drop-copy { min-width: 0; }
.has-source .drop-copy h3 { overflow-wrap: anywhere; }
.has-source .drop-copy p { margin-top: 3px; font: 11px/1.6 var(--mono); }
.has-source .actions { flex-shrink: 0; }
.has-source .actions .button { min-height: 36px; font-size: 12px; }
.pack-head { margin-bottom: 18px; }
.pack-head h2 { font-size: 18px; }
.pack-count { font: 11px var(--mono); color: var(--ink-soft); }
.scope-section { margin-bottom: 16px; }
.scope-section h3, .compact-export > h3 { font-size: 12px; font-weight: 500; color: var(--ink-soft); margin: 0 0 10px; }
.scope-picker { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.scope-option { display: flex; align-items: center; gap: 10px; position: relative; min-width: 0; min-height: 68px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-align: left; transition: background .15s, border-color .15s; }
.scope-option:hover { border-color: #9bbfe6; background: #f8fbff; }
.scope-option.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.scope-option > .icon { flex-shrink: 0; color: #60768e; width: 20px; height: 20px; }
.scope-option.on > .icon { color: var(--accent); }
.scope-option strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.4; }
.scope-option small { display: block; margin-top: 3px; color: var(--muted); font: 10px/1.4 var(--mono); }
.scope-check { margin-left: auto; flex-shrink: 0; width: 16px; height: 16px; display: grid; place-items: center; border: 1px solid #cbd7e5; border-radius: 50%; color: transparent; }
.scope-check .icon { width: 11px; height: 11px; stroke-width: 2.5; }
.scope-option.on .scope-check { color: #fff; background: var(--accent); border-color: var(--accent); }
.scope-single { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid #b9d6f4; background: var(--accent-soft); border-radius: 8px; }
.scope-single > .icon { color: var(--accent); }
.scope-single strong { font-size: 14px; }
.scope-single > span { margin-left: auto; color: var(--muted); font-size: 11px; }
.package-settings { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 8px; }
.package-settings > summary { display: flex; align-items: center; gap: 9px; padding: 12px; list-style: none; cursor: pointer; font-size: 12px; }
.package-settings > summary::-webkit-details-marker { display: none; }
.package-settings > summary > .icon { width: 16px; height: 16px; color: var(--ink-soft); }
.package-settings > summary strong { font-weight: 500; }
.package-settings > summary > span { margin-left: auto; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.package-settings > summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: -3px 2px 0 4px; flex-shrink: 0; }
.package-settings[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.package-settings[open] > summary { border-bottom: 1px solid var(--line); }
.package-settings-body { padding: 14px; }
.pack-extra { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 12px; padding: 13px 15px; }
.pack-extra > summary { font-size: 13px; font-weight: 500; }
.pack-extra > summary > span { float: right; max-width: 60%; overflow-wrap: anywhere; color: #60738e; font-size: 11px; font-weight: 400; }
.pack-extra .question { padding: 15px 0 0; border: 0; }
.pack-extra .q-num, .pack-extra .q-head h2 { display: none; }
.pack-extra .q-head { margin-bottom: 12px; }
.pack-extra + .question { border-top: 0; padding-top: 18px; }
.selected-parts { margin: 12px 0 0; }
.selected-parts > span { border-radius: 6px; background: #edf5fb; color: #235479; font-size: 11px; padding: 6px 9px; }
.compact-export, .quick-package .compact-export { background: #f6f9fd; border: 1px solid #d9e5f2; border-radius: 10px; padding: 16px; box-shadow: none; }
.export-modes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; padding: 4px; border: 1px solid #dbe5f0; border-radius: 8px; background: #eaf0f7; }
.export-mode { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 62px; padding: 10px 12px; border: 1px solid transparent; border-radius: 5px; color: var(--ink-soft); background: none; text-align: left; }
.export-mode.on { background: #fff; color: var(--accent); border-color: #d8e4f2; box-shadow: 0 1px 3px #17314b0c; }
.export-mode:hover:not(.on) { background: #ffffff80; color: var(--ink); }
.export-mode > .icon { width: 19px; height: 19px; flex-shrink: 0; }
.export-mode strong { display: block; font-size: 13px; line-height: 1.4; font-weight: 600; }
.export-mode small { display: block; font-size: 11px; margin-top: 3px; line-height: 1.5; color: var(--ink-soft); }
.deployment-targets, .deployment-access { margin-bottom: 18px; }
.compact-export > h3 { margin-bottom: 10px; }
.native-manager { margin-bottom: 18px; }
.native-manager > h3 { margin: 0 0 10px; font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.native-manager .setup-note { margin: 10px 0 0; font-size: 12px; }
.export-receipt { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 17px 0; }
.export-file-icon { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 38px; color: var(--accent); border: 1px solid #d9e5f2; border-radius: 7px; background: #fff; }
.export-receipt > div { min-width: 0; flex: 1; }
.export-receipt strong { display: block; overflow-wrap: anywhere; font: 500 12px/1.6 var(--mono); color: var(--ink); }
.export-receipt div > span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.export-format { font: 10px var(--mono); color: var(--muted); }
.export-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.export-actions .button { min-height: 42px; font-size: 12px; padding: 10px 14px; }
.export-actions .export-download { flex: 1; background: var(--accent); border-color: var(--accent); color: #fff; }
.export-actions .export-download:hover:not(:disabled) { background: var(--accent-hover); }
.export-actions .progress-card { flex-basis: 100%; }
.compact-export > .help { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #dce6f1; }
.compact-export > .help summary { font-size: 11px; color: var(--muted); }
.compact-export > .help p { font-size: 12px; }
.quick-package .export-help .bundle-list { display: flex; flex-wrap: wrap; font-size: 11px; }
.runner-fields { margin-top: 16px; grid-template-columns: repeat(auto-fit,minmax(min(100%,200px),1fr)); gap: 12px; }
.runner-fields label { font-size: 12px; }
.compact-export .transmission { font-size: 11px; margin: 10px 0 14px; }
.package-success { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; color: #207451; }
.package-success > .icon { width: 16px; height: 16px; }
.package-success strong { font-size: 12px; font-weight: 500; }
.package-success .button { margin-left: auto; font-size: 12px; }
.package-layout > aside .export-mode { padding: 10px 7px; }
.package-layout > aside .export-mode > .icon { display: none; }
.advanced-config { border-radius: 8px; border-color: var(--line); }
.advanced-config > summary { font-size: 12px; }
.quick-footer { flex-wrap: wrap; }
.quick-footer .button { font-size: 12px; }
.setup-layout, .guide-layout { grid-template-columns: minmax(0,1fr) 290px; gap: 20px; }
.setup-summary, .guide-progress { top: 92px; }
.setup-bar { margin-bottom: 16px; }
.mini-steps { padding: 4px; border: 1px solid var(--line); background: #eaf0f7; border-radius: 9px; }
.mini-steps button { min-height: 38px; padding: 7px 12px; font-size: 12px; border-radius: 6px; }
.mini-steps button.active { background: #fff; box-shadow: 0 1px 3px #17314b0c; }
.mini-steps button span { width: 20px; height: 20px; font-size: 10px; }
.compact-setup .setup-questions { padding: 24px; container: server-form / inline-size; }
.setup-section { margin-bottom: 20px; }
.setup-section h2 { margin: 0 0 12px; font-size: 13px; font-weight: 600; }
.setup-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.setup-section-head h2 { margin: 0; }
.setup-section-head > span, .setup-hint { color: var(--muted); font-size: 11px; }
.setup-hint summary { cursor: pointer; }
.setup-hint code { display: block; margin-top: 8px; padding: 6px 8px; color: var(--ink); background: var(--accent-soft); border-radius: 5px; font-size: 11px; }
.setup-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.setup-access-group { margin-bottom: 14px; }
.setup-access-group > h3 { margin: 0 0 8px; font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.setup-access-help { line-height: 1.6; }
.setup-access-help p { margin: 10px 0; max-width: 64ch; }
.setup-access-help a { color: var(--accent); }
.recipe-code { margin: 12px 0; border: 1px solid var(--line, #dce6ef); border-radius: 10px; overflow: hidden; }
.recipe-code > summary { padding: 13px; color: var(--ink-soft); background: var(--control-hover, #f2f6fa); font-size: 12px; line-height: 1.7; cursor: pointer; }
.recipe-code > summary:hover { color: var(--selected-ink); background: var(--accent-soft); }
.recipe-code > .code-block { margin: 0; border: 0; border-radius: 0; }
.setup-os { grid-template-columns: repeat(3,minmax(0,1fr)); }
.setup-option { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 48px; border: 1px solid var(--line); border-radius: 8px; padding: 11px; text-align: left; color: var(--ink); background: #fff; transition: border-color .15s, background .15s; }
.setup-option:hover { border-color: #9bbfe6; background: #f8fbff; }
.setup-option.on { border-color: var(--accent); background: var(--accent-soft); }
.setup-option-icon { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; background: #f0f4f8; border-radius: 6px; color: #5e748e; font: 500 11px var(--mono); }
.setup-option-icon > .icon { width: 17px; height: 17px; }
.setup-option.on .setup-option-icon { background: #e0edff; color: var(--accent); }
.setup-option-text { flex: 1; min-width: 0; }
.setup-option-text strong { display: block; font-size: 13px; font-weight: 500; line-height: 1.5; }
.setup-option-text small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.setup-option.on .scope-check { color: #fff; background: var(--accent); border-color: var(--accent); }
.setup-options[data-multi] .scope-check { border-radius: 4px; }
.setup-disclosure { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 20px; }
.setup-disclosure:last-child { margin-bottom: 0; }
.setup-disclosure > summary { display: flex; align-items: center; gap: 10px; padding: 12px; cursor: pointer; list-style: none; }
.setup-disclosure > summary::-webkit-details-marker { display: none; }
.setup-disclosure > summary strong { font-size: 12px; font-weight: 500; }
.setup-disclosure > summary > span { min-width: 0; margin-left: auto; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; text-align: right; }
.setup-disclosure > summary::after { content: ''; width: 6px; height: 6px; flex-shrink: 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: -3px 2px 0 4px; }
.setup-disclosure[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.setup-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.setup-disclosure-body { padding: 14px; }
.setup-note { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 0 0 12px; }
.server-details .fields { gap: 12px; }
.server-details label { font-size: 12px; }
.setup-result { padding: 20px; background: #f6f9fd; border-color: #d9e5f2; }
.setup-result .summary-title { font-size: 10px; letter-spacing: .8px; margin-bottom: 16px; }
.setup-result .install-list { gap: 12px; }
.setup-result .install-list li { align-items: center; gap: 8px; }
.setup-result .install-list strong { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.setup-result .install-list small { font-size: 11px; margin-top: 3px; }
.setup-result .install-list > li > .icon { width: 18px; height: 18px; flex-shrink: 0; padding: 3px; color: var(--accent); background: #e2efff; }
.setup-result .summary-meta { font-size: 11px; margin: 16px 0 12px; padding-top: 14px; }
.setup-result .button { font-size: 12px; min-height: 42px; }
.setup-skipped { margin-top: 16px; }
.setup-skipped summary, .setup-script-help summary { font-size: 11px; color: var(--muted); cursor: pointer; }
.setup-skipped .install-list { margin-top: 12px; }
.setup-script-help { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.setup-script-help p { font-size: 12px; color: var(--muted); }
.setup-script-help code { display: block; padding: 10px; font: 11px/1.7 var(--mono); background: var(--navy); color: #dceaf8; border-radius: 6px; overflow-wrap: anywhere; }
.guide-head { padding: 16px; border-radius: 10px; gap: 12px; }
.guide-head .chip { font-size: 11px; }
.guide-head .button { font-size: 12px; }
.guide-step { grid-template-columns: 30px minmax(0,1fr); gap: 12px; padding: 20px; border-radius: 10px; box-shadow: none; scroll-margin-top: 94px; }
.step-check { width: 30px; height: 30px; font-size: 11px; }
.step-body h3 { font-size: 15px; margin: 4px 0 14px; }
.step-body .facts { border-radius: 8px; font-size: 12px; padding: 12px; }
.step-body .tips { font-size: 12px; }
.step-body .tips .why { font-size: 12px; margin-top: 10px; }
.step-foot .button { font-size: 12px; min-height: 36px; }
.guide-steps .script-callout { display: block; padding: 14px 16px; border-radius: 8px; background: var(--accent-soft); border: 1px solid #d9e5f2; }
.script-callout > summary { cursor: pointer; font-size: 13px; font-weight: 500; }
.script-callout > summary > span { margin-left: 8px; color: var(--muted); font-size: 11px; font-weight: 400; }
.script-callout > .button { margin: 14px 0 4px; font-size: 12px; }
.guide-progress > .panel { padding: 20px; box-shadow: none; border-radius: 10px; }
.guide-index { margin: 16px 0; }
.guide-index > summary { font-size: 12px; color: var(--ink-soft); cursor: pointer; }
.guide-progress .button { font-size: 12px; }
.guide-progress .step-index { margin: 12px 0; }
.guide-progress .step-index a { font-size: 12px; }
.summary-title, .summary-meta, .install-list small, .install-list.skip strong { color: #586d89; }
.mini-steps button { color: #5b6e88; font-size: 13px; }
.mini-steps button.active, .steps button.active { color: var(--accent); background: var(--accent-soft); }
.mini-steps button.active span, .steps button.active span { color: #fff; background: var(--accent); border-color: var(--accent); }
.file-tabs button.active { color: var(--accent); background: var(--accent-soft); }
.nginx-entry { max-width: 650px; margin: 8px auto 0; padding: 30px; }
.entry-number { color: #476a9d; }
.entry-number span { color: #667b96; }
.optional { float: none; color: #65758b; }
.nginx-layout { grid-template-columns: 280px minmax(0,1fr); gap: 20px; }
.editor-heading { background: #f8fafd; padding: 15px 20px; }
.editor-heading strong, .connection-host strong { color: #263f60; }
.connection-host span, #edit-status { color: #5e718b; }
#nginx-code, .code-pane pre { color: #314d70; background: #fff; font: 13px/1.8 var(--mono); tab-size: 4; }
.code-block pre { background: var(--navy); color: #dceaf8; }
.code-head { background: #0b1e38; }
.code-head .icon { color: #76a7c9; }
.ip-class.private { color: #086782; background: var(--cyan-soft); }
.ip-class.public { color: #207451; background: #e9f6ef; }
.editor-bottom { color: #667b96; }
.nginx-entry { max-width: 740px; margin: 0 auto; padding: 24px; container: nginx-entry / inline-size; }
.connection-title { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.connection-title > .icon { width: 34px; height: 34px; padding: 7px; border-radius: 8px; color: var(--accent); background: var(--accent-soft); }
.nginx-entry .connection-title h2 { font-size: 18px; letter-spacing: -.3px; margin: 0; }
.nginx-entry .fields { gap: 16px; }
.nginx-entry label { font-size: 13px; }
.nginx-entry .optional { font-size: 10px; }
.nginx-entry .entry-bottom { margin-top: 18px; padding-top: 16px; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.nginx-entry .entry-bottom details { font-size: 11px; color: var(--muted); flex: 1; min-width: 110px; }
.nginx-entry .entry-bottom .button { margin-left: auto; min-height: 42px; font-size: 12px; }
.nginx-settings { padding: 20px; }
.nginx-access { margin-bottom: 18px; padding: 16px 20px; }
.nginx-access > h3 { margin: 0 0 10px; color: var(--ink-soft); font-size: 12px; font-weight: 500; }
.nginx-access .deployment-access { margin-bottom: 9px; }
.nginx-access > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.nginx-deployment { margin-top: 20px; padding: 20px; min-width: 0; }
.nginx-deployment .panel-title { flex-wrap: wrap; gap: 8px; }
.nginx-deployment h2 { font-size: 15px; }
.nginx-deploy-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.nginx-deploy-step { border-top: 1px solid var(--line); }
.nginx-deploy-step > summary { display: flex; align-items: baseline; gap: 10px; padding: 14px 0; cursor: pointer; list-style: none; }
.nginx-deploy-step > summary::-webkit-details-marker { display: none; }
.nginx-deploy-step > summary > span { color: var(--muted); font: 11px var(--mono); }
.nginx-deploy-step > summary > strong { font-size: 13px; font-weight: 500; }
.nginx-deploy-step > summary::after { content: ''; margin-left: auto; width: 6px; height: 6px; flex-shrink: 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.nginx-deploy-step[open] > summary::after { transform: rotate(225deg); }
.nginx-deploy-body { padding-bottom: 14px; }
.nginx-command-purpose { font-size: 12px; line-height: 1.7; margin: 0 0 12px; color: var(--ink-soft); }
.nginx-deploy-body .setup-note { margin: 12px 0 0; }
.nginx-os { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12px; margin: 12px 0; }
.nginx-os select { width: auto; max-width: 100%; font-size: 12px; }
.nginx-deploy-notes { color: var(--muted); font-size: 12px; line-height: 1.7; border-top: 1px solid var(--line); padding-top: 12px; }
.nginx-deploy-notes summary { cursor: pointer; }
.nginx-deployment .code-block pre { max-height: 280px; }
.deployment-context { margin: 0 0 12px; color: var(--selected-ink); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.command-purpose { color: var(--ink-soft); font-size: 12px; line-height: 1.7; margin: 10px 0; }
.diagnostic-list .code-explanation { margin: 10px -38px 10px 0; }
.diagnostic-list .code-explanation summary { font-size: 11px; }
.diagnostic-list .code-explanation summary::after { content: none; }
.nginx-project { padding: 18px 20px; margin-bottom: 18px; }
.nginx-project .panel-title { flex-wrap: wrap; gap: 12px; }
.nginx-project h2 { font-size: 14px; }
.nginx-proposal { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 4px; }
.nginx-proposal > p { font-size: 12px; overflow-wrap: anywhere; }
.nginx-proposal summary { cursor: pointer; color: var(--selected-ink); font-size: 12px; padding: 12px 0; }
.nginx-proposal pre { max-height: 300px; overflow: auto; padding: 14px; background: var(--control-surface); border: 1px solid var(--chrome-line); border-radius: 6px; font-size: 11px; line-height: 1.7; }
.nginx-route-list { display: grid; gap: 6px; margin: 12px 0; font-size: 11px; color: var(--ink-soft); }
.nginx-route-list > span { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.nginx-route-list code { overflow-wrap: anywhere; }
.map-services { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.map-services:empty { display: none; }
.map-services > span { font-size: 11px; padding: 5px 9px; border-radius: 5px; background: var(--control-surface); border: 1px solid var(--chrome-line); color: var(--nav-ink); }
.nginx-settings .panel-title h2 { font-size: 15px; }
.connection-host { margin-top: 12px; gap: 5px; }
.connection-host strong { font: 600 14px/1.5 "Be Vietnam Pro",system-ui,sans-serif; color: var(--ink); }
.connection-host > span { font: 12px/1.6 var(--mono); color: var(--muted); }
.ip-class { font-size: 11px; }
.port-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 18px; padding-top: 18px; }
.port-fields label { min-width: 0; font-size: 12px; }
.nginx-settings .wide { min-height: 40px; margin-top: 16px; font-size: 12px; }
#nginx-change { font-size: 11px; line-height: 1.6; color: #98641c; margin: 10px 0 0; }
#nginx-change:empty { display: none; }
.nginx-settings .help { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; font-size: 11px; color: var(--muted); }
.nginx-editor { container: config-editor / inline-size; }
.nginx-editor .editor-heading { padding: 14px 16px; }
.config-file-title { flex-shrink: 0; }
.config-file-title > .icon { width: 16px; height: 16px; color: var(--accent); }
.editor-heading .config-actions { display: flex; flex-wrap: nowrap; gap: 8px; margin-left: auto; }
.config-actions .button { font-size: 12px; min-height: 38px; padding: 8px 12px; }
.config-editor-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: #fbfcfe; border-bottom: 1px solid #edf1f7; font: 10px var(--mono); color: var(--muted); }
#edit-status { display: inline-flex; align-items: center; gap: 6px; font: 11px/1.5 "Be Vietnam Pro",system-ui,sans-serif; color: #47709c; }
#edit-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
#edit-status[data-status="stale"] { color: #98641c; }
#edit-status[data-status="saved"] { color: #207451; }
#edit-status[data-status="edited"] { color: var(--accent); }
#nginx-code { min-height: 400px; padding: 18px; font-size: 13px; line-height: 1.8; }
.nginx-editor .editor-bottom { padding: 10px 16px; font-size: 10px; letter-spacing: .5px; }
.help-toolbar, .map-panel { border-radius: var(--radius); }
.qa-answer, .help-empty { color: var(--ink-soft); }
.map-panel { container-type: inline-size; }
.compact-help .deployment-map-panel { padding: 18px; margin-top: 16px; }
.deployment-map-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.deployment-map-header h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 15px; font-weight: 600; }
.deployment-map-header h2 .icon { width: 19px; height: 19px; color: var(--accent); }
.map-key { display: flex; align-items: center; gap: 16px; font-size: 11px; color: var(--nav-ink); }
.map-key > span { display: inline-flex; align-items: center; gap: 6px; }
.map-key > span::before { content: ""; width: 20px; height: 8px; background: var(--map-traffic); clip-path: polygon(0 35%,65% 35%,65% 0,100% 50%,65% 100%,65% 65%,0 65%); }
.map-key .map-key-deploy::before { background: var(--map-deploy); }
.deploy-map { aspect-ratio: auto; min-height: 0; margin-top: 16px; border: 0; border-radius: 0; overflow: visible; background: transparent; }
.map-stage { position: relative; inset: auto; width: 100%; height: auto; }
.map-viewport { overflow-x: auto; overflow-y: hidden; border: 1px solid #e1e9f1; border-radius: 9px; background: linear-gradient(180deg,#fbfdff,#f2f7fb); scrollbar-width: thin; scrollbar-color: #a5bdd5 #edf3f8; overscroll-behavior-x: contain; }
.map-canvas { position: relative; width: 100%; min-width: 800px; height: 520px; touch-action: pan-x pan-y; }
.map-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-label-layer { position: absolute; inset: 0; pointer-events: none; }
.map-stop { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 126px; min-height: 52px; padding: 6px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ink); transform: translateX(-50%); pointer-events: auto; transition: background .15s, border-color .15s; }
.map-stop:not(.map-stop-static):hover { background: #ffffffdc; border-color: #bad2eb; }
.map-stop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; background: #fff; }
.map-stop.on { background: #fff; border-color: #77afe9; box-shadow: 0 3px 10px #0d488b0a; }
.map-stop-name { font-size: 12px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.map-stop-meta { margin-top: 3px; color: #647c96; font-size: 10px; line-height: 1.5; }
.map-stop:not(.map-stop-static):hover .map-stop-meta, .map-stop.on .map-stop-meta { color: var(--accent); }
.map-stop-static { pointer-events: none; }
.map-lane-label { position: absolute; font: 500 11px/1.4 var(--mono); letter-spacing: .2px; color: var(--map-deploy-active); white-space: nowrap; }
.map-lane-label.traffic-lane { color: var(--selected-ink); }
.map-server-label { position: absolute; transform: translate(-50%,-50%); padding: 5px 8px; border: 1px solid var(--chrome-line); border-radius: 5px; background: var(--control-surface); color: var(--nav-ink); font: 9px/1.4 var(--mono); letter-spacing: 1.2px; white-space: nowrap; }
.map-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; color: #71849b; font-size: 11px; }
.deployment-map-panel.no-3d .map-caption, .deployment-map-panel.no-3d .map-key { display: none; }
.map-stage.no-canvas .map-canvas { min-width: 0; height: auto; }
.map-stage.no-canvas canvas, .map-stage.no-canvas .map-lane-label, .map-stage.no-canvas .map-server-label { display: none; }
.map-stage.no-canvas .map-label-layer { position: static; display: grid; grid-template-columns: repeat(auto-fit,minmax(142px,1fr)); gap: 8px; padding: 12px; }
.map-stage.no-canvas .map-stop { position: static; transform: none; width: auto; background: #fff; border-color: var(--line); }
@media (max-width: 600px) {
  .compact-help .deployment-map-panel { padding: 16px; }
  .deployment-map-header { gap: 10px; }
  .deployment-map-header h2 { font-size: 14px; }
  .map-caption { flex-wrap: wrap; gap: 5px 12px; font-size: 10px; }
}
.help-aside { top: 92px; }
.compact-help { container: help-shell / inline-size; }
.compact-help .help-toolbar { padding: 18px; }
.help-search-row { position: relative; }
.compact-help .help-search { border-radius: 8px; gap: 10px; padding: 0 13px; }
.compact-help .help-search > .icon { width: 19px; height: 19px; flex-shrink: 0; color: #7790ab; }
.compact-help .help-search input { min-width: 0; padding: 13px 30px 13px 0; font-size: 14px; box-shadow: none; }
.compact-help .help-search input::-webkit-search-cancel-button { display: none; }
.help-clear { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; border: 0; border-radius: 6px; background: #f0f4f9; color: #5e7490; font-size: 20px; line-height: 1; }
.help-clear:hover { background: #e5eef9; color: var(--accent); }
.compact-help .area-chips { gap: 6px; margin: 14px 0 0; }
.compact-help .area-chip { min-height: 32px; font-size: 11px; border-radius: 6px; padding: 5px 7px 5px 9px; gap: 6px; }
.compact-help .area-chip span { font-size: 10px; border-radius: 4px; min-width: 19px; padding: 0 4px; }
.help-mobile-filter { display: none; }
.compact-help .help-layout { grid-template-columns: minmax(0,1fr) 300px; gap: 18px; margin-top: 16px; }
.compact-help .help-panel { padding: 18px; min-width: 0; scroll-margin-top: 90px; }
.help-results-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px; }
.help-results-head h2 { font-size: 15px; margin: 0; }
#help-result-count { margin-left: auto; color: var(--muted); font: 11px var(--mono); }
.help-results-head .button { min-height: 30px; padding: 4px 0; font-size: 11px; }
.compact-help .qa { border-radius: 8px; margin-bottom: 8px; scroll-margin-top: 90px; }
.compact-help .qa > summary { display: grid; grid-template-columns: 12px minmax(0,1fr) auto; align-items: start; gap: 8px; padding: 13px 12px; cursor: pointer; }
.compact-help .qa > summary:before { width: 12px; font-size: 18px; line-height: 21px; }
.compact-help .qa-q { min-width: 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.compact-help .qa-area { font-size: 10px; font-weight: 500; padding: 2px 6px; border-radius: 4px; background: #eef4fa; color: #56718e; margin-top: 0; }
.compact-help .qa-body { padding: 2px 16px 14px 32px; }
.compact-help .qa-why, .compact-help .qa-fix { font-size: 13px; line-height: 1.75; }
.compact-help .qa-label { font-size: 12px; }
.help-more { display: flex; justify-content: center; margin-top: 12px; }
.help-more:empty { display: none; }
.help-more .button { min-height: 38px; font-size: 12px; }
.compact-help .help-empty { border-radius: 8px; padding: 18px; }
.help-empty strong { font-size: 14px; }
.compact-help .help-empty p { font-size: 12px; }
.help-empty .button { font-size: 12px; margin-top: 12px; }
.diagnostics { padding: 18px; background: #f6f9fd; border-color: #d9e5f2; }
.diagnostics h2 { font-size: 15px; margin: 0; }
.diagnostic-context { color: var(--muted); font-size: 11px; margin: 8px 0 14px; }
.diagnostic-list { padding: 0; margin: 0; list-style: none; counter-reset: checks; }
.diagnostic-list > li { counter-increment: checks; display: grid; grid-template-columns: 15px minmax(0,1fr) 30px; gap: 8px; padding: 12px 0; border-top: 1px solid #dfe7f1; }
.diagnostic-list > li::before { content: counter(checks,decimal-leading-zero); font: 10px/22px var(--mono); color: #69819b; }
.diagnostic-list details { min-width: 0; }
.diagnostic-list > li > details > summary { font-size: 12px; line-height: 1.7; cursor: pointer; color: var(--ink); list-style: none; }
.diagnostic-list > li > details > summary::-webkit-details-marker { display: none; }
.diagnostic-list > li > details > summary:hover { color: var(--accent); }
.diagnostic-list > li > details > summary::after { content: '+'; margin-left: 6px; font-size: 12px; color: #7790ab; }
.diagnostic-list > li > details[open] > summary::after { content: '−'; }
.diagnostic-list .copy-btn { width: 30px; height: 30px; padding: 6px; align-self: start; border-radius: 6px; }
.diagnostic-list .check-cmd { margin: 8px -38px 6px 0; }
.diagnostic-list .check-cmd code { font-size: 11px; line-height: 1.7; padding: 7px 8px; border-radius: 5px; }
.diagnostic-list small { display: block; font-size: 11px; color: var(--muted); line-height: 1.6; margin-right: -38px; overflow-wrap: anywhere; }
.direct-check { border-top: 1px solid var(--line); padding-top: 12px; font-size: 11px; color: var(--muted); }
.direct-check p { font-size: 12px; line-height: 1.7; }
.direct-check code { overflow-wrap: anywhere; }
.area-chip.on { color: var(--accent); border-color: #a9c9f3; background: var(--accent-soft); }
footer { color: #63768f; border-color: var(--line); font-size: 10px; padding-top: 18px; margin-top: 28px; }
.skip-link { position: fixed; top: -60px; left: 12px; z-index: 100; padding: 12px; background: #fff; color: var(--accent); border: 1px solid var(--accent); border-radius: 6px; }
.skip-link:focus { top: 12px; }
.sidebar-toggle { display: none; }

@media (min-width: 1100px) {
  body { --sidebar-width: 218px; }
  main { margin-left: var(--sidebar-width); margin-right: auto; max-width: 1460px; transition: margin-left .18s ease; }
  .category-tabs { position: fixed; top: 72px; left: 0; bottom: 0; width: var(--sidebar-width); display: flex; flex-direction: column; align-items: stretch; gap: 5px; margin: 0; padding: 28px 14px; border: 0; border-right: 1px solid var(--chrome-line); background: linear-gradient(180deg,#e4edf6,var(--sidebar-surface) 48%,#edf2f7); z-index: 25; overflow-y: auto; transition: width .18s ease; }
  .category-tabs::before { content: "WORKSPACE"; font: 9px var(--mono); letter-spacing: 1.6px; color: #526981; padding: 0 14px 16px; }
  .category-tabs::after { content: "ZUNPACK / STUDIO"; margin-top: auto; padding: 24px 14px 0; font: 9px var(--mono); letter-spacing: 1px; color: #526981; }
  .category-tabs button { width: 100%; justify-content: flex-start; text-align: left; border-radius: 7px; padding: 13px 12px; font-size: 12px; color: var(--nav-ink); }
  .category-tabs button:hover { background: #dfe9f4; color: #243e5d; }
  .category-tabs button.active { background: var(--nav-active-bg); color: var(--nav-active); box-shadow: inset 0 0 0 1px #bdd4ef; }
  .category-tabs button.active:hover { background: #cfe2f8; }
  .category-tabs button.active .category-icon { color: var(--accent); }
  .category-tabs button.active::after { display: block; top: 12px; bottom: 12px; left: 0; right: auto; width: 2px; height: auto; border-radius: 2px; background: var(--accent); }
  .category-tabs button[data-category="help"] { margin-top: 20px; }
  .category-tabs button[data-category="help"]::before { content: ""; position: absolute; top: -13px; left: 8px; right: 8px; height: 1px; background: #c5d4e4; pointer-events: none; }
  .sidebar-toggle { display: grid; place-items: center; position: fixed; top: 88px; left: 170px; width: 32px; height: 32px; padding: 6px; z-index: 26; border: 1px solid #c7d7e7; border-radius: 6px; background: #f7faff; color: #526d8b; transition: left .18s ease, background .15s; }
  .sidebar-toggle:hover { background: #fff; border-color: #abc4df; color: var(--accent); }
  .sidebar-toggle svg { width: 20px; height: 20px; }
  .sidebar-chevron { transform-origin: 14.5px 12px; transition: transform .18s ease; }
  body.sidebar-collapsed { --sidebar-width: 72px; }
  .sidebar-collapsed main { max-width: 1606px; }
  .sidebar-collapsed .category-tabs { padding: 58px 12px 20px; }
  .sidebar-collapsed .category-tabs::before, .sidebar-collapsed .category-tabs::after { display: none; }
  .sidebar-collapsed .category-tabs button { justify-content: center; min-height: 48px; gap: 0; padding: 12px; }
  .sidebar-collapsed .category-tabs .category-icon { flex-shrink: 0; }
  .sidebar-collapsed .tab-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sidebar-collapsed .sidebar-toggle { left: 20px; }
  .sidebar-collapsed .sidebar-chevron { transform: rotate(180deg); }
}
@container (min-width: 940px) {
  .source-panel.analyzed { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 20px 26px; align-items: start; }
  .source-panel.analyzed > .panel-title, .source-panel.analyzed > .drop, .source-panel.analyzed > .progress-card, .source-panel.analyzed > .trim-panel { grid-column: 1 / -1; margin: 0; }
  .analysis-summary { position: sticky; top: 94px; min-width: 0; padding-top: 5px; }
  .analysis-summary .section-label { margin-top: 0; gap: 8px; }
  .analysis-summary .component-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .analysis-summary .component { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 8px 10px; }
  .analysis-summary .service-meta { min-width: 0; }
  .analysis-summary .component .tag { grid-column: 2; justify-self: start; margin: 0; }
  .analysis-summary .service-icon { grid-row: 1 / 3; width: 32px; }
  .analysis-summary .source-details { display: grid; grid-template-columns: 1fr; }
  .analyzed > .quick-package { border-top: 0; border-left: 1px solid var(--line); padding: 0 0 0 26px; margin: 0; min-width: 0; }
  .analyzed .pack-head { margin-bottom: 18px; }
}
@container package (max-width: 540px) {
  .scope-option { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .scope-option > span:not(.scope-check) { grid-column: 1 / -1; grid-row: 2; }
  .scope-option .scope-check { grid-column: 2; grid-row: 1; }
  .export-mode { padding: 10px 8px; }
  .export-mode > .icon { display: none; }
}
@container package (max-width: 300px) {
  .scope-option { padding: 10px 7px; }
  .scope-option strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .scope-option small { font-size: 12px; font-weight: 500; color: var(--ink); }
  .compact-export, .quick-package .compact-export { padding: 12px; }
  .export-format { display: none; }
  .export-actions .button { padding-inline: 10px; }
  .export-actions .export-download { flex-basis: 100%; }
  .export-actions > .ghost { flex: 1; }
}
@media (max-width: 1099px) {
  .category-tabs { position: sticky; top: 72px; z-index: 25; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; overflow: visible; padding: 6px 0; background: #edf2f8; border-bottom-color: #d3dfec; margin-top: 0; }
  .category-tabs button { min-width: 0; min-height: 72px; width: 100%; flex-direction: column; justify-content: center; gap: 6px; padding: 10px 6px; border-radius: 8px; font-size: 12px; line-height: 1.4; text-align: center; white-space: normal; }
  .category-tabs .category-icon { display: flex; align-items: center; justify-content: center; height: 20px; }
  .category-tabs button.active::after { bottom: 0; left: 22%; right: 22%; border-radius: 2px; }
  .category-tabs button:focus-visible { outline-offset: -3px; }
  .setup-summary, .guide-progress, .help-aside { top: 174px; }
  #workspace, .guide-step, .compact-help .help-panel, .compact-help .qa { scroll-margin-top: 174px; }
  .studio-heading { min-height: 156px; }
}
@media (max-width: 850px) {
  .setup-layout, .guide-layout, .nginx-layout { grid-template-columns: 1fr; }
  .setup-summary, .guide-progress { position: static; }
  .home-lower { grid-template-columns: 1fr; }
  .path-grid { grid-template-columns: 1fr; }
  .path-card { padding: 20px; }
  .path-desc { min-height: 0; }
}
@media (max-width: 600px) {
  body > header { height: 64px; padding: 0 16px; gap: 10px; }
  .brand { font-size: 22px; gap: 8px; }
  .brandmark { width: 48px; height: 40px; }
  .header-actions { gap: 7px; }
  .header-actions .button { font-size: 11px; min-height: 35px; padding: 8px 10px; }
  .header-note { display: none; }
  main { padding: 0 16px 16px; }
  .category-tabs { top: 64px; margin: 0 -16px; padding: 5px 8px; gap: 3px; }
  .category-tabs button { min-height: 62px; padding: 8px 2px; gap: 5px; font-size: 11px; }
  .category-tabs .tab-label { display: none; }
  .category-tabs .tab-label-compact { display: block; white-space: nowrap; }
  .studio-heading { min-height: 140px; gap: 8px; padding: 22px 0; overflow: visible; }
  .studio-heading > div:first-child { max-width: 100%; padding-right: 0; }
  .studio-heading h1 { font-size: 27px; letter-spacing: -.8px; line-height: 1.3; }
  #workspace-lead { font-size: 13px; }
  .scene-shell { flex-basis: 96px; height: 116px; }
  #scene { position: relative; width: 100%; height: 100%; inset: auto; opacity: 1; }
  body:not([data-category="home"]) .scene-shell { display: none; }
  .panel { padding: 18px; }
  .source-panel, .source-panel:not(:has(.has-source)) { padding: 18px; }
  .drop { padding: 28px 14px; }
  .drop h3 { font-size: 19px; }
  .has-source { padding: 12px; }
  .has-source h3 { font-size: 15px; }
  .component-list .component { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 8px 10px; }
  .component-list .service-icon { grid-row: 1 / 3; }
  .component-list .tag { grid-column: 2; justify-self: start; margin: 0; }
  .source-foot { flex-wrap: wrap; gap: 12px; }
  .choices { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .choices.list { grid-template-columns: 1fr; }
  .choice { padding: 12px; min-height: 120px; }
  .choice-text { padding-right: 0; }
  .choice-text strong { font-size: 13px; }
  .choice-text small { font-size: 12px; }
  .q-head h2 { font-size: 14px; }
  .q-head p { font-size: 12px; }
  .package-options .choices { grid-template-columns: 1fr; }
  .package-options .choice { min-height: 96px; }
  .nginx-editor, .editor-panel { padding: 0; }
  .entry-bottom { gap: 12px; }
  .nginx-entry { margin-top: 0; }
  .editor-heading { padding: 14px; }
  .home-lower .panel { padding: 20px; }
  .menu-list button { flex-direction: column; align-items: flex-start; gap: 5px; }
  .path-cta { margin-top: 6px; }
  .toasts { bottom: 12px; }
  input, select, textarea { font-size: 16px; }
  .button { min-height: 42px; }
}
@media (max-width: 380px) {
  body > header { padding: 0 12px; gap: 8px; }
  .brand { font-size: 20px; gap: 6px; }
  .brandmark { width: 42px; height: 36px; }
  .header-actions { gap: 4px; }
  .header-actions .button { padding-inline: 8px; }
  .scene-shell { flex-basis: 80px; height: 104px; }
  .studio-heading h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .path-card:hover { transform: none; }
}
@container (max-width: 900px) {
  .setup-layout, .guide-layout, .nginx-layout { grid-template-columns: 1fr; }
  .setup-summary, .guide-progress { position: static; }
  .guide-progress { order: -1; }
}
@container server-form (max-width: 540px) {
  .setup-os { grid-template-columns: 1fr; }
  .setup-os .setup-option-text { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
  .setup-os .setup-option-text small { margin: 0; }
  .setup-option { gap: 7px; padding: 10px; }
  .setup-run .setup-option { flex-wrap: wrap; }
  .setup-run .setup-option-text { flex-basis: calc(100% - 24px); order: 2; }
  .setup-run .scope-check { margin-left: auto; }
}
@container server-form (max-width: 340px) {
  .setup-extras, .setup-stacks, .setup-databases { grid-template-columns: 1fr; }
  .setup-section-head { flex-wrap: wrap; gap: 6px; }
  .server-details .fields { grid-template-columns: 1fr; }
  .setup-disclosure-body { padding: 12px; }
}
@container nginx-entry (max-width: 500px) {
  .fields { grid-template-columns: 1fr; }
}
@container home (max-width: 760px) {
  .compact-home .home-lower { grid-template-columns: 1fr; }
  .home-glossary .glossary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@container help-shell (max-width: 900px) {
  .compact-help .help-layout { grid-template-columns: 1fr; }
  .compact-help .help-aside { position: static; }
}
@container help-shell (max-width: 620px) {
  .compact-help .area-chips { display: none; }
  .help-mobile-filter { display: block; margin-top: 14px; font-size: 11px; color: var(--muted); }
  .help-mobile-filter select { margin-top: 6px; font-size: 16px; }
  .compact-help .qa > summary { grid-template-columns: 12px minmax(0,1fr); gap: 4px 8px; }
  .compact-help .qa-area { grid-column: 2; justify-self: start; margin-top: 3px; }
  .compact-help .qa-body { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 600px) {
  .compact-home .path-card { display: grid; grid-template-columns: 34px minmax(0,1fr) 18px; gap: 5px 12px; padding: 16px; }
  .compact-home .path-top { display: contents; }
  .compact-home .path-icon { grid-row: 1 / 3; }
  .compact-home .path-step { display: none; }
  .compact-home .path-card > strong { grid-column: 2; grid-row: 1; font-size: 15px; }
  .compact-home .path-desc { grid-column: 2; grid-row: 2; font-size: 11px; }
  .compact-home .path-cta { grid-column: 3; grid-row: 1 / 3; font-size: 0; margin: 0; }
  .compact-home .path-cta > .icon { width: 18px; height: 18px; }
  .compact-home .home-lower .panel { padding: 18px; }
  .home-search input { font-size: 16px; }
  .home-glossary > summary { padding: 15px 18px; }
  .home-glossary .glossary { padding-inline: 18px; gap: 0 14px; }
  .compact-help .help-toolbar, .compact-help .help-panel { padding: 16px; }
  .compact-help .help-search input { font-size: 16px; }
  .help-suggestion { min-height: 34px; }
  .diagnostics { padding: 16px; }
  .diagnostic-list > li { grid-template-columns: 15px minmax(0,1fr) 34px; }
  .diagnostic-list .copy-btn { width: 34px; height: 34px; }
  .compact-help .help-panel, .compact-help .qa { scroll-margin-top: 140px; }
}
@container config-editor (max-width: 440px) {
  .editor-heading { flex-wrap: wrap; }
  .editor-heading .config-actions { width: 100%; }
  .config-actions .button { flex: 1; min-height: 42px; }
  #nginx-code { font-size: 16px; min-height: 340px; padding: 14px; }
}
@media (max-width: 600px) {
  .compact-setup .setup-questions { padding: 18px; }
  .mini-steps { width: 100%; }
  .mini-steps button { flex: 1; justify-content: center; font-size: 11px; gap: 6px; padding: 8px 6px; }
  .setup-result { padding: 18px; }
  .nginx-entry { padding: 20px; }
  .nginx-settings { padding: 18px; }
  .guide-step { grid-template-columns: 1fr; padding: 16px; gap: 8px; scroll-margin-top: 140px; }
  .guide-step .step-check { width: 32px; height: 32px; }
  .step-body h3 { margin-top: 0; }
  .step-foot { gap: 8px; }
  .step-foot .button { min-height: 40px; padding: 8px 10px; }
}

/* Explanations stay beside the code, collapsed until requested. */
.code-explanation { min-width: 0; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 12px; text-align: left; }
.code-explanation > summary, .explanation-row > summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; min-height: 42px; padding: 10px 13px; font-size: 12px; line-height: 1.6; font-weight: 500; color: var(--ink-soft); }
.code-explanation > summary::-webkit-details-marker, .explanation-row > summary::-webkit-details-marker { display: none; }
.code-explanation > summary::before, .explanation-row > summary::before { content: ''; width: 6px; height: 6px; flex: 0 0 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; }
.code-explanation[open] > summary::before, .explanation-row[open] > summary::before { transform: rotate(45deg); }
.code-explanation > summary:hover, .explanation-row > summary:hover { color: var(--accent); background: #f6faff; border-radius: 7px; }
.code-explanation[open] > summary { border-bottom: 1px solid var(--line); color: var(--accent); }
.code-explanation .explanation-count { margin-left: auto; padding-left: 8px; color: var(--muted); font-size: 10px; font-weight: 400; white-space: nowrap; }
.explanation-content { min-width: 0; padding: 4px 13px; }
.explanation-row + .explanation-row { border-top: 1px solid #edf1f6; }
.explanation-row > summary { align-items: baseline; padding: 11px 10px; border-radius: 7px; font-weight: 400; }
.explanation-row > summary::before { align-self: flex-start; margin-top: 6px; }
.explanation-line { min-width: 18px; font-size: 10px; font-variant-numeric: tabular-nums; color: #7890aa; text-align: right; user-select: none; }
.code-explanation code { min-width: 0; margin: 0; padding: 0; display: inline; background: transparent; border: 0; color: var(--ink); font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.explanation-row > summary > code { flex: 1; }
.explanation-row-body { padding: 0 0 14px 28px; }
.explanation-single { padding: 12px 14px; }
.explanation-content > .explanation-single { padding: 8px 0 10px; }
.code-explanation .explanation-meaning { margin: 0 0 10px; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.explanation-purpose { flex: 1; min-width: 0; font-size: 12px; line-height: 1.7; }
.code-explanation .explanation-syntax { display: block; margin: 4px 0 12px; padding: 10px 12px; border-radius: 8px; background: var(--control-hover, #f2f6fa); overflow-wrap: anywhere; white-space: pre-wrap; font-size: 11px; line-height: 1.8; }
.explanation-terms { margin: 0; }
.explanation-terms > div { display: grid; grid-template-columns: minmax(80px, 28%) minmax(0,1fr); gap: 8px 16px; padding: 8px 0; border-top: 1px solid #edf1f6; }
.explanation-terms > div:first-child { border-top: 0; padding-top: 0; }
.explanation-terms dt, .explanation-terms dd { min-width: 0; margin: 0; }
.explanation-terms dt code { color: #0058bd; }
.explanation-terms dd { font-size: 12px; line-height: 1.7; color: var(--ink-soft); overflow-wrap: anywhere; }
.explanation-source { display: inline-flex; align-items: center; min-height: 32px; gap: 5px; margin-top: 4px; font-size: 11px; color: var(--accent); text-decoration: none; }
.explanation-source:hover { text-decoration: underline; }
.explanation-empty { margin: 10px 0; font-size: 12px; color: var(--muted); }
.code-block > .code-explanation { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.code-block > .code-explanation > summary { border-radius: 0; background: #f6f9fd; }
.verify + .code-explanation { margin: -1px 0 12px; border-radius: 0 0 8px 8px; }
.nginx-editor > .code-explanation { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.nginx-editor > .code-explanation > summary { padding: 13px 16px; }
.nginx-editor .explanation-content { padding-inline: 16px; }
.nginx-settings .terminology .explanation-terms > div, .setup-summary .explanation-terms > div { grid-template-columns: 1fr; gap: 3px; }
.nginx-settings .install-command { display: block; margin: 10px 0; font-size: 11px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.nginx-settings .explanation-row-body { padding-left: 0; }
.nginx-settings .code-explanation .explanation-terms > div { grid-template-columns: 1fr; gap: 4px; }
.setup-section-head:has(.setup-hint[open]) { flex-wrap: wrap; }
.setup-hint[open] { width: 100%; }
.setup-hint > code { display: inline-block; }
.setup-questions > .terminology { margin-top: 16px; }
@container config-editor (max-width: 440px) {
  .nginx-editor .explanation-terms > div { grid-template-columns: 1fr; gap: 4px; }
  .nginx-editor .explanation-row-body { padding-left: 0; }
}
@media (max-width: 600px) {
  .explanation-terms > div { grid-template-columns: 1fr; gap: 4px; }
  .explanation-row-body { padding-left: 0; }
  .code-explanation > summary, .explanation-row > summary { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .code-explanation > summary::before, .explanation-row > summary::before { transition: none; }
}

/* One focused illustration per term; opening it leaves the page layout intact. */
.term-launch { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-width: 0; min-height: 46px; padding: 11px 10px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); font-family: inherit; font-size: 12px; font-weight: 500; line-height: 1.6; text-align: left; cursor: pointer; }
.term-launch > span { min-width: 0; overflow-wrap: anywhere; }
.term-launch > .icon { width: 15px; height: 15px; flex-shrink: 0; color: #7b91aa; }
.term-launch:hover { color: var(--accent); }
.term-launch:hover > .icon { color: var(--accent); }
.term-menu { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 20px; padding: 0 14px 10px; }
.term-menu > .term-launch { font-size: 12px; }
.nginx-settings .term-menu { grid-template-columns: 1fr; }
.term-dialog { width: min(820px,calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 40px); padding: 0; border: 1px solid #d7e3f0; border-radius: 16px; color: var(--ink); background: #fff; box-shadow: 0 28px 100px #041a3b38; overflow: hidden; }
.term-dialog[open] { display: flex; flex-direction: column; }
.term-dialog::backdrop { background: #06142d72; backdrop-filter: blur(5px); }
html:has(.term-dialog[open]) { overflow: hidden; }
.term-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-shrink: 0; padding: 23px 28px 18px; border-bottom: 1px solid var(--line); }
.term-eyebrow { color: var(--muted); font: 10px/1.5 var(--mono); letter-spacing: 1.7px; }
.term-dialog-head h2 { margin: 5px 0 0; font-size: 25px; line-height: 1.3; font-weight: 600; letter-spacing: -.6px; }
.term-close { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #f8fafc; color: var(--ink-soft); flex-shrink: 0; cursor: pointer; }
.term-close svg { width: 18px; height: 18px; }
.term-close:hover { border-color: #9fbfdf; color: var(--accent); background: var(--accent-soft); }
.term-dialog-body { overflow: auto; overscroll-behavior: contain; min-height: 0; padding: 20px 28px 24px; }
#term-description { margin: 0 0 17px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; max-width: 680px; }
.term-visual { border: 1px solid #dce8f2; border-radius: 12px; background: linear-gradient(180deg,#fbfdff,#f1f7fc); overflow: hidden; }
.term-scene { position: relative; width: 100%; height: 250px; }
.term-scene canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.term-scene[data-ready="true"] canvas { opacity: 1; }
.term-fallback { display: flex; align-items: center; justify-content: space-around; gap: 10px; height: 100%; padding: 40px; color: #4c82b9; }
.term-fallback svg { width: 64px; height: 64px; }
.term-fallback span { color: var(--accent); font-size: 20px; }
.term-scene[data-ready="true"] .term-fallback { visibility: hidden; }
.term-parts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 0 12px; }
.term-parts > button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; min-width: 0; padding: 9px; border: 1px solid transparent; border-radius: 8px; color: #425b78; background: transparent; font-family: inherit; font-size: 12px; font-weight: 500; line-height: 1.5; cursor: pointer; }
.term-parts > button > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.term-part-number { color: #7088a2; font: 10px var(--mono); }
.term-parts > button[aria-pressed="true"] { border-color: #9dc7ed; background: #fff; color: var(--accent); box-shadow: 0 2px 6px #16345406; }
.term-parts > button:hover { background: #fff; color: var(--accent); }
.term-interaction-hint { display: block; padding: 12px 12px 14px; text-align: center; color: #607791; font-size: 10px; }
.term-detail { margin-top: 18px; min-height: 90px; padding-left: 14px; border-left: 2px solid #38b8df; }
.term-detail h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.term-detail p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.75; }
.term-example { display: block; margin-top: 14px; padding: 11px 14px; border: 1px solid #e1e9f1; border-radius: 7px; background: #f8fafc; color: #315b87; font: 11px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.term-example[hidden] { display: none; }
.term-dialog-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-shrink: 0; padding: 12px 28px; border-top: 1px solid var(--line); background: #fbfcfe; }
.term-dialog-foot button { min-height: 40px; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 500; cursor: pointer; }
.term-dialog-foot button:hover:enabled { color: var(--accent); border-color: #97bee5; }
.term-dialog-foot button:disabled { opacity: .4; cursor: default; }
.term-position { color: var(--muted); font: 11px var(--mono); }
@media (max-width: 600px) {
  .term-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: 12px; }
  .term-dialog-head { padding: 17px 16px 14px; gap: 12px; }
  .term-dialog-head h2 { font-size: 22px; }
  .term-dialog-body { padding: 16px; }
  .term-scene { height: 205px; }
  .term-parts { gap: 2px; padding: 0 6px; }
  .term-parts > button { flex-direction: column; gap: 3px; padding: 7px 3px; font-size: 11px; min-height: 64px; }
  .term-detail { min-height: 120px; }
  .term-fallback { padding: 20px; gap: 5px; }
  .term-fallback svg { width: 44px; height: 44px; }
  .term-dialog-foot { padding: 10px 16px; }
  .term-menu { grid-template-columns: 1fr; }
}

/* Shared interaction colors: resting, hover, selected and keyboard focus. */
.button { box-shadow: 0 1px 2px #234d7d14; }
.button:hover:not(:disabled) { box-shadow: 0 2px 4px #234d7d14; }
.button.ghost, .term-dialog-foot button, .term-close { background: var(--control-surface); color: var(--nav-ink); border-color: var(--control-line); }
.button.ghost:hover:not(:disabled), .term-dialog-foot button:hover:enabled, .term-close:hover { background: var(--control-hover); color: var(--selected-ink); border-color: var(--control-hover-line); box-shadow: none; }
.button.subtle { color: var(--selected-ink); background: var(--accent-soft); border-color: var(--control-line); }
.button.subtle:hover:not(:disabled) { color: var(--selected-ink); background: #e8f0f9; border-color: var(--control-hover-line); box-shadow: none; }
.button.link:hover:not(:disabled) { color: var(--accent-hover); background: transparent; border-color: transparent; box-shadow: none; }
.button:not(.ghost):not(.subtle):not(.link):not(.danger):active:not(:disabled) { background: #1d4d86; border-color: #1d4d86; box-shadow: none; }
.button.ghost:active:not(:disabled), .button.subtle:active:not(:disabled), .term-dialog-foot button:active:enabled, .term-close:active { background: var(--control-pressed); border-color: var(--selected-line); box-shadow: none; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
input:focus, select:focus, textarea:focus { border-color: var(--selected-line); outline-color: #527fb422; }
.copy-btn:not(.light):not(.copied):hover { background: #2d4668; border-color: #5c7a9e; }
.copy-btn.light:not(.copied) { color: var(--nav-ink); border-color: var(--control-line); background: var(--control-surface); }
.copy-btn.light:not(.copied):hover { color: var(--selected-ink); border-color: var(--control-hover-line); background: var(--control-hover); }

:is(.mini-steps,.layout-toggle,.lang-switch,.export-modes) { background: var(--sidebar-surface); border-color: var(--chrome-line); }
:is(.mini-steps,.steps,.file-tabs,.layout-toggle,.lang-switch) button { color: var(--nav-ink); transition: background-color .15s, color .15s, box-shadow .15s; }
:is(.mini-steps,.steps,.file-tabs,.layout-toggle,.lang-switch) button:hover:not(:disabled):not(.active) { color: var(--selected-ink); background: var(--control-hover); box-shadow: none; }
:is(.mini-steps,.steps,.file-tabs,.layout-toggle,.lang-switch) button.active { color: var(--selected-ink); background: var(--selected-surface); box-shadow: inset 0 0 0 1px var(--selected-line); }
:is(.mini-steps,.steps,.file-tabs,.layout-toggle,.lang-switch) button.active:hover:not(:disabled) { background: var(--selected-hover); }
:is(.mini-steps,.steps) button.active span { color: #fff; background: var(--accent); border-color: var(--accent); }
:is(.mini-steps,.steps,.file-tabs,.layout-toggle,.lang-switch) button:disabled { box-shadow: none; }
.category-tabs button:hover { color: var(--selected-ink); background: var(--control-hover); }
.category-tabs button.active { color: var(--selected-ink); background: var(--selected-surface); box-shadow: inset 0 0 0 1px var(--selected-line); }
.category-tabs button.active:hover { background: var(--selected-hover); }
.category-tabs button.active::after { background: var(--accent); }

:is(.setup-option,.scope-option,.choice) { border-color: var(--control-line); }
:is(.setup-option,.scope-option,.choice):hover:enabled { background: var(--control-hover); border-color: var(--control-hover-line); box-shadow: none; }
:is(.setup-option,.scope-option,.choice).on { background: var(--selected-surface); border-color: var(--selected-line); box-shadow: inset 0 0 0 1px #b8cfe8; }
:is(.setup-option,.scope-option,.choice).on:hover:enabled { background: var(--selected-hover); border-color: var(--selected-line); }
:is(.setup-option,.scope-option,.choice).on strong { color: var(--selected-ink); }
.setup-option.on .setup-option-icon, .choice.on .choice-icon { color: var(--selected-ink); background: #c9dcf1; }
.scope-option.on .scope-check, .setup-option.on .scope-check { background: var(--accent); border-color: var(--accent); }
.export-mode:hover:not(.on):enabled { background: var(--control-hover); border-color: var(--control-hover-line); color: var(--selected-ink); }
.export-mode.on { background: var(--selected-surface); border-color: var(--selected-line); color: var(--selected-ink); box-shadow: 0 1px 3px #234d7d0c; }
.export-mode.on:hover:enabled { background: var(--selected-hover); }
.area-chip:hover { color: var(--selected-ink); background: var(--control-hover); border-color: var(--control-hover-line); }
.area-chip.on { color: var(--selected-ink); background: var(--selected-surface); border-color: var(--selected-line); }
.area-chip.on:hover { background: var(--selected-hover); }
.area-chip.on span { color: var(--selected-ink); background: #c6d9ed; }

.path-card:hover { transform: none; background: var(--control-surface); border-color: var(--control-hover-line); box-shadow: 0 4px 12px #234d7d0d; }
.path-card:first-child .path-icon { color: var(--selected-ink); background: var(--selected-surface); }
.help-suggestion:hover { color: var(--selected-ink); background: var(--control-hover); border-color: var(--control-hover-line); }
.home-shortcut:hover, .term-launch:hover { color: var(--selected-ink); background: transparent; border-color: var(--line); }
.term-launch:hover > .icon { color: var(--selected-ink); }
.code-explanation > summary, .explanation-row > summary { transition: background-color .15s, color .15s; }
.code-explanation > summary:hover, .explanation-row > summary:hover { color: var(--selected-ink); background: var(--row-hover); }
.code-explanation[open] > summary { color: var(--selected-ink); background: var(--accent-soft); border-bottom-color: var(--chrome-line); }
.explanation-row[open] > summary { color: var(--selected-ink); background: var(--accent-soft); }
.home-glossary > summary:hover, .setup-disclosure > summary:hover, .package-settings > summary:hover { color: var(--selected-ink); background: transparent; }

/* Row feedback is inset from its separator, with padding reserved in every state. */
:is(.home-shortcut,.term-launch,.home-glossary > summary,.setup-disclosure > summary,.package-settings > summary) {
  position: relative;
  isolation: isolate;
  transition: color .15s;
}
:is(.home-shortcut,.term-launch,.home-glossary > summary,.setup-disclosure > summary,.package-settings > summary)::before {
  content: "";
  position: absolute;
  inset: 4px 0;
  z-index: -1;
  border-radius: 8px;
  background: var(--row-hover);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s, background-color .15s;
}
:is(.home-glossary,.setup-disclosure,.package-settings) > summary::before { inset: 5px 6px; }
@media (hover: hover) and (pointer: fine) {
  :is(.home-shortcut,.term-launch,.home-glossary > summary,.setup-disclosure > summary,.package-settings > summary):hover::before { opacity: 1; }
}
:is(.home-shortcut,.term-launch,.home-glossary > summary,.setup-disclosure > summary,.package-settings > summary):active::before { opacity: 1; background: var(--row-pressed); }
:is(.home-shortcut,.term-launch,.home-glossary > summary,.setup-disclosure > summary,.package-settings > summary):focus-visible { outline: none; }
:is(.home-shortcut,.term-launch,.home-glossary > summary,.setup-disclosure > summary,.package-settings > summary):focus-visible::before { opacity: 1; outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.home-shortcut > .icon, .term-launch > .icon { transition: color .15s; }
.home-shortcut:hover > .icon:last-child { color: var(--selected-ink); }
.step-index a { padding: 8px 10px; transition: background-color .15s, color .15s; }
.step-index a:hover { color: var(--selected-ink); background: var(--row-hover); }

.term-dialog { border-color: var(--chrome-line); box-shadow: 0 24px 80px #203d6133; }
.term-dialog::backdrop { background: #243e5b66; }
.term-dialog-head { background: linear-gradient(110deg,#dfeaf5,var(--header-surface),#edf3f9); border-bottom-color: var(--chrome-line); }
.term-dialog-foot { background: var(--sidebar-surface); border-top-color: var(--chrome-line); }
.term-visual, .map-viewport { background: linear-gradient(180deg,#f8fbff,#eaf1f8); border-color: var(--chrome-line); }
.term-parts > button { color: var(--nav-ink); transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
.term-parts > button:hover { color: var(--selected-ink); background: var(--control-hover); border-color: var(--control-hover-line); }
.term-parts > button[aria-pressed="true"] { color: var(--selected-ink); background: var(--selected-surface); border-color: var(--selected-line); box-shadow: inset 0 -2px 0 #729bc8, 0 2px 5px #234d7d0a; }
.term-parts > button[aria-pressed="true"]:hover { background: var(--selected-hover); }
.term-part-number { color: var(--muted); }
.term-parts > button[aria-pressed="true"] .term-part-number { color: var(--selected-ink); }
.term-detail { border-left-color: #729bc8; }
.term-detail h3 { color: var(--selected-ink); }
.term-example { color: var(--nav-ink); background: var(--accent-soft); border-color: var(--chrome-line); }
.explanation-terms dt code, .tag.blue, .chip.blue { color: var(--selected-ink); }
.map-stop:not(.map-stop-static):hover { background: var(--control-hover); border-color: var(--control-hover-line); }
.map-stop.on { color: var(--selected-ink); background: var(--selected-surface); border-color: var(--selected-line); box-shadow: inset 0 -2px 0 #729bc8, 0 2px 6px #234d7d0d; }
.map-stop.on:hover { background: var(--selected-hover); }
.map-stop:focus-visible { outline-color: var(--focus-ring); }
@media (max-width: 1099px) {
  .category-tabs button.active { border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .term-launch, .term-parts > button, :is(.mini-steps,.steps,.file-tabs,.layout-toggle,.lang-switch) button { transition: none; }
}

/* Let forms shrink with their workspace; only code and the map scroll sideways. */
.panel, .fields > *, .setup-layout > *, .guide-layout > *, .nginx-layout > * { min-width: 0; }
.category-tabs .tab-label { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  body > header { gap: 8px; }
  .header-actions { gap: 6px; }
  #demo { width: 38px; height: 38px; min-height: 38px; padding: 0; flex-shrink: 0; }
  #demo > span { display: none; }
  #demo > .icon { width: 18px; height: 18px; }
  .lang-switch button { min-height: 32px; min-width: 32px; }
  .studio-heading { margin-bottom: 0; }
  #workspace, .guide-step, .compact-help .help-panel, .compact-help .qa { scroll-margin-top: 152px; }
  #workspace input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), #workspace select, #workspace textarea { font-size: 16px; }
  .mini-steps button { min-width: 0; white-space: normal; text-align: center; line-height: 1.5; }
  .mini-steps button > span { flex-shrink: 0; }
  .panel-title, .pack-head, .config-editor-meta { flex-wrap: wrap; gap: 8px; }
  .drop .button { white-space: normal; }
  .nginx-deploy-actions .button, .step-foot .button { white-space: normal; text-align: center; }
}
@media (max-width: 380px) {
  .header-actions { gap: 4px; }
  .brand { font-size: 19px; }
  .brandmark { width: 38px; height: 34px; }
  main { padding-inline: 12px; }
  .category-tabs { margin-inline: -12px; padding-inline: 5px; gap: 2px; }
  .category-tabs button { font-size: 10px; }
  .studio-heading h1 { font-size: 24px; }
  .scope-options, .export-modes, .deployment-access, .deployment-targets { min-width: 0; }
  .port-fields { gap: 8px; }
}

/* Small, finite responses; navigation geometry never animates on selection. */
.category-tabs button { transition: background-color .18s, color .18s, box-shadow .18s; }
.button { transition: background-color .16s, border-color .16s, box-shadow .16s, transform .16s var(--ease-out); }
.button:active:not(:disabled) { transform: scale(.98); }
.home-shortcut > .icon:last-child, .term-launch > .icon, .path-cta > .icon {
  transition: color .16s, transform .2s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .home-shortcut:hover > .icon:last-child, .term-launch:hover > .icon, .path-card:hover .path-cta > .icon { transform: translateX(2px); }
}
.home-glossary > summary::after, .setup-disclosure > summary::after, .package-settings > summary::after, .nginx-deploy-step > summary::after {
  transition: transform .2s var(--ease-out);
}
.term-dialog[open] { animation: term-arrive .24s var(--ease-out); }
.term-dialog[open]::backdrop, .confirm-dialog[open]::backdrop { animation: backdrop-arrive .18s ease-out; }
.copy-btn .icon { transition: transform .18s var(--ease-out); }
.copy-btn.copied .icon { transform: scale(.9); }
@keyframes term-arrive {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes backdrop-arrive {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .button:active:not(:disabled), .home-shortcut:hover > .icon:last-child, .term-launch:hover > .icon, .path-card:hover .path-cta > .icon { transform: none; }
  .term-dialog[open], .term-dialog[open]::backdrop, .confirm-dialog[open]::backdrop { animation: none; }
}
