/* Flash RSS Reader — flashrssapp.github.io
   Quiet Ink, as in the app: one interactive colour (teal), Literata for
   headlines, Instrument Sans for text, JetBrains Mono for numbers and prices.
   The pool-tile mosaic sits dim behind the header and hero only, never behind
   body text. Self-hosted fonts, no third-party requests, no trackers. */

@font-face {
  font-family: "Literata";
  src: url("fonts/Literata.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/InstrumentSans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* The app's own tokens (lib/theme/app_theme.dart). */
:root {
  color-scheme: light dark;
  --surface: #ffffff;
  --surface-2: #f1f5f5;
  --ink: #0f1413;
  --ink-2: #5a6361;
  --ink-3: #717877;
  --rule: #e9eceb;
  --teal: #0e6a70;
  --teal-tint: #dcebeb;
  --tiles: 0.07;

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --measure: 42rem;
  --pad: 1.5rem;
  --radius: 9px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #0d1211;
    --surface-2: #161d1c;
    --ink: #e7ebea;
    --ink-2: #8c9695;
    --ink-3: #767f7e;
    --rule: rgba(255, 255, 255, 0.09);
    --teal: #7bd0d3;
    --teal-tint: #12292a;
    --tiles: 0.10;
  }
}

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- the tiles: header and hero only ---------- */

.tiled {
  position: relative;
  isolation: isolate;
  background: var(--surface);
}
.tiled::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("img/pool-tile.png");
  background-repeat: repeat;
  background-size: 168px 168px;
  background-position: top left;
  opacity: var(--tiles);
  pointer-events: none;
}

/* ---------- masthead ---------- */

.masthead { border-bottom: 1px solid var(--rule); }

.masthead .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1.125rem;
  padding-bottom: 1.125rem;
  flex-wrap: wrap;
}

.nameplate {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-right: auto;
}

.nameplate img {
  width: 2rem;
  height: 2rem;
  flex: none;
  display: block;
}

.masthead nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

.masthead nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.masthead nav a:hover { color: var(--teal); }
.masthead nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--teal);
}

/* ---------- hero (home) ---------- */

.hero {
  border-bottom: 1px solid var(--rule);
  padding: 3.5rem 0 3rem;
}
.hero .lede { margin-bottom: 0; }
/* Text in the hero sits on its own surface, so the tiles never run behind it. */
.hero .copy {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.375rem;
  margin: 0 calc(-1 * var(--pad) / 2);
}

/* ---------- type ---------- */

main { padding: 3rem 0 4rem; }

h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

h2:first-of-type { border-top: none; padding-top: 0; }

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.75rem 0 0.375rem;
  color: var(--ink);
}

p { margin: 0 0 1.125rem; }

.lede {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 2rem;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.75rem;
}

a { color: var(--teal); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 600; }

/* Numbers and prices only. */
.num { font-family: var(--mono); font-size: 0.95em; letter-spacing: -0.01em; }

ul, ol { margin: 0 0 1.125rem; padding-left: 1.25rem; }
li { margin-bottom: 0.5rem; }
li::marker { color: var(--teal); }

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* ---------- components ---------- */

.panel {
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.375rem 1.5rem;
  margin: 0 0 1.75rem;
}

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

.accent {
  background: var(--teal-tint);
  border-color: transparent;
}

.feature {
  margin: 0 0 1.75rem;
  padding-left: 1.125rem;
  border-left: 2px solid var(--teal-tint);
}
.feature h3 { margin-top: 0; }
.feature p { margin-bottom: 0; color: var(--ink-2); }

.plain-list { list-style: none; padding-left: 0; }
.plain-list li {
  padding-left: 1.5rem;
  position: relative;
}
.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--teal);
}

.no-list li::before {
  background: none;
  border: 1.5px solid var(--ink-3);
  width: 0.55rem;
  height: 0.55rem;
  top: 0.6em;
}

dl { margin: 0 0 1.125rem; }
dt { font-weight: 600; margin-top: 1rem; }
dd { margin: 0.25rem 0 0; color: var(--ink-2); }

.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.625rem 0.75rem 0.625rem 0;
  border-bottom: 1px solid var(--rule);
}
th {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.meta {
  font-size: 0.875rem;
  color: var(--ink-3);
  margin-bottom: 2.25rem;
}

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

footer {
  border-top: 1px solid var(--rule);
  background: var(--surface-2);
  padding: 2rem 0 2.5rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

footer nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.875rem;
}

footer p { margin: 0 0 0.375rem; }

.fine { font-size: 0.8125rem; color: var(--ink-3); }

@media (max-width: 30rem) {
  main { padding-top: 2.25rem; }
  .hero { padding: 2.25rem 0 2rem; }
  .masthead .wrap { gap: 0.625rem; }
  .nameplate { font-size: 1.3125rem; }
  .nameplate img { width: 1.75rem; height: 1.75rem; }
  .masthead nav { gap: 1rem; font-size: 0.875rem; }
}
