/* Light theme for the public site. theme.js sets html[data-theme] before the first paint
   (system setting by default, nav button to switch). Same identity tokens, light values;
   the teal is one step darker than the light logo's #00897b so white text on it and teal text on white both pass WCAG AA. */
html[data-theme="light"] .identity-abyss {
  --abyss: #f5f8f8; --deep: #ffffff; --tide: #edf3f4; --rim: #d3e0e3;
  --ink: #0a1c29; --ink-2: #2c4651; --mute: #4c626b;
  --glow: #00796b; --glow-2: #00695c; --glow-soft: rgba(0, 121, 107, .10);
  --line: #d3e0e3;
  color-scheme: light;
}

/* Theme button in the nav (and in the mobile drawer, which clones the nav) */
.theme-toggle { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 1px solid var(--rim, #16384a); border-radius: 999px; background: transparent; color: var(--ink-2, #b4cbd0); cursor: pointer; }
.theme-toggle:hover { color: var(--ink, #e9f4f5); border-color: var(--glow, #2ee6c8); }
.theme-toggle:focus-visible { outline: 2px solid var(--glow-2, #7af2dc); outline-offset: 2px; }
.theme-toggle .i-moon { display: none; }
html[data-theme="light"] .theme-toggle .i-sun { display: none; }
html[data-theme="light"] .theme-toggle .i-moon { display: inline; }

/* ---- Components that hard-code dark colours ---- */
/* Visuals kept dark in both themes (product tour stage): restore the dark tokens inside. */
/* Interactive blog widgets and signature visuals stay dark islands, framed on the light page. */
html[data-theme="light"] .tour-stage, html[data-theme="light"] .blog-figure, html[data-theme="light"] .barista, html[data-theme="light"] .demo, html[data-theme="light"] .lab, html[data-theme="light"] .sast-game, html[data-theme="light"] .sca-city, html[data-theme="light"] .trace, html[data-theme="light"] .identity-abyss .sim-card, html[data-theme="light"] .identity-abyss .trust-boundary-visual, html[data-theme="light"] .identity-abyss .trust-review-section .trust-review-layout {
  --abyss: #040b12; --deep: #071521; --tide: #0c2231; --rim: #16384a;
  --ink: #e9f4f5; --ink-2: #b4cbd0; --mute: #7d979e; --glow: #2ee6c8; --glow-2: #7af2dc; --glow-soft: rgba(46, 230, 200, .14);
  color: var(--ink); color-scheme: dark;
}
html[data-theme="light"] .barista, html[data-theme="light"] .demo, html[data-theme="light"] .sast-game, html[data-theme="light"] .sca-city, html[data-theme="light"] .trace { background-color: #071521; border-radius: 12px; }
html[data-theme="light"] .identity-abyss .nav .nav-inner { background: rgba(255, 255, 255, .9); border-color: var(--rim); box-shadow: 0 10px 30px -16px rgba(10, 28, 41, .3); }
html[data-theme="light"] .nav-roles-menu { --menu-bg: #ffffff; background: #ffffff; box-shadow: 0 18px 40px -18px rgba(10, 28, 41, .35), inset 0 0 0 1px var(--rim); }
html[data-theme="light"] .identity-abyss .btn-primary, html[data-theme="light"] .btn-glow, html[data-theme="light"] .public-site .btn-primary, html[data-theme="light"] .contact-layout .btn-primary { color: #ffffff; background: var(--glow); border-color: var(--glow); box-shadow: 0 10px 26px -12px rgba(0, 137, 123, .55); }
html[data-theme="light"] .identity-abyss .btn-primary:hover, html[data-theme="light"] .btn-glow:hover, html[data-theme="light"] .contact-layout .btn-primary:hover { background: var(--glow-2); border-color: var(--glow-2); }

/* Home */
html[data-theme="light"] .identity-abyss .home-hero { background: radial-gradient(55% 60% at 74% 55%, rgba(0, 137, 123, .14), transparent 70%), radial-gradient(40% 40% at 15% 10%, rgba(0, 137, 123, .07), transparent 70%), var(--abyss); }
html[data-theme="light"] .identity-abyss .home-hero h1 span { text-shadow: none; }
html[data-theme="light"] .sieve-label, html[data-theme="light"] .sieve-finding { background: rgba(255, 255, 255, .94); box-shadow: inset 0 0 0 1px var(--rim), 0 12px 30px -18px rgba(10, 28, 41, .35); }
html[data-theme="light"] .lifecycle-stage { background: var(--deep); box-shadow: inset 0 0 0 1px var(--rim), 0 16px 34px -24px rgba(10, 28, 41, .3); }
html[data-theme="light"] .lifecycle-return > span { background: var(--deep); }
html[data-theme="light"] .identity-abyss .integration-group li { background: var(--deep); }
html[data-theme="light"] .home-redesign .contact-section { --ink: #0a1c29; --ink-2: #304b56; color: var(--ink); }
html[data-theme="light"] .contact-layout label, html[data-theme="light"] .contact-layout > div > a { color: var(--ink); }
html[data-theme="light"] .contact-layout input, html[data-theme="light"] .contact-layout textarea, html[data-theme="light"] .contact-layout select { color: var(--ink); }
html[data-theme="light"] .contact-layout textarea::placeholder, html[data-theme="light"] .contact-layout input::placeholder { color: var(--mute); }
@media (max-width: 760px) { html[data-theme="light"] .lifecycle-stage { background: none; box-shadow: none; } html[data-theme="light"] .lifecycle-stage ul li { background: var(--deep); } }

/* Role pages */
html[data-theme="light"] .role-cycle { background: var(--deep); }
html[data-theme="light"] .tour-step:hover { background: var(--tide); }
html[data-theme="light"] .tour-step[aria-pressed="true"] { background: var(--deep); box-shadow: inset 0 0 0 1px var(--glow), 0 12px 30px -18px rgba(0, 137, 123, .45); }
html[data-theme="light"] .tour-step[aria-pressed="true"] .tour-num { color: #ffffff; }

/* Trust page */
html[data-theme="light"] .frontier-zone { background: var(--tide); }
html[data-theme="light"] .trust-page .trust-center-hero .lede, html[data-theme="light"] .trust-page .trust-status-key dd { color: var(--ink-2); }
html[data-theme="light"] .trust-page .trust-status.is-public, html[data-theme="light"] .trust-page .trust-center-hero .trust-status.is-public { color: #00695c; background: #dff2ee; }
html[data-theme="light"] .trust-page .trust-status.is-review, html[data-theme="light"] .trust-page .trust-center-hero .trust-status.is-review { color: #7a5200; background: #fff1cc; }
html[data-theme="light"] .trust-page .trust-status.is-unclaimed, html[data-theme="light"] .trust-page .trust-center-hero .trust-status.is-unclaimed { color: #475569; background: #eef2f5; }

/* Trust page, deployment modes */
html[data-theme="light"] .sec-modes article { background: var(--deep); box-shadow: inset 0 0 0 1px var(--rim), 0 16px 34px -26px rgba(10, 28, 41, .3); }
html[data-theme="light"] .frontier-arrow, html[data-theme="light"] .frontier-cross-text { background: var(--tide); }
html[data-theme="light"] .trust-page .trust-center-hero .eyebrow, html[data-theme="light"] .identity-abyss .eyebrow { color: var(--glow-2); }

/* Blog: the amber and red accents are pale tints made for a dark page */
html[data-theme="light"] .bubble mark { background: rgba(214, 140, 0, .16); color: #7a4d00; }
html[data-theme="light"] .a-typed { color: #7a4d00; background: rgba(214, 140, 0, .12); border-bottom-color: #c27c00; }
html[data-theme="light"] .chip.is-fp { color: #7a4d00; border-color: rgba(194, 124, 0, .5); background: rgba(214, 140, 0, .08); }
html[data-theme="light"] .filter-table td.yes { color: #7a4d00; }
html[data-theme="light"] .filter-table td.keep, html[data-theme="light"] .filter-table td.keep .ico, html[data-theme="light"] .cast-group.is-vuln .cast-count { color: #b42318; }
html[data-theme="light"] .cast.is-vuln .cast-tag { background: rgba(180, 35, 24, .1); color: #b42318; }

/* First block of every page other than home: same light glow as the home hero */
html[data-theme="light"] .identity-abyss:not(.home-redesign) main > section:first-child, html[data-theme="light"] .role-hero { background: radial-gradient(55% 70% at 78% 40%, rgba(0, 137, 123, .12), transparent 70%), radial-gradient(40% 40% at 15% 10%, rgba(0, 137, 123, .06), transparent 70%), var(--abyss); }
html[data-theme="light"] .role-exchange > div { background: var(--deep); box-shadow: inset 0 0 0 1px var(--rim), 0 16px 34px -26px rgba(10, 28, 41, .3); }
html[data-theme="light"] .blog-search-key { color: var(--ink-2); }

/* Second pass (WCAG AA audit, 4.5:1 for body text) */
html[data-theme="light"] .identity-abyss .marquee li { background: var(--deep); color: var(--ink-2); }
html[data-theme="light"] .contact-layout form > p { color: var(--mute); }
html[data-theme="light"] .filter-cond strong { color: #7a4d00; }
html[data-theme="light"] .identity-abyss .status-chip.is-available { color: #ffffff; }
html[data-theme="light"] .identity-abyss .intro-note, html[data-theme="light"] .identity-abyss .sieve-stage figcaption, html[data-theme="light"] .identity-abyss .product-caption, html[data-theme="light"] .identity-abyss .example-note, html[data-theme="light"] .role-shot-note { opacity: 1; color: var(--mute); }
html[data-theme="light"] .blog-paper :is(p, li) > strong { background-image: linear-gradient(transparent 60%, rgba(0, 121, 107, .16) 0); }
