:root {
  --brand: #00dab4;
  --brand-dark: #00866f;
  --ink: #14211f;
  --muted: #55625f;
  --line: #e2e8e6;
  --soft: #f3f8f7;
  --bg: #ffffff;
  --radius: 10px;
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--font); }
img { max-width: 100%; height: auto; }
a { color: var(--brand-dark); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: #fff; padding: 8px 12px; }

/* Banner + header */
.notice { background: var(--ink); color: #fff; text-align: center; font-size: 14px; padding: 10px 16px; }
.notice a { color: var(--brand); font-weight: 600; }
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand img { display: block; width: 120px; height: auto; }
.site-header nav { flex: 1; }
.nav { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--brand); }

.btn { display: inline-block; background: var(--brand); color: var(--ink); font-weight: 600; text-decoration: none;
  padding: 10px 20px; border-radius: 999px; transition: background .15s; }
.btn:hover { background: #2ee6c6; color: var(--ink); }
.btn-small { padding: 8px 16px; font-size: 14px; }

/* Page hero */
.page-hero { background: var(--soft); border-bottom: 1px solid var(--line); padding: 48px 0 40px; }
.page-hero h1 { margin: 0; font-size: clamp(30px, 5vw, 44px); line-height: 1.15; letter-spacing: -0.02em; }
.lead { margin: 12px 0 0; font-size: 18px; color: var(--muted); max-width: 720px; }

/* Layout */
.layout { padding-top: 40px; padding-bottom: 64px; }
.layout.has-toc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: 24px; font-size: 14px; max-height: calc(100vh - 48px); overflow: auto; }
.toc summary { font-weight: 700; cursor: pointer; margin-bottom: 8px; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 4px 0 4px 14px; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc li a:hover { color: var(--ink); }

/* Prose */
.prose { max-width: 760px; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 24px; line-height: 1.3; margin: 48px 0 12px; letter-spacing: -0.01em; }
.prose h3 { font-size: 19px; line-height: 1.35; margin: 32px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.prose li > ul, .prose li > ol { margin-top: 6px; }
.prose strong { font-weight: 700; }
.prose .btn { margin: 4px 8px 4px 0; }

.table-wrap { overflow-x: auto; margin: 8px 0 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; min-width: 560px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose tr:last-child td { border-bottom: 0; }
.prose thead th { font-weight: 700; }
.prose thead, .prose table:not(:has(thead)) tbody tr:first-child { background: var(--soft); }
.prose td p, .prose th p { margin: 0 0 6px; }
.prose td p:last-child, .prose th p:last-child { margin-bottom: 0; }

/* GDPR delete page */
.gdpr-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 8px; }
.gdpr-actions[hidden], #g10_invalid[hidden] { display: none; }
button.btn { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
button.btn:disabled { opacity: .55; cursor: default; }
.btn-light { background: #fff; box-shadow: inset 0 0 0 2px var(--line); }
.btn-light:hover { background: var(--soft); }
.prose p.success, .prose p.error { padding: 12px 16px; border-radius: 8px; margin-top: 16px; }
.prose p.success { background: #e3f8f3; color: #0b5d4e; }
.prose p.error { background: #fdecec; color: #8a1f1f; }

/* Index cards */
.cards { list-style: none; padding: 40px 0 64px; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { display: block; height: 100%; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.card:hover { border-color: var(--brand); color: var(--ink); }
.card strong { display: block; font-size: 17px; margin-bottom: 4px; }
.card span { color: var(--muted); font-size: 14px; }

/* Footer */
.site-footer { background: var(--ink); color: #c9d3d1; font-size: 14px; padding: 48px 0 24px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h2 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer p { margin: 12px 0 0; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 20px; color: #8fa09c; }

/* Thames clippers */
body.tc { background: #fff; }
.tc-main { max-width: 760px; margin: 0 auto; padding: 48px 20px 64px; text-align: center; }
.tc-logo { margin: 0; }
.tc-logo img { display: block; margin: 0 auto; width: min(560px, 100%); }
.tc-main hr { border: 0; border-top: 1px solid #ddd; margin: 32px 0 24px; }
.tc-intro { color: #555; margin: 0 0 20px; }
.tc-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tc-grid a { display: block; padding: 16px 12px; border-radius: 8px; background: #000; color: #fff; font-weight: 600;
  text-decoration: none; font-size: 17px; transition: transform .1s, background .15s; }
.tc-grid a:hover { background: #333; color: #fff; }
.tc-grid a:active { transform: scale(.98); }

/* Responsive */
@media (max-width: 900px) {
  .layout.has-toc { display: block; }
  .toc { position: static; max-height: none; margin-bottom: 32px; padding: 16px; background: var(--soft); border-radius: var(--radius); }
  .toc ol { columns: 2; column-gap: 24px; border: 0; }
  .toc li a { padding-left: 0; }
}
@media (max-width: 640px) {
  .header-inner { gap: 12px 16px; }
  .site-header nav { order: 3; flex-basis: 100%; }
  .site-header .btn-small { margin-left: auto; }
  .nav { gap: 4px 14px; font-size: 14px; }
  .page-hero { padding: 32px 0 28px; }
  .toc ol { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media print {
  .notice, .site-header, .toc, .site-footer { display: none; }
  .layout.has-toc { display: block; }
  .page-hero { background: none; border: 0; padding: 0 0 16px; }
}
