/* The product-UI vocabulary the landing mockups are drawn in.
   Ported from the marketing animation (ThresholdScene, RolloutScene,
   ErrorScene, Chrome/Frame), which was itself drawn to match the product's
   dark theme: #0b1130 panels, Shoal Blue for anything interactive, status
   colour only where it reports a state. Dialog typography shares a bounded
   scale, keeping controls readable when the surrounding composition shrinks. */

/* Panel — a dialog or card lifted off the abyss. */
.lp-panel {
  position: relative;
  color: var(--lp-ink-strong);
  background: var(--lp-panel);
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius-lg);
  box-shadow: var(--lp-shadow-float);
  padding: 1.25rem;
  font-size: .875rem;
  line-height: 1.4;
}

.lp-panel--flat {
  box-shadow: var(--lp-shadow-panel);
}

.lp-panel__head {
  display: flex;
  align-items: center;
  gap: .875rem;
  margin-bottom: 1.25rem;
}

.lp-panel__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--lp-radius-md);
  background: color-mix(in srgb, var(--lp-shoal) 22%, transparent);
  color: #9fd8f2;
  font-size: 1.05rem;
}

.lp-panel__title {
  margin: 0;
  font-size: var(--lp-ui-title);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.25;
}

.lp-panel__sub {
  margin: .15rem 0 0;
  color: var(--lp-mute);
  font-size: var(--lp-ui-small);
}

.lp-panel__close {
  margin-left: auto;
  color: var(--lp-mute);
  font-size: 1rem;
}

.lp-panel__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: .75rem;
  margin-top: 1.25rem;
}

.lp-panel__footer-note {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-right: auto;
  color: var(--lp-ink);
  font-size: .8125rem;
}

.lp-panel__footer-note i {
  color: var(--lp-mute);
}

/* Form fields */

.lp-field {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  min-width: 0;
}

.lp-field__label {
  display: flex;
  gap: .3rem;
  color: var(--lp-ink-strong);
  font-size: var(--lp-ui-label);
  font-weight: 600;
}

.lp-field__req {
  color: var(--lp-red);
}

.lp-field__control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 2.5rem;
  padding: 0 .875rem;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius-sm);
  background: rgb(255 255 255 / 5%);
  color: var(--lp-ink-strong);
  font-size: var(--lp-ui-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.lp-field__control i {
  flex: none;
  color: var(--lp-mute);
  font-size: .7rem;
}

.lp-field__control.is-focus {
  border-color: var(--lp-shoal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lp-shoal) 25%, transparent);
}

.lp-field__control--mono {
  font-family: var(--lp-mono);
}

.lp-field__meta {
  color: var(--lp-mute);
  font-size: .8125rem;
  font-family: var(--lp-font);
}

.lp-field__meta--ok {
  color: var(--lp-green);
}

.lp-caret {
  display: inline-block;
  width: 1px;
  height: 1.1em;
  margin-left: 1px;
  background: currentcolor;
  vertical-align: text-bottom;
}

.lp-help {
  margin: 0;
  color: var(--lp-mute);
  font-size: var(--lp-ui-small);
  line-height: 1.4;
}

.lp-sentence {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  color: var(--lp-ink);
  font-size: .875rem;
}

.lp-sentence i {
  color: var(--lp-mute);
  font-size: .7rem;
}

/* Segmented control */

.lp-seg {
  display: flex;
  padding: 4px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius-md);
  background: rgb(255 255 255 / 5%);
}

.lp-seg__item {
  flex: 1;
  display: grid;
  place-items: center;
  height: 2.25rem;
  border-radius: var(--lp-radius-sm);
  color: var(--lp-mute);
  font-size: .9375rem;
  transition: background-color 200ms ease, color 200ms ease;
}

.lp-seg__item.is-on {
  color: var(--lp-ink-strong);
  font-weight: 600;
  background: color-mix(in srgb, var(--lp-shoal) 35%, transparent);
}

/* Toggle pills (notify by …) */

.lp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.lp-pill {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  height: 2.25rem;
  padding: 0 .95rem;
  border: 1px solid var(--lp-line);
  border-radius: 9999px;
  color: var(--lp-mute);
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 200ms ease, background-color 200ms ease, color 200ms ease;
}

.lp-pill i {
  font-size: .75rem;
}

.lp-pill.is-on {
  border-color: var(--lp-shoal);
  background: color-mix(in srgb, var(--lp-shoal) 22%, transparent);
  color: #9fd8f2;
}

/* Radio options */

.lp-radios {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.lp-radios--row {
  flex-flow: row wrap;
}

.lp-radio {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .7rem .9rem;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius-md);
  transition: border-color 200ms ease, background-color 200ms ease;
}

.lp-radios--row .lp-radio {
  flex: 1 1 10rem;
}

.lp-radio__dot {
  display: grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--lp-mute);
  border-radius: 50%;
  transition: border-color 200ms ease;
}

.lp-radio__dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lp-shoal);
  opacity: 0;
  transition: opacity 200ms ease;
}

.lp-radio__title {
  color: var(--lp-ink-strong);
  font-size: .9375rem;
  font-weight: 600;
  white-space: nowrap;
}

.lp-radio__sub {
  display: block;
  color: var(--lp-mute);
  font-size: .8125rem;
  white-space: nowrap;
}

.lp-radio.is-on {
  border-color: var(--lp-shoal);
  background: color-mix(in srgb, var(--lp-shoal) 12%, transparent);
}

.lp-radio.is-on .lp-radio__dot {
  border-color: var(--lp-shoal);
}

.lp-radio.is-on .lp-radio__dot::after {
  opacity: 1;
}

/* Buttons inside a mockup */

.lp-ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  height: 2.5rem;
  padding: 0 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--lp-radius-sm);
  color: var(--lp-ink-strong);
  font-size: .9375rem;
  font-weight: 600;
  white-space: nowrap;
}

.lp-ui-btn i {
  font-size: .75rem;
}

.lp-ui-btn--ghost {
  border-color: var(--lp-line);
  color: var(--lp-ink);
  font-weight: 400;
}

.lp-ui-btn--primary {
  background: var(--lp-shoal);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--lp-shoal) 33%, transparent);
}

.lp-ui-btn--small {
  height: 2rem;
  padding: 0 .75rem;
  font-size: .8125rem;
}

/* Numbered kicker ("1 · AT YOUR SITE") */

.lp-kicker {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--lp-mute);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.lp-kicker__num {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.625rem;
  height: 1.625rem;
  border: 1.5px solid rgb(255 255 255 / 28%);
  border-radius: 50%;
  font-size: .8125rem;
  letter-spacing: 0;
}

.lp-kicker.is-on {
  color: var(--lp-ink-strong);
}

.lp-kicker.is-on .lp-kicker__num {
  border-color: var(--lp-cyan);
  background: var(--lp-cyan);
  color: var(--lp-hull);
}

/* Live indicator */

.lp-live {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--lp-green);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
}

.lp-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentcolor;
  box-shadow: 0 0 8px currentcolor;
  animation: lp-pulse 1.6s ease-in-out infinite;
}

.lp-live--amber {
  color: var(--lp-amber);
}

.lp-live--cyan {
  color: var(--lp-cyan);
}

@keyframes lp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

/* Small stat tiles (context values, 30-day range) */

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

.lp-stat {
  padding: .7rem .875rem;
  border-radius: var(--lp-radius-sm);
  background: rgb(255 255 255 / 4.5%);
  min-width: 0;
}

.lp-stat__label {
  display: block;
  color: var(--lp-mute);
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.lp-stat__value {
  display: block;
  margin-top: .25rem;
  color: var(--lp-ink-strong);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Instrument figure — the big reading (DESIGN.md "Reading": line-height 1, tabular). */

.lp-reading {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  color: var(--lp-ink-strong);
  font-size: clamp(3rem, 6vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.lp-reading__unit {
  color: var(--lp-mute);
  font-size: .38em;
  font-weight: 400;
  letter-spacing: 0;
}

/* Monospace log rows */

.lp-log {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--lp-mono);
  font-size: .8125rem;
}

.lp-log li {
  display: flex;
  align-items: baseline;
  gap: .875rem;
  white-space: nowrap;
  overflow: hidden;
}

.lp-log time {
  color: var(--lp-mute);
  font-variant-numeric: tabular-nums;
}

.lp-log__code {
  flex: none;
  width: 3.75rem;
  font-weight: 600;
}

.lp-log__code--red { color: var(--lp-red); }
.lp-log__code--cyan { color: var(--lp-cyan); }
.lp-log__code--green { color: var(--lp-green); }

.lp-log__msg {
  color: var(--lp-ink);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hairline divider inside a panel */
.lp-divider {
  height: 1px;
  margin: 1.1rem 0;
  background: var(--lp-line);
}

/* Progress bar */

.lp-bar {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: rgb(255 255 255 / 10%);
  overflow: hidden;
}

.lp-bar--thick {
  height: 6px;
  border-radius: 3px;
}

.lp-bar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--lp-fill, 0%);
  border-radius: inherit;
  background: var(--lp-cyan);
  transition: width 400ms ease, background-color 400ms ease;
}

.lp-bar__fill--green {
  background: var(--lp-green);
}

/* Toast */

.lp-toast {
  display: inline-flex;
  align-items: center;
  gap: .875rem;
  padding: .875rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--lp-green) 40%, transparent);
  border-radius: var(--lp-radius-md);
  background: var(--lp-panel);
  box-shadow: 0 20px 60px rgb(0 0 0 / 60%);
  color: var(--lp-ink-strong);
}

.lp-toast > i {
  color: var(--lp-green);
  font-size: 1.1rem;
}

.lp-toast strong {
  display: block;
  font-size: .9375rem;
  font-weight: 600;
}

.lp-toast span {
  display: block;
  color: var(--lp-mute);
  font-size: .8125rem;
}

/* Browser window chrome (promo Chrome/Frame): a recording sits inside a lifted window. */

.lp-window {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 14px;
  background: var(--lp-panel);
  box-shadow: var(--lp-shadow-float);
  overflow: hidden;
}

.lp-window::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgb(255 255 255 / 6%), transparent 40%);
}

.lp-window__bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex: none;
  height: 2.75rem;
  padding: 0 .875rem;
  background: var(--lp-panel);
  border-bottom: 1px solid var(--lp-line-faint);
}

.lp-window__dots {
  display: flex;
  gap: 7px;
}

.lp-window__dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  opacity: .85;
}

.lp-window__tab {
  display: flex;
  align-items: center;
  gap: .5rem;
  height: 1.875rem;
  padding: 0 .75rem;
  border-radius: var(--lp-radius-sm);
  background: rgb(255 255 255 / 7%);
  color: var(--lp-ink);
  font-size: .8125rem;
  white-space: nowrap;
}

.lp-window__tab img {
  width: 1rem;
}

.lp-window__address {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
  min-width: 0;
  height: 1.875rem;
  padding: 0 .75rem;
  border-radius: var(--lp-radius-sm);
  background: rgb(255 255 255 / 5%);
  color: var(--lp-mute);
  font-family: var(--lp-mono);
  font-size: .8125rem;
  white-space: nowrap;
  overflow: hidden;
}

.lp-window__address i {
  color: var(--lp-green);
  font-size: .625rem;
}

.lp-window__body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Dialogs render at a smaller type scale on phones so their grids still fit. */
@media (width < 36rem) {
  .lp-panel {
    font-size: .8125rem;
  }

  .lp-field__control {
    min-height: 2.25rem;
    font-size: .875rem;
  }

  .lp-radio__title, .lp-seg__item {
    font-size: .875rem;
  }
}

@media (width >= 36rem) {
  .lp-panel {
    padding: 1.5rem 1.75rem;
  }
}

/* Checkbox */

.lp-check {
  display: grid;
  place-items: center;
  flex: none;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--lp-mute);
  border-radius: 4px;
  color: var(--lp-ink-strong);
  font-size: 9px;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.lp-check i {
  opacity: 0;
}

.lp-check.is-on {
  border-color: var(--lp-shoal);
  background: var(--lp-shoal);
}

.lp-check.is-done {
  border-color: var(--lp-green);
  color: var(--lp-green);
}

.lp-check.is-on i, .lp-check.is-done i {
  opacity: 1;
}

/* Traffic lights, last in the file so every `i` selector stays in ascending specificity so specificity stays ascending. */
.lp-window__dots i:nth-child(1) { background: #ff5f57; }
.lp-window__dots i:nth-child(2) { background: #febc2e; }
.lp-window__dots i:nth-child(3) { background: #28c840; }

/* Pointer sheen — a highlight that follows the pointer across a panel.
   Reads as expensive and costs one custom-property write per frame (see
   landing.js). Fine pointers only: on touch there is no hover state to
   reward. */
@media (hover: hover) and (pointer: fine) {
  [data-lp-sheen] {
    position: relative;
    isolation: isolate;
    --sheen-tint: color-mix(in srgb, var(--lp-cyan) 9%, transparent);
  }

  /* On a paper panel there is no navy ground left to carry the cyan, so its
     green channel dominates and the highlight reads as a stain rather than
     a light. Shoal Blue mixes neutrally over white, and needs less alpha to
     register against a lighter surface. */
  .landing__section--light [data-lp-sheen] {
    --sheen-tint: color-mix(in srgb, var(--lp-shoal) 6%, transparent);
  }

  [data-lp-sheen]::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--lp-dur-base) ease;
    background: radial-gradient(
      circle 18rem at var(--mx, 50%) var(--my, 50%),
      var(--sheen-tint),
      transparent 60%
    );
  }

  [data-lp-sheen]:hover::after {
    opacity: 1;
  }
}
