/* Browser AI website — design tokens */
/* Colors use light-dark(): follows the OS by default; html[data-theme] forces light or dark. */
:root {
  color-scheme: light dark;
  --c-primary: light-dark(#0b57d0, #a8c7fa);
  --c-primary-hover: light-dark(#0842a0, #d3e3fd);
  --c-primary-soft: light-dark(#e8f0fe, #1f2d45);
  --c-accent: light-dark(#7c3aed, #c4b5fd);
  --c-bg: light-dark(#ffffff, #131314);
  --c-bg-tint: light-dark(#f6f8fc, #1b1c1e);
  --c-surface: light-dark(#ffffff, #1e1f20);
  --c-text: light-dark(#1f1f1f, #e3e3e3);
  --c-muted: light-dark(#474747, #b4b7bd);
  --c-border: light-dark(#e1e3e8, #33363b);
  --c-skeleton: light-dark(#e9ecf2, #2a2c30);
  --c-on-grad: light-dark(#ffffff, #131314);
  --grad: linear-gradient(90deg, light-dark(#0b57d0, #a8c7fa) 0%, light-dark(#7c3aed, #c4b5fd) 55%, light-dark(#c2185b, #f9a8d4) 100%);
  --shadow: 0 1px 2px light-dark(rgba(31, 31, 31, .06), rgba(0, 0, 0, .4)), 0 8px 28px light-dark(rgba(31, 31, 31, .08), rgba(0, 0, 0, .35));

  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  --fs-xl: clamp(2rem, 1.2rem + 3vw, 3.25rem);

  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem;
  --sp-6: 1.5rem; --sp-8: 2rem; --sp-12: 3rem; --sp-16: 4rem; --sp-24: 6rem;

  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-pill: 999px;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-md); line-height: 1.65; color: var(--c-text); background: var(--c-bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--c-primary); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--sp-4); letter-spacing: -.01em; }
h2 { font-size: var(--fs-lg); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 var(--sp-4); }
code { font-family: var(--mono); font-size: .9em; background: var(--c-primary-soft); padding: .1em .4em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1200px, 100% - 2 * var(--sp-6)); margin-inline: auto; }
.container--narrow { width: min(780px, 100% - 2 * var(--sp-6)); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--c-surface); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-sm); z-index: 100; }
.skip-link:focus { left: 8px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c-primary); margin-bottom: var(--sp-3); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--c-bg) 85%, transparent); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--c-border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 650; color: var(--c-text); text-decoration: none; }
.brand small { color: var(--c-muted); font-weight: 400; font-size: var(--fs-xs); }
/* The brand icon is black; invert it on dark backgrounds. */
:root[data-theme="dark"] .mono-icon { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mono-icon { filter: invert(1); } }
.nav__menu { display: none; }
.nav__menu a { color: var(--c-muted); text-decoration: none; font-size: var(--fs-sm); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-pill); }
.nav__menu a:hover { color: var(--c-text); background: var(--c-bg-tint); }
.nav__toggle { display: inline-flex; flex-direction: column; gap: 4px; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav__toggle span { width: 20px; height: 2px; background: var(--c-text); border-radius: 2px; }
.nav__menu.is-open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--c-bg); border-bottom: 1px solid var(--c-border); padding: var(--sp-4) var(--sp-6); gap: var(--sp-1); }
.nav__tools { display: flex; align-items: center; gap: var(--sp-2); }
.theme-switch { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text); border-radius: 50%; cursor: pointer; }
.theme-switch:hover { background: var(--c-bg-tint); }
.theme-switch svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-switch [data-icon] { display: none; }
.theme-switch[data-mode="auto"] [data-icon="auto"], .theme-switch[data-mode="light"] [data-icon="light"], .theme-switch[data-mode="dark"] [data-icon="dark"] { display: block; }
.lang-switch { position: relative; }
.lang-switch__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: var(--c-text); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-pill); cursor: pointer; transition: background-color .15s, border-color .15s; }
.lang-switch__btn:hover, .lang-switch__btn[aria-expanded="true"] { background: var(--c-bg-tint); }
.lang-switch__btn svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lang-switch__btn .lang-switch__chev { width: 12px; height: 12px; color: var(--c-muted); stroke-width: 2.2; transition: transform .2s; }
.lang-switch__btn[aria-expanded="true"] .lang-switch__chev { transform: rotate(180deg); }
.lang-switch__menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 200px; padding: 6px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); box-shadow: var(--shadow); transform-origin: top right; animation: lang-pop .14s ease-out; }
@keyframes lang-pop { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
.lang-switch__menu button { display: flex; align-items: center; gap: var(--sp-2); white-space: nowrap; width: 100%; min-height: 40px; padding: 0 10px; font: inherit; font-size: var(--fs-sm); color: var(--c-text); text-align: left; background: none; border: 0; border-radius: var(--r-sm); cursor: pointer; }
.lang-switch__menu button:hover, .lang-switch__menu button:focus-visible { background: var(--c-bg-tint); outline: none; }
.lang-switch__menu button:focus-visible { box-shadow: inset 0 0 0 2px var(--c-primary); }
.lang-switch__menu button[aria-checked="true"] { color: var(--c-primary); font-weight: 600; background: var(--c-primary-soft); }
.lang-switch__hint { font-size: var(--fs-xs); font-weight: 400; color: var(--c-muted); }
.lang-switch__check { width: 16px; height: 16px; margin-left: auto; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.lang-switch__menu button[aria-checked="true"] .lang-switch__check { visibility: visible; }
@media (min-width: 900px) {
  .nav__toggle { display: none; }
  .nav__menu { order: 1; margin-left: auto; margin-right: var(--sp-2); }
  .nav__tools { order: 2; }
  .nav__menu, .nav__menu.is-open { display: flex; flex-direction: row; position: static; align-items: center; gap: var(--sp-1); padding: 0; border: 0; background: none; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--sp-6); border-radius: var(--r-pill); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; transition: background-color .2s, transform .2s; }
.btn--primary { background: #0b57d0; color: #fff; }
.btn--primary:hover { background: #0842a0; }
.btn--ghost { border: 1px solid var(--c-border); color: var(--c-text); background: var(--c-surface); }
.btn--ghost:hover { background: var(--c-bg-tint); }
.btn:active { transform: scale(.98); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: var(--sp-12) 0 var(--sp-16); }
.hero__glow { position: absolute; inset: -30% -10% auto; height: 520px; background: radial-gradient(40% 60% at 20% 40%, rgba(11, 87, 208, .16), transparent 70%), radial-gradient(35% 55% at 75% 30%, rgba(124, 58, 237, .14), transparent 70%), radial-gradient(30% 40% at 55% 70%, rgba(194, 24, 91, .08), transparent 70%); pointer-events: none; }
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-12); align-items: center; }
.hero h1 { font-size: var(--fs-xl); font-weight: 700; text-wrap: balance; }
.lead { font-size: 1.125rem; color: var(--c-muted); max-width: 36em; }
.cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-8); }
@media (min-width: 1024px) {
  .hero { padding: var(--sp-16) 0 var(--sp-24); }
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
}

/* Sections */
.section { padding: var(--sp-16) 0; }
.section--tint { background: var(--c-bg-tint); }
.section__head { max-width: 680px; margin-inline: auto; margin-bottom: var(--sp-12); text-align: center; }
.sub { color: var(--c-muted); }
@media (min-width: 1024px) { .section { padding: var(--sp-24) 0; } }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
@media (min-width: 768px) { .grid--2, .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid--center { align-items: center; gap: var(--sp-16); } }

.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: var(--sp-6); transition: border-color .2s, box-shadow .2s; }
.card:hover { border-color: color-mix(in srgb, var(--c-primary) 40%, var(--c-border)); box-shadow: var(--shadow); }
.card p { color: var(--c-muted); font-size: var(--fs-sm); margin: 0; }
.card--shot { padding: 0 0 var(--sp-6); overflow: hidden; }
.card--shot h4, .card--shot p { padding-inline: var(--sp-6); }
.card h4 { font-size: 1.0625rem; line-height: 1.3; margin: 0 0 var(--sp-2); }
.group__title { font-size: var(--fs-sm); font-weight: 600; letter-spacing: .04em; color: var(--c-muted); margin: 0 0 var(--sp-4); }
.group { margin-bottom: var(--sp-12); }
.group:last-child { margin-bottom: 0; }
.hero__shot { margin: 0; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--c-border); box-shadow: var(--shadow); }
.hero__shot .shot { margin: 0; border: 0; }
.section__more { margin: var(--sp-8) 0 0; text-align: center; font-size: var(--fs-sm); }
.footer__links { display: flex; gap: var(--sp-4); }
.shot { width: 100%; height: auto; aspect-ratio: 4 / 3; margin-bottom: var(--sp-6); border-bottom: 1px solid var(--c-border); background: var(--c-bg-tint); }
.ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--c-primary-soft); color: var(--c-primary); font-size: 1.1rem; margin-bottom: var(--sp-4); }

/* Lists */
.point { position: relative; padding-left: var(--sp-8); }
.point::before { content: "✓"; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary); font-size: 12px; font-weight: 700; }
.point p { color: var(--c-muted); font-size: var(--fs-sm); margin: 0; }

/* Privacy policy */
.policy h1 { font-size: var(--fs-xl); margin-bottom: var(--sp-2); }
.policy h2 { font-size: 1.25rem; margin: var(--sp-12) 0 var(--sp-4); }
.policy p, .policy li { color: var(--c-muted); }
.policy strong { color: var(--c-text); }
.policy ul { padding-left: 1.25em; display: grid; gap: var(--sp-2); }
.policy__meta { font-size: var(--fs-sm); }
.policy__summary { background: var(--c-primary-soft); border-radius: var(--r-md); padding: var(--sp-4) var(--sp-6); color: var(--c-text) !important; }
.table-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--r-md); margin-bottom: var(--sp-4); }
.policy table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: var(--fs-sm); }
.policy th, .policy td { text-align: left; vertical-align: top; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--c-border); }
.policy th { background: var(--c-bg-tint); color: var(--c-text); font-weight: 600; }
.policy td { color: var(--c-muted); }
.policy tr:last-child td { border-bottom: 0; }
.placeholder { border: 1px dashed var(--c-border); border-radius: 6px; padding: 0 .4em; }
.nav__menu a[aria-current="page"] { color: var(--c-text); background: var(--c-bg-tint); }

/* FAQ */
details { border-bottom: 1px solid var(--c-border); }
summary { cursor: pointer; list-style: none; padding: var(--sp-4) var(--sp-8) var(--sp-4) 0; font-weight: 600; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--c-muted); transition: transform .2s; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { color: var(--c-muted); padding-bottom: var(--sp-4); }

/* Footer */
.footer { border-top: 1px solid var(--c-border); padding: var(--sp-8) 0; font-size: var(--fs-sm); color: var(--c-muted); }
.footer__inner { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; justify-content: space-between; }
.footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
