:root {
  --reference-ink: #122235;
  --reference-muted: #637080;
  --reference-purple: #7442ce;
  --reference-line: rgba(111, 70, 193, .14);
}

body.avola-reference {
  color: var(--reference-ink);
  background:
    radial-gradient(ellipse at 6% 0%, rgba(118, 87, 255, .07), transparent 34rem),
    radial-gradient(ellipse at 100% 12%, rgba(196, 73, 234, .05), transparent 30rem),
    #fbfcfa;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.avola-reference .wrap,
.avola-reference .page { width: min(1180px, calc(100% - 40px)); padding: 28px 0 64px; }
.avola-reference p,
.avola-reference li { color: var(--reference-muted); line-height: 1.7; }
.avola-reference a { color: #683ab5; text-underline-offset: 3px; }
.avola-reference a:focus-visible { outline: 3px solid #aa8ae3; outline-offset: 4px; }
.avola-reference h1,
.avola-reference h2,
.avola-reference h3 { color: #251641; letter-spacing: -.035em; }
.avola-reference h1 { line-height: 1.08; }
.avola-reference .button {
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  color: #fff !important;
  background: linear-gradient(115deg, #7657ff, #c449ea 56%, #f09b58);
  box-shadow: 0 12px 28px rgba(116, 66, 206, .16);
  font-weight: 750;
}
.avola-reference .button:hover { filter: brightness(1.06); }

.avola-reference .reference-nav,
.avola-facts .page > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  min-height: 64px;
  margin-bottom: 24px;
  padding: 10px 20px;
  border: 1px solid var(--reference-line);
  border-radius: 28px;
  background: linear-gradient(110deg, rgba(255, 255, 255, .94), rgba(250, 248, 255, .9));
  box-shadow: 0 14px 34px rgba(52, 31, 92, .06);
}
.avola-reference .reference-brand,
.avola-reference .brand.reference-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  color: #251641;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 400;
  text-decoration: none;
}
.reference-brand img { display: block; width: 29px; height: 29px; }
.avola-reference .reference-brand::before { content: none; display: none; }
.avola-reference .reference-nav > span { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; }
.avola-reference .reference-nav > span a { padding: 8px 12px; border-radius: 12px; text-decoration: none; }
.avola-reference .reference-nav > span a:hover { background: #eee8ff; }

.avola-api-docs .hero {
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid rgba(129, 91, 201, .32);
  border-radius: 28px;
  background: radial-gradient(ellipse at 92% 0%, rgba(118, 87, 255, .28), transparent 58%), linear-gradient(135deg, #090817, #15112d);
  box-shadow: 0 24px 60px rgba(42, 23, 77, .14);
}
.avola-api-docs .hero small { color: #d5b659; font-size: 12px; font-weight: 750; letter-spacing: .08em; }
.avola-api-docs .hero h1 { max-width: 900px; margin: 14px 0; color: #fff; font-size: clamp(30px, 4.4vw, 52px); }
.avola-api-docs .hero p { max-width: 850px; color: #c8c1d7; }
.avola-api-docs .endpoint {
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(179, 152, 229, .26);
  border-radius: 12px;
  color: #e8deff;
  background: rgba(116, 66, 206, .18);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.avola-api-docs .hero .example-note {
  margin: 18px 0 0;
  padding: 12px 15px;
  border: 1px solid rgba(179, 152, 229, .18);
  border-radius: 14px;
  color: #c8c1d7;
  background: rgba(255, 255, 255, .045);
  font-size: 13px;
}
.avola-api-docs .grid { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
.avola-api-docs .card,
.avola-facts .card,
.avola-facts .cta,
.avola-facts .links {
  border: 1px solid var(--reference-line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 36px rgba(40, 23, 77, .045);
}
.avola-api-docs .side { position: sticky; top: 20px; padding: 17px 15px; }
.avola-api-docs .side a { padding: 10px 12px; border-radius: 12px; color: #534463; font-size: 14px; }
.avola-api-docs .side a:hover { color: #683ab5; background: #f4f0ff; }
.avola-api-docs .content { padding: 30px; }
.avola-api-docs .content section { scroll-margin-top: 24px; border-color: var(--reference-line); }
.avola-api-docs table { table-layout: fixed; font-size: 14px; }
.avola-api-docs th,
.avola-api-docs td { border-color: var(--reference-line); overflow-wrap: anywhere; }
.avola-api-docs th:first-child,
.avola-api-docs td:first-child { width: 125px; }
.avola-api-docs th { color: #534463; background: #faf8ff; }
.avola-api-docs pre { color: #e8deff; background: #15112d; font-size: 13px; border: 1px solid rgba(116, 66, 206, .13); border-radius: 16px; }
.avola-api-docs .warning { padding: 14px 16px; color: #534463; border: 1px solid var(--reference-line); border-left: 3px solid #9b77d8; border-radius: 14px; background: #f8f5ff; }
.avola-facts main { padding-top: 24px; }
.avola-facts h1 { font-size: clamp(34px, 5vw, 58px); }
.avola-facts .eyebrow { color: #7b3fd1; }
.avola-facts .card h2 { font-size: 23px; line-height: 1.2; }
.avola-facts .top-links { color: #534463; }
.avola-facts footer { color: var(--reference-muted); border-color: var(--reference-line); }

@media (max-width: 760px) {
  .avola-reference .wrap,
  .avola-reference .page { width: calc(100% - 28px); padding-top: 16px; }
  .avola-reference .reference-nav,
  .avola-facts .page > header { padding: 12px 15px; border-radius: 22px; }
  .avola-reference .reference-nav > span { gap: 4px; font-size: 12px; }
  .avola-reference .reference-nav > span a { padding: 6px 8px; }
  .avola-api-docs .grid { grid-template-columns: minmax(0, 1fr); }
  .avola-api-docs .content { padding: 21px; }
  .avola-api-docs .hero { border-radius: 24px; padding: 25px 22px; }
  .avola-api-docs .hero .example-note { font-size: 12px; }
  .avola-api-docs td:first-child,
  .avola-api-docs th:first-child { width: 98px; }
  .avola-facts .top-links { width: 100%; margin-left: 0; gap: 12px; font-size: 13px; }
  .avola-facts .page > header { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
  .avola-facts .page > header .reference-brand { grid-column: 1; grid-row: 1; justify-self: start; }
  .avola-facts .page > header .top-links { grid-column: 1 / -1; grid-row: 2; }
  .avola-facts .page > header > .button { grid-column: 2; grid-row: 1; width: auto; padding: 8px 13px; min-height: 38px; font-size: 13px; justify-self: end; }
}
