/* A black cord and small faceted cube keep the pull understated. */
.lamp-cord {
  --lamp-length: 64px;
  --lamp-inset: 38px;
  position: absolute;
  inset: 0 0 auto;
  z-index: 8;
  height: 220px;
  overflow: clip;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.lamp-cord[hidden] { display: none; }
.lamp-line { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; pointer-events: none; touch-action: none; }
.lamp-line path { fill: none; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.lamp-shadow { stroke: #ffffff20; stroke-width: 4; }
.lamp-thread { stroke: #000; stroke-width: 2; }
.lamp-fiber { stroke: #ffffff26; stroke-width: .4; transform: translate(-.5px, 0); }
.lamp-line .lamp-hit { stroke: transparent; stroke-width: 32; pointer-events: stroke; touch-action: none; cursor: grab; -webkit-touch-callout: none; }
.lamp-cord.is-held .lamp-hit { cursor: grabbing; }
.lamp-anchor { fill: #000; }
.lamp-handle {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: #000;
  cursor: grab;
  touch-action: none;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  transform-origin: center;
}
.lamp-handle:hover, .lamp-handle:active { background: transparent; }
.lamp-handle.is-held { cursor: grabbing; }
.lamp-handle:focus-visible { outline: 2px solid #586747; outline-offset: 2px; }
.lamp-grip {
  position: relative;
  display: block;
  width: 15px;
  height: 15px;
  margin-top: 8px;
  border: 1px solid #000;
  border-radius: 1px;
  background: #171717;
  box-shadow: inset 3px 0 0 #292929, inset 0 3px 0 #373737, 1px 2px 2px #0003;
}
.lamp-grip::before { content: ''; position: absolute; inset: -1px; border: 1px solid #ffffff1f; border-radius: inherit; }
.lamp-cord[data-pulled="true"] .lamp-grip { box-shadow: inset 3px 0 0 #292929, inset 0 3px 0 #494949, 0 0 0 2px #73865e66; }
.lamp-instructions { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.arcade-shell > .lamp-cord { --lamp-length: 42px; }
.arcade-shell > main { padding-top: 82px; }
body:has(.legal-shell) > .lamp-cord { --lamp-length: 42px; }
.legal-header { padding-top: 78px; }
.page-shell { --lamp-clearance: 32px; }
.page-shell .intro h1 { padding-inline-end: var(--lamp-clearance); }
.page-shell .header-link { margin-inline-end: var(--lamp-clearance); }
.page-shell .crow-world { margin-inline-end: var(--lamp-clearance); }

html[data-theme="dark"] {
  color-scheme: dark;
  --ground: #202820;
  --ink: #edf1e7;
  --muted: #b8c3ad;
  --accent: #c4d3a7;
  --surface: #323f30;
  --sage: #202820;
  --paper: #303c31;
  --line: #586751;
  --rust: #c58e68;
  --legal-ground: #202820;
  --legal-ink: #edf1e7;
  --legal-muted: #b8c3ad;
  --legal-action: #c4d3a7;
  --legal-line: #586751;
  --legal-paper: #2b372c;
  background: #202820;
  color: #edf1e7;
}
html[data-theme="dark"] ::selection { background: #c4d3a7; color: #202820; }
html[data-theme="dark"] .lamp-handle:focus-visible { outline-color: #d6dfba; }
html[data-theme="dark"] .crow-speech,
html[data-theme="dark"] .crow-speech::before { background: #303d30; border-color: #65755d; }
html[data-theme="dark"] .crow-speech { color: #edf1e7; box-shadow: 3px 4px 0 #101a11; }
html[data-theme="dark"] .arcade { border-color: #586751; }
html[data-theme="dark"] .game-shelf { border-bottom-color: #697b5a; }
html[data-theme="dark"] .arcade-heading h2 > span { color: #b4c58d; }
html[data-theme="dark"] .visit-label { color: #202820; }
html[data-theme="dark"] .arrange-button:hover,
html[data-theme="dark"] .linkedin-link:hover { background: #41513c; }
html[data-theme="dark"] .skip-link { color: #202820; }
html[data-theme="dark"] .storage-notice { color: #edf1e7; background: #2b372c; border-color: #586751; }
html[data-theme="dark"] .storage-notice a { color: #c4d3a7; }
html[data-theme="dark"] .storage-notice button { background: #c4d3a7; border-color: #c4d3a7; color: #202820; }
html[data-theme="dark"] .storage-notice :focus-visible { outline-color: #c4d3a7; }

/* Theme the site chrome, without filters or drawing changes on engine surfaces. */
html[data-theme="dark"] body.arcade-shell {
  --arcade-sage: #202820;
  --arcade-paper: #303c31;
  --arcade-ink: #edf1e7;
  --arcade-muted: #b8c3ad;
  --arcade-clay: #c99c6f;
  --arcade-line: #586751;
}
html[data-theme="dark"] .arcade-shell :is(.arcade-bar, .arcade-controls) { background: #303c31; }
html[data-theme="dark"] .arcade-shell .tab-title { background: #724b35; color: #fff1df; }
html[data-theme="dark"] .arcade-shell :is(.arcade-bar, .arcade-controls) :is(button, select, input),
html[data-theme="dark"] .arcade-shell :is(.restore, kbd) { background: #3a4938; color: #edf1e7; border-color: #708166; }
html[data-theme="dark"] .arcade-shell :is(.arcade-bar, .arcade-controls) button:hover:enabled { background: #4a5d46; }
html[data-theme="dark"] .arcade-shell :is(.arcade-help, footer, .fine, .page-header span) { color: #b8c3ad; }
html[data-theme="dark"] .arcade-shell :is(.screen, .player, .arcade-idle) { color: #edf1e7; }
html[data-theme="dark"] .arcade-shell .arcade-idle :is(h2, p) { color: #edf1e7; }
html[data-theme="dark"] .arcade-shell .arcade-idle::before { background-color: #243347; }
html[data-theme="dark"] .arcade-shell .arcade-frame { border-color: #73816b; box-shadow: 4px 5px 0 #101a11; }
html[data-theme="dark"] .arcade-shell :is(.arcade-launch, .lamp-handle):focus-visible { outline-color: #d6dfba; }
html[data-theme="dark"] .arcade-shell kbd { box-shadow: 0 2px 0 #708166; }

@media (max-width: 680px) {
  .lamp-cord { --lamp-length: 49px; }
}
@media (prefers-reduced-motion: reduce) {
  .lamp-cord *, .lamp-cord *::before, .lamp-cord *::after { animation: none; transition: none; }
}
