/*
 * Lamp — lamp.nookpages.com. One stylesheet for every page: no web fonts, scripts or third-party files.
 * Colours come from Lamp's theme (packages/tokens, brand #D97706). Text pairs meet WCAG AA (4.5:1 or more)
 * in both modes; the amber fill (#D97706) is used only for shapes and behind dark text (6.3:1).
 */

:root {
  color-scheme: light dark;

  --bg: #fef9f6;
  --surface: #ffffff;
  --amber-muted: #fceee4;
  --text: #1a1614;
  --text-secondary: #635c58;
  --link: #9a5200;
  --link-hover: #8a4900;
  --accent: #d97706;
  --accent-hover: #bf6905;
  --on-accent: #090705;
  --flame: #fff5ed;
  --flame-core: #feab69;
  --flame-glow: #ffd0ad;
  --border: #e9e4e0;
  --focus: #9a5200;
  --glow: rgb(217 119 6 / 0.14);
  --shadow: 0 10px 30px rgb(217 119 6 / 0.25);

  --font-serif:
    ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, Cambria, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 42rem;
  --wide: 64rem;
  --gutter: 1rem;
  --radius: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110e;
    --surface: #1a1614;
    --amber-muted: #382211;
    --text: #f1ece9;
    --text-secondary: #a7a09b;
    --link: #e88a37;
    --link-hover: #feab69;
    --accent: #d97706;
    --accent-hover: #e88a37;
    --on-accent: #090705;
    --flame: #fff5ed;
    --flame-core: #feab69;
    --border: #2f2a27;
    --focus: #feab69;
    --glow: rgb(217 119 6 / 0.2);
    --shadow: 0 10px 34px rgb(217 119 6 / 0.3);
  }
}

@media (min-width: 40rem) {
  :root {
    --gutter: 1.5rem;
  }
}

/* Base */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

@media (min-width: 48rem) {
  body {
    font-size: 1.125rem;
  }
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 1.6rem + 2.4vw, 3.1rem);
  margin: 0 0 1rem;
}

h2 {
  font-size: clamp(1.45rem, 1.3rem + 0.8vw, 1.85rem);
  margin: 3rem 0 0.75rem;
  scroll-margin-top: 1.5rem;
}

h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.5rem;
  scroll-margin-top: 1.5rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

p {
  text-wrap: pretty;
}

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

li {
  margin-top: 0.4rem;
}

li:first-child {
  margin-top: 0;
}

li::marker {
  color: var(--accent);
}

strong {
  font-weight: 650;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.page {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  padding-block: 2.5rem 4rem;
}

.narrow {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  padding-bottom: 3rem;
}

.center {
  text-align: center;
}

.fineprint {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Skip link: hidden until focused */

.skip {
  position: absolute;
  left: var(--gutter);
  top: -10rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

.skip:focus {
  top: 0.75rem;
}

/* Header and footer */

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

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

/* The flame mark: amber on the page, cream on the amber tile. */
.flame-outer {
  fill: var(--accent);
}

.flame-inner {
  fill: var(--flame-glow);
}

.hero-mark .flame-outer {
  fill: var(--flame);
}

.hero-mark .flame-inner {
  fill: var(--flame-core);
}

.brand svg {
  width: 1.9rem;
  height: 1.9rem;
  flex: none;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list li {
  margin-top: 0;
}

.nav-list a {
  display: inline-block;
  padding-block: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav-list a:hover {
  color: var(--text);
  text-decoration: underline;
}

.nav-list a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.75rem 2.25rem;
}

.site-footer p {
  margin: 0;
}

.site-footer .nav-list a {
  font-size: 0.9rem;
  text-decoration: underline;
}

.site-footer .nav-list a:hover {
  color: var(--text);
}

/* Landing page */

.hero {
  padding-block: 3.5rem 1rem;
  text-align: center;
  background: radial-gradient(ellipse 60rem 26rem at 50% 0%, var(--glow), transparent 70%);
}

.hero-mark {
  display: grid;
  place-items: center;
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto 1.75rem;
  border-radius: 1.5rem;
  background: var(--accent);
  box-shadow: var(--shadow);
}

.hero-mark svg {
  width: 3.5rem;
  height: 3.5rem;
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lede {
  max-width: 34rem;
  margin-inline: auto;
  color: var(--text-secondary);
  font-size: 1.15em;
}

.promise {
  max-width: 34rem;
  margin: 1.75rem auto;
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 1.15rem + 0.8vw, 1.6rem);
  font-style: italic;
  line-height: 1.35;
  text-wrap: balance;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 650;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.verse {
  max-width: 36rem;
  margin: 3rem auto 1rem;
  padding: 2rem var(--gutter);
  text-align: center;
}

.verse blockquote {
  margin: 0;
}

.verse-text {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  line-height: 1.4;
  text-wrap: balance;
}

.verse figcaption {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.verse figcaption::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  margin: 0 auto 1rem;
  background: var(--accent);
}

.section {
  padding-block: 1rem;
}

.section-title {
  text-align: center;
}

.section-intro {
  max-width: 36rem;
  margin: 0 auto 2rem;
  color: var(--text-secondary);
  text-align: center;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.cards > li {
  margin-top: 0;
}

.card {
  padding: 1.25rem 1.4rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-secondary);
}

.card h3 {
  margin-top: 0;
  color: var(--text);
  font-size: 1.15rem;
}

.card-pro {
  border-color: var(--accent);
  background: var(--amber-muted);
  color: var(--text);
}

.card-pro .fineprint {
  color: var(--text);
}

.badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 0.2em;
}

/* A drawn check mark, so screen readers don't announce a symbol. */
.ticks {
  padding-left: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 1.75rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.3em;
  width: 0.4rem;
  height: 0.75rem;
  border: solid var(--accent);
  border-width: 0 0.16rem 0.16rem 0;
  transform: rotate(45deg);
}

.card-pro .ticks li::before {
  border-color: var(--link);
}

/* Policy pages */

.doc-meta {
  color: var(--text-secondary);
}

.summary {
  margin: 2rem 0;
  padding: 1.4rem 1.5rem 0.6rem;
  border-radius: var(--radius);
  background: var(--amber-muted);
}

.summary h2 {
  margin-top: 0;
  font-size: 1.3rem;
}

.toc {
  margin: 2rem 0 1rem;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--accent);
}

.toc h2 {
  margin: 0 0 0.5rem;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
}

.toc li {
  margin-top: 0.15rem;
}

.facts dt {
  margin-top: 1rem;
  font-weight: 650;
}

.facts dd {
  margin: 0.15rem 0 0;
}

.note {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface);
}

.note > :last-child {
  margin-bottom: 0;
}

.lines {
  padding: 0;
  list-style: none;
}

.lines li {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface);
}

.email {
  font-weight: 600;
}

/* Printing a policy */

@media print {
  .skip,
  .site-header nav,
  .site-footer nav {
    display: none;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .summary,
  .note,
  .card {
    border: 1px solid #999999;
    background: none;
  }
}
