/* BookFly, on the web. Palette and type from docs/DESIGN.md, section 3 and 4.
   The file keeps its old name: the pages link it, and nobody sees it. */

:root {
  --ground: #F5EFE5;
  --raised: #E7E0D4;
  --sheet: #FCF7EF;
  --type: #121C20;
  --type-2: #36464C;
  --cloth: #29686D;
  --ochre: #965C24;
  --oxblood: #8E3C31;
  --slate: #586C73;
  --rule: rgba(18, 28, 32, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #121C20;
    --raised: #18252B;
    --sheet: #EDE6DA;
    --type: #EDE6DA;
    --type-2: #DCD4C7;
    --cloth: #5DA4A6;
    --ochre: #E09859;
    --oxblood: #B25B4F;
    --slate: #83969D;
    --rule: rgba(237, 230, 218, 0.16);
  }
}

:root[data-theme="dark"] {
  --ground: #121C20;
  --raised: #18252B;
  --sheet: #EDE6DA;
  --type: #EDE6DA;
  --type-2: #DCD4C7;
  --cloth: #5DA4A6;
  --ochre: #E09859;
  --oxblood: #B25B4F;
  --slate: #83969D;
  --rule: rgba(237, 230, 218, 0.16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--type);
  font: 400 17px/1.62 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 42rem; margin: 0 auto; padding: 3.5rem 1.5rem 6rem; }

/* The mark: the owl from the app icon, then the wordmark, as the app's own
   header has it since the rename to BookFly (Faruk's call, 2026-10-21). The
   owl keeps a rim of the icon's cream, so it holds on the dark ground too. */
.mark {
  display: inline-flex; align-items: center; gap: 0.42em;
  font-weight: 800; letter-spacing: -0.038em; font-size: 1.32rem;
  color: var(--type); text-decoration: none;
}
.mark .owl { width: auto; height: 1.6em; display: block; }

.colophon {
  font: 500 0.7rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--slate);
  margin: 3rem 0 0.6rem;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.7rem); font-weight: 650; letter-spacing: -0.025em;
  line-height: 1.1; margin: 0.6rem 0 0.5rem;
}
h2 {
  font-size: 1.28rem; font-weight: 650; letter-spacing: -0.01em;
  margin: 2.6rem 0 0.6rem; padding-top: 1.4rem; border-top: 1px solid var(--rule);
}
h3 { font-size: 1.02rem; font-weight: 650; margin: 1.6rem 0 0.35rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.12rem; color: var(--type-2); }
a { color: var(--cloth); text-underline-offset: 0.18em; }
strong { font-weight: 650; }

ul { margin: 0 0 1rem; padding-left: 1.1rem; }
li { margin-bottom: 0.5rem; }
li::marker { color: var(--ochre); }

.card {
  background: var(--raised); border: 1px solid var(--rule);
  border-radius: 10px; padding: 1.1rem 1.25rem; margin: 0 0 1rem;
}
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

/* Wide tables scroll inside their own box so the page body never does. */
.scroll { overflow-x: auto; margin: 0 0 1.2rem; }
table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.6rem 0.9rem 0.6rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font: 500 0.7rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate); }

footer {
  margin-top: 4rem; padding-top: 1.4rem; border-top: 1px solid var(--rule);
  color: var(--slate); font-size: 0.9rem;
}
footer a { color: var(--slate); }
.nav { display: flex; gap: 1.4rem; margin-bottom: 0.8rem; }
