/* athorion — shared responsive + motion layer for every page (landing, platform, pricing,
   api docs, legal pages, login, console app./dash.).
   Class / attribute based on purpose: the dc runtime renders through React, which
   re-serialises inline styles, so [style*="..."] selectors never match. !important here
   beats the inline styles. */

:root { --ae-logo-h: 24px; --ae-ease: cubic-bezier(.22, 1, .36, 1); }

/* ------------------------------------------------------------------ motion primitives */
@keyframes aeMenuDrop { from { opacity: 0; transform: translateY(-10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes aeItemIn   { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes aeDrawerIn { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes aeFadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes aeScreenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ unified logo */
img.ae-logo { width: auto !important; }
@media (max-width: 920px) { img.ae-logo { height: var(--ae-logo-h) !important; } }

/* ------------------------------------------------------------------ public site header */
@media (max-width: 920px) {
  .ae-burger { display: block !important; }
  .ae-hdr { padding: 10px 16px !important; gap: 12px !important; justify-content: flex-start !important; }
  .ae-hdr > a[aria-label="athorion"] { margin-right: auto !important; }
  .ae-hdr-nav, .ae-hdr-cta { display: none !important; }
}
@media (max-width: 400px) { .ae-hdr-term { display: none !important; } }

/* burger: ☰ morphs into ✕, the panel drops in, links cascade */
.ae-burger > summary { position: relative; font-size: 0 !important; transition: border-color .2s, background-color .2s; }
.ae-burger > summary::before {
  content: "☰"; font-size: 18px; line-height: 1; color: #f2efe9;
  display: inline-block; transition: transform .3s var(--ae-ease);
}
.ae-burger[open] > summary { border-color: #ff6a1a !important; background: rgba(255, 106, 26, .12) !important; }
.ae-burger[open] > summary::before { content: "✕"; font-size: 16px; transform: rotate(90deg); }
.ae-burger > div { display: flex; flex-direction: column; }
@media (prefers-reduced-motion: no-preference) {
  .ae-burger[open] > div { animation: aeMenuDrop .28s var(--ae-ease) both; transform-origin: top left; }
  .ae-burger[open] > div > a { animation: aeItemIn .34s var(--ae-ease) both; transition: background-color .15s, padding-left .2s; }
  .ae-burger[open] > div > a:nth-child(1) { animation-delay: .04s; }
  .ae-burger[open] > div > a:nth-child(2) { animation-delay: .07s; }
  .ae-burger[open] > div > a:nth-child(3) { animation-delay: .10s; }
  .ae-burger[open] > div > a:nth-child(4) { animation-delay: .13s; }
  .ae-burger[open] > div > a:nth-child(5) { animation-delay: .16s; }
  .ae-burger[open] > div > a:nth-child(6) { animation-delay: .19s; }
  .ae-burger[open] > div > a:nth-child(7) { animation-delay: .22s; }
  .ae-burger[open] > div > a:nth-child(8) { animation-delay: .25s; }
}
.ae-burger > div > a:active { background: rgba(255, 106, 26, .1); }

/* trust-seal pill: icon-only on phones so it never sits on top of content */
@media (max-width: 760px) {
  .ae-seal-pill { font-size: 0 !important; gap: 0 !important; width: 40px !important; padding: 0 !important; justify-content: center !important; }
  .ae-seal-pill > * { font-size: 11px; }
  .ae-seal-pill > span:not(:first-child) { display: none !important; }
}

/* ------------------------------------------------------------------ legal + docs pages */
@media (max-width: 760px) {
  .ae-doc { padding-left: 16px !important; padding-right: 16px !important; }
  .ae-doc pre, .ae-doc code { white-space: pre-wrap !important; word-break: break-word !important; }
  .ae-doc table { display: block; overflow-x: auto; max-width: 100%; }
  .ae-scrollx { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100% !important; }
  .ae-stack { grid-template-columns: minmax(0, 1fr) !important; }
  .ae-stack-flex { flex-direction: column !important; align-items: stretch !important; }
}

/* ------------------------------------------------------------------ console (app. + dash.) */
@media (prefers-reduced-motion: no-preference) {
  /* every screen eases in when it mounts */
  [data-screen-label] { animation: aeScreenIn .32s var(--ae-ease) both; }
  .ae-navbtn { transition: background-color .15s, color .15s, box-shadow .2s, padding-left .2s; }
  .ae-navbtn:active { background: #161412 !important; }
  .ae-iconbtn { transition: border-color .15s, background-color .15s, transform .12s; }
  .ae-iconbtn:active { transform: scale(.94); }
}
@media (max-width: 899px) {
  .ae-top { gap: 6px !important; padding: 0 10px !important; }
  .ae-top img.ae-logo { height: var(--ae-logo-h) !important; }
  /* search collapses to an icon button next to the actions */
  .ae-cmdbtn { flex: none !important; width: 38px !important; height: 38px !important; padding: 0 !important; margin: 0 0 0 auto !important; justify-content: center !important; }
  .ae-cmdbtn .ae-cmdtxt, .ae-cmdbtn .ae-kbd { display: none !important; }
  .ae-acct { padding: 0 4px !important; gap: 0 !important; }
  .ae-acct .ae-caret { display: none !important; }
  #aeth-lang-toggle { width: 38px !important; padding: 0 !important; margin-right: 0 !important; flex: none; }
  .ae-actions { gap: 6px !important; }
  /* the drawer slides in from the left over a fading backdrop */
  .ae-side { box-shadow: 18px 0 48px rgba(0, 0, 0, .65); }
  .ae-side .ae-navbtn { padding-top: 12px !important; padding-bottom: 12px !important; font-size: 15px !important; }
  .ae-main-pad { padding-top: 20px !important; padding-bottom: 56px !important; }
  .ae-menu { right: 10px !important; width: min(280px, calc(100vw - 20px)) !important; }
}
@media (max-width: 899px) and (prefers-reduced-motion: no-preference) {
  .ae-side { animation: aeDrawerIn .3s var(--ae-ease) both !important; }
  .ae-side .ae-navbtn { animation: aeItemIn .34s var(--ae-ease) both; }
  .ae-side .ae-navbtn:nth-of-type(1)  { animation-delay: .05s; }
  .ae-side .ae-navbtn:nth-of-type(2)  { animation-delay: .07s; }
  .ae-side .ae-navbtn:nth-of-type(3)  { animation-delay: .09s; }
  .ae-side .ae-navbtn:nth-of-type(4)  { animation-delay: .11s; }
  .ae-side .ae-navbtn:nth-of-type(5)  { animation-delay: .13s; }
  .ae-side .ae-navbtn:nth-of-type(6)  { animation-delay: .15s; }
  .ae-side .ae-navbtn:nth-of-type(7)  { animation-delay: .17s; }
  .ae-side .ae-navbtn:nth-of-type(8)  { animation-delay: .19s; }
  .ae-side .ae-navbtn:nth-of-type(9)  { animation-delay: .21s; }
  .ae-side .ae-navbtn:nth-of-type(10) { animation-delay: .23s; }
  .ae-side .ae-navbtn:nth-of-type(11) { animation-delay: .25s; }
  .ae-side .ae-navbtn:nth-of-type(12) { animation-delay: .27s; }
  .ae-side .ae-navbtn:nth-of-type(13) { animation-delay: .29s; }
}
@media (max-width: 480px) {
  .ae-apptag { display: none !important; }
  /* page headers: title block and action buttons stack */
  [data-screen-label] h1 { font-size: 28px !important; }
}

/* ------------------------------------------------------------------ API reference */
@media (max-width: 900px) {
  .ae-apigrid { grid-template-columns: minmax(0, 1fr) !important; gap: 0 !important; padding: 0 16px !important; }
  /* sidebar becomes a sticky, swipeable chip bar under the header */
  .ae-apinav {
    position: sticky !important; top: 60px !important; z-index: 20; max-height: none !important;
    display: flex !important; gap: 6px; overflow-x: auto !important; overflow-y: hidden !important;
    padding: 10px 0 !important; margin: 0 -16px; padding-left: 16px !important; padding-right: 16px !important;
    border-right: 0 !important; border-bottom: 1px solid #1a1917; box-shadow: none !important;
    background: rgba(0, 0, 0, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .ae-apinav::-webkit-scrollbar { display: none; }
  .ae-apinav > div:nth-child(odd) { display: none !important; }
  .ae-apinav > div:nth-child(even) { display: contents !important; }
  .ae-apinav a { flex: none; white-space: nowrap; border: 1px solid #2a2825; padding: 8px 11px !important; font-size: 12px; transition: border-color .15s, background-color .15s; }
  .ae-apinav a:active { border-color: #ff6a1a; background: rgba(255, 106, 26, .1); }
  .ae-apimain { padding-top: 28px !important; }
  .ae-apimain h1 { font-size: clamp(36px, 11vw, 52px) !important; }
  .ae-apimain h2 { font-size: 26px !important; }
  .ae-apimain section { scroll-margin-top: 120px; }
  .ae-code { white-space: pre !important; word-break: normal !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch; font-size: 12px !important; }
}
