/* Crumb & Crust -- one stylesheet, written by hand. */

:root {
  --paper: #f8f2e4;
  --ink: #3a2415;
  --soft: #7a5f49;
  --mustard: #c4921a;
  --rule: #d9cbb0;
  --wash: #f0e6cf;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1e1610;
    --ink: #ecdfc9;
    --soft: #b39c82;
    --mustard: #e2b33c;
    --rule: #4a392a;
    --wash: #2a1f16;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  line-height: 1.75;
}

.column {
  max-width: 38rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

/* masthead */

.masthead { text-align: center; }

.mark { display: inline-block; line-height: 0; }

.masthead .title {
  margin: 0.4rem 0 0;
  font-size: 3rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.masthead .title a { color: inherit; text-decoration: none; }

.strap {
  margin: 0.3rem 0 1.4rem;
  color: var(--soft);
  font-style: italic;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0.55rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: center;
  gap: 2.2rem;
}

nav a {
  font-variant: small-caps;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--ink);
  padding-bottom: 0.1rem;
}

nav a:hover,
nav a[aria-current="page"] { border-bottom: 2px solid var(--mustard); }

/* text */

main { margin-top: 2.4rem; }

h1 {
  font-size: 1.9rem;
  line-height: 1.2;
  font-weight: normal;
  margin: 0.2rem 0 1.2rem;
}

.label {
  font-size: 0.95rem;
  font-weight: normal;
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.14em;
  color: var(--soft);
  margin: 2.2rem 0 0.7rem;
}

article > .label:first-child { margin-top: 0; margin-bottom: 0; }

h2.label::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  margin-top: 0.35rem;
  background: var(--mustard);
}

p { margin: 0 0 1.1rem; }

.lede { font-size: 1.12rem; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--mustard);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

a:hover { color: var(--mustard); }

a:focus-visible { outline: 2px solid var(--mustard); outline-offset: 3px; }

/* list of bakes */

.bakes { list-style: none; margin: 0; padding: 0; }

.bakes li {
  padding: 0.9rem 0;
  border-bottom: 1px dotted var(--rule);
}

.bakes a { font-size: 1.2rem; }

.bakes .when {
  display: block;
  font-size: 0.85rem;
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.1em;
  color: var(--soft);
}

.bakes .note { display: block; }

.plain { padding-left: 1.2rem; }
.plain li { margin-bottom: 0.6rem; }
.plain li::marker { color: var(--mustard); }

/* baker's percentages */

.percent {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4rem;
  font-variant-numeric: tabular-nums;
}

.percent th,
.percent td {
  padding: 0.4rem 0.6rem;
  text-align: right;
  border-bottom: 1px solid var(--rule);
}

.percent th:first-child { text-align: left; padding-left: 0; }

.percent thead th {
  font-weight: normal;
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.1em;
  color: var(--soft);
  border-bottom: 2px solid var(--mustard);
}

.percent tbody th { font-weight: normal; }

.percent tbody tr:first-child { background: var(--wash); }
.percent tbody tr:first-child th { padding-left: 0.6rem; }

/* timeline */

.timeline {
  list-style: none;
  counter-reset: step;
  margin: 0 0 1.4rem;
  padding: 0;
  border-left: 2px solid var(--rule);
}

.timeline li {
  counter-increment: step;
  position: relative;
  padding: 0.3rem 0 0.3rem 2.4rem;
  margin-left: 0.2rem;
}

.timeline li::before {
  content: counter(step);
  position: absolute;
  left: -1.05rem;
  top: 0.4rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--mustard);
  color: var(--paper);
  font-size: 0.85rem;
  line-height: 1.6rem;
  text-align: center;
}

.timeline b { font-weight: normal; font-variant-numeric: tabular-nums; color: var(--soft); }

.back { margin-top: 2.2rem; }

.lost { text-align: center; padding: 1.5rem 0; }

footer {
  margin-top: 3.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--soft);
  text-align: center;
}

@media (max-width: 30rem) {
  .masthead .title { font-size: 2.3rem; }
  nav ul { gap: 1.4rem; }
  .percent th, .percent td { padding: 0.4rem 0.3rem; }
}
