/* The ARIA frame for pages that do not draw their own: sidebar rail (computer), tab bar and More sheet (phone).
   Matches the sidebar and tab bar on Home, Library and Exam Studio. */
:root { --as-bg: #ffffff; --as-rail: #f6f6f7; --as-line: rgba(15, 23, 42, 0.08); --as-text: #111111; --as-text-2: #3f3f46; --as-text-3: #71717a; --as-soft: rgba(17, 17, 17, 0.06); --as-on: #111111; --as-on-text: #ffffff; }
html[data-theme="dark"] { --as-bg: #0b0b0e; --as-rail: #131316; --as-line: rgba(255, 255, 255, 0.08); --as-text: #f4f4f5; --as-text-2: #d4d4d8; --as-text-3: #a1a1aa; --as-soft: rgba(255, 255, 255, 0.07); --as-on: #ffffff; --as-on-text: #111111; }

#aria-rail, #aria-tabbar, #aria-more { font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
#aria-rail .material-symbols-outlined, #aria-tabbar .material-symbols-outlined, #aria-more .material-symbols-outlined { font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr; -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; overflow: hidden; }

/* ---------- Rail ---------- */
#aria-rail { display: none; }
@media (min-width: 900px) {
  #aria-rail { position: fixed; z-index: 40; top: 12px; bottom: 12px; left: 12px; width: 244px; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; border: 1px solid var(--as-line); border-radius: 24px; background: var(--as-rail); overflow-y: auto; }
  html.has-aria-rail body { padding-left: 268px !important; }
  /* The rail has Home, so the page's own back link is not needed on a computer. */
  html.has-aria-rail .set-back, html.has-aria-rail .sr-back, html.has-aria-rail .bd-top a.back, html.has-aria-rail .top a.back { visibility: hidden; }
}
#aria-rail .ar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 10px; color: var(--as-text); text-decoration: none; }
#aria-rail .ar-brand img { border-radius: 10px; }
#aria-rail .ar-brand span { display: flex; flex-direction: column; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; line-height: 1.1; }
#aria-rail .ar-brand small { font-weight: 500; font-size: 12px; color: var(--as-text-3); letter-spacing: 0; }
#aria-rail nav { flex: 1; }
.ar-group { margin: 0; padding: 14px 12px 6px; font: 500 11px 'Geist Mono', ui-monospace, monospace; letter-spacing: 0.12em; text-transform: uppercase; color: var(--as-text-3); }
.ar-link { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 14px; color: var(--as-text-2); font-size: 14.5px; font-weight: 500; text-decoration: none; transition: background-color 0.2s, color 0.2s; }
.ar-link .material-symbols-outlined { font-size: 21px; color: var(--ic, currentColor); transition: transform 0.3s cubic-bezier(.34, 1.56, .64, 1); }
.ar-link:hover { background: var(--as-soft); color: var(--as-text); }
.ar-link:hover .material-symbols-outlined { transform: scale(1.1) rotate(-6deg); }
.ar-link.is-on { background: var(--as-on); color: var(--as-on-text); font-weight: 600; }
.ar-link.is-on .material-symbols-outlined { color: var(--as-on-text); font-variation-settings: 'FILL' 1; }
.ar-link:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
#aria-rail .ar-me { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 12px 6px 4px; border-top: 1px solid var(--as-line); color: var(--as-text); text-decoration: none; }
#aria-rail .ar-me > span:last-child { display: flex; flex-direction: column; min-width: 0; }
#aria-rail .ar-me b { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#aria-rail .ar-me small { font-size: 12px; color: var(--as-text-3); }
#aria-rail .ar-avatar { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--as-on); color: var(--as-on-text); font-weight: 700; font-size: 14px; }

/* ---------- Tab bar (same as the shared one on Library and Exam Studio) ---------- */
#aria-tabbar { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 50; display: flex; justify-content: space-around; align-items: center; max-width: 460px; height: 64px; margin: 0 auto; padding: 0 6px; border-radius: 26px; background: rgba(255, 255, 255, 0.97); border: 1px solid rgba(15, 23, 42, 0.06); box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05), 0 18px 44px rgba(15, 23, 42, 0.14); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); }
html[data-theme="dark"] #aria-tabbar { background: rgba(22, 22, 26, 0.96); border-color: rgba(255, 255, 255, 0.08); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5); }
#aria-tabbar a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border-radius: 18px; color: #64748b; font-size: 12px; font-weight: 600; text-decoration: none; -webkit-tap-highlight-color: transparent; }
html[data-theme="dark"] #aria-tabbar a { color: #a1a1aa; }
#aria-tabbar a .material-symbols-outlined { font-size: 24px; }
#aria-tabbar a.is-on { color: #111111; background: rgba(17, 17, 17, 0.07); }
html[data-theme="dark"] #aria-tabbar a.is-on { color: #ffffff; background: rgba(255, 255, 255, 0.08); }
#aria-tabbar .at-ask { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #111111; }
#aria-tabbar .at-ask .material-symbols-outlined { font-size: 19px; color: #ffffff; }
html[data-theme="dark"] #aria-tabbar .at-ask { background: #ffffff; }
html[data-theme="dark"] #aria-tabbar .at-ask .material-symbols-outlined { color: #111111; }
#aria-tabbar a.at-ask-tab { color: var(--as-text); }
html.has-aria-tabbar body { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important; }
@media (min-width: 768px) { #aria-tabbar { display: none; } html.has-aria-tabbar body { padding-bottom: 0 !important; } }

/* ---------- More sheet ---------- */
#aria-more { position: fixed; inset: 0; z-index: 9999; }
#aria-more[hidden] { display: none; }
#aria-more .am-back { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.42); opacity: 0; transition: opacity 0.22s ease; }
#aria-more .am-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 82vh; overflow-y: auto; padding: 8px 14px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 26px 26px 0 0; background: var(--as-bg); color: var(--as-text); box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.2); transform: translateY(100%); transition: transform 0.28s cubic-bezier(.2, .8, .2, 1); }
#aria-more .am-grip { width: 40px; height: 5px; margin: 6px auto 4px; border-radius: 99px; background: var(--as-line); }
#aria-more.is-open .am-back { opacity: 1; }
#aria-more.is-open .am-panel { transform: none; }
@media (min-width: 768px) { #aria-more .am-panel { left: 50%; right: auto; bottom: 50%; width: 380px; border-radius: 24px; transform: translate(-50%, 60%); opacity: 0; transition: transform 0.25s ease, opacity 0.2s; } #aria-more.is-open .am-panel { transform: translate(-50%, 50%); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #aria-more .am-back, #aria-more .am-panel, .ar-link .material-symbols-outlined { transition: none; } }
