:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #09141f;
  color: #e8f1f8;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  max-width: 1120px;
  margin: auto;
  padding: 26px 24px 48px;
}
a {
  color: #91dfff;
  text-underline-offset: 4px;
}

/* Header + intro */

header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid #2d4458;
  padding-bottom: 20px;
  color: #a5bbcd;
  font-size: 0.875rem;
}
.brand {
  text-decoration: none;
  letter-spacing: 0.1em;
}
h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  font-weight: 550;
  letter-spacing: -0.035em;
  margin: 28px 0 12px;
}
.intro {
  font-size: 1.125rem;
  color: #b0c4d5;
  margin: 0 0 28px;
  max-width: 70ch;
}
h2 {
  font-size: 1.3rem;
  line-height: 1.35;
  font-weight: 550;
  margin: 0 0 24px;
}

/* Layout */

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.panel {
  background: #112231;
  border: 1px solid #304b60;
  border-radius: 12px;
  padding: 26px;
  min-width: 0;
}
aside {
  display: grid;
  gap: 20px;
}
.number {
  font-family: ui-monospace, monospace;
  color: #86d8f5;
  margin-right: 12px;
}

/* Form fields */

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 24px;
  min-width: 0;
}
legend {
  color: #d0deea;
  font-size: 1rem;
  padding: 0;
  margin-bottom: 10px;
}
.datetime {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px 6px 76px;
  gap: 8px;
  align-items: end;
}
.datetime label {
  font-size: 0.875rem;
  color: #acc3d4;
  min-width: 0;
}
.colon {
  padding-bottom: 11px;
  color: #9bc1d4;
}
input,
select,
button {
  font: inherit;
}
input:not([type="checkbox"]),
select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px;
  border: 1px solid #3c5b72;
  border-radius: 6px;
  background: #0b1a26;
  color: #edf5fc;
  margin-top: 5px;
}
input[type="date"] {
  font-size: 1rem;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #96dcfa;
  flex-shrink: 0;
}
.radar {
  display: block;
  max-width: 220px;
}
.radar input {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.note {
  color: #acbfd0;
  font-size: 0.9rem;
  line-height: 1.6;
}
.second {
  margin-top: 32px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 15px 0;
}
.check input {
  margin-top: 4px;
}
.setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: #b5cadb;
  font-size: 0.9rem;
  margin: 0 0 20px 30px;
}
.setting select {
  max-width: 230px;
  margin: 0;
}
.partial {
  border-top: 1px solid #304b60;
  padding-top: 22px;
  margin-top: 24px;
}

/* Buttons + status */

.button,
button {
  display: inline-block;
  width: 100%;
  padding: 12px 18px;
  min-height: 48px;
  background: #92dfff;
  color: #081722;
  border: 1px solid #92dfff;
  border-radius: 7px;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.secondary {
  background: transparent;
  border-color: #4b718a;
  color: #b5e8fc;
  margin-top: 10px;
}
a:focus-visible,
input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 3px solid #f1cd76;
  outline-offset: 3px;
}
.error,
.missing {
  color: #f0c58e;
  overflow-wrap: anywhere;
}
.error {
  border-left: 3px solid #e8b372;
  padding-left: 12px;
}
.eyebrow {
  color: #87d7f4;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  margin: 0 0 10px;
}
.status-panel h2 {
  font-size: 1.6rem;
  margin-bottom: 16px;
}
.status-panel p {
  overflow-wrap: anywhere;
}
progress {
  width: 100%;
  accent-color: #91dcf9;
  height: 8px;
  margin: 8px 0;
}

/* Replay-clock diagram */

.clock-diagram {
  margin: 4px 0 6px;
  color: #acbfd0;
}
.clock-diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Instructions, details, footer */

.instructions {
  border-top: 1px solid #304858;
  margin-top: 30px;
  padding-top: 24px;
}
.instructions h2 {
  margin-bottom: 14px;
}
ol {
  padding-left: 22px;
}
li + li {
  margin-top: 8px;
}
code {
  overflow-wrap: anywhere;
}
details {
  font-size: 0.9rem;
  color: #acbfd0;
}
details p {
  margin: 10px 0 0;
}
summary {
  cursor: pointer;
  color: #d0deea;
}
footer {
  color: #99b0c3;
  border-top: 1px solid #304858;
  margin-top: 26px;
  padding-top: 18px;
  font-size: 0.875rem;
}
[hidden] {
  display: none !important;
}

/* Responsive */

@media (max-width: 800px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  main {
    padding: 20px 18px 40px;
  }
}
@media (max-width: 430px) {
  .panel {
    padding: 20px 16px;
  }
  .datetime {
    grid-template-columns: minmax(0, 1fr) 65px 5px 65px;
    gap: 5px;
  }
  .datetime input,
  .datetime select {
    padding: 10px 6px;
  }
  .setting {
    margin-left: 0;
    gap: 10px;
  }
  .setting select {
    max-width: 185px;
  }
}
@media (max-width: 350px) {
  .datetime {
    grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr);
  }
  .datetime label:first-child {
    grid-column: 1 / -1;
  }
  .setting {
    display: block;
  }
  .setting select {
    max-width: none;
  }
}
