:root {
  --electric: #3353f4;
  --obsidian: #140e0c;
  --ink: #1c1c22;
  --muted: #5b5b66;
  --line: #e6e6ec;
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --heading: #140e0c;
  --maxw: 760px;
}
[data-theme="dark"] {
  --ink: #e9eaf1;
  --muted: #a6abb8;
  --line: rgba(255, 255, 255, 0.12);
  --bg: #0a0913;
  --bg-soft: rgba(255, 255, 255, 0.04);
  --heading: #ffffff;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family:
    "Poppins",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition:
    background 0.4s ease,
    color 0.4s ease;
}

/* Theme toggle */
.theme-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 50;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition:
    background 0.3s ease,
    transform 0.2s ease;
}
.theme-toggle:hover {
  transform: translateY(-2px);
}
a {
  color: var(--electric);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Header band */
header.hero {
  background: linear-gradient(135deg, #1a2a8c 0%, var(--obsidian) 60%);
  color: #fff;
  padding: 56px 0 48px;
}
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
  margin-bottom: 28px;
}
.brand .logo {
  display: block;
  height: 30px;
  width: 92px;
  background: left center / contain no-repeat;
  background-image: url("../img/brand/istudio-logo-dark.png");
}
/* footer logo adapts to theme (sits on page background, not the dark hero) */
[data-theme="light"] footer .brand .logo {
  background-image: url("../img/brand/istudio-logo-light.png");
}
header.hero h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 10px;
}
header.hero .sub {
  color: #c9cdf0;
  font-weight: 300;
  font-size: 1rem;
  margin: 0;
}
.updated {
  display: inline-block;
  margin-top: 22px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 6px 14px;
  border-radius: 999px;
}

main {
  padding-top: 44px;
  padding-bottom: 80px;
}

/* Intro */
.intro {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 26px;
  margin-bottom: 40px;
  font-size: 0.97rem;
  color: var(--muted);
}
.intro strong {
  color: var(--ink);
}

/* TOC */
nav.toc {
  margin-bottom: 48px;
}
nav.toc h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 14px;
}
nav.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 32px;
}
nav.toc li {
  margin-bottom: 8px;
  font-size: 0.9rem;
  break-inside: avoid;
}
nav.toc li a {
  color: var(--ink);
}
nav.toc li a span {
  color: var(--electric);
  font-weight: 600;
  margin-right: 6px;
}

section.clause {
  margin-bottom: 42px;
  scroll-margin-top: 24px;
}
section.clause h2 {
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 4px;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
section.clause h2 .num {
  color: var(--electric);
  font-weight: 700;
  font-size: 0.95rem;
  flex: none;
  min-width: 34px;
}
section.clause h3 {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  margin: 22px 0 6px;
}
.rule {
  height: 3px;
  width: 42px;
  background: var(--electric);
  border-radius: 2px;
  margin: 0 0 18px 46px;
}
section.clause p {
  margin: 0 0 12px;
}
section.clause ul {
  margin: 0 0 14px;
  padding-left: 20px;
}
section.clause ul li {
  margin-bottom: 8px;
}
.lead {
  padding-left: 46px;
}
@media (max-width: 560px) {
  .lead {
    padding-left: 0;
  }
  .rule {
    margin-left: 0;
  }
  nav.toc ol {
    columns: 1;
  }
  header.hero h1 {
    font-size: 1.7rem;
  }
}

/* highlight box for the price-change clause */
.highlight {
  border-left: 4px solid var(--electric);
  background: rgba(51, 83, 244, 0.05);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
}

.note {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}
.ph {
  background: rgba(255, 196, 0, 0.18);
  border-radius: 4px;
  padding: 0 4px;
  color: #b9860b;
  font-weight: 500;
}
[data-theme="dark"] .ph {
  color: #f0c862;
}

footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 60px 0 34px;
  transition: background 0.4s;
}
footer .wrap {
  max-width: 1100px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 46px;
}
.foot-brand .brand {
  margin-bottom: 16px;
}
.foot-brand p {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 280px;
  margin: 0 0 20px;
}
.foot-socials {
  display: flex;
  gap: 12px;
}
.foot-socials a {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: 0.3s;
}
.foot-socials a:hover {
  background: var(--electric);
  color: #fff;
  border-color: transparent;
  text-decoration: none;
}
.foot-col h5 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
  font-weight: 600;
}
.foot-col a {
  display: block;
  color: var(--ink);
  opacity: 0.78;
  font-size: 0.9rem;
  margin-bottom: 11px;
  transition: 0.2s;
}
.foot-col a:hover {
  opacity: 1;
  color: var(--electric);
  text-decoration: none;
}
.foot-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}
@media (max-width: 850px) {
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .foot-grid {
    grid-template-columns: 1fr;
  }
}
