/* Hallmark · shape: wall plan and tear-off month leaves · genre: editorial · theme: brand · redesign: full · copy: verbatim
 * paper: oklch(96.5% 0.007 95) · accent: oklch(48% 0.10 140) · display: Young Serif · body: Atkinson Hyperlegible Next · hero: Index · nav: edge-aligned · footer: mast · signature: choosing a month runs its band through the plan and brings its Tasks; ticking them all makes the gnome hop
 * axes: light/roman-serif/chromatic-green · posture: full palette (paper, frost, sprout, leaf, straw, earth) · contrast: pass · fold: pass · draw: 7a11, swapped Stat-Led (the page has no figures) · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: H, five leaves share a skeleton; the season colours and the wider April leaf carry the change */
/* Hallmark · waive 44c · the Index hero sets the wall plan under its head · twelve months need the sheet's whole width, so the plan cannot stand beside the question */
/* Hallmark · reworded "15.01. · KW 2" to "15.01., KW 2" · 63 names dot-joined dates; same for frost and today labels */
/* Hallmark · dropped the month ruler on each stop · the month name at leaf size says the same thing */
/* Hallmark · hero-review: fix · 5 findings · 5 resolved */
/* Hallmark · finish-review: subagent · 8 findings · 7 resolved 1 unresolved · gap: April and August captures show June, and the Mangold capture opens on a cut button; needs new screenshots */
@import url("./tokens.css");
@import url("./base.css");

@font-face {
  font-family: "Young Serif";
  src: url("/fonts/young-serif-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 0;
}

body {
  font-size: 1.0625rem;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--color-accent);
  font-weight: 700;
}

.mast,
.headline-row,
.stop-inner,
.more-inner,
.close-inner,
.foot {
  width: min(100% - 2 * var(--gutter), var(--container) - 2 * var(--gutter));
  margin-inline: auto;
}

.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-ink);
  font: 400 var(--text-xl) / 1 var(--font-display);
  letter-spacing: var(--tracking-display);
  text-decoration: none;
}

.lang {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.headline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(11rem, 19vw, 19rem);
  gap: var(--gap-columns);
  align-items: end;
  padding-top: var(--space-xs);
}

.headline {
  padding-bottom: var(--space-lg);
}

h1 {
  max-width: 30ch;
  font-size: clamp(2.25rem, 3.5vw + 0.4rem, 3.75rem);
}

.lead {
  max-width: 70ch;
  margin-top: var(--space-md);
  color: var(--color-ink-2);
}

/* He stands on the plan: his feet come down over its top edge. */
.gnome {
  position: relative;
  z-index: var(--z-raised);
  width: 100%;
  margin-bottom: calc(-1 * var(--space-sm));
  transform-origin: 50% 92%;
}

.gnome.hop {
  animation: hop var(--dur-long) var(--ease-out);
}

@keyframes hop {
  0% {
    transform: scale(0.94);
  }
  45% {
    transform: translateY(-12px);
  }
  100% {
    transform: none;
  }
}

.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 21rem;
  width: min(100% - 2 * var(--gutter), var(--container) - 2 * var(--gutter));
  margin-inline: auto;
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-sheet);
}

.chart {
  --label: 10rem;
  --row: clamp(34px, (100dvh - 560px) / 9, 52px);
  min-width: 0;
  padding: var(--space-md) var(--space-lg);
}

.months {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin-left: var(--label);
}

.months button {
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background: transparent;
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color var(--dur-micro) var(--ease-out),
    color var(--dur-micro) var(--ease-out);
}

.months button:hover {
  background: var(--color-paper-2);
  color: var(--color-ink);
}

.months button:active {
  background: var(--color-paper-3);
}

.months button[aria-pressed="true"] {
  background: var(--color-paper-3);
  color: var(--color-ink);
}

.axis {
  display: none;
  position: relative;
}

/* The chosen month's band runs through every row at once, under the bars. */
.plot {
  position: relative;
}

.plot::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--label);
  width: calc((100% - var(--label)) / 12);
  background: var(--color-band);
  transform: translateX(calc(var(--selected) * 100%));
  transition: transform var(--dur-short) var(--ease-out);
}

.frost-labels {
  position: relative;
  height: 24px;
  margin-left: var(--label);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 24px;
}

.frost-label {
  position: absolute;
  top: 0;
  white-space: nowrap;
  padding-left: var(--space-2xs);
}

.frost-label.firstFrost {
  padding-right: var(--space-2xs);
  padding-left: 0;
  transform: translateX(-100%);
}

.kw {
  margin-left: var(--space-xs);
  font-weight: 400;
}

.rows {
  position: relative;
}

/* Both frost dates and today are lines through the plan, over the bars. */
.rows::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: var(--label);
  pointer-events: none;
  background:
    linear-gradient(var(--color-ink), var(--color-ink)) calc(var(--last-frost) * 100%) 0 / 1.5px
    100% no-repeat,
    linear-gradient(var(--color-ink), var(--color-ink)) calc(var(--first-frost) * 100%) 0 / 1.5px
    100% no-repeat;
}

.has-today .rows::after {
  background:
    linear-gradient(var(--color-ink), var(--color-ink)) calc(var(--last-frost) * 100%) 0 / 1.5px
    100% no-repeat,
    linear-gradient(var(--color-ink), var(--color-ink)) calc(var(--first-frost) * 100%) 0 / 1.5px
    100% no-repeat,
    linear-gradient(var(--color-brick), var(--color-brick)) calc(var(--today) * 100%) 0 / 2px 100%
    no-repeat;
}

.row {
  display: grid;
  grid-template-columns: var(--label) minmax(0, 1fr);
}

.crop {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--row);
  font-size: var(--text-sm);
}

.icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
}

.track {
  position: relative;
  display: block;
  background: repeating-linear-gradient(
    to right,
    var(--color-rule) 0 1px,
    transparent 1px calc(100% / 12)
  );
}

.bar {
  position: absolute;
  top: var(--space-xs);
  bottom: var(--space-xs);
}

.bar.preCulture {
  background: hsl(var(--hue) 45% 52% / 0.35);
}

.bar.inBed {
  background: hsl(var(--hue) 45% 52%);
}

.bar.harvest {
  background: var(--color-accent);
}

.pins {
  position: relative;
  height: 40px;
  margin-left: var(--label);
}

.pins a {
  position: absolute;
  top: 0;
  display: inline-flex;
  align-items: flex-end;
  height: 40px;
  padding-bottom: var(--space-2xs);
  font-size: var(--text-sm);
  transform: translateX(-50%);
}

.pins a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: var(--space-sm);
  background: var(--color-accent);
}

.chart-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs) var(--space-lg);
  margin-top: var(--space-xs);
  margin-left: var(--label);
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.today-label {
  color: var(--color-brick);
  font-weight: 700;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-md);
  color: var(--color-ink);
}

.legend li {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Each Crop has its own colour, so a Stage's key shows two of them, in that Stage's strength. */
.swatch {
  --hue: 32;
  --hue-2: 300;
  width: 24px;
  height: 12px;
  background:
    linear-gradient(var(--tone), var(--tone)) left / 50% 100% no-repeat,
    linear-gradient(var(--tone-2), var(--tone-2)) right / 50% 100% no-repeat;
}

.swatch.preCulture {
  --tone: hsl(var(--hue) 45% 52% / 0.35);
  --tone-2: hsl(var(--hue-2) 45% 52% / 0.35);
}

.swatch.inBed {
  --tone: hsl(var(--hue) 45% 52%);
  --tone-2: hsl(var(--hue-2) 45% 52%);
}

.swatch.harvest {
  background: var(--color-accent);
}

.plan-note {
  flex-basis: 100%;
}

/* The chart sets the sheet's height; a busy month scrolls inside its own column. */
.tasks-panel {
  padding: var(--space-md) var(--space-lg);
  border-left: var(--rule-hair) solid var(--color-rule);
  overflow-y: auto;
  contain: size;
}

.tasks-panel h2 {
  font-size: var(--text-2xl);
}

.tasks-panel li + li {
  border-top: var(--rule-hair) solid var(--color-rule);
}

.tasks-panel ul {
  margin-top: var(--space-xs);
}

.task {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 56px;
  padding-block: var(--space-xs);
  cursor: pointer;
}

.task input {
  position: absolute;
  opacity: 0;
}

.box {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-card);
  transition: background-color var(--dur-micro) var(--ease-out);
}

.task:hover .box {
  background: var(--color-paper-3);
}

.box::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 8px;
  width: 7px;
  height: 14px;
  border: solid var(--color-accent-ink);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
}

.task input:checked ~ .box {
  background: var(--color-accent);
}

.task input:checked ~ .box::after {
  transform: rotate(45deg) scale(1);
  transition: transform var(--dur-short) var(--ease-out);
}

.task input:focus-visible ~ .box {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.task:active .box {
  transform: scale(0.97);
}

.words {
  display: grid;
  min-width: 0;
}

.title {
  font-size: var(--text-md);
  line-height: 1.3;
}

.task input:checked ~ .words .title {
  color: var(--color-muted);
  text-decoration: line-through;
}

.when {
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.empty,
.all-done {
  margin-top: var(--space-sm);
}

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

.all-done {
  font-weight: 700;
}

/* The year as a tear-off calendar: each leaf lands a little lower, so the last ones still show. */
.stop {
  padding-block: var(--space-2xl);
  background: var(--field);
  color: var(--field-ink);
}

.hero {
  padding-bottom: var(--space-xl);
}

.frost {
  --leaf: 0;
  --field: var(--color-sheet);
  --field-ink: var(--color-ink);
}

.sprout {
  --leaf: 1;
  --field: var(--color-paper-3);
  --field-ink: var(--color-ink);
}

.leaf {
  --leaf: 2;
  --field: var(--color-accent);
  --field-ink: var(--color-accent-ink);
}

.straw {
  --leaf: 3;
  --field: var(--color-paper-2);
  --field-ink: var(--color-ink);
}

.earth {
  --leaf: 4;
  --field: var(--color-earth);
  --field-ink: var(--color-accent-ink);
}

.stop-inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--gap-columns);
  align-items: center;
}

.stop-inner.wide {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.stop h2 {
  max-width: none;
  font-size: var(--text-section);
}

.month-name {
  display: block;
  font-size: clamp(4.5rem, min(11vw, 22dvh), 10rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.stop-title {
  display: block;
  max-width: 19ch;
  margin-top: var(--space-md);
  text-wrap: balance;
}

.wide .stop-title {
  max-width: 13ch;
}

.stop-text p {
  max-width: 54ch;
  margin-top: var(--space-md);
}

.stop-text h2 + p {
  margin-top: var(--space-lg);
}

.screens {
  justify-self: end;
  width: min(100%, (100dvh - 2 * var(--space-2xl)) * 0.5616);
  max-width: 26rem;
}

.screens.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-columns);
  width: min(100%, (100dvh - 2 * var(--space-2xl) - var(--space-xl)) * 1.17);
  max-width: 48rem;
}

.screens.two .screen:last-child {
  margin-top: var(--space-xl);
}

.screen {
  width: 100%;
  border-radius: 7.5% / 4.2%;
}

.more,
.close,
.foot {
  position: relative;
}

.more {
  padding-top: var(--section-gap);
  background: var(--color-paper);
}

.more-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gap-columns);
  align-items: center;
}

.extras li {
  padding-block: var(--space-lg);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.extras li:last-child {
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.extras p {
  margin-top: var(--space-2xs);
  color: var(--color-ink-2);
}

.catalogue {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-md);
}

.catalogue img {
  width: 100%;
}

.close {
  padding-top: var(--section-gap);
  background: var(--color-paper);
}

.close-inner {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: var(--gap-columns);
  align-items: end;
}

.close-words {
  padding-bottom: var(--space-3xl);
}

.close h2 {
  max-width: 18ch;
  font-size: var(--text-display);
}

.close .lead {
  max-width: 48ch;
}

/* He ends the page as he began it, standing on something. */
.gnome-close {
  position: relative;
  z-index: var(--z-raised);
  width: 100%;
  margin-bottom: calc(-1 * var(--space-sm));
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md) var(--space-xl);
  width: 100%;
  max-width: none;
  padding: var(--space-3xl) max(var(--gutter), (100% - var(--container)) / 2 + var(--gutter))
    var(--space-xl);
  background: var(--color-earth);
  color: var(--color-accent-ink);
}

.foot-mark {
  font: 400 var(--text-display) / 1 var(--font-display);
  letter-spacing: var(--tracking-display);
}

.foot nav {
  display: flex;
  gap: var(--space-lg);
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-accent-ink);
  font-weight: 400;
}

.foot a:focus-visible {
  outline-color: var(--color-accent-ink);
}

.lost main {
  display: grid;
  justify-items: center;
  gap: var(--space-sm);
  padding: var(--space-2xl) var(--space-md);
  text-align: center;
}

.gnome-lost {
  width: min(70vw, 320px);
}

.lost h1 {
  max-width: 20ch;
  font-size: var(--text-section);
}

/* Leaves stack only where a whole leaf fits on the screen. */
@media (min-width: 60rem) and (min-height: 44rem) {
  .hero {
    min-height: calc(100dvh - 64px);
  }

  .stop {
    position: sticky;
    top: calc(var(--leaf) * var(--space-xs));
    display: grid;
    align-items: center;
    min-height: 100dvh;
  }
}

@media (max-width: 68rem) {
  .board {
    grid-template-columns: minmax(0, 1fr);
  }

  .tasks-panel {
    border-top: var(--rule-hair) solid var(--color-rule);
    border-left: 0;
    overflow-y: visible;
    contain: none;
  }
}

@media (max-width: 60rem) {
  .stop-inner,
  .stop-inner.wide,
  .more-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xl);
  }

  .screens,
  .screens.two {
    justify-self: start;
    width: min(100%, 22rem);
  }

  .screens.two {
    width: 100%;
  }
}

@media (max-width: 40rem) {
  body {
    font-size: var(--text-md);
  }

  .headline-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .headline {
    padding-bottom: 0;
  }

  .gnome {
    justify-self: end;
    width: 6.5rem;
    margin-top: calc(-1 * var(--space-sm));
  }

  .lead {
    font-size: var(--text-md);
  }

  .chart {
    --label: 5.75rem;
    --row: 32px;
    padding: var(--space-sm);
  }

  .months {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--space-2xs);
    margin-bottom: var(--space-sm);
    margin-left: 0;
  }

  .months button {
    border-radius: var(--radius-card);
    background: var(--color-paper);
  }

  .axis {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    margin-left: var(--label);
    color: var(--color-muted);
    font-size: var(--text-xs);
    text-align: center;
  }

  .kw,
  .crop .icon {
    display: none;
  }

  .frost-label.lastFrost {
    padding-right: var(--space-2xs);
    padding-left: 0;
    transform: translateX(-100%);
  }

  .frost-labels {
    font-size: var(--text-xs);
  }

  .crop {
    font-size: var(--text-xs);
    white-space: normal;
  }

  .pins {
    display: flex;
    justify-content: space-between;
    height: auto;
    margin-top: var(--space-xs);
    margin-left: 0;
  }

  .pins a {
    position: static;
    align-items: center;
    height: 44px;
    padding-bottom: 0;
    transform: none;
  }

  .pins a::before {
    display: none;
  }

  .chart-foot {
    margin-left: 0;
  }

  .tasks-panel {
    padding: var(--space-md) var(--space-sm);
  }

  .screens.two {
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 22rem);
  }

  .screens.two .screen:last-child {
    margin-top: 0;
  }

  .catalogue {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: var(--space-xs);
  }

  .catalogue img:nth-child(n + 49) {
    display: none;
  }

  .close-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-lg);
  }

  .close-words {
    padding-bottom: 0;
  }

  .gnome-close {
    justify-self: end;
    width: min(62vw, 16rem);
  }
}
