:root {
  color-scheme: light;
  --blue: #102b59;
  --red: #d50b20;
  --paper: #fcfcfa;
  --ink: #17202a;
  --grey: #e5e9ed;
  --muted: #4d5b6b;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--font);
}
a {
  color: var(--blue);
  text-underline-offset: 4px;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 3px solid #3d84d1;
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button[hidden],
[hidden] {
  display: none !important;
}
.masthead {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--grey);
  max-width: 1184px;
  margin: auto;
  padding: 20px 40px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--blue);
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.5px;
}
.wordmark img {
  display: block;
}
nav {
  display: flex;
  gap: 28px;
}
nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
main {
  max-width: 1184px;
  padding: 0 40px;
  margin: auto;
}
.intro {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 64px;
  min-height: 630px;
  padding: 64px 0 72px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--blue);
  margin: 0 0 16px;
}
h1,
h2 {
  font-family:
    "Bahnschrift", "DIN Alternate", "Arial Narrow", Arial, sans-serif;
  color: var(--blue);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1.8px;
}
h1 {
  font-size: clamp(44px, 5.6vw, 72px);
  margin: 0 0 24px;
}
h2 {
  font-size: clamp(27px, 3.4vw, 38px);
  letter-spacing: -0.8px;
  margin: 0 0 18px;
}
.lead {
  font-size: 20px;
  line-height: 1.5;
  max-width: 490px;
}
.intro-copy > p:not(.eyebrow) {
  max-width: 490px;
}
.button {
  border: 0;
  border-radius: 5px;
  min-height: 46px;
  padding: 11px 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  line-height: 1.5;
  transition:
    background-color 0.15s,
    transform 0.15s;
}
.primary {
  background: var(--red);
  color: white;
}
.primary:hover:not(:disabled) {
  background: #ad081a;
}
.secondary {
  background: var(--blue);
  color: white;
}
.secondary:hover:not(:disabled) {
  background: #1d417a;
}
.subtle {
  background: #e9edf2;
  color: var(--blue);
}
.subtle:hover:not(:disabled) {
  background: #dce3eb;
}
.intro .primary {
  margin: 10px 0 15px;
}
.quiet-link {
  font-size: 13px;
  display: block;
}
.source-note {
  color: var(--muted);
  font-size: 13px;
  margin: 20px 0 0;
}
.source-note a {
  font-weight: 600;
}
.motion-caption {
  margin-top: 30px !important;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
.clock-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.device {
  width: min(100%, 310px);
  border-radius: 31px;
  background: #000;
  box-shadow:
    0 24px 45px #102b5918,
    0 0 0 7px #15191e;
  overflow: hidden;
}
.device svg {
  display: block;
  width: 100%;
  height: auto;
}
figcaption {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.5px;
  font-family: ui-monospace, monospace;
}
figcaption span {
  padding: 0 7px;
  color: #8997a8;
}
.journey {
  border-top: 2px solid var(--blue);
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 28px;
  padding: 45px 0 48px;
  border-bottom: 1px solid var(--grey);
}
.step-marker {
  border-radius: 50%;
  background: var(--blue);
  color: white;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 600;
  margin-top: 2px;
}
.step-content {
  max-width: 840px;
}
.step-content > p {
  max-width: 720px;
}
.version {
  letter-spacing: 0;
  text-transform: none;
  margin-left: 12px;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  font-weight: 400;
}
.board-note {
  background: #edf1f6;
  border-left: 3px solid var(--blue);
  padding: 16px 20px;
  font-size: 14px;
  margin: 25px 0;
}
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  margin: 22px 0;
}
.check input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--blue);
}
.small {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 740px;
}
.inline-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-top: 18px;
}
.connection-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0 14px;
}
.notice {
  font-size: 14px;
  color: var(--blue);
  padding: 12px 16px;
  background: #edf1f6;
  border-radius: 4px;
}
.notice.error {
  color: #95061a;
  background: #fff0f2;
}
.clock-details {
  display: flex;
  gap: 10px 24px;
  flex-wrap: wrap;
  font-size: 12px;
  font-family: ui-monospace, monospace;
  color: var(--muted);
  margin-bottom: 20px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
fieldset:disabled {
  opacity: 0.48;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 24px;
}
label:not(.check) {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
}
input:not([type="checkbox"]):not([type="range"]),
select {
  width: 100%;
  border: 1px solid #a5b0bd;
  background: white;
  padding: 11px 12px;
  border-radius: 4px;
  color: var(--ink);
  min-height: 46px;
  font-size: 16px;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
  height: 30px;
  margin: 0;
}
.settings-divider {
  border-top: 1px solid var(--grey);
  margin-top: 30px;
}
.settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.settings-actions .button {
  font-size: 13px;
  padding-left: 16px;
  padding-right: 16px;
}
.about {
  max-width: 820px;
  margin: 65px 0 60px 84px;
}
.about h2 {
  font-size: 30px;
}
.about p,
.about li {
  font-size: 14px;
  color: var(--muted);
}
details {
  border-bottom: 1px solid var(--grey);
  padding: 16px 0;
}
summary {
  font-size: 14px;
  color: var(--blue);
  font-weight: 650;
  cursor: pointer;
}
details ul {
  padding-left: 20px;
}
footer {
  max-width: 1104px;
  margin: auto;
  border-top: 1px solid var(--grey);
  padding: 25px 0 40px;
  display: flex;
  align-items: flex-start;
  gap: 30px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
footer > span {
  white-space: nowrap;
}
footer p {
  max-width: 460px;
  margin: 0;
}
code {
  font-size: 0.95em;
}
esp-web-install-button {
  display: inline-block;
}
#wifi-status:empty,
#settings-status:empty {
  display: none;
}
#brightness-value {
  font-weight: 400;
  color: var(--muted);
}
@media (max-width: 800px) {
  .masthead {
    padding: 18px 24px;
  }
  .wordmark {
    font-size: 18px;
    gap: 10px;
  }
  nav {
    gap: 18px;
  }
  main {
    padding: 0 24px;
  }
  .intro {
    gap: 35px;
    min-height: auto;
    padding: 50px 0;
    grid-template-columns: 1.1fr 1fr;
  }
  h1 {
    font-size: 48px;
  }
  .lead {
    font-size: 18px;
  }
  .device {
    width: min(100%, 260px);
  }
  .step {
    gap: 18px;
    grid-template-columns: 42px 1fr;
  }
  .about {
    margin-left: 60px;
  }
  footer {
    margin: 0 24px;
    flex-wrap: wrap;
    gap: 15px;
  }
  footer p {
    order: 3;
    max-width: 100%;
  }
  .clock-figure figcaption {
    font-size: 10px;
    letter-spacing: 0;
  }
  figcaption span {
    padding: 0 2px;
  }
}
@media (max-width: 580px) {
  .masthead {
    padding: 16px 20px;
    gap: 14px;
    min-height: 74px;
    flex-wrap: wrap;
  }
  nav {
    gap: 14px;
  }
  nav a {
    font-size: 12px;
  }
  .wordmark {
    font-size: 17px;
  }
  .wordmark img {
    width: 32px;
    height: auto;
  }
  main {
    padding: 0 20px;
  }
  .intro {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 34px;
    padding: 38px 0 45px;
  }
  h1 {
    font-size: 49px;
  }
  .intro-copy > p {
    max-width: 100%;
  }
  .intro-copy .motion-caption {
    display: none;
  }
  .clock-figure {
    gap: 20px;
  }
  .device {
    width: 225px;
    border-radius: 25px;
  }
  .clock-figure figcaption {
    font-size: 11px;
  }
  .step {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 30px;
  }
  .step-marker {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  .step h2 {
    font-size: 31px;
  }
  .field-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .step-content {
    min-width: 0;
  }
  .settings-actions .button {
    flex: 1 1 auto;
  }
  .about {
    margin: 40px 0;
  }
  .about h2 {
    font-size: 28px;
  }
  .small {
    font-size: 12px;
  }
  footer {
    margin: 0 20px;
  }
  .inline-links {
    gap: 15px;
  }
  .eyebrow {
    font-size: 11px;
    letter-spacing: 1.2px;
  }
  .version {
    margin-left: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .button {
    transition: none;
  }
}
