/* Public pages share these surfaces with server-rendered legal and system documents.
   An explicit appearance choice always wins over the light guest default. */
:root {
  --guest-paper: #efece4;
  --guest-sheet: #f3f0e8;
  --guest-ink: #171a17;
  --guest-muted: #60655f;
  --guest-rule: #cfcac0;
  --guest-coral: #e36549;
  --guest-night: #0b0e0d;
  --guest-night-rule: #29302c;
  --guest-night-text: #f2efe8;
  --guest-night-muted: #858c87;
  --guest-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

html:not([data-color-mode="dark"]) :is([data-public-page], .public-schedule, .payment-document[data-payment-stage="return"], .legal-page, .guest-system) {
  color-scheme: light;
  --rf-bg: var(--guest-paper);
  --rf-panel: var(--guest-sheet);
  --rf-panel-2: #e8e4db;
  --rf-panel-3: #e1ded4;
  --rf-ink: var(--guest-ink);
  --rf-muted: var(--guest-muted);
  --rf-faint: #5c625b;
  --rf-line: var(--guest-rule);
  --rf-line-strong: #827f75;
  --rf-focus: #943d26;
  --legal-bg: var(--guest-paper);
  --legal-panel: var(--guest-sheet);
  --legal-ink: var(--guest-ink);
  --legal-muted: var(--guest-muted);
  --legal-line: var(--guest-rule);
  --legal-line-strong: #827f75;
  --legal-focus: #943d26;
  background: var(--rf-bg);
  color: var(--rf-ink);
}

html:not([data-color-palette]), html[data-color-palette="todoist"] {
  :is([data-public-page], .public-schedule, .payment-document, .legal-page, .guest-system) {
    --guest-action: var(--guest-coral);
    --guest-action-ink: var(--guest-ink);
  }
}

:is([data-public-page], .public-schedule, .payment-document[data-payment-stage="return"], .legal-page, .guest-system) {
  --rf-mono: var(--guest-mono);
  --guest-action: var(--rf-accent, var(--guest-coral));
  --guest-action-ink: var(--rf-accent-ink, var(--guest-ink));
  overflow-wrap: break-word;
  :focus-visible { outline: 3px solid var(--rf-focus, #943d26); outline-offset: 3px; }
  ::selection { background: #f4a18a; color: #171a17; }
}

html :is([data-public-page], .public-schedule, .legal-page) .public-product-header {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 14px clamp(16px, 3vw, 48px);
  border-block: 0 1px;
  border-style: solid;
  border-color: var(--rf-line, var(--legal-line));
  border-inline: 0;
  background: var(--rf-bg, var(--legal-bg));
}

html :is([data-public-page], .public-schedule, .legal-page) .public-product-brand__copy strong,
html .knowledge-page .knowledge-brand {
  font: 650 clamp(.77rem, 1.3vw, 1rem)/1.4 var(--guest-mono);
  letter-spacing: .11em;
  text-transform: uppercase;
  white-space: nowrap;
}
html :is([data-public-page], .public-schedule, .legal-page) .public-product-brand > span:first-child,
html .knowledge-page .knowledge-brand__cube {
  display: block;
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  min-width: 0;
  background: var(--guest-action);
  transform: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.public-product-brand > span:first-child::before, .public-product-brand > span:first-child::after { content: none; }
html :is([data-public-page], .public-schedule, .legal-page) .public-product-header nav { gap: clamp(2px, .5vw, 12px); }
html :is([data-public-page], .public-schedule, .legal-page) .public-product-header :is(a, button, summary),
html .knowledge-page .knowledge-header :is(a,button) { min-height: 44px; align-content: center; border-radius: 0; }
html [data-public-page] .public-product-header :is(.public-product-header__support,.public-product-header__legal) { display: inline-flex; }
html .guest-mobile-login, html .editorial-menu-toggle { display: none; }
html [data-public-page="welcome"] .reflektorium-guest__opening {
  grid-template-columns: minmax(0, 1.14fr) minmax(0, .86fr);
  align-items: stretch;
  gap: clamp(24px,4vw,72px);
  padding-block: clamp(40px,7vw,96px);
  border-bottom: 1px solid var(--rf-line);
}
html [data-public-page="welcome"] .reflektorium-guest__opening-copy h1,
html :is([data-public-page="agents"], [data-public-page="apps"], .knowledge-page) h1 {
  font-size: clamp(2.55rem,5.5vw,5rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  text-wrap: balance;
}
html [data-public-page="welcome"] .reflektorium-guest__opening-copy { align-self: center; }
html [data-public-page="welcome"] .editorial-day,
html .public-auth-page .editorial-auth__panel {
  color-scheme: dark;
  --rf-bg: var(--guest-ink);
  --rf-panel: #202520;
  --rf-panel-2: #282e29;
  --rf-panel-3: #303731;
  --rf-ink: var(--guest-night-text);
  --rf-muted: #b3b9b3;
  --rf-faint: #a5aca5;
  --rf-line: #454d46;
  --rf-line-strong: #79837a;
  --rf-focus: #ffac93;
  --rf-accent: #f78c72;
  --rf-accent-ink: #171a17;
  padding: clamp(24px,3vw,52px);
  margin: 0;
  background: var(--rf-bg);
  color: var(--rf-ink);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
html [data-public-page="welcome"] .editorial-day figcaption,
html [data-public-page="welcome"] .editorial-day time,
html .knowledge-page .knowledge-breadcrumbs,
html .legal-page .legal-eyebrow {
  font: 500 .78rem/1.5 var(--guest-mono);
  letter-spacing: .035em;
}
html [data-public-page="welcome"] .editorial-day__schedule { border-block-start: 1px solid var(--rf-line); }
html [data-public-page="welcome"] .editorial-day__result { border-radius: 0; }
html [data-public-page="welcome"] .ik-landing-button,
html [data-public-page] .public-product-cta,
html .knowledge-page :is(.knowledge-cta, .knowledge-hero__media, .knowledge-evidence, .knowledge-contents),
html [data-public-page] .editorial-handoff { border-radius: 0 !important; }
html [data-public-page="welcome"] .ik-landing-button.m3-button--filled,
html [data-public-page] .public-product-cta,
html .knowledge-page .knowledge-cta--primary,
html .public-product-header .guest-mobile-login {
  background: var(--guest-action);
  color: var(--guest-action-ink);
  border: 1px solid transparent;
  padding: .7rem 1rem;
}
html [data-public-page] :is(.knowledge-cta--primary,.public-product-cta,.ik-landing-button.m3-button--filled):hover { text-decoration: underline; }
html .public-auth-page .editorial-auth--login { grid-template-columns: minmax(0,1.15fr) minmax(340px,.85fr); }
html .public-auth-page .editorial-auth__context { align-content: center; gap: 24px; }
html .public-auth-page .editorial-auth__context::after { content: none; }
html .public-auth-page .editorial-auth__context-mark { background: var(--guest-action); transform: none; }
html .public-auth-page .editorial-auth__context strong { max-width: 12ch; font-size: clamp(2.8rem,5vw,5rem); line-height: 1.02; letter-spacing: -.035em; }
html .public-auth-page .editorial-auth__panel { max-width: none; }
html .public-auth-page .editorial-auth__panel :is(input,select,button) { border-radius: 0; }
html .knowledge-page .knowledge-hero { border-bottom: 1px solid var(--rf-line); }
html .knowledge-page .knowledge-header { border-bottom: 1px solid var(--rf-line); }
html .knowledge-page .knowledge-header nav { align-items: center; }
html .legal-page .legal-document { max-width: 960px; margin-inline: auto; }
html .legal-page .legal-content { line-height: 1.7; }
html .legal-page .legal-content p { max-width: 76ch; }
html .legal-page .legal-document h1 { font-size: clamp(2.45rem,6vw,5rem); line-height: 1.04; letter-spacing: -.035em; }
html .legal-page .legal-tools { display: flex; gap: .6rem 1.2rem; flex-wrap: wrap; align-items: baseline; margin-block: 1rem; }
html .legal-page .legal-tools a, html .legal-page .legal-tools button { min-height: 44px; padding-block: .6rem; }
html .legal-page .legal-tools button { background: transparent; border: 1px solid var(--legal-line); color: inherit; padding-inline: 1rem; cursor: pointer; }

@media (max-width: 1020px) {
  html :is([data-public-page], .public-schedule) .public-product-header { display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; gap:8px; justify-content:flex-start; min-height:60px; }
  html :is([data-public-page], .public-schedule) .public-product-brand { margin-right:auto; }
  html :is([data-public-page], .public-schedule) .public-product-brand__copy { display:block; }
  html :is([data-public-page], .public-schedule) .public-product-brand__copy small { display:none; }
  html :is([data-public-page], .public-schedule) .public-product-header :is(.guest-mobile-login,.editorial-menu-toggle) { display:inline-flex; align-items:center; justify-content:center; }
  html :is([data-public-page], .public-schedule) .public-product-header .editorial-menu-toggle { border:1px solid var(--rf-line); padding:8px; background:transparent; color:inherit; }
  html :is([data-public-page], .public-schedule) .public-product-header nav { display:none; flex:1 0 100%; flex-wrap:wrap; padding-block:8px; }
  html :is([data-public-page], .public-schedule) .public-product-header nav.is-open { display:flex; }
}
@media (max-width: 700px) {
  html [data-public-page="welcome"] .reflektorium-guest__opening, html .public-auth-page .editorial-auth--login { display:block; }
  html [data-public-page="welcome"] .editorial-day { margin-top:28px; }
  html .public-auth-page .editorial-auth__context { display:none; }
  html .knowledge-page .knowledge-header nav { gap:.25rem .8rem; }
  html [data-public-page="welcome"] .reflektorium-guest { width:calc(100% - 32px); }
}
html .public-auth-page .editorial-auth__context strong,
html .public-auth-page .auth-panel__header h1 {
  font-family: 'Manrope', system-ui, sans-serif;
  font-weight: 650;
  text-transform: none;
  letter-spacing: -.03em;
  overflow-wrap: normal;
}
html .public-auth-page .auth-panel__header h1 { max-width: 16ch; font-size: clamp(2.2rem, 3.8vw, 3.6rem); line-height: 1.05; }
.guest-system { box-sizing: border-box; margin: 0; min-height: 100vh; padding: clamp(20px,5vw,72px); font: 1.125rem/1.55 system-ui,sans-serif; }
.guest-system .system-brand { display: block; border-bottom: 1px solid var(--guest-rule); padding-bottom: 20px; font: 650 .9rem/1.5 var(--guest-mono); letter-spacing: .1em; }
.guest-system .system-brand::before { content: ""; display: inline-block; width: .8rem; height: .8rem; background: var(--guest-coral); margin-right: .65rem; }
body:has(noscript .guest-system) #app { display: none; }
html:not([data-color-mode="dark"]) :is([data-public-page="agents"], [data-public-page="apps"]) .public-product-grid { background: transparent; }
html:not([data-color-mode="dark"]) [data-public-page="welcome"] [data-app-download-platform] { background-color: var(--guest-sheet); }
html:not([data-color-mode="dark"]) [data-public-page="agent-pairing"] .public-product-kicker { color: var(--guest-muted); }
.guest-faq { max-width: 76rem; margin: auto; padding: clamp(32px,6vw,80px) clamp(16px,3vw,48px); border-top: 1px solid var(--rf-line); }
.guest-faq details { border-top: 1px solid var(--rf-line); }
.guest-faq summary, .guest-faq > a { min-height: 44px; padding-block: 14px; cursor: pointer; }
.guest-faq > a { display: inline-flex; color: inherit; text-underline-offset: .2em; }
.guest-faq details p { max-width: 65ch; }
.guest-system main { max-width: 65ch; padding-block: clamp(48px,12vh,120px); }
.guest-system h1 { font-size: clamp(2.6rem,6vw,5rem); line-height: 1.05; letter-spacing: -.035em; margin: .4em 0; }
.guest-system .system-status { color: var(--guest-muted); font: .9rem/1.5 var(--guest-mono); }
.guest-system a { color: inherit; text-underline-offset: .2em; }
@media print {
  html .legal-page :is(.legal-tools,.public-product-header,.public-product-footer,.skip-link) { display:none; }
  html .legal-page, html .legal-page .legal-document { color:#000; background:#fff; width:auto; max-width:none; }
}
