/*
 * 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: #f4f3ef;
  --surface: #fbfaf7;
  --text: #202735;
  --text-secondary: #505c6e;
  --link: #40509f;
  --border: #dadfe5;
  --tint: #eceeeb;
  --cta: #4c5db5;
  --cta-hover: #40509f;
  --on-cta: #f8fafc;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --canvas: #101722;
    --surface: #172131;
    --text: #e6ebf3;
    --text-secondary: #b3bed0;
    --link: #c1caf8;
    --border: #314055;
    --tint: #243247;
    --cta: #a4b0ef;
    --cta-hover: #b5bff5;
    --on-cta: #111827;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --canvas: #101722;
  --surface: #172131;
  --text: #e6ebf3;
  --text-secondary: #b3bed0;
  --link: #c1caf8;
  --border: #314055;
  --tint: #243247;
  --cta: #a4b0ef;
  --cta-hover: #b5bff5;
  --on-cta: #111827;
}
* {
  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;
}

/* 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;
}
