/* Suiza Clara — light/dark theme layer */
:root{
  color-scheme:light;
}

html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0f1113;
  --paper:#131619;
  --white:#191d21;
  --ink:#f2f0ea;
  --muted:#aaa79f;
  --muted2:#817f78;
  --line:#2b3035;
  --line2:#3a4046;
  --red:#ef3b52;
  --red2:#ff5367;
  --green:#62c99f;
  --blue:#72addb;
  --gold:#d4ac55;
  --dark:#090b0d;
  --dark2:#14171a;
  --shadow:0 24px 70px rgba(0,0,0,.34);
}

html[data-theme="dark"] body{background:var(--bg);color:var(--ink)}
html[data-theme="dark"] .site-header{
  background:rgba(15,17,19,.88);
  border-bottom-color:rgba(58,64,70,.72);
}
html[data-theme="dark"] .nav-links>a{color:#d8d5cd}
html[data-theme="dark"] .brand small{color:var(--muted)}
html[data-theme="dark"] .nav-search,
html[data-theme="dark"] .menu-toggle,
html[data-theme="dark"] .more-toggle,
html[data-theme="dark"] .theme-toggle{
  background:rgba(25,29,33,.88);
  border-color:var(--line2);
  color:var(--ink);
}
html[data-theme="dark"] .nav-search kbd{background:#22272c;border-color:#394047;color:var(--muted)}
html[data-theme="dark"] .mobile-panel{background:var(--bg)}

.theme-toggle{
  width:40px;
  height:40px;
  flex:0 0 40px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.68);
  color:var(--ink);
  padding:0;
  transition:background .18s ease,border-color .18s ease,transform .18s ease;
}
.theme-toggle:hover{transform:translateY(-1px)}
.theme-toggle:focus-visible{outline:2px solid var(--red);outline-offset:2px}
.theme-toggle .theme-sun,.theme-toggle .theme-moon{grid-area:1/1;font-size:1rem;line-height:1;transition:opacity .16s ease,transform .2s ease}
.theme-toggle .theme-sun{opacity:1;transform:scale(1) rotate(0)}
.theme-toggle .theme-moon{opacity:0;transform:scale(.7) rotate(-18deg)}
html[data-theme="dark"] .theme-toggle .theme-sun{opacity:0;transform:scale(.7) rotate(18deg)}
html[data-theme="dark"] .theme-toggle .theme-moon{opacity:1;transform:scale(1) rotate(0)}

/* Core surfaces */
html[data-theme="dark"] .hero-final{background:radial-gradient(circle at 78% 18%,rgba(239,59,82,.10),transparent 28%),var(--paper)}
html[data-theme="dark"] .ticker,
html[data-theme="dark"] .wow-card:not(.red):not(.dark),
html[data-theme="dark"] .salary-visual,
html[data-theme="dark"] .source-stack span,
html[data-theme="dark"] .decision-results,
html[data-theme="dark"] .atlas-controls,
html[data-theme="dark"] .atlas-ranking,
html[data-theme="dark"] .rumor-card,
html[data-theme="dark"] .plan-canton,
html[data-theme="dark"] .road-phase,
html[data-theme="dark"] .contract-report,
html[data-theme="dark"] .comm-row,
html[data-theme="dark"] .community-method,
html[data-theme="dark"] .compare-card,
html[data-theme="dark"] .check-item,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .salary-table-wrap{
  background:var(--white);
  color:var(--ink);
}
html[data-theme="dark"] .pale-section,
html[data-theme="dark"] .section-paper,
html[data-theme="dark"] .decision-note,
html[data-theme="dark"] .decision-detail,
html[data-theme="dark"] .contract-market{
  background:var(--paper);
  color:var(--ink);
}
html[data-theme="dark"] .kpi-strip{background:rgba(25,29,33,.88)}
html[data-theme="dark"] .card{box-shadow:0 1px 0 rgba(255,255,255,.03) inset}
html[data-theme="dark"] .card-hover:hover{border-color:#495058}
html[data-theme="dark"] .icon-tile{background:#23272b}
html[data-theme="dark"] .source-box{background:rgba(25,29,33,.68)}
html[data-theme="dark"] .page-hero:after{background:repeating-radial-gradient(circle,transparent 0 28px,rgba(185,180,169,.07) 29px 30px,transparent 31px 50px)}
html[data-theme="dark"] .hero:before{background:repeating-radial-gradient(ellipse at 55% 45%,transparent 0 27px,rgba(205,200,189,.07) 28px 29px,transparent 30px 48px)}

/* Typography on light-coded content */
html[data-theme="dark"] .article-section p,
html[data-theme="dark"] .article-section ul,
html[data-theme="dark"] .rumor-detail>p,
html[data-theme="dark"] .field label,
html[data-theme="dark"] .field>span{color:#c5c2ba}
html[data-theme="dark"] .lede,
html[data-theme="dark"] .section-head>p,
html[data-theme="dark"] .wow-card p,
html[data-theme="dark"] .profession-card p,
html[data-theme="dark"] .profession-card .terms,
html[data-theme="dark"] .check-item span{color:var(--muted)}

/* Inputs, selects and interactive controls */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .input,
html[data-theme="dark"] .select,
html[data-theme="dark"] .searchbox input{
  background:#15191d;
  color:var(--ink);
  border-color:var(--line2);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#9ea4aa;opacity:1}
html[data-theme="dark"] .chip,
html[data-theme="dark"] .pill{
  background:rgba(25,29,33,.82);
  border-color:var(--line2);
}
html[data-theme="dark"] .chip.active,
html[data-theme="dark"] .chip:hover,
html[data-theme="dark"] .metric-tabs button.active{background:#ece9e1;color:#111310;border-color:#ece9e1}
html[data-theme="dark"] .metric-tabs button{background:var(--white);border-color:var(--line2);color:var(--ink)}
html[data-theme="dark"] .btn{background:var(--white);border-color:var(--line2);color:var(--ink)}
html[data-theme="dark"] .btn-primary{background:var(--red);border-color:var(--red);color:#fff}
html[data-theme="dark"] .btn-primary:hover{background:var(--red2)}
html[data-theme="dark"] .btn-dark{background:#ece9e1;border-color:#ece9e1;color:#111310}
html[data-theme="dark"] .btn-ghost{background:transparent}

/* Tables */
html[data-theme="dark"] .data-table th{background:#14181c;color:var(--muted)}
html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .data-table th,
html[data-theme="dark"] .salary-table td,
html[data-theme="dark"] .salary-table th{border-color:var(--line)}
html[data-theme="dark"] .bar{background:#2a2f34}

/* Decision / calculator / comparison */
html[data-theme="dark"] .tool-step>span{background:#ece9e1;color:#111310}
html[data-theme="dark"] .de-rank:hover{background:#202429}
html[data-theme="dark"] .de-kpis>div,
html[data-theme="dark"] .de-reasons>div{background:#1a1e22}
html[data-theme="dark"] .decision-detail{border:1px solid var(--line)}
html[data-theme="dark"] .offer-form,
html[data-theme="dark"] .offer-results,
html[data-theme="dark"] .salary-control,
html[data-theme="dark"] .salary-context,
html[data-theme="dark"] .prof-benchmark,
html[data-theme="dark"] .prof-top-canton,
html[data-theme="dark"] .compare-pro-card,
html[data-theme="dark"] .community-method,
html[data-theme="dark"] .community-zero,
html[data-theme="dark"] .plan-profile{background:var(--white);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .result-panel,
html[data-theme="dark"] .decision-placeholder,
html[data-theme="dark"] .plan-hero,
html[data-theme="dark"] .salary-main,
html[data-theme="dark"] .fact-card,
html[data-theme="dark"] .community-zero,
html[data-theme="dark"] .hero-command{background:#090b0d;color:#fff}
html[data-theme="dark"] .salary-visual{color:var(--ink)}
html[data-theme="dark"] .salary-visual .pyramid:not(.pyramid-final)>div{background:#0b0d0f;color:#fff}
html[data-theme="dark"] .market-range-values>div,
html[data-theme="dark"] .salary-mini-three>div,
html[data-theme="dark"] .prof-mini-salaries>div,
html[data-theme="dark"] .interpret-facts>div{background:#171b1f;border-color:var(--line)}

/* Cards and content variants */
html[data-theme="dark"] .rumor-verdict.false{background:#3a171d}
html[data-theme="dark"] .rumor-status span{background:#2a2f34;color:#d5d2ca}
html[data-theme="dark"] .rumor-card.true .rumor-status span{background:#16372c;color:#8dd8b8}
html[data-theme="dark"] .rumor-card.false .rumor-status span{background:#421b22;color:#ff9eab}
html[data-theme="dark"] .rumor-card.depends .rumor-status span{background:#3c3018;color:#e5c878}
html[data-theme="dark"] .drop-zone{background:#15191d;border-color:#454b52}
html[data-theme="dark"] .drop-zone.drag{background:#2a171c;border-color:var(--red)}
html[data-theme="dark"] .check-matrix span{background:#171b1f}
html[data-theme="dark"] .contract-item{background:#171b1f}
html[data-theme="dark"] .contract-item.good{background:#13271f;border-color:#285a47}
html[data-theme="dark"] .contract-item.warn{background:#2d2514;border-color:#665522}
html[data-theme="dark"] .contract-item.missing{background:#181b1e;color:#96938b}
html[data-theme="dark"] .progress-shell{background:#2b3035}

/* Search / menus */
html[data-theme="dark"] .more-menu,
html[data-theme="dark"] .search-modal{background:#15191d;color:var(--ink);border-color:var(--line2)}
html[data-theme="dark"] .search-result:hover,
html[data-theme="dark"] .search-result.active{background:#20252a}
html[data-theme="dark"] .search-overlay{background:rgba(4,5,6,.72)}
html[data-theme="dark"] .map-tooltip{background:#f2f0ea;color:#111310}

/* Keep intentionally dark sections visually distinct from the page background. */
html[data-theme="dark"] .section-dark{background:#090b0d}
html[data-theme="dark"] .wow-card.dark{background:#0a0c0e;border-color:#282d32}
html[data-theme="dark"] .atlas-stage{background:#090b0d}
html[data-theme="dark"] .swiss-outline path{fill:#171a1d;stroke:#515860}

/* DARK CONTRAST HARDENING */
html[data-theme="dark"]{
  --sc-dark-surface:#191d21;
  --sc-dark-surface-2:#171b1f;
  --sc-dark-surface-3:#14181c;
  --sc-dark-text:#f2f0ea;
  --sc-dark-muted:#b7b3aa;
}

/* Home cards */
html[data-theme="dark"] .market-card,
html[data-theme="dark"] .final-market,
html[data-theme="dark"] .profession-market-card{
  background:var(--sc-dark-surface)!important;
  color:var(--sc-dark-text)!important;
  border-color:var(--line)!important;
}
html[data-theme="dark"] .market-card h3,
html[data-theme="dark"] .market-card b,
html[data-theme="dark"] .market-card strong,
html[data-theme="dark"] .market-card a,
html[data-theme="dark"] .market-card-foot,
html[data-theme="dark"] .profession-market-card h3,
html[data-theme="dark"] .profession-market-card b,
html[data-theme="dark"] .profession-market-card strong{color:var(--sc-dark-text)!important}
html[data-theme="dark"] .market-card span:not(.flag-code),
html[data-theme="dark"] .market-card small,
html[data-theme="dark"] .profession-market-card span:not(.flag-code),
html[data-theme="dark"] .profession-market-card small{color:var(--sc-dark-muted)!important}
html[data-theme="dark"] .market-card .flag-code,
html[data-theme="dark"] .profession-market-card .flag-code{color:var(--red)!important}
html[data-theme="dark"] .market-kpis>div,
html[data-theme="dark"] .market-card .mini-metric{
  background:var(--sc-dark-surface-2)!important;
  border-color:var(--line)!important;
}
html[data-theme="dark"] .market-card-foot{border-color:var(--line)!important}

/* Profession search-term matrices. */
html[data-theme="dark"] .phrase-table{border-color:var(--line)!important;background:transparent!important}
html[data-theme="dark"] .phrase-row{
  background:var(--sc-dark-surface)!important;
  color:var(--sc-dark-text)!important;
  border-color:var(--line)!important;
}
html[data-theme="dark"] .phrase-row>div{color:var(--sc-dark-text)!important;border-color:var(--line)!important}
html[data-theme="dark"] .phrase-row.header{background:var(--sc-dark-surface-3)!important}
html[data-theme="dark"] .phrase-row.header>div{color:var(--sc-dark-muted)!important}

/* Legacy light-coded cards across guides, jobs and profession/canton pages. */
html[data-theme="dark"] :is(.guide-card,.language-card,.job-card,.method-card,.source-card,.scenario-card,.scenario-insight,.budget-card,.cost-card,.salary-card,.community-aggregate,.profession-card,.canton-card){
  background:var(--sc-dark-surface)!important;
  color:var(--sc-dark-text)!important;
  border-color:var(--line)!important;
}
html[data-theme="dark"] :is(.guide-card,.language-card,.job-card,.method-card,.source-card,.scenario-card,.scenario-insight,.budget-card,.cost-card,.salary-card,.community-aggregate,.profession-card,.canton-card) :is(h2,h3,h4,b,strong,a){color:var(--sc-dark-text)}
html[data-theme="dark"] :is(.guide-card,.language-card,.job-card,.method-card,.source-card,.scenario-card,.scenario-insight,.budget-card,.cost-card,.salary-card,.community-aggregate,.profession-card,.canton-card) :is(p,small,.meta,.help){color:var(--sc-dark-muted)}

/* Data/result child cells. */
html[data-theme="dark"] :is(.market-range-values,.salary-mini-three,.prof-mini-salaries,.interpret-facts,.result-kpi-grid,.de-kpis,.de-reasons)>div{
  background:var(--sc-dark-surface-2);
  color:var(--sc-dark-text);
  border-color:var(--line);
}
html[data-theme="dark"] :is(.market-range-values,.salary-mini-three,.prof-mini-salaries,.interpret-facts,.result-kpi-grid,.de-kpis,.de-reasons)>div :is(span,small,.meta){color:var(--sc-dark-muted)}

/* Tables */
html[data-theme="dark"] :is(.data-table,.salary-table) tbody tr{background:var(--sc-dark-surface);color:var(--sc-dark-text)}
html[data-theme="dark"] :is(.data-table,.salary-table) tbody tr:hover{background:#20252a}
html[data-theme="dark"] :is(.data-table,.salary-table) td,
html[data-theme="dark"] :is(.data-table,.salary-table) td a,
html[data-theme="dark"] :is(.data-table,.salary-table) td b,
html[data-theme="dark"] :is(.data-table,.salary-table) td strong{color:var(--sc-dark-text)}
html[data-theme="dark"] :is(.data-table,.salary-table) td small{color:var(--sc-dark-muted)}

/* Secondary text and disabled controls. */
html[data-theme="dark"] .help,
html[data-theme="dark"] .meta,
html[data-theme="dark"] .privacy-note,
html[data-theme="dark"] .result-label,
html[data-theme="dark"] .caption,
html[data-theme="dark"] .data-kind{color:var(--sc-dark-muted)!important}
html[data-theme="dark"] input:disabled,
html[data-theme="dark"] select:disabled,
html[data-theme="dark"] textarea:disabled{color:#a8adb2;opacity:1}

/* Preserve semantic accent colours. */
html[data-theme="dark"] :is(.eyebrow,.flag-code,.canton-code,.nav-wow,.profession-card .category){color:var(--red)!important}
html[data-theme="dark"] .pill.official{color:var(--green)!important}
html[data-theme="dark"] .de-good{color:var(--green)!important}
html[data-theme="dark"] .de-risk{color:#ff8e9d!important}

/* Footer / breadcrumb secondary copy. */
html[data-theme="dark"] .footer-col a,
html[data-theme="dark"] .footer-brand p,
html[data-theme="dark"] .footer-bottom,
html[data-theme="dark"] .breadcrumbs,
html[data-theme="dark"] .breadcrumbs a{color:var(--sc-dark-muted)}

@media(max-width:760px){
  .theme-toggle{width:40px;height:40px;flex-basis:40px;border-radius:11px}
}

@media(prefers-reduced-motion:reduce){
  .theme-toggle,.theme-toggle .theme-sun,.theme-toggle .theme-moon{transition:none}
}
