/* Global light/dark theme layer. Loaded last by _render_page(). */
html{color-scheme:dark}
html:not([data-theme="dark"]){color-scheme:light}
html:not([data-theme="dark"]) body{background:radial-gradient(circle at 10% -10%,rgba(37,99,235,.12),transparent 32%),radial-gradient(circle at 92% 0%,rgba(124,58,237,.09),transparent 32%),#f5f7fb;color:#0f172a}
html:not([data-theme="dark"]) a{color:#2563eb}
html:not([data-theme="dark"]) a:hover{color:#7c3aed}
html:not([data-theme="dark"]) a.primary-btn,
html:not([data-theme="dark"]) a.result-cta-action,
html:not([data-theme="dark"]) a.action-link.primary-cta{
  color:#fff;
}
html:not([data-theme="dark"]) a.primary-btn:hover,
html:not([data-theme="dark"]) a.result-cta-action:hover,
html:not([data-theme="dark"]) a.action-link.primary-cta:hover{
  color:#fff;
}
html:not([data-theme="dark"]) code{background:#eaf0f7;color:#0f172a}
html:not([data-theme="dark"]) input,
html:not([data-theme="dark"]) textarea,
html:not([data-theme="dark"]) select{background:#fff;color:#0f172a;border-color:rgba(148,163,184,.55)}
html:not([data-theme="dark"]) input::placeholder,
html:not([data-theme="dark"]) textarea::placeholder{color:#94a3b8}
html:not([data-theme="dark"]) .site-footer{border-top-color:rgba(203,213,225,.9);color:#64748b}
html:not([data-theme="dark"]) .breadcrumb-chip{background:rgba(255,255,255,.78);border-color:rgba(203,213,225,.9);color:#475569}
html:not([data-theme="dark"]) .breadcrumb-chip.current{color:#0f172a;background:#fff}
html:not([data-theme="dark"]) .auth-card,
html:not([data-theme="dark"]) .benefits li,
html:not([data-theme="dark"]) .add-site-panel,
html:not([data-theme="dark"]) .site-card,
html:not([data-theme="dark"]) .add-more-card,
html:not([data-theme="dark"]) .score-gauge-card,
html:not([data-theme="dark"]) .content-section,
html:not([data-theme="dark"]) .card,
html:not([data-theme="dark"]) .doc-card,
html:not([data-theme="dark"]) .docs-content,
html:not([data-theme="dark"]) .docs-sidebar,
html:not([data-theme="dark"]) .privacy-card,
html:not([data-theme="dark"]) .research-card,
html:not([data-theme="dark"]) .manifesto-card,
html:not([data-theme="dark"]) .compare-card,
html:not([data-theme="dark"]) .analysis-card,
html:not([data-theme="dark"]) .tool-card,
html:not([data-theme="dark"]) .result-card,
html:not([data-theme="dark"]) .metric-card,
html:not([data-theme="dark"]) .trend-box,
html:not([data-theme="dark"]) .seo-section,
html:not([data-theme="dark"]) .manifesto-teaser{background:rgba(255,255,255,.92);border-color:rgba(203,213,225,.9);box-shadow:0 18px 55px rgba(15,23,42,.08)}
html:not([data-theme="dark"]) .site-card.expanded{background:#fff;border-color:rgba(37,99,235,.24)}
html:not([data-theme="dark"]) .auth-card label,
html:not([data-theme="dark"]) h1,
html:not([data-theme="dark"]) h2,
html:not([data-theme="dark"]) h3,
html:not([data-theme="dark"]) h4,
html:not([data-theme="dark"]) summary,
html:not([data-theme="dark"]) .metric-title,
html:not([data-theme="dark"]) .card strong{color:#0f172a}
html:not([data-theme="dark"]) p,
html:not([data-theme="dark"]) li,
html:not([data-theme="dark"]) .muted,
html:not([data-theme="dark"]) .dim,
html:not([data-theme="dark"]) .benefit-copy,
html:not([data-theme="dark"]) .content-section p,
html:not([data-theme="dark"]) .content-section li{color:#475569}
html:not([data-theme="dark"]) .auth-card input{background:#fff;color:#0f172a;border-color:rgba(148,163,184,.58);box-shadow:0 0 0 1px rgba(203,213,225,.45)}
html:not([data-theme="dark"]) .value-panel h1{
  background:linear-gradient(135deg,#0f172a 0%,#1d4ed8 56%,#6d28d9 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
}
html:not([data-theme="dark"]) .lead,
html:not([data-theme="dark"]) .auth-copy,
html:not([data-theme="dark"]) .field-note,
html:not([data-theme="dark"]) .trust-line{
  color:#334155;
}
html:not([data-theme="dark"]) .benefit-title{
  color:#0f172a;
}
html:not([data-theme="dark"]) .benefit-copy{
  color:#475569;
}
html:not([data-theme="dark"]) .benefit-icon{
  background:rgba(37,99,235,.10);
  color:#1d4ed8;
}
html:not([data-theme="dark"]) .auth-card input::placeholder{
  color:#64748b;
}
html:not([data-theme="dark"]) .auth-card button.link-action,
html:not([data-theme="dark"]) .back{
  color:#1d4ed8;
}
html:not([data-theme="dark"]) .trust-line span{
  color:#334155;
}
html:not([data-theme="dark"]) .trust-line > span:first-child{
  color:#16a34a;
}
html:not([data-theme="dark"]) .code-help{
  background:rgba(22,163,74,.08);
  border-color:rgba(22,163,74,.22);
  color:#166534;
}
html:not([data-theme="dark"]) .notice{background:#fff;border-color:rgba(203,213,225,.9);color:#475569}
html:not([data-theme="dark"]) .notice.error{background:rgba(254,242,242,.9);border-color:rgba(248,113,113,.35);color:#b91c1c}
html:not([data-theme="dark"]) .msg.error{
  background:rgba(254,242,242,.92);
  border-color:rgba(248,113,113,.38);
  color:#b91c1c;
}
html:not([data-theme="dark"]) .msg.ok{
  background:rgba(240,253,244,.92);
  border-color:rgba(34,197,94,.28);
  color:#166534;
}
/* Shared floating cookie settings button. Keep homepage visibility controlled by home.js. */
.cookie-float-btn{
  position:fixed;
  bottom:1.5rem;
  left:1.5rem;
  z-index:9990;
  width:42px;
  height:42px;
  border-radius:50%;
  border:1px solid rgba(59,130,246,.22);
  background:rgba(13,17,23,.92);
  color:#64748b;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  cursor:pointer;
  box-shadow:0 4px 20px rgba(0,0,0,.34);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  transition:color .2s,border-color .2s,box-shadow .2s,transform .2s,background .2s;
}
a.cookie-float-btn{display:flex}
.cookie-float-btn:hover{
  color:#3b82f6;
  border-color:#3b82f6;
  box-shadow:0 4px 20px rgba(59,130,246,.22);
  transform:scale(1.06);
}
.cookie-float-btn svg{width:18px;height:18px;display:block;flex:0 0 auto}
html:not([data-theme="dark"]) .cookie-float-btn{
  background:rgba(255,255,255,.9);
  border-color:rgba(37,99,235,.18);
  color:#64748b;
  box-shadow:0 12px 32px rgba(15,23,42,.12);
}
html:not([data-theme="dark"]) .cookie-float-btn:hover{
  color:#2563eb;
  border-color:#2563eb;
  box-shadow:0 12px 32px rgba(37,99,235,.18);
}
@media(max-width:640px){
  .cookie-float-btn{bottom:1rem;left:1rem;width:40px;height:40px}
}

/* Cabinet light theme contrast 2026-05-12 */
html:not([data-theme="dark"]) .wrap{color:#0f172a}
html:not([data-theme="dark"]) .cabinet-userbar{color:#475569}
html:not([data-theme="dark"]) .cabinet-userbar button,
html:not([data-theme="dark"]) .link-btn,
html:not([data-theme="dark"]) .site-actions button,
html:not([data-theme="dark"]) .secondary{
  background:#fff;
  border-color:rgba(148,163,184,.42);
  color:#0f172a;
  box-shadow:0 8px 22px rgba(15,23,42,.06);
}
html:not([data-theme="dark"]) .cabinet-userbar button:hover,
html:not([data-theme="dark"]) .link-btn:hover,
html:not([data-theme="dark"]) .site-actions button:hover,
html:not([data-theme="dark"]) .secondary:hover{border-color:rgba(37,99,235,.45);color:#1d4ed8}
html:not([data-theme="dark"]) .add-site-panel,
html:not([data-theme="dark"]) .site-card,
html:not([data-theme="dark"]) .add-more-card{
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,250,252,.96));
  border-color:rgba(203,213,225,.94);
  box-shadow:0 20px 60px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.95);
}
html:not([data-theme="dark"]) .site-card.expanded{
  background:#fff;
  border-color:rgba(37,99,235,.30);
  box-shadow:0 24px 70px rgba(37,99,235,.12),inset 0 1px 0 rgba(255,255,255,.95);
}
html:not([data-theme="dark"]) .site-card.is-auditing{border-color:rgba(37,99,235,.42);box-shadow:0 22px 70px rgba(37,99,235,.16)}
html:not([data-theme="dark"]) .expand-toggle,
html:not([data-theme="dark"]) .recommendation-expand-toggle,
html:not([data-theme="dark"]) .recommendation-row-expand-toggle{
  background:#f8fafc;
  border-color:rgba(148,163,184,.42);
  color:#1d4ed8;
}
html:not([data-theme="dark"]) .site-id{background:#f8fafc;border-color:rgba(148,163,184,.36);color:#64748b}
html:not([data-theme="dark"]) .site-domain{color:#0f172a}
html:not([data-theme="dark"]) .site-meta,
html:not([data-theme="dark"]) .score-total,
html:not([data-theme="dark"]) .score-gauge-copy strong span,
html:not([data-theme="dark"]) .history-score > span:first-child,
html:not([data-theme="dark"]) .weekly-status{color:#64748b}
html:not([data-theme="dark"]) .badge.free{background:rgba(37,99,235,.08);border-color:rgba(37,99,235,.22);color:#1d4ed8}
html:not([data-theme="dark"]) .badge.pro{background:rgba(22,163,74,.10);border-color:rgba(22,163,74,.26);color:#166534}
html:not([data-theme="dark"]) .score-gauge-card{
  background:radial-gradient(circle at 50% 18%,rgba(37,99,235,.09),rgba(255,255,255,.98) 60%);
  border-color:rgba(203,213,225,.9);
  box-shadow:0 14px 42px rgba(15,23,42,.07);
}
html:not([data-theme="dark"]) .score-gauge-card-compact{background:transparent;box-shadow:none;border-color:transparent}
html:not([data-theme="dark"]) .score-gauge-bg{stroke:#dbe3ee}
html:not([data-theme="dark"]) .score-gauge-value{fill:#0f172a}
html:not([data-theme="dark"]) .score-gauge-copy strong{color:#0f172a}
html:not([data-theme="dark"]) .score-gauge-copy small{color:#334155}
html:not([data-theme="dark"]) .site-details{border-top-color:rgba(203,213,225,.9)}
html:not([data-theme="dark"]) .site-actions .check-btn{background:linear-gradient(135deg,#16a34a,#22c55e);border-color:rgba(22,163,74,.34);color:#052e16;box-shadow:0 12px 28px rgba(22,163,74,.18)}
html:not([data-theme="dark"]) .site-actions .check-btn.is-cooldown,
html:not([data-theme="dark"]) .site-actions .check-btn.is-running{background:#e2e8f0;border-color:rgba(148,163,184,.46);color:#334155;box-shadow:none}
html:not([data-theme="dark"]) .site-actions .trash-btn{background:#fff5f5;border-color:rgba(239,68,68,.26);color:#b91c1c}
html:not([data-theme="dark"]) .recommendations-panel,
html:not([data-theme="dark"]) .recommendations-panel-secondary{
  background:linear-gradient(135deg,rgba(239,246,255,.98),rgba(255,255,255,.96));
  border-color:rgba(147,197,253,.56);
  box-shadow:0 16px 48px rgba(37,99,235,.10);
}
html:not([data-theme="dark"]) .recommendations-head h3,
html:not([data-theme="dark"]) .score-result-head h3,
html:not([data-theme="dark"]) .recommendation-group-head h4,
html:not([data-theme="dark"]) .recommendation-title-line h5,
html:not([data-theme="dark"]) .recommendation-content > h5,
html:not([data-theme="dark"]) .recommendation-detail-section h6,
html:not([data-theme="dark"]) .recommendation-pro-materials h6,
html:not([data-theme="dark"]) .history h3,
html:not([data-theme="dark"]) .pro-offer h3,
html:not([data-theme="dark"]) .pro-panel h3,
html:not([data-theme="dark"]) .pro-task-grid article strong,
html:not([data-theme="dark"]) .pro-tool-card h4,
html:not([data-theme="dark"]) .pro-management strong,
html:not([data-theme="dark"]) .pro-result h4{color:#0f172a}
html:not([data-theme="dark"]) .recommendations-head p,
html:not([data-theme="dark"]) .score-result-head p,
html:not([data-theme="dark"]) .recommendation-note,
html:not([data-theme="dark"]) .recommendation-item p,
html:not([data-theme="dark"]) .recommendation-fix-details p,
html:not([data-theme="dark"]) .recommendation-detail-notes,
html:not([data-theme="dark"]) .pro-task-grid article p,
html:not([data-theme="dark"]) .pro-tool-card p,
html:not([data-theme="dark"]) .pro-result,
html:not([data-theme="dark"]) .pro-result p{color:#475569}
html:not([data-theme="dark"]) .recommendations-count{background:#ecfdf5;border-color:rgba(22,163,74,.28);color:#166534}
html:not([data-theme="dark"]) .recommendations-count span{color:#64748b}
html:not([data-theme="dark"]) .score-result-block{
  background:linear-gradient(180deg,#fff,rgba(248,250,252,.96));
  border-color:rgba(203,213,225,.92);
  box-shadow:0 14px 44px rgba(15,23,42,.07);
}
html:not([data-theme="dark"]) .score-result-ai{border-color:rgba(22,163,74,.24)}
html:not([data-theme="dark"]) .score-result-citability{border-color:rgba(37,99,235,.26)}
html:not([data-theme="dark"]) .score-result-info{background:linear-gradient(180deg,#fff7ed,#fff);border-color:rgba(245,158,11,.32)}
html:not([data-theme="dark"]) .breakdown-label{color:#334155}
html:not([data-theme="dark"]) .breakdown-label strong{color:#0f172a}
html:not([data-theme="dark"]) .breakdown-bar{background:#dbe3ee}
html:not([data-theme="dark"]) .breakdown-empty,
html:not([data-theme="dark"]) .score-empty-state{background:#f8fafc;border-color:rgba(148,163,184,.34);color:#64748b}
html:not([data-theme="dark"]) .recommendation-group,
html:not([data-theme="dark"]) .recommendation-item,
html:not([data-theme="dark"]) .history-item,
html:not([data-theme="dark"]) .pro-result details{border-color:rgba(203,213,225,.82)}
html:not([data-theme="dark"]) .recommendation-group-head .recommendation-count{background:#eef2ff;color:#3730a3}
html:not([data-theme="dark"]) .recommendation-index{background:#dcfce7;color:#166534}
html:not([data-theme="dark"]) .recommendation-item strong{color:#1d4ed8}
html:not([data-theme="dark"]) .recommendation-progress{color:#64748b}
html:not([data-theme="dark"]) .recommendation-impact{background:#dcfce7;border-color:rgba(22,163,74,.26);color:#166534}
html:not([data-theme="dark"]) .recommendation-impact.is-citability{background:#dbeafe;border-color:rgba(37,99,235,.24);color:#1d4ed8}
html:not([data-theme="dark"]) .recommendation-impact.is-info{background:#fef3c7;border-color:rgba(217,119,6,.28);color:#92400e}
html:not([data-theme="dark"]) .recommendation-impact.is-optional{background:#f3e8ff;border-color:rgba(147,51,234,.24);color:#6d28d9}
html:not([data-theme="dark"]) .recommendation-fix-details,
html:not([data-theme="dark"]) .recommendation-pro-materials,
html:not([data-theme="dark"]) .pro-material-code pre,
html:not([data-theme="dark"]) .pro-result pre{
  background:#f8fafc;
  border-color:rgba(203,213,225,.9);
  color:#0f172a;
}

html:not([data-theme="dark"]) .recommendation-pro-materials{
  background:linear-gradient(135deg,rgba(236,253,245,.98),rgba(239,246,255,.96));
  border-color:rgba(22,163,74,.30);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 10px 26px rgba(22,163,74,.08);
}
html:not([data-theme="dark"]) .recommendation-fix-steps,
html:not([data-theme="dark"]) .pro-material-text{color:#334155}
html:not([data-theme="dark"]) .recommendation-detail-facts span{background:#fff;border-color:rgba(148,163,184,.34);color:#475569}
html:not([data-theme="dark"]) .pro-materials-status{color:#475569}
html:not([data-theme="dark"]) .pro-materials-status.is-error{color:#b91c1c}
html:not([data-theme="dark"]) .pro-material-item strong{color:#166534}
html:not([data-theme="dark"]) .pro-material-footer,
html:not([data-theme="dark"]) .pro-material-disclaimer,
html:not([data-theme="dark"]) .pro-material-warnings{color:#92400e}
html:not([data-theme="dark"]) .pro-material-copy{background:#fff;border-color:rgba(37,99,235,.26);color:#1d4ed8;box-shadow:0 8px 20px rgba(15,23,42,.08)}
html:not([data-theme="dark"]) .history-item{color:#475569}
html:not([data-theme="dark"]) .history-score{color:#0f172a}
html:not([data-theme="dark"]) .locked-item{background:#f8fafc;border-color:rgba(148,163,184,.34);color:#334155}
html:not([data-theme="dark"]) .pro-teaser,
html:not([data-theme="dark"]) .pro-panel{
  background:linear-gradient(135deg,rgba(239,246,255,.98),rgba(245,243,255,.96));
  border-color:rgba(147,197,253,.56);
  box-shadow:0 16px 48px rgba(37,99,235,.09);
}
html:not([data-theme="dark"]) .pro-teaser strong{color:#0f172a}
html:not([data-theme="dark"]) .pro-teaser p,
html:not([data-theme="dark"]) .pro-offer-lead{color:#475569}
html:not([data-theme="dark"]) .pro-chip-row span,
html:not([data-theme="dark"]) .locked-chip,
html:not([data-theme="dark"]) .pro-task-grid article span,
html:not([data-theme="dark"]) .tool-status{background:#dbeafe;border-color:rgba(37,99,235,.24);color:#1d4ed8}
html:not([data-theme="dark"]) .locked-chip.is-unlocked,
html:not([data-theme="dark"]) .tool-status.ready{background:#dcfce7;border-color:rgba(22,163,74,.26);color:#166534}
html:not([data-theme="dark"]) .tool-status.input-needed{background:#fef3c7;color:#92400e}
html:not([data-theme="dark"]) .pro-offer{
  background:radial-gradient(circle at 50% 0,rgba(22,163,74,.10),transparent 34%),radial-gradient(circle at 20% 90%,rgba(37,99,235,.10),transparent 30%),linear-gradient(180deg,#fff,#f8fafc);
  border-color:rgba(22,163,74,.28);
  box-shadow:0 20px 60px rgba(15,23,42,.08);
}
html:not([data-theme="dark"]) .pro-offer:before{opacity:.18;background-image:radial-gradient(rgba(37,99,235,.18) 1px,transparent 1px)}
html:not([data-theme="dark"]) .pro-offer .kicker{background:#dcfce7;border-color:rgba(22,163,74,.26);color:#166534}
html:not([data-theme="dark"]) .pro-price-card,
html:not([data-theme="dark"]) .pro-price-inline,
html:not([data-theme="dark"]) .pro-delivery-strip,
html:not([data-theme="dark"]) .pro-task-grid article,
html:not([data-theme="dark"]) .pro-tool-card,
html:not([data-theme="dark"]) .pro-management,
html:not([data-theme="dark"]) .pro-result{
  background:#fff;
  border-color:rgba(203,213,225,.9);
  box-shadow:0 10px 32px rgba(15,23,42,.06);
}
html:not([data-theme="dark"]) .pro-price-card strong,
html:not([data-theme="dark"]) .pro-price-inline strong{color:#0f172a}
html:not([data-theme="dark"]) .pro-price-card span,
html:not([data-theme="dark"]) .pro-price-inline span,
html:not([data-theme="dark"]) .pro-delivery-strip span,
html:not([data-theme="dark"]) .pro-trust-copy,
html:not([data-theme="dark"]) .renewal-reasons{color:#334155}
html:not([data-theme="dark"]) .pro-delivery-strip span:not(:first-child):before{background:rgba(100,116,139,.55)}
html:not([data-theme="dark"]) .pro-tool-card button,
html:not([data-theme="dark"]) .compare-form button,
html:not([data-theme="dark"]) .weekly-actions button{background:#eff6ff;border-color:rgba(37,99,235,.30);color:#1d4ed8}
html:not([data-theme="dark"]) .weekly-actions button:first-child{background:#ecfdf5;border-color:rgba(22,163,74,.30);color:#166534}
html:not([data-theme="dark"]) .compare-form label,
html:not([data-theme="dark"]) .weekly-form label,
html:not([data-theme="dark"]) .pro-result summary{color:#1e3a8a}
html:not([data-theme="dark"]) .compare-form input,
html:not([data-theme="dark"]) .weekly-form input{background:#fff;color:#0f172a;border-color:rgba(148,163,184,.45)}
html:not([data-theme="dark"]) .modal-card{background:#fff;border-color:rgba(203,213,225,.9);box-shadow:0 30px 90px rgba(15,23,42,.18)}
html:not([data-theme="dark"]) .modal-close{background:#f8fafc;border-color:rgba(148,163,184,.38);color:#0f172a}
html:not([data-theme="dark"]) .pay-price{background:linear-gradient(135deg,rgba(37,99,235,.08),rgba(124,58,237,.08));border-color:rgba(37,99,235,.22);color:#0f172a}
html:not([data-theme="dark"]) .pay-benefits{color:#334155}
html:not([data-theme="dark"]) .mock-note{color:#64748b}
html:not([data-theme="dark"]) .pay-price small{color:#64748b}
