:root {
  --ink: #14131a;
  --paper: #fbfbfc;
  /* The colour old paper drifts toward. Mirrors CREAM in decay.js. */
  --cream-ink: #efe6d4;
  /* 5.06:1 on fresh paper, 4.81:1 on the oldest — AA for small text either way. */
  --muted: #6d6b75;
  /* Hairlines and rules only. Never carries text: it would not pass anywhere. */
  --faint: #dedde3;
  --accent: #ff4d19;
  /* The accent is a fill colour; at text sizes it needs this darker twin (4.77:1). */
  --accent-ink: #d13707;
  /*
   * Paper grain. Generated by the browser from fractal noise, never an image
   * asset. It is laid down at a few percent opacity wherever it is used: if it
   * reads as texture rather than as surface, it is too strong.
   */
  /* The page's own ground. A record overrides it with aged paper. */
  --page: #fbfbfc;
  --grain: url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'><filter%20id='g'><feTurbulence%20type='fractalNoise'%20baseFrequency='0.85'%20numOctaves='4'%20stitchTiles='stitch'/><feColorMatrix%20type='saturate'%20values='0'/><feComponentTransfer><feFuncA%20type='table'%20tableValues='1%201'/></feComponentTransfer></filter><rect%20width='160'%20height='160'%20filter='url%28%23g%29'/></svg>");
  --px: 22px;
  --gap: 4px;
  --col-gap: 44px;
  --fog: 140px;

  /*
   * Two voices. The sans is the interface — forms, buttons, the ticking clock,
   * anything a visitor operates. The serif is the record: dates, the ledger,
   * the words people left behind. It is an old-style/transitional stack drawn
   * entirely from faces that already exist on the machine, so the archive gains a
   * face with some age to it without loading a single byte over the network.
   */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    "URW Palladio L", Charter, "Bitstream Charter", "Source Serif Pro", Georgia,
    "Times New Roman", serif;

  font-family: Inter, "Inter Variable", system-ui, -apple-system, "Segoe UI Variable Text",
    "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  letter-spacing: -0.011em;
  font-feature-settings: "cv05" 1, "ss01" 1;
}

a { color: inherit; }

/* ---------- header ---------- */

.head {
  padding: 40px 40px 18px;
  flex: none;
}

.head-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.period {
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.head h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 560;
  letter-spacing: -0.025em;
}

.head h1 a { text-decoration: none; }

.tagline {
  margin: 5px 0 0;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0;
  color: var(--muted);
}

.meta {
  margin: 18px 0 0;
  font-size: 13.5px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.meta .live { color: var(--accent-ink); }

/* What the world was leading with. Reads as a dateline, not a news widget. */
.headline {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 14px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--faint);
  max-width: 900px;
  font-size: 14px;
}

.headline[hidden] { display: none; }

.headline .kicker {
  flex: none;
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

/* The dateline is the door to owning the day. Discreet until you go near it. */
.headline button.kicker {
  padding: 0;
  font-family: inherit;
  background: none;
  border: 0;
  border-bottom: 1px dotted var(--faint);
  cursor: pointer;
}

.headline button.kicker:hover { border-bottom-color: var(--accent); }
.headline button.kicker:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.headline .title {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  overflow-wrap: anywhere;
}

.headline .title.empty { color: var(--muted); }

.headline a.title:hover { border-bottom-color: var(--ink); }

.headline .source {
  flex: none;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.notice {
  margin: 14px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  max-width: 560px;
  font-size: 13px;
}

.notice[hidden] { display: none; }

/* ---------- countdown ---------- */

/*
 * The day is on a timer, and the timer is the second thing on the page. It never
 * flashes, never turns red and never pulses: as midnight comes closer the type only
 * gets heavier and the ink only gets darker. Inevitability, not alarm.
 */
.clock {
  flex: none;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 16px;
  padding: 4px 40px 20px;
}

.clock[hidden] { display: none; }

.clock .digits {
  font-size: clamp(38px, 5.8vw, 58px);
  line-height: 1;
  font-weight: 640;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  color: color-mix(in srgb, var(--ink) 88%, var(--page));
  transition: font-weight 600ms ease, color 600ms ease;
}

.clock .clock-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 600ms ease;
}

/* What is left of the day, beside how long is left of it. */
.clock .clock-remaining {
  flex-basis: 100%;
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* The last hour. */
.clock.late .digits { font-weight: 700; color: var(--ink); }
.clock.late .clock-label { color: color-mix(in srgb, var(--ink) 70%, var(--page)); }

/* The last five minutes. */
.clock.final .digits { font-weight: 760; color: #000; }
.clock.final .clock-label,
.clock.final .clock-remaining { color: var(--ink); }

/* Midnight has passed and the day is being written shut. */
.clock.closing .digits {
  font-weight: 500;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.clock.closing .clock-label { color: var(--muted); }

/* ---------- wall ---------- */

main { flex: 1 1 auto; min-height: 0; display: flex; }

.wall-frame {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
}

/* The past dissolves into fog on the left; the right edge gets a lighter veil. */
.wall-frame::before,
.wall-frame::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 5;
  pointer-events: none;
}

.wall-frame::before {
  left: 0;
  width: var(--fog);
  background: linear-gradient(
    to right,
    var(--page) 18%,
    color-mix(in srgb, var(--page) 0%, transparent) 100%
  );
}

.wall-frame::after {
  right: 0;
  width: 40px;
  background: linear-gradient(
    to left,
    var(--page) 5%,
    color-mix(in srgb, var(--page) 0%, transparent) 100%
  );
}

.wall {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  gap: var(--col-gap);
  padding: 28px 64px 34px 48px;
  overflow-x: auto;
  /* A short window cannot show a whole day at once; panning beats losing the top rows. */
  overflow-y: auto;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  outline: none;
}

.wall::-webkit-scrollbar { height: 5px; width: 5px; }
.wall::-webkit-scrollbar-thumb { background: var(--faint); }

/*
 * Every column is the same size, so the browser is told what a skipped one measures
 * and allowed to stop laying out the ones nobody is looking at. This is what keeps
 * the wall walkable once the archive is years rather than weeks long: the DOM still
 * holds every day, but only the handful on screen cost anything to render.
 *
 * The `auto` in contain-intrinsic-size means a column that has been on screen once
 * is remembered at its true size; --col-w/--col-h are measured from a real column at
 * boot so that the columns that have *never* been on screen are not guesses either.
 * A wrong guess here would show up as the scrollbar shifting under the hand.
 */
.day {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 6px 5px 4px;
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: auto var(--col-w, 136px) auto var(--col-h, 316px);
}

/* Held for the one frame in which a real column is measured, so that the thing being
 * measured is a laid-out column and not the estimate it is about to replace. */
.wall.measuring .day { content-visibility: visible; }

/*
 * The grain of the sheet a sealed day is printed on. It has to live on the column
 * rather than on the grid: the grid carries the decay filter, and a filter isolates
 * blending, which would leave the noise sitting on top as a pale panel instead of
 * sinking into the paper. Tree order puts it behind the pixels.
 */
.day.sealed::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background-image: var(--grain);
  background-size: 160px 160px;
  /* Soft-light is neutral at mid-grey, so the grain adds tooth without adding a
     panel. Strength is the opacity below, and nothing else. */
  mix-blend-mode: soft-light;
  opacity: 0.5;
  pointer-events: none;
}

.day .flag {
  height: 11px;
  font-size: 10px;
  line-height: 11px;
  font-weight: 600;
  color: var(--accent-ink);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* 50 pixels a day: 10 rows of 5, filling upward from the bottom-left. */
.slots {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--per-row, 5), var(--px));
  gap: var(--gap);
  padding: 5px;
  border-radius: 3px;
}

.slot {
  width: var(--px);
  height: var(--px);
  padding: 0;
  margin: 0;
  border: 1px solid var(--faint);
  background: transparent;
  border-radius: 2px;
  display: block;
  overflow: hidden;
  font: inherit;
  color: inherit;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.slot.filled { border-color: rgba(0, 0, 0, 0.14); }

.slot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/*
 * How a sealed day wears. --sat, --con and --cream are written onto the column by
 * renderDay from decay.js, which owns the curve and the caps; nothing here decides
 * how far a day may age. The paper warms on the column and the filter sits on the
 * grid inside it, so the tint is never desaturated by the thing it sits behind.
 */
.day.sealed {
  background: color-mix(in srgb, var(--cream-ink) var(--cream, 0%), transparent);
  border-radius: 4px;
}

.day.sealed .slots {
  filter: saturate(calc(0.82 * var(--sat, 1))) contrast(var(--con, 1));
}

.day.sealed .slot { border-color: #e8e7ec; }

/* Pressed into the sheet: a shallow recess, matte, no lift and nowhere to go. */
.day.sealed .slot.filled {
  border-color: rgba(0, 0, 0, 0.10);
  box-shadow:
    inset 0 1px 2px rgba(20, 19, 26, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.14);
}

/*
 * A pixel nobody took on a day that has closed. It is the same paper as everything
 * around it — no border, no fill, no hover, no cursor, no tooltip. It should read as
 * silence rather than as something that failed to sell, so it gets no affordance at
 * all, not even a disabled one.
 */
.day.sealed .slot.empty {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

/* Today is still wet: flat, full-strength colour, lifted a hair off the paper. */
.day.live .slot.filled {
  box-shadow: 0 1px 2px rgba(20, 19, 26, 0.13);
}

.day.live .slot.open {
  border-color: #ffc0ad;
  border-color: color-mix(in srgb, var(--accent) 38%, var(--paper));
  border-style: dashed;
  cursor: pointer;
}

.day.live .slot.open:hover,
.day.live .slot.open:focus-visible {
  background: var(--accent);
  border-style: solid;
  outline: none;
}

/* Picked, but not yet paid for: solid accent with a bite taken out of the corner. */
.day.live .slot.open.picked {
  background: var(--accent);
  border-style: solid;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, var(--paper));
}

button.slot.filled { cursor: pointer; }

.day.live button.slot.filled:hover {
  transform: scale(1.18);
  box-shadow: 0 0 0 1px var(--paper);
}

/* Sealed pixels acknowledge the pointer without lifting out of the surface. */
.day.sealed button.slot.filled:hover {
  box-shadow:
    inset 0 1px 2px rgba(20, 19, 26, 0.22),
    0 0 0 2px color-mix(in srgb, var(--ink) 32%, transparent);
}

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

.slot.new { animation: fade-in 700ms ease-out; }

@keyframes fade-in {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: none; }
}

/* ---------- the closing ---------- */

/*
 * A day does not switch from open to sealed, it settles into it: the colour drains,
 * the marks sink into the paper and the grain comes up under them, over a second and
 * a half, easing out. There is nothing to celebrate here — no sound, no confetti, no
 * flourish at the end. It is the day closing, which is the one thing that was always
 * going to happen to it.
 */
.day.sealing .slots {
  animation: seal 1500ms ease-out both;
}

.day.sealing .slot.filled {
  animation: press 1500ms ease-out both;
}

.day.sealing::before {
  animation: settle 1500ms ease-out both;
}

@keyframes seal {
  from { filter: saturate(1) contrast(1); }
  to { filter: saturate(calc(0.82 * var(--sat, 1))) contrast(var(--con, 1)); }
}

/*
 * The lift fades out as the recess fades in. Both keyframes carry the same three
 * shadows in the same order — a from and a to with different shadow counts cannot
 * be interpolated, and the browser swaps them at the halfway point instead, which
 * lands as a pop in the middle of the one moment that must not have one.
 */
@keyframes press {
  from {
    box-shadow:
      0 1px 2px rgba(20, 19, 26, 0.13),
      inset 0 1px 2px rgba(20, 19, 26, 0),
      inset 0 -1px 0 rgba(255, 255, 255, 0);
    border-color: rgba(0, 0, 0, 0.14);
  }
  to {
    box-shadow:
      0 1px 2px rgba(20, 19, 26, 0),
      inset 0 1px 2px rgba(20, 19, 26, 0.22),
      inset 0 -1px 0 rgba(255, 255, 255, 0.14);
    border-color: rgba(0, 0, 0, 0.10);
  }
}

@keyframes settle {
  from { opacity: 0; }
  to { opacity: 0.5; }
}

.day .label {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  font-family: var(--serif);
  font-size: 13.5px;
  letter-spacing: 0;
  color: var(--muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.day .label .dow {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.day .label.weekend .dow { color: var(--accent-ink); }

/* A full-height hairline wherever the month turns over. */
.month-marker {
  flex: none;
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  padding: 0 0 4px 13px;
  margin-left: 2px;
  border-left: 1px solid var(--faint);
}

.month-marker span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.month-marker.year-start { border-left-color: var(--ink); }
.month-marker.year-start span { color: var(--ink); }

.day .label a { text-decoration: none; }
.day .label a:hover { text-decoration: underline; }
.day.live .label { color: var(--ink); }

.day .lock { display: block; margin: 0 auto 5px; color: var(--faint); }
.day.live .lock { visibility: hidden; }

/*
 * The day a permalink points at. It is marked, not sold: a hairline in ink rather
 * than a ring in the colour the site uses to ask for money. Its own ageing stays on
 * — a record that showed its day at full strength would be lying about how old it is.
 */
.day.focus .slots {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 16%, transparent);
}

.day.focus .label { color: var(--ink); font-weight: 600; }

/* ---------- selection tray ---------- */

.tray {
  position: fixed;
  z-index: 15;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100vw - 24px);
  padding: 10px 12px 10px 18px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(20, 19, 26, 0.14);
  font-size: 13.5px;
}

.tray[hidden] { display: none; }
.tray .tray-count { font-weight: 560; white-space: nowrap; }
.tray button { white-space: nowrap; }

.tray .tray-total {
  color: var(--accent-ink);
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}

/* Which pixels a multi-pixel claim is about to write. */
.picked-list {
  margin: -14px 0 20px;
  font-size: 12.5px;
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.picked-list[hidden] { display: none; }

/* ---------- tooltip ---------- */

.tip {
  position: fixed;
  z-index: 20;
  max-width: 320px;
  padding: 14px 16px;
  background: var(--page);
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.5;
  pointer-events: auto;
}

.tip[hidden] { display: none; }

.tip .head-row { display: flex; align-items: center; gap: 9px; }
.tip .chip { width: 18px; height: 18px; border-radius: 3px; flex: none; overflow: hidden; }
.tip .chip img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tip .who { font-weight: 560; }
.tip .msg {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.tip .sub {
  margin: 9px 0 0;
  font-family: var(--serif);
  font-size: 12.5px;
  letter-spacing: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
/*
 * The one thing in the tooltip a visitor can act on, so it is the one thing that
 * does not read as prose: full ink against the muted line it sits on, underlined,
 * and given room to be hit without precision.
 */
.tip a {
  overflow-wrap: anywhere;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  padding: 2px 0;
}
.tip a:hover,
.tip a:focus-visible { text-decoration-thickness: 2px; }
.tip .sub:has(a) { margin-top: 7px; }

/* ---------- dialog ---------- */

.sheet {
  border: 1px solid var(--ink);
  border-radius: 6px;
  padding: 0;
  width: min(440px, calc(100vw - 32px));
  background: var(--paper);
  color: var(--ink);
}

.sheet::backdrop { background: rgba(251, 251, 252, 0.86); }

.sheet form { padding: 28px; }

.sheet h2 {
  margin: 0 0 22px;
  font-size: 16px;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.sheet label,
.sheet .field {
  display: block;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: var(--muted);
}

.sheet label span,
.sheet .field > span { display: flex; justify-content: space-between; }
.sheet label em,
.sheet .field em { font-style: normal; font-variant-numeric: tabular-nums; }

.sheet input[type="text"],
.sheet input[type="url"],
.sheet input[type="number"] {
  width: 100%;
  margin-top: 5px;
  padding: 8px 0;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
}

.sheet input[type="number"] { font-variant-numeric: tabular-nums; }

.sheet input:focus { outline: none; border-bottom-color: var(--accent); }

/* Who owns the day right now, and for how much. */
.standing {
  margin: -8px 0 22px;
  font-size: 12.5px;
  color: var(--accent-ink);
}

/* ---------- colour + logo ---------- */

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.swatch {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  cursor: pointer;
  padding: 0;
}

.swatch[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink);
}

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

.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

input[type="color"] {
  width: 34px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--faint);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 2px; }

#f-color-hex {
  width: 8em;
  margin: 0;
  padding: 5px 8px;
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-transform: lowercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--faint);
  border-radius: 4px;
}

#f-color-hex:focus { outline: none; border-color: var(--accent); }
#f-color-hex.invalid { border-color: var(--accent); color: var(--accent-ink); }

.logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.preview {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 4px;
  border: 1px solid var(--faint);
  overflow: hidden;
}

.preview img { display: block; width: 100%; height: 100%; object-fit: cover; }

input[type="file"] {
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  max-width: 100%;
}

input[type="file"]::file-selector-button {
  font: inherit;
  font-size: 12px;
  margin-right: 10px;
  padding: 6px 12px;
  border: 1px solid var(--faint);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.fineprint { font-size: 12.5px; color: var(--muted); margin: 22px 0 0; }
.fineprint strong { color: var(--ink); font-weight: 560; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 14px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}

/* The form's other labels lay their span out as a flex row; this one is prose. */
.sheet label.consent span { display: inline; }
.consent input { margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.consent a { color: var(--ink); text-underline-offset: 2px; }

.error {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--accent-ink);
}

.error[hidden] { display: none; }

.sheet menu {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
}

button.ghost, button.accent {
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 5px;
  cursor: pointer;
}

button.ghost {
  border: 1px solid var(--faint);
  background: transparent;
  color: var(--muted);
}

button.accent {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--paper);
}

button:disabled { opacity: 0.45; cursor: default; }

/* ---------- footer ---------- */

.foot {
  flex: none;
  display: flex;
  gap: 14px 22px;
  flex-wrap: wrap;
  padding: 22px 40px 34px;
  font-size: 12.5px;
  color: var(--muted);
}

/* The archive, added up. Grows by one day a night, for as long as it runs. */
.ledger {
  font-family: var(--serif);
  font-size: 13.5px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.foot a {
  color: inherit;
  text-decoration-color: var(--faint);
  text-underline-offset: 2px;
}

.foot a:hover { color: var(--ink); }

/* The count of what never happened, under the grid it never happened in. */
.grid-note {
  flex: none;
  margin: 0;
  padding: 4px 40px 10px;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.grid-note[hidden] { display: none; }

/* ---------- the record ---------- */

/*
 * On a record the day is the page, so the page ages with it. --page-cream is written
 * onto the body by app.js from the same decay curve the grid uses.
 */
body.record {
  --page: color-mix(in srgb, var(--cream-ink) var(--page-cream, 0%), var(--paper));
  background-color: var(--page);
  background-image: var(--grain);
  background-size: 160px 160px;
  background-attachment: fixed;
  /* Same trick as the per-day grain, done between a background image and its colour. */
  background-blend-mode: soft-light;
}

/* The day's own paper would double up on a page already made of it. */
body.record .day.sealed { background: none; }
body.record .day.sealed::before { display: none; }

/*
 * A sealed day is a record, not a shop counter. Everything that asks for money is
 * gone from it: the timer, the price, the tray, the small print about refunds.
 * The only commerce a record admits to is the line back to today, and that is a
 * sentence, not a button.
 */
.record .clock,
.record .tray,
.record .commerce-note,
.record .day .flag { display: none; }

.record-note {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0 40px 6px;
}

.record-note[hidden] { display: none; }

.record-note #record-date {
  font-family: var(--serif);
  font-size: clamp(28px, 3.8vw, 40px);
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: 0;
}

/* What the date already means, said once, in the smallest type on the page. */
.sealed-tag {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Small, quiet, and the only way out of the past. */
.record-note a {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration-color: var(--faint);
  text-underline-offset: 3px;
}

.record-note a:hover { color: var(--ink); }

/* ---------- static documents (privacy, terms) ---------- */

/* The wall pins the body to the viewport; a document has to be free to grow. */
.doc, html:has(.doc) { height: auto; min-height: 100%; }
.doc .head { padding-bottom: 8px; }

main.prose {
  display: block;
  flex: none;
  max-width: 46rem;
  padding: 8px 40px 40px;
  font-size: 15px;
}

.prose h2 {
  margin: 34px 0 10px;
  font-size: 15px;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.prose p, .prose li { color: #3f3d4a; }
.prose li { margin-bottom: 6px; }
.prose ul { padding-left: 20px; }
.prose .updated { color: var(--muted); font-size: 12.5px; margin-top: 0; }
.prose a { text-underline-offset: 2px; }

/*
 * Narrow screens. A day is 10 rows tall and cannot be shortened, so every line of
 * chrome above the wall is a row of pixels pushed off the bottom of it. The header
 * gives up size here rather than the timeline giving up its shape.
 */
@media (max-width: 600px) {
  :root { --col-gap: 24px; --fog: 64px; --px: 24px; --gap: 4px; }
  .head { padding: 22px 20px 10px; }
  .head h1 { font-size: 18px; }
  .head-top { align-items: flex-start; gap: 14px; }
  .tagline { margin-top: 3px; font-size: 14px; }
  .period { font-size: 13.5px; }
  .meta { margin-top: 12px; font-size: 13px; }

  .headline { margin-top: 11px; padding-top: 10px; gap: 4px 9px; }
  .headline .kicker { font-size: 10px; letter-spacing: 0.12em; }
  .headline .title { font-size: 15px; }

  .clock { padding: 2px 20px 16px; gap: 2px 12px; }
  .clock .digits { font-size: clamp(34px, 13vw, 52px); }
  .clock .clock-label { font-size: 10.5px; letter-spacing: 0.11em; }
  .clock .clock-remaining { font-size: 12.5px; margin-top: 4px; }

  .record-note { padding: 0 20px 2px; gap: 2px 14px; }
  .record-note #record-date { font-size: clamp(24px, 7.6vw, 32px); }
  /* The record's own date says what the tagline says, in the day's own words. */
  .record .tagline { display: none; }

  .wall { padding: 18px 26px 20px 22px; }
  .tray { bottom: 14px; padding: 9px 10px 9px 14px; gap: 10px; font-size: 13px; }

  .grid-note { padding: 2px 20px 8px; font-size: 13px; }

  .foot { padding: 14px 20px 26px; gap: 10px 16px; }
  /* One long line of totals has to be allowed to break, or it runs off the page. */
  .ledger { white-space: normal; }

  main.prose { padding: 4px 20px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .wall { scroll-behavior: auto; }
  .slot.new { animation: none; }
  .clock .digits,
  .clock .clock-label { transition: none; }
  /* Straight to sealed. The state is the point; the fade to it is not. */
  .day.sealing .slots,
  .day.sealing .slot.filled,
  .day.sealing::before { animation: none; }
}
