/* Shared styling for the public pages served by the Emberpage backend.
   Warm paper palette, matching the reader's default theme and accent colour. */

:root {
  --paper: #fbf7f2;
  --paper-raised: #fffdfa;
  --ink: #2a2018;
  --ink-soft: #6b5c4c;
  --ink-faint: #9a8b7a;
  --rule: #e6ddd0;
  --accent: #b96a20;
  --accent-soft: #f3e3d1;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14110e;
    --paper-raised: #1c1815;
    --ink: #ede6dc;
    --ink-soft: #b5a898;
    --ink-faint: #7d7164;
    --rule: #2e2823;
    --accent: #ea9851;
    --accent-soft: #2c2119;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 Georgia, "Iowan Old Style", "Times New Roman", serif;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

/* ------------------------------------------------------------------ head --- */

header.site {
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand .mark {
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
}

nav.site {
  display: flex;
  gap: 1.4rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

nav.site a {
  color: var(--ink-soft);
  text-decoration: none;
}

nav.site a:hover,
nav.site a[aria-current="page"] { color: var(--accent); }

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

h1 {
  font-size: 2.1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 2.6rem 0 0.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}

h3 {
  font-size: 1.02rem;
  margin: 1.8rem 0 0.5rem;
}

p, li { color: var(--ink); }

a { color: var(--accent); }

.lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin-top: 0;
}

.meta {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin: 0 0 2.4rem;
}

ul, ol { padding-left: 1.3rem; }

li { margin-bottom: 0.5rem; }

strong { font-weight: 700; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* ----------------------------------------------------------------- table --- */

.table-scroll {
  overflow-x: auto;
  margin: 1.2rem 0;
  border: 1px solid var(--rule);
  border-radius: 10px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.92rem;
  background: var(--paper-raised);
}

th, td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th {
  font-weight: 620;
  color: var(--ink-soft);
  background: var(--paper);
}

tr:last-child td { border-bottom: none; }

/* ------------------------------------------------------------------ note --- */

.note {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.2rem;
  margin: 1.6rem 0;
}

.note p:first-child { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ foot --- */

footer.site {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

footer.site .wrap {
  padding-top: 1.6rem;
  padding-bottom: 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

footer.site a { color: var(--ink-soft); text-decoration: none; }
footer.site a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- landing --- */

.hero { padding: 1rem 0 0; }

.hero h1 { font-size: 2.6rem; }

.features {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.features li {
  margin: 0;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
}

.features h3 { margin: 0 0 0.35rem; }

.features p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
