/* Policy pages — Cookies + Privacy */

.policy-hero {
  padding: 72px 0 32px;
  background:
    radial-gradient(800px 400px at 80% -20%, rgba(45,108,255,0.10), transparent 60%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.policy-hero .eyebrow { margin-bottom: 14px; }
.policy-hero h1 { font-size: clamp(36px, 4.4vw, 52px); margin-bottom: 18px; }
.policy-hero .lead { max-width: 64ch; }
.policy-meta { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 13px; }
.policy-meta div { display: flex; flex-direction: column; gap: 4px; }
.policy-meta .label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); }
.policy-meta .value { font-weight: 600; color: var(--ink); }

/* Layout */
.policy-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 56px;
  padding: 48px 0 96px;
  align-items: flex-start;
}
@media (max-width: 920px) { .policy-layout { grid-template-columns: 1fr; gap: 32px; } }

/* Sidebar */
.policy-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  align-self: flex-start;
}
.policy-search {
  position: relative;
  margin-bottom: 20px;
}
.policy-search svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ink-4); pointer-events: none;
}
.policy-search input {
  width: 100%; height: 42px;
  padding: 0 12px 0 36px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  font: 500 13.5px var(--font-sans); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.policy-search input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(45,108,255,0.16);
}

.toc-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
}
.toc-title {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-4); padding: 0 6px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line);
}
.toc {
  list-style: none; padding: 8px 0 0; margin: 0;
  display: flex; flex-direction: column; gap: 2px;
  max-height: 60vh; overflow: auto;
}
.toc a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 500; color: var(--ink-3);
  border-left: 2px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
}
.toc a:hover { background: var(--paper-2); color: var(--ink); }
.toc a.is-active {
  background: var(--brand-soft); color: var(--brand-blue-3);
  border-left-color: var(--brand-blue); font-weight: 600;
}
.toc-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 18px; padding: 0 5px;
  font-size: 10px; font-weight: 700;
  background: var(--paper-2); color: var(--ink-4);
  border-radius: 4px; flex-shrink: 0;
}
.toc a.is-active .toc-num { background: var(--brand-blue); color: #fff; }

.toc-foot {
  margin-top: 16px; padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 12.5px; color: var(--ink-3); line-height: 1.5;
}
.toc-foot strong { display: block; color: var(--ink); margin-bottom: 4px; font-size: 13px; }
.toc-foot a { color: var(--brand-blue); font-weight: 600; }
.toc-foot a:hover { text-decoration: underline; }

@media (max-width: 920px) {
  .policy-sidebar { position: static; }
  .toc { flex-direction: row; flex-wrap: wrap; max-height: none; }
  .toc a { padding: 6px 10px; }
}

/* Body */
.policy-body { max-width: 760px; }
.policy-body article { background: transparent; }
.policy-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px 40px;
  margin-bottom: 16px;
  scroll-margin-top: 96px;
  box-shadow: var(--shadow-xs);
}
.policy-section h2 {
  font-size: clamp(20px, 2vw, 26px);
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 12px;
}
.policy-section h2 .num {
  font-size: 12px; font-weight: 700; color: var(--brand-blue);
  background: var(--brand-soft);
  padding: 4px 9px; border-radius: var(--r-pill);
  letter-spacing: 0.02em;
}
.policy-section h3 {
  font-size: 16px; font-weight: 700; color: var(--ink);
  margin: 28px 0 10px;
}
.policy-section .lede {
  font-size: 14px; color: var(--ink-4); margin-bottom: 18px;
}
.policy-section p {
  font-size: 15px; line-height: 1.7; margin-bottom: 16px;
  color: var(--ink-2);
}
.policy-section p:last-child { margin-bottom: 0; }
.policy-section ul, .policy-section ol {
  margin: 0 0 16px; padding-left: 22px;
  color: var(--ink-2); line-height: 1.7; font-size: 15px;
}
.policy-section li { margin-bottom: 6px; }
.policy-section li strong { color: var(--ink); font-weight: 600; }
.policy-section a { color: var(--brand-blue); font-weight: 500; }
.policy-section a:hover { text-decoration: underline; }

.callout {
  display: flex; gap: 12px;
  padding: 14px 16px;
  background: var(--brand-soft);
  border: 1px solid rgba(45,108,255,0.18);
  border-radius: var(--r-md);
  margin: 16px 0;
  font-size: 14px; line-height: 1.55;
  color: var(--brand-blue-3);
}
.callout svg { flex-shrink: 0; color: var(--brand-blue); margin-top: 2px; }

/* Cookies table */
.cookie-table {
  width: 100%; border-collapse: collapse;
  margin: 12px 0 16px;
  font-size: 13.5px; border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
}
.cookie-table th, .cookie-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.cookie-table th {
  background: var(--paper-2);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-4);
}
.cookie-table tr:last-child td { border-bottom: 0; }
.cookie-table td { color: var(--ink-2); }
.cookie-table td code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 4px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10.5px; font-weight: 600;
  border-radius: var(--r-pill);
  letter-spacing: 0.02em;
}
.tag-essential { background: #DCFCE7; color: #166534; }
.tag-analytics { background: #DBEAFE; color: #1E40AF; }
.tag-functional { background: #EDE9FE; color: #5B21B6; }

.policy-empty {
  display: none;
  text-align: center;
  padding: 48px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  color: var(--ink-4); font-size: 14px;
  margin-top: 16px;
}

@media (max-width: 580px) {
  .policy-section { padding: 28px 24px; }
}
