/* Forkcast — fingerprint: estate_design_registry "forkcast.olijammedia.co.uk"
   (fridge-door planner, till-receipt shopping list, Antonio + Literata + Courier Prime, tomato accent). */
:root {
  --door: #F6F5F1;
  --door-edge: #E2DFD6;
  --card: #FFFFFF;
  --ink: #1F1E1C;
  --ink-soft: #57534C;
  --tomato: #D8432B;
  --tomato-deep: #A92F1C;
  --basil: #2E6B3F;
  --butter: #F3C34A;
  --receipt: #FFFEFA;
  --display: "Antonio", "Arial Narrow", sans-serif;
  --body: "Literata", Georgia, serif;
  --mono: "Courier Prime", "Courier New", monospace;
  --r: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--door); color: var(--ink); font: 17px/1.6 var(--body); font-variant-numeric: lining-nums tabular-nums; }
a { color: var(--tomato-deep); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1.02; margin: 0 0 .35em; }
h1 { font-size: clamp(2.8rem, 8vw, 5.4rem); }
h2 { font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--tomato); outline-offset: 2px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 18px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 10px; top: 10px; background: #fff; padding: 8px; z-index: 9; }

.top { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand span { font: 700 1.9rem/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.top nav { display: flex; gap: 16px; align-items: center; }
.top nav a { color: var(--ink); font-weight: 600; text-decoration: none; }
@media (max-width: 640px) { .top nav a:not(.btn) { display: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px;
  border: 2px solid var(--tomato); background: var(--tomato); color: #fff; font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--tomato-deep); border-color: var(--tomato-deep); color: #fff; }
.btn.ghost { background: transparent; color: var(--tomato-deep); }
.btn.ghost:hover { background: #fff; color: var(--tomato-deep); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: progress; }

/* the fridge door: day cards pinned by magnets */
.door { background: linear-gradient(#fff0, #fff0), var(--door); border: 1px solid var(--door-edge); border-radius: 18px;
  box-shadow: inset 0 0 0 10px #fbfaf7, 0 30px 60px -40px rgba(30, 28, 25, .5); padding: 30px; position: relative; }
.door::after { content: ""; position: absolute; right: -9px; top: 26%; width: 14px; height: 140px; border-radius: 7px; background: #d9d6cd; box-shadow: inset -3px 0 0 #c9c5ba; }
.week { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 16px; }
.day { position: relative; background: var(--card); border: 1px solid var(--door-edge); border-radius: 4px; padding: 22px 14px 14px; min-height: 150px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .04), 0 10px 20px -16px rgba(30, 28, 25, .6); display: flex; flex-direction: column; }
.day:nth-child(odd) { transform: rotate(-.6deg); } .day:nth-child(even) { transform: rotate(.5deg); }
.magnet { position: absolute; top: -10px; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6 0 18%, transparent 20%), var(--butter); box-shadow: 0 3px 4px rgba(0, 0, 0, .25); }
.day:nth-child(3n+2) .magnet { background: radial-gradient(circle at 35% 30%, #fff6 0 18%, transparent 20%), var(--tomato); }
.day:nth-child(3n) .magnet { background: radial-gradient(circle at 35% 30%, #fff6 0 18%, transparent 20%), var(--basil); }
@media (prefers-reduced-motion: no-preference) { .day.drop .magnet { animation: magnet .5s cubic-bezier(.2, 1.4, .4, 1) both; } }
@keyframes magnet { from { transform: translateY(-26px) scale(1.3); opacity: 0; } }
.day .dname { font: 700 .82rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.day .meal { font: 600 1.05rem/1.25 var(--body); margin-bottom: 6px; }
.day .meta { font-size: .82rem; color: var(--ink-soft); margin-top: auto; }
.day .acts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.day .acts button { border: 1px solid var(--door-edge); background: var(--door); border-radius: 999px; padding: 6px 12px; font: 600 .82rem var(--body); cursor: pointer; color: var(--ink); }
.day .acts button:hover { border-color: var(--tomato); color: var(--tomato-deep); }

/* the receipt */
.receipt { background: var(--receipt); font-family: var(--mono); font-size: .95rem; line-height: 1.5; padding: 26px 22px 34px; position: relative;
  box-shadow: 0 16px 28px -22px rgba(30, 28, 25, .7); max-width: 440px;
  -webkit-mask: linear-gradient(#000 0 0) top/100% calc(100% - 12px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/16px 12px repeat-x;
  mask: linear-gradient(#000 0 0) top/100% calc(100% - 12px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/16px 12px repeat-x; }
.receipt h3 { font-family: var(--mono); text-transform: none; font-size: 1.15rem; text-align: center; letter-spacing: .08em; margin-bottom: 4px; }
.receipt .sub { text-align: center; color: var(--ink-soft); font-size: .82rem; margin-bottom: 14px; }
.receipt .aisle { margin: 14px 0 4px; font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .1em; border-bottom: 1px dashed #bbb; }
.receipt label.item { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: baseline; padding: 4px 0; cursor: pointer; }
.receipt label.item input { width: 18px; height: 18px; accent-color: var(--basil); margin: 0; transform: translateY(3px); }
.receipt .item .what { min-width: 0; }
.receipt .item .qty { display: block; color: var(--ink-soft); font-size: .82rem; }
.receipt .item.done .what { text-decoration: line-through; color: #999; }
.receipt .total { display: flex; justify-content: space-between; border-top: 2px solid var(--ink); margin-top: 14px; padding-top: 8px; font-weight: 700; font-size: 1.1rem; }
.receipt .ok { color: var(--basil); } .receipt .over { color: var(--tomato-deep); }
.receipt .small { font-size: .78rem; color: var(--ink-soft); margin-top: 10px; }

.board { display: grid; grid-template-columns: 1fr 400px; gap: 30px; align-items: start; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } .receipt { max-width: none; } }

/* hero */
.hero { display: grid; grid-template-columns: .9fr 1.1fr; gap: 34px; align-items: center; padding: 20px 0 60px; }
.hero .lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 36ch; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 12px; }
.hero .door { padding: 22px; }
.hero .week { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.hero .day { min-height: 118px; padding: 18px 10px 10px; }
.hero .day .meal { font-size: .92rem; }
.hero-board { position: relative; padding-bottom: 40px; }
.receipt.mini { position: absolute; right: -6px; bottom: -10px; width: 250px; padding: 16px 16px 26px; font-size: .78rem; transform: rotate(2.5deg); z-index: 2; }
.receipt.mini h3 { font-size: .9rem; margin-bottom: 8px; }
.receipt.mini .mrow { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dotted #ccc; padding: 2px 0; }
.receipt.mini .mrow.more { color: var(--ink-soft); border: 0; }
.receipt.mini .total { font-size: .95rem; margin-top: 6px; }
#sample-cap { max-width: calc(100% - 270px); }
@media (max-width: 860px) { #sample-cap { max-width: none; } }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } .receipt.mini { position: relative; right: auto; bottom: auto; margin: -24px 0 0 auto; } }
.fine { font-size: .9rem; color: var(--ink-soft); }

.band { padding: 60px 0; } .band.white { background: #fff; border-block: 1px solid var(--door-edge); }
.kicker { font: 700 .85rem/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--tomato-deep); margin-bottom: 12px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 24px; counter-reset: s; }
.steps li { list-style: none; background: var(--door); border-radius: var(--r); padding: 22px; position: relative; }
.steps .ill { width: 120px; height: 80px; display: block; margin-bottom: 10px; }
.steps li::before { counter-increment: s; content: counter(s); font: 700 2.6rem/1 var(--display); color: var(--tomato); display: block; margin-bottom: 8px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* planner form */
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; align-items: end; background: #fff; border: 1px solid var(--door-edge);
  border-radius: var(--r); padding: 20px; margin: 10px 0 30px; }
.controls label { font: 700 .8rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .1em; display: block; margin-bottom: 6px; }
.controls select, .controls input { width: 100%; font: 1rem var(--body); padding: 10px 12px; border: 2px solid var(--door-edge); border-radius: 8px; background: var(--door); color: var(--ink); }
.stepper { display: flex; align-items: center; border: 2px solid var(--door-edge); border-radius: 8px; background: var(--door); }
.stepper button { width: 44px; height: 44px; border: 0; background: none; font: 700 1.3rem var(--body); cursor: pointer; color: var(--tomato-deep); }
.stepper output { flex: 1; text-align: center; font-weight: 600; }
.summary { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: baseline; margin: -10px 0 20px; }
.summary b { font: 700 1.6rem/1 var(--display); }
.note { font-size: .9rem; color: var(--ink-soft); }
.err { color: var(--tomato-deep); font-weight: 600; }

dialog { border: 0; border-radius: 14px; padding: 26px; max-width: 620px; width: calc(100% - 24px); background: #fff; }
dialog::backdrop { background: rgba(31, 30, 28, .55); }
dialog ul, dialog ol { padding-left: 1.2em; } dialog li { margin-bottom: 6px; }

.doc { max-width: 760px; margin: 10px auto 60px; background: #fff; padding: 40px clamp(20px, 5vw, 56px); border-radius: var(--r); border: 1px solid var(--door-edge); }
.doc h2 { font-size: 1.7rem; margin-top: 1.3em; }
.foot { padding: 34px 0 60px; color: var(--ink-soft); font-size: .9rem; } .foot a { color: var(--ink-soft); }
.foot .links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 8px; }
@media print { .top, .controls, .day .acts, .foot, .noprint { display: none !important; } body { background: #fff; } .door { box-shadow: none; border: 0; padding: 0; } .receipt { -webkit-mask: none; mask: none; box-shadow: none; } }

[hidden] { display: none !important; }
