/* Shared information pages: the same neutral surfaces and indigo accent as SimTab. */
:root {
  color-scheme: light;
  --bg-body: #f8f9fa;
  --bg-card: #fff;
  --bg-subtle: #f1f3f5;
  --bg-nav: rgba(248, 249, 250, .9);
  --border-color: rgba(17, 24, 39, .1);
  --text-primary: #111827;
  --text-secondary: #596170;
  --text-tertiary: #667080;
  --text-link: #4f46e5;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-subtle: rgba(99, 102, 241, .07);
  --popover-bg: #fff;
  --shadow-popover: 0 12px 32px rgba(0, 0, 0, .14);
  --control-hover-bg: #e9ecef;
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg-body: #121214;
    --bg-card: #1e1e20;
    --bg-subtle: #28282b;
    --bg-nav: rgba(18, 18, 20, .92);
    --border-color: rgba(255, 255, 255, .12);
    --text-primary: #f3f3f5;
    --text-secondary: #b0b0ba;
    --text-tertiary: #a1a1ad;
    --text-link: #a5a7ff;
    --accent-subtle: rgba(129, 140, 248, .1);
    --popover-bg: #222224;
    --shadow-popover: 0 12px 32px rgba(0, 0, 0, .5);
    --control-hover-bg: #343438;
  }
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg-body: #121214;
  --bg-card: #1e1e20;
  --bg-subtle: #28282b;
  --bg-nav: rgba(18, 18, 20, .92);
  --border-color: rgba(255, 255, 255, .12);
  --text-primary: #f3f3f5;
  --text-secondary: #b0b0ba;
  --text-tertiary: #a1a1ad;
  --text-link: #a5a7ff;
  --accent-subtle: rgba(129, 140, 248, .1);
  --popover-bg: #222224;
  --shadow-popover: 0 12px 32px rgba(0, 0, 0, .5);
  --control-hover-bg: #343438;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; -webkit-font-smoothing: antialiased; }
body { margin: 0; background: var(--bg-body); color: var(--text-primary); font: 15px/1.85 var(--font-family); }
a { color: var(--text-link); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
button { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--text-link); outline-offset: 4px; border-radius: 5px; }
::selection { background: var(--accent-subtle); color: var(--text-link); }
p, h1, h2, h3 { margin: 0; }
p + p { margin-top: 14px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 10px 18px; background: var(--bg-card); border: 1px solid var(--border-color); }
.skip-link:focus { top: 12px; }
.site-top-bar { position: sticky; top: 0; z-index: 20; background: var(--bg-nav); border-bottom: 1px solid var(--border-color); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.top-bar-inner { max-width: 1120px; margin: auto; padding: 10px 32px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; color: var(--text-primary); font-size: 17px; font-weight: 650; letter-spacing: -.5px; min-height: 44px; }
.brand-link:hover { text-decoration: none; }
.brand-link img { border-radius: 8px; }
.top-bar-actions { display: flex; align-items: center; gap: 24px; }
.top-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text-secondary); font-size: 13px; }
.open-app { color: var(--text-primary); }
.theme-toggle-btn { width: 44px; height: 44px; display: inline-flex; justify-content: center; align-items: center; border: 1px solid var(--border-color); border-radius: 50%; background: var(--bg-card); color: var(--text-secondary); cursor: pointer; }
.theme-toggle-btn:hover { background: var(--bg-subtle); color: var(--text-primary); }
main { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.doc-hero { padding: 72px 0 38px; }
.eyebrow { color: var(--text-link); font-size: 11px; letter-spacing: .13em; font-weight: 650; margin-bottom: 18px; }
h1 { font-size: clamp(34px, 4vw, 48px); line-height: 1.3; letter-spacing: -.045em; font-weight: 650; text-wrap: balance; }
.doc-lead { margin-top: 20px; color: var(--text-secondary); font-size: 17px; line-height: 1.85; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; margin-top: 24px; color: var(--text-tertiary); font-size: 12px; }
.doc-meta > span + span::before { content: ""; display: inline-block; height: 10px; border-left: 1px solid var(--border-color); margin: 0 16px; }
.privacy-overview { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 18px; overflow: hidden; }
.privacy-overview > div { padding: 24px 28px; }
.privacy-overview > div + div { border-left: 1px solid var(--border-color); }
.overview-index { color: var(--text-link); font: 11px/1 var(--font-mono); }
.privacy-overview h2 { margin: 10px 0 6px; font-size: 16px; font-weight: 600; }
.privacy-overview p { color: var(--text-secondary); font-size: 13px; line-height: 1.8; max-width: 230px; }
.doc-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 60px; align-items: start; padding-top: 52px; }
.doc-sidebar { position: sticky; top: 100px; }
.sidebar-label { font-size: 11px; color: var(--text-tertiary); letter-spacing: .08em; font-weight: 600; margin: 0 0 14px; }
.doc-toc { display: flex; flex-direction: column; gap: 3px; border-left: 1px solid var(--border-color); }
.toc-link { color: var(--text-secondary); font-size: 13px; min-height: 44px; display: flex; align-items: center; padding: 8px 14px; border-left: 2px solid transparent; margin-left: -1px; }
.toc-link:hover, .toc-link.active { background: var(--accent-subtle); color: var(--text-link); text-decoration: none; border-left-color: var(--text-link); }
.doc-body { min-width: 0; }
.doc-section { padding-bottom: 32px; }
.doc-section + .doc-section { border-top: 1px solid var(--border-color); padding-top: 30px; }
.doc-section h2 { font-size: 19px; font-weight: 600; line-height: 1.6; margin-bottom: 18px; letter-spacing: -.02em; }
.section-number { font: 11px var(--font-mono); color: var(--text-tertiary); margin-right: 12px; vertical-align: middle; }
.doc-body p, .doc-body li { color: var(--text-secondary); overflow-wrap: anywhere; }
.doc-body strong { color: var(--text-primary); font-weight: 600; }
code { font: .85em/1.6 var(--font-mono); background: var(--bg-subtle); border-radius: 5px; padding: 3px 6px; color: var(--text-primary); overflow-wrap: anywhere; }
.styled-list { padding-left: 20px; margin: 0 0 16px; }
.styled-list li { padding-left: 4px; margin-bottom: 14px; }
.styled-list li::marker { color: var(--text-tertiary); font-size: .8em; }
.download-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; border: 1px solid var(--border-color); border-radius: 18px; background: var(--bg-card); box-shadow: 0 8px 32px -20px rgba(17,24,39,.14); }
.download-identity { display: flex; align-items: center; gap: 18px; }
.download-identity img { border-radius: 14px; }
.download-identity h2 { font-size: 18px; font-weight: 600; }
.download-identity p { color: var(--text-secondary); font-size: 13px; margin-top: 4px; }
.download-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; flex-shrink: 0; }
.button { flex-shrink: 0; min-height: 48px; display: inline-flex; justify-content: center; align-items: center; gap: 10px; padding: 10px 22px; color: #fff; background: var(--accent-hover); border-radius: 10px; font-size: 14px; font-weight: 600; transition: background .15s, border-color .15s, color .15s; }
.button:hover { background: #4338ca; color: #fff; text-decoration: none; }
.button.secondary { background: var(--bg-subtle); color: var(--text-primary); border: 1px solid var(--border-color); }
.button.secondary:hover { background: var(--accent-subtle); color: var(--text-link); border-color: var(--text-link); }
.install-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 64px; align-items: start; margin-top: 52px; }
.steps-list { list-style: none; counter-reset: steps; margin: 28px 0 0; padding: 0; }
.steps-list > li { position: relative; padding: 0 0 30px 48px; counter-increment: steps; }
.steps-list > li::before { content: counter(steps, decimal-leading-zero); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 30px; height: 30px; background: var(--accent-subtle); color: var(--text-link); border-radius: 9px; font: 12px var(--font-mono); }
.steps-list > li + li { padding-top: 24px; border-top: 1px solid var(--border-color); }
.steps-list > li + li::before { top: 25px; }
h3 { color: var(--text-primary); font-size: 16px; line-height: 2; font-weight: 600; margin-bottom: 8px; }
.browser-addresses { display: grid; gap: 12px; margin: 18px 0 12px; }
.browser-address > span { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 5px; }
.code-pill { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: var(--bg-subtle); padding: 4px 4px 4px 12px; border: 1px solid var(--border-color); border-radius: 10px; }
.code-pill code { background: none; padding: 0; font-size: 12px; }
.btn-copy { flex-shrink: 0; min-height: 44px; min-width: 52px; padding: 6px 10px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border-color); border-radius: 7px; font-size: 12px; cursor: pointer; }
.btn-copy:hover, .btn-copy.copied { color: var(--text-link); border-color: var(--text-link); }
.small-note { font-size: 12px; }
.install-notes { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 24px; }
.install-notes section + section { border-top: 1px solid var(--border-color); margin-top: 24px; padding-top: 24px; }
.install-notes h2 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.install-notes p { font-size: 13px; color: var(--text-secondary); }
.install-notes .sidebar-label { color: var(--text-link); font-size: 11px; }
.text-link { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; font-size: 13px; margin-top: 8px; }
.doc-footer { border-top: 1px solid var(--border-color); margin-top: 30px; padding: 24px 0 36px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 12px; }
.footer-brand { font-weight: 600; }
.footer-brand span { font-weight: 400; color: var(--text-tertiary); margin-left: 6px; }
.doc-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.doc-footer a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; color: var(--text-secondary); }
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 174px minmax(0, 1fr); gap: 32px; }
  .install-layout { grid-template-columns: minmax(0, 1fr) 248px; gap: 32px; }
  .privacy-overview > div { padding: 20px; }
  .download-panel { padding: 24px; }
}
@media (max-width: 700px) {
  main { padding: 0 20px; }
  .top-bar-inner { padding: 8px 16px; gap: 8px; }
  .top-bar-actions { gap: 12px; }
  .top-link { font-size: 12px; }
  .brand-link { font-size: 16px; gap: 8px; }
  .brand-link img { width: 24px; height: 24px; }
  .doc-hero { padding: 44px 0 28px; }
  h1 { font-size: 34px; }
  .doc-lead { font-size: 15px; margin-top: 16px; }
  .desktop-break { display: none; }
  .doc-meta { font-size: 11px; margin-top: 20px; }
  .doc-meta > span + span::before { margin: 0 10px; }
  .privacy-overview { grid-template-columns: 1fr; border-radius: 14px; }
  .privacy-overview > div { padding: 18px 20px; display: grid; grid-template-columns: 24px 1fr; gap: 4px 12px; }
  .privacy-overview > div + div { border-left: 0; border-top: 1px solid var(--border-color); }
  .overview-index { align-self: center; }
  .privacy-overview h2 { margin: 0; font-size: 15px; }
  .privacy-overview p { grid-column: 2; max-width: none; }
  .doc-layout, .install-layout { display: block; padding-top: 32px; }
  .doc-sidebar { position: static; margin-bottom: 32px; }
  .doc-toc { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border-color); border-radius: 12px; padding: 8px; background: var(--bg-card); }
  .toc-link { font-size: 12px; padding: 8px; margin: 0; border: 0; border-radius: 6px; }
  .doc-section h2 { font-size: 18px; }
  .doc-section { padding-bottom: 26px; }
  .doc-body p, .doc-body li { font-size: 14px; }
  .download-panel { display: block; padding: 20px; }
  .download-identity { gap: 14px; }
  .download-identity img { width: 44px; height: 44px; border-radius: 11px; }
  .download-identity h2 { font-size: 16px; }
  .download-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
  .download-panel .button { display: flex; width: 100%; }
  .install-layout { margin-top: 0; }
  .steps-list > li { padding-left: 42px; }
  .install-notes { padding: 20px; }
  .doc-footer { margin-top: 36px; gap: 8px; }
  .doc-footer nav { gap: 0 18px; }
}
.hidden, [hidden] { display: none !important; }

/* Language names stay in their own scripts so the selector is always recognizable. */
.info-language {
  max-width: 140px;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: 10px;
}

.custom-select-container {
  position: relative;
  display: inline-block;
  width: auto;
}
.custom-select-trigger-global {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  padding: 0 12px;
  height: 36px;
  min-height: 36px;
  background: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  user-select: none;
  transition: background 120ms cubic-bezier(0.16, 1, 0.3, 1), border-color 120ms cubic-bezier(0.16, 1, 0.3, 1);
}
.custom-select-container:not(.open) .custom-select-trigger-global:hover:not(:disabled) {
  background: var(--control-hover-bg);
}
.custom-select-trigger-global:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.custom-select-trigger-global:focus {
  outline: none;
}
.custom-select-trigger-global:focus-visible {
  outline: 2px solid var(--text-link);
  outline-offset: 2px;
  border-radius: 10px;
}
.custom-select-trigger-global .selected-content {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.custom-select-trigger-global .selected-content span,
.custom-option-global span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-select-trigger-global > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  stroke-width: 1.65;
  transition: transform 340ms cubic-bezier(0.22, 1, 0.36, 1);
}
.custom-select-container.open .custom-select-trigger-global > svg {
  transform: rotate(180deg);
}
.custom-select-options-global {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  min-width: max(100%, 136px);
  background: var(--popover-bg);
  border-radius: 10px;
  box-shadow: var(--shadow-popover);
  border: 1px solid transparent;
  z-index: 1001;
  padding: 4px;
  display: block;
  min-height: 0;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transform-origin: top center;
  overflow: hidden;
  animation: select-menu-in 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes select-menu-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
.custom-select-options-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  max-height: 212px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.custom-option-global {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.4;
  min-height: 30px;
  text-align: left;
  cursor: pointer;
  transition: background 120ms cubic-bezier(0.16, 1, 0.3, 1), color 120ms cubic-bezier(0.16, 1, 0.3, 1);
}
.custom-option-global:not(.active):hover {
  background: var(--bg-subtle);
}
.custom-option-global:focus,
.custom-option-global:focus-visible {
  outline: none;
  box-shadow: none;
}
.custom-option-global:focus-visible {
  background: var(--bg-subtle);
}
.custom-option-global.active {
  background: var(--accent-subtle);
  color: var(--text-link);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .custom-select-options-global { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-top-bar { background: var(--bg-body); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --text-secondary: var(--text-primary); --text-tertiary: var(--text-primary); --border-color: currentColor; }
  .custom-select-trigger-global, .custom-select-options-global { border-color: currentColor; }
}

@media (max-width: 720px) {
  .top-bar-inner { padding-inline: 16px; gap: 8px; flex-wrap: wrap; }
  .top-bar-actions { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 44px; width: 100%; gap: 8px; }
  .top-bar-actions .top-link { min-width: 0; font-size: 12px; line-height: 1.4; }
  .info-language,
  .top-bar-actions .custom-select-container { max-width: 112px; }
}
