/* 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;
  --radius: 14px;
  color-scheme: light;
}
@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;
    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: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); 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-block; 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: repeat(4, minmax(0, 1fr)); gap: 4px 24px; }
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 h3, .now-prune h3 { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.now-prune { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); }
.now-prune ul { display: flex; flex-wrap: wrap; gap: 4px 18px; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 3px 0; }
ul.plain a { color: var(--ink); text-decoration: none; font-weight: 550; }
ul.plain a:hover { 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-x: auto; }
.tl svg { display: block; width: 100%; min-width: 600px; height: auto; }
.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(--accent-soft); }
.lg.alt::before { box-shadow: inset 0 0 0 1px var(--rule-strong); }

/* 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); }
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(--accent-soft); color: var(--ink); }
.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 photos */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: end; }
.crumbs + .hero h1 { margin-top: 14px; }
.latin { margin: -4px 0 12px; font-style: italic; color: var(--muted); }
.hero-img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); background: var(--seg); margin-bottom: 22px; }
.pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; list-style: none; padding: 0; }
.pics a { display: block; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; }
.pics a:hover { border-color: var(--rule-strong); }
.pics img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--seg); }
.pics span { display: block; padding: 8px 12px 10px; }
a.thumb { display: inline-flex; align-items: center; gap: 10px; }
a.thumb img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; background: var(--seg); flex: none; }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; gap: 0; }
  .hero-img { order: -1; aspect-ratio: 2 / 1; margin: 18px 0 0; }
  .crumbs + .hero h1 { margin-top: 18px; }
  .tblwrap, .flush, .zlist, ul.pairs.card, ol.years { padding: 4px 14px; }
  .card { padding: 16px; }
  .now { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  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 { position: relative; padding-left: 92px !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 ut"; }
  .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: "Så/sätt ute"; }
  .pairtbl td + td { font-size: 14px; color: var(--muted); }
  .prunes td:last-child { width: 58%; }
}
@media (max-width: 560px) {
  .pics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .top .wrap { justify-content: space-between; gap: 10px; }
  .brand { font-size: 17px; }
  .brand span { display: none; }
  .top nav a { padding: 5px 9px; font-size: 13px; }
  .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; }
}
