/* Homepage tiles */

.cards .scrolling-wrapper-flexbox {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.card-link {
  display: block;
  height: 100%;
  border-radius: var(--radius);
  color: inherit;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 188px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.card-link:hover .card,
.card-link:focus-visible .card {
  border-color: var(--purple-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card .content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--purple-50);
  border: 1px solid var(--purple-100);
}

.card .card-title {
  color: var(--heading);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.card .content p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.card .badge {
  margin-top: 10px;
}

.card .action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 18px;
  color: var(--purple-700);
  font-size: 14px;
  font-weight: 500;
}

.card .action svg {
  transition: transform 0.18s ease;
}

.card-link:hover .card .action svg {
  transform: translateX(3px);
}

.card .card-external {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  color: #8A91A8;
  font-size: 16px;
}

@media (max-width: 1024px) {
  .cards .scrolling-wrapper-flexbox {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .cards .scrolling-wrapper-flexbox {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phones: compact single-column list, icon on the left. */
@media (max-width: 560px) {
  .cards .scrolling-wrapper-flexbox {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .card {
    min-height: 0;
    padding: 14px 40px 14px 14px;
  }

  .card .content {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 14px;
    align-items: center;
  }

  .card .icon {
    grid-row: 1 / span 2;
    width: 40px;
    height: 40px;
    margin: 0;
  }

  .card .card-title {
    grid-column: 2;
  }

  /* No badge: centre the title next to the icon. */
  .card .card-title:last-child {
    grid-row: 1 / span 2;
  }

  .card .badge {
    grid-column: 2;
    justify-self: start;
    margin-top: 4px;
  }

  .card .action {
    position: absolute;
    top: 50%;
    right: 14px;
    margin: 0;
    transform: translateY(-50%);
    font-size: 0;
  }

  .card .action svg {
    font-size: 18px;
  }

  .card .card-external {
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
  }

  .card-link[target="_blank"] .card .action {
    display: none;
  }
}

/* Tokens: aligned with apideck.com (Tailwind purple/ui palette, system font stack). */
:root {
  --purple: #5C51CE;
  --purple-600: #4A41BB;
  --purple-700: #3D35A8;
  --purple-200: #C7C3EF;
  --purple-100: #E3E1F7;
  --purple-50: #F1F0FB;
  --pink-600: #A821E1;
  --ink: #0A0C27;
  --heading: #1A202C;
  --text: #4A5568;
  --muted: #5A6478;
  --border: #E5E7F0;
  --surface: #F7F8FC;
  --navy: #090F25;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(10, 12, 39, 0.04), 0 1px 3px rgba(10, 12, 39, 0.06);
  --shadow-md: 0 4px 6px -2px rgba(10, 12, 39, 0.05), 0 12px 24px -6px rgba(74, 65, 187, 0.16);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --header-height: 68px;

  /* legacy names still referenced by inline styles */
  --primary-color: var(--purple);
  --border-color: var(--border);
  --border-radius: var(--radius-sm);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--purple-100);
  color: var(--ink);
}

main {
  color: var(--text);
  padding: 48px 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  color: var(--heading);
  letter-spacing: -0.01em;
}

p {
  line-height: 1.6;
  font-size: 15px;
}

a {
  text-decoration: none;
  color: var(--purple);
}

a:hover {
  text-decoration: underline;
}

a.button:hover,
a.card-link:hover {
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.skip-link:focus {
  top: 12px;
}

.container {
  max-width: 1200px;
  padding: 0 24px;
  margin: 0 auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-nav {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.logo-container:hover {
  text-decoration: none;
}

.logo-container .logo {
  display: block;
  height: 24px;
  width: auto;
}

.logo-container .postfix {
  padding-left: 14px;
  border-left: 1px solid var(--border);
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  white-space: nowrap;
}

.menu {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-link {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--heading);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}

.menu-link:hover {
  border-color: var(--purple);
  color: var(--purple-700);
  text-decoration: none;
}

/* Masthead */

.masthead {
  text-align: center;
  padding: 72px 0 64px;
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(92, 81, 206, 0.10) 0%, rgba(92, 81, 206, 0) 70%),
    linear-gradient(180deg, #FAFAFF 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--border);
}

.masthead h1 {
  margin: 0 auto;
  max-width: 820px;
  font-size: 44px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--heading);
}

.masthead p {
  margin: 16px auto 0;
  max-width: 640px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
  transition: box-shadow 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.button.primary {
  color: #fff;
  background-image: linear-gradient(to right, var(--purple-600) 0%, var(--pink-600) 100%);
  box-shadow: 0 6px 16px -6px rgba(92, 81, 206, 0.6);
}

.button.primary:hover {
  box-shadow: 0 10px 22px -8px rgba(92, 81, 206, 0.8);
  transform: translateY(-1px);
}

.button.medium {
  padding: 12px 22px;
}

.button.small {
  padding: 8px 14px;
  font-size: 14px;
}

.button.white {
  background-color: #fff;
}

.button.bordered {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--heading);
  box-shadow: var(--shadow-sm);
}

.button.bordered:hover {
  border-color: var(--purple);
  color: var(--purple-700);
}

.fr {
  float: right;
}

/* Badges */

.badge {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  background-color: var(--purple-50);
  color: var(--purple-700);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

/* CTA */

.cta {
  padding: 72px 0 80px;
}

.cta-panel {
  text-align: center;
  padding: 56px 32px;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(70% 140% at 100% 0%, rgba(168, 33, 225, 0.35) 0%, rgba(168, 33, 225, 0) 60%),
    radial-gradient(60% 120% at 0% 100%, rgba(92, 81, 206, 0.45) 0%, rgba(92, 81, 206, 0) 60%),
    var(--navy);
}

.cta-panel h2 {
  margin: 0;
  color: #fff;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.cta-panel p {
  margin: 12px auto 28px;
  max-width: 560px;
  color: #D5D8EA;
  font-size: 16px;
}

.cta-panel .button.primary:focus-visible {
  outline-color: #fff;
}

/* Footer */

.site-footer {
  padding: 28px 0;
  background-color: var(--navy);
  color: #A9AEC8;
  font-size: 14px;
}

.site-footer p {
  margin: 0;
  font-size: 14px;
}

.site-footer a {
  color: #fff;
}

/* Document pages: sidebar + article */

.flex-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 56px;
}

.sidebar {
  flex: 0 0 240px;
  position: sticky;
  top: calc(var(--header-height) + 24px);
  max-height: calc(100vh - var(--header-height) - 48px);
  overflow-y: auto;
}

.sidebar-nav ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.sidebar-nav li {
  margin: 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  transition: background-color 0.12s, color 0.12s;
}

.sidebar-nav a:hover {
  background: var(--surface);
  color: var(--heading);
  text-decoration: none;
}

.sidebar-nav a.sidebar-overview {
  color: var(--heading);
  font-weight: 600;
  font-size: 15px;
}

.sidebar-nav li.active a {
  background: var(--purple-50);
  color: var(--purple-700);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--purple);
}

.sidebar-nav .external {
  flex: none;
  color: #8A91A8;
  font-size: 13px;
}

.doc {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 760px;
}

.doc .doc-meta {
  margin: 0 0 24px;
  line-height: 1.5;
  font-size: 13px;
  color: var(--muted);
}

.doc-meta time {
  color: var(--heading);
  font-weight: 500;
}

.doc h2 {
  margin: 40px 0 12px;
  font-size: 22px;
  line-height: 1.3;
}

.doc h3 {
  margin: 28px 0 8px;
  font-size: 17px;
  line-height: 1.4;
}

.doc > p,
.doc .intro p,
.doc section > p {
  max-width: 70ch;
  font-size: 16px;
  line-height: 1.7;
}

/* Rendered markdown (legal documents). Selectors are prefixed with main
   so they win over the defaults in components/util/Markdown.js. */

main .markdown-container {
  max-width: 70ch;
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: break-word;
}

main .markdown-container p,
main .markdown-container li,
main .markdown-container table {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}

main .markdown-container p {
  margin: 0 0 1.1em;
}

main .markdown-container h1 {
  margin: 1.6em 0 0.6em;
  font-size: 28px;
  line-height: 1.25;
  color: var(--heading);
}

main .markdown-container h2 {
  margin: 2.2em 0 0.7em;
  padding-bottom: 0.4em;
  font-size: 22px;
  line-height: 1.3;
  color: var(--heading);
  border-bottom: 1px solid var(--border);
}

main .markdown-container h3 {
  margin: 1.8em 0 0.5em;
  font-size: 18px;
  line-height: 1.4;
  color: var(--heading);
}

main .markdown-container h4,
main .markdown-container h5 {
  margin: 1.5em 0 0.4em;
  font-size: 16px;
  line-height: 1.4;
  color: var(--heading);
}

main .markdown-container > :first-child {
  margin-top: 0;
}

main .markdown-container strong {
  color: var(--heading);
  font-weight: 600;
}

main .markdown-container a {
  color: var(--purple-700);
  text-decoration: underline;
  text-decoration-color: var(--purple-200);
  text-underline-offset: 2px;
}

main .markdown-container a:hover {
  text-decoration-color: currentColor;
}

main .markdown-container ul,
main .markdown-container ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

main .markdown-container li {
  margin-bottom: 0.4em;
  padding-left: 0.2em;
}

main .markdown-container li::marker {
  color: var(--purple);
}

main .markdown-container blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--purple-200);
}

main .markdown-container blockquote p:last-child {
  margin-bottom: 0;
}

main .markdown-container hr {
  margin: 3em 0;
  border: 0;
  border-top: 1px solid var(--border);
}

main .markdown-container code {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface);
  font-size: 0.9em;
}

main .markdown-container table {
  margin: 1.4em 0;
  font-size: 14px;
  line-height: 1.5;
}

/* Tables */

table {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: #fff;
  border-spacing: 0;
  border-collapse: separate;
  font-size: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

td, th {
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

th {
  text-align: left;
  padding: 12px 16px;
  background: var(--surface);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
  font-weight: 600;
}

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

td {
  padding: 12px 16px;
  background-color: #fff;
  color: var(--text);
}

tbody tr:hover td {
  background-color: #FBFBFE;
}

td img.icon {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
}

p.disclaimer {
  padding: 14px 18px;
  background: var(--purple-50);
  border-radius: var(--radius-sm);
}

/* Tablet and down */
@media (max-width: 1024px) {
  .flex-wrapper {
    gap: 32px;
  }

  .sidebar {
    flex-basis: 200px;
  }
}

/* Small screens */
@media (max-width: 739px) {
  :root {
    --header-height: 60px;
  }

  .container {
    padding: 0 16px;
  }

  main {
    padding: 24px 0 8px;
  }

  .logo-container {
    gap: 10px;
  }

  .logo-container .logo {
    height: 20px;
  }

  .logo-container .postfix {
    padding-left: 10px;
    font-size: 13px;
  }

  .menu-link {
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
  }

  .masthead {
    padding: 40px 0 36px;
  }

  .masthead h1 {
    font-size: 30px;
  }

  .masthead p {
    font-size: 16px;
  }

  .cta {
    padding: 40px 0 48px;
  }

  .cta-panel {
    padding: 40px 20px;
    border-radius: 16px;
  }

  .cta-panel h2 {
    font-size: 26px;
  }

  /* Sidebar becomes a horizontally scrollable strip of document links. */
  .flex-wrapper {
    display: block;
  }

  .sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    margin: 0 -16px 28px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  .sidebar-nav ul {
    display: flex;
    gap: 6px;
    margin: 0;
  }

  .sidebar-nav a,
  .sidebar-nav a.sidebar-overview {
    white-space: nowrap;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
  }

  .sidebar-nav li.active a {
    box-shadow: none;
    border-color: var(--purple-200);
  }

  .doc {
    max-width: none;
  }

  main .markdown-container table {
    display: block;
    overflow-x: auto;
  }

  /* Subprocessor tables stack into labelled rows. */
  table.subprocessors,
  table.subprocessors thead,
  table.subprocessors tbody,
  table.subprocessors th,
  table.subprocessors td,
  table.subprocessors tr {
    display: block;
  }

  table.subprocessors thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  table.subprocessors tr {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
  }

  table.subprocessors td:nth-of-type(1) {
    grid-row: 1 / span 3;
    grid-column: 1;
  }

  table.subprocessors td:nth-of-type(n + 2) {
    grid-column: 2;
  }

  table.subprocessors tr:last-child {
    border-bottom: 0;
  }

  table.subprocessors td {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 3px 0;
    border: none;
    background: transparent;
  }

  table.subprocessors td:before {
    flex: 0 0 96px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  table.subprocessors td:before {
    flex-basis: 76px;
  }

  table.subprocessors td:nth-of-type(1):before {
    content: none;
  }

  table.subprocessors td:nth-of-type(2) { font-weight: 600; }
  table.subprocessors td:nth-of-type(2):before { content: "Entity"; }
  table.subprocessors td:nth-of-type(3):before { content: "Location"; }
  table.subprocessors td:nth-of-type(4):before { content: "Purpose"; }
}

/* Pace */

.pace {
  -webkit-pointer-events: none;
  pointer-events: none;

  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.pace-inactive {
  display: none;
}

.pace .pace-progress {
  background: var(--purple);
  position: fixed;
  z-index: 2000;
  top: 0;
  right: 100%;
  width: 100%;
  height: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

