/* SocialKred changelog. Light palette on bare :root; dark redefines tokens only. */
:root {
  --paper:      #fbfbfd;
  --card:       #ffffff;
  --ink:        #0b0b2b;
  --muted:      #5b5b77;
  --faint:      #8a8aa3;
  --rule:       #e6e6f0;
  --rule-soft:  #f0f0f7;
  --navy:       #060649;
  --accent:     #0606ef;
  --accent-soft:#ececff;
  --code-bg:    #f1f1f8;
  --code-ink:   #2d2d6b;

  --t-added:    #067647;
  --t-added-bg: #e7f6ee;
  --t-changed:  #b54708;
  --t-changed-bg:#fdf0e3;
  --t-removed:  #b42318;
  --t-removed-bg:#fdeceb;
  --t-fixed:    #175cd3;
  --t-fixed-bg: #e8f0fe;

  --meta: 164px;
  --toc: 200px;

  --f-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --f-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #08081a;
    --card:       #0d0d22;
    --ink:        #e9e9f4;
    --muted:      #a3a3bd;
    --faint:      #6f6f8c;
    --rule:       #1e1e3c;
    --rule-soft:  #15152f;
    --navy:       #c9c9ea;
    --accent:     #8f8fff;
    --accent-soft:#191940;
    --code-bg:    #17173a;
    --code-ink:   #c3c3f0;

    --t-added:    #5fd4a0; --t-added-bg:  #10301f;
    --t-changed:  #f0b27a; --t-changed-bg:#34230f;
    --t-removed:  #f49a92; --t-removed-bg:#36161a;
    --t-fixed:    #8ab4f8; --t-fixed-bg:  #142241;
  }
}

:root[data-theme="dark"] {
  --paper:      #08081a;
  --card:       #0d0d22;
  --ink:        #e9e9f4;
  --muted:      #a3a3bd;
  --faint:      #6f6f8c;
  --rule:       #1e1e3c;
  --rule-soft:  #15152f;
  --navy:       #c9c9ea;
  --accent:     #8f8fff;
  --accent-soft:#191940;
  --code-bg:    #17173a;
  --code-ink:   #c3c3f0;

  --t-added:    #5fd4a0; --t-added-bg:  #10301f;
  --t-changed:  #f0b27a; --t-changed-bg:#34230f;
  --t-removed:  #f49a92; --t-removed-bg:#36161a;
  --t-fixed:    #8ab4f8; --t-fixed-bg:  #142241;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}

code {
  font-family: var(--f-mono);
  font-size: 0.86em;
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ---------- masthead ---------- */

.masthead { border-bottom: 1px solid var(--rule); background: var(--card); }
.masthead-in {
  max-width: 1280px; margin: 0 auto; padding: 26px 32px 22px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
}
/* The brand leads; the page name is the small label beside it. */
.wordmark {
  font-weight: 800; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.05;
  letter-spacing: 0.01em; color: var(--navy);
}
.wordmark span { font-weight: 400; }
.wordmark:hover { text-decoration: none; color: var(--accent); }
h1 {
  font-family: var(--f-sans); font-weight: 600;
  font-size: 14px; line-height: 1.2; letter-spacing: 0.12em;
  text-transform: uppercase; margin: 0 0 3px; color: var(--muted);
  text-wrap: balance;
}
.tagline { width: 100%; margin: 2px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- shell: releases + table of contents ---------- */

.shell {
  max-width: 1280px; margin: 0 auto; padding: 8px 32px 110px;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--toc);
  gap: 48px; align-items: start;
}

/* ---------- a release: meta column + entries column ---------- */

.release {
  display: grid;
  grid-template-columns: var(--meta) minmax(0, 1fr);
  gap: 40px;
  padding: 34px 0;
  border-top: 1px solid var(--rule);
}
.release:first-child { border-top: 0; }

.meta { position: sticky; top: 28px; }
.badge {
  display: inline-block; font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
  padding: 4px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.badge:hover { text-decoration: none; filter: brightness(0.97); }
.meta time {
  display: block; margin-top: 9px; color: var(--muted);
  font-size: 14px; line-height: 1.4;
}
.meta .n { display: block; margin-top: 4px; color: var(--faint); font-size: 12.5px; }

/* ---------- grouped entries ---------- */

.group + .group { margin-top: 26px; }
.group h3 {
  margin: 0 0 12px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase;
  display: inline-block; padding: 3px 9px; border-radius: 5px;
}
.group[data-kind="Added"]   h3 { color: var(--t-added);   background: var(--t-added-bg); }
.group[data-kind="Changed"] h3 { color: var(--t-changed); background: var(--t-changed-bg); }
.group[data-kind="Removed"] h3 { color: var(--t-removed); background: var(--t-removed-bg); }
.group[data-kind="Fixed"]   h3 { color: var(--t-fixed);   background: var(--t-fixed-bg); }

.group ul { list-style: none; margin: 0; padding: 0; }
.group li {
  position: relative; padding-left: 20px; margin-bottom: 9px; color: var(--ink);
}
.group li::before {
  content: ""; position: absolute; left: 3px; top: 10px;
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; color: var(--faint);
}

/* ---------- on this page ---------- */

.toc { position: sticky; top: 28px; max-height: calc(100vh - 56px); display: flex; flex-direction: column; }
.toc-title {
  margin: 0 0 10px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint);
  display: flex; align-items: center; gap: 7px;
}
.toc ol { list-style: none; margin: 0; padding: 0 4px 0 0; overflow-y: auto; }
.toc a {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 4px 9px; border-radius: 6px; color: var(--muted);
  font-size: 13.5px; font-variant-numeric: tabular-nums;
}
.toc a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.toc a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.toc .d { color: var(--faint); font-size: 12.5px; }
.toc a:hover .d, .toc a.on .d { color: inherit; }

/* ---------- single release page ---------- */

.back { display: inline-block; margin: 26px 0 0; font-size: 13.5px; color: var(--muted); }
.pager {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 8px; padding: 22px 0 0; border-top: 1px solid var(--rule); font-size: 13.5px;
}
.pager span { color: var(--faint); }
.solo { max-width: 1280px; margin: 0 auto; padding: 0 32px 110px; }

footer { border-top: 1px solid var(--rule); color: var(--faint); font-size: 13px; }
footer div {
  max-width: 1280px; margin: 0 auto; padding: 20px 32px 40px;
  display: flex; flex-wrap: wrap; gap: 6px 18px;
}

@media (max-width: 1080px) {
  .shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
}
@media (max-width: 720px) {
  .masthead-in, .shell, .solo, footer div { padding-left: 20px; padding-right: 20px; }
  .release { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 26px 0; }
  .meta { position: static; display: flex; align-items: baseline; gap: 10px; }
  .meta time { margin-top: 0; }
  .meta .n { display: none; }
}
