/* ==========================================================================
   Clipboard Manager — documentation and privacy policy pages
   Uses the tokens from tokens.css, so these pages match the popup and
   follow the same light / dark theme.
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  font: 15px/1.65 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

::selection {
  background: var(--accent-soft);
}

/* ---------- Top bar ---------- */

.site-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-bar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1040px;
  height: 56px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  padding: 5px 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 999px;
  transition: background var(--dur-1), color var(--dur-1);
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--accent-text);
  background: var(--accent-soft);
}

/* ---------- Layout ---------- */

.page {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 56px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px 72px;
}

.toc {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-top: 52px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.toc-title {
  margin: 0 0 8px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}

.toc a {
  display: block;
  padding: 5px 10px;
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--text-2);
  border-radius: 8px;
  transition: background var(--dur-1), color var(--dur-1);
}

.toc a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}

.content {
  min-width: 0;
  max-width: 720px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 52px 0 28px;
  animation: rise var(--dur-3) var(--ease-out) backwards;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
}

h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 600px;
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-2);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.pill.accent {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: transparent;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---------- Sections and type ---------- */

section {
  padding: 30px 0 6px;
  border-top: 1px solid var(--border);
}

.hero + section,
.summary + section {
  border-top: 0;
}

h2 {
  margin: 0 0 12px;
  font-size: 21px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h3 {
  margin: 26px 0 8px;
  font-size: 15.5px;
  font-weight: 600;
}

p {
  margin: 0 0 14px;
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

li {
  margin-bottom: 6px;
}

li::marker {
  color: var(--text-3);
}

strong {
  font-weight: 600;
}

code {
  padding: 2px 6px;
  font: 13px var(--mono);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

kbd {
  display: inline-block;
  min-width: 24px;
  padding: 2px 7px;
  font: 500 12.5px/1.5 var(--font);
  text-align: center;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 7px;
}

/* Lists that state what is and is not done */
.checks,
.crosses {
  padding-left: 0;
  list-style: none;
}

.checks li,
.crosses li {
  position: relative;
  padding-left: 28px;
}

.checks li::before,
.crosses li::before {
  position: absolute;
  left: 0;
  top: 4px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  border-radius: 50%;
}

.checks li::before {
  content: "✓";
  color: var(--success);
  background: color-mix(in srgb, var(--success) 14%, transparent);
}

.crosses li::before {
  content: "✕";
  color: var(--danger);
  background: var(--danger-soft);
}

/* ---------- Cards ---------- */

.summary {
  margin-bottom: 8px;
  padding: 20px 22px;
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
}

.summary h2 {
  font-size: 17px;
  margin-bottom: 6px;
}

.summary p:last-child {
  margin-bottom: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
}

.card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur-2), transform var(--dur-2) var(--ease-out);
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.card h3 {
  margin: 0 0 4px;
  font-size: 14.5px;
}

.card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
}

/* ---------- Callouts ---------- */

.note {
  margin: 16px 0 20px;
  padding: 12px 16px;
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

.note.warn {
  border-left-color: var(--star);
}

.note p:last-child {
  margin-bottom: 0;
}

/* ---------- Tables ---------- */

.table-wrap {
  margin: 16px 0 20px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-2);
}

tr + tr td {
  border-top: 1px solid var(--border);
}

td:first-child {
  white-space: nowrap;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 40px;
  padding-top: 20px;
  font-size: 13px;
  color: var(--text-3);
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin-bottom: 4px;
}

/* ---------- Small screens ---------- */

@media (max-width: 820px) {
  .page {
    display: block;
  }

  .toc {
    display: none;
  }

  h1 {
    font-size: 28px;
  }

  td:first-child {
    white-space: normal;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
