/*
 * zaadzak · morninggloryheavenlyblue.com
 * 1. Concept: a vintage seed packet and the seed catalogue it came with. The home page IS the packet
 *    (front panel with a lithograph and the name, back panel with calendar, growing table, caution box, contents).
 * 2. Type: Caprasimo (a 1920s soft fat-face, for names and headings) + Libre Franklin (Franklin Gothic revival, text and labels).
 * 3. Palette: cream #f4ead3, sky blue #3f78b8, deep violet #2f2557, warm red #b13a26, kraft #e7d9b6.
 * 4. Layout signature: two packet panels with a cut flap side by side; article pages as catalogue pages under a packet tab,
 *    numbered "No." entries, running head, leader-dotted tables.
 * 5. Finishing detail: dashed perforation lines and a red caution box, as printed on the back of real packets.
 */
@font-face { font-family: "Caprasimo"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/caprasimo-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caprasimo"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/caprasimo-400-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/librefranklin-normal-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/librefranklin-normal-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Libre Franklin"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(fonts/librefranklin-italic-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Libre Franklin"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(fonts/librefranklin-italic-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --cream: #f4ead3;
  --paper: #fbf5e6;
  --kraft: #e7d9b6;
  --sky: #3f78b8;
  --sky-deep: #2c5d96;
  --sky-pale: #dbe6f1;
  --violet: #2f2557;
  --ink: #241c3f;
  --muted: #5a5170;
  --red: #b13a26;
  --line: #cdbb92;
  --display: "Caprasimo", "Cooper Black", Georgia, serif;
  --text: "Libre Franklin", "Franklin Gothic Book", Arial, sans-serif;
  --measure: 66ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 1.0625rem/1.65 var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky-deep); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--violet); color: var(--paper); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- masthead ---------- */
.mast { background: var(--violet); color: var(--paper); border-bottom: 4px solid var(--sky); }
.mast-row { max-width: 76rem; margin: 0 auto; padding: .7rem 1rem; display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--paper); text-decoration: none; margin-right: auto; }
.brand img { width: 2.1rem; height: 2.1rem; background: var(--paper); border-radius: 50%; padding: .15rem; }
.brand-name { font: 400 1.35rem/1 var(--display); letter-spacing: .01em; }
.brand-sub { font-style: italic; font-size: .85rem; color: #cfc6e6; display: none; }
.primary { display: none; }
.primary a, .menu nav a { color: var(--paper); text-decoration: none; font-size: .85rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.nav-no { font-weight: 400; color: #b9c9e4; margin-right: .35rem; font-variant-numeric: tabular-nums; }
.primary a[aria-current="page"], .menu nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-decoration-color: var(--sky); text-decoration-thickness: 3px; text-underline-offset: .5em; }
.primary a:hover, .menu nav a:hover { color: #fff; }
.menu { position: relative; }
.menu summary { cursor: pointer; list-style: none; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border: 1px solid #8f86b5; padding: .35rem .7rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] nav { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 5; background: var(--violet); border: 1px solid #8f86b5; padding: .5rem 0; min-width: 16rem; display: grid; }
.menu[open] nav a { padding: .55rem 1rem; }
@media (min-width: 64rem) {
  .brand-sub { display: inline; }
  .primary { display: flex; gap: 1.1rem; flex-wrap: wrap; justify-content: flex-end; }
  .menu { display: none; }
}

/* ---------- home: the packet ---------- */
.counter { padding: 1.5rem 1rem 2.5rem; background: var(--kraft); border-bottom: 1px solid var(--line); }
.packets { max-width: 76rem; margin: 0 auto; display: grid; gap: 2.5rem; }
@media (min-width: 60rem) { .packets { grid-template-columns: 1fr 1fr; gap: 2rem; align-items: stretch; } }
.packet { position: relative; display: flex; flex-direction: column; }
.side-tag { margin: 0 0 .4rem; font-size: .72rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.flap { height: 2.2rem; background: var(--sky-deep); clip-path: polygon(5% 100%, 9% 0, 91% 0, 95% 100%); }
.back .flap { background: var(--paper); clip-path: polygon(0 100%, 4% 0, 96% 0, 100% 100%); border: 0; }
.front-face, .back-face { flex: 1; border-top: 2px dashed var(--violet); }

.front-face { background: var(--sky); color: var(--paper); padding: .8rem; display: grid; grid-template-rows: auto 1fr auto; }
.front-top { margin: 0 0 .7rem; display: flex; justify-content: space-between; font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.front-art { background: var(--paper); border: 3px solid var(--paper); outline: 1px solid var(--violet); outline-offset: -8px; overflow: hidden; }
.front-art img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 2 / 3; }
.front-name { background: var(--violet); margin: .8rem -.8rem -.8rem; padding: 1rem 1rem 1.2rem; border-top: 6px solid var(--red); }
.front-latin { margin: 0; font-style: italic; color: #cfc6e6; font-size: 1rem; }
.front-name h1 { margin: .1rem 0 .3rem; font: 400 clamp(2.5rem, 9vw, 4.6rem)/.95 var(--display); color: var(--paper); letter-spacing: -.005em; }
.front-note { margin: 0; font-size: .95rem; color: #e9e2f6; }
@media (min-width: 60rem) {
  .front-art img { aspect-ratio: auto; max-height: 46rem; }
}

.back-face { background: var(--paper); padding: 1.2rem 1.1rem 1.4rem; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.back-title, .contents-title { margin: 0 0 .8rem; font: 400 1.65rem/1.1 var(--display); color: var(--violet); }
.contents-title { font-size: 1.35rem; margin-top: 1.4rem; }

.cal { overflow-x: auto; margin: 0 0 1rem; }
.cal table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 19rem; font-size: .78rem; }
.cal caption { text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-bottom: .4rem; }
.cal th { font-weight: 700; color: var(--violet); padding: .2rem 0; }
.cal thead th { text-align: center; border-bottom: 2px solid var(--violet); }
.cal tbody th { text-align: left; font-weight: 600; padding-right: .5rem; white-space: nowrap; }
.cal thead th:first-child { width: 6.2rem; }
.cal td { border-left: 1px solid var(--line); height: 1.6rem; padding: 0; }
.cal tbody tr { border-bottom: 1px dashed var(--line); }
.cal td.on { background-clip: content-box; padding: .3rem 0; }
.cal-sow td.on { background-color: var(--kraft); box-shadow: inset 0 0 0 1px #b8a26f; }
.cal-out td.on { background-color: var(--sky); }
.cal-bloom td.on { background-color: var(--violet); }

.grow { margin: 0; display: grid; border-top: 2px solid var(--violet); }
.grow div { display: grid; grid-template-columns: 7.2rem 1fr; gap: .6rem; padding: .38rem 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.grow dt { font-weight: 700; color: var(--violet); }
.grow dd { margin: 0; }
.grow-more { margin: .5rem 0 0; font-size: .9rem; font-weight: 600; }

.warn { margin: 1.2rem 0 0; border: 2px solid var(--red); padding: .75rem .9rem .85rem; background: #fff8ef; }
.warn p { margin: 0; font-size: .92rem; line-height: 1.5; }
.warn .warn-head { font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--red); font-size: .76rem; margin-bottom: .25rem; }

.contents ol { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--violet); }
.contents li a { display: grid; grid-template-columns: 2.4rem 1fr; gap: .4rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); text-decoration: none; color: var(--ink); }
.contents li a:hover .c-name { color: var(--red); }
.c-no { font: 400 1.05rem/1.4 var(--display); color: var(--sky-deep); }
.c-name { font-weight: 600; line-height: 1.35; }

.leaflet { max-width: 46rem; margin: 2.5rem auto 3rem; padding: 0 1rem; }
.leaflet-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; margin: 0 0 1.2rem; padding-bottom: .5rem; border-bottom: 2px solid var(--violet); font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ---------- article: catalogue page ---------- */
.catalogue { max-width: 76rem; margin: 0 auto; padding: 1.6rem 1rem 3rem; }
.tabhead { position: relative; margin-top: 1.6rem; }
.tab { position: absolute; left: 0; top: -1.85rem; margin: 0; height: 1.85rem; padding: .35rem 1.4rem 0 1rem; background: var(--sky); color: var(--paper); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; clip-path: polygon(0 0, calc(100% - .9rem) 0, 100% 100%, 0 100%); }
.tab-no { font-family: var(--display); font-weight: 400; letter-spacing: .04em; margin-right: .6rem; color: var(--violet); }
.tabhead-body { background: var(--sky); color: var(--paper); padding: 1.1rem 1.1rem 1.4rem; border-bottom: 6px solid var(--red); }
.running { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; padding-bottom: .4rem; border-bottom: 1px dashed #b9cfe8; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #e3ecf7; }
.running span:last-child { font-style: italic; text-transform: none; letter-spacing: .02em; font-weight: 400; }
.tabhead h1 { margin: 0; max-width: 22ch; font: 400 clamp(2.1rem, 6vw, 3.6rem)/1.02 var(--display); color: #fff; }
.lede { margin: .9rem 0 0; max-width: 60ch; font-size: 1.08rem; color: #f1f5fb; }
.stamp { margin: .9rem 0 0; display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; border: 1px solid #d4e1f1; padding: .2rem .5rem; color: #fff; }

.sheet { background: var(--paper); border: 1px solid var(--line); border-top: 0; padding: 1.4rem 1.1rem 2rem; display: grid; gap: 1.6rem; }
@media (min-width: 60rem) {
  .tabhead-body { padding: 1.6rem 2.2rem 2rem; }
  .sheet { grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; padding: 2.2rem 2.2rem 3rem; }
  .sheet > .prose:only-child { grid-column: 2; }
  .toc { position: sticky; top: 1rem; }
}
.toc { align-self: start; border-top: 2px solid var(--violet); }
.toc-head { margin: .5rem 0 .4rem; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: t; }
.toc li { counter-increment: t; border-bottom: 1px dashed var(--line); }
.toc a { display: grid; grid-template-columns: 1.8rem 1fr; padding: .4rem 0; font-size: .9rem; line-height: 1.35; color: var(--ink); text-decoration: none; }
.toc a::before { content: counter(t, decimal-leading-zero); font-family: var(--display); color: var(--sky-deep); }
.toc a:hover { color: var(--red); }

.next { margin-top: 2rem; }
.next-head { margin: 0 0 .6rem; font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.next ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 1rem; }
@media (min-width: 48rem) { .next ol { grid-template-columns: repeat(3, 1fr); } }
.next a { display: block; height: 100%; background: var(--paper); border: 1px solid var(--line); border-top: 2px dashed var(--violet); padding: .9rem 1rem 1rem; text-decoration: none; color: var(--ink); }
.next a:hover { border-color: var(--sky); }
.next a:hover .next-name { color: var(--red); }
.next-no { display: block; font: 400 1rem/1.2 var(--display); color: var(--sky-deep); margin-bottom: .2rem; }
.next-name { font-weight: 600; line-height: 1.35; }

/* ---------- prose ---------- */
.prose { max-width: var(--measure); min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.05em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--sky-deep); }
.prose h2 { margin: 2.1em 0 .6em; font: 400 1.75rem/1.15 var(--display); color: var(--violet); padding-top: .55em; border-top: 2px solid var(--violet); }
.prose h3 { margin: 1.6em 0 .4em; font-size: 1.08rem; font-weight: 700; letter-spacing: .02em; color: var(--sky-deep); }
.prose strong { font-weight: 700; color: var(--violet); }
.prose em { font-style: italic; }
.prose hr { border: 0; border-top: 2px dashed var(--line); margin: 2em 0; }
.prose blockquote { margin: 1.4em 0; padding: .8em 1em; border: 2px solid var(--red); background: #fff8ef; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { font-size: .9em; background: var(--sky-pale); padding: .05em .3em; }
.prose figure { margin: 1.6em 0; width: fit-content; max-width: 100%; border: 1px solid var(--line); padding: .5rem; background: #fff; }
.prose figure img[src*="mascot"] { width: 9rem; }
.prose .table { overflow-x: auto; margin: 1.4em 0 1.6em; border-top: 2px solid var(--violet); border-bottom: 2px solid var(--violet); }
.prose table { width: 100%; border-collapse: collapse; font-size: .93rem; line-height: 1.45; }
.prose th { text-align: left; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--violet); padding: .6rem .7rem .5rem 0; border-bottom: 1px solid var(--violet); vertical-align: bottom; }
.prose td { padding: .55rem .7rem .55rem 0; border-bottom: 1px dotted var(--muted); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { font-weight: 600; color: var(--violet); }

/* ---------- footer ---------- */
.foot { background: var(--violet); color: #e9e2f6; border-top: 6px solid var(--sky); }
.foot-row { max-width: 76rem; margin: 0 auto; padding: 2rem 1rem 2.4rem; display: grid; gap: 1.6rem; }
@media (min-width: 48rem) { .foot-row { grid-template-columns: 1.4fr 1fr; gap: 3rem; } }
.foot-name { display: flex; align-items: center; gap: .5rem; margin: 0 0 .6rem; font: 400 1.4rem/1 var(--display); color: var(--paper); }
.foot-name img { background: var(--paper); border-radius: 50%; padding: .1rem; }
.foot-note { margin: 0; font-size: .9rem; max-width: 52ch; }
.foot-pub { display: flex; gap: 1rem; align-items: center; border-top: 1px dashed #8f86b5; padding-top: 1rem; }
@media (min-width: 48rem) { .foot-pub { border-top: 0; border-left: 1px dashed #8f86b5; padding: 0 0 0 1.6rem; } }
.foot-pub img { width: 4.5rem; height: auto; flex: none; }
.foot-pub p { margin: 0; font-size: .9rem; }
.foot a { color: #fff; }
.foot a:hover { color: #cfe0f4; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print { .mast, .foot, .next, .toc { display: none; } .tabhead-body { color: #000; background: none; } }
.prose table:has(th:nth-child(3)) { min-width: 32rem; }
