/*
 * AgendaSearch Beta — Newspaper Editorial Design System
 * Playfair Display (headings/display) + Lato (body/UI)
 * Inspired by Prototype 01: Newspaper Editorial
 */

/* =====================================================================
   CSS Custom Properties (Design Tokens)
   ===================================================================== */
:root {
  /* Newspaper Ink Palette */
  --as-ink:           #1a1008;
  --as-ink-mid:       #4a3f30;
  --as-ink-light:     #8c7b65;
  --as-rule:          #d4c9b8;
  --as-col-rule:      #c8bfb0;
  --as-bg:            #fdfaf6;

  /* Brand Red */
  --as-red:           #b5261e;
  --as-red-dark:      #8f1e18;
  --as-red-darker:    #6e1713;
  --as-red-light:     #f9eeec;
  --as-red-lighter:   #fdf5f4;

  /* Legacy gray aliases — warm-tinted for consistent Bootstrap compat */
  --as-gray-50:       #fdfaf6;
  --as-gray-100:      #f5f0e8;
  --as-gray-200:      #e8dfd2;
  --as-gray-300:      #d4c9b8;
  --as-gray-400:      #c8bfb0;
  --as-gray-500:      #8c7b65;
  --as-gray-600:      #6b5f4f;
  --as-gray-700:      #4a3f30;
  --as-gray-800:      #2d2416;
  --as-gray-900:      #1a1008;

  /* Semantic Colors */
  --as-success:       #2ecc71;
  --as-success-dark:  #27ae60;
  --as-warning:       #f39c12;
  --as-danger:        var(--as-red);
  --as-info:          #3498db;

  /* Typography */
  --as-font-family:   'Lato', Georgia, serif;
  --as-font-display:  'Playfair Display', Georgia, serif;
  --as-font-size-xs:  0.75rem;   /* 12px */
  --as-font-size-sm:  0.875rem;  /* 14px */
  --as-font-size-base: 1rem;     /* 16px */
  --as-font-size-lg:  1.125rem;  /* 18px */
  --as-font-size-xl:  1.25rem;   /* 20px */
  --as-font-size-2xl: 1.5rem;    /* 24px */
  --as-font-size-3xl: 1.875rem;  /* 30px */
  --as-font-size-4xl: 2.25rem;   /* 36px */

  /* Spacing — tighter for editorial feel */
  --as-radius-sm:     0.125rem;
  --as-radius:        0.25rem;
  --as-radius-lg:     0.375rem;
  --as-radius-xl:     0.5rem;
  --as-radius-pill:   50rem;

  /* Shadows — very subtle, editorial */
  --as-shadow-xs:     0 1px 2px rgba(26,16,8,0.05);
  --as-shadow-sm:     0 1px 3px rgba(26,16,8,0.08), 0 1px 2px rgba(26,16,8,0.05);
  --as-shadow:        0 4px 6px -1px rgba(26,16,8,0.08), 0 2px 4px -1px rgba(26,16,8,0.04);
  --as-shadow-md:     0 10px 15px -3px rgba(26,16,8,0.08), 0 4px 6px -2px rgba(26,16,8,0.04);
  --as-shadow-lg:     0 20px 25px -5px rgba(26,16,8,0.08), 0 10px 10px -5px rgba(26,16,8,0.03);

  /* Layout */
  --as-navbar-height: 46px;  /* nav strip only */
  --as-sidebar-width: 260px;
  --as-content-max:   1280px;

  /* Bootstrap 5 Override Variables */
  --bs-primary:             var(--as-red);
  --bs-primary-rgb:         181, 38, 30;
  --bs-border-radius:       var(--as-radius);
  --bs-font-sans-serif:     var(--as-font-family);
  --bs-body-font-family:    var(--as-font-family);
  --bs-body-color:          var(--as-ink);
  --bs-border-color:        var(--as-rule);
  --bs-link-color:          var(--as-red);
  --bs-link-hover-color:    var(--as-red-dark);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--as-font-family);
  font-size: var(--as-font-size-base);
  color: var(--as-ink);
  background-color: var(--as-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile: lock out horizontal scrolling site-wide. Belt-and-suspenders on top
   of fixing individual overflow sources — guarantees no stray element (a long
   URL, a wide mock, a fixed min-width) can produce a horizontal scrollbar on a
   phone. Applied to body (not html) so the sticky masthead keeps working, and
   inner scroll containers (responsive tables, code blocks) still scroll on
   their own. */
@media (max-width: 767.98px) {
  body { overflow-x: hidden; }
}

/* =====================================================================
   Bootstrap 5 — Primary Color Overrides
   ===================================================================== */
.btn-primary {
  --bs-btn-bg:                  var(--as-red);
  --bs-btn-border-color:        var(--as-red);
  --bs-btn-hover-bg:            var(--as-red-dark);
  --bs-btn-hover-border-color:  var(--as-red-dark);
  --bs-btn-active-bg:           var(--as-red-darker);
  --bs-btn-focus-shadow-rgb:    181, 38, 30;
}

.btn-outline-primary {
  --bs-btn-color:               var(--as-red);
  --bs-btn-border-color:        var(--as-red);
  --bs-btn-hover-bg:            var(--as-red);
  --bs-btn-hover-border-color:  var(--as-red);
  --bs-btn-active-bg:           var(--as-red-dark);
}

.text-primary   { color: var(--as-red) !important; }
.bg-primary     { background-color: var(--as-red) !important; }
.border-primary { border-color: var(--as-red) !important; }

.form-control:focus,
.form-select:focus {
  border-color: var(--as-ink);
  box-shadow: 0 0 0 0.2rem rgba(26, 16, 8, 0.12);
}

.form-check-input:checked {
  background-color: var(--as-red);
  border-color: var(--as-red);
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(181, 38, 30, 0.2);
}

.nav-link.active,
.nav-pills .nav-link.active {
  background-color: var(--as-ink);
}

.page-link {
  color: var(--as-red);
  font-family: var(--as-font-family);
}
.page-link:hover {
  color: var(--as-red-dark);
}
.page-item.active .page-link {
  background-color: var(--as-ink);
  border-color: var(--as-ink);
}

.badge.bg-primary { background-color: var(--as-red) !important; }

/* =====================================================================
   Masthead / Navigation — Newspaper Editorial
   ===================================================================== */

/* The whole masthead header */
.as-masthead {
  background: var(--as-white, #fff);
  border-bottom: 3px double var(--as-ink);
  position: sticky;
  top: 0;
  z-index: 1030;
}

/* Top bar: date · tagline · auth links */
.as-masthead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 1.5rem;
  border-bottom: 1px solid var(--as-rule);
  font-family: var(--as-font-family);
}

.as-masthead-date {
  font-size: 0.7rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--as-ink-light);
}

.as-masthead-tagline {
  font-size: 0.7rem;
  color: var(--as-ink-light);
  font-style: italic;
}

.as-masthead-auth-link {
  font-family: var(--as-font-family);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--as-ink);
  transition: color 0.12s;
}

.as-masthead-auth-link:hover { color: var(--as-red); }

.as-masthead-auth-link.subscribe { color: var(--as-red); }
.as-masthead-auth-link.subscribe:hover { color: var(--as-red-dark); }

/* Brand row */
.as-masthead-brand-row {
  border-bottom: 1px solid var(--as-ink);
}

/* Brand (Playfair Display) */
.as-brand {
  font-family: var(--as-font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--as-ink);
  letter-spacing: -0.02em;
  line-height: 1;
  text-decoration: none;
}

.as-brand em {
  color: var(--as-red);
  font-style: italic;
}

.as-brand:hover { color: var(--as-ink); text-decoration: none; }

/* Desktop brand (centered) */
.as-masthead-brand-desktop {
  text-align: center;
  padding: 0.875rem 1.5rem;
}

.as-masthead-sub {
  font-family: var(--as-font-family);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--as-ink-light);
  margin-top: 0.25rem;
}

/* Mobile brand (left-aligned, compact) */
.as-masthead-brand-mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
}

.as-brand-mobile {
  font-family: var(--as-font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--as-ink);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.as-brand-mobile em { color: var(--as-red); font-style: italic; }
.as-brand-mobile:hover { color: var(--as-ink); text-decoration: none; }

.as-mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--as-ink);
  color: #fff;
  border: none;
  border-radius: 0;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}
.as-mobile-menu-btn:hover,
.as-mobile-menu-btn:focus,
.as-mobile-menu-btn:active {
  background: var(--as-ink);
  color: #fff;
  outline: none;
  box-shadow: none;
}

/* Nav links strip */
.as-masthead-nav {
  background: var(--as-white, #fff);
  border-bottom: 1px solid var(--as-rule);
}

/* Nav links */
.as-nav-link {
  font-family: var(--as-font-family);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--as-ink);
  padding: 0.55rem 1.25rem;
  border-right: 1px solid var(--as-rule);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.as-nav-link:first-child { border-left: 1px solid var(--as-rule); }

.as-nav-link:hover,
.as-nav-link.active {
  background: var(--as-ink);
  color: #fff;
  text-decoration: none;
}

/* Mobile nav collapse */
.as-masthead-nav .navbar-collapse {
  border-top: 1px solid var(--as-rule);
}

.as-masthead-nav .navbar-collapse .as-nav-link {
  border-left: none;
  border-right: none;
  border-bottom: 1px solid var(--as-rule);
  padding: 0.65rem 1.25rem;
}

/* Subscription status badge */
.as-sub-badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: var(--as-radius-pill);
  background: var(--as-red-light);
  color: var(--as-red-dark);
  vertical-align: middle;
  margin-left: 0.35rem;
}

.as-sub-badge.active {
  background: #d1f7e0;
  color: #1a7a40;
}

/* Dropdown in nav */
.as-masthead .dropdown-menu {
  border: 1px solid var(--as-rule);
  border-radius: 0;
  box-shadow: var(--as-shadow-md);
  padding: 0.375rem;
  min-width: 180px;
}

.as-masthead .dropdown-item {
  font-family: var(--as-font-family);
  font-size: var(--as-font-size-sm);
  padding: 0.4rem 0.875rem;
  color: var(--as-ink);
  border-radius: 0;
  font-weight: 400;
}

.as-masthead .dropdown-item:hover {
  background: var(--as-red-lighter);
  color: var(--as-red);
}

.as-masthead .dropdown-divider {
  margin: 0.3rem 0;
  border-color: var(--as-rule);
}

/* =====================================================================
   Page Layout
   ===================================================================== */
.as-page {
  min-height: calc(100vh - var(--as-navbar-height));
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.as-page-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--as-ink);
}

.as-page-title {
  font-family: var(--as-font-display);
  font-size: var(--as-font-size-2xl);
  font-weight: 700;
  color: var(--as-ink);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.as-page-subtitle {
  font-size: var(--as-font-size-sm);
  color: var(--as-ink-light);
  font-style: italic;
  margin-bottom: 0;
}

/* =====================================================================
   Cards
   ===================================================================== */
.as-card {
  background: #fff;
  border: 1px solid var(--as-rule);
  border-radius: 0;
  box-shadow: none;
  transition: box-shadow 0.2s ease;
}

.as-card:hover {
  box-shadow: var(--as-shadow-sm);
}

.as-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--as-rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.as-card-title {
  font-family: var(--as-font-display);
  font-size: var(--as-font-size-base);
  font-weight: 700;
  color: var(--as-ink);
  margin: 0;
  letter-spacing: -0.01em;
}

.as-card-body {
  padding: 1.25rem;
}

/* =====================================================================
   Auth Pages
   ===================================================================== */
.as-auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--as-bg);
  padding: 1.5rem;
}

.as-auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border: 1px solid var(--as-rule);
  border-top: 3px solid var(--as-ink);
  border-radius: 0;
  box-shadow: var(--as-shadow-lg);
  overflow: hidden;
}

.as-auth-header {
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--as-gray-100);
}

.as-auth-header img {
  height: 40px;
  width: auto;
  margin-bottom: 1.25rem;
}

.as-auth-title {
  font-family: var(--as-font-display);
  font-size: var(--as-font-size-xl);
  font-weight: 700;
  color: var(--as-ink);
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.as-auth-subtitle {
  font-size: var(--as-font-size-sm);
  color: var(--as-ink-light);
  font-style: italic;
}

.as-auth-body {
  padding: 1.75rem 2rem;
}

.as-auth-footer {
  padding: 1rem 2rem 1.75rem;
  text-align: center;
  background: var(--as-gray-50);
  border-top: 1px solid var(--as-rule);
  font-size: var(--as-font-size-sm);
  color: var(--as-ink-light);
}

/* =====================================================================
   Forms
   ===================================================================== */
.form-label {
  font-size: var(--as-font-size-sm);
  font-weight: 700;
  color: var(--as-ink);
  margin-bottom: 0.35rem;
}

.form-control,
.form-select {
  font-family: var(--as-font-family);
  font-size: var(--as-font-size-sm);
  border-color: var(--as-rule);
  border-radius: var(--as-radius);
  padding: 0.55rem 0.875rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background-color: #fff;
  color: var(--as-ink);
}

.form-control::placeholder {
  color: var(--as-ink-light);
  font-style: italic;
}

.form-text {
  font-size: var(--as-font-size-xs);
  color: var(--as-ink-light);
}

/* Password visibility toggle */
.as-password-group {
  position: relative;
}

.as-password-toggle {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--as-ink-light);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  font-size: 1rem;
}

.as-password-toggle:hover {
  color: var(--as-ink);
}

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
  font-family: var(--as-font-family);
  font-size: var(--as-font-size-sm);
  font-weight: 700;
  border-radius: 0;
  padding: 0.5rem 1rem;
  transition: all 0.15s ease;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.btn-lg {
  padding: 0.65rem 1.375rem;
  font-size: var(--as-font-size-base);
}

.btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: var(--as-font-size-xs);
}

/* =====================================================================
   Alerts / Messages
   ===================================================================== */
.as-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--as-radius);
  font-size: var(--as-font-size-sm);
  font-weight: 500;
  border: 1px solid;
}

.as-alert-error {
  background: var(--as-red-light);
  color: var(--as-red-dark);
  border-color: rgba(181, 38, 30, 0.25);
}

.as-alert-success {
  background: #d1f7e0;
  color: #1a7a40;
  border-color: rgba(46, 204, 113, 0.3);
}

.as-alert-info {
  background: #dbeafe;
  color: #1e40af;
  border-color: rgba(52, 152, 219, 0.3);
}

/* =====================================================================
   Document Badges / Type Pills — Outlined newspaper style
   ===================================================================== */
.as-doc-type {
  display: inline;
  font-family: var(--as-font-family);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.as-doc-type-agenda,
.as-doc-type-minutes,
.as-doc-type-notice,
.as-doc-type-other   { color: var(--as-ink); }

/* =====================================================================
   Search Bar
   ===================================================================== */
.as-search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.as-search-input {
  width: 100%;
  padding: 0.65rem 3rem 0.65rem 0.875rem;
  font-family: var(--as-font-family);
  font-size: var(--as-font-size-base);
  border: 1.5px solid var(--as-ink);
  border-radius: 0;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  color: var(--as-ink);
}

.as-search-input::placeholder {
  color: var(--as-ink-light);
  font-style: italic;
}

.as-search-input:focus {
  background: #fff;
  border-color: var(--as-red);
  box-shadow: 0 0 0 2px rgba(181, 38, 30, 0.1);
}

.as-search-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  background: var(--as-red);
  color: #fff;
  border: none;
  border-radius: 0;
  padding: 0.5rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--as-font-family);
  font-size: var(--as-font-size-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background-color 0.15s ease;
}

.as-search-btn:hover {
  background: var(--as-red-dark);
}

.as-search-clear {
  position: absolute;
  right: 5.5rem;
  background: none;
  border: none;
  color: var(--as-ink-light);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  font-size: 1rem;
  transition: color 0.15s ease;
}

.as-search-clear:hover {
  color: var(--as-ink);
}

/* Autocomplete dropdown */
.as-autocomplete {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--as-ink);
  border-radius: 0;
  box-shadow: var(--as-shadow-md);
  z-index: 1050;
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.as-autocomplete-item {
  padding: 0.6rem 0.875rem;
  font-family: var(--as-font-family);
  font-size: var(--as-font-size-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--as-gray-100);
  transition: background-color 0.1s ease;
}

.as-autocomplete-item:last-child {
  border-bottom: none;
}

.as-autocomplete-item:hover,
.as-autocomplete-item.selected {
  background-color: var(--as-red-lighter);
  color: var(--as-red-dark);
}

.as-autocomplete-label {
  font-size: var(--as-font-size-xs);
  color: var(--as-ink-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  padding: 0.4rem 0.875rem 0.2rem;
}

/* =====================================================================
   Hero Section (Public Homepage) — Editorial Masthead Style
   ===================================================================== */
.as-hero {
  background: var(--as-bg);
  color: var(--as-ink);
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
  border-bottom: 3px double var(--as-ink);
}

.as-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent calc(100% / 12 - 1px),
    rgba(212, 201, 184, 0.25) calc(100% / 12 - 1px),
    rgba(212, 201, 184, 0.25) calc(100% / 12)
  );
  pointer-events: none;
}

.as-hero-title {
  font-family: var(--as-font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  color: var(--as-ink);
}

.as-hero-title span {
  color: var(--as-red);
  font-style: italic;
}

.as-hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--as-ink-mid);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.65;
  font-weight: 300;
}

.as-hero-search-wrap {
  max-width: 600px;
}

.as-hero .as-search-input {
  background: #fff;
  border: 1.5px solid var(--as-ink);
  font-size: var(--as-font-size-lg);
  padding: 0.875rem 6rem 0.875rem 1rem;
}

.as-hero .as-search-input:focus {
  border-color: var(--as-red);
}

.as-hero .as-search-btn {
  right: 0;
  padding: 0.625rem 1.25rem;
  font-size: var(--as-font-size-base);
}

.as-stats-bar {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.as-stat {
  display: flex;
  flex-direction: column;
}

.as-stat-value {
  font-family: var(--as-font-display);
  font-size: var(--as-font-size-2xl);
  font-weight: 700;
  color: var(--as-ink);
  line-height: 1.2;
}

.as-stat-label {
  font-size: var(--as-font-size-xs);
  color: var(--as-ink-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* =====================================================================
   Document Result Cards — Newspaper Entry Style
   ===================================================================== */
.as-doc-card {
  background: #fff;
  border: 1px solid transparent;
  border-bottom: 1px solid var(--as-rule);
  border-radius: 0;
  padding: 1.1rem 1rem 1.1rem 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}

.as-doc-card:hover {
  background: #fff;
  border-color: var(--as-red);
  box-shadow: 0 0 0 1px var(--as-red);
  color: inherit;
  text-decoration: none;
}

.as-doc-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.as-doc-card-entity {
  font-family: var(--as-font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--as-ink);
  letter-spacing: -0.01em;
}

.as-doc-card-date {
  font-size: var(--as-font-size-xs);
  font-weight: 300;
  color: var(--as-ink-light);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.as-doc-card-snippet {
  font-family: var(--as-font-family);
  font-size: var(--as-font-size-sm);
  color: var(--as-ink-mid);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.as-doc-card-snippet em {
  font-style: normal;
  background: #fef3c7;
  color: #78350f;
  border-radius: 0;
  padding: 0 2px;
}

/* Bookmark button on card */
.as-bookmark-btn {
  background: none;
  border: none;
  padding: 0.25rem;
  color: var(--as-ink-light);
  cursor: pointer;
  transition: color 0.15s ease;
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.as-bookmark-btn:hover  { color: var(--as-red); }
.as-bookmark-btn.active { color: var(--as-red); }

/* =====================================================================
   Document Table (Browse / Tabular Results)
   ===================================================================== */
.as-doc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--as-font-family);
}

.as-doc-table th {
  font-size: var(--as-font-size-xs);
  font-weight: 700;
  color: var(--as-ink);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.65rem 1rem;
  background: var(--as-gray-50);
  border-bottom: 2px solid var(--as-ink);
  white-space: nowrap;
}

.as-doc-table th:first-child { border-radius: 0; }
.as-doc-table th:last-child  { border-radius: 0; }

.as-doc-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--as-rule);
  font-size: var(--as-font-size-sm);
  vertical-align: middle;
}

.as-doc-table tr:hover td {
  background-color: var(--as-red-lighter);
}

.as-doc-table tr:last-child td { border-bottom: none; }

.as-doc-table .as-entity-name {
  font-family: var(--as-font-display);
  font-weight: 700;
  color: var(--as-ink);
  font-size: 0.875rem;
}

.as-doc-table a {
  color: var(--as-red);
  text-decoration: none;
  font-weight: 500;
}

.as-doc-table a:hover {
  text-decoration: underline;
}

.as-doc-table a.btn {
  color: var(--bs-btn-color);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0;
}

.as-doc-table a.btn:hover {
  color: var(--bs-btn-hover-color);
  text-decoration: none;
}

/* =====================================================================
   Filter Panel
   ===================================================================== */
.as-filter-panel {
  background: #fff;
  border: 1px solid var(--as-rule);
  border-radius: 0;
  overflow: hidden;
}

.as-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 2px solid var(--as-ink);
  font-family: var(--as-font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--as-ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.as-filter-badge {
  background: var(--as-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--as-radius-pill);
  min-width: 1.3em;
  text-align: center;
}

.as-filter-section {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--as-gray-100);
}

.as-filter-section:last-child {
  border-bottom: none;
}

.as-filter-label {
  font-family: var(--as-font-family);
  font-size: var(--as-font-size-xs);
  font-weight: 700;
  color: var(--as-ink-light);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
  display: block;
}

/* Date preset chips */
.as-date-presets,
.as-body-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.as-preset-chip {
  font-family: var(--as-font-family);
  font-size: var(--as-font-size-xs);
  font-weight: 500;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--as-rule);
  border-radius: 0;
  background: #fff;
  color: var(--as-ink-mid);
  cursor: pointer;
  transition: all 0.15s ease;
}

.as-preset-chip:hover,
.as-preset-chip.active {
  background: var(--as-ink);
  border-color: var(--as-ink);
  color: #fff;
}

/* =====================================================================
   Saved Search Cards
   ===================================================================== */
.as-saved-card {
  background: #fff;
  border: 1px solid var(--as-rule);
  border-radius: 0;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.as-saved-card:hover {
  box-shadow: var(--as-shadow-sm);
}

.as-saved-card-header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--as-rule);
}

.as-saved-card-name {
  font-family: var(--as-font-display);
  font-weight: 700;
  font-size: var(--as-font-size-base);
  color: var(--as-ink);
  cursor: pointer;
  letter-spacing: -0.01em;
}

.as-saved-card-name:hover {
  color: var(--as-red);
}

.as-saved-card-meta {
  padding: 0.5rem 1.25rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.as-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  background: var(--as-gray-100);
  border-radius: 0;
  font-size: var(--as-font-size-xs);
  font-weight: 500;
  color: var(--as-ink-mid);
  border: 1px solid var(--as-rule);
}

.as-filter-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.15rem;
  color: var(--as-ink-light);
  text-decoration: none;
  font-size: .9rem;
  line-height: 1;
}
.as-filter-chip-remove:hover {
  color: var(--as-red);
}

.as-saved-card-footer {
  padding: 0.75rem 1.25rem;
  background: var(--as-gray-50);
  border-top: 1px solid var(--as-rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Alert toggle switch */
.as-alert-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--as-font-size-sm);
  color: var(--as-ink-mid);
  font-weight: 500;
  cursor: pointer;
}

.as-alert-settings {
  padding: 1rem 1.25rem;
  background: var(--as-red-lighter);
  border-top: 1px solid rgba(181, 38, 30, 0.15);
}

/* =====================================================================
   Footer — Dark with Editorial Typography
   ===================================================================== */
.as-footer {
  background: var(--as-ink);
  color: rgba(253, 250, 246, 0.6);
  padding: 2.5rem 0;
  font-family: var(--as-font-family);
  font-size: var(--as-font-size-sm);
  margin-top: auto;
}

@media (max-width: 767.98px) {
  .as-footer { padding: 1.75rem 0 1.5rem; }
}

.as-footer a {
  color: rgba(253, 250, 246, 0.7);
  text-decoration: none;
  transition: color 0.15s ease;
}

.as-footer a:hover {
  color: #fdfaf6;
}

.as-footer-brand {
  font-family: var(--as-font-display);
  color: #fdfaf6;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  font-style: italic;
}

.as-footer-heading {
  font-family: 'Lato', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(253, 250, 246, 0.3);
  margin-bottom: 0.75rem;
}

.as-footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.as-footer-copy {
  color: rgba(253, 250, 246, 0.35);
  font-size: var(--as-font-size-xs);
}

/* Mobile compact footer */
.as-footer-mobile {
  padding: 0.25rem 0 0.5rem;
  text-align: center;
}

.as-footer-mobile .as-footer-brand {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.as-footer-rule {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(253,250,246,0.18) 20%,
    rgba(253,250,246,0.18) 80%,
    transparent 100%);
  margin: 0 auto 1rem;
  max-width: 240px;
}

.as-footer-mobile-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  font-size: 0.875rem;
  margin-bottom: 1.1rem;
  padding: 0 0.5rem;
}

.as-footer-mobile-links a {
  font-family: var(--as-font-display);
  font-size: 1rem;
  color: rgba(253, 250, 246, 0.78);
  letter-spacing: 0.005em;
  line-height: 1.6;
}

.as-footer-mobile-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: rgba(253, 250, 246, 0.35);
  font-family: 'Lato', sans-serif;
  letter-spacing: 0.03em;
}

.as-footer-mobile-meta a {
  color: rgba(253, 250, 246, 0.45);
}

.as-footer-dot {
  color: rgba(253, 250, 246, 0.2);
}

/* =====================================================================
   Help & Tutorials page
   ===================================================================== */
.as-help-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

.as-help-toc {
  position: sticky;
  top: 1rem;
  padding: 1.25rem 0;
  border-right: 1px solid var(--as-rule);
  padding-right: 1.25rem;
}

.as-help-toc-title {
  font-family: 'Lato', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--as-ink-light);
  margin-bottom: 0.75rem;
}

.as-help-toc nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.as-help-toc a {
  font-family: var(--as-font-family);
  font-size: 0.85rem;
  color: var(--as-ink-mid);
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: all 0.15s ease;
}

.as-help-toc a:hover {
  color: var(--as-ink);
  background: rgba(0, 0, 0, 0.02);
}

.as-help-toc a.active {
  color: var(--as-red);
  border-left-color: var(--as-red);
  font-weight: 600;
}

.as-help-content {
  min-width: 0;
  padding-bottom: 3rem;
}

.as-help-section {
  background: #fff;
  border: 1px solid var(--as-rule);
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
  scroll-margin-top: 1.5rem;
}

.as-help-kicker {
  font-family: 'Lato', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--as-red);
  margin-bottom: 0.5rem;
}

.as-help-section h2 {
  font-family: var(--as-font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--as-ink);
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

.as-help-section p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--as-ink-mid);
  margin-bottom: 1rem;
}

.as-help-section code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875em;
  background: var(--as-bg);
  border: 1px solid var(--as-rule);
  padding: 0.1em 0.4em;
  color: var(--as-ink);
  /* Was white-space:nowrap, which let long inline tokens (e.g. the
     /api/v1/openapi.json URL) push the page wider than a phone viewport and
     cause a slight horizontal scroll. Allow wrapping; break only when a single
     token is too long for the line. */
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Code *blocks* keep their preformatting — the <pre> already provides its own
   overflow-x:auto scroll, so they never affect page width. */
.as-help-section pre code {
  white-space: pre;
  overflow-wrap: normal;
}

.as-help-section kbd {
  font-family: 'Lato', sans-serif;
  font-size: 0.75rem;
  background: var(--as-ink);
  color: #fff;
  padding: 0.15em 0.45em;
  border-radius: 3px;
}

.as-help-section ul {
  padding-left: 1.25rem;
  color: var(--as-ink-mid);
  line-height: 1.7;
}

.as-help-section ul li { margin-bottom: 0.25rem; }

/* Callouts */
.as-help-callout {
  background: var(--as-red-light, #fdf5f4);
  border-left: 3px solid var(--as-red);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--as-ink);
}

.as-help-callout strong { color: var(--as-ink); }

.as-help-callout-warn {
  background: #fff8e6;
  border-left-color: #d4a017;
}

/* Feature grid */
.as-help-grid-3,
.as-help-grid-2 {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0;
}
.as-help-grid-3 { grid-template-columns: repeat(3, 1fr); }
.as-help-grid-2 { grid-template-columns: repeat(2, 1fr); }

.as-help-feature,
.as-help-filter-card {
  border: 1px solid var(--as-rule);
  padding: 1rem 1.1rem;
  background: var(--as-bg);
}

.as-help-feature strong,
.as-help-filter-card strong {
  display: block;
  font-family: var(--as-font-display);
  font-size: 1rem;
  color: var(--as-ink);
  margin-bottom: 0.3rem;
}

.as-help-feature p,
.as-help-filter-card p {
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.55;
}

.as-help-feature-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--as-rule);
  color: var(--as-red);
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.as-help-badge {
  display: inline-block;
  font-family: 'Lato', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--as-ink);
  color: #fff;
  padding: 0.15em 0.5em;
  margin-left: 0.4em;
  vertical-align: middle;
}

/* Figures — mockup visual aids */
.as-help-figure {
  margin: 1.25rem 0;
  padding: 1.5rem;
  background: var(--as-bg);
  border: 1px solid var(--as-rule);
  text-align: center;
}

.as-help-figure figcaption {
  margin-top: 0.85rem;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--as-ink-light);
}

/* Mock: search bar */
.as-mock-searchbar {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  border: 1px solid var(--as-ink);
  padding: 0.7rem 1rem;
  min-width: 360px;
  max-width: 100%;
  text-align: left;
  box-shadow: 3px 3px 0 var(--as-rule);
}
.as-mock-icon { color: var(--as-ink-light); font-size: 1rem; }
.as-mock-placeholder {
  flex: 1;
  font-family: var(--as-font-family);
  color: var(--as-ink);
  font-size: 0.95rem;
}
.as-mock-kbd {
  font-family: 'Lato', sans-serif;
  font-size: 0.75rem;
  background: var(--as-ink);
  color: #fff;
  padding: 0.2em 0.55em;
}

/* Mock: mode tabs */
.as-mock-tabs {
  display: inline-flex;
  border: 1px solid var(--as-ink);
  background: #fff;
}
.as-mock-tab {
  padding: 0.55rem 1.25rem;
  font-family: var(--as-font-family);
  font-size: 0.85rem;
  color: var(--as-ink-mid);
  border-right: 1px solid var(--as-rule);
  cursor: default;
}
.as-mock-tab:last-child { border-right: 0; }
.as-mock-tab.active {
  background: var(--as-ink);
  color: #fff;
  font-weight: 600;
}

/* Mock: chips */
.as-mock-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}
.as-mock-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fff;
  border: 1px solid var(--as-rule);
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
  color: var(--as-ink);
  font-family: var(--as-font-family);
}
.as-mock-chip i.bi-x {
  color: var(--as-ink-light);
  margin-left: 0.2rem;
  cursor: pointer;
}
.as-mock-chip.sm {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
}

/* Mock: result card */
.as-mock-result {
  position: relative;
  text-align: left;
  background: #fff;
  border: 1px solid var(--as-rule);
  padding: 1rem 1.25rem;
  max-width: 540px;
  margin: 0 auto;
}
.as-mock-result-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  color: var(--as-ink-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.as-mock-badge {
  background: var(--as-red);
  color: #fff;
  padding: 0.15em 0.55em;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}
.as-mock-result-title {
  font-family: var(--as-font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--as-ink);
  margin-bottom: 0.4rem;
}
.as-mock-result-snippet {
  font-size: 0.85rem;
  color: var(--as-ink-mid);
  line-height: 1.55;
}
.as-mock-result-snippet mark {
  background: #fff3cd;
  color: var(--as-ink);
  padding: 0 0.1em;
}
.as-mock-bookmark {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  background: transparent;
  border: 1px solid var(--as-rule);
  color: var(--as-red);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Mock: saved search card */
.as-mock-saved {
  text-align: left;
  background: #fff;
  border: 1px solid var(--as-rule);
  padding: 1rem 1.25rem;
  max-width: 520px;
  margin: 0 auto;
}
.as-mock-saved-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  font-family: var(--as-font-display);
  font-size: 1rem;
  color: var(--as-ink);
}
.as-mock-saved-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}
.as-mock-saved-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--as-ink-light);
  padding-top: 0.6rem;
  border-top: 1px solid var(--as-rule);
}
.as-mock-status { color: var(--as-red); font-weight: 600; }
.as-mock-toggle {
  width: 38px;
  height: 22px;
  background: var(--as-gray-300, #d4c9b8);
  position: relative;
  border-radius: 11px;
  transition: background 0.2s;
}
.as-mock-toggle.active { background: var(--as-red); }
.as-mock-toggle-dot {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.2s;
}
.as-mock-toggle.active .as-mock-toggle-dot { left: 18px; }

/* Compare columns */
.as-help-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}
.as-help-compare-col {
  background: var(--as-bg);
  border: 1px solid var(--as-rule);
  padding: 1.1rem 1.25rem;
}
.as-help-compare-title {
  font-family: var(--as-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--as-ink);
  margin-bottom: 0.5rem;
}
.as-help-compare-title i { color: var(--as-red); margin-right: 0.3rem; }
.as-help-compare-col p { font-size: 0.9rem; margin-bottom: 0.6rem; }
.as-help-compare-col ul { font-size: 0.85rem; margin: 0; }

/* Syntax table */
.as-help-syntax-table {
  border: 1px solid var(--as-rule);
  margin: 1.25rem 0;
  background: #fff;
}
.as-help-syntax-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  border-bottom: 1px solid var(--as-rule);
}
.as-help-syntax-row:last-child { border-bottom: 0; }
.as-help-syntax-op {
  padding: 0.9rem 1rem;
  background: var(--as-bg);
  border-right: 1px solid var(--as-rule);
  display: flex;
  align-items: center;
}
.as-help-syntax-op code { white-space: nowrap; }
.as-help-syntax-desc {
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--as-ink-mid);
}
.as-help-syntax-desc strong { color: var(--as-ink); }
.as-help-syntax-ex {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--as-ink-light);
}

/* Tips */
.as-help-tips {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}
.as-help-tip {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--as-bg);
  border: 1px solid var(--as-rule);
  padding: 1rem 1.25rem;
  font-size: 0.92rem;
  line-height: 1.6;
}
.as-help-tip-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--as-ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--as-font-display);
  font-weight: 700;
  font-size: 0.9rem;
}
.as-help-tip strong { display: block; color: var(--as-ink); margin-bottom: 0.2rem; }

/* CTA */
.as-help-cta {
  text-align: center;
  background: var(--as-ink);
  color: #fff;
  border-color: var(--as-ink);
}
.as-help-cta h2 { color: #fff; }
.as-help-cta p { color: rgba(255, 255, 255, 0.7); }
.as-help-cta .btn-primary {
  background: #fff;
  color: var(--as-ink);
  border-color: #fff;
  font-weight: 600;
}
.as-help-cta .btn-primary:hover {
  background: var(--as-red-light);
  color: var(--as-ink);
  border-color: var(--as-red-light);
}

/* Responsive */
@media (max-width: 991.98px) {
  .as-help-layout { grid-template-columns: 1fr; gap: 1rem; }
  .as-help-toc {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--as-rule);
    padding: 0 0 0.75rem 0;
  }
  .as-help-toc nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  .as-help-toc a {
    border-left: 0;
    border-bottom: 2px solid transparent;
    margin-left: 0;
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    background: var(--as-bg);
  }
  .as-help-toc a.active {
    border-left: 0;
    background: var(--as-ink);
    color: #fff;
  }
  .as-help-grid-3,
  .as-help-grid-2,
  .as-help-compare {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .as-help-section { padding: 1.5rem 1.25rem; }
  .as-help-section h2 { font-size: 1.4rem; }
  .as-help-syntax-row { grid-template-columns: 1fr; }
  .as-help-syntax-op { border-right: 0; border-bottom: 1px solid var(--as-rule); }
  .as-mock-searchbar { min-width: 0; width: 100%; }
}

/* =====================================================================
   Utilities
   ===================================================================== */
.as-divider {
  height: 1px;
  background: var(--as-rule);
  margin: 1.5rem 0;
}

.as-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--as-ink-light);
}

.as-empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.as-empty-state-title {
  font-family: var(--as-font-display);
  font-size: var(--as-font-size-lg);
  font-weight: 700;
  color: var(--as-ink-mid);
  margin-bottom: 0.5rem;
}

.as-empty-state-text {
  font-size: var(--as-font-size-sm);
  max-width: 360px;
  margin: 0 auto 1.5rem;
  font-style: italic;
}

/* =====================================================================
   Toast Notifications
   ===================================================================== */
.as-toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.as-toast {
  background: var(--as-ink);
  color: #fdfaf6;
  padding: 0.875rem 1.25rem;
  border-radius: 0;
  font-family: var(--as-font-family);
  font-size: var(--as-font-size-sm);
  font-weight: 500;
  box-shadow: var(--as-shadow-md);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  pointer-events: all;
  animation: slideInToast 0.25s ease;
  max-width: 360px;
}

.as-toast.success { border-left: 3px solid var(--as-success); }
.as-toast.error   { border-left: 3px solid var(--as-red); }
.as-toast.info    { border-left: 3px solid var(--as-info); }

@keyframes slideInToast {
  from { opacity: 0; transform: translateY(1rem); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   Skip to content (Accessibility)
   ===================================================================== */
.as-skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--as-red);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0;
  transition: top 0.1s ease;
}

.as-skip-link:focus {
  top: 0;
  color: #fff;
}

/* =====================================================================
   Responsive Adjustments
   ===================================================================== */
@media (max-width: 991.98px) {
  .as-masthead-top { display: none !important; }
  .as-masthead-brand-desktop { display: none !important; }
  .as-masthead-brand-mobile { display: flex !important; }
}

@media (max-width: 575.98px) {
  .as-auth-body    { padding: 1.25rem; }
  .as-auth-header  { padding: 1.5rem 1.25rem 1rem; }
  .as-auth-footer  { padding: 0.875rem 1.25rem 1.25rem; }
  .as-page         { padding-top: 1.25rem; padding-bottom: 2rem; }
  .as-hero         { padding: 2.5rem 0 2rem; }
  .as-stats-bar    { gap: 1.5rem; }
}

/* =====================================================================
   Print Styles
   ===================================================================== */
@media print {
  .as-masthead, .as-footer, .as-filter-panel, .as-bookmark-btn { display: none !important; }
  .as-page { padding-top: 0; }
}

/* ── Inline select controls (sort / per-page dropdowns) ─────────── */
.as-inline-select {
  width: auto;
  min-width: max-content;
  flex-shrink: 0;
  padding-right: 2.25rem; /* preserve arrow gap */
  font-size: var(--as-font-size-sm);
}
