/* Lost in Pages — site styles (brand kit v0.8) */

@font-face { font-family: "Lora"; font-style: italic; font-weight: 500; font-display: swap; src: url("/assets/fonts/lora-500-italic.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("/assets/fonts/poppins-400.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("/assets/fonts/poppins-500.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("/assets/fonts/poppins-700.woff") format("woff"); }
@font-face { font-family: "Liberation Sans"; font-weight: 400; font-display: swap; src: url("/assets/fonts/liberation-sans-400.woff") format("woff"); }
@font-face { font-family: "Liberation Sans"; font-weight: 700; font-display: swap; src: url("/assets/fonts/liberation-sans-700.woff") format("woff"); }
@font-face { font-family: "Liberation Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/liberation-sans-400-italic.woff") format("woff"); }

:root {
  color-scheme: light;
  --midnight: #1D3557;
  --midnight-fold: #4C6487;
  --teal: #1F7A74;
  --teal-fold: #5FA7A1;
  --teal-tint: #E3F0EE;
  --amber: #E3A33B;
  --amber-tint: #FBEFD9;
  --cream: #F7F2E8;
  --slate: #6B7280;
  --mist: #DCE3EA;
  --line: #E4E0D6;
  --paper: #FFFFFF;
  --ink: #1D3557;
  --body: #2B3445;
  --logo: "Lora", Georgia, serif;
  --head: "Poppins", "Segoe UI", system-ui, sans-serif;
  --text: "Liberation Sans", Arial, Helvetica, sans-serif;
  --wrap: 1040px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--midnight); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--head); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-weight: 700; font-size: clamp(2rem, 5vw, 2.9rem); letter-spacing: -.01em; }
h2 { font-weight: 700; font-size: clamp(1.4rem, 3.2vw, 1.8rem); }
h3 { font-weight: 500; font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--midnight); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; color: #fff; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--midnight); }
.lockup svg { width: 34px; height: 34px; flex: none; }
.lockup span { font-family: var(--logo); font-style: italic; font-weight: 500; font-size: 1.3rem; }
.lockup:hover { color: var(--midnight); }
.nav { display: flex; gap: 4px 20px; flex-wrap: wrap; font-family: var(--head); font-size: .95rem; }
.nav a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--teal); }
.nav a[aria-current="page"] { border-bottom-color: currentColor; }

/* Hero */
.hero { background: var(--cream); padding: 64px 0 56px; text-align: center; }
.hero .logo { width: 132px; height: 132px; margin: 0 auto 26px; }
.hero h1 { max-width: 15em; margin-left: auto; margin-right: auto; }
.hero .lead { font-size: 1.15rem; max-width: 34em; margin: 0 auto; }
.series-hero { text-align: left; padding: 52px 0 46px; }
.series-hero .eyebrow { color: var(--teal); }
.series-hero h1 { color: var(--teal); margin-left: 0; letter-spacing: .02em; }
.series-hero .lead { margin: 0; max-width: 36em; }

.eyebrow { font-family: var(--head); font-weight: 500; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); margin: 0 0 .7em; }

section.block { padding: 56px 0; }
section.block + section.block { border-top: 1px solid var(--line); }
.narrow { max-width: 44em; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 24px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--paper); display: flex; flex-direction: column; gap: 6px; }
.card.feature { border-color: var(--teal); border-width: 2px; }
.card .tag { align-self: flex-start; }
.card h3 { margin: 6px 0 2px; font-size: 1.3rem; }
.card.feature h3 { color: var(--teal); font-weight: 700; letter-spacing: .03em; }
.card p { margin: 0 0 .6em; }
.card .more { margin-top: auto; font-family: var(--head); font-weight: 500; }
.card.soon { background: var(--cream); border-style: dashed; }

.tag { display: inline-block; font-family: var(--head); font-size: .75rem; font-weight: 500; letter-spacing: .04em; padding: 3px 10px; border-radius: 99px; background: var(--mist); color: var(--midnight); }
.tag.teal { background: var(--teal-tint); color: var(--teal); }
.tag.amber { background: var(--amber-tint); color: #7A5310; }

.btn { display: inline-block; font-family: var(--head); font-weight: 500; text-decoration: none; padding: 11px 20px; border-radius: 8px; background: var(--midnight); color: #fff; }
.btn:hover { background: var(--teal); color: #fff; }
.btn.teal { background: var(--teal); }
.btn.teal:hover { background: var(--midnight); }

.note { background: var(--cream); border-radius: var(--radius); padding: 20px 24px; }
.note h3 { margin-bottom: .3em; }
.note p:last-child { margin-bottom: 0; }

.signoff { font-family: var(--logo); font-style: italic; font-weight: 500; font-size: 1.25rem; color: var(--midnight); text-align: center; margin: 0; }

/* Levels */
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin: 20px 0 8px; }
.level { border-radius: var(--radius); background: var(--cream); padding: 18px 20px; }
.level strong { display: block; font-family: var(--head); font-weight: 700; color: var(--midnight); font-size: 1.1rem; }
.level span { color: var(--slate); font-size: .95rem; }

.themes { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.themes li { font-family: var(--head); font-size: .9rem; border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px; }

/* Clue guide */
.guide-intro { font-size: 1.05rem; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.toc a { display: inline-block; font-family: var(--head); font-size: .88rem; text-decoration: none; border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px; background: var(--paper); }
.toc a:hover { border-color: var(--teal); }

.filter { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 2px 8px rgba(29,53,87,.06); }
@media (max-width: 720px) { .filter { position: static; box-shadow: none; } .clue-section { scroll-margin-top: 12px; } }
.filter .wrap { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.filter-label { font-family: var(--head); font-size: .9rem; color: var(--slate); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; padding: 3px; background: var(--cream); flex-wrap: wrap; }
.seg button { font: 500 .88rem var(--head); color: var(--midnight); background: none; border: 0; border-radius: 99px; padding: 6px 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--midnight); color: #fff; }
.filter-count { font-size: .88rem; color: var(--slate); }

.clue-section { padding-top: 44px; scroll-margin-top: 70px; }
.clue-section > p { max-width: 44em; }
table.clues { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .97rem; }
table.clues th { font-family: var(--head); font-weight: 500; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); text-align: left; padding: 8px 12px; border-bottom: 2px solid var(--midnight); }
table.clues td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.clues td.type { font-weight: 700; color: var(--midnight); width: 22%; }
table.clues td.means { width: 30%; }
table.clues td.from { width: 120px; white-space: nowrap; }
.ex-clue { display: block; font-style: italic; color: var(--midnight); }
.ex-work { display: block; color: var(--body); }
.ex-work b { font-family: var(--head); font-weight: 700; color: var(--teal); }
tr[hidden] { display: none; }
.empty-msg { color: var(--slate); font-style: italic; padding: 10px 0; }

.lvl { display: inline-block; font-family: var(--head); font-size: .75rem; font-weight: 500; padding: 3px 10px; border-radius: 99px; }
.lvl.b { background: var(--teal-tint); color: var(--teal); }
.lvl.i { background: var(--mist); color: var(--midnight); }
.lvl.a { background: var(--amber-tint); color: #7A5310; }

@media (max-width: 720px) {
  table.clues thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.clues, table.clues tbody, table.clues tr, table.clues td { display: block; width: 100% !important; }
  table.clues tr { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; position: relative; }
  table.clues td { border: 0; padding: 2px 0; }
  table.clues td.type { padding-right: 110px; font-size: 1.05rem; }
  table.clues td.from { position: absolute; top: 14px; right: 16px; width: auto !important; }
  table.clues td.example { margin-top: 8px; background: var(--cream); border-radius: 8px; padding: 10px 12px; }
}

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 20px; }
.facts .fact { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.facts h3 { color: var(--teal); margin-bottom: .4em; }
.facts ul { margin: 0; padding-left: 1.1em; }
.facts li { margin-bottom: .3em; }

/* Footer */
.site-footer { background: var(--cream); margin-top: 0; padding: 36px 0; color: var(--slate); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.site-footer .lockup span { font-size: 1.1rem; }
.site-footer .lockup svg { width: 28px; height: 28px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--slate); }

.center { text-align: center; }
.mt { margin-top: 28px; }
