/* Säsongskocken, "Market morning": paper ground, sage and oat surfaces, one tomato accent.
   Fraunces for headings, Figtree for text. Fonts are served from this origin (OFL, see
   fonts/*-OFL.txt). Light only for now. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #FFFCF6;
  --card: #FFFFFF;
  --sage: #EEF3E8;
  --oat: #F3E6CF;
  --peach: #F6DCC8;
  --field: #FBF8F0;
  --ink: #1D2B22;
  --moss: #4F5E53;
  --muted: #5B6A5F;
  --line: #E9E4D8;
  --line-strong: #DCD6C8;
  --tomato: #B23B0B;
  --leaf-ink: #2F6B3A;
  --st-F: #3E7F4A;
  --st-G: #8CC0B0;
  --st-S: #D9A441;
  --st-I: #E7E3D8;
  --h4: #3E7F4A;
  --h3: #8DBF84;
  --h2: #CFE2C6;
  --h1: #EDEAE0;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:hover { color: var(--tomato); }
:focus-visible { outline: 2px solid var(--tomato); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 999px; z-index: 10; }
.skip:focus { left: 16px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
@media (min-width: 720px) { .wrap { padding-left: 24px; padding-right: 24px; } }
.section { padding-top: 56px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Type */
.display { margin: 0; font: 500 clamp(36px, 6vw, 68px)/1.04 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
.h2 { margin: 0; font: 500 clamp(28px, 3.4vw, 36px)/1.15 var(--display); letter-spacing: -0.01em; }
.h3 { margin: 0; font: 500 22px/1.2 var(--display); }
.h4 { font: 500 18px/1.25 var(--display); }
.lede { margin: 0; font-size: 18px; color: var(--moss); max-width: 58ch; }
.eyebrow, .label { font-size: 14px; font-weight: 600; color: var(--moss); margin: 0; }
.eyebrow { color: #3E6B47; }
.label-green { color: #3E6B47; }

/* Header: stays on screen on every page, so the menu is always one tap away. */
.site { position: sticky; top: 0; z-index: 6; background: var(--paper); border-bottom: 1px solid var(--line); }
section[id], [id="resultat"] { scroll-margin-top: 96px; }
.top { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; font: 600 22px/1 var(--display); letter-spacing: -0.01em; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; min-height: 44px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a svg { display: none; }
.nav a[aria-current="page"] { background: var(--sage); font-weight: 600; }

/* Phone: the menu becomes a bottom tab bar. */
@media (max-width: 640px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .top { padding-top: 12px; padding-bottom: 12px; }
  section[id], [id="resultat"] { scroll-margin-top: 64px; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; gap: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .nav a { flex-direction: column; gap: 2px; min-height: 60px; border-radius: 0; font-size: 12px; justify-content: center; color: var(--moss); }
  .nav a svg { display: block; }
  .nav a[aria-current="page"] { background: none; color: var(--ink); }
}

/* Hero band */
.band { background: var(--sage); }
.hero { padding-top: 56px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 22px; }
.hero-text { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.chipset { display: flex; flex-direction: column; gap: 10px; }
.chips, .pills, .tags, .legend, .suggest-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--card); border: 1px solid #D5E2CF; font-weight: 500; font-size: 15px; }
.chip-store { border-color: #E8DDBF; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }

/* Cards */
.section-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.section-intro { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.section-intro p { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
/* Without photos the tinted band stays slim: an icon and the score. */
.card-art { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.card-icon { display: flex; color: rgba(29, 43, 34, 0.3); }
.card-icon svg { width: 34px; height: 34px; }
@media (max-width: 640px) { .panel { padding: 20px; } .verdict-panel { padding: 20px; justify-content: center; } }
.t-oat { background: var(--oat); }
.t-sage { background: #E2ECD9; }
.t-peach { background: var(--peach); }
.score { margin-left: auto; background: var(--card); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 14px; color: var(--leaf-ink); }
.score-meh { color: #7A4A12; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.card-body p { margin: 0; font-size: 15px; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.src { font-size: 14px; color: var(--moss); }
.strip { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; margin-top: 4px; }
.strip span { height: 8px; border-radius: 4px; }
.strip-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

/* Heat and state colours */
.x4 { background: var(--h4); } .x3 { background: var(--h3); } .x2 { background: var(--h2); } .x1 { background: var(--h1); }
.st-F { background: var(--st-F); } .st-G { background: var(--st-G); } .st-S { background: var(--st-S); } .st-I { background: var(--st-I); }
.now { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--tomato); }

/* Recipe check */
.check { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.input-panel { flex: 1 1 340px; max-width: 440px; }
@media (max-width: 760px) { .input-panel { max-width: none; } }
.result { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.pill { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); font-size: 14px; text-decoration: none; }
.pill.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 600; }
.inline { display: flex; gap: 8px; }
input[type="url"] { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 15px; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; min-height: 44px; }
textarea { width: 100%; font: inherit; font-size: 16px; line-height: 1.7; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; resize: vertical; }
input[type="range"] { width: 100%; accent-color: var(--st-F); min-height: 32px; }
.scale { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-top: -6px; }
.btn { font: inherit; font-size: 15px; font-weight: 600; padding: 10px 18px; min-height: 44px; border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); cursor: pointer; flex: none; }
.btn:hover { background: #2E4236; }
.btn-quiet { background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); }
.js .nojs { display: none; }
.ok, .err { margin: 0; font-size: 14px; display: inline-flex; gap: 8px; align-items: flex-start; }
.ok { color: var(--leaf-ink); }
.err { color: var(--tomato); }
.or { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.or::before, .or::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }

/* Verdict */
.verdict-panel { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 28px; padding: 28px; }
.ring { flex: none; max-width: 100%; height: auto; }
.ring path.x4 { fill: var(--h4); } .ring path.x3 { fill: var(--h3); } .ring path.x2 { fill: var(--h2); } .ring path.x1 { fill: var(--h1); }
.ring-m { font: 500 11px var(--body); fill: #2E3B32; }
.ring-m.strong { fill: #FFFFFF; font-weight: 600; }
.ring-now { fill: var(--tomato); stroke: #FFFFFF; stroke-width: 2; }
.ring-pct { font: 500 40px var(--display); fill: var(--ink); }
.ring-sub { font: 400 13px var(--body); fill: var(--muted); }
.verdict { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.verdict-big { margin: 0; font: 500 clamp(30px, 4vw, 44px)/1.08 var(--display); letter-spacing: -0.015em; text-wrap: balance; }
.verdict-big em { font-style: normal; color: var(--tomato); }
.verdict .body { margin: 0; color: var(--moss); }
.tag { padding: 6px 12px; border-radius: 999px; background: var(--sage); font-size: 14px; font-weight: 500; }
.tag-warm { background: #FBF1E4; }

.suggest { background: var(--sage); border-color: #DCE6D4; }
.suggest-list { flex-direction: column; gap: 10px; }
.suggest-item { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 14px; padding: 12px; min-height: 44px; text-decoration: none; }
.swatch { width: 52px; height: 52px; border-radius: 12px; flex: none; }
.suggest-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.suggest-text .muted { font-size: 14px; }

.panel-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; justify-content: space-between; }
.legend { gap: 6px 14px; font-size: 13px; color: var(--moss); }
.legend li { display: inline-flex; gap: 6px; align-items: center; }
.key { width: 14px; height: 10px; border-radius: 5px; }
.scroll { overflow-x: auto; max-width: 100%; position: relative; }
.panel > *, .result > * { min-width: 0; max-width: 100%; }
.grid { width: 100%; min-width: 560px; border-collapse: separate; border-spacing: 4px 6px; }
.grid th { font-weight: 500; font-size: 12px; color: var(--muted); text-align: center; }
.grid th.now { color: var(--tomato); font-weight: 700; box-shadow: none; }
.grid tbody th { text-align: left; font-size: 15px; color: var(--ink); white-space: nowrap; padding-right: 12px; width: 150px; }
.grid tbody th span + span { margin-left: 8px; font-size: 13px; font-weight: 400; }
.grid td { padding: 0; }
.pill-cell { display: block; height: 22px; border-radius: 11px; }
.grid-all tbody th { width: 170px; }

/* Footer */
.foot { border-top: 1px solid var(--line); margin-top: 48px; }
.foot .wrap { padding-top: 24px; padding-bottom: 32px; font-size: 14px; color: var(--muted); }
.foot p { margin: 0 0 4px; }
.link { color: var(--tomato); }

/* Bookmarklet page */
.bookmark-panel { max-width: 760px; margin-top: 24px; }
.bookmark-panel .h2 { font-size: 24px; }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; line-height: 1.6; }
.steps .btn { display: inline-flex; align-items: center; margin: 4px 0 0 4px; text-decoration: none; cursor: grab; }
.nowrap { white-space: nowrap; }
textarea.code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 13px; line-height: 1.5; word-break: break-all; }
.credit { margin: 0 0 12px; }

/* Recipe list */
.search { display: flex; gap: 8px; max-width: 560px; margin: 24px 0; }
.search input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 16px; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; min-height: 44px; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.pager .btn { display: inline-flex; align-items: center; text-decoration: none; }
