/* Noisy API — Sage & Forest v11
   Paleta verde salvia apagado y verde bosque, con superficies de profundidad diferenciada.
   Solo se activa en modo claro; el tema oscuro conserva sus estilos originales. */

:root[data-noisy-theme="light"] {
  color-scheme: light;

  /* Sage & Forest: gris salvia medio, paneles verde-gris y acentos bosque. */
  --noisy-page: #B0BDAF;
  --noisy-page-deep: #A6B5A5;
  --noisy-surface: #C6D0C2;
  --noisy-surface-high: #D0D9CA;
  --noisy-surface-low: #B9C6B6;
  --noisy-inset: #A9B9A8;
  --noisy-inset-deep: #9CAF9B;
  --noisy-border: #7E9582;
  --noisy-border-soft: #91A493;
  --noisy-text: #253B32;
  --noisy-text-body: #354C40;
  --noisy-text-muted: #354C40;
  --noisy-text-faint: #354C40;
  --noisy-accent: #195C49;
  --noisy-accent-deep: #144A3B;
  --noisy-accent-soft: #AEC7B0;
  --noisy-accent-border: #789B82;
  --noisy-violet: #766fa8;
  --noisy-green: #2F7658;
  --noisy-red: #A34E52;
  --noisy-yellow: #81652B;
  --noisy-shadow: 0 12px 30px rgba(35, 54, 40, .15);

  /* CSS variables shared by the original page styles. */
  --bg: var(--noisy-page);
  --panel: var(--noisy-surface);
  --panel2: var(--noisy-surface-low);
  --line: rgba(44, 65, 50, .24);
  --line2: rgba(25, 92, 73, .38);
  --text: var(--noisy-text);
  --muted: var(--noisy-text-muted);
  --cyan: var(--noisy-accent);
  --violet: var(--noisy-violet);
  --green: var(--noisy-green);
  --red: var(--noisy-red);
  --danger: var(--noisy-red);
  --yellow: var(--noisy-yellow);
  --shadow: var(--noisy-shadow);
}

html[data-noisy-theme="light"] {
  background: var(--noisy-page) !important;
  color-scheme: light;
}
html[data-noisy-theme="light"] body {
  background-color: var(--noisy-page) !important;
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(74, 124, 85, .14), transparent 42%),
    radial-gradient(ellipse at 100% 88%, rgba(108, 126, 90, .10), transparent 40%),
    linear-gradient(145deg, #B7C4B5 0%, #B0BDAF 52%, #A9B9A8 100%) !important;
  color: var(--noisy-text) !important;
}

/* Shared text rhythm. Specific semantic colors are defined below. */
html[data-noisy-theme="light"] :is(
  .profile-shell, .dashboard-shell, .app, #main-content, .tester-shell,
  .mod-shell, .public-shell, .security-shell, .verify-shell,
  .login-page, .signup-page, .box, .bg-404
) {
  color: var(--noisy-text) !important;
}
html[data-noisy-theme="light"] :is(
  .profile-shell, .dashboard-shell, .app, #main-content, .tester-shell,
  .mod-shell, .public-shell, .security-shell, .verify-shell,
  .login-page, .signup-page, .box, .bg-404
) :is(h1, h2, h3, h4, h5, h6, .card-title, .card-headline h2,
      .panel-heading h2, .dash-title, .key-name, .metric strong,
      .account-line strong, .info-copy strong, .network-item strong,
      .user-info strong, .username, .section-head h2, .social-head h2,
      .final-box h2, .auth-card h3, .legal-card h3, .usage-copy h3,
      .operation-copy h3, .sheet-head h2, .verify-card h1,
      .modal-box h2, .dashboard-card h2) {
  color: var(--noisy-text) !important;
}
html[data-noisy-theme="light"] :is(
  .profile-shell, .dashboard-shell, .app, #main-content, .tester-shell,
  .mod-shell, .public-shell, .security-shell, .verify-shell,
  .login-page, .signup-page, .box, .bg-404
) :is(p, small, label, .eyebrow, .card-eyebrow, .muted, .lead,
      .hero-description, .hero-note, .panel-top, .panel-foot, .mini-kicker,
      .section-label, .section-intro, .info-copy small, .network-item small,
      .key-id, .key-foot, .keys-status, .metric small, .metric span,
      .quota-panel small, .quota-panel span, .analytics-label span,
      .analytics-key-row small, .footer, .operation-copy p,
      .service-path, .service-name, .catalog-kicker, .catalog-intro p,
      .folder-info small, .folder-count, .report-meta, .user-info span,
      .field > span, .consent, .login-link, .signup-link, .hint,
      .security-line, .profile-footer, .session-pill, .status,
      .privacy-note, .modal-kicker, .modal-header p) {
  color: var(--noisy-text-muted) !important;
  opacity: 1 !important;
}
html[data-noisy-theme="light"] :is(
  .profile-shell, .dashboard-shell, .app, #main-content, .tester-shell,
  .mod-shell, .public-shell, .security-shell, .verify-shell,
  .login-page, .signup-page
) :is(.brand b, .brand-name, .brand-copy b) {
  color: var(--noisy-text) !important;
}
html[data-noisy-theme="light"] :is(
  .profile-shell, .dashboard-shell, .app, #main-content, .tester-shell,
  .mod-shell, .public-shell, .security-shell, .verify-shell,
  .login-page, .signup-page
) :is(.brand small, .brand-subtitle, .brand-copy small) {
  color: var(--noisy-text-muted) !important;
}
html[data-noisy-theme="light"] a:not(.brand):not(.noisy-theme-toggle) {
  color: var(--noisy-accent-deep);
}
html[data-noisy-theme="light"] a:not(.brand):not(.noisy-theme-toggle):hover {
  color: #144A3B;
}
html[data-noisy-theme="light"] :is(p, li, td, dd, .hero-description, .lead, .operation-copy) {
  color: var(--noisy-text-body);
}

/* Shared controls: tinted slate fields/buttons instead of white rectangles. */
html[data-noisy-theme="light"] :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  textarea, select
) {
  background: var(--noisy-inset) !important;
  color: var(--noisy-text) !important;
  -webkit-text-fill-color: var(--noisy-text) !important;
  border-color: var(--noisy-border) !important;
  box-shadow: inset 0 1px 2px rgba(35, 54, 40, .07) !important;
  caret-color: var(--noisy-accent-deep) !important;
}
html[data-noisy-theme="light"] :is(input, textarea, select)::placeholder {
  color: #354C40 !important;
  -webkit-text-fill-color: #354C40 !important;
  opacity: 1 !important;
}
html[data-noisy-theme="light"] :is(input, textarea, select):focus {
  border-color: var(--noisy-accent) !important;
  outline-color: rgba(25, 92, 73, .34) !important;
  box-shadow: 0 0 0 3px rgba(25, 92, 73, .14) !important;
}
html[data-noisy-theme="light"] :is(button, input[type="button"], input[type="submit"], .btn) {
  background: var(--noisy-surface-low);
  color: var(--noisy-text);
  border-color: var(--noisy-border);
}
html[data-noisy-theme="light"] :is(button, .btn):disabled {
  opacity: .72;
  color: #4A5F50;
}
html[data-noisy-theme="light"] :is(
  .ghost, .ghost-modal, .upload-button, .dashboard-link, .profile-button,
  .quick-nav a, .ghost-button, .expand-btn, .sheet-close,
  .route button, .panel-head button, .response-bar button,
  .tab-btn, .response-tab, .secondary, .table-button,
  .report-actions button, .pagination button, .info-action,
  .key-icon-button, .key-actions button, .name-actions button,
  .oauth-button, .back-link, .support
) {
  background: var(--noisy-surface-low) !important;
  color: #30483C !important;
  border-color: var(--noisy-border) !important;
  box-shadow: 0 2px 5px rgba(35, 54, 40, .07) !important;
  text-decoration-color: currentColor;
}
html[data-noisy-theme="light"] :is(
  .ghost, .ghost-modal, .upload-button, .dashboard-link, .profile-button,
  .quick-nav a, .ghost-button, .expand-btn, .sheet-close,
  .route button, .panel-head button, .response-bar button,
  .tab-btn, .response-tab, .secondary, .table-button,
  .report-actions button, .pagination button, .info-action,
  .key-icon-button, .key-actions button, .name-actions button,
  .oauth-button, .back-link, .support
):hover:not(:disabled) {
  background: #AEBEAD !important;
  border-color: #78947F !important;
}
html[data-noisy-theme="light"] :is(
  .primary, .cta-button, .submit, #test-endpoint-btn, .create-key,
  .primary-btn, .test-endpoint-btn, .go-btn, .explore-btn
) {
  background: linear-gradient(112deg, #62AB9A 0%, #8e91c5 100%) !important;
  color: #253B32 !important;
  -webkit-text-fill-color: #253B32 !important;
  border-color: #789B82 !important;
  box-shadow: 0 6px 15px rgba(30, 94, 67, .16) !important;
}
html[data-noisy-theme="light"] :is(
  .primary, .cta-button, .submit, #test-endpoint-btn, .create-key,
  .primary-btn, .test-endpoint-btn, .go-btn, .explore-btn
):hover:not(:disabled) {
  filter: brightness(.97) saturate(1.03);
}
html[data-noisy-theme="light"] :is(.danger, .danger-btn, .verification-lock) {
  color: #87404b !important;
  background: #d8bfc3 !important;
  border-color: #b98790 !important;
}
html[data-noisy-theme="light"] :is(.tab-btn.active, .response-tab.active, .scope-option.selected, .scope-option.active, .oauth-button.active) {
  background: var(--noisy-accent-soft) !important;
  color: #1D5B48 !important;
  border-color: var(--noisy-accent-border) !important;
}
html[data-noisy-theme="light"] :is(.badge, .status-badge, .operation-badge, .mod-badge, .method-badge, .method-mini, .method-tag) {
  background: #AEC7B0 !important;
  color: #1F5C4A !important;
  border-color: #789B82 !important;
}
html[data-noisy-theme="light"] :is(.status-dot, .status i, .system-status i, .hero-status i, .info-state i, .identity-status i, .keys-status .status-dot, .live i, .mod-shell .status-dot) {
  background: #2F7658 !important;
  box-shadow: 0 0 7px rgba(47, 118, 88, .20) !important;
}
html[data-noisy-theme="light"] :is(.error, .form-message, .message:not(.ok), .field .error) {
  color: #9e4854 !important;
}
html[data-noisy-theme="light"] :is(.form-message.success, .message.ok, .success) {
  color: #276B4F !important;
}

/* Theme switch button remains easy to find without using a white pill. */
.noisy-theme-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid rgba(54, 227, 255, .42);
  border-radius: 999px;
  background: rgba(10, 16, 28, .96);
  color: #f2f7ff;
  font: 650 12px/1.1 Inter, system-ui, sans-serif;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .24);
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .18s ease, box-shadow .18s ease;
}
.noisy-theme-toggle:hover { transform: translateY(-2px); }
.noisy-theme-toggle:focus-visible { outline: 3px solid #36e3ff; outline-offset: 3px; }
html[data-noisy-theme="light"] .noisy-theme-toggle {
  background: #A9B9A8 !important;
  color: #293F35 !important;
  border-color: #78947F !important;
  box-shadow: 0 6px 18px rgba(35, 54, 40, .18) !important;
}
@media (max-width: 520px) {
  .noisy-theme-toggle { right: 10px; bottom: 10px; min-height: 39px; padding: 9px 11px; }
}

/* Shared navigation bars; the diamond itself is intentionally untouched. */
html[data-noisy-theme="light"] :is(.profile-shell, .dashboard-shell, .app, #main-content, .tester-shell, .mod-shell, .public-shell, .verify-shell) .topbar,
html[data-noisy-theme="light"] .mod-topbar,
html[data-noisy-theme="light"] .verify-top {
  border-color: rgba(44, 65, 50, .24) !important;
}
html[data-noisy-theme="light"] :is(.profile-shell, .dashboard-shell, .app, #main-content, .tester-shell, .mod-shell, .public-shell, .verify-shell) .quick-nav a {
  text-decoration: none !important;
}
html[data-noisy-theme="light"] :is(.profile-shell, .dashboard-shell, .app, #main-content, .tester-shell, .mod-shell, .public-shell) .footer,
html[data-noisy-theme="light"] :is(.profile-footer, .mod-footer, .security-line, .security) {
  background: rgba(190, 205, 187, .78) !important;
  color: var(--noisy-text-muted) !important;
  border-color: var(--noisy-border-soft) !important;
}

/* ACCOUNT PROFILE — profile cards, every nested row, keys, limits and dialogs. */
html[data-noisy-theme="light"] .profile-shell .session-pill {
  background: var(--noisy-surface-low) !important;
  color: var(--noisy-text-muted) !important;
  border-color: var(--noisy-border) !important;
}
html[data-noisy-theme="light"] .profile-shell :is(.profile-info, .keys-card, .network) {
  background: linear-gradient(145deg, #C6D0C2 0%, #C2CDBF 100%) !important;
  color: var(--noisy-text) !important;
  border: 1px solid var(--noisy-border-soft) !important;
  box-shadow: var(--noisy-shadow) !important;
}
html[data-noisy-theme="light"] .profile-shell :is(.info-item, .network-item, .key, .scope-group, .scope-search, .upload-zone) {
  background: rgba(37, 78, 52, .045) !important;
  color: var(--noisy-text) !important;
  border: 1px solid rgba(65, 95, 72, .20) !important;
  box-shadow: none !important;
}
html[data-noisy-theme="light"] .profile-shell .key {
  background: rgba(37, 78, 52, .065) !important;
  border-color: rgba(65, 95, 72, .24) !important;
  box-shadow: 0 3px 9px rgba(35, 54, 40, .045) !important;
}
html[data-noisy-theme="light"] .profile-shell .key {
  box-shadow: 0 3px 9px rgba(35, 54, 40, .075) !important;
}
html[data-noisy-theme="light"] .profile-shell :is(.key-limit, .scope-option) {
  background: rgba(37, 78, 52, .065) !important;
  color: var(--noisy-text) !important;
  border-color: rgba(65, 95, 72, .23) !important;
}
html[data-noisy-theme="light"] .profile-shell .info-icon {
  background: #AEC7B0 !important;
  color: #236C5A !important;
  border-color: #789B82 !important;
  box-shadow: none !important;
}
html[data-noisy-theme="light"] .profile-shell .info-icon svg,
html[data-noisy-theme="light"] .profile-shell .info-icon svg * {
  stroke: currentColor !important;
}
html[data-noisy-theme="light"] .profile-shell :is(.info-copy, .key, .network-item, .scope-option, .key-limit, .key-scopes) {
  color: var(--noisy-text-body) !important;
}
html[data-noisy-theme="light"] .profile-shell :is(.info-copy strong, .key-name, .network-item strong, .key-limit-head strong, .scope-option strong) {
  color: var(--noisy-text) !important;
}
html[data-noisy-theme="light"] .profile-shell :is(.info-copy small, .key-id, .key-foot, .key-limit-head, .key-limit-meta, .key-limit-locked, .key-scopes, .scope-option small, .scope-group-title, .password-field > span, .scope-search span) {
  color: #354C40 !important;
  opacity: 1 !important;
}
html[data-noisy-theme="light"] .profile-shell .key-secret-value,
html[data-noisy-theme="light"] .profile-shell .info-copy .mono {
  color: #3B5548 !important;
}
html[data-noisy-theme="light"] .profile-shell .key-limit-range::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, #438F7D, #817dbb) !important;
}
html[data-noisy-theme="light"] .profile-shell .key-limit-range::-moz-range-track {
  background: linear-gradient(90deg, #438F7D, #817dbb) !important;
}
html[data-noisy-theme="light"] .profile-shell :is(.profile-footer, .profile-footer span) {
  color: #354C40 !important;
}
html[data-noisy-theme="light"] .profile-shell .verification-alert {
  background: linear-gradient(120deg, #D5D0B9, #d0c9bb) !important;
  border-color: #B5A580 !important;
}
html[data-noisy-theme="light"] .profile-shell .alert-copy strong { color: #58482c !important; }
html[data-noisy-theme="light"] .profile-shell .alert-copy span { color: #655b49 !important; }
html[data-noisy-theme="light"] .profile-shell .verification-lock { background: #d8bfc3 !important; }
html[data-noisy-theme="light"] .profile-shell .modal-backdrop { background: rgba(35, 48, 39, .48) !important; }
html[data-noisy-theme="light"] .profile-shell .modal-box {
  background: linear-gradient(145deg, #CCD6C9, #C2CDBF) !important;
  border-color: #7E9582 !important;
  box-shadow: 0 24px 70px rgba(35, 54, 40, .20) !important;
  color: var(--noisy-text) !important;
}
html[data-noisy-theme="light"] .profile-shell .modal-box :is(p, span, label) { color: var(--noisy-text-muted); }
html[data-noisy-theme="light"] .profile-shell .modal-box :is(h2, strong) { color: var(--noisy-text) !important; }
html[data-noisy-theme="light"] .profile-shell .close {
  background: #B3C1B2 !important;
  border-color: #7E9582 !important;
  color: #30483C !important;
}
html[data-noisy-theme="light"] .profile-shell .toast {
  background: #A9B9A8 !important;
  color: #253B32 !important;
  border-color: #78947F !important;
}
/* User-uploaded cover art remains dark and uses its original overlay. */
html[data-noisy-theme="light"] .profile-shell .hero { background-color: #060910 !important; }
html[data-noisy-theme="light"] .profile-shell .hero :is(.cover-actions, .avatar-actions) button {
  background: rgba(5, 9, 16, .78) !important;
  color: #edf2ff !important;
  border-color: rgba(221, 234, 218, .17) !important;
}

/* DASHBOARD — hierarchy between the hero, stats cards and inner analytics. */
html[data-noisy-theme="light"] .dashboard-shell .hero {
  background: linear-gradient(135deg, #C6D0C2 0%, #C2CDBF 56%, #C6D0C2 100%) !important;
  border-color: var(--noisy-border-soft) !important;
  box-shadow: var(--noisy-shadow) !important;
}
html[data-noisy-theme="light"] .dashboard-shell :is(.card:not(.hero), .metric, .analytics-card, .status-item, .usage-card, .account-card, .keys-panel) {
  background: linear-gradient(145deg, #C9D4C7, #C2CDBF) !important;
  border-color: var(--noisy-border-soft) !important;
  box-shadow: 0 8px 20px rgba(35, 54, 40, .085) !important;
  color: var(--noisy-text) !important;
}
/* Wrappers and structural rows must not become filled rectangles in light mode. */
html[data-noisy-theme="light"] .dashboard-shell :is(.key-row, .status-item, .analytics-key-row) {
  background: rgba(37, 78, 52, .055) !important;
  border-color: rgba(65, 95, 72, .19) !important;
  color: var(--noisy-text-body) !important;
  box-shadow: none !important;
}
html[data-noisy-theme="light"] .dashboard-shell :is(.quota-panel, .analytics-row, .key-list, .account-line, .analytics-endpoints > div, .key-chart, .pulse-chart) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: var(--noisy-text-body) !important;
}
html[data-noisy-theme="light"] .dashboard-shell .account-line {
  border-bottom: 1px solid rgba(44, 65, 50, .16) !important;
}
html[data-noisy-theme="light"] .dashboard-shell .key-chart {
  border-bottom: 1px solid rgba(44, 65, 50, .18) !important;
}
html[data-noisy-theme="light"] .dashboard-shell :is(.quota-track, .analytics-track) {
  background-color: rgba(37, 59, 50, .10) !important;
  border-color: transparent !important;
}
html[data-noisy-theme="light"] .dashboard-shell .activity-graph {
  background: transparent !important;
  border-color: rgba(44, 65, 50, .17) !important;
  box-shadow: none !important;
}
html[data-noisy-theme="light"] .dashboard-shell .hero h1,
html[data-noisy-theme="light"] .dashboard-shell .hero h1 strong,
html[data-noisy-theme="light"] .dashboard-shell .hero p,
html[data-noisy-theme="light"] .dashboard-shell .card h2,
html[data-noisy-theme="light"] .dashboard-shell .metric strong,
html[data-noisy-theme="light"] .dashboard-shell .quota-panel strong,
html[data-noisy-theme="light"] .dashboard-shell .analytics-card h2,
html[data-noisy-theme="light"] .dashboard-shell .analytics-label strong,
html[data-noisy-theme="light"] .dashboard-shell .analytics-key-row strong,
html[data-noisy-theme="light"] .dashboard-shell .status-item strong {
  color: var(--noisy-text) !important;
}
html[data-noisy-theme="light"] .dashboard-shell .hero h1 strong { color: var(--noisy-accent-deep) !important; }
html[data-noisy-theme="light"] .dashboard-shell :is(.eyebrow, .hero-status, .metric small, .metric span, .quota-panel small, .quota-panel span, .analytics-label span, .analytics-key-row small, .footer, .key-row small) {
  color: var(--noisy-text-muted) !important;
  opacity: 1 !important;
}
html[data-noisy-theme="light"] .dashboard-shell .quota-panel :is(progress, meter) { accent-color: var(--noisy-accent); }

/* LANDING / DOCUMENTATION HOME — panels coordinate with the same slate scale. */
html[data-noisy-theme="light"] body:has(.app) { background-color: var(--noisy-page) !important; }
html[data-noisy-theme="light"] .app .topbar,
html[data-noisy-theme="light"] .app .signal-strip,
html[data-noisy-theme="light"] .app .architecture,
html[data-noisy-theme="light"] .app .quick-strip,
html[data-noisy-theme="light"] .app .warning-bar {
  background: rgba(176, 190, 171, .84) !important;
  border-color: var(--noisy-border-soft) !important;
}
html[data-noisy-theme="light"] .app :is(.hero-panel, .auth-card, .legal-card, .social-card, .code-card, .usage-card, .response-grid article, .architecture, .final-box) {
  background: linear-gradient(145deg, #C9D4C7 0%, #BFCBBC 100%) !important;
  border-color: var(--noisy-border-soft) !important;
  box-shadow: 0 9px 24px rgba(35, 54, 40, .085) !important;
  color: var(--noisy-text) !important;
}
html[data-noisy-theme="light"] .app :is(.auth-card.featured, .arch-node.active) {
  background: linear-gradient(135deg, #B3C8B6, #BFCABD) !important;
  border-color: #7E9582 !important;
}
html[data-noisy-theme="light"] .app .arch-node,
html[data-noisy-theme="light"] .app :is(.signal-strip > div, .quick-strip > div, .usage-points > div) {
  background: rgba(37, 78, 52, .045) !important;
  border-color: rgba(65, 95, 72, .17) !important;
  color: var(--noisy-text) !important;
  box-shadow: none !important;
}
html[data-noisy-theme="light"] .app :is(.hero-copy h1, .hero-copy h1 strong, .section-head h2, .social-head h2, .final-box h2, .auth-card h3, .response-grid h3, .legal-card h3, .usage-copy h3) {
  color: var(--noisy-text) !important;
}
html[data-noisy-theme="light"] .app :is(.hero-copy h1 strong, h2 strong, .panel-title strong) {
  color: var(--noisy-accent-deep) !important;
  -webkit-text-fill-color: var(--noisy-accent-deep) !important;
  background: none !important;
  text-shadow: none !important;
}
html[data-noisy-theme="light"] .app :is(.hero-copy > p, .section-head > p, .social-head > p, .final-box > p, .auth-card p, .response-grid p, .legal-card p, .usage-copy p) {
  color: var(--noisy-text-body) !important;
}
html[data-noisy-theme="light"] .app :is(.eyebrow, .section-label, .hero-note, .panel-top, .panel-foot, .mini-kicker, .card-tag, .legal-index, .signal-strip small, .arch-node span, .card-number, .hero-meta, .copyright) {
  color: var(--noisy-text-muted) !important;
}
html[data-noisy-theme="light"] .app :is(.terminal, pre, .code-card pre, .auth-card pre) {
  background: #263947 !important;
  color: #e1ebef !important;
  border-color: #465d69 !important;
}
html[data-noisy-theme="light"] .app :is(.terminal code, pre code, .code-card pre code, .auth-card pre code) { color: #e1ebef !important; }
html[data-noisy-theme="light"] .app :is(.code-head, .code-foot) {
  background: #A9B9A8 !important;
  color: #30483C !important;
  border-color: #7E9582 !important;
}
html[data-noisy-theme="light"] .app .warning-bar {
  background: #D0D0B8 !important;
  border-color: #b6a27f !important;
}
html[data-noisy-theme="light"] .app .warning-bar :is(b, strong) { color: #5b492b !important; }
html[data-noisy-theme="light"] .app .warning-bar p { color: #665b46 !important; }
html[data-noisy-theme="light"] .app .social-icon { color: var(--noisy-accent-deep) !important; }

/* API EXPLORER — sheet, folders, operations, details and search controls. */
html[data-noisy-theme="light"] #main-content .hero {
  background: transparent !important;
}
html[data-noisy-theme="light"] #main-content .dashboard-card {
  background: linear-gradient(145deg, #C9D4C7, #C2CDBF) !important;
  border-color: var(--noisy-border-soft) !important;
  box-shadow: var(--noisy-shadow) !important;
  color: var(--noisy-text) !important;
}
html[data-noisy-theme="light"] #main-content :is(.metric, .quick-strip > div) {
  background: #B9C6B6 !important;
  color: var(--noisy-text) !important;
  border-color: #859B88 !important;
}
html[data-noisy-theme="light"] #main-content :is(.metric strong, .dash-title, .dash-title strong) { color: var(--noisy-text) !important; }
html[data-noisy-theme="light"] #main-content .dash-title strong { color: var(--noisy-accent-deep) !important; }
html[data-noisy-theme="light"] #endpoints-sheet {
  background: #B3C1B2 !important;
  color: var(--noisy-text) !important;
  border-color: #7E9582 !important;
  box-shadow: 0 16px 36px rgba(35, 54, 40, .15) !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .sheet-head {
  background: #C2CDBF !important;
  color: var(--noisy-text) !important;
  border-color: #91A493 !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .sheet-head h2,
html[data-noisy-theme="light"] #endpoints-sheet .sheet-head h2 strong { color: var(--noisy-text) !important; }
html[data-noisy-theme="light"] #endpoints-sheet .sheet-head h2 strong { color: var(--noisy-accent-deep) !important; }
html[data-noisy-theme="light"] #endpoints-sheet .catalog-toolbar,
html[data-noisy-theme="light"] #endpoints-sheet .catalog-section-label {
  background: transparent !important;
  color: var(--noisy-text-muted) !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .catalog-search-wrap {
  background: #A9B9A8 !important;
  border-color: #7E9582 !important;
  color: var(--noisy-accent-deep) !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .catalog-search-wrap input {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--noisy-text) !important;
  -webkit-text-fill-color: var(--noisy-text) !important;
  box-shadow: none !important;
}
html[data-noisy-theme="light"] #endpoints-sheet :is(.catalog-folder, .service-folder, .folder-card) {
  background: #C1CCBE !important;
  color: var(--noisy-text) !important;
  border: 1px solid #7E9582 !important;
  border-radius: 17px !important;
  box-shadow: 0 5px 13px rgba(35, 54, 40, .085) !important;
  overflow: hidden;
}
html[data-noisy-theme="light"] #endpoints-sheet .folder-head {
  background: rgba(37, 78, 52, .04) !important;
  color: var(--noisy-text) !important;
  border-color: rgba(65, 95, 72, .17) !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .folder-content,
html[data-noisy-theme="light"] #endpoints-sheet .folder-items {
  background: transparent !important;
  color: var(--noisy-text) !important;
  border-color: rgba(65, 95, 72, .13) !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .operation-card {
  background: rgba(37, 78, 52, .035) !important;
  color: var(--noisy-text) !important;
  border: 1px solid rgba(65, 95, 72, .18) !important;
  border-radius: 13px !important;
  box-shadow: none !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .operation-main { background: transparent !important; }
html[data-noisy-theme="light"] #endpoints-sheet :is(.operation-service, .service-name, .service-path, .operation-title-row h3, .operation-copy h3, .operation-copy p, .folder-info strong, .folder-info small, .folder-count, .catalog-kicker, .catalog-intro p, .catalog-section-label span, .catalog-toolbar, .usage-header h4, .request-label, .param-list > span) {
  color: var(--noisy-text-body) !important;
  opacity: 1 !important;
}
html[data-noisy-theme="light"] #endpoints-sheet :is(.folder-info strong, .operation-title-row h3) { color: var(--noisy-text) !important; }
html[data-noisy-theme="light"] #endpoints-sheet :is(.operation-copy > code, .param-list code, .param-chips code) {
  background: #A9B9A8 !important;
  border: 1px solid #7E9582 !important;
  color: #2B4339 !important;
}
html[data-noisy-theme="light"] #endpoints-sheet :is(pre, .method-block pre, .operation-copy pre) {
  background: #263947 !important;
  color: #e1ebef !important;
  border-color: #465d69 !important;
}
html[data-noisy-theme="light"] #endpoints-sheet :is(pre code, .method-block pre code) { color: #e1ebef !important; }
html[data-noisy-theme="light"] #endpoints-sheet .details-content {
  background: transparent !important;
  border-color: rgba(65, 95, 72, .17) !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .details-inner {
  background: rgba(37, 78, 52, .055) !important;
  color: var(--noisy-text) !important;
  border-color: rgba(65, 95, 72, .20) !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .operation-dot { background: #267566 !important; box-shadow: 0 0 7px rgba(31, 109, 83, .18) !important; }
html[data-noisy-theme="light"] #endpoints-sheet :is(.folder-icon, .folder-chevron, .catalog-section-label i) { color: #236C5A !important; border-color: #708F78 !important; }
html[data-noisy-theme="light"] #endpoints-sheet :is(.operation-badge, .go-btn, .method-badge) {
  background: #AEC7B0 !important;
  border-color: #789B82 !important;
  color: #1F5C4A !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .sheet-close {
  background: #A9B9A8 !important;
  color: #293F35 !important;
  border-color: #78947F !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .catalog-empty {
  background: #C2CDBF !important;
  color: var(--noisy-text-muted) !important;
  border-color: var(--noisy-border) !important;
}

/* TESTER — parameters, response panels, tabs, empty and loading states. */
html[data-noisy-theme="light"] .tester-shell .hero {
  background: linear-gradient(145deg, #C5D0C2, #BFCBBC) !important;
  border-color: var(--noisy-border-soft) !important;
}
html[data-noisy-theme="light"] .tester-shell :is(.panel, .params, .response-panel, .response-wrap, .workspace, .examples) {
  background: #C6D0C2 !important;
  color: var(--noisy-text) !important;
  border-color: var(--noisy-border-soft) !important;
  box-shadow: 0 7px 18px rgba(35, 54, 40, .08) !important;
}
html[data-noisy-theme="light"] .tester-shell :is(.panel-head, .response-bar, .response-tabs, .code-tabs) {
  background: transparent !important;
  color: var(--noisy-text-body) !important;
  border-color: rgba(65, 95, 72, .16) !important;
}
html[data-noisy-theme="light"] .tester-shell :is(.param-field, .response-empty, .params-empty, .route) {
  background: rgba(37, 78, 52, .045) !important;
  color: var(--noisy-text-body) !important;
  border-color: rgba(65, 95, 72, .20) !important;
  box-shadow: none !important;
}
html[data-noisy-theme="light"] .tester-shell :is(.panel-head, .response-bar, .response-tabs, .code-tabs) :is(h2, h3, strong, span, button) { color: #30483C !important; }
html[data-noisy-theme="light"] .tester-shell :is(.params-empty, .response-empty, .response-empty span) { color: var(--noisy-text-muted) !important; }
html[data-noisy-theme="light"] .tester-shell .pulse-ring { border-color: #789B82 !important; }
html[data-noisy-theme="light"] .tester-shell :is(.response-code, .code-frame, .example-code, pre, pre code) {
  background: #263947 !important;
  color: #e1ebef !important;
  border-color: #465d69 !important;
}
html[data-noisy-theme="light"] .tester-shell :is(.response-code *, .code-frame *, .example-code *) { color: inherit; }
html[data-noisy-theme="light"] .tester-shell .route input { background: #A9B9A8 !important; }

/* MODERATION — filters, report/user rows, admin panels, tables and pagination. */
html[data-noisy-theme="light"] .mod-shell :is(.mod-hero, .mod-panel, .admin-panel, .reports, .users) {
  background: linear-gradient(145deg, #C9D4C7, #C2CDBF) !important;
  color: var(--noisy-text) !important;
  border-color: var(--noisy-border-soft) !important;
  box-shadow: var(--noisy-shadow) !important;
}
html[data-noisy-theme="light"] .mod-shell :is(.mod-stats article, .report-card, .user-row, .filters, .report-controls, .pagination) {
  background: rgba(37, 78, 52, .045) !important;
  color: var(--noisy-text) !important;
  border-color: rgba(65, 95, 72, .18) !important;
  box-shadow: none !important;
}
html[data-noisy-theme="light"] .mod-shell :is(table, thead, tbody, tr, th, td) {
  color: var(--noisy-text-body) !important;
  border-color: #91A493 !important;
}
html[data-noisy-theme="light"] .mod-shell th { background: rgba(37, 78, 52, .065) !important; color: #30483C !important; }
html[data-noisy-theme="light"] .mod-shell td { background: transparent !important; }
html[data-noisy-theme="light"] .mod-shell tr:nth-child(even) td { background: rgba(37, 78, 52, .025) !important; }
html[data-noisy-theme="light"] .mod-shell :is(.mod-badge, .role-badge, .status-badge) { opacity: 1 !important; }
html[data-noisy-theme="light"] .mod-shell .notice {
  background: #D0D0B8 !important;
  color: #5c4d32 !important;
  border-color: #b8a781 !important;
}

/* PUBLIC PROFILE — profile card and small data panels. */
html[data-noisy-theme="light"] .public-shell :is(.profile-card, .info-section) {
  background: linear-gradient(145deg, #C9D4C7, #BFCBBC) !important;
  color: var(--noisy-text) !important;
  border-color: var(--noisy-border-soft) !important;
  box-shadow: var(--noisy-shadow) !important;
}
html[data-noisy-theme="light"] .public-shell :is(.info-item, .profile-detail, .detail-row, .privacy-note, .section-grid > div) {
  background: rgba(37, 78, 52, .045) !important;
  color: var(--noisy-text-body) !important;
  border-color: rgba(65, 95, 72, .18) !important;
}
html[data-noisy-theme="light"] .public-shell .cover { border-color: #708A76 !important; }
html[data-noisy-theme="light"] .public-shell .privacy-note { background: #B0BFAF !important; }

/* LOGIN / SIGNUP — tinted form, controls, OAuth cards and checks. */
html[data-noisy-theme="light"] :is(.login-page, .signup-page) .form-card {
  background: linear-gradient(145deg, #C9D4C7 0%, #C2CDBF 100%) !important;
  border-color: var(--noisy-border-soft) !important;
  box-shadow: 0 20px 48px rgba(35, 54, 40, .14) !important;
  color: var(--noisy-text) !important;
}
html[data-noisy-theme="light"] :is(.login-page, .signup-page) :is(.input-wrap, .field-row, .checks div, .oauth-button) {
  background: rgba(37, 78, 52, .045) !important;
  border-color: rgba(65, 95, 72, .18) !important;
  color: var(--noisy-text) !important;
}
html[data-noisy-theme="light"] :is(.login-page, .signup-page) .input-wrap input {
  background: #A9B9A8 !important;
  color: var(--noisy-text) !important;
  -webkit-text-fill-color: var(--noisy-text) !important;
  border-color: #7E9582 !important;
}
html[data-noisy-theme="light"] :is(.login-page, .signup-page) :is(.brand-name, .hero-copy h1, .card-line b, .oauth-title, .social-text) { color: var(--noisy-text) !important; }
html[data-noisy-theme="light"] :is(.login-page, .signup-page) :is(.brand-subtitle, .hero-copy p, .field > span, .remember, .consent, .small, .login-link, .signup-link, .security-line, .checks span, .strength span) { color: var(--noisy-text-muted) !important; }
html[data-noisy-theme="light"] :is(.login-page, .signup-page) .hero-copy h1 strong {
  color: var(--noisy-accent-deep) !important;
  -webkit-text-fill-color: var(--noisy-accent-deep) !important;
  background: none !important;
}
html[data-noisy-theme="light"] :is(.login-page, .signup-page) .phone-notice {
  background: #D0D0B8 !important;
  border-color: #B5A580 !important;
}
html[data-noisy-theme="light"] :is(.login-page, .signup-page) .phone-notice :is(strong, p, .notice-icon) { color: #625333 !important; }
html[data-noisy-theme="light"] :is(.login-page, .signup-page) :is(.check, .strength > div) { background: #A2B4A2 !important; border-color: #7E9582 !important; }
html[data-noisy-theme="light"] :is(.login-page, .signup-page) .submit { color: #253B32 !important; }

/* SECURITY / VERIFICATION — one palette for challenge, code and dialogs. */
html[data-noisy-theme="light"] .security-shell .security-card,
html[data-noisy-theme="light"] .verify-shell .verify-card,
html[data-noisy-theme="light"] .verify-shell .phone-modal-box {
  background: linear-gradient(145deg, #C9D4C7, #BFCBBC) !important;
  color: var(--noisy-text) !important;
  border-color: var(--noisy-border-soft) !important;
  box-shadow: var(--noisy-shadow) !important;
}
html[data-noisy-theme="light"] :is(.security-shell, .verify-shell) :is(.target, .checks div, .challenge, .challenge-top, .dev-note, .email-note) {
  background: rgba(37, 78, 52, .045) !important;
  color: var(--noisy-text-body) !important;
  border-color: rgba(65, 95, 72, .18) !important;
}
html[data-noisy-theme="light"] :is(.security-shell, .verify-shell) :is(.target span, .checks span, .checks b, .hint, .code-label, .lead, .security) { color: var(--noisy-text-muted) !important; }
html[data-noisy-theme="light"] .verify-shell :is(.target b, .phone-modal-box h2, .verify-card h1) { color: var(--noisy-text) !important; }
html[data-noisy-theme="light"] .verify-shell .verify-card h1 strong {
  color: var(--noisy-accent-deep) !important;
  -webkit-text-fill-color: var(--noisy-accent-deep) !important;
  background: none !important;
}
html[data-noisy-theme="light"] .verify-shell .code-grid input {
  background: #A9B9A8 !important;
  color: var(--noisy-text) !important;
  border-color: #7E9582 !important;
}
html[data-noisy-theme="light"] .verify-shell .code-grid button { color: #253B32 !important; }

/* Small error/access pages were previously left out of theme coverage. */
html[data-noisy-theme="light"] body:has(.box) .box,
html[data-noisy-theme="light"] body:has(.text) .msg {
  background: #C2CDBF !important;
  color: var(--noisy-text) !important;
  border-color: var(--noisy-border) !important;
  box-shadow: var(--noisy-shadow) !important;
}
html[data-noisy-theme="light"] body:has(.box) .box :is(h1, h2, p),
html[data-noisy-theme="light"] body:has(.text) .msg :is(h1, h2, p) { color: var(--noisy-text) !important; }
html[data-noisy-theme="light"] body:has(.box) .box .link,
html[data-noisy-theme="light"] .bg-404 .support {
  background: #A9B9A8 !important;
  color: var(--noisy-accent-deep) !important;
  border-color: var(--noisy-border) !important;
}
html[data-noisy-theme="light"] .bg-404 { background: var(--noisy-page) !important; color: var(--noisy-text) !important; }

/* Code and API responses intentionally remain dark, to protect syntax contrast. */
html[data-noisy-theme="light"] :is(
  .app, #main-content, #endpoints-sheet, .tester-shell, .profile-shell,
  .dashboard-shell, .mod-shell, .public-shell, .security-shell, .verify-shell
) :is(pre, pre code, .terminal, .code-frame, .response-code, .example-code,
      .method-block pre, .language-json, .code-card pre, .code-head code) {
  background-color: #263947 !important;
  color: #e1ebef !important;
  border-color: #465d69 !important;
}
html[data-noisy-theme="light"] :is(pre, .terminal, .code-frame, .response-code, .example-code) :is(.token.comment, .token.prolog, .token.doctype) { color: #9aadb8 !important; }
html[data-noisy-theme="light"] :is(pre, .terminal, .code-frame, .response-code, .example-code) :is(.token.property, .token.attr-name, .token.keyword, .token.selector) { color: #8ed4d6 !important; }
html[data-noisy-theme="light"] :is(pre, .terminal, .code-frame, .response-code, .example-code) :is(.token.string, .token.attr-value, .token.inserted) { color: #bedc9c !important; }
html[data-noisy-theme="light"] :is(pre, .terminal, .code-frame, .response-code, .example-code) :is(.token.function, .token.class-name, .token.boolean, .token.number) { color: #c7b7f0 !important; }

/* Scrollbars and selection follow the palette on long forms/catalogs. */
html[data-noisy-theme="light"] ::selection { background: #83B79A !important; color: #243B32 !important; }
html[data-noisy-theme="light"] * { scrollbar-color: #859B88 #B0BDAF; }
html[data-noisy-theme="light"] :is(.profile-shell, .dashboard-shell, .app, #main-content, .tester-shell, .mod-shell, .public-shell, .security-shell, .verify-shell) :is(.loading, .response-empty, .params-empty, .catalog-empty) {
  color: var(--noisy-text-muted) !important;
  opacity: 1 !important;
}

@media (max-width: 520px) {
  html[data-noisy-theme="light"] .noisy-theme-toggle { right: 10px; bottom: 10px; }
}

/* Loaders and initial shells are part of the theme too. */
html[data-noisy-theme="light"] #preloader,
html[data-noisy-theme="light"] .loader {
  background: linear-gradient(145deg, #C5D0C2, #AEBEAD) !important;
  color: var(--noisy-text) !important;
}
html[data-noisy-theme="light"] :is(.boot-logo, .loader-name) { color: var(--noisy-text) !important; }
html[data-noisy-theme="light"] :is(.boot-logo span, .loader-name span) { color: var(--noisy-accent-deep) !important; }
html[data-noisy-theme="light"] :is(.loader-line, .loader-track) { background: #91A493 !important; }
html[data-noisy-theme="light"] :is(#preloader p, .loader small) { color: var(--noisy-text-muted) !important; }
html[data-noisy-theme="light"] .loader-core span { border-color: var(--noisy-accent) !important; box-shadow: none !important; }
html[data-noisy-theme="light"] :is(.grid, .grid-bg, .noise, .scan, .scanline, .aurora, .scene, .orb) {
  opacity: .07 !important;
}
html[data-noisy-theme="light"] #main-content .topbar,
html[data-noisy-theme="light"] .tester-shell .tester-head,
html[data-noisy-theme="light"] .verify-shell .verify-top {
  border-color: rgba(44, 65, 50, .24) !important;
}
html[data-noisy-theme="light"] .verify-shell .phone-modal-backdrop { background: rgba(35, 48, 39, .50) !important; }
html[data-noisy-theme="light"] .verify-shell .phone-modal-box {
  background: #C6D0C2 !important;
  border-color: #7E9582 !important;
  color: var(--noisy-text) !important;
}
html[data-noisy-theme="light"] .verify-shell .phone-modal-box :is(h2, strong) { color: var(--noisy-text) !important; }
html[data-noisy-theme="light"] .verify-shell .phone-modal-box :is(p, span, label) { color: var(--noisy-text-muted) !important; }
html[data-noisy-theme="light"] .security-shell .turnstile-wrap {
  background: #B9C6B6 !important;
  border-color: #859B88 !important;
  border-radius: 12px;
}
/* Cover/image overlays remain intentionally dark; all controls outside them use slate. */
html[data-noisy-theme="light"] .public-shell .profile-heading :is(.heading-copy, .username, .eyebrow) {
  color: #e2ebf0 !important;
}
html[data-noisy-theme="light"] .public-shell .profile-heading :is(.username, .eyebrow) { color: #c5d9df !important; }


/* BRAND MARK: keep the original N's transform and font untouched. */
html[data-noisy-theme="light"] .brand-diamond {
  background: linear-gradient(145deg, rgba(19, 57, 44, .96), rgba(27, 55, 50, .98)) !important;
  border-color: rgba(48, 151, 124, .95) !important;
  box-shadow: 0 0 0 1px rgba(230, 239, 224, .45), 0 0 18px rgba(25, 92, 73, .18) !important;
}
html[data-noisy-theme="light"] .brand-diamond::before {
  border-color: rgba(232, 243, 229, .46) !important;
}
html[data-noisy-theme="light"] .brand-diamond > span {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-shadow: 0 0 15px rgba(33, 230, 255, .45) !important;
}


/* v9 — targeted contrast fixes found in the user's screen recording.
   Keep Sage & Forest palette; touch only light-mode component exceptions. */

/* API tester: its endpoint URL was retaining the near-white dark-theme cyan. */
html[data-noisy-theme="light"] .tester-shell .route {
  background: #A8BBAA !important;
  border-color: #78927D !important;
  color: #253B32 !important;
  box-shadow: inset 0 1px 0 rgba(239, 245, 235, .22) !important;
}
html[data-noisy-theme="light"] .tester-shell .route > span {
  color: #195C49 !important;
  -webkit-text-fill-color: #195C49 !important;
}
html[data-noisy-theme="light"] .tester-shell .route code,
html[data-noisy-theme="light"] .tester-shell #apiUrl {
  color: #263D32 !important;
  -webkit-text-fill-color: #263D32 !important;
  background: transparent !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
html[data-noisy-theme="light"] .tester-shell .route button {
  background: #D0D9CA !important;
  color: #2B4436 !important;
  -webkit-text-fill-color: #2B4436 !important;
  border-color: #78927D !important;
}
html[data-noisy-theme="light"] .tester-shell .route button:hover {
  background: #D9E0D4 !important;
}

/* Tester parameters: give type labels, hints and required/optional badges
   explicit light-theme colors rather than the original dark-theme colors. */
html[data-noisy-theme="light"] .tester-shell .param-field {
  background: #B4C4B4 !important;
  border-color: #819984 !important;
}
html[data-noisy-theme="light"] .tester-shell .param-name {
  color: #263C31 !important;
  -webkit-text-fill-color: #263C31 !important;
}
html[data-noisy-theme="light"] .tester-shell .param-type {
  color: #49604F !important;
  -webkit-text-fill-color: #49604F !important;
  opacity: 1 !important;
}
html[data-noisy-theme="light"] .tester-shell .param-hint {
  color: #405847 !important;
  -webkit-text-fill-color: #405847 !important;
  opacity: 1 !important;
}
html[data-noisy-theme="light"] .tester-shell .param-required.required {
  color: #7B3040 !important;
  -webkit-text-fill-color: #7B3040 !important;
  background: #E0C2C6 !important;
  border-color: #B57984 !important;
}
html[data-noisy-theme="light"] .tester-shell .param-required.optional {
  color: #405847 !important;
  -webkit-text-fill-color: #405847 !important;
  background: #CAD5C7 !important;
  border-color: #819984 !important;
}
html[data-noisy-theme="light"] .tester-shell .params .subhead,
html[data-noisy-theme="light"] .tester-shell .params .subhead span {
  color: #405847 !important;
  -webkit-text-fill-color: #405847 !important;
}
html[data-noisy-theme="light"] .tester-shell .param-field input {
  background: #C8D4C7 !important;
  color: #263C31 !important;
  -webkit-text-fill-color: #263C31 !important;
  border-color: #829985 !important;
}
html[data-noisy-theme="light"] .tester-shell .param-field input::placeholder {
  color: #526B59 !important;
  -webkit-text-fill-color: #526B59 !important;
  opacity: 1 !important;
}

/* Dashboard identity matrix: values are populated dynamically, so explicitly
   override the original light-colored strong text and browser text fill. */
html[data-noisy-theme="light"] .dashboard-shell .account-card .account-line,
html[data-noisy-theme="light"] .dashboard-shell .account-card .account-line > span {
  color: #455D4B !important;
  -webkit-text-fill-color: #455D4B !important;
  opacity: 1 !important;
}
html[data-noisy-theme="light"] .dashboard-shell .account-card .account-line > strong,
html[data-noisy-theme="light"] .dashboard-shell .account-card #userEmail,
html[data-noisy-theme="light"] .dashboard-shell .account-card #userAuth,
html[data-noisy-theme="light"] .dashboard-shell .account-card #userVerification {
  color: #263C31 !important;
  -webkit-text-fill-color: #263C31 !important;
  opacity: 1 !important;
}

/* Analytics and key rows: make small labels and status values legible at mobile size. */
html[data-noisy-theme="light"] .dashboard-shell .analytics-label,
html[data-noisy-theme="light"] .dashboard-shell .analytics-label > span,
html[data-noisy-theme="light"] .dashboard-shell .analytics-label > strong,
html[data-noisy-theme="light"] .dashboard-shell .analytics-key-row small,
html[data-noisy-theme="light"] .dashboard-shell .analytics-key-row strong,
html[data-noisy-theme="light"] .dashboard-shell .analytics-key-row b,
html[data-noisy-theme="light"] .dashboard-shell .status-item span,
html[data-noisy-theme="light"] .dashboard-shell .key-row small,
html[data-noisy-theme="light"] .dashboard-shell .key-row strong {
  color: #2D4537 !important;
  -webkit-text-fill-color: #2D4537 !important;
  opacity: 1 !important;
}
html[data-noisy-theme="light"] .dashboard-shell .activity-graph {
  background: linear-gradient(180deg, rgba(84, 124, 91, .11), rgba(84, 124, 91, .035)) !important;
  border-color: #8DA18E !important;
}
html[data-noisy-theme="light"] .dashboard-shell .activity-graph::before,
html[data-noisy-theme="light"] .dashboard-shell .activity-graph::after {
  border-top-color: rgba(57, 87, 63, .22) !important;
}
html[data-noisy-theme="light"] .dashboard-shell .activity-graph .activity-empty,
html[data-noisy-theme="light"] .dashboard-shell .activity-axis,
html[data-noisy-theme="light"] .dashboard-shell .activity-head,
html[data-noisy-theme="light"] .dashboard-shell .activity-trend {
  color: #405847 !important;
  -webkit-text-fill-color: #405847 !important;
  opacity: 1 !important;
}

/* Preserve the brand mark geometry; no transform is applied to its N. */
html[data-noisy-theme="light"] .brand-diamond > span {
  transform: none !important;
}


/* v11 — remove the accidental rectangular backplates in the API catalog. */
html[data-noisy-theme="light"] .dashboard-shell .analytics-endpoints > :is(#quotaAnalytics, #endpointAnalytics) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-noisy-theme="light"] .dashboard-shell .analytics-endpoints .analytics-row {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-noisy-theme="light"] .dashboard-shell .activity-graph::before,
html[data-noisy-theme="light"] .dashboard-shell .activity-graph::after {
  border-top-color: rgba(37, 59, 50, .17) !important;
}
html[data-noisy-theme="light"] .dashboard-shell .key-row,
html[data-noisy-theme="light"] .dashboard-shell .status-item,
html[data-noisy-theme="light"] .dashboard-shell .analytics-key-row {
  border-radius: 13px !important;
}
html[data-noisy-theme="light"] .app .social-card::before {
  opacity: .12 !important;
}
html[data-noisy-theme="light"] .app .social-card::after {
  box-shadow: none !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .catalog-folder,
html[data-noisy-theme="light"] #endpoints-sheet .service-folder,
html[data-noisy-theme="light"] #endpoints-sheet .folder-card {
  box-shadow: 0 3px 8px rgba(35, 54, 40, .035) !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .catalog-folder > .folder-head,
html[data-noisy-theme="light"] #endpoints-sheet .service-folder > .folder-head,
html[data-noisy-theme="light"] #endpoints-sheet .folder-card > .folder-head {
  background: rgba(37, 78, 52, .035) !important;
}
html[data-noisy-theme="light"] .tester-shell :is(.panel-head, .response-bar, .response-tabs, .code-tabs) {
  box-shadow: none !important;
}


/* v11 — catalogue polish: keep headings on the page surface and avoid nested boxes. */
html[data-noisy-theme="light"] #endpoints-sheet .sheet-head {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .sheet-head > div {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .catalog-folder > .folder-head {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .folder-items {
  background: transparent !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .folder-items .operation-card {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(46, 75, 54, .16) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .folder-items .operation-card:last-child {
  border-bottom: 0 !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .folder-items .operation-main {
  background: transparent !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .operation-copy > code {
  display: block !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #354c40 !important;
  -webkit-text-fill-color: #354c40 !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .details-inner {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-noisy-theme="light"] #endpoints-sheet .details-content {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* v12 — Sage & Forest polish: replace cyan/violet accents with a cohesive forest palette. */
html[data-noisy-theme="light"] {
  --noisy-violet: #789277;
  --violet: #789277;
  --noisy-accent: #356B4D;
  --noisy-accent-deep: #294F39;
  --noisy-accent-soft: #C1D0BF;
  --noisy-accent-border: #7C987D;
  --cyan: #356B4D;
}

/* All highlighted headings become solid forest text in light mode.
   Remove the original gradient text fill and stroke instead of recoloring only `color`. */
html[data-noisy-theme="light"] :is(
  .app, .dashboard-shell, .profile-shell, .login-page, .signup-page,
  .public-shell, .tester-shell, .mod-shell, .security-shell, .verify-shell,
  #main-content
) :is(h1 strong, h2 strong, h3 strong, .gradient-text, .panel-title strong) {
  color: #294F39 !important;
  background: none !important;
  background-image: none !important;
  background-color: transparent !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  -webkit-text-fill-color: #294F39 !important;
  -webkit-text-stroke: 0 transparent !important;
  text-shadow: none !important;
}
html[data-noisy-theme="light"] .app h1 strong,
html[data-noisy-theme="light"] .app h2 strong,
html[data-noisy-theme="light"] .app .hero-copy h1 strong,
html[data-noisy-theme="light"] .app .final-box h2 strong {
  color: #294F39 !important;
  background: none !important;
  background-image: none !important;
  -webkit-text-fill-color: #294F39 !important;
  -webkit-text-stroke: 0 transparent !important;
}

/* Remove saturated cyan-to-violet CTAs. Use one restrained forest color and readable text. */
html[data-noisy-theme="light"] :is(
  .primary, .cta-button, .submit, #test-endpoint-btn, .create-key,
  .primary-btn, .test-endpoint-btn, .go-btn, .explore-btn,
  a.button.primary, button.primary, input[type="submit"]
) {
  background: #466D51 !important;
  background-image: none !important;
  color: #F3F5EC !important;
  -webkit-text-fill-color: #F3F5EC !important;
  border-color: #3E6248 !important;
  box-shadow: 0 5px 14px rgba(36, 75, 50, .14) !important;
}
html[data-noisy-theme="light"] :is(
  .primary, .cta-button, .submit, #test-endpoint-btn, .create-key,
  .primary-btn, .test-endpoint-btn, .go-btn, .explore-btn,
  a.button.primary, button.primary, input[type="submit"]
):hover:not(:disabled) {
  background: #395D44 !important;
  background-image: none !important;
  border-color: #31543C !important;
  filter: none !important;
}

/* Bars, quota meters and sliders use sage/forest only, never purple. */
html[data-noisy-theme="light"] .dashboard-shell :is(.bar, .quota-track > i, .analytics-track > i) {
  background: #4F7759 !important;
  background-image: none !important;
  opacity: 1 !important;
}
html[data-noisy-theme="light"] .dashboard-shell :is(.quota-track, .analytics-track) {
  background: #A5B6A3 !important;
}
html[data-noisy-theme="light"] .profile-shell .key-limit-range::-webkit-slider-runnable-track {
  background: #A2B79F !important;
  background-image: none !important;
}
html[data-noisy-theme="light"] .profile-shell .key-limit-range::-moz-range-track {
  background: #A2B79F !important;
  background-image: none !important;
}
html[data-noisy-theme="light"] .profile-shell .key-limit-range::-webkit-slider-thumb {
  background: #3F6D4E !important;
  border-color: #31583D !important;
}
html[data-noisy-theme="light"] .profile-shell .key-limit-range::-moz-range-thumb {
  background: #3F6D4E !important;
  border-color: #31583D !important;
}

/* Key-limit helper is rendered with inline colors in account-profile.js.
   !important overrides those inline presentation values only while light mode is active. */
html[data-noisy-theme="light"] .profile-shell .key-limit.locked {
  background: #B8C8B5 !important;
  background-image: none !important;
  border-color: #879D87 !important;
  color: #2D4936 !important;
  box-shadow: none !important;
}
html[data-noisy-theme="light"] .profile-shell .key-limit.locked > strong,
html[data-noisy-theme="light"] .profile-shell .key-limit.locked strong {
  color: #2D593D !important;
  -webkit-text-fill-color: #2D593D !important;
}
html[data-noisy-theme="light"] .profile-shell .key-limit.locked > div,
html[data-noisy-theme="light"] .profile-shell .key-limit.locked div {
  color: #405746 !important;
  -webkit-text-fill-color: #405746 !important;
}
html[data-noisy-theme="light"] .profile-shell .key-id,
html[data-noisy-theme="light"] .profile-shell .key-foot,
html[data-noisy-theme="light"] .profile-shell .key-scopes {
  color: #3D5545 !important;
  -webkit-text-fill-color: #3D5545 !important;
  opacity: 1 !important;
}
html[data-noisy-theme="light"] .profile-shell .key-id strong,
html[data-noisy-theme="light"] .profile-shell .key-scopes strong {
  color: #2D593D !important;
  -webkit-text-fill-color: #2D593D !important;
}
html[data-noisy-theme="light"] .profile-shell .key-id :is(span, small),
html[data-noisy-theme="light"] .profile-shell .key-scopes :is(span, small) {
  color: #3D5545 !important;
  -webkit-text-fill-color: #3D5545 !important;
}

/* Muted descriptions were too washed out on the sage surfaces. */
html[data-noisy-theme="light"] :is(
  .key-limit-meta, .key-limit-locked, .key-id, .key-foot, .key-scopes,
  .analytics-label, .analytics-label span, .analytics-key-row small,
  .quota-panel span, .quota-panel small, .hero-copy > p, .hero-copy p,
  .hero-note, .hero-status, .metric small, .metric span,
  .key-row small, .info-copy small, .network-item small,
  .brand small, .brand-subtitle, .footer, .copyright
) {
  color: #3D5545 !important;
  -webkit-text-fill-color: #3D5545 !important;
  opacity: 1 !important;
}

/* Make secondary emphasis/links and active badges harmonize with the same forest tone. */
html[data-noisy-theme="light"] :is(.app, .dashboard-shell, .profile-shell, .tester-shell, .mod-shell) :is(
  .eyebrow > span, .section-label > span, .hero-status b, .hero-meta span:last-child,
  .key-scopes strong, .info-state, .link-accent, .operation-copy a
) {
  color: #356B4D !important;
  -webkit-text-fill-color: #356B4D !important;
}
html[data-noisy-theme="light"] :is(.badge, .status-badge, .operation-badge, .mod-badge, .method-badge, .method-mini, .method-tag) {
  background: #C4D2C0 !important;
  color: #2D593D !important;
  -webkit-text-fill-color: #2D593D !important;
  border-color: #8DA58D !important;
}

/* Keep the Noisy diamond/N geometry untouched. This palette does not target .brand-diamond or its span. */
