/* The estate's stylesheet. One file, served by every surface that renders a
   page under this brand: the public site and the enrolment service.

   This repository holds assets and deliberately nothing else — no Cargo.toml,
   no flake, no build step. It was briefly a Rust crate carrying the shared
   Leptos chrome as well, and that was wrong: every Rust item in it had exactly
   one consumer, the enrolment binary, while the site could not depend on it at
   all. Pinning `leptos/ssr` in a shared crate leaks that feature into the
   site's wasm build alongside `hydrate` under cargo's feature unification,
   which compiles cleanly and breaks hydration silently. The chrome therefore
   lives beside its caller in mzzld-idm, and what is genuinely shared — these
   bytes — lives here.

   So: if you are about to add a Cargo.toml, the thing you want probably belongs
   in the consumer instead. Both take this repository as a `flake = false` input
   and copy the file into their own tree at build time.

   Plain CSS rather than SCSS, so it needs no build step at either end: one
   consumer embeds it with `include_str!` and serves the bytes, the other hands
   it to cargo-leptos as its `style-file`.

   System fonts only. A webfont is a third-party request or an extra asset to
   ship, and the privacy page claims neither exists. */

:root {
  --bg: #faf9f7;
  --fg: #1c1a18;
  --muted: #5c5852;
  --rule: #ddd8d1;
  --link: #7a2f4e;
  --warn-bg: #fdf3e7;
  --warn-rule: #d9a441;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141312;
    --fg: #e8e4de;
    --muted: #a29c94;
    --rule: #322e2a;
    --link: #e39ab6;
    --warn-bg: #241d13;
    --warn-rule: #8a6a24;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  max-width: 42rem;
  background: var(--bg);
  color: var(--fg);
  font:
    1.0625rem/1.65 ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
}

header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-weight: 650;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  color: var(--fg);
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.9375rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible,
.wordmark:hover {
  color: var(--link);
  text-decoration: underline;
}

main {
  padding-top: 1.5rem;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: 1.875rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1875rem;
  line-height: 1.3;
}

p {
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

section {
  margin-bottom: 2.25rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

.out::after {
  content: " \2197";
  font-size: 0.85em;
}

.address {
  display: block;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9375rem;
  /* Addresses are long and must stay copyable in one piece on a phone. */
  overflow-wrap: anywhere;
}

.warn {
  padding: 1rem 1.125rem 0.125rem;
  border-left: 3px solid var(--warn-rule);
  border-radius: 0 4px 4px 0;
  background: var(--warn-bg);
}

.warn h2 {
  margin-bottom: 0.75rem;
}

/* Only the enrolment surface has one today, and there is exactly one on the
   page: the button that spends a collect token. Sized to be unmissable, because
   a member who does not press it does not get an account. */
button {
  margin: 0.5rem 0 1.5rem;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--link);
  border-radius: 4px;
  background: var(--link);
  color: var(--bg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  filter: brightness(1.12);
}

footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}

footer p {
  margin-bottom: 0.5rem;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* Blog and news indexes. Both render a list of entries with a title, a date and
   a paragraph, so they share one rule rather than growing two that drift. */
ul.index {
  list-style: none;
  padding: 0;
}

ul.index li {
  border-top: 1px solid var(--rule);
  padding: 1.25rem 0;
}

ul.index time,
ul.index .source {
  color: var(--muted);
  font-size: 0.9rem;
  margin-left: 0.6rem;
}

ul.index p {
  margin: 0.4rem 0 0;
}

/* Reserve the height before Plotly draws. Without it the page reflows when the
   chart appears, which on a slow connection happens after the reader has
   already started reading. */
.plot {
  min-height: 380px;
  margin: 1.5rem 0;
}
