/* Light grigio / bianco / lime — 4 ottobre 2026.
   Load after page styles. The original Light remains in the base stylesheets.
   Restore instructions: CONTESTO_PROGETTO.md, section 5.
   Keep readable green text separate from the decorative lime accent. */
:root:is([data-theme="light"], :not([data-theme])) {
  --bg: #e7eaed;
  --card: #ffffff;
  --ink: #202526;
  --muted: #586165;
  --border: #c9d0d3;
  --border-strong: #b5bfc4;
  --red: #4b6510;
  --light-accent: #c5f544;
  --light-accent-hover: #b6e536;
  --hero-terminal-bg: #ffffff;
  --hero-terminal-border: #c9d0d3;
  --hero-terminal-text: #4b6510;
  --hero-terminal-prompt: #202526;
  /* CV-specific tokens: preserve its layout and typography. */
  --red-soft: #eff8d7;
  --badge-border: #c7d6a3;
  --mini-bg: #ffffff;
}

/* Existing orbital motif, with the palette shown in the approved preview. */
:root:is([data-theme="light"], :not([data-theme])) .console-ambient {
  background: radial-gradient(ellipse at 90% 35%, color-mix(in srgb, var(--light-accent) 9%, transparent), transparent 63%);
}
:root:is([data-theme="light"], :not([data-theme])) .dashboard {
  background: radial-gradient(ellipse at 90% 35%, color-mix(in srgb, var(--light-accent) 9%, transparent), transparent 63%), var(--bg);
}
:root:is([data-theme="light"], :not([data-theme])) :is(.console-ambient span, .ribbon) {
  border-color: color-mix(in srgb, var(--light-accent) 24%, transparent);
  box-shadow: 0 -17px 0 color-mix(in srgb, var(--light-accent) 7%, transparent), 0 -36px 0 color-mix(in srgb, var(--light-accent) 4%, transparent);
}

/* White surfaces, lime selection and decorative rules. */
:root:is([data-theme="light"], :not([data-theme])) :is(.console-tile, .ai-card),
:root:is([data-theme="light"], :not([data-theme])) .platform[data-key] .tile-face {
  background: var(--card);
}
:root:is([data-theme="light"], :not([data-theme])) :is(.console-tile.is-selected, .platform[aria-pressed="true"]) {
  border-color: var(--light-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--light-accent) 25%, transparent), 0 18px 40px color-mix(in srgb, var(--ink) 9%, transparent);
}
:root:is([data-theme="light"], :not([data-theme])) :is(.redline, .contact-dot),
:root:is([data-theme="light"], :not([data-theme])) :is(.banner, .contact-strip, .ai-card, .pcard, .job)::before,
:root:is([data-theme="light"], :not([data-theme])) :is(.console-tile.is-selected, .platform[aria-pressed="true"], .intro h1)::after {
  background: var(--light-accent);
}
:root:is([data-theme="light"], :not([data-theme])) .materials-next {
  border-top-color: var(--light-accent);
}
:root:is([data-theme="light"], :not([data-theme])) .ai-construction {
  --construction-accent: var(--light-accent);
}
:root:is([data-theme="light"], :not([data-theme])) :is(.materials-filter.is-active, .filter-btn.active) {
  background: var(--light-accent);
  border-color: var(--red);
  color: var(--ink);
}
:root:is([data-theme="light"], :not([data-theme])) .page-dot.active {
  background: var(--red);
}

/* Selected carousel titles: repeat the marker on each line of longer names.
   No padding or font changes: selection keeps the existing title geometry. */
:root:is([data-theme="light"], :not([data-theme])) .console-tile.is-selected .console-title,
:root:is([data-theme="light"], :not([data-theme])) .platform[aria-pressed="true"] .tile-word {
  width: fit-content;
  max-width: 100%;
  color: var(--ink);
  background-image: linear-gradient(transparent 47%, var(--light-accent) 47%, var(--light-accent) 94%, transparent 94%);
  background-size: 100% 1.1em;
  background-repeat: repeat-y;
}
:root:is([data-theme="light"], :not([data-theme])) .platform[aria-pressed="true"] .tile-word {
  background-size: 100% 1em;
}
:root:is([data-theme="light"], :not([data-theme])) .console-tile.is-selected .console-title > span,
:root:is([data-theme="light"], :not([data-theme])) .platform[aria-pressed="true"] .tile-accent {
  color: var(--ink);
}

/* The arrow remains decorative: the card retains the existing click behavior. */
:root:is([data-theme="light"], :not([data-theme])) :is(.console-bottom, .tile-bottom) {
  align-items: center;
  gap: 8px;
  min-height: 24px;
}
:root:is([data-theme="light"], :not([data-theme])) .console-tile.is-selected .console-bottom > span[aria-hidden="true"],
:root:is([data-theme="light"], :not([data-theme])) .platform[aria-pressed="true"] .tile-bottom > span[aria-hidden="true"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  background: var(--light-accent);
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0;
}

/* Filled actions always use dark text on lime, including hover and focus. */
:root:is([data-theme="light"], :not([data-theme])) :is(
  .console-open, .contact-strip__link, .materials-jump, .selection button,
  .download-link:not(.download-link--secondary), .backlink
) {
  background: var(--light-accent);
  border-color: var(--light-accent);
  color: var(--ink);
}
:root:is([data-theme="light"], :not([data-theme])) :is(
  .console-open, .contact-strip__link, .materials-jump, .selection button,
  .download-link:not(.download-link--secondary), .backlink
):is(:hover, :focus-visible) {
  background: var(--light-accent-hover);
  border-color: var(--red);
  color: var(--ink);
}
:root:is([data-theme="light"], :not([data-theme])) :is(
  .materials-card a, .materials-next a, .profile-actions a, .copy-id,
  .slide-arrow, .console-controls button:enabled
):is(:hover, :focus-visible) {
  background: var(--light-accent);
  border-color: var(--red);
  color: var(--ink);
}
:root:is([data-theme="light"], :not([data-theme])) .theme-toggle {
  border-color: var(--border-strong);
}
:root:is([data-theme="light"], :not([data-theme])) .theme-toggle:hover {
  border-color: var(--red);
  color: var(--red);
}
/* Footer status: etichetta distinta e online sempre verde — 8 ottobre 2026. */
:root:is([data-theme="light"], :not([data-theme])) .footer-note--status {
  color: #202526;
}
:root:is([data-theme="light"], :not([data-theme])) .footer-note--status .footer-note__online {
  color: #16702b;
}
:root:is([data-theme="light"], :not([data-theme])) :is(a, button):focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 5px;
}
