/* Birds Near Me 2 design site. Pico 2.1.1 following the system light or dark
   setting, the house tweak sheet, then the pieces the design pages draw with. */

/* Sunset orange from the app icon. Fills use #F98F18 in both schemes; link text
   needs a darker orange on white and a lighter one on black to stay readable.
   The selectors match Pico's own, so these load after and win. */
:root:not([data-theme="dark"]),
[data-theme="light"] {
  --pico-primary: #a34a00;
  --pico-primary-background: #f98f18;
  --pico-primary-border: #f98f18;
  --pico-primary-underline: rgba(163, 74, 0, 0.5);
  --pico-primary-hover: #7f3900;
  --pico-primary-hover-background: #e57f0e;
  --pico-primary-hover-border: #e57f0e;
  --pico-primary-inverse: #321b03;
  --pico-primary-focus: rgba(249, 143, 24, 0.35);
  --pico-text-selection-color: rgba(249, 143, 24, 0.25);
  --pico-card-sectioning-background-color: #f5f5f7;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --pico-primary: #ffa64d;
    --pico-primary-background: #f98f18;
    --pico-primary-border: #f98f18;
    --pico-primary-underline: rgba(255, 166, 77, 0.5);
    --pico-primary-hover: #ffc285;
    --pico-primary-hover-background: #ffa64d;
    --pico-primary-hover-border: #ffa64d;
    --pico-primary-inverse: #321b03;
    --pico-primary-focus: rgba(249, 143, 24, 0.5);
    --pico-text-selection-color: rgba(249, 143, 24, 0.3);
    --pico-background-color: #121212;
    --pico-card-background-color: #1c1c1e;
    --pico-card-sectioning-background-color: #2c2c2e;
    --pico-muted-border-color: #2c2c2e;
  }
}

/* House tweak sheet: see Workshop Web/house-style.md. */
h1,
h2,
h3,
h4 {
  margin-bottom: 0.2em;
}
hgroup h1,
hgroup h2,
hgroup h3,
hgroup h4 {
  margin-bottom: 0;
}
table td {
  vertical-align: top;
}
table th {
  font-weight: bold;
}

h2 {
  margin-top: 2.5rem;
}
.lede {
  font-size: 1.2rem;
}
.muted {
  color: var(--pico-muted-color);
}
.site-title img {
  border-radius: 10%;
  vertical-align: middle;
}
.feedback {
  border-left: 4px solid var(--pico-primary-background);
  background: var(--pico-card-sectioning-background-color);
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
}

/* Feature cards with a picture, and screenshot galleries. */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.features article {
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.features article img {
  display: block;
  width: 100%;
  height: 340px;
  object-fit: cover;
}
.features article div {
  padding: 0.9rem 1rem 1rem;
}
.features article h3 {
  font-size: 1.05rem;
}
.features article p {
  font-size: 0.9rem;
  margin: 0;
}
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.shots.wide {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}
.shots figure,
figure {
  margin: 0;
}
.shots img,
figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 0 1px #777;
}
figcaption {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  margin-top: 0.4rem;
}

/* Rows, code tables and colour swatches. */
.row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.codes td.c {
  font: 700 14px ui-monospace, Menlo, monospace;
  white-space: nowrap;
}
.codes td.grp {
  font-weight: 700;
  color: var(--pico-primary);
  padding-top: 1.2rem;
}
.codes td.src {
  color: var(--pico-muted-color);
  font-size: 0.85rem;
}
.codes td {
  vertical-align: middle;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.swatches div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}
.swatches i {
  width: 56px;
  height: 56px;
  border-radius: 9px;
  border: 1px solid var(--pico-muted-border-color);
}

/* Picture viewer (gallery.js). Always a dark overlay, whatever the scheme, so
   its colours are fixed rather than Pico's. */
dialog.lightbox {
  background: rgba(0, 0, 0, 0.92);
  padding: 0;
  display: none;
}
dialog.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
}
dialog.lightbox figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: 100vh;
}
dialog.lightbox img {
  max-width: 82vw;
  max-height: 84vh;
  width: auto;
  height: auto;
  border-radius: 0.5rem;
}
dialog.lightbox figcaption {
  max-width: 60ch;
  text-align: center;
  font-size: 1rem;
  color: #fff;
  margin-top: 0.6rem;
}
dialog.lightbox button {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border-radius: 50%;
  flex: none;
}
dialog.lightbox .lb-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  font-size: 1.2rem;
}
dialog.lightbox .lb-count {
  position: fixed;
  bottom: 0.5rem;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

/* cspell:ignore dont nums tagx iucn — class names and CSS's tabular-nums. */

/* Design system page. The app's own tokens, as CSS, for the rendered examples. */
.ds {
  --accent: #f98f18;
  --on-accent: #321b03;
  --accent-text: #a34a00;
  --rare: #b0125b;
  --on-rare: #fff;
  --danger: #ff3b30;
  --sheet: #fff;
  --raised: #f4f0ea;
  --hairline: rgba(60, 60, 67, 0.29);
  --secondary: rgba(60, 60, 67, 0.6);
  --r-small: 6px;
  --r-medium: 10px;
  --r-large: 16px;
  --sans: -apple-system, "SF Pro Text", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  .ds {
    --accent-text: #ffa64d;
    --rare: #ff5c9d;
    --on-rare: #000;
    --danger: #ff453a;
    --sheet: #1c1c1e;
    --raised: #2c2c2e;
    --hairline: rgba(84, 84, 88, 0.65);
    --secondary: rgba(235, 235, 245, 0.6);
  }
}
.ds code {
  color: var(--accent-text);
}
.rule {
  background: var(--pico-card-sectioning-background-color);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-medium);
  padding: 14px 18px;
  margin: 12px 0;
}
.rule b {
  color: var(--accent-text);
}
.cols {
  display: grid;
  gap: 12px;
}
.g2 {
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
}
.g3 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.g4 {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.ds .card {
  background: var(--pico-card-sectioning-background-color);
  border-radius: var(--r-medium);
  padding: 16px;
}
.ds .card h3 {
  margin-top: 0;
  font-size: 1.05rem;
}
.ds .card p {
  font-size: 0.95rem;
  margin: 6px 0 0;
}
.mess td.n {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
td.spec,
td.use {
  font-size: 0.85rem;
  color: var(--pico-muted-color);
}
td.role code {
  white-space: nowrap;
}
.t-title { font-size: 22px; font-weight: 700; }
.t-subtitle { font-size: 15px; color: var(--secondary); }
.t-scientific { font-size: 15px; font-style: italic; color: var(--secondary); }
.t-section { font-size: 20px; font-weight: 700; }
.t-name { font-size: 17px; font-weight: 600; }
.t-body { font-size: 17px; }
.t-detail { font-size: 15px; color: var(--secondary); font-variant-numeric: tabular-nums; }
.t-caption { font-size: 12px; color: var(--secondary); }
.t-label { font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--secondary); }
.t-button { font-size: 15px; font-weight: 600; color: var(--accent-text); }
.t-badge { font-size: 13px; font-weight: 600; }
.t-mapLabel { font-size: 12px; font-weight: 700; text-shadow: 0 0 2px #fff, 0 0 2px #fff; color: #000; }
.swatch {
  border-radius: var(--r-medium);
  overflow: hidden;
  border: 1px solid var(--hairline);
}
.chip {
  height: 88px;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  font: 600 13px ui-monospace, Menlo, monospace;
}
.swatch .meta {
  padding: 10px 12px 12px;
  background: var(--pico-card-sectioning-background-color);
}
.swatch .meta b {
  display: block;
  font: 600 15px ui-monospace, Menlo, monospace;
}
.swatch .meta span {
  font-size: 13px;
  color: var(--pico-muted-color);
}
.radius {
  height: 90px;
  background: var(--raised);
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  font: 600 13px ui-monospace, Menlo, monospace;
}
.space {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0;
  font: 13px ui-monospace, Menlo, monospace;
  color: var(--pico-muted-color);
}
.space i {
  display: block;
  height: 18px;
  background: var(--accent);
  border-radius: 2px;
}
.tagx {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--r-small);
}
.iucn {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 380px;
  margin-top: 12px;
}
.box {
  height: 60px;
  border-radius: var(--r-medium);
  background: var(--raised);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  font-size: 15px;
  font-weight: 600;
}
.box.primary {
  background: var(--accent);
  color: var(--on-accent);
}
.disc {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font: 700 12px ui-rounded, system-ui, sans-serif;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  vertical-align: middle;
}
.disc.rare {
  background: var(--rare);
  color: var(--on-rare);
}
.example {
  display: grid;
  grid-template-columns: minmax(0, 402px) 1fr;
  gap: 20px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}
.example h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}
.example p {
  font-size: 0.95rem;
  margin: 4px 0;
}
.dodont {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.do,
.dont {
  border-radius: var(--r-medium);
  padding: 12px 14px;
  font-size: 14px;
  background: var(--pico-card-sectioning-background-color);
}
.do b {
  color: #248a3d;
}
.dont b {
  color: var(--danger);
}
.do code,
.dont code,
pre.lint {
  display: block;
  margin-top: 6px;
  white-space: pre;
  background: none;
  padding: 0;
  font-size: 13px;
  overflow-x: auto;
}
@media (max-width: 720px) {
  .example,
  .dodont,
  .g2 {
    grid-template-columns: 1fr;
  }
}
