/* Common Minute: notice page and keeping sheet. Colours only through the house tokens. */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 32px 16px 48px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

p { margin: 0; }

/* The bill: a double rule, 1 px outside, 4 px gap, 1 px inside. */
.frame {
  max-width: 44rem;
  margin: 0 auto;
  border: 1px solid var(--ink);
  padding: 4px;
}
.frame-inner {
  border: 1px solid var(--ink);
  padding: 28px 32px 24px;
}

.label {
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

h1 {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 6px;
  margin: 14px 0 0;
  background: var(--c-brick);
}
.lede { margin-top: 16px; font-size: 18px; }

.small { font-size: 12.5px; color: var(--ink-soft); }

.next {
  margin-top: 28px;
  padding: 20px 0 24px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.when { margin-top: 6px; font-size: 18px; }
.zone { margin-left: 6px; font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.countdown {
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 72px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.controls .small { margin-top: 6px; }

button, .control {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .control:hover, button:focus-visible, .control:focus-visible {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent-fg);
  outline: none;
}

table {
  width: 100%;
  margin-top: 24px;
  border-collapse: collapse;
  font-size: 15px;
}
th {
  padding: 0 8px 8px 0;
  font-size: 12px;
  font-weight: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}
td {
  padding: 7px 8px 7px 0;
  border-top: 1px solid var(--ink);
  white-space: nowrap;
}
th:last-child, td:last-child { padding-right: 0; }
tbody tr:last-child td { border-bottom: 1px solid var(--ink); }

.colophon { margin-top: 28px; }
.colophon .small { margin-top: 8px; }
.wordmark { display: block; margin-top: 20px; width: 140px; height: auto; }

noscript p { margin-top: 20px; }

/* The minute: nothing on the screen but cream, in every colour scheme. */
.veil { display: none; }
html:has(body.still) { color-scheme: light; background: var(--c-cream); }
body.still { background: var(--c-cream); cursor: none; }
body.still > *:not(.veil) { display: none; }
body.still > .veil {
  display: block;
  position: fixed;
  inset: 0;
  background: var(--c-cream);
  cursor: none;
}

@media (max-width: 560px) {
  body { padding-top: 16px; }
  .frame-inner { padding: 20px 14px 18px; }
  h1 { font-size: 32px; }
  .countdown { font-size: 56px; }
  .controls { grid-template-columns: 1fr; }
  .zone { display: block; margin: 2px 0 0; }
  table { font-size: 13.5px; }
  th { letter-spacing: 0.08em; font-size: 11px; }
  td, th { padding-right: 6px; }
}

@media (prefers-color-scheme: dark) {
  /* the wordmark is drawn in plum; it keeps a cream ground, like a pasted label */
  :root:not([data-theme="light"]) .wordmark { background: var(--c-cream); padding: 6px 8px; }
}

/* The keeping sheet. */
.sheet { max-width: 60rem; margin: 0 auto; }
.sheet h1 { font-size: 32px; }
.sheet .meta { margin-top: 14px; }
.sheet .range { margin-top: 2px; }
.sheet .print { display: inline-block; width: auto; margin-top: 16px; }
.grid-scroll { margin-top: 18px; overflow-x: auto; }
.grid {
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  grid-auto-rows: 1fr; /* every row the same height, so rules line up across the sheet */
  width: 100%;
  min-width: 720px;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
.box {
  aspect-ratio: 9 / 11;
  align-self: stretch;
  padding: 0.4cqw 0.3cqw;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-size: 1.1cqw;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
}
.box span { display: block; }
.sheet .instruction { margin-top: 18px; }
.sheet .fields { display: flex; flex-wrap: wrap; gap: 8px 40px; margin-top: 14px; }
.sheet .colophon-line { margin-top: 16px; font-size: 9px; color: var(--ink-soft); }

@page { margin: 10mm; }
@media print {
  html, body { background: transparent; color: black; }
  body { padding: 0; font-size: 8.5pt; line-height: 1.2; }
  .print { display: none !important; }
  .sheet { max-width: none; width: 180mm; margin: 0; }
  .sheet .label { font-size: 6pt; line-height: 1.2; }
  .sheet h1 { margin-top: 0.8mm; font-size: 14pt; line-height: 1.05; }
  .sheet h1::after { width: 12mm; height: 1mm; margin-top: 1.5mm; }
  .sheet .meta { display: inline-block; margin-top: 2mm; margin-right: 1mm; }
  .sheet .range { display: inline; }
  .grid-scroll { margin-top: 2.5mm; overflow: visible; }
  .grid { width: 180mm; min-width: 0; border-color: black; border-width: 0.25mm; }
  .box { border-color: black; border-width: 0.25mm; }
  .sheet .instruction { margin-top: 2mm; }
  .sheet .fields { margin-top: 1.2mm; }
  .sheet .colophon-line { margin-top: 1.8mm; font-size: 7pt; line-height: 1.2; color: black; white-space: nowrap; }
}
