/* RitBix's legal pages in the app's Court Green look (colours from src/constants/theme.ts).
   Layout: one reading column, the short version and the safety note set off as highlighted panels. */
:root {
  --bg: #eef2ec;
  --surface: #ffffff;
  --border: #dce3dc;
  --text: #12221a;
  --text-secondary: #4e5e54;
  --link: #1e6a43;
  --highlight: #f7fbe4;
  --ball: #d4ee3b;
  --on-ball: #12221a;
  --font-text: 'Barlow', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mark: 'Barlow Condensed', 'Barlow', -apple-system, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0d1511;
    --surface: #233229;
    --border: #32423a;
    --text: #eef3ef;
    --text-secondary: #a3b2a8;
    --link: #4cc287;
    --highlight: #2b3725;
    --ball: #d4ee3b;
    --on-ball: #0d1511;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0d1511;
  --surface: #233229;
  --border: #32423a;
  --text: #eef3ef;
  --text-secondary: #a3b2a8;
  --link: #4cc287;
  --highlight: #2b3725;
  --ball: #d4ee3b;
  --on-ball: #0d1511;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.55;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 40px 64px;
}
main {
  max-width: 40rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.masthead {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wordmark {
  margin: 0;
  font-family: var(--font-mark);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--link);
}
.wordmark a {
  color: inherit;
  text-decoration: none;
}
h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.1;
  font-weight: 700;
  text-wrap: balance;
}
.meta {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}
section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Flex children shrink to the column, so the services table scrolls in its own box at phone width */
main > *,
section > * {
  min-width: 0;
}
h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 700;
  text-wrap: balance;
}
p,
ul,
dl {
  margin: 0;
}
ul {
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.summary {
  background: var(--highlight);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
}
.items {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
}
.items > div {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.items > div + div {
  border-top: 1px solid var(--border);
}
dt {
  font-weight: 600;
}
dd {
  margin: 0;
  color: var(--text-secondary);
}
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border-radius: 20px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
}
th {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
tbody tr {
  border-top: 1px solid var(--border);
}
td:first-child {
  font-weight: 600;
  white-space: nowrap;
}
a {
  color: var(--link);
  font-weight: 600;
  text-underline-offset: 2px;
}
a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 4px;
}
mark.todo {
  background: var(--ball);
  color: var(--on-ball);
  padding: 0 4px;
  border-radius: 6px;
  font-weight: 600;
}
footer {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  color: var(--text-secondary);
  font-size: 15px;
}
@media (max-width: 420px) {
  h1 {
    font-size: 34px;
  }
}
