:root {
  color-scheme: light dark;
  --page-bg: #f5f7fb;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --text: #182033;
  --text-muted: #667085;
  --heading: #101828;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --shadow: 0 18px 55px rgba(16, 24, 40, 0.08);
  --shadow-soft: 0 8px 24px rgba(16, 24, 40, 0.06);
  --accent: #475467;
  --accent-strong: #344054;
  --accent-soft: #f2f4f7;
  --accent-border: #d0d5dd;
  --focus-ring: rgba(37, 99, 235, 0.32);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --content-width: 960px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

.theme-cat {
  --accent: #c2412d;
  --accent-strong: #9e3525;
  --accent-soft: #fff4ef;
  --accent-border: #f2c7b8;
}

.theme-noise {
  --accent: #5b55b8;
  --accent-strong: #47419a;
  --accent-soft: #f4f3ff;
  --accent-border: #d5d2f7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 30rem),
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 27rem),
    var(--page-bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  padding: 18px 24px 0;
}

.header-inner,
.footer-inner {
  width: min(100%, calc(var(--content-width) + 80px));
  margin: 0 auto;
}

.header-inner {
  min-height: 62px;
  padding: 10px 12px 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 8px 30px rgba(16, 24, 40, 0.045);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--heading);
  font-weight: 720;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark,
.app-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 23%, transparent);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 11px;
}

.header-label {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

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

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

.app-nav a {
  padding: 8px 11px;
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.app-nav a:hover,
.app-nav a:focus-visible {
  color: var(--accent-strong);
  background: var(--accent-soft);
  text-decoration: none;
}

.app-nav a[aria-current="page"] {
  color: var(--accent-strong);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}

main {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 44px auto;
  flex: 1;
}

.landing-main,
.app-overview {
  display: grid;
  gap: 30px;
}

.landing-hero,
.app-hero {
  padding: 48px 50px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 52%, var(--surface)), var(--surface) 66%);
  box-shadow: var(--shadow);
}

.landing-hero::after,
.app-hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -86px;
  top: -104px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  box-shadow: 0 0 0 36px color-mix(in srgb, var(--accent) 4%, transparent);
  pointer-events: none;
}

.eyebrow,
.app-type,
.document-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.105em;
  line-height: 1.35;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.23;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 790;
  letter-spacing: -0.046em;
}

h2 {
  margin: 2.25em 0 0.55em;
  font-size: clamp(1.25rem, 2.4vw, 1.58rem);
  font-weight: 760;
  letter-spacing: -0.025em;
  scroll-margin-top: 24px;
}

h3 {
  margin: 1.65em 0 0.45em;
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -0.012em;
}

.lead {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: clamp(1.03rem, 2vw, 1.18rem);
  line-height: 1.65;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1.15em;
  padding-left: 1.4em;
}

li {
  padding-left: 0.18em;
  margin: 0.32em 0;
}

li::marker {
  color: var(--accent);
}

a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 5px;
}

.app-grid,
.document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.app-card,
.document-link-card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.app-card {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  overflow: hidden;
}

.app-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 35%, transparent));
}

.app-card-top,
.app-identity {
  display: flex;
  align-items: center;
  gap: 17px;
}

.app-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  font-size: 12px;
}

.app-icon-large {
  width: 76px;
  height: 76px;
  border-radius: 21px;
  font-size: 16px;
}

.app-card h2,
.document-link-card h2 {
  margin: 0;
}

.app-card h2 {
  font-size: 1.38rem;
}

.app-card h2 a,
.document-link-card h2 a {
  color: var(--heading);
}

.app-type {
  margin-bottom: 4px;
}

.app-description {
  margin: 22px 0;
  color: var(--text-muted);
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.card-links a,
.document-footer-nav a {
  padding: 7px 10px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 12px;
}

.primary-link {
  margin-top: auto;
  font-weight: 750;
}

.verification-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

code {
  padding: 0.15em 0.42em;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--heading);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.app-identity {
  position: relative;
  z-index: 1;
}

.document-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.document-link-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.document-link-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow);
}

.document-link-card h2 {
  font-size: 1.24rem;
}

.document-link-card p {
  color: var(--text-muted);
  font-size: 14px;
}

.document-card {
  max-width: 880px;
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.document-header {
  margin-bottom: 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
}

.document-header h1 {
  font-size: clamp(2rem, 5vw, 3.05rem);
}

.updated-badge {
  display: inline-flex;
  align-items: center;
  margin: 18px 0 0;
  padding: 6px 10px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.toc {
  margin: 0 0 30px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.toc summary {
  color: var(--heading);
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
}

.toc nav {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.toc ul {
  columns: 2;
  column-gap: 30px;
  margin: 0;
  padding-left: 1.2em;
  font-size: 13px;
}

.toc li {
  break-inside: avoid;
  margin: 0 0 6px;
}

.document-card > p,
.document-card > ul,
.document-card > ol,
.document-card > h2,
.document-card > h3 {
  max-width: 74ch;
}

.document-card strong {
  color: var(--heading);
}

.table-wrap {
  width: 100%;
  margin: 20px 0 32px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.5;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  background: var(--surface-muted);
  color: var(--heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: color-mix(in srgb, var(--accent-soft) 42%, transparent);
}

.document-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.site-footer {
  padding: 0 24px 26px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 4px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.footer-inner p {
  margin: 0;
}

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

.footer-links a {
  color: var(--text-muted);
  font-weight: 650;
}

@media (max-width: 820px) {
  .site-header {
    padding: 12px 12px 0;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }

  .app-nav {
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }

  main {
    width: min(calc(100% - 24px), var(--content-width));
    margin: 24px auto 34px;
  }

  .landing-hero,
  .app-hero {
    padding: 34px 28px;
  }

  .app-grid,
  .document-grid {
    grid-template-columns: 1fr;
  }

  .document-link-card {
    min-height: 0;
  }

  .toc ul {
    columns: 1;
  }
}

@media (max-width: 640px) {
  body {
    line-height: 1.67;
  }

  .brand-name {
    font-size: 14px;
  }

  .header-label {
    display: none;
  }

  .app-nav a {
    padding: 7px 9px;
    font-size: 12px;
  }

  .landing-hero,
  .app-hero,
  .document-card {
    border-radius: 18px;
  }

  .landing-hero,
  .app-hero {
    padding: 28px 22px;
  }

  .app-identity {
    align-items: flex-start;
  }

  .app-icon-large {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    font-size: 13px;
  }

  .app-card {
    min-height: 0;
    padding: 23px;
  }

  .document-card {
    padding: 25px 20px 30px;
  }

  .document-header {
    margin-bottom: 22px;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tbody tr {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-muted);
    box-shadow: var(--shadow-soft);
  }

  td {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
  }

  td:last-child {
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.065em;
    text-transform: uppercase;
  }

  tbody tr:hover td {
    background: transparent;
  }

  .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: none !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #0b1020;
    --surface: #11182a;
    --surface-muted: #151e33;
    --text: #d9e0ec;
    --text-muted: #9ca8bb;
    --heading: #f7f9fc;
    --border: #28334a;
    --border-strong: #354158;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
    --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.24);
    --focus-ring: rgba(125, 173, 255, 0.42);
  }

  .theme-cat {
    --accent: #ff8b70;
    --accent-strong: #ffad99;
    --accent-soft: #2b1a1c;
    --accent-border: #65352f;
  }

  .theme-noise {
    --accent: #aaa4ff;
    --accent-strong: #c7c3ff;
    --accent-soft: #201e3f;
    --accent-border: #4b477d;
  }

  .theme-root {
    --accent: #a6b0c2;
    --accent-strong: #d0d5dd;
    --accent-soft: #1b2436;
    --accent-border: #354158;
  }

  .header-inner {
    background: rgba(17, 24, 42, 0.84);
  }

  .landing-hero,
  .app-hero {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 72%, var(--surface)), var(--surface) 67%);
  }
}

@supports not (color: color-mix(in srgb, black, white)) {
  body {
    background: var(--page-bg);
  }

  .header-inner {
    background: var(--surface);
  }
}
