:root {
  color-scheme: light;
  --bg: #f3f3f3;
  --glass-blur: 12px;
  --radius: 0;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 0;
  --radius-xl: 0;
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.10);
  --shadow-dark: 0 14px 32px rgba(0, 0, 0, 0.22);
  --border-soft: #e4e4e4;
  --border-light: rgba(0, 0, 0, 0.1);
  --border-dark: rgba(255, 255, 255, 0.12);
  --glass-white: rgba(255, 255, 255, 0.82);
  --glass-white-hi: rgba(255, 255, 255, 0.52);
  --glass-black: rgba(0, 0, 0, 0.62);
  --glass-black-hi: rgba(255, 255, 255, 0.08);
  --text: #101010;
  --text-soft: #4f4f4f;
  --text-muted: #6f6f6f;
  --text-on-dark: rgba(255, 255, 255, 0.94);
  --text-on-dark-muted: rgba(255, 255, 255, 0.74);
  --cobalt: #1e40af;
  --page-max: 1000px;
  --page-pad: clamp(0.8rem, 2.3vw, 1rem);
  --section-gap: clamp(0.85rem, 2.5vw, 1.1rem);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: linear-gradient(180deg, #f9f9f9 0%, var(--bg) 100%);
}

main,
.site-footer {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--page-pad);
}

main {
  display: grid;
  gap: var(--section-gap);
}

.site-header.site-header--fullbleed {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.55) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: var(--shadow-dark);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.site-header__inner,
.site-header-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--page-pad);
  display: grid;
  gap: 0.75rem;
}

.glass-white {
  background: var(--glass-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.glass-black {
  background: var(--glass-black);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-dark);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.hero-copy,
.table-card {
  background: var(--glass-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.hero-copy {
  width: 100%;
  padding: 0.9rem 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.6rem;
  line-height: 1.25;
  color: var(--text);
}

h1 {
  font-size: clamp(1.35rem, 4.1vw, 1.9rem);
}

h2 {
  font-size: clamp(1.18rem, 3.5vw, 1.5rem);
}

h3 {
  font-size: clamp(1.04rem, 3vw, 1.22rem);
}

.brand-title {
  margin: 0 0 0.6rem;
  line-height: 1.25;
  color: var(--text);
  font-size: clamp(1.45rem, 4.2vw, 2rem);
  font-weight: 700;
}

p,
ul,
ol,
address {
  margin: 0 0 0.85rem;
}

small,
.meta-text {
  color: var(--text-muted);
}

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

a:not(.btn):not(.glossary-term):hover {
  color: #000;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
  border-radius: 0;
}

.nav-shell {
  border-radius: 0;
  padding: 0.6rem;
}

.navbar {
  display: flex;
  gap: 0.45rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.navbar::-webkit-scrollbar {
  height: 6px;
}

.navbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.navbar a,
.theme-toggle,
.practice-subnav a {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0;
  transition: background-color 150ms ease, border-color 150ms ease, transform 120ms ease;
}

.navbar a {
  padding: clamp(0.4rem, 1.6vw, 0.5rem) clamp(0.68rem, 2.2vw, 0.85rem);
  color: #0b0b0b;
  background: rgba(245, 245, 245, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: var(--radius-sm);
  font-weight: 650;
  font-size: clamp(0.86rem, 2.6vw, 0.96rem);
  white-space: nowrap;
  flex: 0 0 auto;
}

.theme-toggle {
  padding: clamp(0.4rem, 1.6vw, 0.5rem) clamp(0.68rem, 2.2vw, 0.85rem);
  color: #0b0b0b;
  background: rgba(245, 245, 245, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: var(--radius-sm);
  font-weight: 650;
  font-size: clamp(0.86rem, 2.6vw, 0.96rem);
  white-space: nowrap;
  flex: 0 0 auto;
  font-family: inherit;
  cursor: pointer;
}

.practice-subnav a {
  color: var(--text);
  border: 1px solid rgba(0, 0, 0, 0.11);
  background: rgba(255, 255, 255, 0.85);
}

.navbar a:hover {
  background: rgba(251, 251, 251, 0.98);
  transform: translateY(-1px);
}

.theme-toggle:hover {
  background: rgba(251, 251, 251, 0.98);
  transform: translateY(-1px);
}

.practice-subnav a:hover {
  background: #efefef;
  border-color: #cfcfcf;
}

.navbar a:active {
  transform: translateY(0px);
}

.theme-toggle:active {
  transform: translateY(0px);
}

.table-card {
  width: 100%;
  padding: clamp(0.8rem, 2.4vw, 1rem);
  margin: 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.table-card > :first-child.section-title,
.table-card > h2.section-title,
.table-card > h3.section-title {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
  margin-bottom: 0.75rem;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}

th,
td {
  border: 1px solid rgba(0, 0, 0, 0.11);
  padding: 0.7rem 0.8rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-soft);
  font-weight: 700;
  letter-spacing: 0.01em;
}

tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

tbody tr:hover {
  background: rgba(30, 64, 175, 0.09);
}

tbody tr.row-active td {
  background: rgba(30, 64, 175, 0.14);
  box-shadow: inset 4px 0 0 rgba(30, 64, 175, 0.55);
}

.row-details td {
  color: var(--text-soft);
}

.row-key-points td {
  background: rgba(0, 0, 0, 0.04);
}

.row-related-videos td,
.row-takeaways td {
  background: rgba(0, 0, 0, 0.025);
}

.media-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md);
  padding: clamp(0.72rem, 2.2vw, 0.9rem);
  margin-top: 0.8rem;
}

.media-row {
  display: grid;
  gap: 0.75rem;
}

.media-embed-wrap {
  width: 100%;
}

.media-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: stretch;
}

.media-actions .btn {
  flex: 1 1 180px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 0.44rem 0.8rem;
  font-weight: 600;
}

.btn-primary {
  background: #ffffff;
}

.btn-youtube {
  background: #ff0033;
  border-color: #d8002a;
  color: #fff;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-youtube:hover,
.btn-youtube:focus-visible {
  background: var(--cobalt);
  border-color: #1d3593;
  color: #fff;
}

.notice {
  margin: 0.5rem 0 1rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
  border-left: 4px solid rgba(0, 0, 0, 0.35);
  border-radius: 0;
  padding: 0.55rem 0.7rem;
}

.back-link {
  font-weight: 600;
  text-decoration: none;
}

.video-embed-wrap {
  width: 100%;
}

.video-embed {
  width: 100%;
  min-height: clamp(190px, 40vw, 300px);
  border: 1px solid #d6d6d6;
  border-radius: var(--radius-sm);
}

.brand-lockup {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  margin-bottom: 0;
}

.brand-logo-panel {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 100%;
  width: 100%;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.brand-home {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
}

.brand-home:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}

.brand-logo-panel::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(120deg, rgba(30, 64, 175, 0) 18%, rgba(30, 64, 175, 0.3) 34%, rgba(255, 255, 255, 0.42) 50%, rgba(30, 64, 175, 0.24) 66%, rgba(30, 64, 175, 0) 82%);
  transform: translateX(-30%) rotate(8deg);
  filter: blur(0.35px);
  opacity: 1;
  pointer-events: none;
  animation: twlo-glimmer 6.5s linear infinite;
}

.brand-logo-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(30, 64, 175, 0.1), transparent 55%), radial-gradient(circle at 80% 70%, rgba(0, 0, 0, 0.06), transparent 60%);
  opacity: 0.85;
  mix-blend-mode: multiply;
  pointer-events: none;
  animation: twlo-hue 10s ease-in-out infinite alternate;
}


.brand-logo {
  width: clamp(160px, 12vw, 220px);
  height: clamp(160px, 12vw, 220px);
  flex-shrink: 0;
  opacity: 0.9;
}

.brand-subtitle,
.practice-intro,
.related-note,
.cta-row,
.footer-disclaimer {
  color: var(--text-soft);
}

.brand-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
}

.practice-juvenile h3 {
  margin: 0.25rem 0 0.9rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--border-soft);
}

.practice-intro {
  margin-top: 0.35rem;
  font-size: 1.05rem;
}

.related-note {
  margin: 0.2rem 0;
  font-weight: 600;
}

.practice-juvenile ul {
  margin: 0.35rem 0 0.25rem 1rem;
  padding: 0;
}

.juvenile-court-scene td strong {
  white-space: nowrap;
}

.juvenile-court-scene td {
  line-height: 1.5;
  border-left: none;
  border-right: none;
}

.juvenile-court-scene table {
  width: 100%;
}

.practice-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.practice-subnav a {
  padding: 0.5rem 0.85rem;
  white-space: nowrap;
}

.practice-subnav a:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.navbar a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.92);
  outline-offset: 2px;
}

.theme-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.92);
  outline-offset: 2px;
}

.site-footer {
  background: var(--glass-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.footer-block h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.footer-block p {
  margin: 0.2rem 0;
}

.footer-disclaimer {
  margin-top: 0.8rem;
  font-size: 0.9rem;
}

.cta-row {
  margin-bottom: 0;
}

@keyframes twlo-glimmer {
  0% {
    transform: translateX(-35%) rotate(8deg);
  }

  100% {
    transform: translateX(35%) rotate(8deg);
  }
}

@keyframes twlo-hue {
  0% {
    filter: hue-rotate(0deg);
  }

  100% {
    filter: hue-rotate(14deg);
  }
}

@keyframes twlo-glimmer-wide {
  0% {
    transform: translateX(-40%) rotate(7deg);
  }

  100% {
    transform: translateX(40%) rotate(7deg);
  }
}

/* If you do not see shimmer, check OS reduced motion settings. */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }

  .brand-logo-panel::before,
  .brand-logo-panel::after {
    animation: none;
  }
}

@media (max-width: 640px) {
  .brand-lockup {
    flex-direction: column;
  }

  .brand-logo {
    width: clamp(160px, 45vw, 240px);
    height: clamp(160px, 45vw, 240px);
  }

  .brand-logo-panel {
    padding: 1rem;
  }

  .brand-logo-panel {
    width: 100%;
  }

  .navbar a {
    padding: clamp(0.38rem, 1.3vw, 0.48rem) clamp(0.58rem, 1.9vw, 0.78rem);
    font-size: clamp(0.8rem, 3.4vw, 0.9rem);
  }

  .theme-toggle {
    padding: clamp(0.38rem, 1.3vw, 0.48rem) clamp(0.58rem, 1.9vw, 0.78rem);
    font-size: clamp(0.8rem, 3.4vw, 0.9rem);
  }

  .practice-subnav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .table-card,
  .hero-copy {
    padding: clamp(0.72rem, 2.5vw, 0.85rem);
  }

  .media-actions .btn {
    width: 100%;
  }

  th,
  td {
    padding: 0.54rem 0.58rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}


.video-fallback {
  display: none;
  margin-top: 0.65rem;
  padding: 0.65rem;
  border: 1px solid #d6d6d6;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.96);
}

.video-fallback--visible {
  display: block;
}

.video-thumb {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #d6d6d6;
  border-radius: var(--radius-sm);
  margin-bottom: 0.55rem;
}

.btn-youtube {
  font-weight: 700;
}

.btn-youtube:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.theme-invert {
  filter: invert(1) hue-rotate(180deg);
}

.theme-invert img,
.theme-invert video,
.theme-invert iframe,
.theme-invert canvas {
  filter: invert(1) hue-rotate(180deg);
}
