@font-face { font-family: "Cormorant"; src: url(/fonts/CormorantGaramond-VF.ttf) format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Jost"; src: url(/fonts/Jost-VF.ttf) format("truetype"); font-weight: 100 900; font-display: swap; }

/* Same palette, type and shapes as neeve.com.au (neeve-site/src/assets/css/site.css). */
:root {
  --bg: #f6f2ea; --card: #fffdf9; --sunk: #ece6da; --hair: #d9d2c3;
  --ink: #2b2a26; --ink-2: #4a4740; --muted: #6f6b62;
  --accent: #2f4a3a; --accent-2: #3f6150; --accent-soft: #e3e8dd;
  --sage: #3f6150; --sage-soft: #e3e8dd; --clay-warm: #c8a68a;
  --gold: #8a6a2c; --gold-soft: #f3ead6; --bad: #9b3b2f; --bad-soft: #f5dfd9;
  --on-accent: #fff; --shadow: 0 1px 2px rgba(43, 42, 38, .04), 0 8px 30px rgba(43, 42, 38, .06);
  --radius: 14px; --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171a17; --card: #20241f; --sunk: #2a2f29; --hair: #3a4038; --ink: #eeebe3; --ink-2: #d2cec4; --muted: #a29e94;
    --accent: #9fc0aa; --accent-2: #b6d1bf; --accent-soft: #263129; --sage: #9fc0aa; --sage-soft: #263129; --clay-warm: #c8a68a;
    --gold: #d6b66e; --gold-soft: #342c18; --bad: #ec8b7d; --bad-soft: #3b2420; --on-accent: #142019; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #171a17; --card: #20241f; --sunk: #2a2f29; --hair: #3a4038; --ink: #eeebe3; --ink-2: #d2cec4; --muted: #a29e94;
  --accent: #9fc0aa; --accent-2: #b6d1bf; --accent-soft: #263129; --sage: #9fc0aa; --sage-soft: #263129; --clay-warm: #c8a68a;
  --gold: #d6b66e; --gold-soft: #342c18; --bad: #ec8b7d; --bad-soft: #3b2420; --on-accent: #142019; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.45 "Jost", -apple-system, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: "Cormorant", Georgia, serif; font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: -.005em; }
h1 { font-size: 34px; } h2 { font-size: 28px; } h3 { font-size: 22px; }
p { margin: 0; }
.muted { color: var(--muted); } .small { font-size: 14px; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- controls: everything 48px+ to hit standing at the bench ---------- */
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--hair); border-radius: 12px; background: var(--card);
  font-size: 17px; /* 16+ stops iOS zooming in */
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sage); outline-offset: 1px; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); font-weight: 500; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--hair); background: var(--card); font-weight: 500; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); letter-spacing: .03em; }
.btn.primary:active { background: var(--accent-2); }
.btn.sage { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn:not(.primary):not(.ghost) { border-color: #d9d2c3; }
.btn.danger { color: var(--bad); }
.btn.big { min-height: 56px; font-size: 18px; width: 100%; }
.btn:disabled { opacity: .5; }
.icon-btn { width: 48px; height: 48px; display: inline-grid; place-items: center; border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hair); background: var(--card); white-space: nowrap; cursor: pointer; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tag { white-space: nowrap; display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--sunk); color: var(--ink-2); }
.tag.successful, .tag.done { background: var(--sage-soft); color: var(--sage); }
.tag.testing, .tag.in_progress { background: var(--gold-soft); color: var(--gold); }
.tag.failed, .tag.discarded { background: var(--bad-soft); color: var(--bad); }
.tag.idea { background: var(--accent-soft); color: var(--accent); }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(420px, 100%); display: grid; gap: 16px; background: var(--card); padding: 32px 24px; border-radius: 24px; box-shadow: var(--shadow); }
.login-mark { width: 56px; height: 56px; }
.form-error { color: var(--bad); font-size: 15px; }

/* ---------- shell: bottom tabs on a phone, side rail on the iPad ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: var(--card); border-top: 1px solid var(--hair); padding-bottom: var(--safe-b); }
.nav a { flex: 1; min-height: var(--tab-h); display: grid; place-items: center; align-content: center; gap: 2px; font-size: 12px; color: var(--muted); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav-brand, .nav-out { display: none; }
.view { padding: calc(16px + var(--safe-t)) 16px calc(var(--tab-h) + var(--safe-b) + 24px); }

@media (min-width: 900px) {
  .nav { top: 0; right: auto; width: 96px; flex-direction: column; border-top: 0; border-right: 1px solid var(--hair); padding: calc(16px + var(--safe-t)) 0 16px; gap: 4px; }
  .nav a { flex: none; min-height: 72px; font-size: 13px; }
  .nav-brand { display: grid; place-items: center; gap: 4px; padding-bottom: 16px; font-family: "Cormorant", serif; font-size: 18px; font-weight: 600; }
  .nav-brand img { width: 36px; height: 36px; }
  .nav-out { display: block; margin-top: auto; border: 0; background: none; color: var(--muted); font-size: 13px; min-height: 48px; cursor: pointer; }
  .view { margin-left: 96px; padding: calc(20px + var(--safe-t)) 24px 24px; }
}

/* ---------- list + detail ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.pane-list, .pane-detail { min-width: 0; }
.split.has-detail .pane-list { display: none; }
.split:not(.has-detail) .pane-detail { display: none; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); align-items: start; }
  .split.has-detail .pane-list, .split .pane-list { display: block; position: sticky; top: 20px; max-height: calc(100dvh - 40px); overflow-y: auto; padding-right: 4px; }
  .split .pane-detail, .split:not(.has-detail) .pane-detail { display: block; }
  .back-link { display: none !important; }
}
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.search { margin-bottom: 10px; }
.list { display: grid; gap: 8px; }
.row { display: grid; gap: 4px; padding: 14px 16px; background: var(--card); border: 1px solid var(--hair); border-radius: 14px; text-decoration: none; color: inherit; min-height: 56px; box-shadow: var(--shadow); }
.row[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.row-title { font-weight: 500; }
.row-sub { font-size: 14px; color: var(--muted); }
.group-title { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 14px 4px 2px; font-weight: 500; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); background: var(--card); border-radius: var(--radius); border: 1px dashed var(--hair); }
.empty-detail { display: grid; place-items: center; min-height: 50vh; color: var(--muted); text-align: center; padding: 24px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); text-decoration: none; min-height: 44px; font-weight: 500; }

/* ---------- cards + forms ---------- */
.card { background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow); }
.stack { display: grid; gap: 16px; }
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.grid3 { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr 1fr; } }
.detail-head { display: grid; gap: 6px; }
.detail-head .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.title-input { font-family: "Cormorant", serif; font-size: 30px; font-weight: 500; border: 0; background: transparent; padding: 4px 0; min-height: 52px; }
.title-input:focus { outline: none; border-bottom: 2px solid var(--accent); border-radius: 0; }

/* the action bar sits at the bottom, where a thumb reaches */
.actionbar { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 8px); z-index: 10; display: flex; gap: 10px; align-items: center; padding: 10px; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--hair); border-radius: 999px; box-shadow: 0 6px 24px rgba(40, 25, 10, .12); margin-top: 20px; }
.actionbar .grow { flex: 1; min-width: 0; padding-left: 8px; font-size: 14px; line-height: 1.3; }
@media (min-width: 900px) { .actionbar { bottom: 16px; } }

/* ---------- formula lines ---------- */
.phase { display: grid; gap: 8px; }
.phase-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.phase-head h3 { font-size: 20px; }
.line { display: grid; grid-template-columns: 1fr 96px 48px; grid-template-areas: "name pct del" "info info info"; gap: 6px 8px; align-items: center; padding: 10px; border: 1px solid var(--hair); border-radius: 14px; background: var(--card); }
.line .l-name { grid-area: name; }
.line .l-pct { grid-area: pct; text-align: right; }
.line .l-del { grid-area: del; }
.line .l-info { grid-area: info; display: flex; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); padding: 0 4px; }
.line.over { border-color: var(--bad); background: var(--bad-soft); }
.line .warn { color: var(--bad); font-weight: 500; }
.pct-wrap { position: relative; }
.pct-wrap input { padding-right: 28px; text-align: right; }
.pct-wrap::after { content: "%"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: var(--radius); overflow: hidden; }
.totals > div { background: var(--card); padding: 12px 14px; display: grid; gap: 2px; }
.totals .k { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.totals .v { font-size: 22px; font-variant-numeric: tabular-nums; font-weight: 500; }
.totals .v.bad { color: var(--bad); } .totals .v.good { color: var(--sage); }
@media (max-width: 560px) { .totals { grid-template-columns: 1fr 1fr; } }

/* ingredient picker */
.picker { position: relative; }
.picker-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; max-height: 300px; overflow-y: auto; background: var(--card); border: 1px solid var(--hair); border-radius: 14px; box-shadow: 0 10px 30px rgba(40, 25, 10, .15); }
.picker-list button { display: grid; width: 100%; text-align: left; padding: 10px 14px; min-height: 52px; border: 0; border-bottom: 1px solid var(--hair); background: none; cursor: pointer; }
.picker-list button:last-child { border-bottom: 0; }
.picker-list button small { color: var(--muted); font-size: 13px; }

/* ---------- batch sheet ---------- */
.weigh { display: grid; grid-template-columns: 56px 1fr 120px; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--hair); border-radius: 14px; background: var(--card); }
.weigh.done { background: var(--sage-soft); border-color: transparent; }
.weigh .tick { width: 56px; height: 56px; border-radius: 999px; border: 2px solid var(--hair); background: var(--card); display: grid; place-items: center; cursor: pointer; color: transparent; }
.weigh.done .tick { background: var(--sage); border-color: var(--sage); color: var(--on-accent); }
.weigh .w-name { font-weight: 500; line-height: 1.25; }
.weigh .w-target { font-size: 14px; color: var(--muted); }
.weigh .w-off { color: var(--bad); font-weight: 500; }
.progress { height: 8px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--sage); border-radius: 999px; transition: width .2s; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }
.photo-add { aspect-ratio: 1; border: 1px dashed var(--hair); border-radius: 12px; display: grid; place-items: center; color: var(--muted); cursor: pointer; background: var(--card); min-height: 96px; }
.saved-dot { font-size: 13px; color: var(--sage); }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 84px); z-index: 50; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: 15px; max-width: calc(100% - 32px); box-shadow: 0 6px 24px rgba(0, 0, 0, .2); }
@media (min-width: 900px) { .toast { bottom: 92px; } }

/* one-line textareas: wrap long names, grow to fit */
textarea[rows="1"] { min-height: 48px; resize: none; overflow: hidden; line-height: 1.3; padding-top: 12px; padding-bottom: 12px; }
textarea.title-input { min-height: 52px; padding: 4px 0; line-height: 1.15; }
.g-wrap::after { content: "g"; }

/* the round "n" and the neeve wordmark, as on neeve.com.au */
.brand-mark { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--bg); display: grid; place-items: center; font: italic 500 24px/1 "Cormorant", Georgia, serif; padding-bottom: 3px; flex: none; }
.brand-word { font: 500 28px/1 "Cormorant", Georgia, serif; letter-spacing: .06em; color: var(--accent); }
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-2); font-weight: 500; }
.login-brand { display: flex; align-items: center; gap: 10px; }
.login-card .brand-mark { width: 44px; height: 44px; font-size: 30px; }
.login-card .brand-word { font-size: 34px; }
.login-card h1 { font-size: 30px; }
.nav-brand .brand-mark { width: 44px; height: 44px; font-size: 30px; }
.nav-brand .eyebrow { font-size: 10px; letter-spacing: .16em; }
