/* ==== The public pages in the club's look ==================================
   One stylesheet for the hand-written pages outside the React app: What
   Pupdate Does (/updates/), the revision log (/updates/log/, and the body
   published into it from supabase/pages/revision-log.html), What Goes on the
   Coat (/shampoos/) and Navigate (/navigate/, served as navigate.pupdate.club,
   which links this file by its full address).

   They draw the site's glass look (src/styles/tokens.css), night shift: the
   reception photo under the wash, a glass top bar, 44px pills, lit brass on
   a primary or current pill, solid cards that cast the one object shadow,
   and Source Sans 3 with Source Serif 4 headings. The light tone
   is the default; <html data-tone="dark"> (set by /pages.js from this
   browser's Dark mode choice, localStorage 'pupdate.appearance') is the dark
   one. The system setting is not followed, as on the site.

   Every colour is a token, copied value for value from the two glass blocks
   of src/styles/tokens.css, its twin (tests/logic/pages-theme.check.mjs
   checks that they match): this file is served as it is, outside the site's build, so
   it cannot import them. Its few layers and radii are plain numbers, the
   same as tokens.css's scale. Glass only on the
   floating layer: the top bar and the section title chips. Order: tokens,
   the page, the glass bar, pills, the masthead card, section chips, cards,
   the platforms band, the log, Navigate's link cards, the footer, a phone,
   motion. */

/* ---- Tokens: the light tone (styles/tokens.css, data-tone="light") --------- */
:root {
  --bg: #eee7db;
  --dim: rgb(238 231 219 / 0.58);
  --glass: rgb(247 243 236 / 0.72);
  --glass-solid: rgb(247 243 236 / 0.95);
  --g-sat: 170%;
  --glass-line: rgb(26 49 41 / 0.16);
  --glass-highlight: rgb(255 255 255 / 0.85);
  --glass-shadow: 0 10px 30px rgb(26 49 41 / 0.16);
  --glass-contrast-bg: #f7f3ec;
  --glass-contrast-line: #1a3129;
  --wordmark-filter: none;
  --text: #1a3129;
  --text-2: #4a5750;
  --text-3: #56625b;
  --link: #1a3129;
  --link-hover: #0e1f19;
  --focus: #1a3129;
  --accent: #c9a055;
  --on-accent: #1a3129;
  --accent-highlight: rgb(255 255 255 / 0.55);
  --accent-tint: rgb(184 142 62 / 0.14);
  --accent-tint-line: rgb(184 142 62 / 0.45);
  --card: #f7f3ec;
  --card-line: rgb(26 49 41 / 0.08);
  --panel: #f7f3ec;
  --panel-line: rgb(26 49 41 / 0.12);
  --row: #efe8dc;
  --well: rgb(26 49 41 / 0.05);
  --well-hover: rgb(26 49 41 / 0.1);
  --hover: rgb(26 49 41 / 0.06);
  --divider: rgb(26 49 41 / 0.15);
  --divider-soft: rgb(26 49 41 / 0.1);
  --divider-2: rgb(26 49 41 / 0.2);
  --btn-bg: rgb(247 243 236 / 0.9);
  --secondary-line: rgb(26 49 41 / 0.16);
  --pill-line: rgb(26 49 41 / 0.16);
  --like: #9e3b4e;
  --gold: #6e5220;
  --lit-top: #d9b36b;
  --lit-foot: #b88e3e;
  --lit-shadow: 0 8px 16px -8px rgb(180 140 76 / 0.5);
  --obj-shadow: 0 18px 40px -16px rgb(58 42 16 / 0.16);
  --font-ui: 'Source Sans 3', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --display-weight: 600;
  --display-stretch: 100%;
  color-scheme: light;
}

/* ---- Tokens: the dark tone (styles/tokens.css, data-look="glass") ---------- */
:root[data-tone="dark"] {
  --bg: #10231d;
  --dim: rgb(16 35 29 / 0.72);
  --glass: rgb(33 60 51 / 0.52);
  --glass-solid: rgb(33 60 51 / 0.95);
  --g-sat: 150%;
  --glass-line: rgb(238 231 219 / 0.14);
  --glass-highlight: rgb(238 231 219 / 0.16);
  --glass-shadow: 0 14px 44px rgb(0 0 0 / 0.42);
  --glass-contrast-bg: #10231d;
  --glass-contrast-line: #eee7db;
  --wordmark-filter: brightness(0) invert(95%) sepia(10%);
  --text: #eee7db;
  --text-2: #bfc4b5;
  --text-3: #d2d6cb;
  --link: #d6b77a;
  --link-hover: #e2c487;
  --focus: #d6b77a;
  --accent: #c9a564;
  --on-accent: #10231d;
  --accent-highlight: rgb(255 255 255 / 0.45);
  --accent-tint: rgb(201 165 100 / 0.16);
  --accent-tint-line: rgb(201 165 100 / 0.45);
  --card: #22463a;
  --card-line: rgb(238 231 219 / 0.07);
  --panel: #1f4136;
  --panel-line: rgb(238 231 219 / 0.10);
  --row: #2a5144;
  --well: rgb(238 231 219 / 0.07);
  --well-hover: rgb(238 231 219 / 0.12);
  --hover: rgb(238 231 219 / 0.08);
  --divider: rgb(238 231 219 / 0.1);
  --divider-soft: rgb(238 231 219 / 0.08);
  --divider-2: rgb(238 231 219 / 0.2);
  --btn-bg: rgb(238 231 219 / 0.08);
  --secondary-line: rgb(238 231 219 / 0.16);
  --pill-line: rgb(238 231 219 / 0.14);
  --like: #d46f87;
  --gold: #e2c487;
  --lit-top: #ddbe80;
  --lit-foot: #b48c4c;
  --lit-shadow: 0 8px 16px -8px rgb(180 140 76 / 0.5);
  --obj-shadow: 0 18px 40px -16px rgb(0 0 0 / 0.45);
  --font-ui: 'Source Sans 3', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --display-weight: 600;
  --display-stretch: 100%;
  color-scheme: dark;
}

/* ---- The page: the reception photo under the wash -------------------------- */
*, *::before, *::after { box-sizing: border-box; }
/* The site's glass type (src/styles/tokens.css): Source Sans 3, self-hosted
   (/fonts/fonts.css, linked by each page). Headings take the display face,
   Source Serif 4 semibold, at normal width. */
html { font-family: var(--font-ui); }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
}
/* `clip`, not `hidden`: `hidden` would make the body a scroll container and
   the sticky top bar would scroll away with the page. */
html, body { max-width: 100%; overflow-x: clip; }
@supports not (overflow-x: clip) {
  html { overflow-x: hidden; }
  body { overflow-x: visible; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
/* Fixed to the largest viewport, so the photo does not move as a page
   scrolls; the wash is a layer over it. */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  transform: translateZ(0);
  pointer-events: none;
  background: linear-gradient(var(--dim), var(--dim)), var(--bg) url('/mdc-interior.jpg') center/cover no-repeat;
  background: linear-gradient(var(--dim), var(--dim)), var(--bg) image-set(url('/mdc-interior.webp') type('image/webp'), url('/mdc-interior.jpg') type('image/jpeg')) center/cover no-repeat;
}
a { color: var(--link); }
a:hover { color: var(--link-hover); }
/* Links are ink in the light tone, so they carry the underline. */
:root:not([data-tone="dark"]) a { text-decoration: underline; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
::selection { background: var(--accent-tint); }

.wrap { max-width: 1020px; margin: 0 auto; padding: 18px 16px 48px; }
.wrap.narrow { max-width: 760px; }
.wrap.navigate { max-width: 880px; }

/* The page's symbol sheet (the section marks): drawn nowhere itself. A class,
   not a style attribute, as the pages' policy allows no inline style. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: .92em;
  background: var(--well);
  border-radius: 6px;
  padding: 0 4px;
}

/* ---- The glass top bar ------------------------------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 16px 6px;
}
.glass-bar {
  max-width: 1240px;
  margin: 0 auto;
  border-radius: 22px;
  padding: 8px 12px 8px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
}
.brand { margin: 0; display: flex; align-items: center; min-height: 44px; gap: 10px; }
.brand-button { display: flex; align-items: center; min-height: 44px; color: var(--text); }
/* The wordmark, tinted cream in the dark tone. */
.brand-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: min(16rem, 50vw);
  filter: var(--wordmark-filter);
}
.brand-crest-link { display: flex; align-items: center; min-height: 44px; line-height: 0; }
.brand-crest { height: 40px; width: auto; display: block; }
.glass-pills { display: flex; flex-wrap: wrap; gap: 6px; }

/* The glass: the solid fill first (no blur, reduced transparency), the
   frosted one where the browser can blur. Only the top bar and the section
   title chips are glass; whatever holds content is solid. */
.glass {
  background: var(--glass-solid);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow);
  color: var(--text);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: var(--glass);
    -webkit-backdrop-filter: blur(20px) saturate(var(--g-sat));
    backdrop-filter: blur(20px) saturate(var(--g-sat));
  }
}
@media (prefers-reduced-transparency: reduce) {
  .glass {
    background: var(--glass-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (prefers-contrast: more) {
  .glass {
    background: var(--glass-contrast-bg);
    border-color: var(--glass-contrast-line);
  }
}
@media (forced-colors: active) {
  .glass {
    background: Canvas;
    color: CanvasText;
    border: 1px solid CanvasText;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ---- Pills: every pressable thing is at least 44px ------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--pill-line);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
:root:not([data-tone="dark"]) .pill { text-decoration: none; }
.pill:hover { background: var(--hover); color: var(--text); }
.pill.pill-text { background: var(--btn-bg); font-weight: 700; }
.pill.affirm,
.pill[aria-current="page"] {
  background: linear-gradient(180deg, var(--lit-top), var(--lit-foot));
  background-origin: border-box;
  border-color: transparent;
  color: var(--on-accent);
  font-weight: 700;
  box-shadow: inset 0 1px 0 var(--accent-highlight), var(--lit-shadow);
}
.pill.affirm:hover,
.pill[aria-current="page"]:hover { color: var(--on-accent); }
.pill.affirm:active,
.pill[aria-current="page"]:active { opacity: 0.7; }

/* ---- The masthead: a solid hero card ---------------------------------------- */
.hero {
  background: var(--card);
  border: 1px solid var(--card-line);
  box-shadow: var(--obj-shadow);
  border-radius: 28px;
  padding: 28px;
  margin-top: 10px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin: 0 0 6px;
}
.hero h1 {
  font-size: 1.6rem;
  line-height: 1.15;
  margin: 0 0 10px;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--link); }
.lede {
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text-2);
  max-width: 40rem;
  margin: 0 0 14px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--pill-line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.chips span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ---- Section heads: a glass title chip -------------------------------------- */
.section { margin-top: 28px; }
.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  border-radius: 16px;
  margin: 0 0 14px;
}
.section-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--link);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.section-mark svg { width: 25px; height: 25px; }
.section-head h2 { font-size: 16px; line-height: 1.3; margin: 0; }
.section-head p { margin: 0; font-size: 12px; font-weight: 600; color: var(--text-2); }
.count {
  margin-left: auto;
  flex: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
/* Navigate's headings: the same chip holding its words alone. */
h2.section-head {
  display: inline-flex;
  min-height: 44px;
  padding: 0 14px;
  font-size: 16px;
  line-height: 1.3;
}

/* ---- Cards ------------------------------------------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 10px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--card-line);
  box-shadow: var(--obj-shadow);
  border-radius: 22px;
  padding: 14px 18px;
}
.feature h3 { font-size: 16px; line-height: 1.3; margin: 0 0 6px; }
.feature p { margin: 0; font-size: 1rem; line-height: 1.45; color: var(--text-2); }
.feature.new { border-color: var(--accent-tint-line); }
.feature .tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--link);
  vertical-align: .12em;
}
/* What Goes on the Coat: the tag doubles as the coat it suits, and each card
   names the breeds. */
.feature .tag.coat { color: var(--gold); }
.breeds { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; line-height: 1.45; color: var(--text-2); }
.breeds b { color: var(--text); font-weight: 700; }

/* ---- The platforms band (/updates/) ----------------------------------------- */
.platforms {
  margin-top: 28px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--card-line);
  box-shadow: var(--obj-shadow);
  border-radius: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.platform { padding: 10px 12px; border-radius: 14px; background: var(--well); }
.platform h3 { font-size: 16px; line-height: 1.3; margin: 0 0 4px; }
.platform p { margin: 0; font-size: 1rem; line-height: 1.45; color: var(--text-2); }
.platform .where { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }

/* ---- The log (/updates/log/ and the body published into it) ------------------ */
/* The page's #log holds the published body, itself a <div class="log">: the
   outer one is a solid card (words never sit on the photo), the inner one the
   rail down the left with a dot per day. */
.log {
  margin-top: 28px;
  padding: 22px 18px 0;
  background: var(--card);
  border: 1px solid var(--card-line);
  box-shadow: var(--obj-shadow);
  border-radius: 22px;
}
.log .log {
  margin: 0;
  padding: 0 0 0 26px;
  position: relative;
  background: none;
  border: 0;
  border-left: 1px solid var(--divider-2);
  border-radius: 0;
  box-shadow: none;
}
.day { position: relative; margin: 0 0 28px; }
.day::before {
  content: '';
  position: absolute;
  left: calc(-26px - 6px);
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--lit-top), var(--lit-foot));
  border: 2px solid var(--bg);
}
.day h2 { font-size: 16px; line-height: 1.3; margin: 0 0 4px; }
.day .sub { margin: 0 0 10px; font-size: 1rem; line-height: 1.45; color: var(--text-2); }
.day ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.day li { font-size: 1rem; line-height: 1.45; color: var(--text-2); display: flex; gap: 10px; align-items: baseline; }
.day li b { color: var(--text); font-weight: 700; }
.day .where {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--accent-tint);
  color: var(--link);
  font-variant-numeric: tabular-nums;
}
.day .where.mac { background: var(--well); color: var(--text-2); }
.day .where.db { background: transparent; border: 1px solid var(--divider-2); color: var(--text-2); }
.gate {
  margin-top: 28px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--card-line);
  box-shadow: var(--obj-shadow);
  border-radius: 22px;
  color: var(--text-2);
}
.gate[hidden], .log[hidden] { display: none; }

/* ---- Navigate's link cards ---------------------------------------------------- */
.navigate .section-head { margin-top: 28px; }
.navigate .grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
a.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 44px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--card-line);
  box-shadow: var(--obj-shadow);
  border-radius: 22px;
  color: var(--text);
}
a.card, :root:not([data-tone="dark"]) a.card { text-decoration: none; }
a.card:hover,
a.card:focus-visible { border-color: var(--accent-tint-line); background: var(--row); color: var(--text); }
a.card h3 { font-size: 16px; line-height: 1.3; margin: 0; display: flex; align-items: center; gap: 8px; }
a.card h3::after { content: "\2192"; color: var(--link); margin-left: auto; }
a.card p { margin: 0; font-size: 1rem; line-height: 1.45; color: var(--text-2); }
a.card .where { font-size: 12px; font-weight: 600; color: var(--text-2); }
a.card .tag {
  background: var(--accent-tint);
  color: var(--link);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ---- The footer ---------------------------------------------------------------- */
footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--divider);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}
footer b { color: var(--text); font-weight: 700; }
footer a { color: var(--link); }

/* ---- A phone ------------------------------------------------------------------ */
@media (max-width: 640px) {
  .topbar { padding: 12px 12px 6px; }
  .glass-bar { padding: 6px 10px 6px 14px; flex-wrap: nowrap; }
  .brand-logo { height: 38px; }
  .brand-crest { height: 36px; }
  .wrap { padding: 14px 16px 40px; }
  .hero { padding: 18px; border-radius: 24px; }
  .section-head { flex-wrap: wrap; }
  .section-head .count { margin-left: 0; width: 100%; }
  .day li { flex-direction: column; gap: 4px; }
  .log { padding: 18px 14px 0; }
}
/* The narrowest windows (an iPad's third, a small phone): the bar keeps the
   wordmark, the laurel and Open Pupdate on one row. */
@media (max-width: 380px) {
  .glass-bar { gap: 8px; padding: 6px 8px 6px 12px; }
  .brand { gap: 6px; }
  .brand-logo { height: 32px; }
  .brand-crest { height: 30px; }
  .glass-pills .pill { padding: 0 12px; }
}

/* ---- Motion -------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .6s cubic-bezier(.16, 1, .3, 1) both; }
  .rise.d1 { animation-delay: .06s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
