:root {
  color-scheme: light;
  --bg: #f4f8f8;
  --bg-elevated: rgba(255, 255, 255, 0.84);
  --surface: #ffffff;
  --surface-soft: #f7fafb;
  --surface-tint: #edf7f6;
  --text: #13272d;
  --text-strong: #071c22;
  --muted: #60747a;
  --muted-strong: #435a61;
  --line: #d9e6e7;
  --line-strong: #c4d8da;
  --brand: #0b8f8c;
  --brand-strong: #066b69;
  --brand-soft: #dff4f2;
  --brand-rgb: 11, 143, 140;
  --secondary: #3478a5;
  --secondary-soft: #e4f0f8;
  --warning: #b87724;
  --warning-soft: #fff1dd;
  --shadow-sm: 0 10px 28px rgba(15, 49, 56, 0.07);
  --shadow-lg: 0 24px 70px rgba(15, 49, 56, 0.13);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --page-accent: var(--brand);
  --page-accent-soft: var(--brand-soft);
  --page-accent-rgb: var(--brand-rgb);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #06151d;
  --bg-elevated: rgba(9, 29, 39, 0.86);
  --surface: #0b202a;
  --surface-soft: #0e2631;
  --surface-tint: #102f38;
  --text: #dce9ec;
  --text-strong: #f4fbfc;
  --muted: #9bb0b6;
  --muted-strong: #bfd0d4;
  --line: #213b46;
  --line-strong: #2e4c58;
  --brand: #61d1cd;
  --brand-strong: #8be3df;
  --brand-soft: #143b40;
  --brand-rgb: 97, 209, 205;
  --secondary: #81b8e5;
  --secondary-soft: #172f43;
  --warning: #efb566;
  --warning-soft: #3d3021;
  --shadow-sm: 0 12px 32px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 26px 80px rgba(0, 0, 0, 0.34);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #06151d;
    --bg-elevated: rgba(9, 29, 39, 0.86);
    --surface: #0b202a;
    --surface-soft: #0e2631;
    --surface-tint: #102f38;
    --text: #dce9ec;
    --text-strong: #f4fbfc;
    --muted: #9bb0b6;
    --muted-strong: #bfd0d4;
    --line: #213b46;
    --line-strong: #2e4c58;
    --brand: #61d1cd;
    --brand-strong: #8be3df;
    --brand-soft: #143b40;
    --brand-rgb: 97, 209, 205;
    --secondary: #81b8e5;
    --secondary-soft: #172f43;
    --warning: #efb566;
    --warning-soft: #3d3021;
    --shadow-sm: 0 12px 32px rgba(0, 0, 0, 0.18);
    --shadow-lg: 0 26px 80px rgba(0, 0, 0, 0.34);
  }
}

body[data-page="terms"] {
  --page-accent: var(--secondary);
  --page-accent-soft: var(--secondary-soft);
  --page-accent-rgb: 52, 120, 165;
}

body[data-page="deletion"] {
  --page-accent: var(--warning);
  --page-accent-soft: var(--warning-soft);
  --page-accent-rgb: 184, 119, 36;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 8% 2%, rgba(var(--brand-rgb), 0.1), transparent 26rem),
    radial-gradient(circle at 94% 14%, rgba(66, 132, 181, 0.08), transparent 30rem),
    var(--bg);
  color: var(--text);
  font: 400 16px/1.72 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--brand-strong);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--page-accent);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(var(--page-accent-rgb), 0.26);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text-strong);
  color: var(--surface);
  font-size: 0.86rem;
  font-weight: 750;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: var(--bg-elevated);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.header-inner,
.page-shell,
.footer-inner {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

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

.brand-mark {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(var(--brand-rgb), 0.24);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 48%),
    linear-gradient(145deg, #0c9d99, #075c61);
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(6, 107, 105, 0.24);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 21px;
  height: 9px;
  left: 11px;
  bottom: 7px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 0 0 50% 50%;
}

.brand-copy {
  display: grid;
  line-height: 1.08;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 790;
  letter-spacing: -0.025em;
}

.brand-label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.primary-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.primary-nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 10px;
  color: var(--muted-strong);
  font-size: 0.79rem;
  font-weight: 720;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.primary-nav a:hover {
  background: var(--surface-soft);
  color: var(--text-strong);
}

.primary-nav a[aria-current="page"] {
  background: var(--surface);
  color: var(--page-accent);
  box-shadow: 0 4px 14px rgba(16, 46, 54, 0.08);
}

.theme-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--muted-strong);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease;
}

.theme-toggle:hover {
  color: var(--page-accent);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.theme-toggle .moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle .sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun {
    display: none;
  }

  :root:not([data-theme="light"]) .theme-toggle .moon {
    display: block;
  }
}

.page-shell {
  padding-block: 42px 72px;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(132deg, rgba(var(--page-accent-rgb), 0.11), transparent 58%),
    var(--surface);
  box-shadow: var(--shadow-lg);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 340px;
  height: 340px;
  top: -190px;
  right: -100px;
  border: 70px solid rgba(var(--page-accent-rgb), 0.06);
  border-radius: 50%;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 250px;
  height: 250px;
  right: 52px;
  bottom: -205px;
  border: 1px solid rgba(var(--page-accent-rgb), 0.17);
  border-radius: 50%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 13px;
  color: var(--page-accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px rgba(var(--page-accent-rgb), 0.12);
}

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

h1 {
  max-width: 760px;
  margin-bottom: 15px;
  color: var(--text-strong);
  font-size: clamp(2rem, 5vw, 3.65rem);
  font-weight: 790;
  line-height: 1.07;
  letter-spacing: -0.045em;
}

.hero-lede {
  max-width: 720px;
  margin-bottom: 22px;
  color: var(--muted-strong);
  font-size: clamp(1rem, 1.7vw, 1.16rem);
  line-height: 1.65;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--muted-strong);
  font-size: 0.76rem;
  font-weight: 690;
}

.meta-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--page-accent);
}

.hero-symbol {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  align-self: center;
  border: 1px solid rgba(var(--page-accent-rgb), 0.2);
  border-radius: 32px;
  background: var(--page-accent-soft);
  color: var(--page-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: rotate(3deg);
}

.hero-symbol svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.legal-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  margin-top: 28px;
}

.legal-aside {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 14px;
}

.toc,
.support-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.toc {
  padding: 18px 12px 12px;
}

.toc-title {
  margin: 0 8px 12px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted-strong);
  font-size: 0.79rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.toc a::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--line-strong);
}

.toc a:hover {
  background: var(--surface-tint);
  color: var(--page-accent);
}

.toc a:hover::before {
  background: var(--page-accent);
}

.support-card {
  padding: 18px;
  background:
    linear-gradient(150deg, rgba(var(--page-accent-rgb), 0.1), transparent 70%),
    var(--surface);
}

.support-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 13px;
  border-radius: 10px;
  background: var(--page-accent-soft);
  color: var(--page-accent);
}

.support-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.support-card h2 {
  margin-bottom: 5px;
  color: var(--text-strong);
  font-size: 0.93rem;
  font-weight: 760;
}

.support-card p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.support-card a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--page-accent);
  font-size: 0.76rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.legal-content {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.legal-section {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.legal-section:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: 0 16px 42px rgba(15, 49, 56, 0.1);
}

.section-index {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border: 1px solid rgba(var(--page-accent-rgb), 0.18);
  border-radius: 11px;
  background: var(--page-accent-soft);
  color: var(--page-accent);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.legal-section h2 {
  margin-bottom: 9px;
  color: var(--text-strong);
  font-size: clamp(1.02rem, 2vw, 1.17rem);
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.legal-section p,
.legal-section ul {
  margin-bottom: 0;
  color: var(--muted-strong);
  font-size: 0.94rem;
}

.legal-section p + p,
.legal-section p + ul,
.legal-section ul + p {
  margin-top: 12px;
}

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

.legal-section a {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 56%, transparent);
}

.footer-inner {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.footer-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(var(--brand-rgb), 0.11);
}

.footer-title {
  margin: 0;
  color: var(--text-strong);
  font-size: 0.84rem;
  font-weight: 750;
}

.footer-copy {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px 16px;
}

.footer-links a {
  color: var(--muted-strong);
  font-size: 0.74rem;
  font-weight: 650;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--brand);
}

@media (max-width: 880px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding-block: 11px;
  }

  .primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .primary-nav::-webkit-scrollbar {
    display: none;
  }

  .primary-nav a {
    flex: 1 0 auto;
    justify-content: center;
  }

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

  .legal-aside {
    position: static;
    top: auto;
  }

  .toc {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    padding: 8px;
    scrollbar-width: none;
  }

  .toc::-webkit-scrollbar {
    display: none;
  }

  .toc-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .toc a {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid transparent;
    white-space: nowrap;
  }

  .toc a::before {
    display: none;
  }

  .support-card {
    display: none;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .page-shell,
  .footer-inner {
    width: min(100% - 24px, 1160px);
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 13px;
  }

  .brand-mark::after {
    left: 10px;
    bottom: 6px;
  }

  .brand-name {
    font-size: 0.96rem;
  }

  .brand-label {
    font-size: 0.62rem;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .page-shell {
    padding-block: 22px 48px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 25px 22px;
    border-radius: 22px;
  }

  h1 {
    font-size: clamp(1.8rem, 10vw, 2.55rem);
  }

  .hero-symbol {
    width: 72px;
    height: 72px;
    grid-row: 1;
    justify-self: start;
    border-radius: 22px;
    transform: rotate(2deg);
  }

  .hero-symbol svg {
    width: 32px;
    height: 32px;
  }

  .legal-layout {
    gap: 16px;
    margin-top: 16px;
  }

  .legal-content {
    gap: 10px;
  }

  .legal-section {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 22px;
    border-radius: 16px;
  }

  .section-index {
    width: auto;
    height: auto;
    display: inline-flex;
    justify-self: start;
    padding: 5px 8px;
    border-radius: 8px;
  }

  .legal-section p,
  .legal-section ul {
    font-size: 0.91rem;
    line-height: 1.68;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #111111;
    --text-strong: #000000;
    --muted: #444444;
    --muted-strong: #222222;
    --line: #d7d7d7;
  }

  body {
    background: #ffffff;
  }

  .site-header,
  .legal-aside,
  .hero-symbol,
  .site-footer {
    display: none;
  }

  .page-shell {
    width: 100%;
    padding: 0;
  }

  .hero,
  .legal-section {
    break-inside: avoid;
    border-color: #d7d7d7;
    box-shadow: none;
  }

  .hero {
    padding: 24px;
  }

  .legal-layout {
    display: block;
  }

  .legal-content {
    margin-top: 18px;
  }
}


/* Official SoftwareBox logo override */
.brand-mark.official{padding:0;overflow:hidden;border-radius:0;background:none;border:0;box-shadow:0 8px 22px rgba(0,0,0,.12)}
.brand-mark.official::after{display:none}
.brand-mark.official img{width:100%;height:100%;object-fit:cover;display:block}
