/* Complete calm palettes: background, ink, borders, controls and focus states.
   Legacy --blue-* names remain aliases for existing components, not fixed blue.
   Correct/wrong/warning tokens stay semantic and are not recolored here.
   appearance.js sets these attributes before the first paint on every page. */
:root { --study-background: var(--page-1); }
:root[data-background][data-theme="light"] {
  --blue-500: #205e7a; --blue-600: #165f7f; --muted: #425f6e;
}
:root[data-background="ocean"][data-theme="light"] {
  --study-background: #eaf7fd; --page-1: #eaf7fd; --page-2: #eaf7fd; --page-3: #eaf7fd;
  --ink: #16384a; --ink-2: #315b70; --muted: #425f6e;
  --blue-400: #3792b5; --blue-500: #205e7a; --blue-600: #165f7f;
  --control-line: #5f93aa; --accent-hover: #136c90;
  --button-start: #1a7ea6; --button-end: #136c90;
}
:root[data-background="cream"][data-theme="light"] {
  --study-background: #fff8ed; --page-1: #fff8ed; --page-2: #fff8ed; --page-3: #fff8ed;
  --tint-1: #fffdf8; --tint-2: #fcf4e8; --tint-3: #f6ecd9;
  --blue-50: #fffdf8; --blue-100: #f6ecd9; --blue-200: #e8dac5;
  --border: #e5d9c8; --line: #e5d9c8; --line-rgb: 185 156 115;
  --glow-rgb: 246 236 217; --shadow-rgb: 112 90 56;
  --ink: #403629; --ink-2: #64513d; --muted: #73614d;
  --blue-400: #af8250; --blue-500: #775a3c; --blue-600: #805c35;
  --control-line: #947b5d; --accent-hover: #684724;
  --button-start: #936a40; --button-end: #795332;
}
:root[data-background="pink"][data-theme="light"] {
  --study-background: #fff1f3; --page-1: #fff1f3; --page-2: #fff1f3; --page-3: #fff1f3;
  --tint-1: #fffafb; --tint-2: #fdf0f2; --tint-3: #f8e5e9;
  --blue-50: #fffafb; --blue-100: #f8e5e9; --blue-200: #eccfd7;
  --border: #e9d1d8; --line: #e9d1d8; --line-rgb: 198 149 163;
  --glow-rgb: 248 229 233; --shadow-rgb: 132 76 96;
  --ink: #472e37; --ink-2: #684750; --muted: #815763;
  --blue-400: #b97489; --blue-500: #8e5064; --blue-600: #98475f;
  --control-line: #ae7788; --accent-hover: #7c354c;
  --button-start: #a34e67; --button-end: #873b52;
}
:root[data-background="sage"][data-theme="light"] {
  --study-background: #edf6ee; --page-1: #edf6ee; --page-2: #edf6ee; --page-3: #edf6ee;
  --tint-1: #f9fcf9; --tint-2: #eef6ef; --tint-3: #e2eee4;
  --blue-50: #f9fcf9; --blue-100: #e2eee4; --blue-200: #cddfcf;
  --border: #d1dfd3; --line: #d1dfd3; --line-rgb: 136 169 142;
  --glow-rgb: 226 238 228; --shadow-rgb: 64 99 72;
  --ink: #283e31; --ink-2: #48604d; --muted: #566e5d;
  --blue-400: #63816b; --blue-500: #496750; --blue-600: #476a50;
  --control-line: #788d7b; --accent-hover: #35553e;
  --button-start: #527659; --button-end: #3c5d44;
}
:root[data-background="mist"][data-theme="light"] {
  --study-background: #f1f4f4; --page-1: #f1f4f4; --page-2: #f1f4f4; --page-3: #f1f4f4;
  --tint-1: #fafcfc; --tint-2: #f0f4f4; --tint-3: #e6eded;
  --blue-50: #fafcfc; --blue-100: #e6eded; --blue-200: #d3dede;
  --border: #d4dfdf; --line: #d4dfdf; --line-rgb: 144 163 165;
  --glow-rgb: 230 237 237; --shadow-rgb: 71 93 96;
  --ink: #2f4045; --ink-2: #4c6268; --muted: #596d72;
  --blue-400: #708c94; --blue-500: #526971; --blue-600: #4b6870;
  --control-line: #7b9096; --accent-hover: #3a555c;
  --button-start: #587780; --button-end: #405e66;
}
:root[data-background="sand"][data-theme="light"] {
  --study-background: #f6eee4; --page-1: #f6eee4; --page-2: #f6eee4; --page-3: #f6eee4;
  --tint-1: #fdfbf8; --tint-2: #f5eee5; --tint-3: #eee3d6;
  --blue-50: #fdfbf8; --blue-100: #eee3d6; --blue-200: #dfceb9;
  --border: #e0d1bf; --line: #e0d1bf; --line-rgb: 171 145 112;
  --glow-rgb: 238 227 214; --shadow-rgb: 105 82 53;
  --ink: #453528; --ink-2: #685342; --muted: #766350;
  --blue-400: #a28364; --blue-500: #785c45; --blue-600: #7b5c45;
  --control-line: #927e6a; --accent-hover: #634630;
  --button-start: #886345; --button-end: #735139;
}
:root[data-background="ocean"][data-theme="dark"] {
  --study-background: #10202b; --page-1: #10202b; --page-2: #10202b; --page-3: #10202b;
  --ink: #e4eff5; --ink-2: #c4d8e3; --muted: #9cb5c3;
  --blue-400: #5ec4ea; --blue-500: #8fd0ee; --blue-600: #7ccbec;
  --control-line: #6894aa; --accent-hover: #a7def3;
  --button-start: #1a7ea6; --button-end: #136c90;
}
:root[data-background="cream"][data-theme="dark"] {
  --study-background: #28241e; --page-1: #28241e; --page-2: #28241e; --page-3: #28241e;
  --tint-1: #292720; --tint-2: #302d25; --tint-3: #373329;
  --blue-50: #292720; --blue-100: #373329; --blue-200: #595244;
  --surface: #25241f; --surface-rgb: 37 36 31; --border: #494439; --line: #514b3e;
  --line-rgb: 166 151 126; --glow-rgb: 55 51 41;
  --ink: #f1e9dc; --ink-2: #ddcdb8; --muted: #bdae99;
  --blue-400: #c69b67; --blue-500: #dfbc8e; --blue-600: #e2be8f;
  --control-line: #a89473; --accent-hover: #f0d2aa;
  --button-start: #936a40; --button-end: #795332;
}
:root[data-background="pink"][data-theme="dark"] {
  --study-background: #2b2229; --page-1: #2b2229; --page-2: #2b2229; --page-3: #2b2229;
  --tint-1: #2d252c; --tint-2: #342b33; --tint-3: #3d303a;
  --blue-50: #2d252c; --blue-100: #3d303a; --blue-200: #5a4654;
  --surface: #282229; --surface-rgb: 40 34 41; --border: #4b3c47; --line: #54414e;
  --line-rgb: 177 143 163; --glow-rgb: 61 48 58;
  --ink: #f5e5eb; --ink-2: #e3c5d0; --muted: #c7a5b3;
  --blue-400: #ce8fa3; --blue-500: #e5b2c3; --blue-600: #e5a9be;
  --control-line: #b38597; --accent-hover: #f3c7d5;
  --button-start: #a34e67; --button-end: #873b52;
}
:root[data-background="sage"][data-theme="dark"] {
  --study-background: #1e2924; --page-1: #1e2924; --page-2: #1e2924; --page-3: #1e2924;
  --tint-1: #242d29; --tint-2: #29332d; --tint-3: #303d34;
  --blue-50: #242d29; --blue-100: #303d34; --blue-200: #485b4d;
  --surface: #202923; --surface-rgb: 32 41 35; --border: #3d4c41; --line: #43564a;
  --line-rgb: 139 171 148; --glow-rgb: 48 61 52;
  --ink: #e6f0e8; --ink-2: #c7ddcc; --muted: #a4bdaa;
  --blue-400: #89b394; --blue-500: #aed3b6; --blue-600: #a6d0af;
  --control-line: #80a087; --accent-hover: #c5e5cc;
  --button-start: #527659; --button-end: #3c5d44;
}
:root[data-background="mist"][data-theme="dark"] {
  --study-background: #242a2c; --page-1: #242a2c; --page-2: #242a2c; --page-3: #242a2c;
  --tint-1: #282f31; --tint-2: #2d3537; --tint-3: #343e40;
  --blue-50: #282f31; --blue-100: #343e40; --blue-200: #4d5c5f;
  --surface: #252d2f; --surface-rgb: 37 45 47; --border: #424f51; --line: #47575a;
  --line-rgb: 144 170 174; --glow-rgb: 52 62 64;
  --ink: #e6eef0; --ink-2: #c7d8dd; --muted: #a7bec4;
  --blue-400: #8baab3; --blue-500: #b5d0d8; --blue-600: #aecbd4;
  --control-line: #87a1aa; --accent-hover: #d0e5eb;
  --button-start: #587780; --button-end: #405e66;
}
:root[data-background="sand"][data-theme="dark"] {
  --study-background: #2c251f; --page-1: #2c251f; --page-2: #2c251f; --page-3: #2c251f;
  --tint-1: #2e2922; --tint-2: #352f27; --tint-3: #3e362b;
  --blue-50: #2e2922; --blue-100: #3e362b; --blue-200: #5b4e3e;
  --surface: #2a251f; --surface-rgb: 42 37 31; --border: #4b4236; --line: #574a3d;
  --line-rgb: 180 155 123; --glow-rgb: 62 54 43;
  --ink: #f1e8de; --ink-2: #e0ccba; --muted: #c2ad97;
  --blue-400: #c69c77; --blue-500: #e0bc98; --blue-600: #dfb78f;
  --control-line: #ab9074; --accent-hover: #f0d0ad;
  --button-start: #886345; --button-end: #735139;
}
