:root {
  color-scheme: dark;
  font: 100%/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
  --canvas: #212121;
  --rail: #181818;
  --panel: #303030;
  --highlight: #373737;
  --ink: #f5f5f5;
  --subtle: #b9b9b9;
  --edge: #494949;
  --line: #393939;
  --accent: #91dccf;
  background: var(--canvas);
  color: var(--ink);
}
:root[data-tone="light"] {
  color-scheme: light;
  --canvas: #fff;
  --rail: #f7f7f7;
  --panel: #f4f4f4;
  --highlight: #ebebeb;
  --ink: #202020;
  --subtle: #595959;
  --edge: #c9c9c9;
  --line: #dedede;
  --accent: #177268;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100svh; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a, button, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.ui-icon { height: 20px; width: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: 1.15rem; font-weight: 650; letter-spacing: -.045em; }
.brand .ui-icon, .signature { width: 32px; height: 26px; color: var(--accent); }
.primary-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 0; border-radius: 24px; background: var(--ink); color: var(--canvas); font-size: .9rem; font-weight: 600; }
.primary-link:hover { opacity: .87; }

/* Library and account share the material selected inside the conversation. */
:root[data-skin="living"] { --canvas:#081619; --rail:#0b191d; --panel:#182c30; --ink:#f4f1e9; --subtle:#afc2c0; --accent:#8fe6d4; }
:root[data-skin="air"] { --canvas:#eef4f8; --rail:#edf5fa; --panel:#f9fcfe; --ink:#101820; --subtle:#465e70; --accent:#006d93; }
:root[data-skin="atelier"] { --canvas:#020405; --rail:#030709; --panel:#101c22; --ink:#f5f3ef; --subtle:#b0c0c8; --accent:#42d7fb; }
:root[data-skin="developer"] { --canvas:#03070a; --rail:#071016; --panel:#0d1c23; --ink:#dcebf0; --subtle:#9bb3bf; --accent:#42d7fb; }
:root[data-skin="pearl"] { --canvas:#f3f0e8; --rail:#f3f8f6; --panel:#fafbf8; --ink:#123e48; --subtle:#395864; --accent:#007582; }
:root[data-skin="terra"] { --canvas:#e5d8c3; --rail:#eee4d1; --panel:#f6ecdc; --ink:#382d21; --subtle:#514631; --accent:#38583d; }
:root[data-skin="tide"] { --canvas:#002638; --rail:#01344c; --panel:#073f59; --ink:#e0f8ff; --subtle:#b7dce8; --accent:#4ce4e8; }
:root[data-skin="forge"] { --canvas:#081219; --rail:#0b1922; --panel:#14232e; --ink:#dceef7; --subtle:#acc7d7; --accent:#57dbc5; }
:root[data-skin="cobalt"] { --canvas:#070d1c; --rail:#0b1327; --panel:#101b33; --ink:#f4f0e8; --subtle:#b7c5dc; --accent:#83aeff; }
:root[data-skin="champagne"] { --canvas:#f4f0e8; --rail:#ede7db; --panel:#fffcf5; --ink:#201d19; --subtle:#62594a; --accent:#70501e; }
:root[data-skin="carbon"] { --canvas:#080b09; --rail:#10120f; --panel:#191a17; --ink:#f4f1e9; --subtle:#c1b9a7; --accent:#dec384; }
:root[data-skin]:not([data-skin="focus"]) {
  --edge: color-mix(in srgb,var(--canvas) 57%,var(--subtle));
  --line: color-mix(in srgb,var(--canvas) 78%,var(--subtle));
  --highlight: color-mix(in srgb,var(--panel) 85%,var(--accent));
}
:root[data-backdrop="signature"]:not([data-skin="focus"]) body { background:radial-gradient(ellipse at 90% -20%,color-mix(in srgb,var(--accent) 13%,transparent),transparent 60%); }
:root[data-backdrop="grid"] body { background-image:linear-gradient(var(--line) 1px,transparent 1px),linear-gradient(90deg,var(--line) 1px,transparent 1px); background-size:40px 40px; }
