/* coffee (g)rate — risograph-print editorial, warm paper, hard ink shadows. */

:root {
  --paper: #F2EBDD;
  --paper-2: #E9DFCC;
  --card: #FBF7EF;
  --ink: #1E1612;
  --ink-2: #4E4038;
  --muted: #85756A;
  --line: rgba(30, 22, 18, .14);
  --edge: #1E1612;
  --shadow-c: #1E1612;
  --accent: #E0582B;
  --accent-2: #F3A23A;
  --accent-ink: #FFF7EE;
  --blue: #2F5DA8;
  --berry: #C93756;
  --sage: #5E8C6A;
  --sour: #F2B33D;
  --good: #5E8C6A;
  --bitter: #6B3F2C;
  --scale-bg: #1E1612;
  --scale-ink: #F6EDDD;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 4px 4px 0 var(--shadow-c);
  --shadow-lg: 7px 7px 0 var(--shadow-c);
  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --grain-opacity: .55;
  --grain-blend: multiply;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15100D;
    --paper-2: #1D1612;
    --card: #211915;
    --ink: #F2EBDD;
    --ink-2: #D3C5B5;
    --muted: #9C8B7D;
    --line: rgba(242, 235, 221, .13);
    --edge: rgba(242, 235, 221, .85);
    --shadow-c: #000;
    --accent: #F26B3A;
    --accent-ink: #1A0F0A;
    --bitter: #A0674A;
    --scale-bg: #0B0806;
    --grain-opacity: .22;
    --grain-blend: screen;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
/* risograph grain over everything */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .32 0 0 0 .55 -.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
img, svg { display: block; }
.i { width: 1.15em; height: 1.15em; flex: none; }
.mono { font-family: var(--f-mono); font-feature-settings: "zero" 1; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- type ---------- */
.display {
  font-family: var(--f-display);
  font-weight: 340;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  font-size: clamp(46px, 8.5vw, 112px);
  line-height: .9;
  letter-spacing: -.035em;
  margin: 0;
  text-wrap: balance;
}
.display sup {
  font-family: var(--f-mono);
  font-size: .2em;
  letter-spacing: 0;
  vertical-align: top;
  margin-left: .25em;
  color: var(--accent);
  font-weight: 600;
}
.display.huge { font-size: clamp(120px, 28vw, 300px); color: var(--accent); }
.eyebrow {
  font: 600 11.5px/1.2 var(--f-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
h2, h3 { font-family: var(--f-display); font-variation-settings: "opsz" 48, "SOFT" 50; font-weight: 500; letter-spacing: -.015em; margin: 0; }
h2 { font-size: 26px; line-height: 1.1; }
h3 { font-size: 20px; line-height: 1.15; }
.prose { white-space: pre-line; margin: 0; font-size: 17px; color: var(--ink-2); max-width: 70ch; }

/* ---------- layout ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 20px 140px; }
section { margin-top: 44px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-2 > * { margin-top: 0; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.section-head, .panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.section-head h2 { display: flex; align-items: center; gap: 10px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 18px 0 28px; }
.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 1px; }
.link:hover { color: var(--accent); }
.back { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--muted); margin: 6px 0 18px; }
.back:hover { color: var(--ink); }
.spacer { flex: 1; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px max(20px, calc((100vw - 1240px) / 2 + 20px));
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1.5px solid var(--edge);
}
.wordmark {
  font-family: var(--f-display);
  font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 1;
  font-weight: 450; font-size: 25px; letter-spacing: -.02em;
  text-decoration: none; white-space: nowrap; line-height: 1;
}
.wordmark em { font-style: italic; font-weight: 600; }
.wordmark em span { color: var(--accent); }
.wordmark.big { font-size: clamp(44px, 7vw, 72px); margin: 0 0 14px; }
.mainnav { display: flex; gap: 4px; margin-left: 12px; }
.mainnav a {
  text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid transparent;
  transition: background .15s, border-color .15s;
}
.mainnav a:hover { border-color: var(--edge); }
.mainnav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-actions form { margin: 0; }

/* ---------- mobile tab bar ---------- */
.tabbar, .show-sm { display: none !important; }
.icon-btn[aria-current="page"] { background: var(--ink); color: var(--paper); }
@media (max-width: 760px) {
  .mainnav, .hide-sm { display: none !important; }
  .show-sm { display: inline-grid !important; }
  .topbar { padding: 12px 16px; }
  .wrap { padding: 16px 16px calc(120px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid !important; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: fixed; z-index: 60; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    background: var(--card); border: 1.5px solid var(--edge); border-radius: 22px; box-shadow: var(--shadow);
    padding: 8px 4px 6px;
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    text-decoration: none; font-size: 10.5px; font-weight: 600; color: var(--muted); padding: 4px 0;
  }
  .tabbar a .i { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .tabbar a[aria-current="page"] .i { color: var(--accent); }
  .tabbar .tab-plus {
    width: 52px; height: 52px; margin: -26px auto 2px; border-radius: 50%;
    background: var(--accent); color: var(--accent-ink); border: 1.5px solid var(--edge);
    box-shadow: 3px 3px 0 var(--shadow-c); justify-content: center;
  }
  .tabbar .tab-plus .i { width: 26px; height: 26px; stroke-width: 2.2; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--f-body);
  padding: 12px 18px; border-radius: 999px;
  border: 1.5px solid var(--edge); background: var(--card); color: var(--ink);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--shadow-c); }
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn.danger { color: var(--berry); border-color: currentColor; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1.5px solid var(--edge); background: transparent; color: var(--ink); cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--ink); color: var(--paper); }
form.inline { display: inline; margin: 0; }

/* ---------- cards & panels ---------- */
.card, .panel {
  background: var(--card);
  border: 1.5px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { padding: 22px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font: 600 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em;
  border: 1.5px solid var(--edge);
}
.tag-accent { background: var(--accent); color: var(--accent-ink); }

/* ---------- flash ---------- */
.flash {
  position: fixed; z-index: 90; left: 50%; top: 18px; transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 32px));
  background: var(--ink); color: var(--paper);
  padding: 13px 20px; border-radius: 14px; font-weight: 600; font-size: 15px;
  box-shadow: 4px 4px 0 var(--accent);
  animation: flash-in .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
.flash.out { animation: flash-out .35s ease both; }
@keyframes flash-in { from { opacity: 0; transform: translate(-50%, -24px) rotate(-2deg); } }
@keyframes flash-out { to { opacity: 0; transform: translate(-50%, -24px); } }

/* ---------- hero / dashboard ---------- */
.hero { margin-top: 18px; }
.hero .display { max-width: 12ch; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 34px; border-top: 1.5px solid var(--edge); border-bottom: 1.5px solid var(--edge);
}
.stat { padding: 18px 18px 18px 0; display: flex; flex-direction: column; gap: 4px; text-decoration: none; min-width: 0; }
.stat + .stat { padding-left: 18px; border-left: 1.5px solid var(--line); }
.stat-num {
  font-family: var(--f-display); font-variation-settings: "opsz" 144, "SOFT" 100; font-weight: 400;
  font-size: clamp(34px, 4.5vw, 56px); line-height: 1; letter-spacing: -.03em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stat-fav .stat-num { font-style: italic; font-size: clamp(24px, 3vw, 36px); line-height: 1.25; }
.stat-fav:hover .stat-num { color: var(--accent); }
.stat-label { font: 600 11px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1.5px solid var(--line); }
}

.ticker {
  margin: 34px -20px 0; overflow: hidden; white-space: nowrap;
  border-top: 1.5px solid var(--edge); border-bottom: 1.5px solid var(--edge);
  background: var(--accent); color: var(--accent-ink);
  transform: rotate(-1.2deg);
}
.ticker-track { display: inline-flex; animation: ticker 50s linear infinite; padding: 12px 0; }
.ticker span {
  font-family: var(--f-display); font-style: italic; font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 1;
  font-size: 28px; line-height: 1; padding: 0 22px; text-transform: lowercase;
}
.ticker span::after { content: "✺"; font-style: normal; margin-left: 44px; font-size: 20px; vertical-align: middle; }
@keyframes ticker { to { transform: translateX(-33.333%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: s; }
.steps a {
  display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 18px; text-decoration: none;
  background: var(--card); border: 1.5px dashed var(--edge); border-radius: var(--radius); position: relative;
  transition: transform .12s, box-shadow .12s;
}
.steps a:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); border-style: solid; }
.steps .i { position: absolute; right: 16px; top: 16px; width: 26px; height: 26px; color: var(--accent); }
.step-n { font: 600 13px var(--f-mono); color: var(--muted); }
.step-t { font-family: var(--f-display); font-size: 21px; line-height: 1.1; }
.steps .done a { border-style: solid; background: var(--paper-2); }
.steps .done .step-t { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.steps .done .step-n::after { content: " ✓ done"; color: var(--sage); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }

.quick-list { display: flex; flex-direction: column; gap: 10px; }
.quick {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  padding: 12px 14px 12px 12px; border: 1.5px solid var(--edge); border-radius: 14px;
  text-decoration: none; background: var(--paper); transition: background .15s, transform .12s;
}
.quick:hover { background: var(--accent); color: var(--accent-ink); transform: translateX(3px); }
.quick:hover .muted, .quick:hover small { color: inherit; }
.quick-ratio {
  font: 600 15px var(--f-mono); padding: 10px 10px; border-radius: 10px; min-width: 64px; text-align: center;
  background: var(--ink); color: var(--paper);
}
.quick-main { display: flex; flex-direction: column; min-width: 0; }
.quick-main strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-main small { color: var(--muted); font-size: 12.5px; }
.quick-go .i { width: 22px; height: 22px; }

.pulse { width: 100%; height: 120px; }
.pulse rect { transition: opacity .15s; }
.pulse a:hover rect { opacity: .7; }
.p-sour { fill: var(--sour); }
.p-good { fill: var(--good); }
.p-bitter { fill: var(--bitter); }
.p-rated { fill: var(--accent); }
.p-none { fill: var(--line); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 14px; padding: 0; margin: 14px 0 0; font: 600 11px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: block; background: currentColor; }
.legend i.p-sour { background: var(--sour); } .legend i.p-good { background: var(--good); }
.legend i.p-bitter { background: var(--bitter); } .legend i.p-rated { background: var(--accent); }
.pulse-panel { padding: 18px 22px; margin-bottom: 8px; }

/* ---------- empty states ---------- */
.empty {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 26px; border: 1.5px dashed var(--muted); border-radius: var(--radius);
}
.empty-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--accent); margin-bottom: 6px; }
.empty-icon .i { width: 26px; height: 26px; }
.empty-title { font-family: var(--f-display); font-size: 24px; margin: 0; line-height: 1.1; }
.empty-text { margin: 0 0 10px; color: var(--muted); max-width: 46ch; }

/* ---------- beans ---------- */
.bean-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px; }
.bean-card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .18s cubic-bezier(.2, 1.2, .4, 1), box-shadow .18s;
}
.bean-card:hover { transform: translate(-3px, -4px) rotate(-.6deg); box-shadow: var(--shadow-lg); }
.bean-art { position: relative; aspect-ratio: 300 / 330; border-bottom: 1.5px solid var(--edge); overflow: hidden; }
.label-art { width: 100%; height: 100%; }
.bean-card:hover .label-art { transform: scale(1.04); }
.label-art { transition: transform .5s ease; }
.score-badge {
  position: absolute; top: 12px; right: 12px; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: var(--paper); color: var(--ink); border: 1.5px solid var(--edge);
  font-family: var(--f-display); font-size: 24px; font-weight: 500; letter-spacing: -.03em;
  box-shadow: 2px 2px 0 var(--shadow-c);
}
.heart-badge {
  position: absolute; top: 12px; left: 12px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--berry); color: #fff; border: 1.5px solid var(--edge);
}
.heart-badge .i { width: 17px; height: 17px; fill: currentColor; }
.bean-meta { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 3px; }
.bean-roaster { font: 600 11px/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.bean-name { font-size: 23px; line-height: 1.08; font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 1; }
.bean-sub { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 14px 0 0; }
.chips li {
  padding: 5px 12px; border-radius: 999px; border: 1.5px solid var(--edge);
  font-size: 13px; font-weight: 600; text-transform: lowercase; background: var(--paper);
}
.chips li:nth-child(3n+1) { background: var(--accent-2); color: #1E1612; }
.chips li:nth-child(3n+2) { background: var(--paper-2); }
.chips.small { margin-top: 10px; }
.chips.small li { padding: 3px 9px; font-size: 12px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 28px; }
.search {
  flex: 1 1 280px; display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--edge); border-radius: 999px; padding: 0 16px; background: var(--card);
}
.search input { border: 0; background: transparent; padding: 12px 0; font: inherit; color: inherit; width: 100%; outline: none; }

.bean-hero { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 44px; align-items: start; margin-top: 0; }
.bean-hero-art {
  position: relative; border: 1.5px solid var(--edge); border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow-lg); aspect-ratio: 300 / 380; transform: rotate(-1.5deg);
}
.bag-tag {
  position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; justify-content: space-between;
  padding: 10px 14px; background: var(--paper); color: var(--ink); border: 1.5px solid var(--edge); border-radius: 10px;
  font-size: 11.5px; letter-spacing: .12em;
}
.bean-hero-info .display { font-size: clamp(44px, 7vw, 92px); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0; margin: 28px 0; border-top: 1.5px solid var(--edge); }
.facts div { padding: 12px 12px 12px 0; border-bottom: 1.5px solid var(--line); }
.facts dt { font: 600 10.5px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: 17px; font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 860px) {
  .bean-hero { grid-template-columns: 1fr; gap: 30px; }
  .bean-hero-art { max-width: 380px; width: 100%; margin: 0 auto; }
}

.roast-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1.5px solid var(--edge); flex: none; }
.roast-light { background: #EFC07A; } .roast-medium-light { background: #DE8A3A; }
.roast-medium { background: #B5602F; } .roast-medium-dark { background: #7A3B22; } .roast-dark { background: #2E1B14; }

.tasting-body { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
@media (max-width: 640px) { .tasting-body { grid-template-columns: 1fr; justify-items: center; } }
.score-ring {
  --p: 0;
  width: 132px; height: 132px; border-radius: 50%; position: relative;
  display: grid; place-items: center; align-content: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--paper-2) 0);
  border: 1.5px solid var(--edge);
}
.score-ring::before { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--edge); }
.score-num, .score-of { position: relative; }
.score-num { font-family: var(--f-display); font-size: 46px; line-height: 1; letter-spacing: -.04em; font-variation-settings: "opsz" 144, "SOFT" 100; }
.score-of { font: 600 11px var(--f-mono); color: var(--muted); }

.radar-wrap { width: 100%; max-width: 420px; justify-self: center; }
.radar { width: 100%; height: auto; overflow: visible; }
.radar-ring { fill: none; stroke: var(--line); stroke-width: 1.2; }
.radar-ring.outer { stroke: var(--edge); stroke-width: 1.5; }
.radar-spoke { stroke: var(--line); stroke-width: 1.2; }
.radar-shape { fill: var(--accent); fill-opacity: .32; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; transition: all .25s ease; }
.radar-dot { fill: var(--card); stroke: var(--ink); stroke-width: 2; transition: all .25s ease; }
.radar-label { font: 600 12.5px var(--f-body); fill: var(--ink-2); }
.radar-val { font-family: var(--f-mono); fill: var(--accent); font-weight: 600; }
.sub-head { font-size: 17px; margin: 24px 0 12px; }

/* ---------- shots ---------- */
.shot-list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.shot + .shot { border-top: 1.5px solid var(--line); }
.shot-link {
  display: grid; grid-template-columns: 48px 26px minmax(0, 1fr) auto auto; align-items: center; gap: 14px;
  padding: 14px 18px; text-decoration: none; transition: background .12s;
}
.shot-link:hover { background: var(--paper-2); }
.shot-time { font-size: 13px; color: var(--muted); line-height: 1.25; }
.shot-time small { display: block; font-size: 10.5px; opacity: .8; }
.swatch { width: 26px; height: 26px; }
.shot-main { display: flex; flex-direction: column; min-width: 0; }
.shot-main strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-main small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-nums { font-size: 13.5px; white-space: nowrap; }
.shot-nums .sep { margin: 0 4px; }
.shot-nums u, .specs u, .scale u, .sp-cell u { text-decoration: none; color: var(--muted); font-size: .8em; margin-left: 1px; }
.shot-nums em { font-style: normal; font-weight: 600; background: var(--ink); color: var(--paper); padding: 2px 7px; border-radius: 6px; margin-left: 6px; }
.shot-nums .sep { color: var(--muted); }
.shot-rate { display: flex; align-items: center; gap: 10px; }
.cups { display: inline-flex; gap: 3px; }
.cups i { width: 9px; height: 13px; border-radius: 2px 2px 5px 5px; border: 1.5px solid var(--muted); display: block; }
.cups i.on { background: var(--accent); border-color: var(--edge); }
.taste-dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--edge); display: block; }
.taste-dot.t-2, .taste-dot.t-1 { background: var(--sour); }
.taste-dot.t0 { background: var(--good); }
.taste-dot.t1, .taste-dot.t2 { background: var(--bitter); }
@media (max-width: 640px) {
  .shot-link { grid-template-columns: 26px minmax(0, 1fr) auto; grid-template-areas: "sw main rate" "sw nums nums"; row-gap: 4px; padding: 12px 14px; }
  .shot-time { display: none; }
  .shot-sw { grid-area: sw; align-self: start; padding-top: 2px; }
  .shot-main { grid-area: main; }
  .shot-nums { grid-area: nums; }
  .shot-rate { grid-area: rate; }
}
.day { margin-top: 30px; }
.day-label { font-size: 20px; margin: 0 0 12px; }
.filter { margin-bottom: 22px; }
.filter .pill .swatch { width: 18px; height: 18px; }

/* ---------- gear ---------- */
.gear-card {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center;
  padding: 16px 18px; margin-bottom: 14px; text-decoration: none;
  background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .12s;
}
.gear-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.gear-glyph {
  width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--edge); display: grid; place-items: center;
  background: repeating-conic-gradient(var(--accent) 0 10deg, var(--accent-2) 10deg 20deg);
}
.gear-glyph.burr-conical { background: radial-gradient(circle, var(--card) 22%, transparent 23%), repeating-conic-gradient(var(--ink) 0 8deg, var(--accent-2) 8deg 24deg); }
.gear-glyph.burr-flat { background: radial-gradient(circle, var(--card) 30%, transparent 31%), repeating-conic-gradient(var(--accent) 0 6deg, var(--card) 6deg 15deg); }
.gear-glyph.method { background: var(--blue); color: #fff; }
.gear-glyph.method .i { width: 26px; height: 26px; }
.gear-main { display: flex; flex-direction: column; min-width: 0; }
.gear-main .eyebrow { margin: 0; }
.gear-main strong { font-family: var(--f-display); font-size: 22px; font-weight: 500; line-height: 1.15; }
.gear-main .muted { font-size: 14px; }
.gear-count { display: flex; flex-direction: column; align-items: flex-end; }
.gear-count b { font-family: var(--f-display); font-size: 30px; font-weight: 400; line-height: 1; }
.gear-count small { font: 600 10px var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* ---------- recipes ---------- */
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.recipe-card {
  display: flex; flex-direction: column; gap: 18px; padding: 22px;
  background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow);
}
.recipe-card h3 { font-size: 26px; font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 1; }
.recipe-card header .eyebrow { margin-bottom: 6px; }
.ratio-viz, .ratio-readout { display: flex; flex-direction: column; gap: 10px; }
.rv-top { display: flex; align-items: baseline; gap: 12px; }
.rv-big { font-family: var(--f-display); font-variation-settings: "opsz" 144, "SOFT" 100; font-weight: 400; font-size: 64px; line-height: .9; letter-spacing: -.04em; }
.rv-name { font: 600 12px var(--f-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }
.rv-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; border: 1.5px solid var(--edge); }
.rv-dose { background: var(--ink); transition: width .3s ease; }
.rv-yield { flex: 1; background: repeating-linear-gradient(-45deg, var(--accent) 0 6px, var(--accent-2) 6px 12px); }
.rv-legend { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.specs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.specs div { display: flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 10px; background: var(--paper-2); }
.specs dt { color: var(--accent); display: flex; }
.specs dd { margin: 0; font: 600 14px var(--f-mono); }
.recipe-gear { margin: 0; font-size: 14px; }
.recipe-card footer { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 4px; }
.recipe-stats { margin-left: auto; font: 600 12px var(--f-mono); }

/* ---------- forms ---------- */
.form { max-width: 980px; }
.form.narrow { max-width: 720px; }
.form-head { margin-bottom: 8px; }
.form-head .display { font-size: clamp(44px, 7vw, 88px); }
.form-section { margin-top: 38px; padding-top: 22px; border-top: 1.5px solid var(--edge); }
.form-section > h2 { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.step { font-family: var(--f-display); font-style: italic; color: var(--accent); font-size: 30px; font-variation-settings: "opsz" 144, "WONK" 1; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.fields.three .span-2 { grid-column: span 3; }
@media (max-width: 680px) {
  .fields, .fields.three { grid-template-columns: 1fr; }
  .span-2, .fields.three .span-2 { grid-column: auto; }
}
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field > span:first-child, .field > legend, .sp-cell > span, .sp-cell > label, .scale-cell > span {
  font: 600 11px/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.field > legend { margin-bottom: 8px; padding: 0; }
.field em { font-style: normal; text-transform: none; letter-spacing: 0; opacity: .8; }
input, select, textarea { font: inherit; color: inherit; }
.field input:not([type=radio]):not([type=checkbox]):not([type=range]), .field select, .field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1.5px solid var(--edge);
  padding: 10px 0 9px; font-size: 18px; border-radius: 0; outline: none; transition: border-color .15s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { border: 1.5px solid var(--edge); border-radius: 12px; padding: 12px 14px; font-size: 16px; resize: vertical; background: var(--card); }
.field select {
  cursor: pointer; padding-right: 26px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 6px) 55%; background-size: 6px 6px; background-repeat: no-repeat;
}
.field select option { background: var(--card); color: var(--ink); }
.field input:focus, .field select:focus { border-bottom-color: var(--accent) !important; box-shadow: 0 1.5px 0 var(--accent); }
.field textarea:focus { border-color: var(--accent); }
::placeholder { color: var(--muted); opacity: .6; }
.hint { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.hint a { color: var(--accent); font-weight: 600; }
.error {
  background: var(--berry); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600;
  border: 1.5px solid var(--edge); box-shadow: var(--shadow); margin: 18px 0;
}

/* pills & segmented */
.pills, .seg { display: flex; flex-wrap: wrap; gap: 8px; }
.pills label, .seg label { cursor: pointer; position: relative; }
.pills input, .seg input, .recipe-picker input, .taste-scale input, .cup-rate input {
  position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}
.pills label > span, .seg label > span, .pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px;
  border: 1.5px solid var(--edge); font-weight: 600; font-size: 14.5px; background: var(--card);
  text-decoration: none; transition: background .12s, color .12s, transform .12s; user-select: none;
}
.pills label:hover > span, .pill:hover { transform: translateY(-1px); }
.pills input:checked + span, .seg input:checked + span, .pill.on { background: var(--ink); color: var(--paper); }
.pills input:focus-visible + span, .seg input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.pills.compact label > span, .pills.compact .pill { padding: 7px 13px; font-size: 13.5px; }
.seg { gap: 0; border: 1.5px solid var(--edge); border-radius: 999px; padding: 3px; width: fit-content; background: var(--card); }
.seg label > span { border: 0; padding: 8px 16px; background: transparent; }
.proc::before { content: ""; width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1.5px solid currentColor; }
.proc-washed::before { background: #2F5DA8; } .proc-natural::before { background: #C93756; }
.proc-honey::before { background: #F2B33D; } .proc-anaerobic::before { background: #6D45A8; } .proc-other::before { background: #2E7D6B; }
.roast-scale .roast-dot { width: 14px; height: 14px; }

.chip-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn {
  border: 1.5px dashed var(--muted); background: transparent; border-radius: 999px; padding: 5px 12px;
  font: 600 13px var(--f-body); color: var(--ink-2); cursor: pointer; text-transform: lowercase;
}
.chip-btn:hover { border-style: solid; border-color: var(--edge); }
.chip-btn.on { background: var(--accent-2); color: #1E1612; border: 1.5px solid var(--edge); }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; margin-top: 26px; position: relative; }
.switch input { position: absolute; opacity: 0; }
.switch-ui { width: 50px; height: 28px; border-radius: 999px; border: 1.5px solid var(--edge); background: var(--paper-2); position: relative; transition: background .2s; flex: none; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: var(--ink); transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(22px); background: var(--accent-ink); }
.switch input:focus-visible + .switch-ui { outline: 2.5px solid var(--accent); outline-offset: 3px; }

/* ratings */
.ratings { margin-top: 26px; padding: 26px; border: 1.5px solid var(--edge); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.overall { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "label num" "range range"; align-items: end; gap: 8px 16px; margin-bottom: 26px; }
.overall-label { grid-area: label; font-family: var(--f-display); font-size: 28px; }
.overall-num { grid-area: num; justify-self: end; font-family: var(--f-display); font-size: 84px; line-height: .8; letter-spacing: -.05em; color: var(--accent); font-variation-settings: "opsz" 144, "SOFT" 100; }
.overall input { grid-area: range; }
.ratings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; }
@media (max-width: 760px) { .ratings-grid { grid-template-columns: 1fr; } .ratings-grid .radar-wrap { order: -1; } }
.sliders { display: flex; flex-direction: column; gap: 14px; }
.slider { display: grid; grid-template-columns: 92px 1fr 28px; align-items: center; gap: 12px; }
.slider-label { font-weight: 600; font-size: 14.5px; }
.slider output { font: 600 15px var(--f-mono); text-align: right; color: var(--accent); }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; background: var(--edge); border-radius: 2px; }
input[type=range]::-moz-range-track { height: 4px; background: var(--edge); border-radius: 2px; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%;
  background: var(--accent); border: 1.5px solid var(--edge); box-shadow: 2px 2px 0 var(--shadow-c); transition: transform .12s;
}
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--edge); box-shadow: 2px 2px 0 var(--shadow-c); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.2); }
.range-big::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--paper-2), var(--accent-2), var(--accent)); border: 1.5px solid var(--edge); }
.range-big::-moz-range-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--paper-2), var(--accent-2), var(--accent)); border: 1.5px solid var(--edge); }
.range-big::-webkit-slider-thumb { width: 30px; height: 30px; margin-top: -12px; }

/* ratio stage (recipe) */
.ratio-stage { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center; margin-bottom: 28px; }
@media (max-width: 760px) { .ratio-stage { grid-template-columns: 1fr; } }
.scale {
  display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-radius: 20px;
  background: var(--scale-bg); color: var(--scale-ink); border: 1.5px solid var(--edge); box-shadow: var(--shadow);
}
.scale-arrow { color: var(--accent); }
.scale-arrow .i { width: 26px; height: 26px; }
.scale-cell { display: grid; grid-template-columns: auto auto; align-items: baseline; }
.scale-cell > span { grid-column: span 2; color: rgba(246, 237, 221, .55); }
.scale-cell input, .sp-cell input {
  width: 3.6ch; background: transparent; border: 0; color: inherit; outline: none;
  font: 600 52px/1.05 var(--f-mono); letter-spacing: -.04em; padding: 0; -moz-appearance: textfield;
}
.scale-cell input:focus, .sp-cell input:focus { color: var(--accent-2); }
.scale u { color: rgba(246, 237, 221, .55); font-size: 20px; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets button {
  font: 600 13px var(--f-mono); padding: 6px 11px; border-radius: 8px; cursor: pointer;
  border: 1.5px solid var(--edge); background: var(--card); color: var(--ink);
}
.presets button:hover { background: var(--ink); color: var(--paper); }
.flow-readout { justify-content: flex-end; }
.flow-readout b { font-size: 22px; padding: 6px 0; }

/* scale panel (shot) */
.scale-panel {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) 1.4fr; gap: 0;
  background: var(--scale-bg); color: var(--scale-ink); border: 1.5px solid var(--edge);
  border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.sp-cell { padding: 18px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; border-right: 1px solid rgba(246, 237, 221, .14); position: relative; }
.sp-cell > span, .sp-cell > label { grid-column: span 2; color: rgba(246, 237, 221, .55); margin-bottom: 6px; }
.sp-cell input { width: 100%; font-size: 38px; }
.sp-cell u { color: rgba(246, 237, 221, .55); font-size: 15px; }
.sp-cell input::placeholder { color: rgba(246, 237, 221, .25); opacity: 1; }
.sp-readout { padding: 18px 20px; display: flex; flex-direction: column; justify-content: center; gap: 6px; background: var(--accent); color: var(--accent-ink); }
.sp-readout .rv-big { font-size: 54px; }
.sp-readout .rv-name { color: inherit; opacity: .8; }
.sp-flow { font-size: 13px; opacity: .85; }
.timer-btn {
  grid-column: span 2; margin-top: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid rgba(246, 237, 221, .5); color: inherit; background: transparent; border-radius: 999px;
  padding: 6px 10px; font: 600 12px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; cursor: pointer;
}
.timer-btn.running { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 30%, transparent); } }
@media (max-width: 960px) {
  .scale-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sp-cell { border-bottom: 1px solid rgba(246, 237, 221, .14); }
  .sp-readout { grid-column: span 3; flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 14px; }
}
@media (max-width: 520px) {
  .scale-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-readout { grid-column: span 2; }
  .sp-cell input { font-size: 32px; }
}

/* recipe picker (shot) */
.recipe-picker { display: flex; gap: 10px; overflow-x: auto; padding: 4px 4px 10px; margin: -4px -4px 0; scroll-snap-type: x mandatory; }
.rp { flex: none; scroll-snap-align: start; cursor: pointer; position: relative; }
.rp > span {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 16px; min-width: 150px;
  border: 1.5px solid var(--edge); border-radius: 14px; background: var(--card); transition: transform .12s, background .12s;
}
.rp small { color: var(--muted); font-size: 12px; }
.rp:hover > span { transform: translateY(-2px); }
.rp input:checked + span { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--accent); }
.rp input:checked + span small { color: rgba(246, 237, 221, .7); }
.rp input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: 2px; }

/* verdict */
.verdict { display: grid; grid-template-columns: auto 1fr; gap: 34px; align-items: start; margin-bottom: 26px; }
@media (max-width: 760px) { .verdict { grid-template-columns: 1fr; } }
.cup-rate { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 6px; margin-top: 4px; }
.cup-rate label {
  width: 52px; height: 52px; display: grid; place-items: center; cursor: pointer; border-radius: 14px;
  border: 1.5px solid var(--edge); background: var(--card); color: var(--muted); transition: all .12s;
}
.cup-rate label .i { width: 28px; height: 28px; }
.cup-rate label:hover, .cup-rate label:hover ~ label, .cup-rate input:checked ~ label { background: var(--accent); color: var(--accent-ink); }
.cup-rate input:checked + label { transform: rotate(-6deg) scale(1.06); box-shadow: 3px 3px 0 var(--shadow-c); }
.cup-rate input:focus-visible + label { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.taste-scale { display: grid; grid-template-columns: repeat(5, 1fr); border: 1.5px solid var(--edge); border-radius: 14px; overflow: hidden; margin-top: 4px; }
.taste-scale label { cursor: pointer; position: relative; }
.taste-scale label > span {
  display: grid; place-items: center; height: 52px; font-weight: 600; font-size: 13px; text-align: center; padding: 0 4px;
  transition: filter .12s; color: #1E1612;
}
.taste-scale label + label > span { border-left: 1.5px solid var(--edge); }
.taste-scale label:nth-child(1) > span { background: #F2B33D; }
.taste-scale label:nth-child(2) > span { background: #E8CC7A; }
.taste-scale label:nth-child(3) > span { background: #8DB596; }
.taste-scale label:nth-child(4) > span { background: #C59A7E; }
.taste-scale label:nth-child(5) > span { background: #8A5A43; color: #FFF6EC; }
.taste-scale label:hover > span { filter: brightness(1.07); }
.taste-scale input:checked + span { box-shadow: inset 0 0 0 3px var(--ink); font-size: 14px; }
.taste-scale input:checked + span::before { content: "▼"; position: absolute; top: 2px; font-size: 9px; }
.taste-scale input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: -5px; }
@media (max-width: 420px) { .taste-scale label > span { font-size: 11px; } }

.form-actions {
  position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 40px; padding: 16px 0; background: linear-gradient(transparent, var(--paper) 30%);
}
@media (max-width: 760px) { .form-actions { bottom: calc(88px + env(safe-area-inset-bottom)); } }

/* ---------- login ---------- */
.nav-none .wrap { padding-bottom: 40px; }
.login { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; min-height: calc(100vh - 80px); margin: 0; }
.login-art {
  position: relative; border: 1.5px solid var(--edge); border-radius: 26px; overflow: hidden;
  aspect-ratio: 300 / 380; max-height: 80vh; box-shadow: 10px 10px 0 var(--shadow-c); transform: rotate(-2deg);
}
.login-stamp {
  position: absolute; right: 18px; bottom: 18px; padding: 8px 14px; border-radius: 999px;
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--edge);
  font: 600 11px var(--f-mono); text-transform: uppercase; letter-spacing: .14em;
}
.login-lede { font-size: 19px; color: var(--ink-2); max-width: 34ch; margin: 0 0 30px; }
.login-form { display: flex; flex-direction: column; gap: 22px; max-width: 380px; }
@media (max-width: 760px) {
  .login { grid-template-columns: 1fr; gap: 34px; min-height: 0; }
  .login-art { max-width: 280px; width: 70%; margin: 10px auto 0; }
}

.notfound { text-align: left; padding: 40px 0; }
.notfound h1 { font-family: var(--f-display); font-size: 40px; margin: 10px 0; }
.notfound .btn { margin-top: 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
