:root {
  color-scheme: light;
  --ink: #07111f;
  --muted: #53657d;
  --blue: #155eef;
  --line: #c9d5e5;
  --paper: #fff;
  --base: #f7f9fc;
  --error: #ad1b1b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font:
    17px/1.65 system-ui,
    sans-serif;
}
a {
  color: var(--blue);
  text-underline-offset: 0.2em;
}
a,
button,
input {
  touch-action: manipulation;
}
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
.skip-link {
  position: absolute;
  top: -5rem;
  left: 1rem;
  background: var(--paper);
  padding: 0.75rem;
  z-index: 2;
}
.skip-link:focus {
  top: 1rem;
}
.site-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem max(1.25rem, calc((100vw - 72rem) / 2));
  background: #07111f;
  color: white;
}
.site-header a {
  display: inline-block;
  padding: 0.5rem 0;
  color: white;
  text-decoration: none;
}
.brand {
  margin-right: auto;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}
.brand span {
  color: #84b2ff;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
main {
  max-width: 72rem;
  margin: auto;
  padding: 2.5rem 1.25rem 4rem;
}
.intro {
  max-width: 51rem;
  margin-bottom: 2.5rem;
}
.intro > p:first-child {
  color: var(--muted);
  font-size: 0.9rem;
}
h1 {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-wrap: balance;
  margin: 0.75rem 0 1.25rem;
}
h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.1rem;
  line-height: 1.4;
}
p {
  max-width: 72ch;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
.clock-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 0.4rem;
  padding: clamp(1rem, 3vw, 2rem);
  text-align: center;
}
.clock-panel h2 {
  margin: 0;
}
#phase {
  color: var(--muted);
  margin: 1.2rem 0 0;
  font-weight: 650;
}
#clock {
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 650;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
}
#phase-help {
  font-size: 0.9rem;
  margin: 0 auto 1.5rem;
}
.controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
button,
input {
  font: inherit;
  min-height: 48px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #8599b3;
  border-radius: 0.35rem;
  padding: 0.6rem 1rem;
}
button {
  cursor: pointer;
  font-weight: 650;
}
button:hover {
  background: var(--base);
}
button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  min-width: 10rem;
}
button.primary:hover {
  filter: brightness(0.9);
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
label {
  display: block;
  font-weight: 650;
  margin: 0.5rem 0;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.settings h2 {
  margin-top: 0;
}
.durations {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.durations input {
  width: 100%;
  min-width: 0;
}
#duration-help,
.privacy,
#sound-status,
#status {
  color: var(--muted);
  font-size: 0.85rem;
}
#status {
  min-height: 3em;
  margin-bottom: 0;
}
#error {
  color: var(--error);
  font-size: 0.9rem;
}
#error:empty {
  display: none;
}
[aria-invalid='true'] {
  border: 2px solid var(--error);
}
.sound-settings {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  font-size: 0.95rem;
}
input[type='checkbox'] {
  width: 1.2rem;
  height: 1.2rem;
  min-height: 0;
  accent-color: var(--blue);
}
.privacy {
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
  padding-top: 1rem;
}
.notes {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding-top: 1rem;
}
.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
.notes p {
  color: var(--muted);
  font-size: 0.95rem;
}
footer {
  border-top: 1px solid var(--line);
  max-width: 72rem;
  margin: auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
footer a {
  padding: 0.5rem 0;
}
.notice {
  padding: 1rem;
  border: 1px solid var(--line);
}
@media (max-width: 52rem) {
  .workspace {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .notes-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  main {
    padding-top: 1.5rem;
  }
  nav {
    font-size: 0.9rem;
    gap: 1rem;
  }
  #clock {
    font-size: clamp(4rem, 18vw, 7rem);
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #eef4ff;
    --muted: #b0bed2;
    --blue: #99bfff;
    --line: #3a4c65;
    --paper: #142136;
    --base: #0c1626;
    --error: #ffaaaa;
  }
  button.primary {
    color: #07111f;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
