/* Kenea colour modes. Loaded after every component stylesheet.
   Bean/Echo/Cinnabar remain exact; raised dark surfaces are functional derivatives.
   Photographs, project artwork and third-party marks retain their original colours. */
:root {
  color-scheme: light;
  --theme-logo-light: block;
  --theme-logo-dark: none;
  --theme-icon-moon: block;
  --theme-icon-sun: none;
  --theme-accent-hover-ink: #fff;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-page: #001410;
  --surface-white: #0d2520;
  --surface-soft: #17302a;
  --surface-blue: #0d2520;
  --surface-dark: #001410;
  --ink-primary: #eae9e7;
  --ink-secondary: #b2b3b6;
  --ink-inverse: #eae9e7;
  --signal-hover: #ff987d;
  --status-ok: #eae9e7;
  --status-ok-bg: #17302a;
  --status-warning: #f49a83;
  --status-warning-bg: #301d18;
  --status-unknown: #f49a83;
  --border: #40554f;
  --shadow: 0 18px 44px #0000003d;
  --theme-logo-light: none;
  --theme-logo-dark: block;
  --theme-icon-moon: none;
  --theme-icon-sun: block;
  --theme-accent-hover-ink: #001410;
}
/* A complete system fallback also works if JavaScript is unavailable. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --surface-page: #001410;
    --surface-white: #0d2520;
    --surface-soft: #17302a;
    --surface-blue: #0d2520;
    --surface-dark: #001410;
    --ink-primary: #eae9e7;
    --ink-secondary: #b2b3b6;
    --ink-inverse: #eae9e7;
    --signal-hover: #ff987d;
    --status-ok: #eae9e7;
    --status-ok-bg: #17302a;
    --status-warning: #f49a83;
    --status-warning-bg: #301d18;
    --status-unknown: #f49a83;
    --border: #40554f;
    --shadow: 0 18px 44px #0000003d;
    --theme-logo-light: none;
    --theme-logo-dark: block;
    --theme-icon-moon: none;
    --theme-icon-sun: block;
    --theme-accent-hover-ink: #001410;
  }
}

.cabecera .theme-wordmark--light { display: var(--theme-logo-light); }
.cabecera .theme-wordmark--dark { display: var(--theme-logo-dark); }
.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--ink-primary);
  background: transparent;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--ink-primary); background: var(--surface-white); }
.theme-toggle:focus-visible { outline: 3px solid var(--signal-primary); outline-offset: 4px; }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.theme-toggle__moon { display: var(--theme-icon-moon); }
.theme-toggle__sun { display: var(--theme-icon-sun); }
.theme-reset { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; padding: 6px 0; border: 0; background: none; color: var(--ink-primary); text-align: left; text-decoration: underline; text-underline-offset: 4px; font: inherit; }
#theme-description:focus { outline: 2px solid var(--signal-primary); outline-offset: 4px; }

/* Older components sometimes use the text token as a background, or literal white. */
.saltar, .bloque, .panel { background: var(--surface-white); color: var(--ink-primary); }
.button, .boton { color: #001410; }
.button:hover, .boton:hover { color: var(--theme-accent-hover-ink); }
.button--secondary, .boton--borde { color: var(--ink-primary); }
.button--secondary:hover, .boton--borde:hover { background: var(--surface-soft); color: var(--ink-primary); }
.button--light, .boton--claro { color: #001410; }
.demo-escenarios input:checked + span { color: var(--surface-page); }
.eval-blueprint { background: var(--surface-dark); }
.eval-primary { color: #001410; }
.eval-primary:hover { color: var(--surface-page); }
.eval-error { color: var(--status-warning); border-left-color: var(--status-warning); }
.process-preview li:last-child .process-node,
.signal-mobile > strong,
.product-wordmark--factu,
.product-annex__mark--factu,
.product-annex__mark--factu span { color: #001410; }
.account-status[data-error] { border-color: var(--status-warning); }
::selection { color: #001410; }
.project-detail summary { color: var(--ink-primary); }
.project-detail > div { color: var(--ink-secondary); }
.project-detail summary:focus-visible { outline-color: var(--ink-primary); }

/* The video cards and authored visual studies keep their own material palette. */
.official-videos,
.official-videos__eyebrow,
.official-videos h2,
.official-videos__intro > p,
.official-videos__privacy { color: var(--ink-primary); }
.official-videos__privacy a:focus-visible { outline-color: var(--ink-primary); }

/* Official logos sit on a neutral light panel; never invert or recolour the SVG. */
.m365-map__icon,
.technology-example__product,
.microsoft-context,
.resource-feature__marks,
.project-platform { background: #f4f3f1; color: #001410; color-scheme: light; }
.microsoft-context { padding-inline: 20px; }
.resource-feature__marks { padding: 20px; }
.resource-feature__marks > span { color: #4e5551; }
.microsoft-context a:hover { color: #ad3110; }

@media (max-width: 380px) {
  .cabecera .marca img { width: 96px; }
  .cabecera__acciones { gap: 4px; }
  .language-switch a { min-width: 32px; }
}
@media print {
  :root, :root[data-theme="dark"] {
    color-scheme: light;
    --surface-page: #fff;
    --surface-white: #fff;
    --surface-soft: #eae9e7;
    --ink-primary: #001410;
    --ink-secondary: #4e5551;
    --signal-hover: #ad3110;
    --border: #b2b3b6;
  }
}
