/* Public Ling Library pages (generated by scripts/build-library.mjs). Colours follow the app in both themes. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f5f8f5;
  --line: #e3eae5;
  --ink: #20352f;
  --text: #4e5e56;
  --muted: #82908a;
  --green: #315b4d;
  --green-dark: #244a3e;
  --green-soft: #eaf1eb;
  --coral: #ee7967;
  --cover-0: #5f8a78;
  --cover-1: #d47b67;
  --cover-2: #4f7d8a;
  --cover-3: #e7be77;
  --serif: "Fraunces", Georgia, serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131815;
  --surface: #1c231f;
  --line: #2c3731;
  --ink: #d7ddd9;
  --text: #b8c3bc;
  --muted: #8f9e96;
  --green: #3d7261;
  --green-dark: #33604f;
  --green-soft: #1f2a24;
  --coral: #e0806f;
  --cover-0: #3f6a58;
  --cover-1: #9a5546;
  --cover-2: #355e6a;
  --cover-3: #9c7a3e;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 400 16px/1.6 "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--green);
}
.wrap {
  width: min(100% - 32px, 1040px);
  margin: 0 auto;
}
.dot {
  color: var(--coral);
}
.nav {
  position: sticky;
  z-index: 2;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}
.nav-links > a {
  color: var(--ink);
  text-decoration: none;
}
.lang {
  display: inline-flex;
  gap: 2px;
  border-radius: 8px;
  padding: 3px;
  background: var(--green-soft);
}
.lang a {
  min-width: 34px;
  border-radius: 6px;
  padding: 3px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.lang a[aria-current] {
  color: var(--ink);
  background: var(--bg);
}
.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  padding: 9px 16px;
  color: #fff !important;
  background: var(--green);
  font-weight: 600;
  text-decoration: none;
}
.nav-cta:hover,
.button:hover {
  background: var(--green-dark);
}
.hero {
  padding: 56px 0 18px;
}
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
}
h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
}
h1 {
  margin: 10px 0 12px;
  font-size: 46px;
  line-height: 1.08;
}
h2 {
  margin: 0 0 18px;
  font-size: 28px;
}
.lead {
  max-width: 640px;
  margin: 0;
  font-size: 17px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.chip {
  border: 1px solid var(--line);
  border-radius: 50px;
  padding: 6px 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.group {
  padding-top: 44px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 26px 18px;
}
.card {
  display: grid;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}
.card:hover .cover {
  transform: translateY(-3px);
}
.card-title {
  margin-top: 8px;
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-meta {
  color: var(--muted);
  font-size: 13px;
}
.cover {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 0.72;
  border-radius: 4px 9px 9px 4px;
  padding: 18px 16px;
  color: #fff;
  background: var(--cover-0);
  box-shadow: inset 6px 0 0 #00000018, 0 12px 26px #14241d1f;
  transition: transform 0.2s;
}
.cover::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid #ffffff55;
  border-radius: 3px;
}
.cover.has-image {
  overflow: hidden;
  padding: 0;
  background: var(--surface);
}
.cover.has-image::before {
  inset: 0;
  z-index: 1;
  border: 0;
  border-radius: inherit;
  box-shadow: inset 6px 0 0 #0000001f, inset 0 0 0 1px #00000014;
}
.cover.has-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Old covers carry the title near the top, so a tall scan is trimmed at the bottom. */
  object-position: top;
}
.cover-1 { background: var(--cover-1); }
.cover-2 { background: var(--cover-2); }
.cover-3 { background: var(--cover-3); }
.cover-stamp {
  position: absolute;
  top: 18px;
  left: 18px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}
.cover-title {
  font: 500 20px/1.15 var(--serif);
}
.cover-author {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.85;
}
.crumbs {
  padding-top: 26px;
  color: var(--muted);
  font-size: 13px;
}
.crumbs a {
  color: var(--muted);
}
.book {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 44px;
  padding: 26px 0 30px;
}
.book .cover-title {
  font-size: 24px;
}
.author {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
}
.author span {
  color: var(--muted);
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}
.facts li {
  border-radius: 6px;
  padding: 4px 10px;
  color: var(--text);
  background: var(--surface);
  font-size: 13px;
}
.facts strong {
  color: var(--ink);
}
.description {
  max-width: 620px;
  margin: 0 0 24px;
  font-size: 17px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}
.link {
  font-weight: 600;
  text-decoration: none;
}
.contents {
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.contents ol {
  columns: 2;
  column-gap: 40px;
  margin: 0;
  padding-left: 22px;
  color: var(--text);
}
.contents li {
  break-inside: avoid;
  padding: 3px 0;
}
.try {
  margin-top: 44px;
  border-top: 1px solid var(--line);
  padding-top: 36px;
}
.try > p {
  max-width: 680px;
  margin: 8px 0 20px;
  color: var(--text);
}
.reader-frame {
  display: block;
  width: 100%;
  height: min(860px, 88vh);
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: 0 20px 50px rgba(20, 36, 29, 0.08);
}
.try-note {
  margin: 10px 0 0;
  font-size: 13px;
}
.excerpt {
  max-width: 680px;
  margin: 36px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.excerpt summary {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.excerpt[open] summary {
  margin-bottom: 16px;
}
.excerpt h3 {
  margin: 28px 0 12px;
  font-size: 22px;
}
.excerpt p {
  margin: 0 0 1.1em;
  color: var(--text);
  font: 400 19px/1.85 var(--serif);
}
.continue {
  max-width: 680px;
  margin: 30px auto 0;
  border-radius: 14px;
  padding: 30px;
  background: var(--green-soft);
  text-align: center;
}
.continue h2 {
  margin-bottom: 8px;
}
.continue p {
  margin: 0 0 20px;
}
.muted {
  color: var(--muted);
}
.small {
  margin-top: 36px;
  font-size: 12px;
}
.footer {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 720px) {
  .nav-links > a:first-child {
    display: none;
  }
  .nav-links {
    gap: 10px;
  }
  .nav-cta {
    padding: 7px 12px;
    font-size: 13px;
  }
  h1 {
    font-size: 34px;
  }
  .hero {
    padding-top: 36px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .book {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .book .cover {
    width: 170px;
  }
  .contents ol {
    columns: 1;
  }
  .excerpt p {
    font-size: 17px;
  }
  .reader-frame {
    height: 82svh;
    min-height: 480px;
    border-radius: 10px;
  }
}
