/*
 * AECloud documentation theme customizations.
 *
 * This layer keeps Learn2's documentation layout while giving it a modern,
 * product-led visual system inspired by contemporary documentation sites.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter/inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ae-primary: #2563eb;
  --ae-primary-dark: #1d4ed8;
  --ae-primary-soft: #eff6ff;
  --ae-ink: #0f172a;
  --ae-text: #334155;
  --ae-muted: #64748b;
  --ae-border: #e2e8f0;
  --ae-surface: #ffffff;
  --ae-surface-muted: #f8fafc;
  --ae-sidebar: #f6f8fc;
  --ae-sidebar-width: 288px;
  --ae-radius-sm: 0.55rem;
  --ae-radius-md: 0.85rem;
  --ae-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --ae-shadow-md: 0 18px 44px -30px rgba(15, 23, 42, 0.35);

  /* Compatibility aliases used by the AECloud landing-page components. */
  --q2-text: var(--ae-text);
  --q2-text-strong: var(--ae-ink);
  --q2-text-muted: var(--ae-muted);
  --q2-border-ring: var(--ae-border);
  --q2-bg-elev: var(--ae-surface);
  --q2-bg-muted: var(--ae-surface-muted);
  --q2-radius-pill: 999px;
  --q2-shadow-card: var(--ae-shadow-sm);
  --q2-shadow-raised: var(--ae-shadow-md);
  --pico-font-family-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--ae-text);
  background: var(--ae-surface);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.72;
}

body,
button,
input,
select,
textarea {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ae-ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

a {
  color: var(--ae-primary-dark);
  text-underline-offset: 0.18em;
}

a:hover {
  color: #1e40af;
}

::selection {
  color: var(--ae-ink);
  background: #bfdbfe;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Sidebar and navigation */

#sidebar {
  z-index: 30;
  width: var(--ae-sidebar-width);
  color: var(--ae-text);
  border-right: 1px solid var(--ae-border);
  background: var(--ae-sidebar);
  box-shadow: 8px 0 32px -28px rgba(15, 23, 42, 0.5);
  font-size: 13.5px;
  font-weight: 500;
}

#header {
  padding: 1.4rem 1.15rem 0.9rem;
  color: var(--ae-ink);
  background: transparent;
  text-align: left;
}

#header a#logo {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  color: var(--ae-ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  flex: 0 0 2.45rem;
  width: 2.45rem;
  height: 2.45rem;
  color: #fff;
  border-radius: 0.72rem;
  background: linear-gradient(145deg, #2563eb, #0f4bb8);
  box-shadow: 0 10px 24px -14px rgba(37, 99, 235, 0.9);
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  place-items: center;
}

.brand-copy {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.brand-copy strong {
  color: var(--ae-ink);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.brand-copy small {
  margin-top: 0.2rem;
  color: var(--ae-muted);
  font-size: 0.68rem;
  font-weight: 550;
  letter-spacing: 0.02em;
}

.searchbox {
  position: relative;
  margin-top: 1.15rem;
  border: 1px solid var(--ae-border);
  border-radius: 0.7rem;
  background: var(--ae-surface);
  box-shadow: var(--ae-shadow-sm);
}

.searchbox:focus-within {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.searchbox label {
  top: 0.47rem;
  left: 0.72rem;
  color: #94a3b8;
}

.searchbox input,
.searchbox input[type="search"] {
  width: 100%;
  height: 2.35rem;
  margin: 0;
  padding: 0 2.25rem 0 2.2rem;
  color: var(--ae-ink);
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.76rem;
  font-weight: 500;
}

.searchbox input::placeholder {
  color: #94a3b8;
}

.searchbox button {
  position: absolute;
  top: 0.42rem;
  right: 0.45rem;
  display: none;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  color: #94a3b8;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.searchbox.has-value button {
  display: block;
}

.searchbox button:hover {
  color: var(--ae-ink);
  background: var(--ae-surface-muted);
}

.searchbox__empty {
  margin: 0;
  padding: 0.6rem 0.7rem;
  color: var(--ae-muted);
  border-top: 1px solid var(--ae-border);
  font-size: 0.7rem;
}

#sidebar .scrollbar-inner > .highlightable {
  padding: 0.4rem 0.8rem 2rem;
}

#sidebar ul.topics {
  margin: 0;
}

#sidebar ul.topics li.parent,
#sidebar ul.topics li.active,
#sidebar ul.topics > li.parent,
#sidebar ul.topics > li.active {
  margin-right: 0;
  margin-left: 0;
  padding-right: 0;
  padding-left: 0;
  background: transparent;
}

#sidebar ul li > a,
#sidebar ul.topics > li > a {
  margin: 0.12rem 0;
  padding: 0.58rem 0.68rem;
  color: #475569;
  border-radius: 0.58rem;
  font-size: 0.79rem;
  font-weight: 570;
  line-height: 1.35rem;
  text-decoration: none;
}

#sidebar ul.topics > li > a {
  color: #1e293b;
  font-size: 0.82rem;
  font-weight: 720;
}

#sidebar ul li > a:hover {
  color: var(--ae-ink);
  background: rgba(226, 232, 240, 0.68);
}

#sidebar ul li.active > a,
#sidebar ul li > a[aria-current="page"] {
  margin-right: 0;
  margin-left: 0;
  padding-right: 0.68rem;
  padding-left: 0.68rem;
  color: var(--ae-primary-dark) !important;
  background: #e7efff;
  box-shadow: inset 3px 0 0 var(--ae-primary);
  font-weight: 720;
}

#sidebar ul.topics ul {
  margin: 0.15rem 0 0.45rem 0.75rem;
  padding: 0 0 0 0.55rem;
  border-left: 1px solid #dbe3ef;
}

#sidebar ul.topics ul ul {
  margin-left: 0.55rem;
}

#sidebar ul li li {
  padding-left: 0;
  text-indent: 0;
}

#sidebar ul li a span {
  overflow: visible;
  white-space: normal;
}

#sidebar ul.topics.nav-filtering ul {
  display: block;
}

#footer {
  display: grid;
  gap: 0.28rem;
  margin: 1.5rem 0.2rem 0;
  padding: 1rem;
  color: var(--ae-muted);
  border: 1px solid var(--ae-border);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.68);
  font-size: 0.68rem;
}

#footer > span {
  color: var(--ae-ink);
  font-weight: 720;
}

#footer a {
  color: var(--ae-primary-dark);
  overflow-wrap: anywhere;
}

#footer small {
  margin-top: 0.25rem;
  color: var(--ae-muted);
  font-size: 0.62rem;
  line-height: 1.45;
}

/* Main documentation content */

#body {
  margin-left: var(--ae-sidebar-width);
  background: var(--ae-surface);
}

#body .padding {
  padding: clamp(2.25rem, 4vw, 4.25rem) clamp(2.5rem, 5vw, 6rem) 4rem;
}

.docs-content-layout {
  max-width: 900px;
  margin: 0 auto;
}

.docs-content-layout.has-page-toc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: clamp(2.5rem, 4vw, 4.5rem);
  max-width: 1180px;
  align-items: start;
}

#body-inner {
  min-width: 0;
  margin-bottom: 3rem;
}

.page-content > :first-child {
  margin-top: 0;
}

.page-content > h1 {
  max-width: 850px;
  margin: 0 0 1.2rem;
  color: var(--ae-ink);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 790;
  letter-spacing: -0.045em;
  line-height: 1.06;
  text-align: left;
}

.page-content > h1 + p {
  margin-top: 0;
  margin-bottom: 2.25rem;
  color: #526176;
  font-size: 1.07rem;
  line-height: 1.78;
}

.page-content > h2 {
  margin-top: 3.25rem;
  margin-bottom: 1rem;
  padding-top: 0.35rem;
  color: var(--ae-ink);
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  letter-spacing: -0.035em;
}

.page-content > h3 {
  margin-top: 2.35rem;
  margin-bottom: 0.75rem;
  color: #172033;
  font-size: clamp(1.18rem, 1.8vw, 1.4rem);
  letter-spacing: -0.025em;
}

.page-content > h4 {
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.page-content > :is(h2, h3, h4) {
  scroll-margin-top: 2rem;
}

.page-content p,
.page-content li {
  color: var(--ae-text);
}

.page-content p {
  margin: 0 0 1.15rem;
}

.page-content :is(ul, ol) {
  margin: 0.8rem 0 1.35rem;
  padding-left: 1.45rem;
}

.page-content li {
  margin: 0.35rem 0;
  padding-left: 0.18rem;
}

.page-content li::marker {
  color: var(--ae-primary);
}

.page-content a:not(.docs-button):not(.docs-guide-card) {
  font-weight: 570;
  text-decoration-color: rgba(37, 99, 235, 0.35);
}

.page-content a:not(.docs-button):not(.docs-guide-card):hover {
  text-decoration-color: currentColor;
}

.page-content hr {
  margin: 2.75rem 0;
  border: 0;
  border-bottom: 1px solid var(--ae-border);
}

.page-content blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.2rem;
  color: var(--ae-text);
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--ae-primary);
  border-radius: 0.7rem;
  background: var(--ae-primary-soft);
}

.page-content blockquote p {
  color: inherit;
  font-size: 0.92rem;
}

.page-content blockquote > :last-child {
  margin-bottom: 0;
}

.page-content code,
.page-content kbd,
.page-content pre,
.page-content samp {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.page-content code {
  color: #9f1239;
  border: 1px solid #fbcfe8;
  border-radius: 0.32rem;
  background: #fff1f2;
  font-size: 0.86em;
}

.page-content pre {
  overflow-x: auto;
  margin: 1.6rem 0;
  padding: 1.15rem 1.25rem;
  color: #dbeafe;
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  background: #0f172a;
  box-shadow: var(--ae-shadow-md);
  font-size: 0.83rem;
  line-height: 1.65;
}

.page-content pre code {
  color: inherit;
  border: 0;
  background: transparent;
  font-size: inherit;
}

.page-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--ae-border);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0.72rem;
  background: var(--ae-surface);
  box-shadow: var(--ae-shadow-sm);
}

.page-content th {
  padding: 0.72rem 0.85rem;
  color: var(--ae-ink);
  border-bottom: 1px solid var(--ae-border);
  background: var(--ae-surface-muted);
  font-size: 0.75rem;
  font-weight: 720;
  text-align: left;
}

.page-content td {
  padding: 0.72rem 0.85rem;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  font-size: 0.82rem;
  vertical-align: top;
}

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

.page-content img {
  max-width: 100%;
  border: 1px solid var(--ae-border);
  border-radius: 0.85rem;
  box-shadow: var(--ae-shadow-md);
}

/* On-page table of contents */

.page-toc {
  position: sticky;
  top: 2rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  padding-left: 1rem;
  border-left: 1px solid var(--ae-border);
}

.page-toc__title {
  margin: 0 0 0.75rem;
  color: var(--ae-ink);
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.page-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-toc li {
  margin: 0;
}

.page-toc a {
  display: block;
  padding: 0.34rem 0;
  color: var(--ae-muted);
  font-size: 0.7rem;
  line-height: 1.42;
  text-decoration: none;
  transition: color 140ms ease, transform 140ms ease;
}

.page-toc a:hover,
.page-toc a.is-active {
  color: var(--ae-primary-dark);
}

.page-toc a.is-active {
  font-weight: 700;
  transform: translateX(3px);
}

.page-toc__level-3 a {
  padding-left: 0.65rem;
  font-size: 0.66rem;
}

/* Mobile navigation trigger */

#sidebar-toggle {
  color: #fff;
  border-radius: 0.65rem;
  background: var(--ae-primary);
  box-shadow: 0 10px 24px -12px rgba(37, 99, 235, 0.75);
}

#sidebar-toggle:hover {
  color: #fff;
  background: var(--ae-primary-dark);
}

@media (max-width: 1399px) {
  .docs-content-layout.has-page-toc {
    display: block;
    max-width: 900px;
  }

  .page-toc {
    display: none;
  }
}

@media (max-width: 959px) {
  :root {
    --ae-sidebar-width: 264px;
  }

  #sidebar {
    width: var(--ae-sidebar-width);
  }

  #body {
    margin-left: var(--ae-sidebar-width);
  }

  #body .padding {
    padding: 2.5rem 2.4rem 3.5rem;
  }
}

@media (max-width: 767px) {
  #sidebar {
    left: calc(var(--ae-sidebar-width) * -1);
  }

  #body {
    width: 100%;
    margin-left: 0;
  }

  #body .padding {
    padding: 4.4rem 1.15rem 2.5rem;
  }

  #sidebar-toggle {
    position: fixed;
    z-index: 25;
    top: 0.85rem;
    left: 0.85rem;
    display: grid;
    width: 2.7rem;
    height: 2.7rem;
    place-items: center;
  }

  #sidebar-toggle .fa {
    font-size: 1rem;
  }

  .sidebar-hidden #sidebar {
    left: 0;
  }

  .sidebar-hidden #body {
    margin-left: 0;
    overflow: hidden;
  }

  .sidebar-hidden #overlay {
    position: fixed;
    z-index: 20;
    inset: 0 0 0 var(--ae-sidebar-width);
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
  }

  .page-content > h1 {
    font-size: clamp(2rem, 10vw, 2.75rem);
  }

  .page-content > h1 + p {
    font-size: 1rem;
  }
}

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

.navbar-brand .site-title {
  color: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .navbar-brand .site-title {
    font-size: 0.92rem;
  }
}

/* Documentation landing page */

.docs-home .docs-content-layout {
  max-width: 1360px;
}

.docs-home #body-inner {
  margin-bottom: 0;
}

.docs-home .content-item {
  overflow: visible;
}

.docs-landing {
  --docs-blue: #2563eb;
  --docs-blue-dark: #1d4ed8;
  --docs-ink: var(--q2-text-strong);
  --docs-muted: var(--q2-text-muted);
  display: grid;
  gap: clamp(4rem, 8vw, 7rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.docs-landing :is(h1, h2, h3, p) {
  margin-top: 0;
}

.docs-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  overflow: hidden;
  padding: clamp(2.25rem, 6vw, 5.5rem);
  border: 1px solid color-mix(in srgb, var(--docs-blue) 25%, transparent);
  border-radius: clamp(1.25rem, 3vw, 2rem);
  background:
    radial-gradient(circle at 88% 16%, rgba(56, 189, 248, 0.22), transparent 30%),
    radial-gradient(circle at 67% 95%, rgba(99, 102, 241, 0.2), transparent 35%),
    linear-gradient(135deg, #f8fbff 0%, #edf5ff 54%, #f5f3ff 100%);
  box-shadow: 0 24px 70px -38px rgba(30, 64, 175, 0.45);
}

.docs-hero::after {
  position: absolute;
  z-index: -1;
  right: -7rem;
  bottom: -9rem;
  width: 24rem;
  height: 24rem;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 50%;
  box-shadow:
    0 0 0 3rem rgba(37, 99, 235, 0.035),
    0 0 0 6rem rgba(37, 99, 235, 0.025);
  content: "";
}

.docs-eyebrow,
.docs-kicker {
  color: var(--docs-blue-dark);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.docs-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.42rem 0.72rem;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--q2-radius-pill);
  background: rgba(255, 255, 255, 0.7);
}

.docs-hero h1 {
  max-width: 780px;
  margin-bottom: 1.25rem;
  color: #102a56;
  font-size: clamp(2.5rem, 5.5vw, 5.1rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.docs-hero__lead {
  max-width: 700px;
  margin-bottom: 0;
  color: #425675;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.7;
}

.docs-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.docs-button {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.72rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.docs-button:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.docs-button--primary {
  color: #fff;
  background: #173f88;
  box-shadow: 0 10px 24px -14px rgba(23, 63, 136, 0.8);
}

.docs-button--primary:hover {
  color: #fff;
  background: #102f69;
}

.docs-button--secondary {
  color: #173f88;
  border-color: rgba(23, 63, 136, 0.18);
  background: rgba(255, 255, 255, 0.75);
}

.docs-button--secondary:hover {
  color: #102f69;
  background: #fff;
}

.docs-hero__summary {
  position: relative;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 20px 55px -34px rgba(30, 64, 175, 0.65);
  backdrop-filter: blur(14px);
}

.docs-summary__label {
  margin-bottom: 1.1rem;
  color: #425675;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.docs-summary__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.docs-summary__metrics div {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.45rem;
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.docs-summary__metrics strong {
  color: #173f88;
  font-family: var(--pico-font-family-display);
  font-size: 1.65rem;
  line-height: 1;
}

.docs-summary__metrics span {
  color: #536987;
  font-size: 0.68rem;
  line-height: 1.25;
}

.docs-summary__flow {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1.35rem;
  color: #40587a;
  font-size: 0.68rem;
  font-weight: 700;
}

.docs-summary__flow i {
  height: 1px;
  background: rgba(37, 99, 235, 0.3);
}

.docs-section {
  display: grid;
  gap: 2rem;
}

.docs-section--compact {
  gap: 1.5rem;
}

.docs-section__heading {
  display: flex;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
}

.docs-section__heading > p {
  max-width: 490px;
  margin-bottom: 0.2rem;
  color: var(--docs-muted);
  text-align: right;
}

.docs-kicker {
  margin-bottom: 0.5rem;
}

.docs-section h2,
.docs-assurance h2 {
  margin-bottom: 0;
  color: var(--docs-ink);
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  letter-spacing: -0.035em;
}

.docs-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.docs-guide-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 310px;
  overflow: hidden;
  padding: clamp(1.35rem, 2.5vw, 1.8rem);
  color: var(--q2-text);
  border: 1px solid var(--q2-border-ring);
  border-radius: 1.15rem;
  background: var(--q2-bg-elev);
  box-shadow: var(--q2-shadow-card);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.docs-guide-card--overview {
  --card-accent: #2563eb;
}

.docs-guide-card--merchant {
  --card-accent: #059669;
}

.docs-guide-card--api {
  --card-accent: #7c3aed;
}

.docs-guide-card--distributor {
  --card-accent: #d97706;
}

.docs-guide-card--reseller {
  --card-accent: #dc2626;
}

.docs-guide-card--customer {
  --card-accent: #0891b2;
}

.docs-guide-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--card-accent);
  content: "";
}

.docs-guide-card:hover {
  color: var(--q2-text);
  border-color: color-mix(in srgb, var(--card-accent) 35%, transparent);
  box-shadow: var(--q2-shadow-raised);
  text-decoration: none;
  transform: translateY(-5px);
}

.docs-guide-card--featured {
  grid-column: span 2;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--card-accent) 7%, var(--q2-bg-elev)), var(--q2-bg-elev) 68%);
}

.docs-guide-card__icon {
  display: inline-grid;
  width: 2.65rem;
  height: 2.65rem;
  margin-bottom: 1.55rem;
  color: #fff;
  border-radius: 0.75rem;
  background: var(--card-accent);
  box-shadow: 0 10px 22px -14px var(--card-accent);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  place-items: center;
}

.docs-guide-card__icon--wide {
  font-size: 0.67rem;
}

.docs-guide-card__role {
  margin-bottom: 0.55rem;
  color: var(--card-accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.docs-guide-card h3 {
  margin-bottom: 0.75rem;
  color: var(--docs-ink);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.025em;
}

.docs-guide-card p {
  margin-bottom: 1.5rem;
  color: var(--docs-muted);
  font-size: 0.91rem;
  line-height: 1.65;
}

.docs-guide-card__link {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: auto;
  color: var(--docs-ink);
  font-size: 0.82rem;
  font-weight: 760;
}

.docs-guide-card__link span {
  transition: transform 160ms ease;
}

.docs-guide-card:hover .docs-guide-card__link span {
  transform: translateX(4px);
}

.docs-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.docs-quick-grid a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  min-height: 74px;
  padding: 1rem 1.1rem;
  color: var(--q2-text);
  border: 1px solid var(--q2-border-ring);
  border-radius: 0.9rem;
  background: var(--q2-bg-elev);
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.docs-quick-grid a:hover {
  color: var(--q2-text);
  border-color: rgba(37, 99, 235, 0.28);
  background: color-mix(in srgb, var(--docs-blue) 4%, var(--q2-bg-elev));
  text-decoration: none;
  transform: translateY(-2px);
}

.docs-quick-grid span {
  color: var(--docs-blue);
  font-size: 0.68rem;
  font-weight: 850;
}

.docs-quick-grid strong {
  color: var(--docs-ink);
  font-size: 0.86rem;
  line-height: 1.35;
}

.docs-quick-grid i {
  color: var(--docs-muted);
  font-style: normal;
  transition: transform 160ms ease;
}

.docs-quick-grid a:hover i {
  transform: translateX(3px);
}

.docs-assurance {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px solid var(--q2-border-ring);
  border-radius: 1.25rem;
  background: var(--q2-bg-muted);
}

.docs-assurance h2 {
  margin-bottom: 0.8rem;
}

.docs-assurance p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--docs-muted);
}

.docs-assurance__support {
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem;
  border: 1px solid var(--q2-border-ring);
  border-radius: 0.9rem;
  background: var(--q2-bg-elev);
}

.docs-assurance__support > span {
  color: var(--docs-muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-assurance__support > a {
  width: fit-content;
  font-weight: 780;
}

.docs-assurance__support small {
  margin-top: 0.45rem;
  color: var(--docs-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.docs-landing a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--docs-blue) 45%, transparent);
  outline-offset: 3px;
}

:root[data-theme="dark"] .docs-hero {
  border-color: rgba(96, 165, 250, 0.2);
  background:
    radial-gradient(circle at 88% 16%, rgba(14, 165, 233, 0.18), transparent 30%),
    radial-gradient(circle at 67% 95%, rgba(99, 102, 241, 0.18), transparent 35%),
    linear-gradient(135deg, #101827 0%, #111c31 54%, #17152a 100%);
  box-shadow: 0 26px 75px -38px rgba(0, 0, 0, 0.9);
}

:root[data-theme="dark"] .docs-hero h1 {
  color: #f4f7ff;
}

:root[data-theme="dark"] .docs-hero__lead,
:root[data-theme="dark"] .docs-summary__label,
:root[data-theme="dark"] .docs-summary__metrics span,
:root[data-theme="dark"] .docs-summary__flow {
  color: #b5c3da;
}

:root[data-theme="dark"] .docs-eyebrow {
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.25);
  background: rgba(15, 23, 42, 0.58);
}

:root[data-theme="dark"] .docs-hero__summary,
:root[data-theme="dark"] .docs-summary__metrics div {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.6);
}

:root[data-theme="dark"] .docs-summary__metrics strong {
  color: #93c5fd;
}

:root[data-theme="dark"] .docs-button--secondary {
  color: #dbeafe;
  border-color: rgba(147, 197, 253, 0.24);
  background: rgba(15, 23, 42, 0.58);
}

:root[data-theme="dark"] .docs-button--secondary:hover {
  color: #fff;
  background: rgba(30, 41, 59, 0.9);
}

:root[data-theme="dark"] .docs-eyebrow,
:root[data-theme="dark"] .docs-kicker {
  color: #93c5fd;
}

@media (max-width: 980px) {
  .docs-hero,
  .docs-assurance {
    grid-template-columns: 1fr;
  }

  .docs-hero__summary {
    max-width: 620px;
  }

  .docs-guide-grid,
  .docs-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .docs-landing {
    gap: 4rem;
  }

  .docs-hero {
    padding: 1.65rem;
    border-radius: 1.2rem;
  }

  .docs-hero h1 {
    font-size: clamp(2.35rem, 13vw, 3.5rem);
  }

  .docs-hero__actions,
  .docs-section__heading {
    align-items: stretch;
    flex-direction: column;
  }

  .docs-button {
    width: 100%;
  }

  .docs-section__heading > p {
    text-align: left;
  }

  .docs-guide-grid,
  .docs-quick-grid {
    grid-template-columns: 1fr;
  }

  .docs-guide-card--featured {
    grid-column: auto;
  }

  .docs-guide-card {
    min-height: 0;
  }

  .docs-summary__flow {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    text-align: center;
  }

  .docs-summary__flow i {
    width: 1px;
    height: 13px;
    margin: 0 auto;
  }

  .docs-assurance {
    padding: 1.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-landing *,
  .docs-landing *::before,
  .docs-landing *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
  }
}
