/* Shared runtime tokens; tailwind.config.js exposes these as accent utilities. */
/* The default accent (emerald) lives only here so first paint and accent.mjs agree. */
:root { --accent-default: #33d18d; --accent: var(--accent-default); --accent-foreground: #000000; --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--paper)); }
html[data-theme=dark] { --accent-default: #22d892; }
html[data-theme] { --blue: var(--accent); --blue-soft: var(--accent-soft); }
.button-primary, html[data-theme=dark] .button-primary:hover, .header-cta { background: var(--accent); color: var(--accent-foreground); border-color: var(--accent); }
.button-primary:hover, .header-cta:hover { filter: brightness(.94); background: var(--accent); }
.accent-trigger { display:flex; align-items:center; gap:8px; min-width:44px; min-height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:999px; }
.accent-trigger>span:first-child { width:18px; height:18px; border-radius:50%; background:var(--accent); border:1px solid currentColor; }
#accent-picker { max-height:calc(100dvh - 112px);overflow-y:auto;overscroll-behavior:contain;position:fixed; inset:100px 20px auto auto; margin:0; width:min(340px,calc(100vw - 32px)); padding:24px; border:1px solid var(--line); border-radius:18px; background:var(--paper); color:var(--ink); box-shadow:0 16px 50px #0003; }
#accent-picker h2 { font-size:21px; margin:0 0 8px; }
#accent-picker p { font-size:14px; line-height:1.5; color:var(--muted); margin-bottom:20px; }
.accent-presets { display:flex; gap:8px; }
.accent-presets button { flex:1; min-height:48px; border:1px solid var(--line); border-radius:10px; font-size:13px; padding:8px; }
.accent-presets button::before { content:''; display:block; width:22px; height:22px; border-radius:50%; margin:0 auto 8px; background:var(--swatch); }
[data-accent=brand] { --swatch:var(--hubiq-brand); }
[data-accent=teal] { --swatch:#176b68; } [data-accent=blue] { --swatch:#4966b7; } [data-accent=terracotta] { --swatch:#b65535; }
.accent-presets button[aria-pressed=true] { outline:2px solid var(--ink); outline-offset:2px; }
.accent-custom { display:flex; justify-content:space-between; align-items:center; margin-top:24px; font-size:14px; }
#accent-custom { width:64px; height:44px; cursor:pointer; }
#accent-value { display:block; font-family:monospace; margin:8px 0 16px; }
.accent-reset { text-decoration:underline; text-underline-offset:4px; min-height:44px; }
@media(max-width:700px) { .accent-trigger-label { display:none; } .accent-trigger { padding:10px; } #accent-picker { top:84px; right:16px; } }
html[data-theme=dark] .header-cta { background:var(--accent); color:var(--accent-foreground); border-color:var(--accent); }
/* Inline marks and SVG beams inherit the live branding token, including theme changes. */
.brand-mark, .wordmark { color:var(--accent); }
.wordmark>.brand-mark { width:30px; height:30px; flex:none; }
.logo-relief>.brand-mark { position:absolute; inset:0; width:100%; height:100%; }
.logo-relief>.logo-depth { transform:translate(3px,5px); opacity:.18; }
.closing-mark>.brand-mark { width:100%; height:100%; }
html[data-theme=dark] .brand-mark { filter:none; }
/* Only the mark dot and the period after the wordmark carry the brand color. */
.brand-mark, .wordmark { color:var(--ink); }
.brand-mark circle { fill:var(--accent); }
html[data-theme] #v1-inline-root .logo-wrapper>svg { filter:none; }
#v1-inline-root .logo-wrapper>svg g, #v1-inline-root .logo-wrapper>svg text { fill:var(--ink); }
#v1-inline-root .logo-wrapper>svg circle, #v1-inline-root .logo-wrapper>svg .brand-word-period { fill:var(--accent); }
.wordmark, .wordmark>.brand-mark { color:inherit; }
.builder-window .composer-field button:not(:disabled), .builder-window .app-solid-button { background:var(--accent); color:var(--accent-foreground); }
.builder-window .mobile-pane-tabs button[aria-selected=true] { background:var(--accent); color:var(--accent-foreground); }
.builder-window .app-suggestion:hover { border-color:var(--accent); }

.brand-word-dot { color:var(--accent); }

.accent-presets{flex-wrap:wrap}.accent-presets button{flex:1 0 28%}
[data-accent=lime]{--swatch:#BBE93F}[data-accent=orange]{--swatch:#F59324}

/* Accessible rationale for the recommended accent: hover, keyboard focus, or tap. */
.accent-presets{position:relative}
.accent-presets .jade-preset{flex:1 0 28%;display:flex;align-items:center;gap:2px}
.jade-preset>[data-accent]{flex:1;min-width:0}
.accent-presets .jade-info-trigger{flex:none;min-height:44px;min-width:30px;padding:4px;border:0;font-size:18px}
.accent-presets .jade-info-trigger::before{display:none}
.jade-info [role=tooltip]{display:none;position:absolute;z-index:2;right:0;bottom:52px;width:min(270px,calc(100vw - 80px));padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink);box-shadow:0 8px 28px #0003;font-size:12px;line-height:1.5}
.jade-info:hover [role=tooltip],.jade-info:focus-within [role=tooltip]{display:block}

/* The shared Hubiq mark (@hubiq/brand/brand.css) follows the chosen accent everywhere. */
:root { --brand-accent: var(--accent); }
