/* Plant Sickness Identifier · site styles
   Botanical field journal: warm herbarium paper by day, greenhouse night after dark. */

@font-face { font-family: "Young Serif"; src: url("/fonts/young-serif.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("/fonts/atkinson.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("/fonts/atkinson-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("/fonts/courier-prime.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("/fonts/courier-prime-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("/fonts/courier-prime-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --paper: #EFEAD6;        /* herbarium board */
  --paper-2: #E5DDC3;      /* deeper board, quiet panels */
  --sheet: #F8F4E5;        /* the mounted specimen sheet */
  --ink: #1C2A21;          /* text */
  --ink-soft: #4A564C;     /* secondary text, 6.5:1 on paper */
  --brand: #1E5038;        /* ink green, 9:1 with white */
  --on-brand: #FFFFFF;
  --link: #1E5038;
  --moss: #6E8C5E;         /* leaf wash, decoration only */
  --blight: #A65F27;       /* leaf spots, decoration only */
  --rule: #CDC3A6;
  --tape: rgba(206, 190, 140, 0.55);
  --ok: #1E5038;
  --error: #9A3412;
  --shadow: 0 1px 0 rgba(60, 50, 20, .06), 0 18px 40px -22px rgba(60, 50, 20, .45);

  --f-display: "Young Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-body: "Atkinson Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-label: "Courier Prime", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 68ch;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0D1611;
    --paper-2: #132019;
    --sheet: #17261D;
    --ink: #E8E5D4;
    --ink-soft: #A9B3A3;
    --brand: #A3D0A6;
    --on-brand: #0D1611;
    --link: #A3D0A6;
    --moss: #4F7A56;
    --blight: #D0904F;
    --rule: #2B3B31;
    --tape: rgba(200, 190, 140, 0.16);
    --ok: #A3D0A6;
    --error: #F0A27A;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 24px 50px -24px rgba(0, 0, 0, .8);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-body);
  font-feature-settings: "kern";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--moss); color: #fff; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: var(--radius); z-index: 10; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.4rem + 3.8vw, 4.25rem); line-height: 1.04; letter-spacing: -0.012em; margin: 0 0 .45em; }
h2 { font-size: clamp(1.65rem, 1.25rem + 1.6vw, 2.4rem); line-height: 1.12; margin: 0 0 .5em; }
h3 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 .35em; }
p { margin: 0 0 1em; text-wrap: pretty; }
.label {
  font-family: var(--f-label); font-size: .8rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 .9em;
}
.lede { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--ink-soft); max-width: 36ch; }
.latin { font-family: var(--f-label); font-style: italic; }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--f-display); font-size: 1.05rem; line-height: 1.15; }
.mark svg { width: 26px; height: 26px; flex: none; color: var(--brand); }
.mark:hover { text-decoration: none; }
.site-nav { display: flex; gap: clamp(12px, 3vw, 28px); font-size: .95rem; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .3em; }
@media (max-width: 560px) { .site-nav .opt { display: none; } .mark span { max-width: 15ch; } }

/* ---------- hero ---------- */
.hero { padding: clamp(36px, 7vw, 88px) 0 clamp(48px, 8vw, 104px); }
.hero .wrap { display: grid; gap: clamp(36px, 6vw, 72px); align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.05fr .95fr; } }
.hero-copy .lede { margin-bottom: 1.6em; }
.get { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.badge { display: inline-block; line-height: 0; border-radius: 9px; }
.badge img { height: 54px; width: auto; }
.badge .on-dark { display: none; }
@media (prefers-color-scheme: dark) { .badge .on-light { display: none; } .badge .on-dark { display: block; } }
.soon { font-family: var(--f-label); font-size: .85rem; color: var(--ink-soft); }
.fine { font-size: .9rem; color: var(--ink-soft); margin-top: 1.4em; }

/* the specimen sheet: the page's one signature */
.sheet {
  position: relative; background: var(--sheet); border-radius: 3px; box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 28px); max-width: 480px; margin: 0 auto; width: 100%;
  transform: rotate(-.6deg);
}
.sheet::before, .sheet::after {
  content: ""; position: absolute; width: 92px; height: 24px; background: var(--tape);
  top: -10px; box-shadow: 0 1px 1px rgba(0,0,0,.05);
}
.sheet::before { left: 18px; transform: rotate(-7deg); }
.sheet::after { right: 22px; transform: rotate(6deg); }
.sheet-fig { position: relative; }
.sheet-fig svg { width: 100%; max-width: 330px; height: auto; margin: 0 auto; }
.fig-no { position: absolute; left: 0; top: 0; font-family: var(--f-label); font-size: .78rem; color: var(--ink-soft); }

.leaf-outline, .leaf-vein, .leaf-stem { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.leaf-outline { stroke-width: 2.2; }
.leaf-stem { stroke-width: 2.6; }
.leaf-vein { stroke-width: 1.15; opacity: .8; }
.leaf-wash { fill: var(--moss); opacity: .28; }
.spot { fill: var(--blight); }
.spot-ring { fill: none; stroke: var(--sheet); stroke-width: 1; opacity: .7; }
.pencil { fill: none; stroke: var(--ink-soft); stroke-width: 1.1; stroke-dasharray: 3 4; }
.pencil-note { font-family: var(--f-label); font-size: 13px; fill: var(--ink-soft); }

@media (prefers-reduced-motion: no-preference) {
  .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s cubic-bezier(.45,.05,.25,1) forwards; }
  .leaf-vein.draw { animation-duration: .9s; }
  .v1 { animation-delay: .9s; } .v2 { animation-delay: 1.0s; } .v3 { animation-delay: 1.1s; }
  .v4 { animation-delay: 1.2s; } .v5 { animation-delay: 1.3s; }
  .leaf-wash { animation: wash 1.4s ease-out 1.1s both; }
  .spot, .spot-ring { animation: spot .8s ease-out both; }
  .s1 { animation-delay: 1.9s; } .s2 { animation-delay: 2.05s; } .s3 { animation-delay: 2.2s; } .s4 { animation-delay: 2.3s; } .s5 { animation-delay: 2.4s; }
  .pencil, .pencil-note { animation: spot .6s ease-out 2.8s both; }
  .specimen { animation: rise .7s ease-out 2.6s both; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes wash { from { opacity: 0; } to { opacity: .28; } }
@keyframes spot { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.specimen {
  margin-top: 10px; border: 1px solid var(--ink); border-top-width: 3px; padding: 14px 16px 12px;
  font-family: var(--f-label); font-size: .86rem; line-height: 1.45; color: var(--ink); background: var(--sheet);
}
.specimen .label { margin-bottom: .5em; font-size: .72rem; }
.specimen .name { font-size: 1.08rem; font-style: italic; margin: 0; }
.specimen .common { margin: 0 0 .6em; }
.specimen dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0 0 .7em; }
.specimen dt { color: var(--ink-soft); }
.specimen dd { margin: 0; }
.specimen ol { margin: 0; padding-left: 1.35em; }
.specimen li { margin: 0 0 .25em; }
.specimen .safety { display: block; color: var(--ink-soft); font-style: italic; }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 9vw, 112px) 0; border-top: 1px solid var(--rule); }
.section-head { max-width: 46ch; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--ink-soft); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; counter-reset: step; }
@media (min-width: 780px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.steps li { counter-increment: step; border-top: 1px solid var(--ink); padding-top: 16px; }
.steps li::before { content: "Step " counter(step); display: block; font-family: var(--f-label); font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.steps p { color: var(--ink-soft); margin: 0; }

.shots { list-style: none; margin: 0; padding: 4px var(--gutter) 22px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); overscroll-behavior-x: contain; }
.shots li { scroll-snap-align: start; }
.shots img { width: 100%; height: auto; aspect-ratio: 640 / 1385; border-radius: 22px; background: var(--paper-2); box-shadow: var(--shadow); }
.shots-wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; }
.shots:focus-visible { outline-offset: -3px; }

.notes { display: grid; gap: 22px; }
@media (min-width: 720px) { .notes { grid-template-columns: repeat(2, 1fr); gap: 28px 48px; } }
.note h3 { display: flex; gap: 10px; align-items: baseline; }
.note h3 svg { width: 18px; height: 18px; flex: none; color: var(--brand); transform: translateY(2px); }
.note p { color: var(--ink-soft); margin: 0; }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 13px; font-family: var(--f-label); font-size: 1.4rem; color: var(--ink-soft); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 18px; color: var(--ink-soft); max-width: var(--measure); }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- document pages (privacy, terms, delete data) ---------- */
.doc { padding: clamp(36px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.doc-grid { display: grid; gap: 40px; }
@media (min-width: 1000px) { .doc-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 64px; } }
.doc-head { max-width: var(--measure); margin-bottom: 32px; }
.doc-head .meta { font-family: var(--f-label); font-size: .85rem; color: var(--ink-soft); }
.toc { font-size: .92rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc a { display: block; padding: 5px 0 5px 14px; color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
@media (min-width: 1000px) { .toc nav { position: sticky; top: 24px; } }
@media (max-width: 999px) { .toc details { border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 14px; } .toc summary { cursor: pointer; font-weight: 600; } .toc ol { margin-top: 10px; } }
@media (min-width: 1000px) { .toc summary { display: none; } }
.prose { max-width: var(--measure); }
.prose h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); margin-top: 1.9em; scroll-margin-top: 20px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; font-family: var(--f-body); font-weight: 600; font-size: 1.05rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .45em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
.prose th { font-family: var(--f-label); font-weight: 400; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.table-scroll { overflow-x: auto; }
.in-short { background: var(--sheet); border: 1px solid var(--rule); border-top: 3px solid var(--brand); padding: 20px 22px 8px; margin: 0 0 2em; box-shadow: var(--shadow); }
.in-short .label { color: var(--ink); }
.in-short ul { padding-left: 1.2em; }

/* ---------- support ---------- */
.support-grid { display: grid; gap: 48px; }
@media (min-width: 960px) { .support-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; } }
.form-card { background: var(--sheet); padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); border-radius: 3px; }
.field { margin-bottom: 18px; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: .9rem; }
input[type="email"], input[type="text"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule);
  border-bottom: 2px solid var(--ink-soft); border-radius: 4px; padding: 12px 12px; min-height: 48px;
}
textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-bottom-color: var(--error); }
.field-error { margin: 6px 0 0; color: var(--error); font-size: .92rem; font-weight: 600; }
.field-error:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 26px;
  background: var(--brand); color: var(--on-brand); border: 0; border-radius: 999px; font: 600 1rem var(--f-body);
  cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-quiet { background: transparent; color: var(--link); border: 1px solid var(--rule); }
.form-foot { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.privacy-line { font-size: .9rem; color: var(--ink-soft); margin: 16px 0 0; }
.status { margin: 18px 0 0; padding: 0; min-height: 1px; }
.status:empty { display: none; }
.status p { margin: 0; }
.status.ok, .status.error { padding: 14px 16px; border-radius: 4px; border-left: 4px solid; background: var(--paper); }
.status.ok { border-color: var(--ok); }
.status.error { border-color: var(--error); }
.status .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--rule); padding: 32px 0 40px; font-size: .92rem; color: var(--ink-soft); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-foot a { color: var(--ink); }
.site-foot p { margin: 0; }

/* 404 */
.lost { padding: clamp(64px, 12vw, 140px) 0; }
.lost .lede { margin-bottom: 1.4em; }

@media print { .site-head, .site-foot, .toc { display: none; } body { background: #fff; color: #000; } }
