/* The lights switch (see lights.js) and how the Work page looks with the lights on. */
.lamp { position: absolute; top: 50%; right: calc(var(--space-inline) + var(--cta-w, 9rem) + 1.25rem); translate: 0 -50%; display: flex; align-items: center; gap: 0.6rem; background: none; border: 0; padding: 6px 0; cursor: pointer; color: var(--muted); }
.lamp-text { font: 600 0.66rem var(--font-body); letter-spacing: 0.18em; text-transform: uppercase; }
.lamp-track { position: relative; width: 52px; height: 28px; border-radius: 99px; background: #1b1b22; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16); transition: background 0.4s ease; }
.lamp-knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #34343e; transition: translate 0.45s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease; }
.lamp-knob svg { grid-area: 1 / 1; width: 14px; height: 14px; transition: opacity 0.3s ease; }
.lamp .sun { fill: #fff; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; opacity: 0; }
.lamp .moon { fill: #d7d8f2; }
.lamp[aria-checked="true"] .lamp-track { background: linear-gradient(135deg, #38bdf8, #6366f1, #d946ef, #f97316); box-shadow: none; }
.lamp[aria-checked="true"] .lamp-knob { translate: 24px 0; background: #fff; }
.lamp[aria-checked="true"] .sun { opacity: 1; fill: #f59e0b; stroke: #f59e0b; }
.lamp[aria-checked="true"] .moon { opacity: 0; }
.lamp:focus-visible { outline: 2px solid #6366f1; outline-offset: 3px; border-radius: 99px; }
.lamp-veil { position: fixed; inset: 0; z-index: 400; pointer-events: none; }
html.wg-on .lamp { display: none; }   /* the Websites room has no lights-off look yet */
@media (max-width: 900px) {
  .lamp { right: calc(var(--space-inline) + 48px); }
  .lamp-text { display: none; }
}

/* ---------- lights on ---------- */
html.lights-on { --bg: #f7f6f9; --text: #141418; --muted: rgba(20,20,24,0.55); --border: rgba(20,20,24,0.09); }
html.lights-on body { background: #f7f6f9; }
html.lights-on nav { background: rgba(255,255,255,0.9); border-bottom-color: rgba(20,20,24,0.08); }
html.lights-on nav .logo { color: #0b0b10; }
html.lights-on nav .nav-cta { color: #0b0b10; }
html.lights-on nav .nav-cta::after { background: #fff; }
html.lights-on .ws { background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #38bdf8, #6366f1, #d946ef, #f97316) border-box; box-shadow: 0 8px 28px rgba(20,24,40,0.14); }
html.lights-on .ws button { color: rgba(11,11,16,0.6); }
html.lights-on .ws button[aria-pressed="true"] { background: #0b0b10; color: #fff; }
html.lights-on .cg-toggle { background: rgba(255,255,255,0.85); border-color: rgba(20,20,24,0.12); }
html.lights-on .cg-toggle button { color: rgba(20,20,24,0.55); }
html.lights-on .cg-toggle button[aria-pressed="true"] { background: #141418; color: #fff; }
html.lights-on .cg-stage { background: #cfd0d5; }
html.lights-on .cg-hud { background: linear-gradient(rgba(238,238,242,0), rgba(238,238,242,0.94)); }
html.lights-on .cg-chips button { background: rgba(255,255,255,0.82); border-color: rgba(20,20,24,0.1); color: rgba(20,20,24,0.55); }
html.lights-on .cg-chips button[aria-current="true"] { background: #141418; border-color: #141418; color: #fff; }
html.lights-on .cg-hud .cg-enter { color: #4f46e5; }
html.lights-on .cg-hud-row, html.lights-on .cg-loading, html.lights-on .cg-sub { color: rgba(20,20,24,0.55); }
/* grid */
html.lights-on.has-websites:not(.cg-walking):not(.wg-on) main::before { background: #f7f6f9; border-bottom-color: rgba(20,20,24,0.08); }
html.lights-on .cg-grid .cg-card { border-color: rgba(20,20,24,0.08); background: #fff; box-shadow: 0 24px 40px -28px rgba(20,24,40,0.45); }
/* an opened piece */
html.lights-on .cg-detail { background: rgba(247,246,249,0.98); color: #141418; }
html.lights-on .cg-detail .cg-x { background: #141418; color: #fff; box-shadow: 0 4px 18px rgba(20,24,40,0.25); }
html.lights-on .cg-media img, html.lights-on .cg-media video { box-shadow: 0 30px 70px -30px rgba(20,24,40,0.45); }
html.lights-on .cg-info .cg-company { color: #4f46e5; }
html.lights-on .cg-info p { color: rgba(20,20,24,0.62); }
html.lights-on .cg-info .cg-stat, html.lights-on .cg-info .cg-about, html.lights-on .cg-more button, html.lights-on .cg-actions button { border-color: rgba(20,20,24,0.12); }
html.lights-on .cg-more button[aria-current="true"] { border-color: #4f46e5; }
html.lights-on .cg-actions .cg-close { background: #141418; color: #fff; }
/* phone menu */
@media (max-width: 900px) {
  html.lights-on .menu-button { color: #0b0b10; }
  html.lights-on .menu-panel { background: #fff; border-bottom-color: rgba(0,0,0,0.08); box-shadow: 0 24px 40px rgba(20,24,40,0.16); }
  html.lights-on .menu-panel a { color: rgba(11,11,16,0.6); border-bottom-color: rgba(0,0,0,0.08); }
  html.lights-on .menu-panel a[aria-current="page"] { color: #0b0b10; }
  html.lights-on .menu-panel a.menu-connect { color: #0b0b10; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #38bdf8, #6366f1, #d946ef, #f97316) border-box; }
}
