/* CommaClause English – shared styles.
   Same family as the graded readers (Powder in the Snow): a quiet book
   page with Lora headings, a bookish serif for text, thin rules instead of
   boxes, pill buttons, and one deep accent – here a navy blue instead of
   the readers' dark red. */

@font-face { font-family: "Lora"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/lora-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/lora-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --page: #f0f3f7;     /* cool, faintly blue paper */
  --ink: #1c2430;
  --muted: #5b6673;
  --rule: #cdd5de;
  --accent: #1e3a5f;   /* deep navy – the readers use deep red */
  --heading: #1e3a5f;
  --accent-ink: #ffffff;
  --hover: rgba(30, 58, 95, 0.06);
  --serif: "Charter", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --head: "Lora", "Charter", Georgia, serif;
  --text-w: 56rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #10161e; --ink: #e4e8ee; --muted: #9aa5b2; --rule: #2a3441;
    --accent: #9fbbe3; --accent-ink: #10161e; --hover: rgba(159, 187, 227, 0.08);
    --heading: #d6e2f2;
  }
}

* { box-sizing: border-box; }
html { background: var(--page); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--page);
  font-family: var(--serif); font-size: 19px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; letter-spacing: -0.01em; color: var(--heading); }

.page { max-width: var(--text-w); margin: 0 auto; padding: 1.5rem 1.5rem 5rem; }

/* ---------- running header (as in the readers) ---------- */
.site-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--rule); padding-bottom: 0.7rem; margin-bottom: 3.5rem;
}
.wordmark { font-family: var(--head); font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.wordmark span { color: var(--muted); }
.wordmark:hover { text-decoration: none; color: var(--accent); }
.site-head nav { display: flex; gap: 1.25rem; font-size: 0.85rem; }
.site-head nav a { color: var(--muted); text-decoration: none; font-family: var(--head); font-weight: 700; }
.site-head nav a:hover { color: var(--accent); }

/* ---------- buttons ---------- */
.button {
  display: inline-block; font-family: var(--head); font-weight: 700; font-size: 1rem;
  background: var(--accent); color: var(--accent-ink); text-decoration: none;
  padding: 0.55rem 1.5rem; border-radius: 999px;
}
.button:hover { text-decoration: none; filter: brightness(1.15); }

/* ---------- home ---------- */
.cover { text-align: center; margin: 1rem auto 4.5rem; max-width: 40rem; }
.cover h1 { font-size: clamp(2.1rem, 5vw, 3rem); line-height: 1.12; margin: 0 0 1.25rem; }
.cover .lede { margin: 0 auto 0.75rem; }
.cover .pl { color: var(--muted); font-style: italic; margin: 0 auto; }
.cover .actions { margin: 2rem 0 0.75rem; }
.cover .aside { color: var(--muted); font-size: 0.85rem; margin: 0; }

.section { max-width: 38rem; margin: 0 auto 4rem; }
.section h2 { font-size: 1.35rem; margin: 0 0 0.4rem; }
.section > p { margin: 0 0 1.25rem; }
.section .intro { color: var(--muted); }

/* contents-style lists: thin rules between rows, like a book's contents page */
.contents { list-style: none; padding: 0; margin: 0; border-bottom: 1px solid var(--rule); }
.contents li { border-top: 1px solid var(--rule); }
.contents .row, .contents a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.6rem 0.25rem; color: var(--ink); text-decoration: none;
}
.contents .name, .contents a .name { font-family: var(--head); font-weight: 700; }
.contents .note { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.contents .open .note { color: var(--accent); }
.contents a:hover { background: var(--hover); }
.contents a:hover .name { color: var(--accent); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2.5rem; }
.pair h3 { font-size: 1.05rem; margin: 0 0 0.3rem; }
.pair p { margin: 0; }
@media (max-width: 640px) { .pair { grid-template-columns: 1fr; } }

.site-foot {
  max-width: 38rem; margin: 0 auto; border-top: 1px solid var(--rule); padding-top: 1rem;
  color: var(--muted); font-size: 0.85rem; text-align: center;
}
.site-foot p { margin: 0 0 0.3rem; }

/* ---------- members' menus ---------- */
.menu { max-width: 38rem; margin: 0 auto; }
.menu-head { margin: 0 0 2rem; }
.menu-head h1 { font-size: clamp(2rem, 5vw, 2.5rem); line-height: 1.1; margin: 0; }
.crumbs { font-size: 0.9rem; font-weight: 700; margin: 0 0 0.5rem; color: var(--muted); }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.menu h2 { font-size: 1.15rem; margin: 2.5rem 0 0.6rem; }
.menu > p { color: var(--muted); margin: 0 0 1.25rem; }

/* ---------- message pages (login, not found) ---------- */
.message { max-width: 34rem; margin: 2rem auto; text-align: center; }
.message h1 { font-size: clamp(1.8rem, 5vw, 2.3rem); margin: 0 0 1rem; }
.message code { font-size: 0.9em; }
.message ul { text-align: left; }
.message li { margin: 0.4rem 0; }

@media (max-width: 560px) {
  body { font-size: 18px; }
  .page { padding: 1rem 1rem 4rem; }
  .site-head { margin-bottom: 2.5rem; }
}

/* a short description under a list item's name (members' home) */
.contents .desc { display: block; font-family: var(--serif); font-weight: 400; font-size: 0.9rem; color: var(--muted); margin-top: 0.1rem; }
