/* Weekend Learning: the same paper, ink and navy as mohammadi.cv, the
   newsletter covers and the Persian sister at /weekend-learning-fa/.
   Nothing here loads from another site; the fonts are the system's own. */

:root {
  color-scheme: light dark;
  --paper: #fafaf7;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-2: #444444;
  --muted: #6e6e6e;
  --rule: #e3e1dc;
  --accent: #1e3a5f;
  --accent-hover: #2d5080;
  --on-accent: #fafaf7;
  --tint: #f2f1ec;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --column: 680px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14181d;
    --surface: #1b2027;
    --ink: #ecebe6;
    --ink-2: #cfcec8;
    --muted: #a3a6aa;
    --rule: #2e343c;
    --accent: #a4c0e4;
    --accent-hover: #c7d9f0;
    --on-accent: #14181d;
    --tint: #1d232a;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  border-top: 6px solid var(--accent);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

::selection { background: var(--accent); color: var(--on-accent); }

.col {
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

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

.site-foot {
  margin-top: 64px;
  padding-block: 20px 40px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-foot p { margin: 0.2em 0; }
.site-foot a { color: var(--muted); }

/* ---------- text ---------- */

main { padding-block: 28px 0; }

h1, h2, h3 { color: var(--ink); line-height: 1.3; font-weight: 800; }
h1 { font-size: clamp(1.85rem, 1.45rem + 2vw, 2.55rem); margin: 0.1em 0 0.4em; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.25rem, 1.15rem + 0.6vw, 1.45rem); margin: 2.2em 0 0.6em; }
h3 { font-size: 1.15rem; margin: 0 0 0.4em; font-weight: 700; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-inline-start: 1.4em; }
li { margin-bottom: 0.35em; }

.kicker { color: var(--muted); font-weight: 500; font-size: 0.92rem; margin: 0 0 0.2em; }
.standfirst { font-size: 1.2rem; line-height: 1.55; color: var(--ink-2); font-weight: 500; }

code,
pre { font-family: var(--mono); font-size: 0.86rem; }
pre {
  margin: 0.8em 0 0;
  padding: 10px 14px;
  background: var(--tint);
  border-inline-start: 3px solid var(--accent);
  line-height: 1.6;
  overflow-x: auto;
  max-width: 100%;
}
pre code { white-space: pre; }

.ways {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 0;
  margin: 1em 0 0;
  list-style: none;
  font-size: 0.95rem;
}
.ways li { margin: 0; }
.ways a {
  display: inline-block;
  padding: 2px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  text-decoration: none;
  background: var(--surface);
}
.ways a:hover { border-color: var(--accent); }

/* ---------- the index ---------- */

.hub-logo { display: block; width: 64px; height: 64px; border-radius: 6px; margin: 8px 0 14px; }

.issues { list-style: none; padding: 0; margin: 0; }
.issues > li { border-top: 1px solid var(--rule); padding-block: 20px; margin: 0; }
.issues > li:last-child { border-bottom: 1px solid var(--rule); }
.issues h3 a { color: var(--ink); text-decoration: none; }
.issues h3 a:hover { color: var(--accent); }
.issues p { margin-bottom: 0.4em; }

@media print {
  body { border-top: 0; }
  .ways { display: none; }
  pre { white-space: pre-wrap; }
}
