/* One column, one screen wide, readable on a phone in the field.

   Colour is meaning here -- green is native or planted, amber is introduced,
   slate is nobody said -- so the palette lives in this file and the templates
   only ever name the kind. Loudness is meaning too: one filled button per
   section at most, quiet buttons for everything secondary, and red kept for
   the thing you cannot undo. */

/* --- base ---------------------------------------------------------------- */
*{box-sizing:border-box}
body{font:16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
     margin:0;padding:0 12px 12px;max-width:900px;margin-inline:auto;color:#1a1a1a;
     background:#fff}
a{color:#0b6bcb}
i{color:#555}
em{font-style:italic}

h1{font-size:1.5rem;margin:0 0 .1em}
h2{font-size:1.05rem;margin:1.6em 0 .5em;padding-bottom:.25em;border-bottom:1px solid #e3e3e3}
h3{font-size:.95rem;margin:1.2em 0 .3em}

/* --- layout -------------------------------------------------------------- */
/* Every page is a header saying what you are looking at, then sections. The
   rhythm lives here rather than in each template's margins. */
main{display:block}
section{margin:1.8em 0}
section > h2:first-child{margin-top:0}
.page{margin-bottom:1.4em}
.page p{margin:.25em 0}
.page .lede .rank{color:#555}
.page .lede .badge{margin-left:6px}
.up{font-size:.85rem;margin:0 0 .2em}
.up a{text-decoration:none}
.actions{margin:.5em 0;font-size:.85rem}
.actions.end{margin-top:2.2em;padding-top:.8em;border-top:1px solid #eee}

/* --- navigation ---------------------------------------------------------- */
/* Sticky, because search is in it and a taxon page is long. Order is set per
   breakpoint rather than duplicated in the markup: one row on a wide screen,
   search dropped to its own row on a phone. */
.nav{position:sticky;top:0;z-index:5;background:#fff;display:flex;flex-wrap:wrap;
     align-items:center;gap:8px 14px;font-size:.9rem;padding:10px 0 8px;
     margin-bottom:14px;border-bottom:1px solid #e3e3e3}
.nav a{text-decoration:none}
.nav .brand{order:0;font-weight:600;font-size:1rem;color:#1a1a1a;white-space:nowrap}
.nav .links{order:1;flex:0 0 auto;white-space:nowrap;margin-left:auto}
.nav .search{order:3;flex:1 1 100%;display:flex;gap:6px;margin:0}
.nav .search input{padding:7px 10px;font-size:.95rem}
.nav .search button{padding:7px 12px;font-size:.9rem}
.nav .avatar{order:2;flex:none;display:inline-flex;
     align-items:center;justify-content:center;width:32px;height:32px;
     border-radius:50%;background:#0b6bcb;color:#fff;font-weight:600;font-size:.9rem}

/* Wide enough for one row: brand, search taking the slack, then where you
   are and who you are. Below that the search drops to a row of its own. */
@media (min-width:720px){
  .nav .search{order:1;flex:1 1 auto;max-width:30rem}
  .nav .links{order:2}
  .nav .avatar{order:3}
}
.crumb{font-size:.85rem;color:#555;margin:.4em 0 .8em}
.crumb a{text-decoration:none}

/* --- controls ------------------------------------------------------------ */
/* Forms stack by default; the ones that are a single line say so with .row. */
form{margin:.7em 0}
form.row{display:flex;gap:6px;align-items:center}
form.inline{display:inline;margin:0}

input[type=search],input[type=text]{flex:1;min-width:0;padding:10px;font-size:1rem;
     border:1px solid #bbb;border-radius:6px}
form:not(.row) input[type=text]{width:100%;padding:8px;font-size:inherit;margin-bottom:6px}
textarea{width:100%;padding:8px;font:inherit;border:1px solid #bbb;border-radius:6px;
     margin-bottom:6px;resize:vertical}
select{font:inherit;padding:3px 5px;border:1px solid #bbb;border-radius:4px}

button{padding:10px 14px;font-size:1rem;border:1px solid #0b6bcb;background:#0b6bcb;
     color:#fff;border-radius:6px;cursor:pointer}
button.quiet{background:#fff;color:#1a1a1a;border-color:#bbb}
button.link{background:none;border:none;color:#0b6bcb;padding:0;font:inherit;
     text-decoration:underline}
details.danger button{background:#b91c1c;border-color:#b91c1c;color:#fff;
     padding:5px 10px;font-size:.85rem}

/* Adding is offered on the heading row and folded away underneath it: you read
   these pages far more often than you add to them, and putting the button in
   the heading means nothing shifts when the form opens. <summary> may hold one
   heading element, so the heading itself is the toggle. */
.addhead{margin:0}
.addhead > summary{list-style:none;cursor:pointer;padding:0;color:inherit;font-size:inherit}
.addhead > summary::-webkit-details-marker{display:none}
.addhead > summary > :is(h1,h2){display:flex;align-items:baseline;
     justify-content:space-between;gap:10px;color:#1a1a1a}
.new{font-size:.78rem;font-weight:600;color:#0b6bcb;border:1px solid #cfd8e3;
     border-radius:999px;padding:2px 10px;white-space:nowrap}
.addhead[open] .new{background:#eef3f8}
.add{background:#faf9f6;border:1px solid #eee;border-radius:8px;padding:8px;margin:.6em 0 1em}
.add form{margin:0}
.formrow{display:flex;flex-wrap:wrap;align-items:center;gap:10px;
     justify-content:space-between}
.formrow p{margin:0}

/* --- disclosure ---------------------------------------------------------- */
details{margin:.4em 0}
summary{cursor:pointer;color:#0b6bcb;font-size:.9rem;padding:.3em 0}
details.inline{display:inline}
details.inline > summary{display:inline;list-style:none;font-size:inherit;padding:0;
     text-decoration:underline}
details.inline > summary::-webkit-details-marker{display:none}
details.inline form{margin:.5em 0 .2em}
details.danger > summary{color:#b91c1c}
details.danger[open] > summary{font-weight:600}
details.danger form{display:inline;margin-left:4px}
.warn{color:#b45309;margin-right:6px}

/* --- lists of things ----------------------------------------------------- */
/* One row shape for taxa, one for the containers that hold them. */
ul{margin:.3em 0;padding-left:1.1em}
li{margin:.15em 0}
.rows{list-style:none;padding:0;margin:.4em 0}
.rows > li{padding:10px 0;border-bottom:1px solid #eee;margin:0}
/* A .hit draws its own rule and padding, so a row that holds one must not add
   a second: the two lines sat about ten pixels apart on every taxon list. */
.rows > li:has(> .hit){padding:0;border-bottom:0}
.rows .name{font-weight:600}
.rows .name a{text-decoration:none}

.hit{display:flex;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid #eee}
.hit .sci{color:#555;font-style:italic}
.hit .txt{min-width:0;flex:1}
.hit img,.hit .noimg{width:54px;height:54px;flex:none;border-radius:6px;
     object-fit:cover;background:#f0f0f0;display:block}
.hit .mark{font-size:.78rem;margin-left:6px}

.strip{display:flex;flex-wrap:wrap;gap:4px;margin:.45em 0 .1em}
.strip a{display:block;width:44px;height:44px;border-radius:6px;overflow:hidden;
     background:#f0f0f0;border:2px solid transparent}
.strip img{width:100%;height:100%;object-fit:cover;display:block}
.strip a.established{border-color:#2e8b57}
.strip a.planted{border-color:#7fc79a}
.strip a.wanted{border-color:#c9bfa8}
.strip a.remove{border-color:#e0a3a3}
.strip a.more{display:flex;align-items:center;justify-content:center;background:#f3f1ec;
     font-size:.72rem;color:#777;text-decoration:none}

/* --- what a taxon is doing here ------------------------------------------ */
.you{border:1px solid #e3e3e3;border-radius:8px;padding:8px 10px;margin:.6em 0 1em;
     background:#faf9f6}
.pick{display:block;padding:3px 0}
.pick select{margin-right:6px}

/* --- status -------------------------------------------------------------- */
.meta{font-size:.8rem;color:#777}
.lvl{color:#888;font-size:.78rem}
.empty{color:#999}
.badge{display:inline-block;padding:0 6px;border-radius:8px;background:#f1f4f6;
     font-size:.74rem;margin-left:4px}
.pill{display:inline-block;background:#eef3f8;border-radius:10px;padding:1px 8px;
     font-size:.78rem;color:#345;margin-right:4px}
.st-native,.kept{color:#15803d;font-weight:600}
/* The three standings, one colour each, used by badges, tiles and the log. */
.mark{font-weight:600}
/* Established is the settled green; planted is the same hue, lighter,
   because it is the same intention not yet proven. */
.mark.established,.ev.established{color:#15803d}
.mark.planted,.ev.planted{color:#3f9c63}
.mark.wanted,.ev.wanted{color:#7c6f5a}
.mark.remove,.ev.remove{color:#b91c1c}
.st-presumed{color:#4d8f6a;font-style:italic}
.st-introduced{color:#b45309;font-weight:600}
.st-absent{color:#999}
.wanted{color:#7c6f5a}

/* --- tables, maps, pictures ---------------------------------------------- */
.wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
table{border-collapse:collapse;width:100%;font-size:.88rem}
th,td{text-align:left;padding:5px 8px;border-bottom:1px solid #eee;vertical-align:top}
th{color:#666;font-weight:600;white-space:nowrap;width:1%}
td{word-break:break-word}
.here th{color:#333}
svg.map{width:100%;height:auto;border-radius:8px;display:block;margin:.4em 0}
.frame{margin:.5em 0 .9em}
.frame .meta{font-weight:600;color:#444;margin-bottom:.15em}
img.photo{max-width:100%;border-radius:8px;margin:.4em 0}
.gal{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:6px;margin:.4em 0}
.gal a{display:block;aspect-ratio:1;overflow:hidden;border-radius:6px;background:#f0f0f0}
.gal img{width:100%;height:100%;object-fit:cover;display:block}
.kids{columns:2 200px;column-gap:18px;margin:.3em 0}
.kids li{break-inside:avoid}

/* --- the home card ------------------------------------------------------- */
.hero{border:1px solid #e3e3e3;border-radius:12px;padding:14px 16px;background:#faf9f6}
.hero h1{margin:0 0 .1em}
.hero h1 a{color:#1a1a1a;text-decoration:none}
.hero .strip{margin-top:.7em}
.eyebrow{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:#8a8a8a}
.stats{margin-top:.6em !important;font-size:.9rem;color:#666}
.stats b{color:#1a1a1a}
.stats a{text-decoration:none}
/* The import pile, inside the home card. A rule separates it from the site's
   own strip above: same card, different claim -- one is what grows here, the
   other is what might. */
.nudge{margin-top:.8em;padding-top:.7em;border-top:1px solid #e8e4da}
.nudge .eyebrow{margin:0}
.nudge .eyebrow a{color:#6b6b6b;text-decoration:none}
.nudge .eyebrow a:hover{color:#1a1a1a}
.nudge .strip{margin-top:.4em}

/* A community's profile: traits down the side, standings across the top. The
   numbers are the content, so they get the alignment and the token names step
   back. */
.profile td.num,.profile th.num{text-align:right;width:1%;white-space:nowrap;padding-right:14px}
.profile tr.group th{padding-top:12px;color:#555;font-size:.82rem;
     text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid #eee}
.profile td.tokname{color:#333}
.profile .zero{color:#ccc}

/* Normalized growing conditions. The weight of the chip is the confidence:
   corroborated reads solid, a lone source is outlined, and a claim another
   source could have made and did not is deliberately faint. */
.traits th{width:1%;white-space:nowrap;color:#555;vertical-align:top}
.traits td{line-height:2}
.tok{display:inline-block;border-radius:10px;padding:1px 9px;margin:0 3px 3px 0;
     font-size:.82rem;border:1px solid transparent}
.tok sup{font-size:.62rem;opacity:.7;margin-left:2px}
.tok.confirmed{background:#dff0e4;color:#1b5e33;border-color:#bcdcc6;font-weight:600}
.tok.single{background:#fff;color:#4a4a4a;border-color:#d8d4c9}
.tok.contested{background:#f4f2ed;color:#8a8378}
h3.sub{font-size:.9rem;color:#666;margin:1.2em 0 .3em;font-weight:600}

/* A reference's answer about how a plant grows. One block per source, so the
   attribution sits with the values it belongs to rather than under both. */
.grow{margin:.5em 0 1em}
.grow > .meta{margin-bottom:.2em}
.grow th{width:1%;white-space:nowrap;color:#555}

/* External sources: name on the left, the identifier itself on the right. The
   id is monospaced because it is a key, not prose -- COFL2 and 3082240 are
   things you copy. */
.srcs th{width:1%;white-space:nowrap;font-weight:600}
.srcs code{font-size:.82rem;color:#444;background:#f5f4f0;padding:0 4px;border-radius:3px}

/* --- the log ------------------------------------------------------------- */
.log{list-style:none;padding:0;margin:.4em 0}
.log li{padding:5px 0;border-bottom:1px solid #f0f0f0;font-size:.9rem}
.log .ev{font-weight:600}
.log .ev.removed,.log .ev.unseen{color:#999;font-weight:400}
.log .ev.seen{color:#0b6bcb}
.log .ev.note{color:#555}

/* --- notes --------------------------------------------------------------- */
.note{border-bottom:1px solid #eee;padding:8px 0}
.note p{margin:.2em 0;white-space:pre-wrap}

/* --- the front door ------------------------------------------------------ */
.login{max-width:340px;margin:10vh auto 0}
