/* Shared design for every Elviont app support and privacy page, in every language. */
:root {
  color-scheme: light;
  --ink: #132034;
  --muted: #566271;
  --accent: #075dce;
  --accent-hover: #084ca4;
  --accent-soft: #e4eefb;
  --line: #dce3ea;
  --soft: #f8f9fb;
  --measure: 740px;
  --wordmark-height: 30px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f5f5f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

/* Per-app accent colours and optical logo heights. */
[data-app="alealens"] { --ink: #132034; --accent: #08745e; --accent-hover: #055b4a; --accent-soft: #dcf1ec; --line: #dce8e5; --wordmark-height: 30px; }
[data-app="atlasconnect"] { --ink: #132034; --accent: #075dce; --accent-hover: #084ca4; --accent-soft: #e2edfb; --line: #dce5ef; --wordmark-height: 30px; }
[data-app="betintel"] { --ink: #121a33; --muted: #5b6274; --accent: #5443d4; --accent-hover: #4334b8; --accent-soft: #ebe8fc; --line: #e1e0ee; --wordmark-height: 31px; }
[data-app="stampit"] { --ink: #10213a; --muted: #4e617a; --accent: #0862b8; --accent-hover: #084d8e; --accent-soft: #e1edf9; --line: #dce7f3; --wordmark-height: 40px; }
[data-app="unipilot"] { --ink: #071e48; --muted: #586473; --accent: #0055e8; --accent-hover: #0044bb; --accent-soft: #e0eafd; --line: #e1e5ea; --wordmark-height: 40px; }

* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.7; }
[hidden] { display: none !important; }
::selection { color: var(--ink); background: var(--accent-soft); }
html { scroll-padding-top: 28px; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
a, button, input, summary { -webkit-tap-highlight-color: var(--accent-soft); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 3px; }
.skip-link { position: absolute; top: -100px; left: 24px; z-index: 5; background: #fff; padding: 12px 20px; }
.skip-link:focus { top: 12px; }
.container { max-width: 1180px; margin-inline: auto; padding-inline: 32px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 94px; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.wordmark img { display: block; width: auto; height: var(--wordmark-height); }
.header-tools { display: flex; align-items: center; gap: 28px; }
.header-nav { display: flex; align-items: center; gap: 28px; }
.header-nav a { color: var(--muted); text-decoration: none; padding-block: 12px; }
.header-nav a:hover, .header-nav a[aria-current] { color: var(--accent); }
.header-nav a[aria-current] { font-weight: 650; }
.languages { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.languages a { padding: 3px 12px; border-radius: 999px; font-size: .82rem; line-height: 1.6; color: var(--muted); text-decoration: none; white-space: nowrap; }
.languages a:hover { color: var(--accent); }
.languages a[aria-current] { background: var(--accent); color: #fff; font-weight: 600; }

/* Page heading */
.page-heading { padding-top: 54px; padding-bottom: 38px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.025em; text-wrap: balance; }
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3 { letter-spacing: 0; }
h1 { font-size: clamp(2.35rem, 5vw, 3.3rem); margin: 0 0 20px; font-weight: 730; }
.lede { max-width: 680px; color: var(--muted); font-size: 1.13rem; margin: 0; }
.updated { color: var(--muted); font-size: .88rem; margin: 24px 0 0; font-variant-numeric: tabular-nums; }

/* Layout */
.document-layout { display: grid; grid-template-columns: 230px minmax(0, var(--measure)); gap: 64px; padding-bottom: 80px; }
.toc { align-self: start; position: sticky; top: 28px; font-size: .92rem; }
.toc h2 { font-size: .93rem; letter-spacing: 0; margin: 0 0 16px; }
.toc ul { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 1px solid var(--line); }
.toc li + li { margin-top: 4px; }
.toc a { display: inline-block; color: var(--muted); padding: 5px 0; text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.article { min-width: 0; }
.article h2 { margin: 0 0 20px; font-size: 1.5rem; }
.article h3 { margin: 26px 0 12px; font-size: 1.08rem; }
.article p { margin: 0 0 16px; }
.article p:last-child { margin-bottom: 0; }
.article ul, .article ol { padding-left: 24px; margin: 12px 0 20px; }
.article li + li { margin-top: 8px; }
.policy-section + .policy-section, .policy-section + .contact-section { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line); }
.data-list { margin: 20px 0; }
.data-list > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 24px; padding: 18px 0; border-top: 1px solid var(--line); }
.data-list > div:last-child { border-bottom: 1px solid var(--line); }
.data-list dt { font-weight: 650; }
.data-list dd { margin: 0; color: var(--muted); }

/* Support search */
.search { max-width: 670px; margin-top: 30px; }
.search label { display: block; font-weight: 650; margin-bottom: 8px; font-size: .94rem; }
.search-control { position: relative; }
.search input { width: 100%; min-height: 58px; padding: 14px 80px 14px 18px; font: inherit; color: var(--ink); border: 1px solid #a3adb9; border-radius: 6px; background: #fff; caret-color: var(--accent); }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search input::-webkit-search-cancel-button { display: none; }
.clear-search { position: absolute; inset-inline-end: 10px; top: 8px; min-height: 42px; padding: 8px; border: 0; background: var(--soft); color: var(--accent); font: inherit; font-size: .88rem; border-radius: 4px; cursor: pointer; }
.clear-search:hover { background: var(--accent-soft); }
.search-status { min-height: 24px; margin: 6px 0 0; color: var(--muted); font-size: .86rem; }
.contact-strip { display: flex; gap: 10px 20px; flex-wrap: wrap; margin: 0 0 40px; padding: 20px 0; border-block: 1px solid var(--line); }

/* Support answers */
.help-section { margin-bottom: 40px; }
.help-section h2 { margin-bottom: 16px; }
.faq { border-top: 1px solid var(--line); scroll-margin-top: 28px; }
.faq:last-child { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; display: block; list-style: none; cursor: pointer; font-weight: 620; padding: 18px 38px 18px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 6px; top: 31px; width: 12px; height: 1.5px; background: currentColor; }
.faq summary::after { transform: rotate(90deg); transition: transform .2s; }
.faq[open] summary::after { transform: rotate(0); }
.faq summary:hover, .faq[open] summary { color: var(--accent); }
.answer { color: var(--muted); padding: 0 28px 22px 0; }
.answer strong { color: var(--ink); }

/* Contact */
.contact-section { border-top: 1px solid var(--line); padding-top: 30px; }
.button { display: inline-block; padding: 11px 20px; margin: 6px 0 16px; border-radius: 6px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; }
.button:hover { background: var(--accent-hover); color: #fff; }
.small { color: var(--muted); font-size: .9rem; }
.email { overflow-wrap: anywhere; }
.empty-state { padding: 24px 0 36px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--soft); padding: 28px 0; font-size: .86rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.footer-links a { color: var(--muted); }

@media (max-width: 960px) {
  .document-layout { grid-template-columns: 185px minmax(0, 1fr); gap: 36px; }
  .header-tools { gap: 20px; }
  .header-nav { gap: 20px; }
}
/* Language labels: full names on wide screens, short codes on phones. */
.lang-short { display: none; }
.toc a.is-active { color: var(--accent); font-weight: 620; }

@media (max-width: 760px) {
  html { scroll-padding-top: 72px; }
  .container { padding-inline: 20px; }
  /* Header: logo and languages on one row, page tabs underneath. */
  .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "logo lang" "nav nav"; align-items: center; gap: 0 12px; min-height: 0; padding-top: 16px; }
  .wordmark { grid-area: logo; }
  .wordmark img { height: calc(var(--wordmark-height) * .82); }
  .header-tools { display: contents; }
  .languages { grid-area: lang; }
  .languages a { padding: 3px 10px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .header-nav { grid-area: nav; gap: 24px; margin-top: 6px; font-size: .95rem; }
  .header-nav a { position: relative; padding: 10px 0 12px; }
  .header-nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
  .page-heading { padding-top: 34px; padding-bottom: 22px; }
  .search-status { min-height: 20px; margin-top: 4px; }
  h1 { margin-bottom: 14px; }
  .lede { font-size: 1.06rem; }
  .search { margin-top: 24px; }
  .search input { min-height: 52px; padding-left: 14px; }
  .clear-search { top: 5px; }
  .contact-strip { margin-bottom: 0; padding: 16px 0; font-size: .95rem; }
  /* Topics: one swipeable row of pills, pinned while reading. */
  .document-layout { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-bottom: 54px; }
  .toc { position: sticky; top: 0; z-index: 4; margin-inline: -20px; padding: 10px 0; background: rgba(245, 245, 245, .97); border-bottom: 1px solid var(--line); }
  .toc h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .toc ul { display: flex; flex-wrap: nowrap; gap: 8px; margin: 0; padding: 0 20px; border: 0; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 20px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 28px), transparent); }
  .toc ul::-webkit-scrollbar { display: none; }
  .toc li { flex: none; scroll-snap-align: start; }
  .toc li + li { margin-top: 0; }
  .toc a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .88rem; white-space: nowrap; }
  .toc a:hover { text-decoration: none; }
  .toc a.is-active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
  /* Reading */
  .article h2 { font-size: 1.4rem; }
  .help-section { margin-bottom: 32px; }
  .faq summary { padding: 16px 34px 16px 0; }
  .faq summary::before, .faq summary::after { top: 29px; }
  .answer { padding-right: 0; }
  .policy-section + .policy-section, .policy-section + .contact-section { margin-top: 30px; padding-top: 26px; }
  .data-list > div { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 16px 0; }
  /* Contact and footer: comfortable tap targets. */
  .contact-section .button { display: block; text-align: center; padding: 14px 20px; }
  .site-footer { padding: 22px 0 30px; }
  .footer-inner { flex-direction: column; gap: 6px; }
  .footer-links { gap: 0 22px; }
  .footer-links a { display: inline-flex; align-items: center; min-height: 40px; }
}
@media (max-width: 360px) {
  .header-nav { gap: 18px; }
  .languages a { padding: 3px 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  .faq[open] .answer { animation: reveal-answer 150ms ease-out; }
  @keyframes reveal-answer { from { clip-path: inset(0 0 12% 0); } to { clip-path: inset(0); } }
}
@media print {
  .site-header, .site-footer, .toc, .search, .contact-strip, .skip-link { display: none; }
  .container { max-width: none; padding: 0; }
  .document-layout { display: block; }
  .page-heading { padding-top: 0; }
  a { color: inherit; }
  h2, h3 { break-after: avoid; }
}
