/* BidSharpe legal pages: shared styles for /terms and /privacy. */

:root {
  color-scheme: light dark;
  --bg: #fbfbfa;
  --surface: #ffffff;
  --text: #1c1d21;
  --muted: #5b5f6a;
  --border: #e3e4e8;
  --accent: #2f5bd3;
  --accent-hover: #1f45ad;
  --note-bg: #fff6db;
  --note-border: #e8c65a;
  --note-text: #5a4300;
  --placeholder-bg: #fdecec;
  --placeholder-text: #9a1d1d;
  --code-bg: #f1f2f5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --surface: #181b21;
    --text: #e6e7ea;
    --muted: #a0a4ae;
    --border: #2b2f38;
    --accent: #8aa9ff;
    --accent-hover: #b3c7ff;
    --note-bg: #2e2712;
    --note-border: #7a6420;
    --note-text: #f1dc9c;
    --placeholder-bg: #3a1c1f;
    --placeholder-text: #ffb4b4;
    --code-bg: #232730;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover,
a:focus-visible {
  color: var(--accent-hover);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 16px;
  top: 8px;
  z-index: 10;
  padding: 0.4rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .inner {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0.85rem 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* Main content */

main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.5rem 16px 3rem;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.25rem);
  line-height: 1.2;
  margin: 1rem 0 0.25rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 1rem;
}

h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
  scroll-margin-top: 1rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.35rem;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.review-note {
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  color: var(--note-text);
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.placeholder {
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
  border-radius: 3px;
  padding: 0 0.25em;
  font-weight: 600;
  white-space: normal;
}

/* Table of contents */

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem 0.5rem;
  margin: 0 0 2rem;
}

.toc h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  padding: 0;
  border: 0;
}

.toc ol {
  margin: 0 0 0.5rem;
  padding-left: 1.4rem;
}

@media (min-width: 40rem) {
  .toc ol {
    columns: 2;
    column-gap: 2rem;
  }

  .toc li {
    break-inside: avoid;
  }
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

thead th {
  background: var(--code-bg);
  font-weight: 600;
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .inner {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.25rem 16px 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: space-between;
}

.site-footer a {
  color: var(--muted);
}

@media print {
  .site-header,
  .site-footer,
  .toc,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  a {
    color: #000;
  }
}
