/* Thornhallow Library: a reading room for free and open games.
   Its own stylesheet; system fonts only, nothing loaded from elsewhere. */

:root {
  --hl-paper: #f4eee2;
  --hl-card: #fffaf0;
  --hl-ink: #1f2a24;
  --hl-soft: #55625a;
  --hl-rule: #ddd2bd;
  --hl-moss: #2f6b4f;
  --hl-moss-dark: #22513b;
  --hl-rust: #b5532f;
  --hl-s1: 4px;
  --hl-s2: 8px;
  --hl-s3: 12px;
  --hl-s4: 16px;
  --hl-s5: 24px;
  --hl-s6: 32px;
  --hl-s7: 48px;
  --hl-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --hl-sans: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  color-scheme: light;
}

* , *::before, *::after { box-sizing: border-box; }

body.hl-body {
  margin: 0;
  background: var(--hl-paper);
  background-image: repeating-linear-gradient(0deg, transparent 0 31px, rgba(31, 42, 36, .035) 31px 32px);
  color: var(--hl-ink);
  font: 18px/1.6 var(--hl-serif);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--hl-moss); text-underline-offset: 3px; }
a:hover { color: var(--hl-rust); }
:focus-visible { outline: 3px solid var(--hl-rust); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--hl-serif); line-height: 1.2; margin: 0 0 var(--hl-s3); font-weight: 700; }
h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 var(--hl-s4); }

.hl-skip { position: absolute; left: var(--hl-s3); top: -60px; background: var(--hl-ink); color: var(--hl-paper); padding: var(--hl-s2) var(--hl-s3); border-radius: 4px; z-index: 10; }
.hl-skip:focus { top: var(--hl-s3); }

.hl-small { font-size: .88rem; color: var(--hl-soft); }
.hl-over { font: 600 .8rem/1.3 var(--hl-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--hl-rust); margin-bottom: var(--hl-s2); }
.hl-lead { font-size: 1.2rem; color: #33413a; max-width: 62ch; }

/* header */
.hl-top { background: var(--hl-card); border-bottom: 3px double var(--hl-rule); }
.hl-top__in { max-width: 1180px; margin: 0 auto; padding: var(--hl-s3) var(--hl-s4); display: flex; align-items: center; justify-content: space-between; gap: var(--hl-s4); flex-wrap: wrap; }
.hl-logo { display: flex; align-items: center; gap: var(--hl-s3); color: var(--hl-ink); text-decoration: none; font: 1.15rem/1 var(--hl-serif); }
.hl-logo b { font-weight: 700; }
.hl-nav { display: flex; gap: var(--hl-s2); flex-wrap: wrap; font-family: var(--hl-sans); }
.hl-nav a { color: var(--hl-ink); text-decoration: none; padding: var(--hl-s2) var(--hl-s3); border-radius: 999px; transition: background-color .16s ease-out; }
.hl-nav a:hover { background: #ece3d1; color: var(--hl-ink); }
.hl-nav a[aria-current="page"] { background: var(--hl-moss); color: #fffaf0; }

.hl-main { max-width: 1180px; margin: 0 auto; padding: var(--hl-s6) var(--hl-s4) var(--hl-s7); }

/* buttons */
.hl-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 10px 20px; border-radius: 999px; border: 2px solid var(--hl-moss);
  background: var(--hl-moss); color: #fffaf0; text-decoration: none; cursor: pointer;
  font: 600 1rem/1 var(--hl-sans);
  transition: background-color .16s ease-out, color .16s ease-out, transform .12s ease-out;
}
.hl-btn:hover { background: var(--hl-moss-dark); border-color: var(--hl-moss-dark); color: #fffaf0; }
.hl-btn:active { transform: scale(.97); }
.hl-btn--out { background: transparent; color: var(--hl-moss); }
.hl-btn--out:hover { background: var(--hl-moss); color: #fffaf0; }

/* hero */
.hl-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--hl-s6); align-items: center; }
.hl-hero__art { border-radius: 50%; aspect-ratio: 1; object-fit: cover; border: 10px solid var(--hl-card); box-shadow: 0 18px 40px -24px rgba(31, 42, 36, .55); }

.hl-section { margin-top: var(--hl-s7); }
.hl-head { display: flex; justify-content: space-between; align-items: end; gap: var(--hl-s4); flex-wrap: wrap; border-bottom: 1px solid var(--hl-rule); padding-bottom: var(--hl-s3); margin-bottom: var(--hl-s3); }
.hl-head h2 { margin: 0; }
.hl-chips { display: flex; gap: var(--hl-s2); flex-wrap: wrap; }
.hl-chip { font: 600 .92rem/1 var(--hl-sans); padding: 9px 14px; border-radius: 999px; border: 1px solid var(--hl-rule); background: var(--hl-card); color: var(--hl-ink); cursor: pointer; transition: background-color .16s ease-out, color .16s ease-out; }
.hl-chip:hover { border-color: var(--hl-moss); }
.hl-chip[aria-pressed="true"] { background: var(--hl-ink); color: var(--hl-paper); border-color: var(--hl-ink); }
.hl-note { font: .9rem/1.4 var(--hl-sans); color: var(--hl-soft); }

/* catalogue cards */
.hl-cards { display: grid; gap: var(--hl-s5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hl-card { display: grid; grid-template-columns: 200px 1fr; gap: var(--hl-s4); background: var(--hl-card); border: 1px solid var(--hl-rule); border-radius: 6px; padding: var(--hl-s4); position: relative; }
.hl-card::before { content: ""; position: absolute; left: 50%; top: -1px; width: 60px; height: 8px; transform: translateX(-50%); background: var(--hl-rule); border-radius: 0 0 6px 6px; }
.hl-card[hidden] { display: none; }
.hl-card__art img { width: 200px; height: 200px; object-fit: cover; border-radius: 50%; }
.hl-card h3 a { color: var(--hl-ink); text-decoration: none; }
.hl-card h3 a:hover { color: var(--hl-rust); }
.hl-card p { font-size: 1rem; }
.hl-drawer { font: 600 .74rem/1 var(--hl-sans); letter-spacing: .18em; text-transform: uppercase; color: var(--hl-soft); margin-bottom: var(--hl-s2); }
.hl-tags { list-style: none; margin: 0 0 var(--hl-s3); padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.hl-tags li { font: 600 .74rem/1 var(--hl-sans); letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border-radius: 3px; background: #e6efe8; color: var(--hl-moss-dark); }
.hl-mini { display: grid; gap: 6px; margin: 0 0 var(--hl-s4); font: .9rem/1.4 var(--hl-sans); }
.hl-mini div { display: grid; grid-template-columns: 120px 1fr; gap: var(--hl-s2); border-top: 1px dotted var(--hl-rule); padding-top: 6px; }
.hl-mini dt { color: var(--hl-soft); }
.hl-mini dd { margin: 0; }
.hl-acts { display: flex; gap: var(--hl-s2); flex-wrap: wrap; }
.hl-score { font-family: var(--hl-sans); }
.hl-score b { font-size: 1.15em; color: var(--hl-rust); }

/* planner */
.hl-planner { background: var(--hl-card); border: 1px solid var(--hl-rule); border-radius: 6px; padding: var(--hl-s5); }
.hl-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: var(--hl-s3); align-items: end; font-family: var(--hl-sans); }
.hl-form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.hl-form input, .hl-form select { font: inherit; font-weight: 400; padding: 9px 10px; border: 1px solid var(--hl-rule); border-radius: 4px; background: #fff; color: var(--hl-ink); min-height: 44px; }
.hl-plan { list-style: none; padding: 0; margin: var(--hl-s4) 0 0; display: grid; gap: var(--hl-s2); font-family: var(--hl-sans); }
.hl-plan li { display: grid; grid-template-columns: 110px 1fr; gap: var(--hl-s3); padding: var(--hl-s3); border-left: 4px solid var(--hl-moss); background: var(--hl-paper); }
.hl-plan li.is-break { border-left-color: var(--hl-rule); color: var(--hl-soft); }
.hl-plan li.is-end { border-left-color: var(--hl-rust); }
.hl-plan time { font-weight: 700; }

.hl-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hl-s6); }
.hl-list { padding-left: 1.2em; }
.hl-list li { margin-bottom: var(--hl-s2); }

/* review */
.hl-crumbs { font: .9rem/1.4 var(--hl-sans); color: var(--hl-soft); margin-bottom: var(--hl-s4); }
.hl-review__head { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--hl-s6); align-items: center; }
.hl-review__head img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; border: 10px solid var(--hl-card); }
.hl-verdict { font: 600 1.05rem/1.3 var(--hl-sans); }
.hl-review__body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--hl-s6); margin-top: var(--hl-s7); align-items: start; }
.hl-prose { max-width: 66ch; }
.hl-prose--wide { max-width: 72ch; }
.hl-prose h2 { margin-top: var(--hl-s6); }
.hl-prose li { margin-bottom: var(--hl-s2); }
.hl-facts { background: var(--hl-card); border: 1px solid var(--hl-rule); border-radius: 6px; padding: var(--hl-s5); position: sticky; top: var(--hl-s4); font-family: var(--hl-sans); }
.hl-facts h2 { font-size: 1.2rem; }
.hl-facts dl { margin: 0 0 var(--hl-s3); }
.hl-facts div { border-top: 1px dotted var(--hl-rule); padding: var(--hl-s2) 0; }
.hl-facts dt { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--hl-soft); }
.hl-facts dd { margin: 2px 0 0; }

.hl-mores { display: grid; gap: var(--hl-s4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hl-more { display: grid; grid-template-columns: 72px 1fr; gap: var(--hl-s3); align-items: center; background: var(--hl-card); border: 1px solid var(--hl-rule); border-radius: 6px; padding: var(--hl-s3); color: var(--hl-ink); text-decoration: none; font-size: .95rem; }
.hl-more img { width: 72px; height: 72px; object-fit: cover; border-radius: 50%; }
.hl-more b { display: block; }

/* footer */
.hl-foot { background: var(--hl-ink); color: #e9e2d2; margin-top: var(--hl-s7); font-family: var(--hl-sans); }
.hl-foot__in { max-width: 1180px; margin: 0 auto; padding: var(--hl-s6) var(--hl-s4); display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: var(--hl-s6); }
.hl-foot a { color: #f2c9a8; }
.hl-foot__name { display: flex; align-items: center; gap: var(--hl-s2); font: 700 1.1rem/1 var(--hl-serif); }
.hl-foot__h { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; color: #b9c4bc; }
.hl-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hl-foot .hl-small { color: #b9c4bc; }
.hl-foot__end { max-width: 1180px; margin: 0 auto; padding: var(--hl-s4); border-top: 1px solid #39463f; font-size: .85rem; color: #b9c4bc; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media (max-width: 900px) {
  .hl-hero, .hl-review__head, .hl-review__body, .hl-split { grid-template-columns: minmax(0, 1fr); }
  .hl-hero__art, .hl-review__head img { max-width: 320px; margin: 0 auto; }
  .hl-cards { grid-template-columns: minmax(0, 1fr); }
  .hl-form { grid-template-columns: 1fr 1fr; }
  .hl-mores { grid-template-columns: minmax(0, 1fr); }
  .hl-foot__in { grid-template-columns: minmax(0, 1fr); }
  .hl-facts { position: static; }
}

@media (max-width: 560px) {
  body.hl-body { font-size: 17px; }
  .hl-card { grid-template-columns: minmax(0, 1fr); }
  .hl-card__art img { width: 160px; height: 160px; margin: 0 auto; }
  .hl-mini div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hl-form { grid-template-columns: minmax(0, 1fr); }
  .hl-plan li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
