/* Shared chrome for every page. Pages re-theme by overriding these tokens in their own :root. */
:root {
  --ink: #0f0e0d;
  --muted: #5a554e;
  --line: #dcd5c8;
  --paper: #f4f1ea;
  --card: #fbf9f5;
  --accent: #b3211c;
  --accent-soft: #f5e1dd;
  --code: #e9e4da;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f1ea;
    --muted: #aaa49a;
    --line: #34302b;
    --paper: #0f0e0d;
    --card: #1a1816;
    --accent: #f0675c;
    --accent-soft: #3a1915;
    --code: #24211e;
  }
}
@font-face {
  font-family: 'Anton';
  src: url(/fonts/anton-latin.woff2) format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Work Sans';
  src: url(/fonts/work-sans-latin.woff2) format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
/* Onibaku's own text face: the shared chrome everywhere, and the whole of the home and policy pages.
   App pages keep their own body face. */
header.site,
footer.site,
body:has(.home),
body:has(.prose) {
  font-family: 'Work Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
img {
  max-width: 100%;
}
.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  border-radius: 6px;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

/* Header and footer: colours come only from the tokens, so a page's palette carries through */
header.site {
  background: color-mix(in srgb, var(--ink) 4%, var(--paper));
}
header.site .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}
.brand img {
  border-radius: 7px;
  flex: none;
}
.brand b {
  font: 400 20px/1 'Anton', Impact, 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.brand span {
  color: var(--muted);
  font: 400 14px/1 'Anton', Impact, 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding-top: 3px;
}
header.site nav {
  margin-left: auto;
  margin-right: -10px;
  display: flex;
  gap: 4px;
}
header.site nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 16px;
}
header.site nav a:hover {
  color: var(--ink);
}
footer.site {
  background: color-mix(in srgb, var(--ink) 4%, var(--paper));
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}
footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 0 -8px;
}
footer.site a {
  color: var(--muted);
}
footer.site nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
}
footer.site nav a:hover {
  color: var(--ink);
}
footer.site p {
  flex-basis: 100%;
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.5;
}
@media (max-width: 480px) {
  header.site .wrap {
    gap: 8px;
  }
  .brand span {
    display: none;
  }
  header.site nav a {
    padding: 0 8px;
  }
}

main {
  padding: 48px 0 64px;
}
h1 {
  font-size: clamp(28px, 5vw, 34px);
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 40px 0 8px;
}
h3 {
  font-size: 17px;
  line-height: 1.35;
  margin: 24px 0 4px;
}
.lede {
  font-size: 19px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 24px;
}
.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 24px;
  color: var(--ink);
  text-decoration: none;
}
a.card:hover {
  border-color: var(--accent);
}
.card h3 {
  margin: 0 0 4px;
}
.card p {
  margin: 0;
  color: var(--muted);
}
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
}
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.features .card h3 {
  font-size: 16px;
}
/* For four cards: two columns on desktop instead of three and one left over */
.features.pairs {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
code {
  font: 14px ui-monospace, Menlo, Consolas, monospace;
  background: var(--code);
  border-radius: 4px;
  padding: 1px 5px;
}
pre {
  background: var(--code);
  border-radius: 8px;
  padding: 12px 16px;
  overflow-x: auto;
}
pre code {
  padding: 0;
  background: none;
}
table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  vertical-align: top;
}
th {
  font-size: 14px;
  color: var(--muted);
}
/* table.stack: on phones each row becomes a block, with the cells after the first on one labelled line */
@media (max-width: 600px) {
  table.stack thead {
    display: none;
  }
  table.stack tr {
    display: block;
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
  }
  table.stack td {
    display: block;
    border: 0;
    padding: 0;
  }
  table.stack td[data-label] {
    display: inline-block;
    margin: 4px 16px 0 0;
  }
  table.stack td[data-label]::before {
    content: attr(data-label) ' ';
    color: var(--muted);
    font-size: 14px;
  }
}
.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
}
@media (prefers-color-scheme: dark) {
  .button {
    color: var(--paper);
  }
}
.updated {
  color: var(--muted);
  font-size: 14px;
}
.callout {
  background: color-mix(in srgb, var(--accent) 7%, var(--card));
  border: 1px solid var(--line);
  padding: 0.8rem 1rem;
  border-radius: 8px;
}

/* Long documents (privacy, terms, support): a readable measure, contents beside the text on wide screens,
   and clear section breaks */
body:has(.prose) .wrap {
  max-width: 680px;
}
.prose {
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: break-word;
}
.prose h1 {
  font: 400 clamp(44px, 9vw, 72px)/0.95 'Anton', Impact, 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}
.prose h2 {
  font: 400 clamp(28px, 6vw, 40px)/1.05 'Anton', Impact, 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 80px 0 16px;
}
.prose h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 4px;
}
.prose h1,
.prose h2,
.prose h3 {
  text-wrap: balance;
}
.prose p,
.prose li {
  text-wrap: pretty;
}
.prose .lede {
  font-size: 20px;
  line-height: 1.5;
}
.doc-head > p:not(.updated) {
  max-width: 60ch;
  font-size: 18px;
}
.prose li::marker {
  color: var(--accent);
}
.prose h2,
.prose h3 {
  scroll-margin-top: 24px;
}
.prose li + li {
  margin-top: 6px;
}
.prose a:visited {
  color: color-mix(in srgb, var(--accent) 70%, var(--ink));
}
.toc {
  margin: 32px 0 8px;
  padding: 4px 20px 12px;
  background: var(--card);
  border-radius: 12px;
}
.toc summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.toc summary::-webkit-details-marker {
  display: none;
}
.toc summary::after {
  content: '';
  width: 7px;
  height: 7px;
  margin: -4px 0 0 12px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.toc[open] summary::after {
  margin-top: 4px;
  transform: rotate(-135deg);
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2 240px;
  column-gap: 32px;
  font-size: 14px;
  line-height: 1.4;
}
.prose .toc li {
  break-inside: avoid;
  margin: 0;
}
.toc a,
.toc a:visited {
  display: block;
  position: relative;
  padding: 12px 0;
  color: var(--ink);
  text-decoration: none;
}
.toc a[aria-current] {
  color: var(--accent);
  font-weight: 600;
}
.toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.to-toc {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 20px;
  text-decoration: none;
}
.to-toc[hidden] {
  display: none;
}
@media (min-width: 1180px) {
  body:has(.toc) .wrap {
    max-width: 1000px;
  }
  .prose:has(> .toc) {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    column-gap: 88px;
  }
  .doc-head,
  .doc-body {
    grid-column: 2;
  }
  .prose > .toc {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    margin: 0;
    padding: 0 12px 24px 0;
    background: none;
    border-radius: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
  }
  .toc ol {
    columns: auto;
  }
  .toc a {
    padding: 5px 0;
  }
  .to-toc {
    display: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  html:focus-within {
    scroll-behavior: smooth;
  }
  .prose h1,
  .prose .updated,
  .prose .lede,
  .doc-head > p {
    animation: prose-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .prose .updated,
  .prose .lede,
  .doc-head > p {
    animation-delay: 0.08s;
  }
  /* Each section heading rises into place as it scrolls in (transform only, so nothing is ever hidden) */
  @supports (animation-timeline: view()) {
    .prose h2 {
      animation: prose-rise linear backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }
  }
}
@keyframes prose-in {
  from {
    transform: translateY(12px);
  }
}
@keyframes prose-rise {
  from {
    transform: translateY(12px);
  }
}
button.button { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
/* Uninstall surveys: each reason is one big button */
.reasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 24px 0; }
.reason { font: inherit; text-align: left; cursor: pointer; padding: 14px 18px; }
.reason:hover, .reason[aria-pressed='true'] { border-color: var(--accent); }
.reason[aria-pressed='true'] { background: var(--accent-soft); }
.offer .reinstall { margin-left: 12px; }
#note label { display: block; font-weight: 600; margin: 16px 0 6px; }
#note textarea { width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
