/* Crocker Digital Ltd — shared stylesheet */

:root {
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-subtle: #94a3b8;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-subtle: #f8fafc;
  --accent: #1e40af;
  --accent-hover: #1e3a8a;
  --max-width: 720px;
  --wide-width: 960px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* Layout */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.container-wide { max-width: var(--wide-width); margin: 0 auto; padding: 0 1.5rem; }

header.site {
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0;
  background: var(--bg);
}
header.site .container-wide { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
header.site .brand { font-weight: 600; font-size: 1rem; color: var(--ink); text-decoration: none; }
header.site nav { display: flex; gap: 1.5rem; font-size: 0.9375rem; }
header.site nav a { color: var(--ink-muted); text-decoration: none; }
header.site nav a:hover { color: var(--ink); }

main { padding: 3rem 0 4rem; }

footer.site {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
  background: var(--bg-subtle);
}
footer.site .container-wide { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
footer.site p { margin: 0.25rem 0; }
footer.site a { color: var(--ink-muted); }

/* Typography */
h1 { font-size: 2rem; line-height: 1.2; font-weight: 700; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; line-height: 1.35; font-weight: 600; margin: 2.5rem 0 0.75rem; letter-spacing: -0.005em; }
h3 { font-size: 1.0625rem; line-height: 1.4; font-weight: 600; margin: 1.5rem 0 0.5rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.5rem; }
li { margin: 0.25rem 0; }
strong { font-weight: 600; color: var(--ink); }

.lead { font-size: 1.0625rem; color: var(--ink-muted); margin-bottom: 2rem; }
.meta { font-size: 0.875rem; color: var(--ink-subtle); margin-top: 0.5rem; }
.meta code { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-muted); }

/* Tables (sub-processor list) */
table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.9375rem; }
th, td { text-align: left; padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; background: var(--bg-subtle); }
td:first-child, th:first-child { padding-left: 0; }
td:last-child, th:last-child { padding-right: 0; }

/* Portfolio cards (index page) */
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 1.5rem 0 2rem; }
.product-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, transform 0.15s;
  display: block;
}
.product-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.product-card h3 { margin: 0 0 0.25rem; font-size: 1rem; color: var(--ink); }
.product-card p { margin: 0; color: var(--ink-muted); font-size: 0.875rem; line-height: 1.5; }

/* ToC (Terms + Privacy long pages) */
.toc {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 2.5rem;
  font-size: 0.9375rem;
}
.toc p { margin: 0 0 0.5rem; font-weight: 600; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li { margin: 0.125rem 0; }
.toc a { text-decoration: none; color: var(--ink-muted); }
.toc a:hover { color: var(--accent); }

/* Definition list used for entity details */
dl { margin: 1rem 0 1.5rem; }
dt { font-weight: 600; margin-top: 0.5rem; font-size: 0.9375rem; }
dd { margin: 0.125rem 0 0; color: var(--ink-muted); font-size: 0.9375rem; }

/* Back-to-top link */
.back-to-top { font-size: 0.875rem; color: var(--ink-muted); text-decoration: none; }
.back-to-top:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 640px) {
  h1 { font-size: 1.625rem; }
  h2 { font-size: 1.125rem; margin-top: 2rem; }
  main { padding: 2rem 0 3rem; }
}
