/* Theme controls are shared by the landing and legal pages. Dark preserves the established palette. */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; --bg:#fafbf9; --surface:#fff; --text:#151917; --muted:#626b66; --line:#dce2dc; --green:#168648; --green-bright:#10773e; --green-dark:#fff; }
.theme-toggle { display:inline-flex; flex:none; align-items:center; gap:7px; position:relative; cursor:pointer; color:inherit; }
.theme-toggle svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.theme-toggle input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.theme-toggle .theme-track { box-sizing:border-box; display:block; width:38px; height:24px; padding:3px; border:1px solid #c7ceca; border-radius:99px; background:#e5e9e5; pointer-events:none; }
.theme-toggle .theme-track::after { content:''; display:block; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 3px #0002; transition:transform .18s; }
.theme-toggle input:checked + .theme-track { background:var(--accent,#29d58b); border-color:var(--accent,#29d58b); }
.theme-toggle input:checked + .theme-track::after { transform:translateX(14px); }
.theme-toggle input:focus-visible + .theme-track { outline:2px solid var(--accent,#29d58b); outline-offset:4px; }
[data-theme-status]:empty { display:none; }
[data-theme-status]:not(:empty) { position:fixed; right:16px; bottom:16px; max-width:320px; padding:14px; z-index:150; border:1px solid var(--line); border-radius:10px; background:var(--bg); color:var(--text); font:14px/1.5 var(--sans,system-ui); }

html[data-theme="light"], html[data-theme="light"] body { background:var(--bg); color:var(--text); }
html[data-theme="light"] body { --bg:#fafbf9; --surface:#fff; --text:#151917; --muted:#626b66; --line:#dce2dc; --green:#168648; --green-bright:#10773e; --green-dark:#fff; }
html[data-theme="light"] .site-header { background:#fafbf9f5; border-color:#dfe4df; }
html[data-theme="light"] :is(.brand,.hero h1,.video-steps-heading h2,.video-step h3,.demo-heading h2,.faq-layout h2) { color:var(--text); }
html[data-theme="light"] .hero h1 { -webkit-text-fill-color:currentColor; }
html[data-theme="light"] .eyebrow { color:var(--text); }
html[data-theme="light"] grindmate-demo { --gm-demo-border:#dce2dc; }
html[data-theme="light"] .site-header .main-nav a { color:#626b66; }
html[data-theme="light"] .site-header .main-nav a:is(:hover,[aria-current="location"]) { color:#111; }
html[data-theme="light"] .site-header .header-actions .header-pro { color:#626b66; }
html[data-theme="light"] .site-header .header-actions .header-pro:hover { color:#151917; }
html[data-theme="light"] .site-header .header-actions .header-chrome { background:transparent; color:#151917; border-color:#737c76; }
html[data-theme="light"] .site-header .header-actions .header-chrome:hover { background:#edf1ec; border-color:#303c34; }
html[data-theme="light"] .hero { background:radial-gradient(ellipse at 50% 8%,#eaf4ed80,transparent 52%); }
html[data-theme="light"] .hero .hero-description { color:#66716a; }
html[data-theme="light"] .hero-update { background:#edf0f2; border-color:#edf0f2; color:#53616a; }
html[data-theme="light"] .update-label { background:#fff; }
html .hero .hero-copy .hero-start,html .trial-section .trial-button { background:#29d58b; border-color:#29d58b; color:#072416; }
html .hero .hero-copy .hero-start:hover,html .trial-section .trial-button:hover { background:#3be39c; border-color:#3be39c; }
html[data-theme="light"] .hero-assurances { color:#252c27; }
html[data-theme="light"] .hero-assurances > span+span { border-color:#dce2dc; }
html[data-theme="light"] .hero-assurances svg { stroke:var(--accent,#29d58b); }
html[data-theme="light"] .hero-window-stage .hero-media { border-color:#e7eae5; box-shadow:0 24px 55px #1d2c1717; }
html[data-theme="light"] .answer-chip { background:#fff; border-color:#e1e5df; color:#151917; box-shadow:0 9px 20px #18271914; }
html[data-theme="light"] .answer-chip .answer-check { background:var(--accent,#29d58b); color:#fff; }
html[data-theme="light"] .hero > .works-section { background:#fff; border-color:#e1e5df; box-shadow:0 8px 26px #263d2510,inset 0 1px 0 #fff; }
html[data-theme="light"] .works-title,html[data-theme="light"] #works-title { color:#151917; }
html[data-theme="light"] .works-platform { background:#fff; border-color:#dce2dc; color:#202922; }
html[data-theme="light"] .works-platform i { box-shadow:0 0 0 1px #00000009; }
html[data-theme="light"] .video-step { background:#f0f3ef; border-color:#dce2dc; box-shadow:none; }
html[data-theme="light"] .video-step h3 { color:#202922; }
html[data-theme="light"] #account { color:#151917; }
#account .planCard { background:linear-gradient(135deg,#ffffff10,transparent 42%),linear-gradient(155deg,#2b3b34db,#1c2924ed); border-color:#527963; border-radius:24px; backdrop-filter:blur(18px); box-shadow:0 18px 48px #00000038,inset 0 1px 0 #ffffff2b; }
html[data-theme="light"] #account .planCard { background:linear-gradient(135deg,#ffffffeb,transparent 52%),linear-gradient(155deg,#dcece2d9,#ecf3efeb); border-color:#b6cfbf; box-shadow:0 18px 48px #284c3020,0 3px 10px #284c3009,inset 0 1px 0 #fff; }
html[data-theme="light"] #account :is(.planPrice,.planCard ul) { color:#151917; border-color:#d7e5db; }
html[data-theme="light"] #account :is(.planSummary,.planPrice small,.proRenewal,.proTerms,.billingOptions button) { color:#5b6c60; }
html[data-theme="light"] #account .planEyebrow,html[data-theme="light"] #account .planCard li::before { color:var(--text); }
html[data-theme="light"] #account .billingOptions button[aria-pressed="true"] { color:#145b33; background:#def0e3; border-color:#a0c9ad; }
html[data-theme="light"] #account .billingOptions button:hover { color:#145b33; background:#e8f2eb; }
html #account .planChoose { color:#072416; border:1px solid #29d58b; background:#29d58b; box-shadow:0 3px 10px #0d6a3420; }
html #account .planChoose:hover { background:#3be39c; border-color:#3be39c; }
html[data-theme="light"] #account :is(button,.planChoose,.proTerms):focus-visible { outline-color:var(--text); }
html[data-theme="light"] #account .setup-guide h2,html[data-theme="light"] .setup-guide p { color:#647169; }
html[data-theme="light"] .setup-guide h3 { color:#151917; }
html[data-theme="light"] .setup-step-number { color:var(--text); }
html[data-theme="light"] .setup-guide-steps li::before { border-color:var(--accent,#29d58b); background:#fafbf9; }
html[data-theme="light"] .setup-guide-steps li::after { background:#d7e0d7; }
html[data-theme="light"] .practice-card { background:#f0f3ef; border-color:#dce2dc; box-shadow:none; }
html[data-theme="light"] .practice-card :is(.practice-question,.practice-options label,.matching-options label) { color:#253229; }
html[data-theme="light"] .practice-card :is(select,.blank-question input) { color:#253229; background:#fff; border-color:#b9c6bc; }
html[data-theme="light"] .practice-card .practice-options label.is-answer { background:#d9eddf; color:#145b33; }
html[data-theme="light"] .practice-card.is-revealed :is(select,.blank-question input) { background:#d9eddf; color:#145b33; border-color:#79ac8b; }
html[data-theme="light"] .practice-card .practice-feedback { border-color:#cbdccd; color:#166936; }
html[data-theme="light"] .practice-graph g { fill:#52685a; }
html[data-theme="light"] #reset-demo { color:#253229; border-color:#aebdb2; background:#fff; }
html[data-theme="light"] .faq-list details { background:#f0f3ef; border-color:#dce2dc; color:#253229; }
html[data-theme="light"] .faq-list :is(summary,p) { color:#253229; }
html[data-theme="light"] .faq-list summary:hover { background:#e9eee8; }
html[data-theme="light"] .faq-list summary::after { color:var(--text); }
html[data-theme="light"] .trial-section { background:linear-gradient(145deg,#edf3ed,#f5f7f3); border-color:#e1e7df; }
html[data-theme="light"] .trial-section .trial-brand { background:#fff; border-color:#d9e1d8; color:#151917; }
html[data-theme="light"] .trial-section h2 { color:#151917; }
html[data-theme="light"] .trial-section h2 span { color:var(--text); }
html[data-theme="light"] .trial-section :is(.trial-renewal,.trial-cancel) { color:#5c6b60; }
html[data-theme="light"] .trial-section .trial-renewal strong { color:#253229; }
html[data-theme="light"] .trial-section .trial-cancel a { color:#253229; }
html[data-theme="light"] .site-footer { background:#f0f3ef; box-shadow:none; }
html[data-theme="light"] .site-footer :is(.footer-column h2,.brand) { color:#151917; }
html[data-theme="light"] .site-footer :is(.footer-brand p,.footer-column a,.footer-bottom p) { color:#5c6b60; }
html[data-theme="light"] .site-footer .footer-bottom { border-color:#dce2dc; }
html[data-theme="light"] .site-footer .footer-column a:hover { color:#145b33; }
html[data-theme="light"] .order-dialog { background:#fff; color:#151917; border-color:#cbdccd; box-shadow:0 25px 90px #192d1930; }
html[data-theme="light"] .order-dialog::backdrop { background:#23332955; }
html[data-theme="light"] .order-dialog :is(p,.order-close) { color:#5c6b60; }
html[data-theme="light"] .order-dialog a { color:#166936; }
html[data-theme="light"] .order-preview { background:#f0f6f0; border-color:#cbdccd; }
html[data-theme="light"] .order-cancellation { border-color:#dce2dc; }
/* The assistant follows the same light surfaces, including loading and answer states. */
html[data-theme="light"] .help-bot .bot-launcher { background:#fff; border-color:#dce2dc; }
html[data-theme="light"] .help-bot .bot-launcher:hover { background:#edf1ec; }
html[data-theme="light"] .help-bot .bot-panel { --terminal-accent:#206c48; background:#fff; border-color:#dce2dc; color:#253229; box-shadow:0 24px 65px #192d1924; }
html[data-theme="light"] .help-bot .bot-panel .bot-header { background:#f0f3ef; border-color:#dce2dc; }
html[data-theme="light"] .bot-panel .bot-header > img { border-color:#dce2dc; background:#fff; }
html[data-theme="light"] .bot-panel :is(.bot-header h2,.bot-intro > span,.bot-answer-title) { color:#151917; }
html[data-theme="light"] .bot-panel :is(.bot-close,.bot-back,.bot-question-group h3,.bot-no-results) { color:#5c6b60; }
html[data-theme="light"] .bot-panel .bot-close:hover { background:#e3ebe2; border-color:#cbdccd; color:#151917; }
html[data-theme="light"] .help-bot .bot-panel .bot-content { background-image:linear-gradient(#1c332904 1px,transparent 1px),linear-gradient(90deg,#1c332904 1px,transparent 1px); scrollbar-color:#a4b5a8 transparent; }
html[data-theme="light"] .help-bot.is-open .bot-intro,html[data-theme="light"] .bot-panel .bot-intro { color:#5c6b60; background:none; }
html[data-theme="light"] .bot-panel .bot-search { background:#f6f8f4; border-color:#dce2dc; }
html[data-theme="light"] .bot-panel .bot-search input { color:#253229; color-scheme:light; }
html[data-theme="light"] .bot-panel .bot-search input::placeholder { color:#6a776e; }
html[data-theme="light"] .bot-panel .bot-search svg { stroke:#6a776e; }
html[data-theme="light"] .bot-panel .bot-question-group h3::after { background:#dce2dc; }
html[data-theme="light"] .help-bot.is-open .bot-questions button,html[data-theme="light"] .bot-panel .bot-questions button { background:#fff; color:#182820; border-color:#dcefe5; }
html[data-theme="light"] .help-bot.is-open .bot-questions button:hover,html[data-theme="light"] .bot-panel .bot-questions button:hover { background:#fff; border-color:#00ad64; box-shadow:0 0 0 3px #00ad6414; }
html[data-theme="light"] .bot-panel .bot-question-icon,html[data-theme="light"] .bot-panel .bot-questions button::after { background:#e0f5ea; color:#00a65a; }
html[data-theme="light"] .help-bot .bot-panel .bot-answer { background:#f0f3ef; border-color:#cbdccd; color:#253229; box-shadow:none; }
html[data-theme="light"] .help-bot .bot-panel .bot-answer :is(p,li,a),html[data-theme="light"] .help-bot .bot-panel .bot-answer li::marker { color:#253229; }
html[data-theme="light"] .help-bot .bot-panel .bot-typing { background:#edf3ec; border-color:#cbdccd; }
html[data-theme="light"] .bot-panel .bot-footnote { background:#f0f3ef; border-color:#dce2dc; color:#5c6b60; }
html[data-theme="light"] .bot-panel .bot-footnote a { color:#375c43; }
/* Legal documents share this origin's saved theme. */
html[data-theme="light"] body.legal-page p { color:#526159; }
html[data-theme="light"] body.legal-page a { color:#166936; }
html[data-theme="light"] body.legal-page .brand { color:#151917; }
html[data-theme="light"] body.legal-page footer { color:#66716a; border-color:#dce2dc; }
body.legal-page .theme-toggle { margin-left:auto; }
@media(max-width:640px) { .site-header .header-actions { gap:9px; } .site-header .theme-toggle { gap:4px; } .site-header .theme-toggle svg { width:16px; } .site-header .theme-toggle .theme-track { width:34px; } .site-header .theme-toggle input:checked+.theme-track::after { transform:translateX(10px); } }
@media(max-width:360px) { .site-header .theme-toggle svg { display:none; } }
@media(prefers-reduced-motion:reduce) { .theme-toggle .theme-track::after { transition:none; } }
/* One brand accent on every page, including the Pro card's local tokens. */
html[data-theme], html[data-theme] body, html[data-theme] #account {
  --accent: #29d58b;
  --green: var(--accent);
  --green-bright: var(--accent);
}
html .hero .hero-copy .hero-start, html .trial-section .trial-button, html #account .planChoose {
  background: var(--accent); border-color: var(--accent);
}
html .hero .hero-copy .hero-start:hover, html .trial-section .trial-button:hover, html #account .planChoose:hover {
  background: var(--accent); border-color: var(--accent); filter: brightness(1.04);
}
html #account :is(.proTag, .proSavings) { background: var(--accent); }
html #account .planCard li::before { color: var(--accent); }
html[data-theme="dark"] #account :is(.planEyebrow, .billingOptions button[aria-pressed="true"]) { color: var(--accent); }
html #account .billingOptions button[aria-pressed="true"] { border-color: var(--accent); }

/* Keep the existing GrindMate logo consistent across public pages. */
img[src$="grindmate-logo.png"]{border-radius:22%;}

html[data-theme="dark"]{--bg:#202020;--surface:#242424;--text:#f2f2f2;--muted:#b0b0b0;--line:#414141}
html[data-theme="dark"] body{background-color:var(--bg);color:var(--text)}
