/* Public styles (PLACEHOLDER look until Marc picks the design) + shared form/button basics used by the admin
   and account pages too. Self-hosted fonts, no inline styles anywhere (strict CSP). Warm writing-paper tones. */
@font-face { font-family: 'Garamond'; src: url('/fonts/serif.woff2') format('woff2'); font-weight: 400 800; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Garamond'; src: url('/fonts/serif-ext.woff2') format('woff2'); font-weight: 400 800; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Garamond'; src: url('/fonts/serif-italic.woff2') format('woff2'); font-weight: 400 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('/fonts/ui-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('/fonts/ui-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Hand'; src: url('/fonts/hand.woff2') format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Hand'; src: url('/fonts/hand-ext.woff2') format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #F3EADB; --paper: #FFFCF5; --ink: #2B2620; --ink-2: #4A4136; --muted: #6F6353;
  --line: #E1D5C1; --line-2: #EFE6D6;
  --accent: #9E2B25; --accent-dark: #7E211C; --accent-tint: #F5E1DD; --accent-ink: #FFFFFF;
  --ok: #2F6B45; --ok-tint: #E2F0E6; --warn: #8A5300; --warn-tint: #FBEED3; --bad: #A33A12; --bad-tint: #FBE5D8;
  --ink-blue: #1F3A68;
  --shadow: 0 1px 2px rgba(60,40,20,.08), 0 10px 26px rgba(60,40,20,.10);
  --radius: 10px;
  --f-body: 'Garamond', 'EB Garamond', Georgia, 'Times New Roman', serif;
  --f-ui: 'Atkinson', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-hand: 'Hand', 'Segoe Print', 'Bradley Hand', cursive;
  --f-type: var(--f-ui);
  --f-mono: ui-monospace, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.6; }
img, svg { max-width: 100%; }
a { color: var(--accent-dark); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
h2 { font-size: 1.3rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
code { font-family: var(--f-mono); font-size: .9em; background: var(--line-2); padding: .05em .35em; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.fine { font-size: .86rem; color: var(--muted); font-family: var(--f-ui); }
.eyebrow { font-family: var(--f-ui); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-dark); margin: 0 0 .5rem; }
.lede { font-size: 1.18rem; color: var(--ink-2); max-width: 42rem; }
.stack { display: flex; flex-direction: column; gap: .9rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- buttons, chips, messages */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; white-space: nowrap; min-height: 44px; padding: 0 1.05rem; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: 600 .97rem var(--f-ui); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn.small { min-height: 38px; padding: 0 .85rem; font-size: .9rem; }
.btn.block { width: 100%; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.danger:hover { background: var(--bad); color: #fff; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-dark); text-decoration: underline; cursor: pointer; }
.ic { flex: none; }
.chip { display: inline-block; font: 700 .74rem var(--f-ui); letter-spacing: .03em; padding: .14rem .55rem; border-radius: 999px; background: var(--line-2); color: var(--ink-2); vertical-align: middle; }
.chip.ok { background: var(--ok-tint); color: var(--ok); }
.chip.warn { background: var(--warn-tint); color: var(--warn); }
.chip.bad { background: var(--bad-tint); color: var(--bad); }
.form-err, .form-ok, .notice { border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1rem; font-family: var(--f-ui); font-size: .95rem; }
.form-err { background: var(--bad-tint); color: var(--bad); border: 1px solid currentColor; }
.form-ok { background: var(--ok-tint); color: var(--ok); border: 1px solid currentColor; }
.notice { background: var(--line-2); color: var(--ink-2); }
.draft { display: inline-block; font: 700 .8rem var(--f-ui); color: var(--warn); background: var(--warn-tint); border-radius: 6px; padding: .2rem .6rem; }

/* ---------- form fields */
.field { display: flex; flex-direction: column; gap: .35rem; font-family: var(--f-ui); }
.field > span { font-weight: 700; font-size: .93rem; }
.field small { color: var(--muted); font-size: .84rem; }
.field input, .field textarea, .field select { font: 1rem var(--f-ui); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; padding: .65rem .75rem; min-height: 44px; width: 100%; }
.field textarea { min-height: 8rem; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); outline: none; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-family: var(--f-ui); }
.check input { width: 20px; height: 20px; margin-top: .15rem; }

/* ---------- header and footer */
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand .mark { color: var(--accent); }
.brand .logo { display: block; height: 44px; width: auto; color: var(--ink); }
.foot .brand .logo { height: 40px; }
@media (max-width: 640px) { .brand .logo { height: 40px; } }
.top-a { display: flex; align-items: center; gap: .5rem; }
.top-nav { display: flex; gap: .2rem; }
.top-nav a { font: 600 .93rem var(--f-ui); color: var(--ink-2); text-decoration: none; padding: .5rem .6rem; border-radius: 8px; }
.top-nav a:hover, .top-nav a.on { color: var(--ink); background: var(--line-2); }
@media (max-width: 760px) { .top-nav { display: none; } }
.nudge { background: var(--warn-tint); color: var(--ink); font: .92rem var(--f-ui); padding: .6rem 0; }
.foot { margin-top: 4rem; border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; font-family: var(--f-ui); }
.foot-in { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.foot-links a { color: var(--ink-2); }
main { min-height: 50vh; }

/* ---------- account pages */
.auth-wrap { padding: 2.5rem 16px; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 440px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.6rem; }
.acct { padding: 2rem 16px; }
.acct-head { margin-bottom: 1rem; }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1rem; align-items: start; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; }
.panel h2 { font-size: 1.1rem; }
.danger-zone { border-color: var(--bad); }
.thumbs { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- placeholder public pages */
.page-head { padding-top: 2.2rem; padding-bottom: 1.2rem; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.3rem); font-weight: 500; }
.hero .eyebrow { font-family: var(--f-hand); font-size: 1.5rem; letter-spacing: 0; text-transform: none; color: var(--ink-blue); }
.btnrow { display: flex; flex-wrap: wrap; gap: .6rem; }
.placeholder-note { font: .9rem var(--f-ui); border: 1px dashed var(--line); color: var(--muted); border-radius: var(--radius); padding: .7rem 1rem; margin: 0 0 1.5rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 1rem; }
.card { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 1.1rem 1.1rem 1rem; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.card:hover { border-color: var(--accent); color: var(--ink); }
.card b { display: block; font-size: 1.25rem; font-weight: 600; margin-bottom: .3rem; }
.card span { font: .95rem/1.45 var(--f-ui); color: var(--ink-2); }
.prose { max-width: 44rem; }
.prose h2 { margin-top: 1.6em; }
.tab-nav { display: none; gap: .2rem; overflow-x: auto; padding-bottom: .5rem; }
.tab-nav a { font: 700 .88rem var(--f-ui); color: var(--ink-2); text-decoration: none; padding: .45rem .65rem; border-radius: 8px; white-space: nowrap; }
.tab-nav a.on { background: var(--line-2); color: var(--ink); }
@media (max-width: 760px) { .tab-nav { display: flex; } }

/* ---------- ads (copied from How's the Food). Always labelled. */
.ad-slot { margin: 1.2rem 0; display: grid; gap: .8rem; }
.ad-slot.strip { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.ad { position: relative; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ad-house { border-style: dashed; }
.ad-label { position: absolute; top: .45rem; right: .55rem; font: 700 .66rem var(--f-ui); letter-spacing: .08em; text-transform: uppercase; background: var(--bg); color: var(--muted); padding: .1rem .4rem; border-radius: 5px; z-index: 1; }
.ad a, .ad > div { display: flex; gap: .8rem; align-items: center; padding: .9rem 1rem; text-decoration: none; color: var(--ink); }
.ad.has-img a, .ad.has-img > div { flex-direction: column; align-items: stretch; padding: 0 0 .9rem; }
.ad img { display: block; width: 100%; object-fit: cover; max-height: 260px; }
.ad-text { display: flex; flex-direction: column; gap: .2rem; padding-right: 3.5rem; font-family: var(--f-ui); }
.ad.has-img .ad-text { padding: 0 1rem; }
.ad-text b { font-family: var(--f-body); font-size: 1.15rem; }
.ad-cta { font-weight: 700; color: var(--accent); display: inline-flex; align-items: center; gap: .2rem; }
