/* V3.1: accessible theme switch; the speed-test logic and layout remain untouched. */
.theme-toggle {
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:9px 12px;border:1px solid var(--edge);border-radius:10px;
  background:var(--panel2);color:var(--text);font-size:12px;font-weight:750;
  line-height:1.25;white-space:nowrap;cursor:pointer;min-height:38px;
  transition:border-color .18s;
}
.theme-toggle:hover{border-color:var(--aqua);background:var(--panel)}
.nav-links a{transition:none}
.theme-toggle:focus-visible{outline:3px solid var(--aqua);outline-offset:3px}
.theme-icon{font-size:19px;line-height:1}
@media(max-width:1170px){.navigation{column-gap:16px}.nav-links{gap:16px}}
@media(max-width:750px){.theme-toggle{margin-left:auto}.nav-cta{margin-left:0}}
@media(max-width:560px){.theme-label{display:none}.theme-toggle{width:40px;padding:9px}.nav-links{order:5}}
@media(max-width:450px){.nav-cta{display:none}}
/* Light theme uses separate selectors, so original dark theme remains pixel-identical. */
html[data-theme="light"] {
  color-scheme:light;
  --bg:#f4f8fc;--panel:#ffffff;--panel2:#ffffff;
  --edge:#d6e1ec;--muted:#53667d;--text:#16273c;
  --aqua:#087668;--violet:#4247b4;--soft:#405970;
  --quiet:#62778d;--ink:#1c3449;
}
html[data-theme="light"] body {
  background:radial-gradient(ellipse 65% 24% at 50% 0%,#e3f6f7 0%,transparent 82%),
             radial-gradient(ellipse 35% 20% at 97% 23%,#d4f4e850,transparent 80%),var(--bg);
  color:var(--text);
}
html[data-theme="light"] .site-header{border-bottom-color:#d8e3ec;background:#ffffffd9}
html[data-theme="light"] .brand-domain{color:#546b80}
html[data-theme="light"] .brand-icon{background:#ffffff;color:#0c645e;box-shadow:0 3px 16px #66c9b91e;border-color:#93cfc4}
html[data-theme="light"] .nav-links a{color:#334b62}
html[data-theme="light"] .nav-links a:hover{color:#086c62}
html[data-theme="light"] .nav-cta{border-color:#a6d1c8;color:#076f65;background:#ecfbf7}
html[data-theme="light"] .nav-cta:hover{background:#d9f4ed}
html[data-theme="light"] .theme-toggle{background:#fff;color:#20364b;border-color:#cbdbe6}
html[data-theme="light"] .theme-toggle:hover{background:#e7f5f1;border-color:#4c9f91}
html[data-theme="light"] .eyebrow-line{background:#91a9bd}
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .section-kicker,
html[data-theme="light"] .panel-kicker,
html[data-theme="light"] .learn-type{color:#076b62}
html[data-theme="light"] .new-hero h1 span,
html[data-theme="light"] .hero h1 span{color:#087668;background:linear-gradient(110deg,#057e74,#31579d);background-clip:text;-webkit-text-fill-color:transparent}
html[data-theme="light"] .hero-description,
html[data-theme="light"] .hero-qualities,
html[data-theme="light"] .section-heading p:not(.section-kicker),
html[data-theme="light"] .section-note{color:#51667c}
html[data-theme="light"] .trust-strip{background:#fffdfd;border-color:#d4e1e9}
html[data-theme="light"] .trust-strip small{color:#52677c}
html[data-theme="light"] .trust-symbol{color:#087668}
html[data-theme="light"] .test-panel,
html[data-theme="light"] .test-panel-v3{
  background:linear-gradient(150deg,#fff,#f1fbfa 65%,#e9f5fc);
  border-color:#bbd4dc;box-shadow:0 20px 65px #213e5c16,0 0 50px #4acdb010;
}
html[data-theme="light"] .test-panel-v3::before{background:linear-gradient(90deg,transparent,#079b83,transparent)}
html[data-theme="light"] .panel-live{color:#075f55;background:#e5f8f0;border-color:#9cd5c0}
html[data-theme="light"] .test-configuration{background:#f3f8fd;border-color:#d1e0ea}
html[data-theme="light"] .test-configuration p,
html[data-theme="light"] .test-configuration label{color:#4d6074}
html[data-theme="light"] .test-configuration select,
html[data-theme="light"] .profile-picker select{
  background:#fff;color:#1a3049;border-color:#a8c1d4;box-shadow:none;
}
html[data-theme="light"] .dial-outer{border-color:#b4d2d7;box-shadow:0 0 0 17px #dcf0f0b3,0 0 55px #49c8ab25}
html[data-theme="light"] .dial-inner,
html[data-theme="light"] .test-panel-v3 .dial-inner{
  background:radial-gradient(circle at 50% 65%,#c6f8e9,#e7f4fa 78%);
  border-color:#149985;box-shadow:inset 0 0 25px #48bca728,0 0 18px #20b7a02b;
}
html[data-theme="light"] .start-button{color:#143047}
html[data-theme="light"] .start-button:hover{color:#076d62}
html[data-theme="light"] .play-symbol{color:#fff;background:#077c6d}
html[data-theme="light"] .test-status,
html[data-theme="light"] .test-stage,
html[data-theme="light"] .test-panel-foot{color:#50677e}
html[data-theme="light"] .test-panel-foot{border-top-color:#d0dfe8}
html[data-theme="light"] .live-data{color:#586d82}
html[data-theme="light"] .live-data strong{color:#086d63}
html[data-theme="light"] .real-trace{background:linear-gradient(180deg,#c7f4ef,#f1fcfa)}
html[data-theme="light"] .trace-axis{stroke:#9bb9c5}
html[data-theme="light"] #test-progress,
html[data-theme="light"] #test-progress::-webkit-progress-bar{background:#ccdfeb}
html[data-theme="light"] .profile-picker,
html[data-theme="light"] .readiness-card,
html[data-theme="light"] .metric-card,
html[data-theme="light"] .info-card,
html[data-theme="light"] .learn-card,
html[data-theme="light"] .result-share{
  background:linear-gradient(145deg,#fff,#fbfdff);border-color:#d5e1eb;
  box-shadow:0 8px 28px #143e6010;
}
html[data-theme="light"] .metric-featured{background:linear-gradient(140deg,#e0faf1,#eff8fe);border-color:#9bdbca}
html[data-theme="light"] .metric-label,
html[data-theme="light"] .metric-desc,
html[data-theme="light"] .result-share p,
html[data-theme="light"] .fine-print,
html[data-theme="light"] .card-sub,
html[data-theme="light"] .hint{color:#536b80}
html[data-theme="light"] .metric-symbol{color:#07776c}
html[data-theme="light"] .share-controls input{background:#fff;color:#183248;border-color:#afc6d7}
html[data-theme="light"] .share-controls input::placeholder{color:#687d8e}
html[data-theme="light"] .secondary-button{background:#e6f7f0;border-color:#91c7b6;color:#075e55}
html[data-theme="light"] .secondary-button:hover{background:#d3f4e9}
html[data-theme="light"] .activity-heading p:not(.section-kicker),
html[data-theme="light"] .profile-hint,
html[data-theme="light"] .profile-guidance{color:#4e647a}
html[data-theme="light"] .activity-mark,
html[data-theme="light"] .profile-label{color:#087668}
html[data-theme="light"] .usage-cards button{background:#f1f7fb;border-color:#c6dce7;color:#254157}
html[data-theme="light"] .usage-cards button:hover{background:#e2f6f0;border-color:#5da797}
html[data-theme="light"] .readiness-card>p:not(.profile-label):not(.profile-guidance){color:#50667b}
html[data-theme="light"] .readiness-badge{background:#e8f1f5;border-color:#c1d5dc;color:#285265}
html[data-theme="light"] .readiness-badge[data-level=good]{background:#dcf8e9;color:#07674a;border-color:#8ac9ae}
html[data-theme="light"] .readiness-badge[data-level=mixed]{background:#fff3d4;color:#835517;border-color:#dbbe74}
html[data-theme="light"] .readiness-badge[data-level=poor]{background:#feebea;color:#982c3a;border-color:#ebb2b5}
html[data-theme="light"] .readiness-list li{border-bottom-color:#d9e4ec}
html[data-theme="light"] .readiness-list li span{color:#2d485d}
html[data-theme="light"] .readiness-list li strong{color:#086b61}
html[data-theme="light"] .readiness-list li.caution strong{color:#965a10}
html[data-theme="light"] .profile-guidance{border-top-color:#d9e4ec}
html[data-theme="light"] .tag{background:#e5f4ef;border-color:#bfdfd2;color:#076a5d}
html[data-theme="light"] .connection-info dt,
html[data-theme="light"] .capability-list span{color:#52677c}
html[data-theme="light"] .guide-tiles a{background:linear-gradient(145deg,#fff,#f3f9fc);border-color:#c8dce7}
html[data-theme="light"] .guide-tiles a:hover{border-color:#65b6a3;box-shadow:0 10px 24px #197c7510}
html[data-theme="light"] .guide-tiles span{color:#0a766a}
html[data-theme="light"] .guide-tiles small{color:#50667e}
html[data-theme="light"] .learn-card>span:not(.learn-icon):not(.learn-type),
html[data-theme="light"] .learn-card b{color:#4d667d}
html[data-theme="light"] .faq-list p,
html[data-theme="light"] .faq-list summary{color:#334a60}
html[data-theme="light"] .faq-list a,
html[data-theme="light"] .article-body a{color:#087165}
html[data-theme="light"] .article-hero>p,
html[data-theme="light"] .article-body p,
html[data-theme="light"] .article-body li{color:#425a71}
html[data-theme="light"] .article-body{background:#fff;border-color:#d5e2ec;box-shadow:0 12px 38px #23384d0d}
html[data-theme="light"] .article-cta{background:#edf7f4;border-color:#cbdfd9}
html[data-theme="light"] .article-cta a{color:#076e63}
html[data-theme="light"] .page-quick-test{background:#e9f9f4;border-color:#a2d8c7}
html[data-theme="light"] .page-quick-test p{color:#47675e}
html[data-theme="light"] .page-quick-test a{background:#087768;color:#fff}
html[data-theme="light"] .site-footer{border-top-color:#d7e4ea}
html[data-theme="light"] .site-footer p,
html[data-theme="light"] .site-footer nav a,
html[data-theme="light"] .copyright{color:#586f82}
html[data-theme="light"] .site-footer nav a:hover{color:#075f58}
/* Both themes keep readable focus indicators and controls on smaller devices. */

/* V3.6: transparent brand treatment in light mode too. */
html[data-theme="light"] .navigation .brand-icon {
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
html[data-theme="light"] .navigation .brand-logo {
  filter:brightness(.76) saturate(1.23);
}
