/* Legal pages (privacy.html, privacy-choices.html, cookies.html, terms.html):
   dpa.html's guide layout with a contents list on the left, a draft notice,
   the browser-storage table and the "clear preferences" panel. */
.guide { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; align-items: start; }
.guide-toc { position: sticky; top: 5.5rem; }
.guide-toc strong { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--ink); margin-bottom: 0.4rem; }
.guide-toc a { display: flex; align-items: center; min-height: 44px; padding-left: 0.9rem; border-left: 2px solid var(--line); color: var(--ink-soft); text-decoration: none; font-size: var(--text-base); }
.guide-toc a:hover { color: var(--ink); border-left-color: var(--ink-soft); }
.guide-body { max-width: 44rem; }
.guide-body section { margin-bottom: 3rem; scroll-margin-top: 5.5rem; }
.guide-body h2 { margin: 0 0 0.8rem; font-size: 1.6rem; }
.guide-body h3 { margin: 1.6rem 0 0.5rem; font-size: 1.15rem; }
.guide-body p, .guide-body li { color: var(--ink-soft); line-height: 1.65; font-size: var(--text-base); }
.guide-body p { margin: 0 0 0.9rem; }
.guide-body ul { padding-left: 1.3rem; list-style: disc; }
.guide-body li { margin: 0.3rem 0; }
.guide-body li::marker { color: var(--ink-faint); }
.guide-body a:not(.btn) { color: var(--ink); text-underline-offset: 0.2em; }
.guide-body strong { color: var(--ink); font-weight: 600; }

.legal-meta { margin-top: 1.1rem; font-size: var(--text-sm); }

.legal-draft { display: flex; gap: 0.75rem; align-items: flex-start; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius-s); padding: 0.9rem 1.1rem; margin: 0 0 2.5rem; background: var(--surface); }
.legal-draft svg { flex: none; width: 1.25rem; height: 1.25rem; margin-top: 0.15rem; color: var(--accent-strong); }
.guide-body .legal-draft p { margin: 0; color: var(--ink); }

/* Tables: what is stored / why / how long. On a phone each row becomes a card. */
.store-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem; font-size: var(--text-base); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.store-table th, .store-table td { text-align: left; vertical-align: top; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink-soft); line-height: 1.5; }
.store-table thead th { background: var(--night-2); color: #f6f4ee; font-weight: 600; font-size: var(--text-sm); border-bottom: 2px solid var(--gold); }
.store-table tbody tr:last-child td { border-bottom: none; }
.store-table td:first-child { color: var(--ink); font-weight: 600; width: 30%; }
.store-table th:last-child, .store-table td:last-child { width: 9.5rem; }
.store-table .key { display: block; margin-top: 0.2rem; font-weight: 400; font-size: var(--text-sm); color: var(--ink-soft); overflow-wrap: break-word; }
@media (max-width: 640px) {
  .store-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .store-table, .store-table tbody, .store-table tr, .store-table td { display: block; width: auto; }
  .store-table tr { border-bottom: 1px solid var(--line); padding: 0.4rem 0; }
  .store-table tbody tr:last-child { border-bottom: none; }
  .store-table td, .store-table td:last-child { border-bottom: none; padding: 0.35rem 1rem; width: auto; }
  .store-table td:first-child { width: auto; padding-top: 0.8rem; }
  .store-table td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: var(--text-sm); font-weight: 600; color: var(--teal); }
}

.clear-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.4rem 1.5rem; box-shadow: var(--shadow-card); }
.guide-body .clear-panel p { margin: 0 0 1.1rem; }
.clear-panel .btn { min-height: 44px; }
.guide-body .clear-status { display: flex; align-items: center; gap: 0.5rem; margin: 1rem 0 0; font-weight: 600; color: var(--teal); }
.clear-status[hidden] { display: none; }
.clear-status svg { width: 1.2rem; height: 1.2rem; flex: none; }

@media (max-width: 860px) { .guide { grid-template-columns: 1fr; gap: 1.5rem; } .guide-toc { position: static; } }
@media (max-width: 480px) { .clear-panel .btn { width: 100%; justify-content: center; text-align: center; } }
