/*
 * The policy pages (privacy, terms, pricing, refunds, delivery, contact,
 * about): plain reading pages in the app's Midnight & Paper colours, light or
 * dark as the reader chose in the app (theme-init.js) or as the system is.
 * The values match src/theme.css.
 */
:root {
  color-scheme: light;
  --canvas: #f7f7f8;
  --surface: #ffffff;
  --text: #202024;
  --text-secondary: #52525b;
  --link: #414149;
  --border: #e3e3e7;
  --tint: #ececf0;
  --cta: #29292f;
  --cta-hover: #414149;
  --on-cta: #f8fafc;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --canvas: #161618;
    --surface: #1e1e21;
    --text: #f1f1f3;
    --text-secondary: #b9b9c2;
    --link: #e3e3ed;
    --border: #45454e;
    --tint: #33333a;
    --cta: #e5e5eb;
    --cta-hover: #ffffff;
    --on-cta: #202024;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --canvas: #161618;
  --surface: #1e1e21;
  --text: #f1f1f3;
  --text-secondary: #b9b9c2;
  --link: #e3e3ed;
  --border: #45454e;
  --tint: #33333a;
  --cta: #e5e5eb;
  --cta-hover: #ffffff;
  --on-cta: #202024;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
header a {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 20px;
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
}
header img {
  width: 28px;
  height: 28px;
}
main {
  max-width: 760px;
  margin: 32px auto 64px;
  padding: 36px 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
h1 {
  margin: 0 0 4px;
  font-size: 32px;
  font-weight: 600;
  line-height: 40px;
  letter-spacing: -0.025em;
}
h2 {
  margin: 36px 0 8px;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}
.updated {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-size: 14px;
}
.summary {
  padding: 16px 20px;
  border-radius: 10px;
  background: var(--tint);
}
.summary ul {
  margin: 6px 0 0;
}
ul {
  padding-left: 22px;
}
li {
  margin-bottom: 6px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}
a {
  color: var(--link);
  text-underline-offset: 3px;
}
a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
footer {
  max-width: 760px;
  margin: -40px auto 40px;
  padding: 0 20px;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
}
@media (max-width: 640px) {
  main {
    margin: 0 0 40px;
    padding: 24px 16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  footer {
    margin-top: -24px;
  }
}
footer nav {
  line-height: 2;
}
footer .owner {
  margin: 8px 0 0;
  font-size: 12px;
}
.details th {
  width: 120px;
  text-align: left;
  vertical-align: top;
}

/* Why NightOwl (pricing.html): three columns, a stacked list on a phone, never a sideways scroll. */
.compare th[scope='row'] {
  width: 26%;
  color: var(--text);
}
@media (max-width: 640px) {
  .compare,
  .compare tbody,
  .compare tr,
  .compare th,
  .compare th[scope='row'],
  .compare td {
    display: block;
    width: auto;
  }
  .compare tr:first-child {
    display: none;
  }
  .compare tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }
  .compare th,
  .compare td {
    padding: 4px 0;
    border: none;
  }
  .compare td:nth-child(2)::before {
    content: 'NightOwl PDF: ';
    font-weight: 600;
  }
  .compare td:nth-child(3)::before {
    content: 'Many online tools: ';
    font-weight: 600;
  }
}

/* Tool pages (scripts/tool-pages.mjs). */
.tool-page .lead {
  margin: 8px 0 20px;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 28px;
}
.tool-page .cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 8px;
  background: var(--cta);
  color: var(--on-cta);
  font-weight: 600;
  text-decoration: none;
}
.tool-page .cta:hover {
  background: var(--cta-hover);
}
.tool-page h3 {
  margin: 20px 0 4px;
  font-size: 16px;
}
/* Every other tool, on each tool page: two columns where there is room. */
.tool-page .all-tools {
  columns: 2 14em;
  column-gap: 32px;
  padding-left: 18px;
}
.tool-page .all-tools li {
  break-inside: avoid;
}

/* Court pages (scripts/court-pages.mjs): when the rules were last checked, then the
   rules, each with the court's own document. Three columns on a laptop; on a phone
   each rule stacks (what is asked, what the court says, its source), never a sideways scroll. */
.tool-page .lead + .updated {
  margin-top: -12px;
}
.court-rules th[scope='row'] {
  width: 24%;
  color: var(--text);
  font-size: 15px;
}
.court-rules td:last-child {
  width: 30%;
  color: var(--text-secondary);
  font-size: 14px;
}
@media (max-width: 640px) {
  .court-rules,
  .court-rules tbody,
  .court-rules tr,
  .court-rules th[scope='row'],
  .court-rules td,
  .court-rules td:last-child {
    display: block;
    width: auto;
  }
  .court-rules thead {
    display: none;
  }
  .court-rules tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .court-rules th,
  .court-rules td {
    padding: 2px 0;
    border: none;
  }
}

/* A picture of the app on a tool page (tool-pages.mjs `shot`), framed like the start screen's demo. */
.tool-shot {
  margin: 28px 0 0;
}
.tool-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.tool-shot figcaption {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
}

/* Page not found (404.html): the same reading page, the way back first. */
.not-found-code {
  margin: 0 0 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}
.not-found .did-you-mean {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--tint);
}
.not-found .did-you-mean a {
  font-weight: 600;
}

/* Pricing (owner, 17 Oct 2026): the yearly offer and the month three ways. */
td s { color: #667085; text-decoration-thickness: 2px; margin-right: 4px; }
.offer { display: inline-block; margin-left: 4px; padding: 1px 9px; border-radius: 999px; background: #ecfdf3; color: #067647; font-weight: 700; font-size: 0.85em; }
.month-three-ways th { text-align: left; font-weight: 500; }
.month-three-ways td { font-weight: 700; text-align: right; }
.month-three-ways tr.best { color: #067647; }
@media (prefers-color-scheme: dark) {
  .offer { background: #12301f; color: #7dd3a8; }
  .month-three-ways tr.best { color: #7dd3a8; }
}
