/* A language's book: plain and readable, until the makeover. The palette is
   the language sites' (internal/lang/static/lang.css). */
:root {
  --paper: #faf8f4; --card: #fffdf9; --ink: #22201c; --muted: #6b665d;
  --line: #e3ddd2; --soft: #f0ebe2; --accent: #8a3b2a;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1916; --card: #211f1b; --ink: #ece7de; --muted: #a39d92;
    --line: #36332d; --soft: #2a2823; --accent: #e09a83;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 var(--sans); }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; font-weight: 600; }
h1 { font-size: 1.8rem; margin: .4rem 0 .6rem; }
h2 { font-size: 1.25rem; margin: 2.4rem 0 .6rem; }
h3 { font-size: 1.05rem; margin: 1.6rem 0 .5rem; }
h2 .num { color: var(--muted); font-weight: 400; margin-right: .3rem; }
.muted { color: var(--muted); }
.lead { font-size: 1.08rem; }
.early { color: var(--muted); }

.strip { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding: .5rem 16px; border-bottom: 1px solid var(--line); background: var(--card); font-size: .95rem; }
.strip a { text-decoration: none; }
.strip-name { font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.strip-front { margin-left: auto; }

main { padding: 0 16px 4rem; }
.page { max-width: 720px; margin: 0 auto; }
.crumb { margin: 1.4rem 0 0; font-size: .9rem; color: var(--muted); }
.crumb a { text-decoration: none; }

.contents { padding-left: 1.6rem; margin: 2rem 0; }
.contents li { margin: 0 0 1rem; }
.contents .ch-title { font-weight: 600; }
.contents .goal { margin: .15rem 0 0; color: var(--muted); font-size: .95rem; }

.toc { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .6rem 1rem; margin: 1.4rem 0; font-size: .95rem; }
.toc ol { margin: 0; padding-left: 1.4rem; }

table { border-collapse: collapse; margin: 1rem 0; font-size: .95rem; display: block; overflow-x: auto; max-width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: .35rem .8rem .35rem 0; text-align: left; vertical-align: top; }
th { font-weight: 600; }

.callout { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; padding: .4rem 1rem; margin: 1.2rem 0; }
.callout-title { font-weight: 600; margin: .5rem 0 0; }

/* An example: the sentence, its words in pieces over their glosses, then
   its English. */
.ex { margin: 1.1rem 0; padding: .6rem 0 .6rem 1rem; border-left: 2px solid var(--line); }
.ex .t { font-size: 1.12rem; font-weight: 600; margin: 0; }
.gl { display: flex; flex-wrap: wrap; gap: .1rem 1.1rem; margin: .3rem 0 .2rem; font-size: .9rem; }
.gl .w { display: inline-flex; flex-direction: column; }
.gl .p { color: var(--ink); }
.gl .g { color: var(--muted); }
.lbl { font-size: .78rem; letter-spacing: .03em; }
.ex .en { color: var(--muted); font-style: italic; }

/* Listening and testing yourself (book.js) */
.can-say .wd, .can-say .say { cursor: pointer; }
.can-say .wd:hover, .can-say .say:hover { text-decoration: underline dotted; text-underline-offset: .2em; }
.play { font: inherit; font-size: .75rem; line-height: 1; color: var(--accent); background: none; border: 1px solid var(--line); border-radius: 99px; padding: .2rem .45rem; margin-right: .5rem; vertical-align: .15em; cursor: pointer; }
.play:hover { border-color: var(--accent); }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1rem 0 1.4rem; }
.chip { font: inherit; font-size: .85rem; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 99px; padding: .15rem .8rem; cursor: pointer; }
.chip[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.voice-note { font-size: .85rem; }
.reveal { display: none; font: inherit; font-size: .8rem; color: var(--accent); background: none; border: 0; padding: .2rem 0; cursor: pointer; }
.no-gl .reveal, .no-en .reveal { display: inline; }
.no-gl .ex:not(.open) .gl, .no-en .ex:not(.open) .en { display: none; }

/* The endings index */
a.end { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--muted); }
a.end:hover { color: var(--accent); border-color: var(--accent); }
.endings td:first-child a { font-weight: 600; text-decoration: none; }
.forms { display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; padding: 0; list-style: none; font-size: 1.05rem; }
.ex .where { font-style: normal; font-size: .85rem; }
.ex .t a { color: inherit; text-decoration: none; }

.turn { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1rem; font-size: .95rem; }
.turn a { text-decoration: none; }
.turn .next { margin-left: auto; text-align: right; }
