:root {
  --bg: #07080b;
  --panel: #10131a;
  --panel-2: #151821;
  --text: #f5f6f8;
  --soft: #b0b4bf;
  --muted: #777c89;
  --line: rgba(255, 255, 255, .12);
  --red: #ff244a;
  --red-soft: rgba(255, 36, 74, .12);
  --green: #42df92;
  --logo: url("/assets/wp-logo.webp");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(850px circle at 50% -10%, rgba(255, 36, 74, .10), transparent 48%),
    linear-gradient(180deg, #08090d 0%, #07080b 54%, #090a0f 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 11, .78);
  backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.logo {
  width: 54px;
  aspect-ratio: 1.55;
  flex: 0 0 auto;
  background: var(--logo) center/contain no-repeat;
  filter: drop-shadow(0 8px 18px rgba(255, 36, 74, .18));
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.nav,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.nav a,
.footer-links a {
  color: var(--soft);
  text-decoration: none;
  font-size: .92rem;
}

.nav a[aria-current="page"],
.nav a:hover,
.footer-links a:hover {
  color: var(--text);
}

.legal-hero {
  padding: 78px 0 38px;
}

.kicker {
  margin: 0 0 16px;
  color: #ff617b;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.08;
  letter-spacing: -.03em;
}

h1 {
  max-width: 900px;
  margin-bottom: 18px;
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 780;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

h3 {
  margin: 28px 0 8px;
  font-size: 1.15rem;
}

.lede {
  max-width: 760px;
  margin-bottom: 24px;
  color: var(--soft);
  font-size: 1.16rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta li,
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--soft);
  background: rgba(255, 255, 255, .035);
  font-size: .86rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  padding: 28px 0 96px;
}

.toc {
  position: sticky;
  top: 92px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: rgba(16, 19, 26, .72);
}

.toc strong {
  display: block;
  margin-bottom: 12px;
}

.toc a {
  display: block;
  padding: 7px 0;
  color: var(--soft);
  text-decoration: none;
  font-size: .92rem;
}

.toc a:hover {
  color: var(--text);
}

.legal-content {
  min-width: 0;
}

.legal-section {
  scroll-margin-top: 110px;
  border-top: 1px solid var(--line);
  padding: 38px 0;
}

.summary-box {
  border: 1px solid rgba(255, 36, 74, .32);
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(255, 36, 74, .15), rgba(255, 255, 255, .035));
}

.summary-box p:last-child,
.legal-section p:last-child,
.legal-section ul:last-child {
  margin-bottom: 0;
}

.legal-section p,
.legal-section li {
  color: var(--soft);
}

.legal-section strong {
  color: var(--text);
}

.legal-section a {
  color: #ff8799;
}

ul,
ol {
  padding-left: 1.3rem;
}

li + li {
  margin-top: 8px;
}

.permission-table {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.permission-row {
  display: grid;
  grid-template-columns: 180px 120px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, .035);
}

/* Two-cell variant: the API reference lists a code token against one line of
   meaning, so it drops the middle column the permission table needs. */
.permission-row.pair {
  grid-template-columns: 220px minmax(0, 1fr);
}

/* Inline code and keys in running text. The permission table's own cells keep
   their bare look through the more specific rule that follows. */
.legal-section code,
.legal-section kbd {
  font-size: .92em;
  color: var(--text);
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  word-break: break-word;
}

.legal-section kbd {
  font-family: inherit;
  font-weight: 700;
}

.permission-row code {
  color: #fff;
  white-space: normal;
  word-break: break-word;
  background: none;
  border: 0;
  padding: 0;
}

.need {
  color: var(--green);
  font-weight: 800;
}

.need.no {
  color: #ff9aa7;
}

.note-card {
  border-left: 3px solid var(--red);
  padding: 14px 16px;
  background: var(--red-soft);
  color: var(--soft);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(7, 8, 11, .72);
}

.copyright {
  color: var(--muted);
  font-size: .88rem;
}

@media (max-width: 860px) {
  .header-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .toc {
    position: static;
  }

  .permission-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
