/* =============================================================================
   Magazine Theme - Overwrite CSS
   Wird automatisch nach magazine.css geladen
   Pfad: packages/lutzschmitt/magazine/dist/magazine-overwrite.css
   
   ============================================================================= */

/* =============================================================================
   Accent Token System (24 hues x 5 intensity)
   ============================================================================= */

/* Base accent variables are defined on any element with .accent.
   Pages and cards both receive accent classes. */
.accent {
  --accent-hue-light: #0066cc;
  --accent-hue-dark: #0052cc;
  --accent-tint-light: 0%;
  --accent-tint-dark: 32%;
  --accent-color-light: var(--accent-hue-light);
  --accent-color-dark: var(--accent-hue-dark);
  --accent-color: var(--accent-color-light, #0066cc);
}

.dark .accent,
.dark.accent {
  --accent-color: var(--accent-color-dark, #4d9fff) !important;
}

/* Hue definitions (light/dark base colors) */
.accent-h01 { --accent-hue-light: #0066cc; --accent-hue-dark: #0052cc; }
.accent-h02 { --accent-hue-light: #0091ff; --accent-hue-dark: #0085eb; }
.accent-h03 { --accent-hue-light: #0570ad; --accent-hue-dark: #095e90; }
.accent-h04 { --accent-hue-light: #09d0ef; --accent-hue-dark: #0cc3df; }
.accent-h05 { --accent-hue-light: #007a78; --accent-hue-dark: #005352; }
.accent-h06 { --accent-hue-light: #00a365; --accent-hue-dark: #00945b; }
.accent-h07 { --accent-hue-light: #0f6f2f; --accent-hue-dark: #0a4d21; }
.accent-h08 { --accent-hue-light: #8bcf00; --accent-hue-dark: #5e8d00; }
.accent-h09 { --accent-hue-light: #54cd13; --accent-hue-dark: #51c214; }
.accent-h10 { --accent-hue-light: #f2ba21; --accent-hue-dark: #e8b321; }
.accent-h11 { --accent-hue-light: #ff941a; --accent-hue-dark: #e9891c; }
.accent-h12 { --accent-hue-light: #aa0000; --accent-hue-dark: #880000; }
.accent-h13 { --accent-hue-light: #f04769; --accent-hue-dark: #dd4060; }
.accent-h14 { --accent-hue-light: #ad1a5a; --accent-hue-dark: #99144e; }
.accent-h15 { --accent-hue-light: #e0006c; --accent-hue-dark: #c1014e; }
.accent-h16 { --accent-hue-light: #c20084; --accent-hue-dark: #a80073; }
.accent-h17 { --accent-hue-light: #f028bb; --accent-hue-dark: #e92bb6; }
.accent-h18 { --accent-hue-light: #b000d6; --accent-hue-dark: #6f0088; }
.accent-h19 { --accent-hue-light: #6a37c9; --accent-hue-dark: #43247f; }
.accent-h20 { --accent-hue-light: #2e49d8; --accent-hue-dark: #1f3191; }
.accent-h21 { --accent-hue-light: #3b6a7a; --accent-hue-dark: #27454f; }
.accent-h22 { --accent-hue-light: #2b2f4a; --accent-hue-dark: #2e3456; }
.accent-h23 { --accent-hue-light: #bb9f68; --accent-hue-dark: #ae9665; }
.accent-h24 { --accent-hue-light: #976207; --accent-hue-dark: #8e5c06; }

/* Intensity definitions
   Light: i1 most tinted toward white, i5 pure hue.
   Dark: i1 base dark hue, i5 brighter (tinted toward white). */
.accent-i1 { --accent-tint-light: 70%; --accent-tint-dark: 0%; }
.accent-i2 { --accent-tint-light: 55%; --accent-tint-dark: 8%; }
.accent-i3 { --accent-tint-light: 40%; --accent-tint-dark: 16%; }
.accent-i4 { --accent-tint-light: 20%; --accent-tint-dark: 24%; }
.accent-i5 { --accent-tint-light: 0%;  --accent-tint-dark: 32%; }

@supports (color: color-mix(in srgb, white 50%, black)) {
  .accent {
    --accent-color-light: color-mix(
      in srgb,
      var(--accent-hue-light) calc(100% - var(--accent-tint-light)),
      white var(--accent-tint-light)
    );
    --accent-color-dark: color-mix(
      in srgb,
      var(--accent-hue-dark) calc(100% - var(--accent-tint-dark)),
      white var(--accent-tint-dark)
    );
  }
}

/* =============================================================================
   Magazine Full Width Layout
   ============================================================================= */

/* Accent palette reference page */
.accent-palette {
  display: grid;
  gap: 2rem;
}

.accent-palette__header {
  display: grid;
  gap: 0.5rem;
}

.accent-palette__title {
  font-size: clamp(1.5rem, 2.4vw, 2.125rem);
  margin: 0;
}

.accent-palette__lead {
  margin: 0;
  color: #666;
  max-width: 60ch;
}

.dark .accent-palette__lead {
  color: #bdbdbd;
}

.accent-palette__panel {
  border: 1px solid #e5e5e5;
  border-radius: 0.75rem;
  padding: 1.25rem;
  background: #fafafa;
  display: grid;
  gap: 1rem;
}

.accent-palette__panel-title {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
}

.accent-palette__panel--dark {
  background: #0d0f14;
  color: #e9edf5;
  border-color: #2b3345;
}

.accent-palette__panel--dark .accent-palette__panel-title {
  color: #aeb7c6;
}

.accent-palette__legend,
.accent-palette__row {
  display: grid;
  grid-template-columns: 260px repeat(5, minmax(90px, 1fr));
  gap: 0.75rem;
  align-items: center;
}

.accent-palette__grid {
  display: grid;
  gap: 0.75rem;
}

.accent-palette__legend {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
}

.accent-palette__panel--dark .accent-palette__legend {
  color: #9aa4b6;
}

.accent-palette__label {
  padding: 0.75rem 0.875rem;
  border: 1px solid #e5e5e5;
  border-radius: 0.5rem;
  background: #fff;
}

.accent-palette__panel--dark .accent-palette__label {
  background: #141925;
  border-color: #2b3345;
}

.accent-palette__name {
  font-weight: 700;
}

.accent-palette__meta {
  font-size: 0.75rem;
  color: #777;
  margin-top: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.accent-palette__panel--dark .accent-palette__meta {
  color: #9aa4b6;
}

.accent-palette__swatch {
  border: 1px solid #e5e5e5;
  border-radius: 0.5rem;
  background: #fff;
  overflow: hidden;
}

.accent-palette__panel--dark .accent-palette__swatch {
  background: #141925;
  border-color: #2b3345;
}

.accent-palette__chip {
  height: 2.75rem;
  background: var(--accent-color, #0066cc);
}

@media (max-width: 900px) {
  .accent-palette__legend,
  .accent-palette__row {
    grid-template-columns: 1fr;
  }

  .accent-palette__legend {
    display: none;
  }

  .accent-palette__swatch {
    height: 2.75rem;
  }
}

/* Navbar
   Keep Standard Lite's grid-based navbar layout, so header and content
   align to the same column system and max-width (102rem). */

/* Haupt-Layout Container - ZENTRIERT mit maximaler Breite */
.std-layout.std-layout--magazine-full-width {
  max-width: 102rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  --block-margin-left: 0px;
  --columns: [brand-start hero-start main-start] calc(((100% - 42rem) / 2) - var(--gap)) [brand-end] 1fr [nav-start breadcrumbs-start title-start prev-next-start related-start footer-start] min(100%, 42rem) [breadcrumbs-end title-end prev-next-end related-end footer-end] 1fr [spacer] calc(((100% - 42rem) / 2) - var(--gap)) [nav-end hero-end main-end];
}

/* Hero section - hidden for magazine layout */
.std-layout--magazine-full-width .std-layout__hero {
  display: none;
}

/* Title section - left aligned */
.std-layout--magazine-full-width .std-layout__title {
  text-align: left;
}

.std-layout--magazine-full-width .std-layout__title h1,
.std-layout--magazine-full-width .std-layout__title h2,
.std-layout--magazine-full-width .std-layout__title h3 {
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Main content - left aligned */
.std-layout--magazine-full-width .std-layout__main,
.std-layout--magazine-full-width .std-layout__main-full {
  text-align: left;
}

/* Main content paragraphs and headings - left aligned */
.std-layout--magazine-full-width .std-layout__main p,
.std-layout--magazine-full-width .std-layout__main-full p,
.std-layout--magazine-full-width .std-layout__main h1,
.std-layout--magazine-full-width .std-layout__main h2,
.std-layout--magazine-full-width .std-layout__main h3,
.std-layout--magazine-full-width .std-layout__main h4,
.std-layout--magazine-full-width .std-layout__main h5,
.std-layout--magazine-full-width .std-layout__main h6 {
  text-align: left;
}

/* Pagelist - 5rem Abstand nach oben (zum Text) */
.std-layout--magazine-full-width .std-layout__main .std-pagelist,
.std-layout--magazine-full-width .std-layout__main #std-pagelist {
  margin-top: 5rem !important;
}

/* Footer */
.std-layout--magazine-full-width .std-layout__footer {
  text-align: left;
}

/* =============================================================================
   3-Spalten Masonry Grid
   ============================================================================= */

/* Masonry Grid - 3 Spalten */
.std-layout--magazine-full-width std-masonry.std-pagelist--masonry,
.std-layout--magazine-full-width .std-pagelist--masonry {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1rem !important;
  width: 100% !important;
  grid-auto-rows: auto !important;
  column-count: unset !important;
  columns: unset !important;
}

/* Masonry Items */
.std-layout--magazine-full-width .std-pagelist__masonry-item {
  width: 100% !important;
  margin-bottom: 0 !important;
  grid-row-end: auto !important;
  break-inside: unset !important;
  display: block !important;
}

/* Pagelist items - 100% height for equal rows */
.std-pagelist__item {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* =============================================================================
   Responsive Breakpoints
   ============================================================================= */

/* Tablets - 2 Spalten */
@media (min-width: 768px) and (max-width: 1199px) {
  .std-layout--magazine-full-width std-masonry.std-pagelist--masonry,
  .std-layout--magazine-full-width .std-pagelist--masonry {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Mobile - 1 Spalte */
@media (max-width: 767px) {
  .std-layout--magazine-full-width std-masonry.std-pagelist--masonry,
  .std-layout--magazine-full-width .std-pagelist--masonry {
    grid-template-columns: 1fr !important;
  }
  
  
}

/* =============================================================================
   Card Styling wie lutzschmitt.com
   ============================================================================= */

/* Card mit Border unten */
.std-pagelist__item {
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 1rem;
  background-color: transparent;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

/* In grid-like layouts, rely on the container gap instead of per-item margins. */
.std-pagelist--masonry .std-pagelist__item,
.std-pagelist--grid .std-pagelist__item {
  margin-bottom: 0;
}

.std-pagelist__masonry-item:last-child .std-pagelist__item {
  border-bottom: none;
}

/* Bild oben */
.std-pagelist__item-img {
  width: 100%;
  margin-bottom: 0.625rem;
  overflow: hidden;
  border-radius: 0.25rem;
  order: -2;
}

.std-pagelist__item-img img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.22s ease, filter 0.22s ease;
  transform-origin: 50% 50%;
  opacity: 1;
}

@media (hover: hover) {
  .std-pagelist__item:hover .std-pagelist__item-img img,
  .std-pagelist__item:focus-within .std-pagelist__item-img img {
    transform: scale(1.015);
    filter: brightness(1.06) saturate(1.02) !important;
    opacity: 1 !important;
  }
}

/* Standard Lite dims card children on hover via opacity; disable that for magazine cards. */
.std-pagelist--masonry .std-pagelist__item:hover > *,
.std-pagelist--masonry .std-pagelist__item:focus-within > *,
.std-pagelist--grid .std-pagelist__item:hover > *,
.std-pagelist--grid .std-pagelist__item:focus-within > *,
.std-pagelist--blog .std-pagelist__item:hover > *,
.std-pagelist--blog .std-pagelist__item:focus-within > * {
  opacity: 1 !important;
}

/* Also cover Standard Lite's grid/list hover-dimming variants. */
.std-pagelist__item:hover > *,
.std-pagelist__item:focus-within > *,
.std-pagelist--list .std-pagelist__item:hover > *,
.std-pagelist--list .std-pagelist__item:focus-within > *,
.std-pagelist--grid-image-bottom .std-pagelist__item:hover > *,
.std-pagelist--grid-image-bottom .std-pagelist__item:focus-within > *,
.std-pagelist--grid-image-contained .std-pagelist__item:hover > *,
.std-pagelist--grid-image-contained .std-pagelist__item:focus-within > *,
.std-pagelist--grid-image-top .std-pagelist__item:hover > *,
.std-pagelist--grid-image-top .std-pagelist__item:focus-within > * {
  opacity: 1 !important;
}

/* Standard Lite adds a global :after hover overlay; disable for magazine cards. */
.std-pagelist--masonry .std-pagelist__item::after,
.std-pagelist--grid .std-pagelist__item::after,
.std-pagelist--blog .std-pagelist__item::after,
.std-pagelist--list .std-pagelist__item::after {
  content: none !important;
  background-color: transparent !important;
}

@media (hover: hover) {
  .std-pagelist__item:hover,
  .std-pagelist__item:focus-within {
    border-bottom-color: color-mix(in srgb, var(--accent-color, #0066cc) 90%, white);
    box-shadow: inset 0 -2px 0 0 var(--accent-color, #0066cc);
  }
}

/* Body Container */
.std-pagelist__item-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Datum - versteckt */
.std-pagelist__item-date {
  display: none !important;
}

/* Titel */
.std-pagelist__item-title {
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
  margin-top: 0 !important;
  margin-bottom: 0.875rem;
  color: var(--accent-color, #0066cc);
  transition: color 0.18s ease;
  order: 0;
}

.std-pagelist__item-title a {
  color: inherit;
  text-decoration: none;
}

@media (hover: hover) {
  .std-pagelist__item:hover .std-pagelist__item-title,
  .std-pagelist__item:focus-within .std-pagelist__item-title {
    color: color-mix(in srgb, var(--accent-color, #0066cc) 86%, white);
  }
}

/* Excerpt */
.std-pagelist__item-excerpt,
.std-pagelist__item-body > p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #666;
  margin-top: 0;
  margin-bottom: 1.125rem;
  order: 1;
}

/* Excerpt clamp for denser masonry cards */
@supports (-webkit-line-clamp: 1) {
  .std-pagelist__item-excerpt,
  .std-pagelist__item-body > p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }
}

/* =============================================================================
   Accent Color System - verwendet CSS Variable --accent-color
   ============================================================================= */

/* Card Tags */
.std-pagelist__item-meta {
  display: flex;
  flex-direction: column;
  order: 2;
  margin-top: auto;
}

.std-pagelist__item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: #666;
  order: 2;
}

.std-pagelist__item-body > .std-pagelist__item-tags {
  margin-top: auto;
}

.std-pagelist__item-tags a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.std-pagelist__item-tags a:hover {
  color: inherit;
}

/* Note: no read-more icon in card templates. */

/* Content Links */
.std-layout__main a,
.std-content a,
.std-layout__title a,
.std-layout__breadcrumbs a {
  color: var(--accent-color, #0066cc) !important;
}

.std-layout__main a:not(.std-pagelist__item):hover,
.std-content a:not(.std-pagelist__item):hover,
.std-layout__title a:hover,
.std-layout__breadcrumbs a:hover {
  filter: brightness(0.7);
}

/* Don't dim pagelist cards on hover (cards are <a> or contain <a>). */
.std-layout__main a.std-pagelist__item:hover,
.std-layout__main a.std-pagelist__item:focus-within,
.std-content a.std-pagelist__item:hover,
.std-content a.std-pagelist__item:focus-within,
.std-layout__main .std-pagelist a:hover,
.std-content .std-pagelist a:hover,
.std-layout__main .std-pagelist__item a:hover,
.std-content .std-pagelist__item a:hover {
  filter: none !important;
}

.std-tags a,
.std-tag,
.std-title__tags,
.std-title__tags a,
.std-title__tags .std-icon-tag {
  color: var(--accent-color, #0066cc) !important;
}

.std-tags a:hover,
.std-tag:hover,
.std-title__tags a:hover {
  filter: brightness(0.7);
}

.std-button,
.am-button,
.buttons .am-button {
  background-color: var(--accent-color, #0066cc) !important;
  border-color: var(--accent-color, #0066cc) !important;
}

.std-button:hover,
.am-button:hover,
.buttons .am-button:hover {
  filter: brightness(1.1);
}

/* Navbar Active Link */
.std-navbar__link--active,
.std-navbar__link[aria-current="page"] {
  text-decoration: underline !important;
  text-underline-offset: 4px !important;
  text-decoration-thickness: 2px !important;
  text-decoration-color: var(--accent-color, #0066cc) !important;
}

/* =============================================================================
   Dark Mode - Accent Colors
   ============================================================================= */

.dark .std-pagelist__item:hover .std-pagelist__item-title,
.dark .std-pagelist__item:focus-within .std-pagelist__item-title {
  color: color-mix(in srgb, var(--accent-color, #4d9fff) 88%, white);
}

.std-pagelist__item-tags .std-icon-tag {
  display: inline-flex;
  margin-right: 0.25rem;
}

/* =============================================================================
   Dark Mode - Layout Colors
   ============================================================================= */

.dark .std-pagelist__item {
  border-bottom-color: #2a2a2a;
}

.dark .std-pagelist__item-excerpt,
.dark .std-pagelist__item-body > p {
  color: #bdbdbd;
}

.dark .std-pagelist__item-tags {
  color: #a8a8a8;
}

@media (hover: hover) {
  .dark .std-pagelist__item:hover,
  .dark .std-pagelist__item:focus-within {
    border-bottom-color: color-mix(in srgb, var(--accent-color, #4d9fff) 80%, black);
    box-shadow: inset 0 -2px 0 0 var(--accent-color, #4d9fff);
  }
}

/* =============================================================================
   Mobile Spacing Optimierung - Reduziert Whitespace zwischen Cards
   ============================================================================= */

/* Tablet: Kleinere Gaps zwischen Cards */
@media (max-width: 768px) {
  std-masonry.std-pagelist--masonry,
  .std-pagelist--masonry {
    gap: 0.5rem !important;
  }
  
  .std-pagelist__item {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
  }
}

/* Mobile: Noch kompakter */
@media (max-width: 480px) {
  std-masonry.std-pagelist--masonry,
  .std-pagelist--masonry {
    gap: 0.5rem !important;
  }
  
  .std-pagelist__item {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  /* Internal card spacing */
  .std-pagelist__item-img {
    margin-bottom: 0.5rem;
  }
  
  .std-pagelist__item-title {
    margin-bottom: 0.625rem;
    font-size: 1.25rem;
  }
  
  .std-pagelist__item-excerpt,
  .std-pagelist__item-body > p {
    margin-bottom: 0.75rem;
  }
  
  .std-pagelist__item-tags {
    margin-top: 0.5rem;
    gap: 0.375rem;
  }
}

/* =============================================================================
   Accessibility hardening (WCAG 2.2 A/AA)
   ============================================================================= */

:root,
.accent {
  --accent-aa-link: var(--accent-color, #0066cc);
  --accent-aa-fill: var(--accent-color, #0066cc);
  --accent-aa-on-fill: #ffffff;
  --accent-aa-focus: var(--accent-aa-link);
}

:root {
  --std-focus-ring-clr: #000000;
  --std-skip-link-bg: #111827;
  --std-skip-link-fg: #ffffff;
}

/* In dark mode, keep focus ring visible. */
.dark {
  --std-focus-ring-clr: #ffffff;
}

.std-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.std-skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10001;
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.35rem;
  border: 2px solid transparent;
  color: var(--std-skip-link-fg) !important;
  background: var(--std-skip-link-bg);
  text-decoration: none;
  transform: translateY(-140%);
  transition: transform 0.2s ease;
}

.std-skip-link:focus-visible {
  transform: translateY(0);
  border-color: var(--std-focus-ring-clr);
}

#std-main-content:focus {
  outline: 3px solid var(--std-focus-ring-clr);
  outline-offset: 0.35rem;
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid var(--std-focus-ring-clr);
  outline-offset: 2px;
}

.std-search-form:focus-within {
  border-bottom-color: var(--std-focus-ring-clr);
  box-shadow: inset 0 -2px 0 0 var(--std-focus-ring-clr);
}

.std-search-input:focus-visible {
  outline: none;
}

std-theme-switcher[role="button"],
std-sidebar-toggle[role="button"] {
  cursor: pointer;
}

.std-layout__main a,
.std-content a,
.std-layout__title a,
.std-layout__breadcrumbs a,
.std-tags a,
.std-tag,
.std-title__tags,
.std-title__tags a,
.std-title__tags .std-icon-tag,
.std-pagelist__item-title,
.std-pagelist__item-title a,
.std-pagination a,
.std-prev-next__item,
.std-footer a,
.std-navbar__link,
.std-breadcrumbs a {
  color: var(--accent-aa-link, var(--accent-color, #0066cc)) !important;
}

.std-navbar__link--active,
.std-navbar__link[aria-current="page"] {
  text-decoration-color: var(--accent-aa-link, var(--accent-color, #0066cc)) !important;
}

.std-button,
.am-button,
.buttons .am-button {
  background-color: var(--accent-aa-fill, var(--accent-color, #0066cc)) !important;
  border-color: var(--accent-aa-fill, var(--accent-color, #0066cc)) !important;
  color: var(--accent-aa-on-fill, #ffffff) !important;
}

/* Ensure content link color rules don't override button text color. */
.std-layout__main a.std-button,
.std-content a.std-button,
.std-layout__title a.std-button,
.std-layout__breadcrumbs a.std-button,
.std-layout__main a.am-button,
.std-content a.am-button,
.std-layout__title a.am-button,
.std-layout__breadcrumbs a.am-button {
  color: var(--accent-aa-on-fill, #ffffff) !important;
}

.std-layout__main a.std-button:hover,
.std-content a.std-button:hover,
.std-layout__title a.std-button:hover,
.std-layout__breadcrumbs a.std-button:hover,
.std-layout__main a.am-button:hover,
.std-content a.am-button:hover,
.std-layout__title a.am-button:hover,
.std-layout__breadcrumbs a.am-button:hover,
.std-layout__main a.std-button:focus-visible,
.std-content a.std-button:focus-visible,
.std-layout__title a.std-button:focus-visible,
.std-layout__breadcrumbs a.std-button:focus-visible,
.std-layout__main a.am-button:focus-visible,
.std-content a.am-button:focus-visible,
.std-layout__title a.am-button:focus-visible,
.std-layout__breadcrumbs a.am-button:focus-visible {
  color: var(--accent-aa-on-fill, #ffffff) !important;
}

.std-button:hover,
.am-button:hover,
.buttons .am-button:hover,
.std-button:focus-visible,
.am-button:focus-visible,
.buttons .am-button:focus-visible {
  color: var(--accent-aa-on-fill, #ffffff) !important;
}

.std-layout__main a:hover,
.std-content a:hover,
.std-layout__title a:hover,
.std-layout__breadcrumbs a:hover,
.std-tags a:hover,
.std-tag:hover,
.std-title__tags a:hover,
.std-footer a:hover,
.std-navbar__link:hover,
.std-breadcrumbs a:hover {
  color: color-mix(
    in srgb,
    var(--accent-aa-link, var(--accent-color, #0066cc)) 84%,
    black
  ) !important;
  filter: none;
}

/* Requested nav and link decoration adjustments */
.std-navbar__links .std-navbar__link {
  color: var(--std-fg-1) !important;
  text-decoration: none !important;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.std-navbar__links .std-navbar__link:hover,
.std-navbar__links .std-navbar__link:focus-visible,
.std-navbar__links .std-navbar__link--active,
.std-navbar__links .std-navbar__link[aria-current="page"] {
  color: var(--std-fg-1) !important;
  text-decoration: underline !important;
  text-decoration-color: currentColor !important;
}

@media (min-width: 768px) {
  .std-navbar__nav {
    justify-content: flex-end;
    gap: 0.25rem;
  }

  .std-navbar__links {
    flex-grow: 0;
    padding-right: 0;
    margin-right: 0.25rem;
  }

  .std-navbar__links-items {
    justify-content: flex-end;
  }
}

.std-navbar__brand {
  display: flex;
  align-items: center;
}

.std-brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 0 !important;
  height: auto;
  padding: 0;
  line-height: 1;
}

.std-brand__img {
  display: block;
}

.std-footer nav a,
.std-title__tags a {
  text-decoration: none;
  text-underline-offset: 4px;
}

.std-footer nav a:hover,
.std-footer nav a:focus-visible,
.std-title__tags a:hover,
.std-title__tags a:focus-visible {
  text-decoration: underline !important;
}

.std-content a:not(.std-button):not(.am-button) {
  text-decoration: underline !important;
  text-underline-offset: 4px;
}

.std-search .std-tooltip__content {
  display: none !important;
}

.std-navbar__nav .std-navbar__icon {
  color: var(--std-fg-1) !important;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.std-navbar__nav .std-navbar__icon:hover,
.std-navbar__nav .std-navbar__icon:focus-visible {
  color: var(--std-fg-1) !important;
  background-color: var(--std-bg-2);
}

.std-navbar__nav std-theme-switcher.std-navbar__icon:hover,
.std-navbar__nav std-theme-switcher.std-navbar__icon:focus-visible,
.std-navbar__nav std-search .std-navbar__icon:hover,
.std-navbar__nav std-search .std-navbar__icon:focus-visible {
  background-color: var(--std-bg-2);
}
