/* Google Fonts are loaded via <link> in index.html (faster than @import). */

/* ===================================================================
   Design Tokens & Variable Configuration
   =================================================================== */
:root {
  /* Brand Palettes */
  --navy: #000E2F;
  --uconn-blue: #000e2f;
  --electric-blue: #0066ff;
  --cyan: #00f2fe;
  --violet: #7c3aed;
  --magenta: #ff5fb7;
  --orange: #ff7e5f;
  --gold: #ffd166;

  /* Theme Defaults (Dark Editorial Theme) */
  --bg: #030712;
  --bg-2: #070d1e;
  --bg-elev: rgba(13, 22, 46, 0.45);
  --glass: var(--glass-bg);
  --glass-strong: var(--glass-bg-strong);
  --text: #cbd5e1;
  --text-strong: #ffffff;
  --muted: #94a3b8;
  --muted-2: #718096;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --accent: var(--orange);
  --accent-2: var(--electric-blue);
  --accent-3: var(--cyan);

  /* Layout and Architecture */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
  --shadow-sm: 0 8px 24px -8px rgba(0, 0, 0, 0.4);
  --glow: 0 0 32px rgba(0, 102, 255, 0.15), 0 0 64px rgba(124, 58, 237, 0.1);
  --ring: 0 0 0 3px rgba(0, 242, 254, 0.25), 0 12px 30px rgba(0, 102, 255, 0.15);
  --speed: 0.25s;
  --speed-slow: 0.6s;
  --gap: clamp(16px, 2.2vw, 28px);

  /* CliftonStrengths Domain Colors */
  --purple: var(--violet);
  --purple-light: rgba(124, 58, 237, 0.1);
  --blue: var(--electric-blue);
  --green: #10b981;
  --card-bg: rgba(13, 22, 46, 0.3);
  --spacing: 1.25rem;
}

/* ===================================================================
   Light Mode Overrides
   =================================================================== */
body.light {
  --cyan: #1f67a8;
  --bg: #f1f5f9;
  --bg-2: #e2e8f0;
  --bg-elev: #ffffff;
  --glass: var(--glass-bg);
  --glass-strong: var(--glass-bg-strong);
  --text: #1e293b;
  --text-strong: #020617;
  --muted: #475569;
  --muted-2: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --line-strong: rgba(15, 23, 42, 0.15);
  --shadow: 0 12px 40px -10px rgba(15, 23, 42, 0.08), inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
  --shadow-sm: 0 6px 18px -6px rgba(15, 23, 42, 0.06);
  --ring: 0 0 0 3px rgba(0, 102, 255, 0.15), 0 12px 30px rgba(15, 23, 42, 0.08);
}

body.light ::selection {
  color: #ffffff;
}

/* A plain background is truly solid, including the page's texture overlay. */
body[data-background="none"] { --bg: #000000; }
body.light[data-background="none"] { --bg: #ffffff; }
html:has(body[data-background="none"]) { background: #000000; }
html:has(body.light[data-background="none"]) { background: #ffffff; }
body[data-background="none"] .site-background,
body[data-background="none"] .noise-overlay { display: none; }

/* ===================================================================
   Reset & Base Styles
   =================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
  position: relative;
  transition: background var(--speed) ease, color var(--speed) ease;
}

a {
  color: inherit;
  transition: color var(--speed) ease;
}

::selection {
  color: #030712;
  background: var(--cyan);
}

/* ===================================================================
   Spectacular Background Glows & Texture
   =================================================================== */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.018; /* Let background detail, not global grain, describe the glass. */
  mix-blend-mode: overlay;
}

/* ===================================================================
   Grid Layout Architecture
   =================================================================== */
.container {
  position: relative;
  z-index: 1;
  width: min(100%, 1400px);
  margin: auto;
  padding: var(--gap);
  display: grid;
  grid-template-columns: minmax(300px, 370px) minmax(0, 1fr);
  grid-template-areas:
    "hero main"
    "side main";
  grid-template-rows: auto 1fr;
  gap: var(--gap);
  align-items: start;
}

/* When "More about me" is open on desktop, the hero spans both columns */
.container.about-open {
  grid-template-areas:
    "hero hero"
    "side main";
}

.container > .hero {
  grid-area: hero;
}

main {
  grid-area: main;
  display: grid;
  gap: var(--gap);
  align-content: start;
}

aside {
  grid-area: side;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  position: sticky;
  top: var(--gap);
}

/* ===================================================================
   Bento Cards & Glassmorphism
   =================================================================== */
/* Card geometry is independent of its material; see refractive-glass below. */
.card {
  position: relative;
  overflow: clip;
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
}

/* ===================================================================
   Hero & Profile Section
   =================================================================== */
.hero {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  padding: clamp(24px, 5cqw, 36px);
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.hero-contact .link {
  gap: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.hero-contact .link-icon {
  width: 14px;
  height: 14px;
}

.avatar {
  flex-shrink: 0;
  width: 108px;
  height: 108px;
  border-radius: 24px;
  padding: 3px;
  background: conic-gradient(from 180deg, var(--orange), var(--magenta), var(--electric-blue), var(--cyan), var(--orange));
  box-shadow: 0 8px 30px rgba(0, 102, 255, 0.2);
  transition: transform var(--speed) cubic-bezier(0.2, 0.8, 0.2, 1);
}

.avatar:hover {
  transform: rotate(3deg) scale(1.05);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 21px;
  display: block;
  object-fit: cover;
}

.hgroup h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2.3rem, 5cqw, 3.4rem);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  line-height: 0.95;
  font-weight: 700;
  color: var(--text-strong);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hgroup p {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.45;
  margin: 0;
  font-weight: 400;
}

.hero .info-card {
  margin-top: 14px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  width: 100%;
  border-radius: var(--radius-sm);
}

.hero-strengths {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  width: 100%;
}

.hero-strengths__bar {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-pill);
  display: flex;
  height: 8px;
  overflow: hidden;
  width: 100%;
}

.hero-strengths__bar span {
  flex: var(--domain-weight, 1) 1 0;
  min-width: 2px;
}

.hero-strengths__bar .green { background: var(--green); }
.hero-strengths__bar .blue { background: var(--blue); }
.hero-strengths__bar .purple { background: var(--purple); }
.hero-strengths__bar .orange { background: var(--orange); }

.hero-strengths__button {
  width: 100%;
}

.container.about-open .hero {
  align-items: center;
}

.container.about-open .hero-top {
  justify-content: center;
  width: 100%;
}

.container.about-open .hgroup {
  align-items: center;
  display: flex;
  flex-direction: column;
  max-width: 760px;
  text-align: center;
  width: 100%;
}

.container.about-open .about-intro__copy {
  max-width: none;
}

/* ===================================================================
   Interactive Buttons
   =================================================================== */
.btn {
  border: 1px solid var(--line-strong);
  color: var(--text-strong);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  flex: 1 1 auto;
}

/* ===================================================================
   Chips / Badge Elements
   =================================================================== */
.chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  color: var(--cyan);
  border: 1px solid rgba(0, 242, 254, 0.2);
  width: fit-content;
}

body:not(.light) .chip {
  color: var(--orange);
}

/* ===================================================================
   Bento Info Cards (Aside Panel)
   =================================================================== */
.info-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-card .title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-strong);
}

.info-note {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.info-pair {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ===================================================================
   UConn Law Events List
   =================================================================== */
[aria-label="UConn Law Events"].info-card {
  gap: 16px;
}

#eventsList {
  display: grid;
  gap: 12px;
  margin-top: 0 !important;
}

#eventsList > div {
  position: relative;
  padding: 14px 14px 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.01);
  transition: all var(--speed) cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}

#eventsList > div::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--orange), var(--violet));
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
}

#eventsList > div:hover,
#eventsList > div:focus-within {
  transform: translateY(-2px);
  border-color: var(--cyan);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow-sm);
}

#eventsList a {
  display: block;
  color: var(--text-strong);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

#eventsList a:hover,
#eventsList a:focus-visible {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#eventsList .info-note {
  font-size: 0.78rem;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}

/* ===================================================================
   Tabs Panel Deck
   =================================================================== */
.tabs {
  container-type: inline-size;
  padding: var(--gap);
}

.tablist {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.tablist::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 1 1 auto;
  text-align: center;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: calc(var(--radius-sm) - 4px);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
}

.tab:hover {
  color: var(--text-strong);
}

.tab[aria-selected="true"] {
  color: var(--text-strong);
}

@container (max-width: 620px) {
  .tablist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .tab {
    min-height: 44px;
    white-space: normal;
    width: 100%;
  }

  .tab:last-of-type:nth-of-type(odd) {
    grid-column: 1 / -1;
  }
}

.tabpanel {
  display: none;
  animation: tabFadeIn var(--speed) ease;
}

.tabpanel.active {
  display: block;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.embed {
  width: 100%;
  height: min(68vh, 800px);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  box-shadow: var(--shadow-sm);
}

/* ===================================================================
   Widget & Section Headers
   =================================================================== */
.widget {
  container-type: inline-size;
  padding: var(--gap);
}

.widget h2,
.section-head h2 {
  margin: 0 0 16px 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.2rem, 3cqw, 1.5rem);
  color: var(--text-strong);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hero-about {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  width: 100%;
}

.hero-about h2 {
  margin: 0 0 10px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}

.about-intro__copy {
  color: var(--text);
  font-size: clamp(0.9rem, 2cqw, 1.05rem);
  line-height: 1.7;
  margin: 0;
  max-width: 72ch;
}

.about-more {
  border-top: 1px solid var(--line);
  margin-top: clamp(20px, 4cqw, 32px);
}

.about-more__summary {
  align-items: center;
  color: var(--text-strong);
  cursor: pointer;
  display: flex;
  font-size: .92rem;
  font-weight: 700;
  gap: 1rem;
  justify-content: space-between;
  list-style: none;
  padding: 18px 2px 0;
  user-select: none;
}

.about-more__summary::-webkit-details-marker {
  display: none;
}

.about-more__summary:hover {
  color: var(--cyan);
}

.about-more__icon {
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  flex: 0 0 auto;
  height: 10px;
  margin: 0 5px 5px 0;
  transform: rotate(45deg);
  transition: transform var(--speed) ease;
  width: 10px;
}

.about-more[open] .about-more__icon {
  margin-bottom: -5px;
  transform: rotate(225deg);
}

/* On desktop the panel opens rightward across the page, so the closed
   chevron points right instead of down */
@media (min-width: 981px) {
  .about-more:not([open]) .about-more__icon {
    margin: 0 2px 2px 0;
    transform: rotate(-45deg);
  }
}

.about-more__content {
  animation: aboutExpandIn .35s ease both;
  padding-top: 18px;
}

@keyframes aboutExpandIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.about-more__grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.about-resume__panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: clamp(16px, 3cqw, 22px);
}

.about-resume__panel--wide {
  grid-column: 1 / -1;
}

.about-resume__panel .about-resume__label {
  color: var(--cyan);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  margin: 0 0 5px;
  text-transform: uppercase;
}

body:not(.light) .about-resume__panel .about-resume__label {
  color: var(--orange);
}

.about-resume__panel h3 {
  color: var(--text-strong);
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.05rem, 2.8cqw, 1.3rem);
  line-height: 1.25;
  margin: 0 0 12px;
}

.about-resume__panel p {
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 0;
}

.about-resume__list {
  color: var(--text);
  display: grid;
  gap: 10px;
  line-height: 1.5;
  margin: 0;
  padding-left: 1.1rem;
}

.about-resume__list strong {
  color: var(--text-strong);
}

.about-resume__education {
  border-top: 1px solid var(--line);
  margin-top: 16px !important;
  padding-top: 14px;
}

.about-resume__affiliations {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 8px !important;
}

.about-resume__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.about-resume__tools span {
  border: 1px solid rgba(0, 242, 254, .18);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: .78rem;
  font-weight: 600;
  padding: 6px 10px;
}

@container (max-width: 620px) {
  .about-more__grid {
    grid-template-columns: 1fr;
  }

  .about-resume__panel--wide {
    grid-column: auto;
  }
}

/* ===================================================================
   Section Labels & Links
   =================================================================== */
.eyebrow {
  margin: 0 0 4px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body:not(.light) .eyebrow {
  color: var(--orange);
}

.section-link {
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.section-link:hover,
.section-link:focus-visible {
  color: var(--text-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===================================================================
   Recent Commits
   =================================================================== */
.commit-list {
  display: grid;
  gap: 10px;
}

.commit-entry {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.01);
  color: var(--text);
  transition: transform var(--speed), border-color var(--speed), background var(--speed);
}

.commit-entry:hover,
.commit-entry:has(summary:focus-visible) {
  transform: translateY(-2px);
  border-color: var(--cyan);
  background: rgba(0, 242, 254, 0.06);
}

.commit-entry[open] {
  border-color: var(--line-strong);
  background: rgba(0, 242, 254, 0.04);
}

.commit-entry summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: center;
  padding: 13px 15px;
  cursor: pointer;
  list-style: none;
}

.commit-entry summary::-webkit-details-marker {
  display: none;
}

.commit-entry summary:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: -3px;
  border-radius: var(--radius-sm);
}

.commit-message {
  overflow: hidden;
  color: var(--text-strong);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commit-repo,
.commit-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.commit-meta {
  white-space: nowrap;
}

.commit-sha {
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.commit-details {
  margin: 0;
  padding: 0 15px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* ===================================================================
   Quick Links Grid
   =================================================================== */
.link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link {
  position: relative;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
}

.link:hover,
.link:focus-visible {
  color: var(--text-strong);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--magenta));
  box-shadow: 0 0 10px rgba(255, 126, 95, 0.6);
  flex-shrink: 0;
}

/* Websites get a cyan globe; actions (call, chat) get a warm accent */
.link-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link--action .link-icon {
  stroke: var(--orange);
}

/* ===================================================================
   Pages Directory Tree
   =================================================================== */
.page-tree {
  display: grid;
  gap: 0;
}

.page-directory {
  --directory-accent: var(--orange);
  padding: var(--gap);
}

body.light .page-directory {
  --directory-accent: #a33b26;
}

.page-directory .page-link__category {
  color: var(--directory-accent);
}

.page-directory__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding-bottom: 22px;
}

.page-directory__heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 1.9rem);
  letter-spacing: -.025em;
}

.page-collection {
  min-width: 0;
  border-top: 1px solid var(--line-strong);
}

.page-collection__summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 104px;
  padding: 22px 4px 22px 32px;
  list-style: none;
  cursor: pointer;
}

.page-collection__summary::-webkit-details-marker {
  display: none;
}

/* React Bits Spotlight Card, adapted for the existing collection rows.
   Copyright (c) 2026 David Haz. See assets/react-bits-LICENSE.txt. */
.page-collection__spotlight {
  position: absolute;
  inset: 1px 0;
  border-radius: 8px;
  pointer-events: none;
  background: radial-gradient(260px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
    rgba(255, 126, 95, .14), transparent 75%);
  opacity: 0;
  transition: opacity 180ms ease;
}

body.light .page-collection__spotlight {
  background: radial-gradient(260px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
    rgba(163, 59, 38, .09), transparent 75%);
}

.page-collection__summary:is(.is-spotlit, :focus-visible) > .page-collection__spotlight {
  opacity: 1;
}

.page-collection__summary:focus-visible {
  outline: 2px solid var(--directory-accent);
  outline-offset: -2px;
  border-radius: 8px;
}

.page-collection__summary:focus-visible .page-collection__title {
  color: var(--directory-accent);
}

.page-collection__summary::before {
  content: '';
  position: absolute;
  left: 0;
  top: calc(50% - 7px);
  width: 14px;
  height: 14px;
  border: 3px solid var(--bg-2);
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 1px rgba(255, 126, 95, .4);
}

.page-collection[open] > .page-collection__summary::after {
  content: '';
  position: absolute;
  left: 7px;
  top: calc(50% + 7px);
  bottom: 0;
  width: 1px;
  background: rgba(255, 126, 95, .55);
}

.page-collection__label {
  position: relative;
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 5px;
  margin: 0;
}

.page-collection__title {
  color: var(--text-strong);
  font: 700 1.55rem/1.2 'Fraunces', Georgia, serif;
}

.page-collection__description {
  color: var(--muted);
  font: 400 .82rem/1.5 'Space Grotesk', sans-serif;
}

.page-collection__summary:hover .page-collection__title {
  color: var(--directory-accent);
}

.page-collection__chevron {
  position: relative;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-top: 1px solid var(--muted);
  border-right: 1px solid var(--muted);
  transform: rotate(45deg);
  transition: transform var(--speed) ease;
}

.page-collection[open] > .page-collection__summary .page-collection__chevron {
  transform: rotate(135deg);
}

.page-collection__body {
  position: relative;
  padding: 0 0 24px 28px;
}

.page-collection__body::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 42px;
  width: 1px;
  background: linear-gradient(180deg, rgba(255, 126, 95, .55), rgba(255, 126, 95, .16));
}

.page-collection__body > .page-branch__items {
  margin-top: 0;
}

@media(max-width:600px) {
  .page-collection__summary { gap: 12px; padding-left: 28px; }
  .page-collection__title { font-size: 1.35rem; }
  .page-collection__body { padding-left: 22px; }
  .page-collection__body > .page-branch__items > li::before { left: -15px; width: 15px; }
  .page-directory .page-branch { padding-left: 20px; }
  .page-directory .page-branch__header::before { left: -20px; }
  .page-directory .page-branch::before { left: 7px; }
  .page-directory .page-branch__children { margin-left: 8px; padding-left: 12px; }
  .page-directory .page-branch__children li::before { left: -12px; width: 12px; }
}

.page-branch {
  padding-left: 28px;
  position: relative;
}

.page-branch::before {
  background: linear-gradient(180deg, var(--orange), rgba(255, 126, 95, 0.16));
  bottom: 20px;
  content: '';
  left: 7px;
  position: absolute;
  top: 10px;
  width: 1px;
}

.page-branch__header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 24px;
  position: relative;
}

.page-branch__header::before {
  background: var(--orange);
  border: 3px solid var(--bg-2);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 126, 95, 0.4);
  content: '';
  height: 14px;
  left: -28px;
  position: absolute;
  width: 14px;
}

.page-branch__header :is(h3, h4, h5, h6) {
  color: var(--text-strong);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.2;
  margin: 0;
}

/* Retain folder nesting inside collections and the dashboard's child pages. */
.page-branch--nested {
  margin-block: 6px 12px;
}

.page-branch--nested .page-branch__header :is(h4, h5, h6) {
  font-size: 1rem;
}

.page-branch__items > .page-branch__folder::before {
  top: 18px;
}

.page-link > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.page-branch__items {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.page-branch__items li {
  position: relative;
}

.page-branch__items li::before {
  border-top: 1px solid rgba(255, 126, 95, 0.34);
  content: '';
  left: -20px;
  position: absolute;
  top: 50%;
  width: 20px;
}

.page-branch__items > .page-tree__parent::before {
  top: 24px;
}

.page-branch__children {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 8px 0 2px 26px;
  padding: 0 0 0 18px;
  position: relative;
}

.page-branch__children::before {
  background: linear-gradient(180deg, rgba(255, 126, 95, 0.7), rgba(255, 126, 95, 0.12));
  bottom: 20px;
  content: '';
  left: 0;
  position: absolute;
  top: -8px;
  width: 1px;
}

.page-branch__children li::before {
  left: -18px;
  width: 18px;
}

.page-link--parent {
  border-color: rgba(255, 126, 95, 0.32);
  font-weight: 700;
}

.page-branch__children .page-link {
  min-height: 38px;
}

.page-link {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
}

.page-link .dot {
  margin-top: 7px;
}

.page-link__content {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.page-link__heading {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 9px;
}

.page-link__title {
  color: inherit;
  line-height: 1.35;
}

.page-link__category {
  background: rgba(255, 126, 95, 0.1);
  border: 1px solid rgba(255, 126, 95, 0.28);
  border-radius: var(--radius-pill);
  color: var(--orange);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1.2;
  padding: 3px 7px;
  text-transform: uppercase;
}

.page-link__description {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.4;
}

.page-link:hover {
  color: var(--text-strong);
}

/* ===================================================================
   Footer & Legal
   =================================================================== */
footer {
  opacity: 0.7;
  text-align: center;
  margin-top: 10px;
  padding: var(--spacing) 0;
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

footer:has(.mobile-background-toggle) { opacity: 1; }
.footer-credit { opacity: 0.7; }
.mobile-background-toggle { display: none; }
.mobile-background-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.mobile-background-toggle:hover { background: var(--bg-elev); }
.mobile-background-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ===================================================================
   Accessibility (Focus Styles)
   =================================================================== */
:is(.tab, .btn, .link, .fab, .page-link, a, input, textarea, button, summary):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

input, textarea {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  background: rgba(3, 7, 18, 0.5);
  color: var(--text-strong);
  font: inherit;
  outline: none;
}

/* ===================================================================
   CliftonStrengths Styling
   =================================================================== */
#csMount #CS {
  display: grid;
  gap: var(--spacing);
}

#csMount .summary {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.01);
}

#csMount .summary h2 {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-strong);
}

#csMount .bar {
  display: flex;
  height: 12px;
  margin: 16px 0;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

#csMount .bar div {
  flex: var(--domain-weight, 1) 1 0;
  min-width: 2px;
  transition: flex-grow var(--speed) ease;
}

#csMount .bar .green { background: var(--green); }
#csMount .bar .blue { background: var(--blue); }
#csMount .bar .purple { background: var(--purple); }
#csMount .bar .orange { background: var(--orange); }

#csMount .controls {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

#csMount .controls button {
  flex: 1;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: calc(var(--radius-sm) - 4px);
  padding: 8px 12px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: all var(--speed);
}

#csMount .controls button:hover {
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.03);
}

#csMount .controls button.active {
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
}

#csMount .toggle-buttons {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.02);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

#csMount .toggle-buttons button {
  flex: 1;
  padding: 12px;
  background: transparent;
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-weight: 700;
  border-radius: calc(var(--radius-sm) - 4px);
  color: var(--muted);
  transition: all var(--speed);
  font-size: 0.88rem;
}

#csMount .toggle-buttons button:hover {
  color: var(--text-strong);
}

#csMount .toggle-buttons button.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.1) 0%, rgba(0, 102, 255, 0.05) 100%), rgba(255, 255, 255, 0.06);
  color: var(--text-strong);
}

#csMount .content {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.01);
  display: none;
}

#csMount .content.active {
  display: block;
  animation: tabFadeIn var(--speed) ease;
}

#csMount .content p {
  margin: 0;
  line-height: 1.6;
}

#csMount .section {
  display: flex;
  flex-direction: column;
}

#csMount .section h3 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: inherit;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  margin: 20px 0 10px;
}

#csMount .section h3 span {
  flex: 1;
  height: 2px;
  margin-left: 16px;
  border-radius: var(--radius-pill);
}

#csMount .list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

#csMount .item {
  position: relative;
  width: 100%;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  color: inherit;
  cursor: pointer;
  font: inherit;
  appearance: none;
  transition: all var(--speed) cubic-bezier(0.2, 0.8, 0.2, 1);
}

#csMount .item:hover,
#csMount .item:focus-visible {
  transform: translateY(-3px);
  border-color: var(--cyan);
  box-shadow: var(--shadow-sm);
}

#csMount .item[data-domain="executing"] { border-color: rgba(124, 58, 237, 0.25); }
#csMount .item[data-domain="influencing"] { border-color: rgba(255, 126, 95, 0.25); }
#csMount .item[data-domain="relationship"] { border-color: rgba(0, 102, 255, 0.25); }
#csMount .item[data-domain="thinking"] { border-color: rgba(16, 185, 129, 0.25); }

#csMount .item.top10[data-domain="executing"] { background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, transparent 100%), rgba(255, 255, 255, 0.02); border-color: var(--purple); }
#csMount .item.top10[data-domain="influencing"] { background: linear-gradient(135deg, rgba(255, 126, 95, 0.2) 0%, transparent 100%), rgba(255, 255, 255, 0.02); border-color: var(--orange); }
#csMount .item.top10[data-domain="relationship"] { background: linear-gradient(135deg, rgba(0, 102, 255, 0.2) 0%, transparent 100%), rgba(255, 255, 255, 0.02); border-color: var(--blue); }
#csMount .item.top10[data-domain="thinking"] { background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, transparent 100%), rgba(255, 255, 255, 0.02); border-color: var(--green); }

#csMount .rank {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
  color: var(--text-strong);
}

#csMount .name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

/* CliftonStrengths inline disclosure: a reading surface within the grid. */
#csMount .strength-detail {
  grid-column: 1 / -1;
  min-width: 0;
  scroll-margin-block: 16px;
  position: relative;
  border: 1px solid var(--glass-border);
  border-inline-start: 3px solid var(--strength-color);
  border-radius: var(--radius-sm);
  padding: 20px 58px 22px 20px;
  text-align: left;
}

#csMount .strength-detail[hidden] { display: none; }

#csMount .strength-detail[data-domain] {
  border-inline-start-color: var(--strength-color);
}

#csMount [data-domain="thinking"] { --strength-color: var(--green); }
#csMount [data-domain="executing"] { --strength-color: var(--purple); }
#csMount [data-domain="relationship"] { --strength-color: var(--blue); }
#csMount [data-domain="influencing"] { --strength-color: var(--orange); }

#csMount .item[aria-expanded="true"] {
  outline: 2px solid var(--strength-color);
  outline-offset: -3px;
}

#csMount .item[aria-expanded="true"]:focus-visible {
  outline-color: var(--cyan);
}

#csMount .strength-detail h4 {
  margin: 4px 0 10px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.45rem;
  color: var(--text-strong);
}

#csMount .strength-detail__meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

#csMount .strength-detail__description {
  color: var(--text);
  line-height: 1.65;
  margin: 0;
  font-size: 0.95rem;
}

#csMount .strength-detail__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 1.6rem;
  line-height: 1;
}

/* ===================================================================
   UConn Library Search Widget (ULSW) Redesign Overrides
   =================================================================== */
.ulsw .wrap {
  border-radius: var(--radius) !important;
}

.ulsw .tabs {
  border-bottom: 1px solid var(--line) !important;
  padding: 6px !important;
  gap: 4px !important;
}

.ulsw [role="tab"] {
  border: 1px solid transparent !important;
  color: var(--muted) !important;
  font-family: inherit !important;
  font-size: 0.82rem !important;
  padding: 8px 12px !important;
  border-radius: calc(var(--radius-sm) - 4px) !important;
}

.ulsw [role="tab"]:hover {
  color: var(--text-strong) !important;
}

.ulsw [role="tab"][aria-selected="true"] {
  color: var(--text-strong) !important;
  transform: translateY(0) !important;
}

.ulsw .ulsw-panel {
  background: transparent !important;
}

.ulsw input[type="text"] {
  color: var(--text-strong) !important;
  border-color: var(--line) !important;
  background: rgba(3, 7, 18, 0.6) !important;
  border-radius: var(--radius-sm) !important;
  height: 42px !important;
  font-family: inherit !important;
}

.ulsw input[type="text"]:focus {
  border-color: var(--cyan) !important;
  box-shadow: var(--ring) !important;
}

.ulsw input[type="text"]::placeholder {
  color: var(--muted-2) !important;
}

.ulsw .btn {
  border: 1px solid var(--line-strong) !important;
  color: var(--text-strong) !important;
  border-radius: var(--radius-sm) !important;
  font-family: inherit !important;
  height: 42px !important;
  font-size: 0.88rem !important;
  padding: 0 16px !important;
}

.ulsw .links {
  font-size: 0.82rem !important;
  margin-top: 12px !important;
}

.ulsw .links a {
  color: var(--cyan) !important;
  text-decoration: none !important;
}

.ulsw .links a:hover {
  text-decoration: underline !important;
}

/* ===================================================================
   Animated Site Companion
   =================================================================== */
.site-pet {
  position: fixed;
  left: clamp(10px, 1.5vw, 24px);
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 900;
  display: grid;
  justify-items: center;
  width: 120px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-strong);
  cursor: pointer;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.28));
  opacity: 0.94;
  transition: opacity var(--speed) ease, transform var(--speed) ease;
}

.site-pet[hidden] {
  display: none;
}

.site-pet:hover,
.site-pet:focus-visible {
  opacity: 1;
  transform: translateY(-4px);
}

.site-pet:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 5px;
  border-radius: 22px;
}

.site-pet__canvas {
  display: block;
  width: 120px;
  height: 130px;
}

.site-pet__label {
  margin-top: -10px;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(6, 13, 32, 0.82);
  box-shadow: var(--shadow-soft);
  color: var(--text-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity var(--speed) ease, transform var(--speed) ease;
}

.site-pet:hover .site-pet__label,
.site-pet:focus-visible .site-pet__label,
.site-pet[aria-expanded="true"] .site-pet__label {
  opacity: 1;
  transform: translateY(0);
}

body.light .site-pet__label {
  background: rgba(255, 255, 255, 0.9);
  color: #0f1a2e;
}

.rogo-settings {
  --rogo-bubble-bg: #0d182d;
  --rogo-bubble-bottom: calc(170px + env(safe-area-inset-bottom, 0px));
  position: fixed;
  left: clamp(16px, 1.5vw, 24px);
  bottom: var(--rogo-bubble-bottom);
  z-index: 1100;
  width: min(320px, calc(100vw - 32px));
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--rogo-bubble-bg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  color: var(--text-strong);
}

.rogo-settings[hidden] { display: none; }
.rogo-settings::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 40px;
  width: 14px;
  height: 14px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--rogo-bubble-bg);
  transform: rotate(45deg);
}

.rogo-settings__content {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - var(--rogo-bubble-bottom) - 16px);
  overflow-y: auto;
  padding: 18px;
}

.rogo-settings__heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rogo-settings__heading h2 { margin: 0; font-size: 1.2rem; line-height: 1.3; }
.rogo-settings__close {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: -10px -10px -10px 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.rogo-settings__close svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.rogo-settings__close:hover { background: var(--line); color: var(--text-strong); }
.rogo-settings__intro { margin: 8px 0 16px; font-size: 0.875rem; color: var(--text); }
.rogo-settings__options { border: 0; min-width: 0; margin: 0; padding: 0; }
.rogo-settings__choices { overflow-y: auto; min-height: 0; margin: -4px; padding: 4px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--muted-2) transparent; }
.rogo-settings__heading, .rogo-settings__intro, .rogo-settings__note { flex-shrink: 0; }
.rogo-settings .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.rogo-settings__option {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 20px;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 12px 0;
  border-top: 1px solid var(--line-strong);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.rogo-settings__option:hover .rogo-settings__name { color: var(--orange); }
.rogo-settings__preview { display: block; width: 40px; height: 40px; border-radius: 6px; }
.rogo-settings__preview--none { background: #000000; border: 1px solid var(--line-strong); }
.rogo-settings__name { display: block; font-size: 0.9rem; font-weight: 700; }
.rogo-settings__description { display: block; margin-top: 3px; font-size: 0.75rem; line-height: 1.5; color: var(--text); }
.rogo-settings__option input { width: 18px; height: 18px; margin: 0; accent-color: var(--orange); cursor: pointer; }
.rogo-settings__close:focus-visible,
.rogo-settings__option:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.rogo-settings__note { margin: 12px 0 0; color: var(--muted); font-size: 0.75rem; }
body.light .rogo-settings { --rogo-bubble-bg: #ffffff; }
body.light .rogo-settings__preview--none { background: #ffffff; }
body.light .rogo-settings__option:hover .rogo-settings__name { color: #a23d10; }
body.light .rogo-settings__option input { accent-color: #a23d10; }

@media (max-width: 1099px) {
  .site-pet { display: none !important; }
  .mobile-background-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 12px auto 0;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--bg-2);
    color: var(--text-strong);
    cursor: pointer;
  }
  .rogo-settings { --rogo-bubble-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); }
  .rogo-settings::after { left: calc(50% - 7px); }
}

@media (prefers-reduced-motion: reduce) {
  .site-pet, .site-pet__label { transition: none; }
  .site-pet:hover, .site-pet:focus-visible { transform: none; }
}

@media (forced-colors: active) {
  .rogo-settings, body.light .rogo-settings { --rogo-bubble-bg: Canvas; color: CanvasText; border-color: CanvasText; }
  .rogo-settings__option input { forced-color-adjust: auto; }
}

/* ===================================================================
   Quickbar & Floating Contact Buttons
   =================================================================== */
.quickbar {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
}

.quickbar-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-toggle {
  display: none;
}

.fab {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  text-decoration: none;
}

.fab svg {
  width: 22px;
  height: 22px;
  fill: var(--text-strong);
  transition: fill var(--speed);
}

.fab:hover svg {
  fill: var(--cyan);
}

.fab.donate {
  font-size: 1.25rem;
  border: none;
}

/* ===================================================================
   Submit Request Form Layout Adjustments
   =================================================================== */
.request-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 14px;
}

@media (max-width: 700px) {
  .request-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.request-form-card {
  padding: 16px;
}

.request-form-card h3 {
  margin: 0 0 8px 0;
}

.request-form__sent {
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid var(--green);
  border-radius: 8px;
  color: var(--text-strong);
  font-weight: 600;
}

.request-form__honey {
  position: absolute;
  left: -9999px;
}

.request-form__submit {
  width: 100%;
}

#tab-req form {
  display: grid;
  gap: 12px;
}

#tab-req form label {
  display: grid;
  gap: 4px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}

/* ===================================================================
   Light Mode Specific Component Overrides
   =================================================================== */

body.light .hero h1 {
  text-shadow: none;
}

body.light .btn {
  color: var(--text-strong);
}

body.light .btn:hover {
  color: #0066ff;
}

body.light .chip {
  color: #1d4ed8;
}

body.light .info-note {
  color: #475569;
}

body.light #eventsList > div {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light #eventsList > div:hover,
body.light #eventsList > div:focus-within {
  background: #ffffff;
  border-color: #0066ff;
  box-shadow: 0 6px 16px -6px rgba(15, 23, 42, 0.06);
}

body.light #eventsList a {
  color: #0f172a;
}

body.light #eventsList a:hover,
body.light #eventsList a:focus-visible {
  color: #0066ff;
}

body.light #csMount .controls button,
body.light #csMount .toggle-buttons button {
  color: #475569;
}

body.light #csMount .controls button:hover,
body.light #csMount .toggle-buttons button:hover {
  color: #0f172a;
}

body.light #csMount .controls button.active,
body.light #csMount .toggle-buttons button.active {
  color: #0f172a;
}

body.light #csMount .item {
  color: #1e293b;
}

body.light #csMount .name {
  color: #475569;
}

body.light #csMount .item.top10[data-domain="executing"] { border-color: var(--purple); }
body.light #csMount .item.top10[data-domain="influencing"] { border-color: var(--orange); }
body.light #csMount .item.top10[data-domain="relationship"] { border-color: var(--blue); }
body.light #csMount .item.top10[data-domain="thinking"] { border-color: var(--green); }

body.light .link {
  color: #1e293b;
}

body.light .link:hover {
  color: #0f172a;
}

body.light .fab svg {
  fill: #0f172a;
}

body.light .fab:hover svg {
  fill: #0066ff;
}

/* ULSW theme colors; shared material overrides are consolidated below. */

body.light .ulsw .tabs {
  border-bottom-color: var(--line) !important;
}

body.light .ulsw [role="tab"] {
  color: #475569 !important;
}

body.light .ulsw [role="tab"]:hover {
  color: #0f172a !important;
}

body.light .ulsw [role="tab"][aria-selected="true"] {
  color: #0f172a !important;
}

body.light .ulsw input[type="text"] {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: var(--line) !important;
}

body.light .ulsw input[type="text"]:focus {
  border-color: #0066ff !important;
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15) !important;
}

body.light .ulsw input[type="text"]::placeholder {
  color: #64748b !important;
}

body.light .ulsw .btn {
  color: var(--text-strong) !important;
}

body.light .ulsw .btn:hover {
  color: #0066ff !important;
}

body.light .ulsw .links a {
  color: #1d4ed8 !important;
}

body.light .ulsw .helper {
  color: #475569 !important;
}

/* ===================================================================
   Responsive Mobile Adjustments
   =================================================================== */
@media (max-width: 980px) {
  .container,
  .container.about-open {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "side"
      "main";
    grid-template-rows: auto;
  }

  aside {
    order: 1;
    position: static;
  }

  main {
    order: 2;
  }

  .quickbar {
    right: 20px;
    bottom: 20px;
  }
}

@media (min-width: 981px) {
  .container {
    padding-right: clamp(80px, 6vw, 110px);
  }
}

@media (max-width: 600px) {
  .container {
    padding-bottom: var(--gap);
    padding-inline: 16px;
  }

  #csMount {
    padding-inline: 4px;
  }

  #csMount .controls,
  #csMount .toggle-buttons {
    display: flex;
    flex-direction: column;
  }

  #csMount .list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #csMount .item {
    min-height: 90px;
  }

  .tablist {
    padding: 4px;
  }

  .tab {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .quickbar {
    position: fixed;
    top: auto;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    left: auto;
    align-items: flex-end;
  }

  .contact-toggle {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--electric-blue), var(--violet));
    box-shadow: var(--shadow);
    color: var(--text-strong);
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
  }

  .contact-toggle:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 3px;
  }

  .quickbar-actions {
    display: none;
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    max-width: calc(100vw - 32px);
    padding: 8px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: rgba(6, 13, 32, 0.94);
    box-shadow: var(--shadow);
    /* Individual contact buttons carry the glass; avoid a second blur slab. */
    pointer-events: auto;
    z-index: 1001;
  }

  .quickbar-actions.is-open {
    display: flex;
  }

  .fab {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

}

/* ===================================================================
   Collapsible Widgets
   =================================================================== */
.collapsible-widget {
  overflow: clip;
  padding: 0;
}

.collapsible-widget__summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  list-style: none;
  padding: var(--gap);
  user-select: none;
}

.collapsible-widget__summary::-webkit-details-marker {
  display: none;
}

.collapsible-widget__summary h2 {
  margin: 0;
}

.collapsible-widget__summary .eyebrow {
  display: block;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

.collapsible-widget__icon {
  border-bottom: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  flex: 0 0 auto;
  height: 11px;
  margin: 0 5px 5px 0;
  transform: rotate(45deg);
  transition: transform var(--speed) ease, border-color var(--speed) ease;
  width: 11px;
}

.collapsible-widget__summary:hover .collapsible-widget__icon {
  border-color: var(--text-strong);
}

.collapsible-widget[open] > .collapsible-widget__summary {
  border-bottom: 1px solid var(--line);
}

.collapsible-widget[open] > .collapsible-widget__summary .collapsible-widget__icon {
  margin-bottom: -5px;
  transform: rotate(225deg);
}

.collapsible-widget__body {
  padding: var(--gap);
}

.collapsible-widget__toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

/* ===================================================================
   The Pocket Part
   =================================================================== */
.pocket-part-widget {
  --pp-navy: #000e2f;
  --pp-blue: #60a5fa;
  --pp-gold: #f2c811;
  --pp-ink: var(--text);
  --pp-heading: var(--text-strong);
  --pp-muted: var(--muted);
  --pp-border: var(--line-strong);
  --pp-surface: rgba(255, 255, 255, 0.035);
  color: var(--pp-ink);
  font-family: inherit;
  font-size: 16px;
  max-width: 100%;
}

body.light .pocket-part-widget {
  --pp-blue: #1f67a8;
  --pp-ink: #172033;
  --pp-heading: #000e2f;
  --pp-muted: #5b6474;
  --pp-border: #d9e0e9;
  --pp-surface: #f5f7fa;
}

.pocket-part-widget__eyebrow {
  color: var(--pp-blue);
  display: block;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
  margin: 0 0 .2rem;
  text-transform: uppercase;
}

.pocket-part-widget h2 {
  color: var(--pp-heading);
  line-height: 1.1;
  margin: 0;
}

.pocket-part-widget a {
  color: var(--pp-blue);
  text-decoration-thickness: .08em;
  text-underline-offset: .16em;
}

.pocket-part-widget a:hover {
  color: var(--pp-heading);
}

.pocket-part-widget a:focus-visible {
  border-radius: 2px;
  outline: 3px solid var(--pp-gold);
  outline-offset: 3px;
}

.pocket-part-widget__all {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
}

.pocket-part-widget__content {
  display: grid;
  gap: 1rem;
}

.pocket-part-widget__featured {
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: .65rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  overflow: hidden;
}

.pocket-part-widget__image-link {
  background: linear-gradient(135deg, var(--pp-navy), var(--pp-blue));
  display: block;
  min-height: 12rem;
}

.pocket-part-widget__image {
  aspect-ratio: 16 / 9;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.pocket-part-widget__featured-copy {
  align-self: center;
  padding: 1.25rem;
}

.pocket-part-widget__date {
  color: var(--pp-muted);
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  margin-bottom: .4rem;
}

.pocket-part-widget__title {
  font-size: 26px;
  line-height: 33px;
  margin: 0 0 .65rem;
}

.pocket-part-widget__title a,
.pocket-part-widget__recent-title a {
  color: var(--pp-heading);
  text-decoration: none;
}

.pocket-part-widget__excerpt {
  color: var(--pp-ink);
  font-size: 16px;
  line-height: 25px;
  margin: 0 0 .85rem;
}

.pocket-part-widget__read {
  font-size: 15px;
  font-weight: 800;
}

.pocket-part-widget__recent {
  display: grid;
  gap: .65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pocket-part-widget__recent-item {
  align-items: center;
  background: var(--pp-surface);
  border-left: 4px solid var(--pp-blue);
  border-radius: .25rem;
  display: grid;
  gap: 14px;
  grid-template-columns: 128px minmax(0, 1fr);
  padding: .85rem 1rem;
}

.pocket-part-widget__recent-image-link {
  background: linear-gradient(135deg, var(--pp-navy), var(--pp-blue));
  border-radius: 4px;
  display: block;
  overflow: hidden;
}

.pocket-part-widget__recent-image {
  aspect-ratio: 16 / 9;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.pocket-part-widget__recent-copy {
  min-width: 0;
}

.pocket-part-widget__recent-item--no-image {
  grid-template-columns: 1fr;
}

.pocket-part-widget__recent-title {
  font-size: 16px;
  line-height: 22px;
  margin: 0;
}

.pocket-part-widget__status {
  background: var(--pp-surface);
  border-radius: .35rem;
  font-size: 16px;
  line-height: 24px;
  margin: 0;
  padding: 1rem;
}

.pocket-part-widget__status--error {
  border-left: 4px solid #e15367;
}

@container (min-width: 760px) {
  .pocket-part-widget__featured {
    grid-template-columns: minmax(18rem, 1fr) minmax(22rem, 1.15fr);
  }

  .pocket-part-widget__featured--no-image {
    grid-template-columns: 1fr;
  }

  .pocket-part-widget__image-link,
  .pocket-part-widget__image {
    min-height: 100%;
  }
}

@container (max-width: 520px) {
  .pocket-part-widget__title {
    font-size: 22px;
    line-height: 28px;
  }

  .pocket-part-widget__recent-item {
    gap: 12px;
    grid-template-columns: 96px minmax(0, 1fr);
    padding: 12px;
  }

  .pocket-part-widget__recent-item--no-image {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================
   REFRACTIVE-GLASS SYSTEM — material tokens and progressive enhancement
   .surface = reading; .glass = clear; .glass--strong = prominent glass.
   Existing dynamic widget selectors below are aliases, so JS is unchanged.
   =================================================================== */
:root {
  /* Transparency: tune the alpha channels, leaving the brand hues intact. */
  --glass-bg: rgba(13, 22, 46, 0.14);
  --glass-bg-strong: rgba(13, 22, 46, 0.20);
  --surface-bg: rgba(7, 13, 30, 0.72);
  --surface-blur: 4px;
  --glass-blur: 5px;
  --glass-saturation: 112%;
  /* Blend of the refracted layer, 0–1. SVG scale="3" sets the pixel amplitude.
     A shared SVG primitive cannot inherit a different scale per CSS surface. */
  --glass-distortion: 0.48;
  --glass-distortion-strong: 0.72;
  --glass-border: rgba(213, 228, 255, 0.15);
  --glass-border-hover: rgba(232, 242, 255, 0.30);
  --glass-highlight: rgba(255, 255, 255, 0.25);
  --glass-highlight-strong: rgba(255, 255, 255, 0.38);
  --glass-edge-shade: rgba(0, 4, 16, 0.22);
  --glass-specular: rgba(255, 255, 255, 0.045);
  --glass-shadow: 0 6px 18px -12px rgba(0, 3, 14, 0.40);
  --glass-shadow-strong: 0 12px 28px -18px rgba(0, 3, 14, 0.52);
  --glass-radius: var(--radius);
  --glass-active-bg: rgba(96, 165, 250, 0.10);
  --glass-floating-bg: rgba(7, 13, 30, 0.58);
}

body.light {
  --glass-bg: rgba(255, 255, 255, 0.18);
  --glass-bg-strong: rgba(255, 255, 255, 0.26);
  --surface-bg: rgba(248, 250, 255, 0.76);
  --glass-border: rgba(68, 91, 124, 0.18);
  --glass-border-hover: rgba(58, 83, 117, 0.32);
  --glass-highlight: rgba(255, 255, 255, 0.70);
  --glass-highlight-strong: rgba(255, 255, 255, 0.88);
  --glass-edge-shade: rgba(55, 75, 110, 0.12);
  --glass-specular: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 6px 18px -12px rgba(30, 50, 80, 0.18);
  --glass-shadow-strong: 0 12px 28px -18px rgba(30, 50, 80, 0.26);
  --glass-active-bg: rgba(31, 103, 168, 0.08);
  --glass-floating-bg: rgba(248, 250, 255, 0.62);
}

.glass-filter-defs {
  position: absolute;
  overflow: hidden;
  pointer-events: none;
}

/* Defaults for future standalone pieces; existing component geometry wins. */
:where(.glass, .glass--strong) {
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
}

/* Reading surfaces have a stable contrast floor and NO displacement. */
.surface,
#csMount .card,
#csMount .content,
#csMount .strength-detail {
  background: var(--surface-bg);
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--surface-blur)) saturate(105%);
  backdrop-filter: blur(var(--surface-blur)) saturate(105%);
}

body.light .about-resume__panel.surface {
  background: var(--surface-bg);
}

/* Keep About's existing divider, spacing, and unboxed text layout. */
.hero-about.surface {
  background: linear-gradient(90deg, transparent, var(--surface-bg) 12%,
    var(--surface-bg) 88%, transparent);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* No backdrop-filter, filter, opacity, or isolation on the glass host:
   its children can still sample the page background, and fixed dialogs
   aren't captured by an extra filter containing block. Both pseudo layers
   sit behind all content inside this local stacking context. */
:is(.glass, .glass--strong, .card:not(.surface), .btn, .tab, .link,
    .page-link, .chip, .about-resume__tools span, .ulsw [role="tab"]) {
  --_glass-bg: var(--glass-bg);
  --_glass-blur: var(--glass-blur);
  --_glass-highlight: var(--glass-highlight);
  --_glass-distortion: var(--glass-distortion);
  position: relative;
  z-index: 0;
  background: transparent;
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: border-color var(--speed) ease, box-shadow var(--speed) ease,
    color var(--speed) ease;
}

:is(.glass, .glass--strong, .card:not(.surface), .btn, .tab, .link,
    .page-link, .chip, .about-resume__tools span, .ulsw [role="tab"])::before,
:is(.glass, .glass--strong, .card:not(.surface), .btn, .tab, .link,
    .page-link, .chip, .about-resume__tools span, .ulsw [role="tab"])::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

/* Always-on material and blur fallback. NEVER put url() in this chain. */
:is(.glass, .glass--strong, .card:not(.surface), .btn, .tab, .link,
    .page-link, .chip, .about-resume__tools span, .ulsw [role="tab"])::before {
  z-index: -2;
  background: var(--_glass-bg);
  -webkit-backdrop-filter: blur(var(--_glass-blur)) saturate(var(--glass-saturation));
  backdrop-filter: blur(var(--_glass-blur)) saturate(var(--glass-saturation));
  box-shadow: inset 0 1px 0 var(--_glass-highlight),
    inset 1px 0 0 var(--glass-border),
    inset 0 -1px 0 var(--glass-edge-shade),
    inset -1px 0 0 var(--glass-edge-shade);
}

/* Optional refraction is a separate sibling of the fallback. A browser can
   parse url() yet fail to render SVG backdrop filters; even then it cannot
   invalidate the blur on ::before. The 1px inset leaves the bevel intact. */
:is(.glass, .glass--strong, .card:not(.surface), .btn, .tab, .link,
    .page-link, .chip, .about-resume__tools span, .ulsw [role="tab"])::after {
  z-index: -1;
  inset: 1px;
  opacity: var(--_glass-distortion);
  background: linear-gradient(125deg, var(--glass-specular), transparent 36%,
    transparent 76%, var(--glass-specular));
}

@supports ((backdrop-filter: url("#refractive-glass")) or
           (-webkit-backdrop-filter: url("#refractive-glass"))) {
  :is(.glass, .glass--strong, .card:not(.surface), .btn, .tab, .link,
      .page-link, .chip, .about-resume__tools span, .ulsw [role="tab"])::after {
    -webkit-backdrop-filter: url("#refractive-glass") blur(0.3px) saturate(102%);
    backdrop-filter: url("#refractive-glass") blur(0.3px) saturate(102%);
  }
}

.glass.glass--strong {
  --_glass-bg: var(--glass-bg-strong);
  --_glass-highlight: var(--glass-highlight-strong);
  --_glass-distortion: var(--glass-distortion-strong);
  box-shadow: var(--glass-shadow-strong);
}

/* Nested pieces stay clear; avoid multiplying large-radius blur passes. */
:is(.glass, .glass--strong) :is(.glass, .btn, .tab, .link, .chip, .page-link),
.about-resume__tools span,
.ulsw [role="tab"] {
  --_glass-blur: 2px;
}

/* Keep controls readable when they float over a white iframe or dark text. */
.fab.glass--strong,
.contact-toggle.glass--strong {
  --_glass-bg: var(--glass-floating-bg);
  --_glass-blur: 5px;
}

.fab.donate {
  border: 1px solid var(--glass-border);
  --_glass-bg: linear-gradient(135deg, rgba(255, 126, 95, 0.32),
    rgba(255, 95, 183, 0.20)), var(--glass-floating-bg);
}

/* Preserve chip colors while removing luminous colored outlines. */
body:not(.light) .chip { color: var(--orange); }
body.light .chip { color: #1d4ed8; }

:is(.btn, .tab, .link, .page-link, .fab, .contact-toggle):is(:hover, :focus-visible) {
  --_glass-highlight: var(--glass-highlight-strong);
  --_glass-bg: var(--glass-active-bg);
  border-color: var(--glass-border-hover);
  color: var(--text-strong);
  box-shadow: var(--glass-shadow);
  transform: none;
}

:is(.fab, .contact-toggle):is(:hover, :focus-visible) {
  --_glass-bg: var(--glass-floating-bg);
  box-shadow: var(--glass-shadow-strong);
}

.btn:active { transform: none; }

.tab[aria-selected="true"] {
  --_glass-bg: var(--glass-active-bg);
  --_glass-highlight: var(--glass-highlight-strong);
  border-color: var(--glass-border-hover);
  color: var(--text-strong);
  /* A crisp inner edge identifies selection without an outer glow. */
  box-shadow: inset 0 -2px 0 var(--cyan);
}

/* Inset focus is visible even inside clipped cards and scrolling tab bars. */
:is(.btn, .tab, .link, .page-link, .fab, .contact-toggle):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -3px;
}

/* Dynamic components: use the same tokens without changing JS templates.
   Their existing domain colors stay intact. */
#csMount .card { background: var(--surface-bg); }

#csMount .card::before,
#csMount .card::after { content: none; }

#csMount :is(.controls, .toggle-buttons, .summary, .item) {
  background-color: var(--glass-bg);
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow);
}

#csMount :is(.controls, .toggle-buttons) button {
  background: var(--glass-bg);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

#csMount :is(.controls, .toggle-buttons) button:is(:hover, .active) {
  background: var(--glass-active-bg);
  box-shadow: inset 0 1px 0 var(--glass-highlight-strong);
}

#csMount .item:is(:hover, :focus-visible),
body.light #csMount .item:is(:hover, :focus-visible) {
  transform: none;
  box-shadow: inset 0 1px 0 var(--glass-highlight-strong), var(--glass-shadow);
}

/* Embedded catalog ships its own inline !important overrides. Keep its
   reading/form area stable, and let its small controls share the material. */
body .ulsw .wrap {
  background: var(--surface-bg) !important;
  border-color: var(--glass-border) !important;
  box-shadow: var(--glass-shadow) !important;
}

body .ulsw .tabs { background: var(--glass-bg) !important; }

body .ulsw :is([role="tab"], .btn) {
  background: transparent !important;
  border-color: var(--glass-border) !important;
  box-shadow: var(--glass-shadow) !important;
}

body .ulsw :is([role="tab"], .btn):is(:hover, :focus-visible, [aria-selected="true"]) {
  --_glass-bg: var(--glass-active-bg);
  --_glass-highlight: var(--glass-highlight-strong);
  background: transparent !important;
  border-color: var(--glass-border-hover) !important;
  color: var(--text-strong) !important;
}

body .ulsw [role="tab"][aria-selected="true"] {
  box-shadow: inset 0 -2px 0 var(--cyan) !important;
}

/* Text entry needs a stable background rather than displacement. */
body :is(input, textarea),
body .ulsw input[type="text"] {
  background: var(--surface-bg) !important;
  color: var(--text-strong) !important;
}

@media (max-width: 600px) {
  .quickbar-actions {
    background: var(--glass-bg);
    border-color: var(--glass-border);
    box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow);
  }
}

/* User accessibility preferences take precedence over the clear material. */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  body {
    --glass-bg: var(--bg-2);
    --glass-bg-strong: var(--bg-2);
    --glass-floating-bg: var(--bg-2);
    --surface-bg: var(--bg-2);
    --glass-distortion: 0;
    --glass-distortion-strong: 0;
    --glass-active-bg: var(--bg-elev);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Keep the static material; skip the optional displacement pass. */
  :is(.glass, .glass--strong, .card:not(.surface), .btn, .tab, .link,
      .page-link, .chip, .about-resume__tools span, .ulsw [role="tab"])::after {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
/* ================= END REFRACTIVE-GLASS SYSTEM ===================== */

/* Moving tab selection, inspired by React Bits navigation components.
   Geometry follows the active button in both the row and mobile grid. */
.tab-indicator {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  transform-origin: top left;
  border: 1px solid var(--glass-border-hover);
  border-radius: calc(var(--radius-sm) - 4px);
  background: var(--glass-active-bg);
  box-shadow: inset 0 -2px 0 var(--cyan), inset 0 1px 0 var(--glass-highlight-strong);
}

.tablist.has-indicator > .tab {
  z-index: 1;
}

.tablist.has-indicator > .tab[aria-selected="true"] {
  --_glass-bg: transparent;
  border-color: transparent;
  box-shadow: none;
}

.tablist.has-indicator > .tab[aria-selected="true"]::before {
  box-shadow: none;
}

/* ===================================================================
   Reduced Motion Accessibility Rules
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

}
