:root {
  color-scheme: light;
  --ink: #141416;
  --muted: #62656c;
  --paper: #f7f4ee;
  --panel: rgba(255, 255, 255, 0.88);
  --line: rgba(20, 20, 22, 0.14);
  --amber: #ffbf4d;
  --amber-deep: #d76a22;
  --cyan: #25a7bd;
  --green: #4d8b57;
  --red: #be4545;
  --flash-x: 58%;
  --beam-alpha: 0.42;
  --subject-light: 0.45;
  --light-head-x: 58%;
  --beam-length: 20%;
  --beam-spread: 19%;
  --distance-left: 58%;
  --distance-width: 20%;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(180deg, rgba(247, 244, 238, 0) 0%, var(--paper) 46rem),
    var(--paper);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.lab-hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 1.25rem;
  isolation: isolate;
}

.hero-photo {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-wash {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(10, 10, 12, 0.78), rgba(10, 10, 12, 0.42) 45%, rgba(247, 244, 238, 0.88)),
    linear-gradient(180deg, rgba(10, 10, 12, 0.22), rgba(247, 244, 238, 0.72));
}

.topbar {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #fff;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.5);
}

.brand-mark,
.law-mark {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  font-weight: 800;
}

.brand-mark {
  font-size: 1rem;
}

.law-mark {
  justify-content: center;
  min-width: 9.4rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(14, 14, 18, 0.26);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.workbench {
  width: min(1180px, 100%);
  margin: 3.5rem auto 0;
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(24rem, 1.32fr) minmax(17rem, 0.82fr);
  gap: 1rem;
  align-items: stretch;
}

.lab-copy {
  align-self: center;
  color: #fff;
  text-shadow: 0 1px 22px rgba(0, 0, 0, 0.58);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 1rem;
  font-size: 3.2rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.02rem;
  line-height: 1.6;
}

.formula-line {
  width: min(100%, 27rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding-top: 1rem;
  color: #fff;
  font-size: 0.94rem;
}

.formula-line span,
.formula-line strong {
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
}

.formula-line span {
  padding: 0 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.22);
  backdrop-filter: blur(12px);
}

.simulator,
.controls {
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.simulator {
  align-self: start;
  overflow: hidden;
  min-width: 0;
}

.controls {
  align-self: start;
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1672 / 941;
  overflow: hidden;
  background: #2c2c2c;
}

.stage-photo,
.photo-vignette {
  position: absolute;
  inset: 0;
}

.stage-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.photo-vignette {
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--light-head-x) 26%, rgba(255, 255, 255, calc(var(--beam-alpha) * 0.35)), transparent 17rem),
    linear-gradient(90deg, rgba(0, 0, 0, 0.24), transparent 28%, transparent 78%, rgba(0, 0, 0, 0.18));
}

.photo-light-cone {
  position: absolute;
  left: var(--light-head-x);
  top: 23%;
  z-index: 2;
  width: var(--beam-length);
  height: var(--beam-spread);
  transform: translateY(-50%);
  transform-origin: left center;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  background:
    radial-gradient(ellipse at 100% 50%, rgba(255, 244, 218, calc(var(--subject-light) * 0.42)), transparent 38%),
    linear-gradient(90deg, rgba(255, 255, 255, calc(var(--beam-alpha) * 0.72)), rgba(255, 232, 180, calc(var(--beam-alpha) * 0.24)) 58%, rgba(255, 255, 255, 0.02));
  filter: blur(2.4px);
  opacity: clamp(0.18, var(--beam-alpha), 0.72);
  mix-blend-mode: screen;
  pointer-events: none;
}

.distance-line {
  position: absolute;
  z-index: 4;
  left: var(--distance-left);
  bottom: 11%;
  width: var(--distance-width);
  height: 2rem;
  border-top: 2px dashed rgba(255, 255, 255, 0.54);
}

.distance-line::before,
.distance-line::after {
  position: absolute;
  top: -0.45rem;
  width: 2px;
  height: 0.85rem;
  background: rgba(255, 255, 255, 0.64);
  content: "";
}

.distance-line::before {
  left: 0;
}

.distance-line::after {
  right: 0;
}

.distance-line span {
  position: absolute;
  left: 50%;
  top: 0.42rem;
  min-width: 4.5rem;
  padding: 0.25rem 0.55rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.photo-light-rig {
  position: absolute;
  left: var(--flash-x);
  top: 18.5%;
  z-index: 3;
  width: clamp(3.4rem, 14%, 6.1rem);
  height: 68%;
  transform: translateX(-50%);
  transition: left 160ms ease-out;
  filter:
    drop-shadow(0 0 calc(0.5rem + var(--subject-light) * 1.3rem) rgba(255, 255, 255, calc(var(--beam-alpha) * 0.35)))
    drop-shadow(0 0.45rem 0.45rem rgba(0, 0, 0, 0.5));
}

.photo-strobe {
  position: absolute;
  left: 21%;
  top: 0;
  width: 78%;
  height: 13%;
}

.photo-strobe-body {
  position: absolute;
  left: 0;
  top: 31%;
  width: 48%;
  height: 30%;
  border-radius: 999px 6px 6px 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 28%),
    linear-gradient(90deg, #050505, #222 54%, #050505);
  box-shadow:
    inset 0 -0.22rem 0.35rem rgba(0, 0, 0, 0.64),
    0 0 0 1px rgba(255, 255, 255, 0.12);
}

.photo-strobe-body::before {
  position: absolute;
  left: -4%;
  top: -14%;
  width: 20%;
  height: 128%;
  border-radius: 4px;
  background: #080808;
  content: "";
}

.photo-reflector {
  position: absolute;
  left: 42%;
  top: 11%;
  width: 31%;
  height: 61%;
  clip-path: polygon(0 31%, 88% 0, 100% 100%, 0 69%);
  background:
    linear-gradient(90deg, #050505, #262624 44%, #080808 70%),
    #111;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.photo-reflector-face {
  position: absolute;
  left: 66%;
  top: 5%;
  width: 14%;
  height: 77%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 50%, rgba(255, 255, 255, 0.86), rgba(223, 221, 212, 0.38) 42%, #111 62%);
  box-shadow: 0 0 calc(0.7rem + var(--subject-light) * 2rem) rgba(255, 255, 255, var(--beam-alpha));
}

.photo-yoke {
  position: absolute;
  left: 33%;
  top: 8.8%;
  width: 10%;
  height: 7%;
  border-left: 0.22rem solid #090909;
  border-bottom: 0.22rem solid #090909;
  border-radius: 0 0 0 8px;
}

.photo-stand {
  position: absolute;
  left: 35%;
  top: 10.6%;
  width: 0.36rem;
  height: 71%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, #050505, #2a2a2a 48%, #030303);
  box-shadow:
    0.1rem 0 0.22rem rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.09);
}

.stand-collar {
  position: absolute;
  left: 50%;
  width: 1.15rem;
  height: 0.55rem;
  transform: translateX(-50%);
  border-radius: 3px;
  background: linear-gradient(180deg, #2b2b2b, #050505);
  box-shadow: 0 0.04rem 0 rgba(255, 255, 255, 0.1);
}

.collar-top {
  top: 18%;
}

.collar-mid {
  top: 43%;
}

.collar-low {
  top: 72%;
}

.photo-tripod {
  position: absolute;
  left: 35%;
  top: 81%;
  width: 0.34rem;
  height: 19%;
  transform: translateX(-50%);
  background: #050505;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.photo-tripod::before,
.photo-tripod::after,
.photo-tripod span {
  position: absolute;
  left: 50%;
  top: 0;
  width: 0.25rem;
  height: 105%;
  transform-origin: top center;
  border-radius: 999px;
  background: #050505;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
  content: "";
}

.photo-tripod::before {
  transform: translateX(-50%) rotate(44deg);
}

.photo-tripod::after {
  transform: translateX(-50%) rotate(-48deg);
}

.photo-tripod span {
  transform: translateX(-50%) rotate(8deg);
}

.meter-row {
  min-height: 5.35rem;
  padding: 1rem 1rem 0.95rem;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.meter-stack {
  display: grid;
  gap: 0.45rem;
}

.meter {
  position: relative;
  height: 1.15rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(37, 167, 189, 0.25), rgba(255, 191, 77, 0.2) 50%, rgba(190, 69, 69, 0.24)),
    #f6f4f0;
}

.meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: 50%;
  background: linear-gradient(90deg, rgba(37, 167, 189, 0.54), rgba(255, 191, 77, 0.58), rgba(190, 69, 69, 0.48));
}

.meter-ticks {
  position: absolute;
  inset: 0;
  z-index: 3;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(20, 20, 22, 0.24) 0,
    rgba(20, 20, 22, 0.24) 1px,
    transparent 1px,
    transparent 12.5%
  );
  pointer-events: none;
}

.meter-midline {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 4;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(20, 20, 22, 0.36);
}

.meter-needle {
  position: absolute;
  top: -0.2rem;
  left: 50%;
  z-index: 5;
  width: 0.38rem;
  height: 1.55rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #161616;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.65);
}

.meter-stop-scale {
  display: flex;
  justify-content: space-between;
  color: #5f6268;
  font-size: 0.67rem;
  line-height: 1;
  font-weight: 850;
}

.meter-stop-scale span {
  min-width: 1.35rem;
  text-align: center;
}

.meter-stop-scale span:first-child {
  text-align: left;
}

.meter-stop-scale span:last-child {
  text-align: right;
}

.controls {
  min-width: 0;
  padding: 1rem;
  display: grid;
  align-content: start;
  gap: 1rem;
}

.control-group {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.control-group:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.control-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.control-label label {
  color: var(--ink);
  font-weight: 850;
}

.control-label output {
  color: var(--amber-deep);
  font-size: 1.35rem;
  font-weight: 900;
  white-space: nowrap;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--amber-deep);
}

.range-ticks,
.power-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.quick-set {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.quick-set button {
  min-height: 2.35rem;
  border-radius: 7px;
  background: #ede8df;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.quick-set button.active,
.quick-set button:focus-visible {
  outline: 2px solid rgba(215, 106, 34, 0.62);
  outline-offset: 2px;
  background: #171717;
  color: #fff;
}

.power-ladder {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.power-ladder button {
  min-height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 850;
  cursor: pointer;
}

.power-ladder button.active,
.power-ladder button:focus-visible {
  outline: 2px solid rgba(215, 106, 34, 0.5);
  outline-offset: 2px;
  border-color: rgba(215, 106, 34, 0.56);
  background: #ffe2ad;
  color: #66310d;
}

.readout-band,
.law-band {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.readout-band {
  padding: 1rem 0 3rem;
}

.readout-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.readout,
.law-grid article {
  min-width: 0;
  border: 1px solid rgba(20, 20, 22, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 34px rgba(20, 20, 22, 0.08);
}

.readout {
  min-height: 9.2rem;
  padding: 1rem;
  display: grid;
  align-content: space-between;
  gap: 0.4rem;
}

.readout span,
.law-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.readout strong {
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.readout small,
.law-grid small {
  color: var(--muted);
  line-height: 1.45;
}

.law-band {
  padding: 1rem 0 4rem;
}

.site-footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 2rem;
  color: rgba(20, 20, 22, 0.58);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
}

.law-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.law-heading .eyebrow {
  color: var(--green);
}

h2 {
  margin-bottom: 0;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.law-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.law-grid article {
  min-height: 10rem;
  padding: 1.1rem;
  display: grid;
  align-content: space-between;
}

.law-grid strong {
  font-size: 2.35rem;
  line-height: 1;
}

@media (max-width: 1040px) {
  .workbench {
    grid-template-columns: 1fr 1fr;
  }

  .lab-copy {
    grid-column: 1 / -1;
    max-width: 45rem;
  }

  h1 {
    max-width: 18ch;
    font-size: 2.5rem;
  }

  .readout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .lab-hero {
    min-height: auto;
    padding: 1rem;
  }

  .hero-wash {
    background:
      linear-gradient(180deg, rgba(10, 10, 12, 0.78), rgba(10, 10, 12, 0.48) 38%, rgba(247, 244, 238, 0.88));
  }

  .topbar {
    align-items: flex-start;
  }

  .law-mark {
    min-width: 0;
  }

  .workbench,
  .readout-grid,
  .law-grid {
    grid-template-columns: 1fr;
  }

  .workbench {
    margin-top: 2rem;
  }

  h1 {
    max-width: 12ch;
    font-size: 2.2rem;
  }

  .readout-band,
  .law-band {
    width: min(100% - 1.4rem, 1180px);
  }

  .law-heading {
    display: block;
  }
}

@media (max-width: 460px) {
  .topbar {
    display: block;
  }

  .law-mark {
    margin-top: 0.5rem;
  }

  .readout strong,
  .law-grid strong {
    font-size: 1.8rem;
  }
}
