/* Fobitha. A calm paper-and-ink base; the product carries the color:
   signal orange, a thin three-band stripe, monospaced labels.
   Light and dark follow the system setting. */

:root {
  color-scheme: light dark;

  --bg: #e9e9e4;
  --surface: #f4f3ee;
  --text: #16171b;
  --muted: #55575e;
  --accent: #2b3896;
  --accent-strong: #1b2468;
  --accent-ink: #ffffff;
  --line: rgba(22, 23, 27, 0.16);
  --line-strong: rgba(22, 23, 27, 0.4);
  --band-dark: #101115;
  --band-dark-text: #d8dadf;
  --band-dark-muted: #9ca1a9;
  --accent-on-dark: #aab4f4;

  /* Product colors, from the Chalk colorway. */
  --signal: #f2551f;
  --amber: #f59a2e;
  --gold: #eac46a;
  --glass: #0b0b0c;
  --glass-text: #f2f2f0;

  --ok: #1d6b3a;
  --ok-bg: #d9eadb;
  --warn: #7a5200;
  --warn-bg: #f6e6b8;
  --danger: #a32014;
  --danger-bg: #f5d8d3;

  --f-display: "Gilda Display", "Didot", Georgia, serif;
  --f-prose: "Spectral", Georgia, serif;
  --f-label: "Jost", "Futura", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-screen: "DM Sans", system-ui, sans-serif;

  --gut: clamp(20px, 5vw, 80px);
  --max: 1280px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101115;
    --surface: #191a20;
    --text: #d8dadf;
    --muted: #9ca1a9;
    --accent: #aab4f4;
    --accent-strong: #c6cdf8;
    --accent-ink: #101115;
    --line: rgba(216, 218, 223, 0.16);
    --line-strong: rgba(216, 218, 223, 0.42);
    --band-dark: #08090b;

    --ok: #8fd6a4;
    --ok-bg: #16361f;
    --warn: #f3cf73;
    --warn-bg: #3a2c07;
    --danger: #ff9d91;
    --danger-bg: #44130d;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-label);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

body.marketing {
  font-family: var(--f-prose);
  font-size: 1.1875rem;
  line-height: 1.6;
}

main {
  flex: 1;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.marketing .hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.5rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gut);
  padding-right: var(--gut);
}

.narrow {
  max-width: 46rem;
}

.mono {
  font-family: var(--f-mono);
  font-size: 0.9em;
  letter-spacing: 0.04em;
}

.fine {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Small uppercase labels */
.label,
h3,
.site-nav a,
.site-footer nav a,
dt,
label,
.tag,
.optional,
.progress,
.crumb,
.text-link,
.pill {
  font-family: var(--f-label);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.label {
  margin: 0 0 1.1rem;
  color: var(--accent);
}

.tag {
  display: inline-block;
  margin-left: 0.4em;
  padding: 0.15em 0.55em;
  border: 1px solid currentColor;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  vertical-align: middle;
  white-space: nowrap;
}

.optional {
  color: var(--muted);
  font-size: 0.625rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--text);
  color: var(--bg);
  z-index: 10;
}

.skip-link:focus {
  left: 0;
}

/* Header and footer */

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.wordmark {
  margin: 0;
  font-family: var(--f-display);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark-small {
  font-size: 1.35rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.site-nav a:not(.btn),
.site-footer nav a {
  text-decoration: none;
}

/* The one 80s cue on the page: the device's three-band stripe. */
.stripes {
  display: grid;
  gap: 2px;
}

.stripes span {
  height: 2px;
}

.stripes span:nth-child(1) {
  background: var(--signal);
}

.stripes span:nth-child(2) {
  background: var(--amber);
}

.stripes span:nth-child(3) {
  background: var(--gold);
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 1.75rem;
  padding-bottom: 2.25rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
}

.site-footer nav a[href^="mailto"] {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.875rem;
}

.site-footer .fine {
  margin: 0;
  font-family: var(--f-label);
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 0.95rem 1.6rem;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--f-label);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--accent-ink);
}

.btn-small {
  padding: 0.65rem 1rem;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
}

.btn-quiet {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-quiet:hover {
  background: var(--surface);
  border-color: var(--text);
  color: var(--text);
}

.btn-danger,
.btn-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--bg);
}

.btn-danger:hover {
  filter: brightness(1.1);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}

/* Marketing */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2.5rem;
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}

.lede {
  max-width: 30rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.3125rem;
  line-height: 1.5;
}

.lede {
  margin-bottom: 1.25rem;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.hero-facts li {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--f-label);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero-facts li::before {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.6em;
  border-radius: 50%;
  background: var(--signal);
  vertical-align: 0.1em;
}

.anywhere h2 {
  max-width: none;
  font-size: clamp(2.4rem, 6.6vw, 4.75rem);
}

.anywhere-lede {
  max-width: 44rem;
  color: var(--band-dark-muted);
  font-size: 1.3125rem;
  line-height: 1.5;
}

.anywhere-grid,
.who-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 2rem 3rem;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}

.anywhere-grid li {
  padding-top: 1.1rem;
  border-top: 2px solid var(--signal);
}

.anywhere-grid h3 {
  margin-bottom: 0.5rem;
  color: var(--band-dark-text);
  font-size: 0.875rem;
}

.anywhere-grid p {
  margin: 0;
  color: var(--band-dark-muted);
}

.who-grid li {
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-strong);
}

.who-grid h3 {
  margin-bottom: 0.6rem;
  font-family: var(--f-display);
  font-size: 1.9rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.01em;
}

.who-grid p {
  margin: 0;
  color: var(--muted);
}

.carry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
  gap: 2.5rem 1.75rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.carry-art {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1.1rem;
  background: var(--surface);
}

.carry-hole {
  fill: var(--surface);
}

.carry-grid h3 {
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.carry-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
}

@media (max-width: 560px) {
  .carry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1rem;
  }
}

.hero-price {
  margin: 2rem 0 0;
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.hero-art {
  position: relative;
  justify-self: center;
  width: min(100%, 640px);
  aspect-ratio: 1 / 0.82;
}

.hero-art::before {
  content: "";
  position: absolute;
  left: 9.5%;
  top: 0;
  width: 81%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--surface);
}

.hero-device {
  position: absolute;
}

.hero-device-left {
  left: -3%;
  top: 27%;
  width: 45%;
}

.hero-device-right {
  left: 58%;
  top: 27%;
  width: 45%;
}

.hero-device-front {
  left: 19%;
  top: 2%;
  width: 62%;
}

/* Three-quarter device: sizes are in container units so it scales as one. */
.device-3d {
  position: relative;
  aspect-ratio: 520 / 560;
  container-type: inline-size;
}

.d3-stage {
  position: absolute;
  inset: 0;
  perspective: 288cqw;
}

.d3-body {
  position: absolute;
  left: 15.38%;
  top: 8.93%;
  width: 69.23%;
  height: 78.57%;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
}

.d3-layer {
  position: absolute;
  left: 6.667%;
  top: 9.09%;
  width: 86.667%;
  height: 87.27%;
  border-radius: 23.08% / 18.75%;
  transform: translateZ(calc(var(--z) * 0.1923cqw));
}

.d3-face {
  position: absolute;
  inset: 0;
  transform: translateZ(8.08cqw);
}

.d3-shadow {
  position: absolute;
  left: 21%;
  top: 85.7%;
  width: 57.7%;
  height: 8.2%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(20, 18, 14, 0.32) 0%, rgba(20, 18, 14, 0) 70%);
}

.blink {
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-right: 0.7em;
  border-radius: 50%;
  background: var(--signal);
  animation: blink 1.6s steps(2, jump-none) infinite;
}

@keyframes blink {
  to {
    opacity: 0.2;
  }
}

.band {
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

section.band.wrap + section.band.wrap {
  border-top: 1px solid var(--line);
}

.band h2 {
  max-width: 22ch;
}

.band-dark {
  background: var(--band-dark);
  color: var(--band-dark-text);
}

.band-dark .label {
  color: var(--accent-on-dark);
}

.band-dark .prose {
  color: var(--band-dark-muted);
}

.band-tint {
  background: var(--surface);
}

.split {
  display: grid;
  gap: 1.5rem 5rem;
}

.split-art {
  align-items: center;
}

.prose-note {
  max-width: 28rem;
  color: var(--muted);
}

.hand-art {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  justify-self: center;
}

.hand-front {
  filter: drop-shadow(0 8px 10px rgba(70, 35, 15, 0.22));
}

/* Example questions: the list scrolls, the device stays put and its screen
   changes to the answer for whichever question is in the middle. */
.examples {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.examples-device {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.75rem 0 0.5rem;
  background: var(--surface);
}

.examples-ways {
  position: relative;
  width: 190px;
  aspect-ratio: 360 / 440;
  margin: 0 auto;
}

.examples-way {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.examples-way.is-active {
  opacity: 1;
}

.examples-list {
  /* Room for the last question to scroll up to the device on phones. */
  padding: 0 0 45vh;
}

.example-item {
  padding: 1rem 0 1rem 1.25rem;
  border-left: 2px solid var(--line);
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 0.2s, border-color 0.2s;
}

.example-item.is-active {
  border-left-color: var(--signal);
  opacity: 1;
}

.examples-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.example-group {
  padding: 2.25rem 0 0.9rem;
}

.example-group:first-child {
  padding-top: 0;
}

.example-group h3 {
  margin: 0 0 0.3rem;
  color: var(--accent);
  font-family: var(--f-display);
  font-size: 1.9rem;
  font-weight: 400;
  line-height: 1.1;
  text-transform: none;
  letter-spacing: -0.01em;
}

.example-group p {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
}

.feature-grid-big {
  margin-top: 2.5rem;
}

.feature-grid-big p {
  font-size: 1.1875rem;
}

.steps-grid .example-q {
  font-size: 1.1875rem;
}

.example-q {
  margin: 0;
  font-size: 1.3125rem;
  font-style: italic;
  line-height: 1.35;
}

.ex-screen {
  opacity: 0;
  transition: opacity 0.2s;
}

.ex-screen.is-active {
  opacity: 1;
}

@media (min-width: 860px) {
  .examples {
    --device-w: clamp(340px, 40vw, 500px);
    grid-template-columns: minmax(0, 1fr) var(--device-w);
    gap: 3rem;
    align-items: start;
  }

  .examples-device {
    order: 2;
    /* Centre the device vertically while it is pinned. */
    top: calc(50vh - var(--device-w) * 0.61);
    padding: 0;
    background: none;
  }

  .examples-ways {
    width: 100%;
  }

  .examples-list {
    padding-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .example-item,
  .examples-way,
  .ex-screen {
    transition: none;
  }
}

.steps-grid,
.controls-grid,
.color-grid,
.feature-grid {
  display: grid;
  gap: 2.5rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.steps-grid,
.controls-grid,
.color-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  margin-top: 3.5rem;
}

.steps-grid h3,
.controls-grid h3,
.color-grid h3,
.feature-grid h3,
.price h3 {
  margin-bottom: 0.6rem;
  color: var(--muted);
}

.steps-grid p,
.controls-grid p,
.color-grid p,
.feature-grid p,
.price p:last-child {
  margin: 0;
  max-width: 24rem;
}

.feature-grid li {
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.feature-grid p {
  color: var(--muted);
  font-size: 1.0625rem;
}

.step-art {
  max-width: 300px;
  margin-bottom: 1.5rem;
}

.color-grid .step-art {
  max-width: 260px;
}

.color-grid + .fine {
  margin: 2rem 0 0;
}

.control-art {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1.25rem;
  background: var(--surface);
}

.control-label {
  fill: #6a665e;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 2rem 4rem;
  max-width: 54rem;
  margin-top: 2.5rem;
}

.price {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-strong);
}

.price-figure {
  margin: 0 0 0.75rem;
  font-family: var(--f-display);
  font-size: clamp(3.5rem, 9vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.price-unit {
  font-family: var(--f-label);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.price-note {
  margin: 2.5rem 0 0;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0 3rem;
  margin: 2.5rem 0 1.5rem;
}

.spec-grid > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.spec-grid dd {
  font-family: var(--f-mono);
  font-size: 0.875rem;
  text-align: right;
}

/* Black-glass panels, echoing the device screen */
.lcd-panel,
.readouts-wide {
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  background: var(--glass);
  color: var(--glass-text);
  font-family: var(--f-screen);
  font-size: 1rem;
}

.lcd-panel p:last-child {
  margin: 0;
  opacity: 0.7;
}

.lcd-big {
  margin: 0 0 0.3rem;
  color: var(--signal);
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.empty {
  max-width: 34rem;
  padding: 1.75rem;
  border: 1px solid var(--line);
  background: var(--surface);
}

.empty .lcd-big {
  color: var(--muted);
}

.empty .btn {
  margin-top: 0.5rem;
}

.faq-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: 3rem 4rem;
  margin-top: 2.5rem;
  align-items: start;
}

.faq-group h3 {
  margin-bottom: 0.9rem;
  color: var(--accent);
}

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  padding: 1.1rem 0;
  font-weight: 500;
  cursor: pointer;
}

.faq details p {
  color: var(--muted);
}

/* Device illustration */

.device-art {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.device-shadow {
  fill: rgba(20, 18, 14, 0.3);
  filter: blur(10px);
}

.device-highlight {
  fill: none;
  stroke: #2b3896;
  stroke-width: 2;
  stroke-linecap: round;
}

.device-mark {
  font-family: var(--f-label);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.03em;
}

.screen text {
  fill: #f2f2f0;
}

.screen .s-mono {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.screen .s-dim {
  fill-opacity: 0.55;
}

.screen .s-accent,
.screen .s-fill,
.screen .s-fill rect {
  fill: var(--d-accent);
}

.screen .s-text {
  font-family: var(--f-screen);
  font-size: 13.5px;
}

.screen .s-time {
  font-family: var(--f-screen);
  font-weight: 500;
  font-size: 46px;
  letter-spacing: -0.02em;
}

.screen-wave rect {
  transform-box: fill-box;
  transform-origin: center;
}

/* The hero device cycles through its screens. Without animation it rests on
   the answer. */
.is-cycle .screen-idle,
.is-cycle .screen-listen,
.is-cycle .screen-think {
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .is-cycle .device-button {
    animation: press 12s infinite;
  }

  .is-cycle .screen-idle {
    animation: s-idle 12s infinite;
  }

  .is-cycle .screen-listen {
    animation: s-listen 12s infinite;
  }

  .is-cycle .screen-think {
    animation: s-think 12s infinite;
  }

  .is-cycle .screen-answer {
    animation: s-answer 12s infinite;
  }

  .is-cycle .screen-wave rect {
    animation: wave 0.5s ease-in-out infinite alternate;
  }

  .is-cycle .screen-wave rect:nth-child(2n) {
    animation-duration: 0.36s;
  }

  .is-cycle .screen-wave rect:nth-child(3n) {
    animation-duration: 0.62s;
  }

  .is-cycle .screen-dots circle {
    animation: dot 0.9s infinite;
  }

  .is-cycle .screen-dots circle:nth-child(2) {
    animation-delay: 0.15s;
  }

  .is-cycle .screen-dots circle:nth-child(3) {
    animation-delay: 0.3s;
  }
}

@keyframes press {
  0%, 13%, 41%, 100% { transform: translateX(0); }
  15%, 39% { transform: translateX(4px); }
}

@keyframes s-idle {
  0%, 14% { opacity: 1; }
  15%, 97% { opacity: 0; }
  99%, 100% { opacity: 1; }
}

@keyframes s-listen {
  0%, 14% { opacity: 0; }
  15%, 40% { opacity: 1; }
  41%, 100% { opacity: 0; }
}

@keyframes s-think {
  0%, 40% { opacity: 0; }
  41%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes s-answer {
  0%, 50% { opacity: 0; }
  52%, 96% { opacity: 1; }
  98%, 100% { opacity: 0; }
}

@keyframes wave {
  from { transform: scaleY(0.3); }
  to { transform: scaleY(1); }
}

@keyframes dot {
  0%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .blink {
    animation: none;
  }

  .btn {
    transition: none;
  }
}

/* Forms */

.form {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  max-width: 28rem;
  margin: 1.5rem 0;
}

.band .form {
  margin-top: 0;
}

.field {
  display: grid;
  gap: 0.45rem;
  width: 100%;
}

input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--f-label);
  font-size: 1rem;
}

.band-tint input:not([type="checkbox"]),
.band-tint textarea {
  background: var(--bg);
}

input.mono {
  font-family: var(--f-mono);
  text-transform: uppercase;
}

input.mono::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.field-error {
  margin: 0;
  color: var(--danger);
  font-family: var(--f-label);
  font-size: 0.9rem;
}

.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.9375rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.check input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: var(--accent);
}

.notice {
  margin: 1.25rem 0;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid currentColor;
  border-radius: 2px;
}

.notice p:last-child,
p.notice {
  margin-bottom: 0;
}

.notice p + p {
  margin-top: 0.6rem;
}

.notice-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.notice-error {
  background: var(--danger-bg);
  color: var(--danger);
}

.notice-dev {
  background: var(--warn-bg);
  color: var(--warn);
  overflow-wrap: anywhere;
}

.notice .btn {
  margin-top: 0.25rem;
}

.flashes {
  padding-top: 1rem;
}

/* App pages */

.panel-page {
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: 2rem;
}

.page-head,
.block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 1.75rem;
}

.page-head h1,
.page-head .label {
  margin-bottom: 0.4rem;
}

.page-head p {
  margin: 0;
}

.crumb a {
  text-decoration: none;
  color: var(--muted);
}

.progress {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0 0 2.25rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--line);
  list-style: none;
  color: var(--muted);
}

.progress-num {
  font-family: var(--f-mono);
  letter-spacing: 0.04em;
}

.progress .is-current {
  color: var(--text);
}

.progress .is-current .progress-num,
.progress .is-done {
  color: var(--accent);
}

.facts,
.readouts {
  margin: 0 0 1.5rem;
}

.facts > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.facts > div:first-child {
  border-top: 1px solid var(--line);
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.readouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 1rem 1.5rem;
}

.readouts dt {
  margin-bottom: 0.2rem;
  font-size: 0.625rem;
  letter-spacing: 0.14em;
}

.readouts dd {
  font-family: var(--f-mono);
  font-size: 1rem;
}

.readouts-wide dt {
  color: var(--glass-text);
  opacity: 0.55;
}

.pill {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.pill-active {
  background: var(--ok-bg);
  color: var(--ok);
}

.pill-paused,
.pill-pending {
  background: var(--warn-bg);
  color: var(--warn);
}

.pill-deactivated {
  background: var(--danger-bg);
  color: var(--danger);
}

.device-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.device-card {
  display: block;
  height: 100%;
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s;
}

.device-card:hover {
  border-color: var(--accent);
  color: var(--text);
}

.device-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.device-card h2 {
  margin-bottom: 0.25rem;
  font-size: 1.6rem;
  overflow-wrap: anywhere;
}

.device-card .readouts {
  margin: 1.1rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.block {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.block > h2,
.block-head h2 {
  font-size: 1.6rem;
}

.block-head {
  align-items: center;
}

.block-head h2 {
  margin: 0;
}

.block-danger > h2 {
  color: var(--danger);
}

.block .form {
  margin: 0;
}

.block form + form,
.block p + form {
  margin-top: 1rem;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 2rem 3rem;
  align-items: start;
}

.search {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.search input {
  width: min(14rem, 50vw);
  padding: 0.5rem 0.7rem;
}

.history {
  margin: 0;
  padding: 0;
  list-style: none;
}

.history li {
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}

.history p {
  margin: 0 0 0.3rem;
  max-width: 46rem;
}

.history-q {
  font-weight: 500;
}

.history-a {
  color: var(--muted);
  font-family: var(--f-prose);
}

.confirm > summary {
  list-style: none;
}

.confirm > summary::-webkit-details-marker {
  display: none;
}

.confirm[open] > summary {
  background: var(--surface);
  border-color: var(--text);
}

.confirm-body {
  max-width: 34rem;
  margin-top: 1.25rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.confirm-body .form {
  gap: 1rem;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .split {
    grid-template-columns: 1fr 1.1fr;
  }
}

@media (max-width: 560px) {
  .header-cta {
    display: none;
  }

  .facts > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .spec-grid > div {
    gap: 1rem;
  }
}
