/* Original keeps the existing workspace palette. Light restores the bright canvas. */
@media screen {
  html[data-color-design] { background-color:var(--bg, #f7fafc); }
  html.workspace-background-active[data-color-design="original"] { background-color:#1b1e24; }
  html.workspace-background-active[data-color-design="light"] body {
    background: radial-gradient(ellipse at 10% 0%, #fff 0%, transparent 60%), linear-gradient(145deg, #f7fafc, #eaf1f8);
    background-attachment: fixed;
  }
  html.workspace-background-active[data-color-design="light"] .workspace-header.workspace-header h1,
  html.workspace-background-active[data-color-design="light"] .workspace-header .insight-school-name-insight { color: #24394c; }
  html[data-color-design="rose"] { --ink: #392d36; --muted: #7b6874; --line: #dfced8; --panel: #fffaf6ed; --panel-strong: #fffcfa; --bg: #f7eef0; --nav: #f6ebef; --nav-soft: #91537115; --accent: #965171; --accent-strong: #763b59; --blue: #87506d; --green: #648273; --silver: #fffaf6; --gold: #eadce3; --glass: #fffaf6db; --shadow: 0 18px 44px #69435715; }
  html[data-color-design="rose"] body,
  html.workspace-background-active[data-color-design="rose"] body {
    background: radial-gradient(ellipse at 5% 0%, #fffaf3 0%, transparent 60%), radial-gradient(ellipse at 100% 85%, #e8d4e1 0%, transparent 65%), #f7eef0;
    background-attachment: fixed;
  }
  html.workspace-background-active[data-color-design="rose"] .workspace-header.workspace-header h1,
  html[data-color-design="rose"] .insight-school-name-insight { color: #392d36; }
  html[data-color-design="rose"] .insight-school-name-school { color: #965171; }
  html[data-color-design="sage"] { --ink: #293b30; --muted: #64776a; --line: #cad9ce; --panel: #f8fcf7ed; --panel-strong: #fbfdf8; --bg: #edf4ec; --nav: #e7f0e6; --nav-soft: #47795a18; --accent: #47795a; --accent-strong: #30563e; --blue: #47795a; --green: #47795a; --silver: #f8fcf7; --gold: #dce8d9; --glass: #fbfdf8db; --shadow: 0 18px 44px #35553f18; }
  html[data-color-design="sage"] body,
  html.workspace-background-active[data-color-design="sage"] body {
    background: radial-gradient(ellipse at 5% 0%, #fffdf4 0%, transparent 60%), radial-gradient(ellipse at 100% 85%, #d7e6d4 0%, transparent 65%), #edf4ec;
    background-attachment: fixed;
  }
  html[data-color-design="clay"] { --ink: #423127; --muted: #806b5d; --line: #e1d1bf; --panel: #fffaf2ed; --panel-strong: #fffcf7; --bg: #f6ede0; --nav: #f4e7d6; --nav-soft: #a45f3618; --accent: #a45f36; --accent-strong: #7b4327; --blue: #a45f36; --green: #6b8160; --silver: #fffaf2; --gold: #ecdbc3; --glass: #fffcf7db; --shadow: 0 18px 44px #70452d18; }
  html[data-color-design="clay"] body,
  html.workspace-background-active[data-color-design="clay"] body {
    background: radial-gradient(ellipse at 5% 0%, #fffaf1 0%, transparent 60%), radial-gradient(ellipse at 100% 85%, #ecd0b7 0%, transparent 65%), #f6ede0;
    background-attachment: fixed;
  }
  html.workspace-background-active:is([data-color-design="sage"], [data-color-design="clay"]) .workspace-header.workspace-header h1,
  html:is([data-color-design="sage"], [data-color-design="clay"]) .insight-school-name-insight { color: var(--ink); }
  html:is([data-color-design="sage"], [data-color-design="clay"]) .insight-school-name-school { color: var(--accent); }
  /* Keep full contrast; the network itself now uses a darker theme-specific palette. */
  html[data-color-design]:not([data-color-design="original"]) body::before { filter: none; opacity: .9; }
  html[data-color-design]:not([data-color-design="original"]) .network-motion-layer { filter: none; opacity: .9; }
}
.profile-color-settings { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.profile-color-settings h4 { margin: 0 0 12px; color: var(--ink); font-size: 13px; font-weight: 650; }
.profile-color-settings .profile-color-compare { display: inline-flex; margin-top: 14px; padding: 8px 12px; font-size: 12px; }
.profile-color-settings p { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.color-design-switch { position: relative; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 5px; }
.color-design-switch button { position: relative; display: grid; place-items: center; width: 40px; height: 40px; min-height: 40px; padding: 0; border: 2px solid #8197ac; border-radius: 50%; background: linear-gradient(145deg,#1b1e24 50%,#2f7fd3 50%); color: #fff; cursor: pointer; box-sizing: border-box; }
.color-design-switch button[data-color-choice="light"] { background: linear-gradient(145deg,#f7fafc 50%,#c5daed 50%); color: #24394c; }
.color-design-switch button[data-color-choice="rose"] { background: linear-gradient(145deg,#ead3df 50%,#965171 50%); border-color: #ad6d8e; }
.color-design-switch button[data-color-choice="sage"] { background: linear-gradient(145deg,#d7e6d4 50%,#47795a 50%); border-color: #6f9478; }
.color-design-switch button[data-color-choice="clay"] { background: linear-gradient(145deg,#ecd0b7 50%,#a45f36 50%); border-color: #b5835d; }
.color-design-switch button[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 4px; }
.color-design-switch button[aria-pressed="true"]::after { content: '✓'; font-size: 18px; font-weight: 800; text-shadow: 0 1px 3px #0008; }
.color-design-switch button[data-color-choice="light"]::after { text-shadow: none; }
.color-design-switch button:hover { transform: none; }
.color-design-switch button:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
@media print { .color-design-switch { display: none; } }

/* The whole palette card selects its design; borders do not shift the content. */
#designTabPanel .design-directions [data-color-card] {position:relative;cursor:pointer;border:1px solid var(--line);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;transform-origin:center;}
#designTabPanel .design-directions [data-color-card][aria-pressed="true"] {border-color:var(--accent);box-shadow:inset 0 0 0 2px var(--accent);}
#designTabPanel .design-directions [data-color-card]:focus-visible {outline:2px solid var(--accent);outline-offset:3px;}
#designTabPanel .design-card-heading {display:flex;align-items:center;gap:8px;margin-bottom:10px;}
#designTabPanel .design-directions .design-card-heading h3 {margin:0;}
#designTabPanel .design-choice-circle {position:relative;display:grid;place-items:center;flex:none;width:30px;height:30px;box-sizing:border-box;border:2px solid #8197ac;border-radius:50%;background:linear-gradient(145deg,#1b1e24 50%,#2f7fd3 50%);color:#fff;}
#designTabPanel [data-color-card="light"] .design-choice-circle {background:linear-gradient(145deg,#f7fafc 50%,#c5daed 50%);color:#24394c;}
#designTabPanel [data-color-card="rose"] .design-choice-circle {background:linear-gradient(145deg,#ead3df 50%,#965171 50%);border-color:#ad6d8e;}
#designTabPanel [data-color-card="sage"] .design-choice-circle {background:linear-gradient(145deg,#d7e6d4 50%,#47795a 50%);border-color:#6f9478;}
#designTabPanel [data-color-card="clay"] .design-choice-circle {background:linear-gradient(145deg,#ecd0b7 50%,#a45f36 50%);border-color:#b5835d;}
#designTabPanel [data-color-card][aria-pressed="true"] .design-choice-circle {outline:2px solid var(--accent);outline-offset:2px;}
#designTabPanel [data-color-card][aria-pressed="true"] .design-choice-circle::after {content:'✓';font-size:17px;font-weight:800;text-shadow:0 1px 3px #0008;}
#designTabPanel [data-color-card="light"] .design-choice-circle::after {text-shadow:none;}
@media(hover:hover) and (prefers-reduced-motion:no-preference) {
  #designTabPanel .design-directions [data-color-card]:hover {transform:scale(1.035);z-index:1;}
}
@media(prefers-reduced-motion:reduce) {#designTabPanel .design-directions [data-color-card] {transition:none;}}
