/* Same look as ETFlabbet: neutral greys, cards, a segmented menu; the accent is this site's own colour (emerald) */
:root {
  --bg: #f5f6f8; --card: #ffffff; --seg: #e9ecf0; --ink: #15181d; --muted: #646c76; --rule: #e3e6eb; --rule-strong: #c9ced6; --hover: #f6f7f9;
  --accent: #047857; --accent-ink: #ffffff; --accent-soft: #dcf3e9; --tld: #059669; --leaf: #3d9a3a; --leaf-dark: #2f7d2c; --lo: #3f7d20; --no: #b03a2a;
  --t-in: #d99a2b; --t-out: #3f7d20; --t-dir: #2f8a8a; --t-hv: #c0573e; --mark: #fbf3d6; --alt-bg: #fcedc2; --alt-ink: #704200; --alt-ring: #e2b95b;
  --radius: 14px;
  color-scheme: light;
}
/* Explicit light and dark theme overrides */
html[data-theme="light"] {
  --bg: #f5f6f8; --card: #ffffff; --seg: #e9ecf0; --ink: #15181d; --muted: #646c76; --rule: #e3e6eb; --rule-strong: #c9ced6; --hover: #f6f7f9;
  --accent: #047857; --accent-ink: #ffffff; --accent-soft: #dcf3e9; --tld: #059669; --leaf: #3d9a3a; --leaf-dark: #2f7d2c; --lo: #3f7d20; --no: #b03a2a;
  --t-in: #d99a2b; --t-out: #3f7d20; --t-dir: #2f8a8a; --t-hv: #c0573e; --mark: #fbf3d6; --alt-bg: #fcedc2; --alt-ink: #704200; --alt-ring: #e2b95b;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #0e1114; --card: #171a1f; --seg: #22262c; --ink: #e7e9ec; --muted: #959ba3; --rule: #2a2f36; --rule-strong: #3c424a; --hover: #1c2026;
  --accent: #34d399; --accent-ink: #062a1d; --accent-soft: #13291f; --tld: #34d399; --leaf: #7cc96a; --leaf-dark: #5fae4f; --lo: #8ccf62; --no: #e8836f;
  --t-in: #e8b45a; --t-out: #8ccf62; --t-dir: #5cc0bd; --t-hv: #e8836f; --mark: #2a2716; --alt-bg: rgba(232, 180, 90, 0.22); --alt-ink: #f3ce82; --alt-ring: rgba(232, 180, 90, 0.45);
  color-scheme: dark;
}

/* Theme toggle button in header */
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  flex: 0 0 34px;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  box-sizing: border-box;
  margin-left: auto;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.theme-btn:hover {
  color: var(--ink);
  border-color: var(--rule-strong);
  background: var(--hover);
}
.theme-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
.theme-btn .ico-sun { display: none; }
.theme-btn .ico-moon { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-btn .ico-sun { display: block; }
  html:not([data-theme="light"]) .theme-btn .ico-moon { display: none; }
}
html[data-theme="dark"] .theme-btn .ico-sun { display: block !important; }
html[data-theme="dark"] .theme-btn .ico-moon { display: none !important; }
html[data-theme="light"] .theme-btn .ico-sun { display: none !important; }
html[data-theme="light"] .theme-btn .ico-moon { display: block !important; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1114; --card: #171a1f; --seg: #22262c; --ink: #e7e9ec; --muted: #959ba3; --rule: #2a2f36; --rule-strong: #3c424a; --hover: #1c2026;
    --accent: #34d399; --accent-ink: #062a1d; --accent-soft: #13291f; --tld: #34d399; --leaf: #7cc96a; --leaf-dark: #5fae4f; --lo: #8ccf62; --no: #e8836f;
    --t-in: #e8b45a; --t-out: #8ccf62; --t-dir: #5cc0bd; --t-hv: #e8836f; --mark: #2a2716; --alt-bg: rgba(232, 180, 90, 0.22); --alt-ink: #f3ce82; --alt-ring: rgba(232, 180, 90, 0.45);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { position: relative; background: var(--bg); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 750; font-size: 19px; letter-spacing: -0.025em; color: var(--ink); text-decoration: none; }
.brand .tld { color: var(--tld); }
.mk-ico { width: 32px; height: 32px; flex: none; margin: -4px 0; }
.mk-ico .glass { fill: none; stroke: var(--ink); }
.mk-ico .liquid { fill: var(--accent); }
.mk-ico .bub { fill: #fff; opacity: .45; }
.mk-ico .stem { fill: none; stroke: var(--leaf-dark); }
.mk-ico .leaf { fill: var(--leaf); }
.mk-ico .leaf2 { fill: var(--leaf-dark); }
.top nav { display: flex; gap: 2px; padding: 3px; background: var(--seg); border-radius: 999px; }
.top nav a { padding: 5px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 550; white-space: nowrap; }
.top nav a:hover { color: var(--ink); }
.top nav a[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* text */
main.wrap { padding-bottom: 48px; }
h1 { font-weight: 720; font-size: clamp(30px, 5vw, 44px); line-height: 1.08; letter-spacing: -0.03em; margin: 36px 0 10px; }
.crumbs + h1 { margin-top: 14px; }
h2 { font-weight: 650; font-size: 19px; letter-spacing: -0.01em; margin: 36px 0 10px; }
h3 { font-weight: 650; font-size: 15px; margin: 20px 0 6px; }
.lead { font-size: 16px; color: var(--muted); max-width: 660px; margin: 0 0 22px; }
.lead b { color: var(--ink); font-weight: 650; }
p, li { max-width: 720px; }
.small { font-size: 13px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; }
.card > h2:first-child { margin-top: 0; }
.flush { padding: 4px 20px; }
.note { margin-top: 36px; }
.note p:last-child { margin-bottom: 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 22px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

.links { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.links a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 550; }
.links a:hover { border-color: var(--rule-strong); background: var(--hover); }

/* tables sit in a card, like ETFlabbet's fund list */
.tblwrap { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 4px 20px; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 550; color: var(--muted); padding: 10px 8px 8px; border-bottom: 1px solid var(--rule); vertical-align: bottom; }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.tbl td a { color: var(--ink); text-decoration: none; font-weight: 550; }
.tbl td a:hover { color: var(--accent); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .ok { color: var(--lo); font-weight: 600; }
.tbl .no { color: var(--no); font-weight: 600; }
.tblwrap + .small { margin-top: 10px; }

/* zone picker: the same segmented look as the menu */
.zonepick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 20px; }
.zonepick > span { font-size: 13px; font-weight: 550; color: var(--muted); }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--seg); border-radius: 999px; }
.seg button { font: inherit; font-size: 14px; font-weight: 600; min-width: 38px; padding: 5px 10px; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.zonepick .small { font-size: 13px; }

/* only the chosen zone's tasks are shown; every zone is in the HTML */
.now { display: none; grid-template-columns: 1fr; gap: 12px; }
body[data-zone="1"] .now[data-z="1"] { display: grid; }
body[data-zone="2"] .now[data-z="2"] { display: grid; }
body[data-zone="3"] .now[data-z="3"] { display: grid; }
body[data-zone="4"] .now[data-z="4"] { display: grid; }
body[data-zone="5"] .now[data-z="5"] { display: grid; }
body[data-zone="6"] .now[data-z="6"] { display: grid; }
body[data-zone="7"] .now[data-z="7"] { display: grid; }
body[data-zone="8"] .now[data-z="8"] { display: grid; }
.now > p { grid-column: 1 / -1; margin: 0; }
.now > div + div { padding-top: 12px; border-top: 1px solid var(--rule); }
.now h3, .now-prune h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.now-prune { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
ul.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
ul.plain li { padding: 0; margin: 0; }
ul.plain a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 8px; background: var(--seg); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 550; line-height: 1.3; }
ul.plain a:hover { background: var(--accent-soft); color: var(--accent); }

/* highlight the chosen zone in timelines and lists */
body[data-zone="1"] [data-row="1"],
body[data-zone="2"] [data-row="2"],
body[data-zone="3"] [data-row="3"],
body[data-zone="4"] [data-row="4"],
body[data-zone="5"] [data-row="5"],
body[data-zone="6"] [data-row="6"],
body[data-zone="7"] [data-row="7"],
body[data-zone="8"] [data-row="8"] { --row: var(--mark); }
body[data-zone="1"] .zlist [data-row="1"],
body[data-zone="2"] .zlist [data-row="2"],
body[data-zone="3"] .zlist [data-row="3"],
body[data-zone="4"] .zlist [data-row="4"],
body[data-zone="5"] .zlist [data-row="5"],
body[data-zone="6"] .zlist [data-row="6"],
body[data-zone="7"] .zlist [data-row="7"],
body[data-zone="8"] .zlist [data-row="8"] { background: var(--mark); }

/* sowing and harvest timeline */
.tl { margin: 0 0 8px; padding: 14px 16px 12px; overflow: hidden; }
.tl- { display: flex; align-items: flex-start; width: 100%; }
.tl-left { flex: 0 0 54px; width: 54px; height: 294px; display: block; border-right: 1px solid var(--rule); }
.tl-scroll { flex: 1 1 auto; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tl-months { display: block; width: 100%; min-width: 580px; height: 294px; }
.tl .rowbg { fill: var(--row, transparent); }
.tl .g { stroke: var(--rule); stroke-width: 1; }
.tl text { font-size: 11px; fill: var(--muted); }
.tl .zl { fill: var(--ink); font-weight: 600; }
.t-in { fill: var(--t-in); } .t-out { fill: var(--t-out); } .t-dir { fill: var(--t-dir); } .t-hv { fill: var(--t-hv); }
.tl figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; margin-top: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); }
.lg::before { content: ""; display: inline-block; width: 12px; height: 8px; border-radius: 2px; margin-right: 6px; background: var(--c); vertical-align: 1px; }
.lg.t-in { --c: var(--t-in); } .lg.t-out { --c: var(--t-out); } .lg.t-dir { --c: var(--t-dir); } .lg.t-hv { --c: var(--t-hv); }
.lg.on { --c: var(--accent); } .lg.alt { --c: var(--alt-bg); }
.lg.alt::before { box-shadow: inset 0 0 0 1px var(--alt-ring); }

/* per-zone sentences */
.zlist { margin: 0; padding: 4px 20px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.zlist > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 10px 12px; margin: 0 -12px; border-bottom: 1px solid var(--rule); border-radius: 8px; }
.zlist > div:last-child { border-bottom: 0; }
.zlist dt { font-weight: 650; }
.zlist dd { margin: 0; }

/* key facts */
dl.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 18px; }
dl.facts > div { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; }
dl.facts dt { font-size: 12px; color: var(--muted); }
dl.facts dd { margin: 2px 0 0; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }

/* companions */
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.two > .card > h3:first-child { margin-top: 0; }
h3.ok, .ok { color: var(--lo); }
h3.no, .no { color: var(--no); }
ul.pairs { list-style: none; margin: 0; padding: 0; }
ul.pairs.card { padding: 4px 20px; }
ul.pairs li { max-width: none; padding: 10px 0; border-bottom: 1px solid var(--rule); }
ul.pairs li:last-child { border-bottom: 0; }
ul.pairs a { color: var(--ink); text-decoration: none; }
ul.pairs a:hover { color: var(--accent); }
ul.pairs span { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.tile { display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; }
.tile:hover { border-color: var(--rule-strong); background: var(--hover); }
.tile b { font-size: 16px; font-weight: 650; }
.tile span { font-size: 14px; color: var(--muted); }
.tile span.tool-cta { font-size: 13px; font-weight: 650; color: var(--accent); margin-top: auto; padding-top: 6px; }
section.card { margin-top: 8px; }

/* pruning months */
.mbar { list-style: none; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; margin: 0; padding: 0; }
.mbar li { max-width: none; text-align: center; font-size: 11px; color: var(--muted); padding: 4px 0; border-radius: 5px; background: var(--seg); }
.mbar li.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.mbar li.alt { background: var(--alt-bg); color: var(--alt-ink); box-shadow: inset 0 0 0 1px var(--alt-ring); font-weight: 550; }
.mcard { margin: 0; }
.mcard .legend { margin-top: 10px; }
.prunes td:last-child { width: 62%; }
.prunes td { vertical-align: middle; }
ol.steps { padding-left: 0; list-style: none; counter-reset: s; }
ol.steps li { counter-increment: s; position: relative; padding: 4px 0 4px 36px; }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; text-align: center; line-height: 24px; }
ol.years { list-style: none; margin: 0; padding: 4px 20px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
ol.years li { max-width: none; padding: 12px 0; border-bottom: 1px solid var(--rule); }
ol.years li:last-child { border-bottom: 0; }
ol.years p { margin: 3px 0 0; }

.zonecal th[scope="row"] { font-size: 15px; font-weight: 650; color: var(--ink); vertical-align: top; padding-top: 10px; }
.zonecal td a, .crops td a { font-weight: 550; }
.zonecal td { font-size: 14px; }

.foot { margin-top: 0; border-top: 1px solid var(--rule); font-size: 12px; color: var(--muted); }
.foot .wrap { padding-top: 20px; padding-bottom: 40px; }
.foot p { max-width: 640px; margin: 0 0 6px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }


/* Plant cards & titles */
.latin { margin: -4px 0 12px; font-style: italic; color: var(--muted); }
.pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 8px; list-style: none; padding: 0; }
.pics a { display: flex; align-items: center; gap: 9px; padding: 10px 13px; background: var(--card); border: 1px solid var(--rule); border-radius: 11px; color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 600; transition: border-color .15s, background .15s; }
.pics a:hover { border-color: var(--rule-strong); background: var(--hover); color: var(--accent); }
.pics .pico { width: 22px; height: 22px; }
.pics span { display: inline; padding: 0; }
a.thumb { display: inline-flex; align-items: center; gap: 8px; }
a.thumb .pico { width: 20px; height: 20px; }

@media (max-width: 720px) {
  .tblwrap, .flush, .zlist, ul.pairs.card, ol.years { padding: 4px 14px; }
  .card { padding: 16px; }
  dl.facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: minmax(0, 1fr); }
  /* long text tables become one block per row */
  .zonecal thead, .crops thead, .pairtbl thead { display: none; }
  .zonecal tr, .crops tr, .pairtbl tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .zonecal tbody tr:last-child, .crops tbody tr:last-child, .pairtbl tbody tr:last-child { border-bottom: 0; }
  .zonecal th, .zonecal td, .crops td, .pairtbl td { display: block; padding: 2px 0 !important; border: 0 !important; }
  .zonecal td, .crops td.c-in, .crops td.c-dir, .crops td.c-hv, .crops td.c-pk { position: relative; padding-left: 92px !important; text-align: left !important; }
  .zonecal td::before, .crops td.c-in::before, .crops td.c-dir::before, .crops td.c-hv::before { position: absolute; left: 0; top: 4px; font-size: 12px; color: var(--muted); }
  .zonecal td:nth-child(2)::before, .crops td.c-in::before { content: "Så inne"; }
  .zonecal td:nth-child(3)::before { content: "Plantera/sätt"; }
  .zonecal td:nth-child(4)::before { content: "Så ute"; }
  .zonecal td:nth-child(5)::before, .crops td.c-hv::before { content: "Skörd"; }
  .crops td.c-dir::before { content: "Utomhus"; }
  .crops td.c-pk::before { position: absolute; left: 0; top: 4px; font-size: 12px; color: var(--muted); content: "I pallkrage"; font-weight: 400; }
  .pairtbl td + td { font-size: 14px; color: var(--muted); }
  .prunes td:last-child { width: 58%; }
}
@media (max-width: 780px) {
  .top .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: auto;
    padding-top: 9px;
    padding-bottom: 9px;
  }
  .brand {
    flex: 0 0 auto;
    font-size: 17.5px;
    order: 1;
  }
  .theme-btn {
    flex: 0 0 34px !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    margin-left: auto;
    order: 2;
  }
  .top nav {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px 4px;
    padding: 5px 6px;
    border-radius: 14px;
    overflow-x: visible;
  }
  .top nav a {
    padding: 5px 10px;
    font-size: 13px;
  }
}
@media (max-width: 560px) {
  .pics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .seg button { min-width: 0; padding: 5px 7px; font-size: 13px; }
  .zlist > div { grid-template-columns: 64px minmax(0, 1fr); }
  .prunes .mbar li { font-size: 0; padding: 7px 0; }
  .prunes .mbar li span { display: block; }
  .prunes .mbar li span::first-letter { font-size: 10px; text-transform: uppercase; }
}


/* ---------- Hardware, Calculators & Price Comparison ---------- */
.top nav { overflow-x: auto; max-width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.top nav::-webkit-scrollbar { display: none; }

.only-sm { display: none; }

.tool-trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
}
.tool-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
}
.tool-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 8px;
}
.tool-card h2, .tool-card b.tool-title {
  display: block;
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.tool-card p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.45;
}
.tool-cta {
  font-size: 13px;
  font-weight: 650;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin: 0 0 14px;
}
.preset-bar > span {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 2px;
  white-space: nowrap;
}
.preset-btn {
  appearance: none;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex: none;
  transition: border-color .12s, background .12s;
}
.preset-btn:hover {
  border-color: var(--rule-strong);
  background: var(--hover);
}
.preset-btn.active, .preset-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 650;
}

.calc-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin: 12px 0 28px;
}
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field label, .field-lbl {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.field label span.unit, .field-lbl span.unit {
  font-size: 11.5px;
  font-weight: 450;
  color: var(--muted);
}
.field input[type="number"],
.field select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 550;
}

/* Segmented touch pills for calculators */
.seg-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.seg-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.seg-btn {
  appearance: none;
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  padding: 8px 8px;
  border-radius: 9px;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  transition: border-color .12s, background .12s, color .12s;
}
.seg-btn:hover {
  border-color: var(--accent);
}
.seg-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}
.seg-btn small {
  display: block;
  font-size: 11px;
  font-weight: 450;
  color: var(--muted);
  margin-top: 1px;
}
.seg-btn.active small {
  color: var(--accent);
}

/* Stepper (- [ 1 ] +) */
.stepper {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  border: 1px solid var(--rule-strong);
  border-radius: 9px;
  background: var(--bg);
  overflow: hidden;
  height: 36px;
}
.step-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.step-btn:hover {
  background: var(--seg);
}
.stepper input[type="number"] {
  border: 0 !important;
  border-left: 1px solid var(--rule) !important;
  border-right: 1px solid var(--rule) !important;
  border-radius: 0 !important;
  text-align: center;
  padding: 4px 2px !important;
  height: 100%;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  background: var(--card) !important;
  -moz-appearance: textfield;
}
.stepper input[type="number"]::-webkit-outer-spin-button,
.stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}
.field-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.field-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.chk-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--rule);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}
.chk-field input {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex: none;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}
.kpi-box {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 11px;
  padding: 11px 12px;
}
.kpi-box.hi {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--rule));
}
.kpi-lbl {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-val {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 2px 0 1px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kpi-box.hi .kpi-val {
  color: var(--accent);
}
.kpi-sub {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.25;
}

.recipe-box {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.recipe-box:last-child {
  margin-bottom: 0;
}
.recipe-box h3 {
  margin: 0 0 6px;
  font-size: 14.5px;
}
.layer-bar {
  display: flex;
  height: 24px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  margin: 8px 0 10px;
  font-size: 11px;
  font-weight: 700;
}
.layer-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  padding: 0 4px;
}
.layer-sajord { background: #c58b2b; }
.layer-kogodsel { background: #5a3e28; }
.layer-pjord { background: #2f7d2c; }
.layer-botten { background: #7b8462; }
.layer-bark { background: #6e472b; }

.bag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}
.bag-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 9px;
  max-width: none;
  font-size: 13.5px;
}
.bag-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bag-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.bag-badge {
  display: inline-block;
  font-weight: 700;
  font-size: 12.5px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.shop-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.shop-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 9px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.shop-btn:hover {
  background: var(--accent);
  color: var(--accent-ink);
}
.shop-btn.alt {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--rule-strong);
}
.shop-btn.alt:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.price-pill {
  display: inline-block;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  white-space: nowrap;
}
.num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.equip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 12px 0 24px;
}
.equip-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.equip-card h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
}
.equip-meta {
  font-size: 12px;
  color: var(--muted);
  font-weight: 550;
}
.equip-why {
  font-size: 13.5px;
  margin: 0;
  color: var(--ink);
}
.equip-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}
.equip-price {
  font-size: 15.5px;
  font-weight: 750;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.crop-hw-box {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px;
  margin: 22px 0;
}
.crop-hw-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 10px;
}
.pk-viz-wrap {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px;
}
.pk-viz-wrap svg {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 8px auto;
}

.match-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.match-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--card);
  border: 1px solid var(--rule);
}
.match-item.best {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 35%, var(--card));
}

@media (max-width: 820px) {
  .tool-trio { grid-template-columns: 1fr; gap: 10px; }
  .calc-grid { grid-template-columns: 1fr; gap: 12px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .equip-grid { grid-template-columns: 1fr; gap: 10px; }
  .crop-hw-grid { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 680px) {
  .hide-sm { display: none !important; }
  .only-sm { display: block; }

  h1 { font-size: 26px; margin: 20px 0 8px; }
  .lead { font-size: 14.5px; margin-bottom: 14px; }

  .preset-bar {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 6px;
    margin: 0 0 12px;
    padding: 0;
  }
  .preset-btn { padding: 5px 10px; font-size: 12.5px; }
  .prod-tbl thead { display: none; }
  .prod-tbl, .prod-tbl tbody { display: block; width: 100%; }
  .prod-tbl tr {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
  }
  .prod-tbl tbody tr:last-child { border-bottom: 0; }
  .prod-tbl td { border: 0 !important; padding: 0 !important; }
  .prod-tbl td:first-child { flex: 1 1 180px; min-width: 0; }
  .prod-tbl td.num:not(.hide-sm) { flex: 0 0 auto; text-align: right; }
  .prod-tbl td:last-child { flex: 0 0 100%; width: 100%; margin-top: 2px; }
  .prod-tbl td:last-child .shop-links { width: 100%; gap: 6px; }

  .card.calc-form { padding: 14px; gap: 10px; }
  .kpi-box { padding: 9px 11px; }
  .kpi-val { font-size: 19px; }
  .recipe-box { padding: 11px; }

  .bag-list li {
    padding: 8px 10px;
    gap: 6px;
  }
  .bag-list .shop-links {
    width: 100%;
    justify-content: flex-start;
  }

  .tbl th, .tbl td { padding: 8px 5px; font-size: 13.5px; }
  .shop-btn { padding: 4px 8px; font-size: 11.5px; }

  .crop-hw-box { padding: 14px; margin: 18px 0; }
  .pk-viz-wrap { padding: 12px; }
}

/* Plant & category inline SVG icons (.pico, .prod-ico) */
.pico { width: 17px; height: 17px; flex: none; display: inline-block; vertical-align: -3px; }
h1 .pico { width: 0.82em; height: 0.82em; vertical-align: -0.09em; margin-right: 7px; }
h2 .pico { width: 0.92em; height: 0.92em; vertical-align: -0.12em; margin-right: 4px; }
.prod-ico {
  width: 28px;
  height: 28px;
  flex: none;
  display: block;
  margin-top: 2px;
}
.prod-ico-sm {
  width: 24px;
  height: 24px;
  margin-top: 1px;
}
.prod-ico-lg {
  width: 34px;
  height: 34px;
  margin-top: 0;
}
ul.pairs a b { display: inline-flex; align-items: center; gap: 6px; }
.thumb span { display: inline-flex; align-items: center; gap: 6px; }
.ico-link { display: inline-flex; align-items: center; gap: 4px; }
.ico-link .pico { width: 15px; height: 15px; vertical-align: -2px; }
#soil-crop-out .pico { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; }

/* Real product thumbnails extracted from linked retailer product pages (.prod-img) */
.prod-cell {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.prod-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 2px;
  flex: none;
  display: block;
}
.prod-img-sm {
  width: 38px;
  height: 38px;
  border-radius: 7px;
}
.prod-img-lg {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  padding: 3px;
}
.equip-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mini-prod-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}
.mini-prod {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--rule);
}
.pk-viz-wrap .mini-prod {
  background: var(--card);
}
.mini-prod-body {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
}
.mini-prod-body b {
  display: block;
  font-weight: 650;
  color: var(--ink);
}
@media (max-width: 680px) {
  .prod-img { width: 38px; height: 38px; }
  .prod-img-lg { width: 44px; height: 44px; }
  .mini-prod { flex-wrap: wrap; }
}

[hidden] { display: none !important; }


/* Search bar & instant results */
.odl-search-box {
  margin: 14px 0 18px;
}
.odl-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1.5px solid var(--rule-strong);
  border-radius: 12px;
  padding: 9px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.odl-search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.odl-search-sm {
  padding: 6px 11px;
  border-radius: 10px;
  flex: 1 1 240px;
  max-width: 340px;
}
.odl-s-ico {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex: none;
}
.odl-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
}
.odl-search-sm .odl-search-input {
  font-size: 14px;
}
.odl-search-input::placeholder {
  color: var(--muted);
}
.odl-search-clear {
  border: 0;
  background: var(--seg);
  color: var(--muted);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  padding: 0;
}
.odl-search-clear:hover {
  color: var(--ink);
}
.odl-search-results {
  margin-top: 8px;
  background: var(--card);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.odl-search-meta {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 8px;
}
.odl-hit-list {
  display: grid;
  gap: 8px;
  max-height: 440px;
  overflow-y: auto;
}
.odl-hit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--bg);
}
.odl-hit-main {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
  flex: 1;
}
.odl-hit-info {
  min-width: 0;
  flex: 1;
}
.odl-hit-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.odl-hit-top a.tool-badge {
  text-decoration: none;
}
.odl-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
}
.odl-filter-stack {
  display: grid;
  gap: 10px;
  margin: 14px 0 18px;
}
@media (max-width: 680px) {
  .odl-hit {
    flex-direction: column;
    align-items: stretch;
  }
  .odl-search-sm {
    max-width: none;
    width: 100%;
  }
}


.guide-quartet {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: -10px 0 24px;
}
@media (max-width: 820px) {
  .guide-quartet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
@media (max-width: 480px) {
  .guide-quartet {
    grid-template-columns: 1fr;
  }
}

.faq details { border-top: 1px solid var(--rule); padding: 10px 0; }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.faq summary:hover { color: var(--accent); }
.faq details p { margin: 8px 0 2px; color: var(--ink); line-height: 1.55; }
