/* SubLink AI & SuperHap: privacy and credits pages */
:root {
  --bg: #ffffff;
  --panel: #f7f8f9;
  --ink: #111827;
  --body: #374151;
  --soft: #6b7280;
  --line: #e5e7eb;
  --accent: #0b5d3b;
  --warn: #92400e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1113;
    --panel: #171a1d;
    --ink: #f3f4f6;
    --body: #d1d5db;
    --soft: #9ca3af;
    --line: #2a2e33;
    --accent: #6ee7a8;
    --warn: #fbbf24;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--body); font: 16px/1.7 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
b { color: var(--ink); font-weight: 600; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* Header */
.hero { border-bottom: 1px solid var(--line); padding: 40px 0 36px; }
.apps { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; font-weight: 600; color: var(--ink); }
.app { display: inline-flex; align-items: center; gap: 8px; }
.app img { width: 24px; height: 24px; border-radius: 6px; }
.amp { color: var(--soft); font-weight: 400; }
h1 { font-weight: 700; font-size: clamp(32px, 5vw, 42px); line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); margin: 28px 0 10px; }
.lede { font-size: 18px; color: var(--body); max-width: 640px; margin: 0 0 16px; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; font-size: 14px; color: var(--soft); }

/* Summary */
.promises { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 36px 0 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.promise { padding: 18px 20px; border-left: 1px solid var(--line); }
.promise:first-child { border-left: 0; }
.promise h3 { font-size: 14px; font-weight: 600; color: var(--ink); margin: 0 0 4px; }
.promise p { margin: 0; color: var(--soft); font-size: 14px; line-height: 1.55; }

/* Layout */
.layout { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; padding-bottom: 64px; }
.toc { position: sticky; top: 24px; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.toc-title { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); margin: 0 0 10px 16px; }
.toc a { color: var(--soft); text-decoration: none; font-size: 14px; padding: 5px 16px; margin-left: -1px; border-left: 1px solid transparent; }
.toc a:hover { color: var(--ink); border-left-color: var(--ink); }
.sections { min-width: 0; }

/* Sections */
.card { padding: 28px 0; border-top: 1px solid var(--line); }
.card:first-child { border-top: 0; padding-top: 0; }
.card h2 { font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 12px; }
.n { color: var(--soft); font-weight: 500; margin-right: 8px; }
.n::after { content: "."; }
.card p { margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 0 0 12px; padding-left: 20px; }
.card li { margin: 6px 0; }
.card h3 { font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.tip, .good { border-left: 3px solid var(--line); background: var(--panel); padding: 12px 16px; font-size: 15px; border-radius: 0 6px 6px 0; }
.good { border-left-color: var(--accent); }

.table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 4px 0 16px; font-size: 15px; }
.row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row span:first-child { color: var(--ink); font-weight: 500; }
.row.head { background: var(--panel); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.row.head span { color: var(--soft); }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.duo > div { border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; }
.duo p { font-size: 15px; }

.perms { display: flex; flex-direction: column; gap: 8px; }
.perms p { margin: 0; }

.checks { padding-left: 20px; }

.button { display: inline-block; margin-top: 8px; border: 1px solid var(--line); color: var(--ink); font-weight: 500; font-size: 15px; text-decoration: none; padding: 9px 16px; border-radius: 6px; }
.button:hover { background: var(--panel); }

/* Credits list */
.list { list-style: none; padding: 0 !important; margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.list li { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 12px 16px; border-top: 1px solid var(--line); margin: 0 !important; flex-wrap: wrap; }
.list li:first-child { border-top: 0; }
.list .what { color: var(--soft); font-size: 14px; }
.list .lic { font-size: 14px; color: var(--soft); white-space: nowrap; }
.list .lic.nc { color: var(--warn); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: 14px; color: var(--soft); }
.foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot a { color: var(--soft); }

/* Narrow screens */
@media (max-width: 900px) {
  .promises { grid-template-columns: 1fr 1fr; }
  .promise:nth-child(3) { border-left: 0; }
  .promise:nth-child(n+3) { border-top: 1px solid var(--line); }
  .layout { grid-template-columns: 1fr; }
  .toc { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 28px 0; }
  .promises { grid-template-columns: 1fr; }
  .promise { border-left: 0; border-top: 1px solid var(--line); }
  .promise:first-child { border-top: 0; }
  .duo { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 2px; }
}
