/* Marker doodle look for the landing and site pages: Cabinet Grotesk, Apfel Grotezk, Commit Mono,
   the Marker palette in light and dark, and yellow day tape (#FCD604 with #090801 ink). */
@font-face {
  font-family: 'Cabinet Grotesk';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('fonts/CabinetGrotesk-Bold.otf') format('opentype');
}
@font-face {
  font-family: 'Cabinet Grotesk';
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url('fonts/CabinetGrotesk-Extrabold.otf') format('opentype');
}
@font-face {
  font-family: 'Apfel Grotezk';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('fonts/ApfelGrotezk-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'Apfel Grotezk';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('fonts/ApfelGrotezk-Mittel.otf') format('opentype');
}
@font-face {
  font-family: 'Apfel Grotezk';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('fonts/ApfelGrotezk-Fett.otf') format('opentype');
}
@font-face {
  font-family: 'Commit Mono';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('fonts/CommitMono-400-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'Commit Mono';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('fonts/CommitMono-700-Regular.otf') format('opentype');
}

:root {
  color-scheme: light dark;
  --font-display: 'Cabinet Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Apfel Grotezk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ticket: 'Commit Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --target: 44px;
  --radius: 14px;
  --measure: 1200px;
  --motion-tape: 180ms;
  --ease-tape: cubic-bezier(.3, 1.5, .55, 1);

  --steel: #FBF8F2;
  --well: #F1EBDF;
  --key-paper: #FFFDF8;
  --ink: #22201C;
  --ink-soft: #675F53;
  --action: #C0352A;
  --action-on-well: #C0352A;
  --on-action: #FFFAF2;
  --confirm: #2D64C3;
  --tape: #FCD604;
  --tape-ink: #090801;
  --art-paper: #FFFDF8;
  --art-ink: #22201C;
  --rule: #D8CFC0;
  --ticket-rule: #C2B8A6;
  --shadow-ink: #22201C;

  /* Compatibility tokens for privacy.html, support.html and pricing.html */
  --porcelain: var(--well);
  --ticket: var(--key-paper);
  --tomato: var(--action-on-well);
  --herb: var(--confirm);
  --on-tomato: var(--on-action);
}

@media (prefers-color-scheme: dark) {
  :root {
    --steel: #1B1A18;
    --well: #262420;
    --key-paper: #2B2925;
    --ink: #EFE9DE;
    --ink-soft: #B3AA9B;
    --action: #FF7A66;
    --action-on-well: #FF7A66;
    --on-action: #1B1A18;
    --confirm: #8AB4FF;
    --tape: #FCD604;
    --tape-ink: #090801;
    --art-paper: #FFFDF8;
    --art-ink: #22201C;
    --rule: #3D3933;
    --ticket-rule: #524D45;
    --shadow-ink: #090801;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--steel);
  color: var(--ink);
  font: 400 17px/1.5 var(--font-body);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--action-on-well);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--steel);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
}
.skip:focus-visible { top: 12px; }
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--rule);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  min-width: 44px;
  font: 800 20px/1 var(--font-display);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--art-paper);
  border: 2px solid var(--art-ink);
  padding: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.wordmark-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.top nav ul {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.8vw, 18px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.top nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 48px;
  padding: 0 10px;
  font: 700 16px/1 var(--font-display);
  text-decoration: none;
}
.top nav a:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .top nav .wide { display: none; }
}

/* Marker keys */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  min-width: 48px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--action);
  color: var(--on-action);
  border: 2px solid var(--ink);
  box-shadow: 0 3px 0 var(--shadow-ink);
  font: 800 17px/1 var(--font-display);
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn:hover {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--shadow-ink);
}
.btn:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--shadow-ink);
}
.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.btn-paper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  min-width: 48px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--key-paper);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: 0 2px 0 var(--shadow-ink);
  font: 700 16px/1 var(--font-display);
  text-decoration: none;
}
.btn-paper:hover { background: var(--well); }

/* Yellow day tape: #FCD604 surface with #090801 ink */
.tape {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 8px 2px;
  background: var(--tape);
  color: var(--tape-ink);
  border: 1.5px solid var(--tape-ink);
  border-radius: 4px;
  box-shadow: 2px 2px 0 rgb(9 8 1 / 0.24);
  font: 800 12.5px/1.15 var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: rotate(var(--tilt, -1.2deg));
}
.tape > span {
  color: var(--tape-ink);
  display: inline-block;
}

@keyframes slap {
  0% { opacity: 0; transform: translateY(-10px) rotate(var(--tilt, -1.5deg)) scale(1.18); }
  55% { opacity: 1; transform: translateY(0) rotate(var(--tilt, -1.5deg)) scale(.96); }
  100% { opacity: 1; transform: translateY(0) rotate(var(--tilt, -1.5deg)) scale(1); }
}
.js .slap { opacity: 0; }
.js .slap.in { animation: slap var(--motion-tape) var(--ease-tape) both; }
@media (prefers-reduced-motion: reduce) {
  .js .slap { opacity: 1; }
  .js .slap.in { animation: none; }
  .btn:hover, .btn:active { transform: none; filter: brightness(0.92); }
  html { scroll-behavior: auto; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Round Ziggy badge: warm paper surround in light and dark, with clear margin on every side */
.ziggy-badge {
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  background: var(--art-paper);
  border: 2.5px solid var(--art-ink);
  box-shadow: 0 3px 0 var(--shadow-ink);
  padding: 15%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
}
.ziggy-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Doodle & Ziggy mood frame: warm paper surround in light and dark */
.doodle-frame {
  margin: 0;
  width: 96px;
  height: 96px;
  padding: 12px;
  border-radius: 18px;
  background: var(--art-paper);
  border: 2px solid var(--art-ink);
  box-shadow: 0 3px 0 var(--shadow-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.doodle-frame.round {
  border-radius: 50%;
  padding: 14px;
}
.doodle-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* First screen: Hero + Hard Example + Single Drawn Week Strip */
.hero {
  padding-top: 12px;
  padding-bottom: 20px;
}
.hero-top {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.hero-copy h1 {
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 0.98;
  margin-bottom: 8px;
}
.hero-copy h1 > span {
  display: block;
}
.hero-copy .lead {
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 48ch;
  margin-bottom: 12px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* First-screen hard example with large Ziggy */
.hero-example {
  background: var(--key-paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 3px 0 var(--shadow-ink);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.hero-example .ziggy-hero {
  width: 82px;
  height: 82px;
}
.hero-example .who {
  display: block;
  color: var(--ink-soft);
  font: 700 11.5px/1.25 var(--font-ticket);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.hero-example .said {
  display: block;
  font: 700 14.5px/1.32 var(--font-body);
  color: var(--ink);
  margin-bottom: 8px;
}
.hero-example .reply-tape {
  margin: 0 0 6px;
}
.hero-example .reply {
  display: block;
  font: 400 14px/1.38 var(--font-body);
  color: var(--ink);
}

@media (min-width: 1024px) {
  .hero {
    padding-top: 18px;
    padding-bottom: 28px;
  }
  .hero-top {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 28px;
    align-items: center;
    margin-bottom: 18px;
  }
  .hero-example {
    padding: 16px 18px;
    gap: 16px;
  }
  .hero-example .ziggy-hero {
    width: 118px;
    height: 118px;
  }
  .hero-example .said {
    font-size: 15.5px;
  }
  .hero-example .reply {
    font-size: 14.5px;
  }
}

/* Single Drawn Week Strip: one continuous drawn strip with yellow tape labels on one ruled line (700 px and wider) */
.week-strip {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0 10px;
  background: var(--key-paper);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--shadow-ink);
  position: relative;
}

@media (min-width: 700px) {
  .week-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.65fr) minmax(0, 1fr);
    align-items: stretch;
  }
  /* Continuous horizontal ruled line across the week strip */
  .week-strip::before {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    top: 28px;
    height: 2px;
    background: var(--ink);
  }
  .week-cell {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 8px;
    padding: 14px 12px 14px;
    border-right: 1px dashed var(--ticket-rule);
  }
  .week-cell:last-child {
    border-right: 0;
  }
  .week-cell .tape {
    justify-self: start;
    z-index: 1;
  }
  .week-cell .cell-body {
    min-width: 0;
  }
  .week-cell .cell-title {
    display: block;
    font: 800 17px/1.2 var(--font-display);
    color: var(--ink);
    margin: 4px 0 3px;
  }
  .week-cell .cell-line {
    display: block;
    font: 400 14px/1.35 var(--font-body);
    color: var(--ink-soft);
  }
  /* Give Friday the visual weight on the strip */
  .week-cell.friday {
    background: var(--well);
    margin: -4px 4px;
    padding: 14px 16px;
    border: 2px solid var(--ink);
    border-top: 5px solid var(--action);
    border-radius: 12px;
    box-shadow: 0 3px 0 var(--shadow-ink);
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
  }
  .week-cell.friday .tape {
    grid-column: 1 / -1;
  }
  .week-cell.friday .ziggy-badge {
    width: 72px;
    height: 72px;
  }
}

/* One column of unboxed day sections along the week's ruled line + full-width Friday feature */
.daybook {
  position: relative;
  padding-top: 12px;
  padding-bottom: 44px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.daybook::before {
  content: "";
  position: absolute;
  left: calc(var(--gutter) + 5px);
  top: 24px;
  bottom: 48px;
  width: 2px;
  background: var(--ink);
}

.day-entry {
  position: relative;
  background: transparent;
  border: 0;
  border-bottom: 1.5px dashed var(--rule);
  border-radius: 0;
  box-shadow: none;
  padding: 24px 0 24px 26px;
  display: grid;
  gap: 16px;
}
.day-entry:last-child {
  border-bottom: 0;
}
.day-entry::before {
  content: "";
  position: absolute;
  left: 0;
  top: 30px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tape);
  border: 2px solid var(--ink);
}
@media (min-width: 900px) {
  .day-entry:not(.friday-feature) {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 32px;
    align-items: start;
    padding: 28px 0 28px 34px;
  }
  .day-entry::before {
    top: 34px;
  }
}
.day-rail {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 16px;
  align-items: start;
}
.day-rail-copy {
  min-width: 0;
}
.day-rail .tape {
  margin-bottom: 8px;
}
.day-entry h2 {
  font-size: clamp(24px, 2.8vw, 32px);
  margin-bottom: 6px;
}
.sub, .day-line {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.45;
  max-width: 52ch;
}

/* Full-width Friday centerpiece section */
.day-entry.friday-feature {
  background: var(--well);
  border: 2.5px solid var(--ink);
  border-top: 6px solid var(--action);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--shadow-ink);
  margin: 12px 0;
  padding: clamp(20px, 3.2vw, 34px);
  gap: 24px;
}
.day-entry.friday-feature::before {
  display: none;
}
.friday-feature h2 {
  font-size: clamp(30px, 4vw, 44px);
}
.friday-feature .doodle-frame.round {
  width: 116px;
  height: 116px;
}
.friday-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 900px) {
  .friday-grid {
    grid-template-columns: 1.08fr 0.92fr;
    gap: 28px;
    align-items: stretch;
  }
}

/* Marker Kitchen Ledger inner sheets */
.ticket, .ledger-card {
  background: var(--key-paper);
  border: 1.5px solid var(--ink);
  box-shadow: 0 3px 0 var(--shadow-ink);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--ink);
}
.friday-feature .ticket {
  background: var(--key-paper);
  border: 2px solid var(--ink);
  box-shadow: 0 3px 0 var(--shadow-ink);
  padding: 18px 20px;
}
.ticket-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 12px;
  font: 700 12.5px/1.3 var(--font-ticket);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ticket-sub {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font: 400 12.5px/1.35 var(--font-ticket);
}
.ticket hr, .ledger-card hr {
  border: 0;
  border-top: 1.5px dashed var(--ticket-rule);
  margin: 10px 0;
}
.ticket-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  font: 400 14px/1.5 var(--font-ticket);
}
.ticket-lines li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 10px;
  padding: 5px 0;
  border-bottom: 1px solid var(--rule);
}
.ticket-lines li:last-child {
  border-bottom: 0;
}
.ticket-lines .name {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15.5px;
  color: var(--ink);
}
.ticket-lines .qty {
  text-align: right;
  font-family: var(--font-ticket);
  font-weight: 700;
  color: var(--ink);
}
.ticket-lines .qty small {
  font-size: 12.5px;
  color: var(--ink-soft);
  font-weight: 400;
}

/* Keep Thursday grocery haul rows aligned on one single row at 390px */
.haul .ticket-lines li {
  flex-wrap: nowrap;
}
.haul-row-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
  flex: none;
}

.plan-lines li {
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: baseline;
  gap: 12px;
}
.plan-lines .qty {
  flex: none;
  width: 9ch;
  text-align: left;
  color: var(--ink-soft);
  font-weight: 700;
}

/* Sous chef exchange */
.chat .who {
  display: block;
  color: var(--ink-soft);
  font: 700 12px/1.3 var(--font-ticket);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.chat .said {
  display: block;
  font: 700 16px/1.38 var(--font-body);
  color: var(--ink);
}
.chat .reply-tape {
  margin: 4px 0 8px;
}
.chat .reply {
  display: block;
  font: 400 15.5px/1.48 var(--font-body);
  color: var(--ink);
}
.recipe-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 5px 10px;
  background: var(--well);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  font: 700 13px/1.2 var(--font-ticket);
  color: var(--ink);
}

.privacy {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1.5px dashed var(--ticket-rule);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.42;
}
.privacy svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--confirm);
}
.privacy strong {
  color: var(--ink);
  font-weight: 700;
}

/* Closing Beta & Footer */
.beta {
  background: var(--well);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.beta .wrap {
  padding-top: 52px;
  padding-bottom: 52px;
  display: grid;
  gap: 24px;
  align-items: center;
}
@media (min-width: 860px) {
  .beta .wrap {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
  }
}
.beta h2 {
  font-size: clamp(30px, 4.4vw, 48px);
  margin: 8px 0 10px;
}
.beta-facts {
  background: var(--key-paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--shadow-ink);
  padding: 18px 20px;
  display: grid;
  gap: 12px;
}
.beta-address {
  display: inline-block;
  padding: 6px 10px;
  background: var(--well);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  font: 700 15px/1.3 var(--font-ticket);
  color: var(--ink);
  user-select: all;
}
.beta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 20px;
  padding-bottom: 32px;
  color: var(--ink-soft);
  font-size: 15px;
}
.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.foot a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 48px;
  padding: 0 8px;
  font: 700 15px/1 var(--font-display);
  color: var(--ink-soft);
  text-decoration: none;
}
.foot a:hover {
  color: var(--ink);
  text-decoration: underline;
}

@media (max-width: 379px) {
  .doodle-frame, .friday-feature .doodle-frame.round {
    width: 76px;
    height: 76px;
    padding: 10px;
  }
  .hero-example {
    grid-template-columns: 1fr;
  }
  .day-entry.friday-feature, .ticket, .ledger-card, .beta-facts {
    padding: 14px 12px;
  }
}

@media (forced-colors: active) {
  .btn, .btn-paper, .tape, .ticket, .ledger-card, .week-strip, .day-entry.friday-feature {
    border: 2px solid ButtonText;
    box-shadow: none;
  }
}
