/* One palette for the public site, documentation and customer workspace. */
:root,html[data-theme=light] {
  --ink:#142740; --blue:#2459e5; --action:#2459e5; --muted:#576b82;
  --line:#dce5f0; --border:var(--line); --ice:#f0f5fc; --surface:#fff;
  --page:#fff; --workspace-bg:#f5f7fb; --nav:#f3f7fd; --sidebar-bg:#f3f7fd;
  --hero-bg:#f1f6ff;
  --hero-ink:#142740; --hero-muted:#526780; --code-bg:#f2f6fc;
  --code-head:#eaf0f9; --code-ink:#243c5c; --menu-shadow:0 16px 44px #14274016;
  --card-shadow:0 12px 36px #234b8210; --selected:#e8efff; --hover:#f1f5fc;
  --header-bg:#fffffff2; --theme-track:#edf2f9; --control-shadow:0 1px 5px #1427401c;
  color:var(--ink); background:var(--page); color-scheme:light;
}
html[data-theme=dark] {
  --ink:#e7eefb; --blue:#94b6ff; --action:#3974ed; --muted:#a8b9d0;
  --line:#293b54; --border:var(--line); --ice:#16243a; --surface:#101e32;
  --page:#0b1422; --workspace-bg:#0b1422; --nav:#0e192a; --sidebar-bg:#0e192a;
  --hero-bg:#0e2139;
  --hero-ink:#edf4ff; --hero-muted:#b9cce5; --code-bg:#101e33;
  --code-head:#15263e; --code-ink:#dceaff; --menu-shadow:0 16px 44px #03091466;
  --card-shadow:0 12px 36px #02091626; --selected:#203b65; --hover:#192c45;
  --header-bg:#0b1422f2; --theme-track:#18283f; --control-shadow:0 1px 5px #0005;
  color:var(--ink); background:var(--page); color-scheme:dark;
}
body { color:var(--ink); background:var(--workspace-bg); }
body.public-page { background:var(--page); }
[data-theme] .primary { background:var(--action); border-color:var(--action); color:#fff; }
.theme-switch { position:relative; display:inline-flex; flex-shrink:0; width:82px; height:42px; padding:4px; gap:2px; border:1px solid var(--line); border-radius:13px; background:var(--theme-track); }
.theme-switch-indicator { position:absolute; width:35px; height:32px; top:4px; left:4px; border-radius:9px; background:var(--surface); box-shadow:var(--control-shadow); pointer-events:none; }
.theme-switch[data-active=dark] .theme-switch-indicator { transform:translateX(37px); }
[data-theme] .theme-switch > button.theme-choice { position:relative; width:35px; min-width:35px; min-height:32px; padding:0; display:grid; place-items:center; border:0; border-radius:9px; background:transparent; color:var(--muted); box-shadow:none; }
[data-theme] .theme-switch > button.theme-choice[aria-pressed=true] { color:var(--blue); }
.theme-choice svg { width:18px; height:18px; }
.theme-choice:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
[data-theme-control] { display:inline-flex; width:82px; flex-shrink:0; }
.language-menu { position:relative; flex-shrink:0; margin:0; }
.language-menu > summary { display:flex; align-items:center; justify-content:space-between; gap:10px; list-style:none; height:42px; min-width:88px; padding:0 11px; border:1px solid var(--line); border-radius:13px; background:var(--surface); color:var(--ink); font-size:.8125rem; font-weight:650; }
.language-menu > summary::marker,.mobile-menu > summary::marker { content:''; }
.language-menu > summary::-webkit-details-marker,.mobile-menu > summary::-webkit-details-marker { display:none; }
.language-current { display:flex; align-items:center; gap:8px; letter-spacing:.035em; }
.language-flag { width:21px; height:14px; flex-shrink:0; border-radius:3px; box-shadow:0 0 0 1px #8294ae26; overflow:hidden; }
.language-chevron { width:13px; height:13px; color:var(--muted); }
.language-menu[open] > summary { border-color:var(--blue); }
.language-menu[open] .language-chevron { transform:rotate(180deg); }
.language-menu > div.language-options { position:absolute; right:0; top:calc(100% + 10px); z-index:65; min-width:206px; padding:7px; border:1px solid var(--line); border-radius:16px; background:var(--surface); box-shadow:var(--menu-shadow); }
.preference-caption { display:block; padding:9px 11px 8px; color:var(--muted); font-size:.6875rem; font-weight:600; text-transform:uppercase; letter-spacing:.1em; }
.language-options > a,.language-options > button[data-language-value] { display:flex; align-items:center; width:100%; gap:11px; min-height:43px; padding:10px 11px; margin:2px 0; text-align:left; border:0; border-radius:9px; background:transparent; color:var(--ink); font:inherit; font-size:.875rem; font-weight:500; white-space:nowrap; }
[data-theme] .language-options > button[data-language-value] { background:transparent; }
.language-options > a:hover,[data-theme] .language-options > button[data-language-value]:hover { background:var(--hover); text-decoration:none; }
.language-options > a[aria-current],[data-theme] .language-options > button[aria-pressed=true] { background:var(--selected); color:var(--blue); }
.language-check { width:17px; height:17px; margin-left:auto; visibility:hidden; }
[aria-current] > .language-check,[aria-pressed=true] > .language-check { visibility:visible; }
.auth-languages { display:flex; align-items:center; gap:12px; }
.auth-box .google-button { display:grid; grid-template-columns:18px minmax(0,1fr) 18px; gap:12px; align-items:center; width:100%; min-height:48px; padding:12px 16px; border:1px solid #747775; border-radius:12px; background:#fff; color:#1f1f1f; font-family:"Google Sans",Arial,sans-serif; font-size:.875rem; font-weight:500; line-height:20px; letter-spacing:.01em; box-shadow:none; }
.google-button::after { content:''; width:18px; }
.google-button .google-logo { display:block; width:18px; height:18px; object-fit:contain; }
.google-button .google-label { text-align:center; }
.auth-box .google-button:not(:disabled):hover { background:#f8faff; box-shadow:0 1px 4px #14274018; }
.auth-box .google-button:not(:disabled):active { background:#edf2fa; box-shadow:none; }
.auth-box .google-button:focus-visible { outline:3px solid var(--action); outline-offset:3px; }
html[data-theme=dark] .auth-box .google-button { background:#131314; color:#e3e3e3; border-color:#8e918f; }
html[data-theme=dark] .auth-box .google-button:not(:disabled):hover { background:#202124; box-shadow:0 1px 4px #0004; }
html[data-theme=dark] .auth-box .google-button:not(:disabled):active { background:#2b2c2f; box-shadow:none; }
.profile { gap:12px; }

/* Public site: calm surfaces, a clear hierarchy and consistent navigation. */
.public-page .site-header { min-height:82px; padding:18px max(4%,calc((100vw - 1280px)/2)); gap:24px; background:var(--header-bg); backdrop-filter:blur(16px); }
.site-header .brand { font-size:1.4rem; gap:10px; }
.site-header .brand img { width:34px; height:34px; }
.public-page .desktop-nav { gap:4px; }
.public-page .desktop-nav a { min-height:40px; padding:9px 12px; border-radius:10px; font-size:.875rem; }
.public-page .desktop-nav a:hover { color:var(--ink); background:var(--hover); text-decoration:none; }
.public-page .desktop-nav a[aria-current] { color:var(--blue); background:var(--selected); }
.public-page .desktop-nav a[aria-current]::after { display:none; }
.header-actions { gap:12px; }
.public-page .button { min-height:48px; padding:13px 21px; border-radius:12px; font-size:.9375rem; }
.public-page .primary { background:var(--action); color:#fff; border-color:var(--action); box-shadow:0 4px 12px #2459e51a; }
.public-page .header-login { min-height:42px; padding:11px 17px; font-size:.8125rem; border-radius:12px; }
.public-page .button:hover { filter:none; box-shadow:0 5px 18px #2459e526; }
.public-page .button.outline { background:var(--surface); border-color:var(--line); color:var(--ink); }
.launch-hero { background:var(--hero-bg); color:var(--hero-ink); padding:62px 0; border-bottom:1px solid var(--line); }
.launch-layout { width:min(1280px,90%); margin:auto; display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); gap:6%; align-items:center; }
.launch-copy { width:auto; margin:0; display:block; }
.launch-copy .eyebrow { display:inline-flex; align-items:center; gap:10px; justify-self:start; width:fit-content; max-width:100%; margin-bottom:26px; padding:9px 12px; border:1px solid var(--line); border-radius:30px; color:var(--blue); background:var(--surface); font-size:.6875rem; letter-spacing:.1em; line-height:1.4; }
.launch-copy .eyebrow::before { content:''; width:6px; height:6px; border-radius:50%; background:var(--action); box-shadow:0 0 0 3px var(--selected); flex-shrink:0; }
.launch-copy h1 { font-size:clamp(2.65rem,4.4vw,4rem); font-weight:700; line-height:1.1; letter-spacing:-.05em; max-width:17ch; }
.launch-copy .lead { color:var(--hero-muted); font-size:1rem; line-height:1.8; padding-top:0; margin-top:24px; max-width:49ch; }
.launch-copy .hero-actions { margin-top:26px; gap:12px; }
.launch-copy .primary { background:var(--action); }
.launch-copy .outline { color:var(--ink); border-color:var(--line); }
.launch-status { color:var(--muted); font-size:.8125rem; line-height:1.6; margin-top:20px; }
.launch-art { width:100%; height:clamp(380px,38vw,500px); margin:0!important; border:1px solid var(--line); border-radius:26px; box-shadow:var(--card-shadow); }
.launch-art img { object-position:70% center; }
.section-width { width:min(1200px,90%); }
.workflow { padding-block:76px 84px; }
.workflow ol { gap:20px; margin-top:32px; }
.workflow li { padding:26px; border:1px solid var(--line); border-radius:18px; background:var(--ice); }
.workflow li > span { display:grid; place-items:center; width:36px; height:36px; border:1px solid var(--line); background:var(--surface); border-radius:10px; margin-bottom:24px; font-size:.75rem; }
.workflow h3 { font-size:1.2rem; }
.home-stories figure,.feature-overview figure,.feature-pair figure,.about-panorama,.about-workshop figure,.about-roadmap figure { border:1px solid var(--line); border-radius:22px; box-shadow:var(--card-shadow); }
.section-heading h2,.home-stories h2,.about-letter h2 { line-height:1.2; }
.public-page h3 { letter-spacing:-.015em; }
.section-jumps a { border:1px solid var(--line); border-radius:10px; padding:10px 15px; min-height:42px; background:var(--ice); font-size:.875rem; }
.section-jumps a:hover { border-color:var(--blue); text-decoration:none; }
.capability-list > div { padding:23px 0; }
.platform-state { border-radius:8px; }
.docs-layout { padding-top:48px; }
.docs-start-cards { gap:16px; }
.docs-start-cards a { background:var(--surface); border-radius:16px; box-shadow:var(--card-shadow); }
.docs-start-cards strong { padding-right:16px; }
.docs-navigation nav a { border-radius:0 8px 8px 0; }
.code-example { border-color:var(--line); border-radius:14px; background:var(--code-bg); color:var(--code-ink); }
.code-toolbar { background:var(--code-head); border-color:var(--line); color:var(--code-ink); }
[data-theme] .code-toolbar button { background:transparent; color:var(--code-ink); border-color:var(--line); border-radius:8px; }
.code-section pre { background:var(--code-bg); color:var(--code-ink); border:1px solid var(--line); }
.doc-notice { border-radius:0 12px 12px 0; }
.help-topics button,.faq-answer { border-radius:10px; }
.contact-form { background:var(--ice); padding:32px; border-radius:22px; box-shadow:var(--card-shadow); }
.contact-form input,.contact-form textarea,.contact-form select { border-radius:10px; }
.public-page .cta { width:min(1200px,90%); max-width:none; margin:0 auto 64px; padding:46px 48px; background:var(--hero-bg); color:var(--ink); border:1px solid var(--line); border-radius:22px; }
.public-page .cta p { color:var(--muted); }
[data-theme] .cta .light { background:var(--action); color:#fff; border-color:var(--action); }
.public-page .site-footer { width:min(1200px,90%); max-width:none; margin:50px auto 28px; padding:34px 36px 26px; background:var(--ice); border:1px solid var(--line); border-radius:22px; }
.site-footer .brand { font-size:1.3rem; }
.site-footer nav a:hover { color:var(--blue); }
.page-privacy .site-header { justify-content:space-between; }
.page-privacy .detail-section { display:block; max-width:860px; padding-top:50px; border:0; }
.page-privacy h1 { font-size:clamp(2rem,4vw,3rem); margin-bottom:18px; }
.page-privacy .privacy-section h2 { font-size:1.3rem; margin-bottom:14px; }
.mobile-menu > summary { display:grid; place-items:center; list-style:none; width:42px; height:42px; padding:0; border:1px solid var(--line); background:var(--surface); border-radius:12px; }
.mobile-menu > summary svg { width:20px; height:20px; }
.public-page .mobile-menu nav { top:calc(100% + 10px); background:var(--surface); border-radius:16px; box-shadow:var(--menu-shadow); }
.public-page .mobile-menu nav a { border-radius:9px; }
.public-page .mobile-menu nav a[aria-current] { background:var(--selected); color:var(--blue); }

/* The same themes apply throughout the customer workspace, including its sidebar. */
.sidebar { background:var(--sidebar-bg); color:var(--ink); border-right:1px solid var(--line); }
.sidebar .brand,.sidebar-bottom a { color:var(--ink); }
.sidebar nav a { color:var(--muted); border-radius:11px; }
.sidebar nav a[aria-current] { background:var(--selected); color:var(--blue); }
.sidebar nav a:hover { background:var(--hover); color:var(--ink); }
.topbar,.panel,.stat,dialog,.auth-main,.app-card,.mini-panel,.campaign-card,.filter-bar { background:var(--surface); border-color:var(--line); color:var(--ink); }
.app-card,.campaign-row,.mobile-navigation nav a,.app-name { color:var(--ink); }
.app-card { border-radius:15px; }
.app-card:hover { border-color:var(--blue); box-shadow:var(--card-shadow); }
.campaign-row:hover,.audience-row:hover { background:var(--hover); }
.auth-story { background:var(--hero-bg); color:var(--ink); border-right:1px solid var(--line); }
.auth-story .brand,.auth-story h1 { color:var(--ink); }
.auth-story p { color:var(--muted); }
.auth-story > a:last-child { color:var(--blue); }
.launch-hero,.auth-story,.public-page .cta { background-image:radial-gradient(ellipse at 100% 0%,#3974ed12,transparent 65%); }
.auth-box input,.form input,.form textarea,.form select,.field input,.field select { background:var(--surface); color:var(--ink); border-color:var(--line); }
.profile .language-menu { padding:0; }
dialog::backdrop { background:#06132470; backdrop-filter:blur(4px); }

@media(min-width:851px) and (max-width:1100px) {
  .public-page .desktop-nav { display:none; }
  .public-page .header-actions { margin-left:auto; }
  .public-page .mobile-menu { display:block; }
}
@media(max-width:850px) {
  .public-page .site-header { padding:15px 5%; min-height:74px; gap:14px; }
  .launch-layout { grid-template-columns:1fr; gap:30px; }
  .launch-copy h1 { max-width:21ch; }
  .launch-copy .lead { max-width:620px; }
  .launch-copy .eyebrow { margin-bottom:24px; }
  .launch-art { height:360px; }
  .workflow ol { gap:14px; }
  .workflow li { padding:22px; }
}
@media(max-width:600px) {
  .public-page .site-header { padding:12px 4%; gap:8px; min-height:68px; }
  .public-page .site-header .brand { font-size:1.0625rem; gap:7px; }
  .public-page .site-header .brand img { display:block; width:28px; height:28px; }
  .header-actions { gap:6px; }
  .language-menu > summary { min-width:72px; padding-inline:8px; gap:6px; }
  .language-current { gap:6px; }
  .language-flag { width:19px; height:13px; }
  .language-chevron { width:11px; }
  .language-menu > div.language-options { min-width:196px; }
  .public-page .mobile-menu > summary { width:36px; padding:0; }
  .launch-hero { padding:36px 0 30px; }
  .launch-copy h1 { font-size:clamp(2.2rem,9.2vw,3rem); max-width:19ch; }
  .launch-copy .eyebrow { font-size:.625rem; padding:8px 10px; }
  .launch-copy .lead { font-size:1rem; line-height:1.8; }
  .launch-copy .hero-actions { flex-direction:row; align-items:stretch; }
  .launch-copy .hero-actions .button { flex:1; font-size:.875rem; padding:12px; }
  .launch-art { border-radius:18px; height:270px; }
  .launch-art img { object-position:center; }
  .workflow { padding-block:46px; }
  .workflow ol { grid-template-columns:1fr; }
  .workflow li { padding:24px; }
  .workflow li > span { margin-bottom:18px; }
  .docs-start-cards { grid-template-columns:1fr; gap:12px; }
  .docs-start-cards a { display:grid; grid-template-columns:82px minmax(0,1fr); gap:16px; align-items:center; padding:0; }
  .docs-start-cards img { grid-column:auto; width:82px; height:82px; aspect-ratio:1; }
  .docs-start-cards strong { padding:12px 16px 12px 0; font-size:.9375rem; }
  .contact-form { padding:24px 20px; }
  .public-page .site-footer { padding:26px 23px; border-radius:18px; margin-top:36px; }
  .public-page .cta { padding:30px 25px; border-radius:18px; }
  .auth-languages { right:20px; }
  .profile-email { display:none; }
  .profile { gap:7px; }
}
@media(max-width:340px) { .public-page .site-header .brand { font-size:0; } }
@media(prefers-reduced-motion:no-preference) {
  .preferences-ready,.preferences-ready body,.preferences-ready .site-header,.preferences-ready .launch-hero,.preferences-ready .cta,.preferences-ready .sidebar,.preferences-ready .topbar,.preferences-ready .panel,.preferences-ready .auth-story,.preferences-ready .auth-main { transition:background-color .18s ease,color .18s ease,border-color .18s ease; }
  .theme-switch-indicator { transition:transform .18s ease,background-color .18s ease; }
  .auth-box .google-button { transition:background-color .15s ease,box-shadow .15s ease; }
  .language-chevron { transition:transform .15s ease; }
  .language-menu[open] .language-options { animation:menu-reveal .14s ease-out; }
  @keyframes menu-reveal { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
}
