/* One stylesheet for four pages. The colours are the mark's own, so the
   listing page, the icon and the screenshots beside them read as one
   thing: the pod's deep teal carries the accent on light, and its pea
   green does on dark, where a colour that dark would disappear. The greys
   are biased a little green for the same reason — a neutral borrowed from
   a blue palette fights a teal one. `AppTheme.seed` in the app is the
   same deep teal; change the two together.

   Light and dark, no build step, and exactly one font file: 2.6 kB of
   Bricolage Grotesque, cut down to the nine letters of the name and served
   from this site. The rule it bends used to be "no webfonts at all", for
   two reasons — the site has to load on a slow connection from a store
   listing, and a privacy page that phones home for a font is a poor
   advertisement for an app that does not phone home at all. A same-origin
   subset answers both: nothing is requested from a font network, and the
   file is smaller than the icon beside it. Everything else on the page is
   still the system sans. */

:root {
  color-scheme: light dark;
  --bg: #fbfcfb;
  --surface: #ffffff;
  --border: #e1e6e2;
  --text: #151917;
  --muted: #58635e;
  --accent: #123d3a;
  --accent-soft: #e4efe9;
  --radius: 14px;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111413;
    --surface: #191d1b;
    --border: #2a302d;
    --text: #eaefec;
    --muted: #9fa9a4;
    --accent: #9fd356;
    --accent-soft: #18251f;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 20px;
}

/* ------------------------------------------------------------ header */

header.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}

/* The face the mark was drawn with, subset to the letters of the name and
   served from this site — see the note at the top. The unicode-range is the
   subset's own: a letter outside it silently falls back to the system sans,
   so if the site is ever renamed, re-cut the file before changing the name.
   Nothing but `.brand` asks for this family. */
@font-face {
  font-family: "Bricolage Grotesque Wordmark";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/wordgarner/assets/fonts/bricolage-grotesque-wordmark.woff2") format("woff2");
  unicode-range: U+20, U+47, U+57, U+61, U+64-65, U+6e-6f, U+72;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Bricolage Grotesque Wordmark", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 25px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

/* `icon.svg`, not the tab's `favicon.svg`: the header is the one place on
   the site with room for the glyphs on the seeds, and at this size they
   read as A, あ and 字 rather than three smudges. Below about 40px they go
   back to being texture, and there the plain-seed file is the honest
   choice — half a glyph is worse than none. The mark and the name are
   sized together: a 64px mark over the old 19px name read as a logo with a
   caption under it. The tile carries its own background, so it needs no
   dark-mode rule. */
.brand .mark {
  width: 64px;
  height: 64px;
  display: block;
}

nav.site {
  margin-left: auto;
  display: flex;
  gap: 18px;
  font-size: 15px;
}

nav.site a { color: var(--muted); text-decoration: none; }
nav.site a:hover,
nav.site a[aria-current="page"] { color: var(--text); }

/* -------------------------------------------------------------- page */

main { padding: 40px 0 64px; }

h1 {
  font-size: 2.1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

h2 {
  font-size: 1.25rem;
  margin: 40px 0 10px;
  letter-spacing: -0.01em;
}

h3 { font-size: 1.02rem; margin: 26px 0 6px; }

p, li { color: var(--text); }

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 28px;
}

.updated {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 28px;
}

a { color: var(--accent); }

ul { padding-left: 1.25em; }
li { margin: 6px 0; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: var(--accent-soft);
  padding: 1px 5px;
  border-radius: 5px;
}

/* ------------------------------------------------------------- cards */

.cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

.cards li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0;
}

.cards strong { display: block; margin-bottom: 4px; }
.cards span { color: var(--muted); font-size: 0.95rem; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 24px 0;
}

.panel p:first-child { margin-top: 0; }
.panel p:last-child { margin-bottom: 0; }

/* -------------------------------------------------------------- form */

/* The report form's controls were left to the browser, and a browser sizes
   a select to its longest option and a textarea to a 20-column default.
   On a 42rem column that read as three small boxes adrift in a wide page:
   the one field somebody is meant to write a paragraph in was the width of
   a name, and could only be dragged bigger. They are one column now — full
   width, the page's own border, radius and type, and a message box that
   opens at the size the paragraph wants. */

form { margin: 28px 0; }

form p { margin: 0 0 20px; }

form label {
  display: block;
  margin-bottom: 6px;
}

input[type="email"],
input[type="text"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
}

input::placeholder,
textarea::placeholder { color: var(--muted); }

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

textarea {
  /* An inline-level textarea leaves a descender's worth of gap under
     itself, which reads as a broken margin inside the panel. */
  display: block;
  /* Taller, never wider: the column is the measure the whole site is set
     to, and a textarea dragged past it takes the page with it. */
  resize: vertical;
  min-height: 9.5rem;
  line-height: 1.55;
}

/* Native chevrons ignore most of the rules above — Safari in particular
   drops the background and the padding unless the control is unstyled
   first — so the arrow is drawn here instead. Two rules because a data URI
   cannot read `currentColor`. */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%2358635e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  padding-right: 40px;
}

@media (prefers-color-scheme: dark) {
  select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%239fa9a4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  }
}

/* Sent, not written: quieter than the fields above it, set in the face the
   details were printed in, and short because nobody edits it. */
#diagnostics {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  color: var(--muted);
  min-height: 7rem;
}

/* ------------------------------------------------------------ button */

/* Shared by the links on the landing page and the form's submit, so it has
   to undo what a browser gives a `<button>` and nothing else does: its own
   border, its own font, and a cursor that does not say "text". */
.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* On dark the accent is the pea green, so the label takes the pod's own
   ink rather than a near-black borrowed from the page. */
@media (prefers-color-scheme: dark) {
  .button { color: #123d3a; }
}

.button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }

/* --------------------------------------------------------- questions */

details {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}

details summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

details summary::-webkit-details-marker { display: none; }

details summary::before {
  content: "+";
  display: inline-block;
  width: 1.2em;
  color: var(--accent);
  font-weight: 700;
}

details[open] summary::before { content: "\2013"; }

details p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ footer */

footer.site {
  border-top: 1px solid var(--border);
  padding: 26px 0 48px;
  color: var(--muted);
  font-size: 0.92rem;
}

footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer.site a { color: var(--muted); }
footer.site .spacer { margin-left: auto; }

/* Screenshots are added as they are taken; the frame keeps the page from
   jumping when they land. */
.shots {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 28px 0;
}

.shots img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: block;
}
