/* Material Design 3 (M3) System Stylesheet for ECUSTER Navigation
 * Spec-aligned: https://m3.material.io/ & Material 3 Skill
 */

:root {
  /* Light Theme Color Tokens (Seed: #00639b ECUST Deep Cyan/Ocean) */
  --md-sys-color-primary: #00639b;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #d1e4ff;
  --md-sys-color-on-primary-container: #001d36;

  --md-sys-color-secondary: #51606f;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #d5e4f7;
  --md-sys-color-on-secondary-container: #0e1d2a;

  --md-sys-color-tertiary: #68587a;
  --md-sys-color-on-tertiary: #ffffff;
  --md-sys-color-tertiary-container: #efdcff;
  --md-sys-color-on-tertiary-container: #231533;

  --md-sys-color-surface: #f8f9fc;
  --md-sys-color-on-surface: #191c20;
  --md-sys-color-surface-dim: #d8dae0;
  --md-sys-color-surface-bright: #f8f9fc;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #f2f3f7;
  --md-sys-color-surface-container: #eceef2;
  --md-sys-color-surface-container-high: #e6e8ec;
  --md-sys-color-surface-container-highest: #e0e2e7;

  --md-sys-color-on-surface-variant: #41474d;
  --md-sys-color-outline: #72787e;
  --md-sys-color-outline-variant: #c1c7ce;

  --md-sys-color-error: #ba1a1a;
  --md-sys-color-on-error: #ffffff;
  --md-sys-color-error-container: #ffdad6;
  --md-sys-color-on-error-container: #410002;

  /* State Layers */
  --md-sys-state-hover-opacity: 0.08;
  --md-sys-state-focus-opacity: 0.12;
  --md-sys-state-pressed-opacity: 0.12;

  /* Typography */
  --md-ref-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  /* Shapes */
  --md-sys-shape-corner-none: 0px;
  --md-sys-shape-corner-extra-small: 4px;
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-shape-corner-full: 9999px;

  /* Elevations */
  --md-sys-elevation-0: none;
  --md-sys-elevation-1: 0 1px 3px 1px rgba(0, 0, 0, 0.06), 0 1px 2px 0 rgba(0, 0, 0, 0.08);
  --md-sys-elevation-2: 0 2px 6px 2px rgba(0, 0, 0, 0.06), 0 1px 2px 0 rgba(0, 0, 0, 0.10);
  --md-sys-elevation-3: 0 4px 12px 3px rgba(0, 0, 0, 0.08), 0 1px 3px 0 rgba(0, 0, 0, 0.12);

  /* Motion */
  --md-sys-motion-easing: cubic-bezier(0.2, 0.0, 0, 1.0);
  --md-sys-motion-duration: 250ms;
}

/* Dark Theme Tokens */
.night-mode {
  --md-sys-color-primary: #9dcbfb;
  --md-sys-color-on-primary: #003353;
  --md-sys-color-primary-container: #004a76;
  --md-sys-color-on-primary-container: #d1e4ff;

  --md-sys-color-secondary: #b9c8da;
  --md-sys-color-on-secondary: #233240;
  --md-sys-color-secondary-container: #3a4857;
  --md-sys-color-on-secondary-container: #d5e4f7;

  --md-sys-color-tertiary: #d3bfe6;
  --md-sys-color-on-tertiary: #382a4a;
  --md-sys-color-tertiary-container: #4f4061;
  --md-sys-color-on-tertiary-container: #efdcff;

  --md-sys-color-surface: #111418;
  --md-sys-color-on-surface: #e1e2e8;
  --md-sys-color-surface-dim: #111418;
  --md-sys-color-surface-bright: #37393e;
  --md-sys-color-surface-container-lowest: #0c0e12;
  --md-sys-color-surface-container-low: #191c20;
  --md-sys-color-surface-container: #1d2024;
  --md-sys-color-surface-container-high: #282a2f;
  --md-sys-color-surface-container-highest: #33353a;

  --md-sys-color-on-surface-variant: #c1c7ce;
  --md-sys-color-outline: #8b9198;
  --md-sys-color-outline-variant: #41474d;

  --md-sys-elevation-1: 0 1px 3px 1px rgba(0, 0, 0, 0.25);
  --md-sys-elevation-2: 0 2px 6px 2px rgba(0, 0, 0, 0.30);
  --md-sys-elevation-3: 0 4px 12px 3px rgba(0, 0, 0, 0.40);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--md-ref-font-family);
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  line-height: 1.5;
  min-height: 100vh;
  transition: background-color var(--md-sys-motion-duration) var(--md-sys-motion-easing),
              color var(--md-sys-motion-duration) var(--md-sys-motion-easing);
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

.page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   M3 Top App Bar
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 24px;
  background-color: var(--md-sys-color-surface-container-lowest);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color var(--md-sys-motion-duration) var(--md-sys-motion-easing);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--md-sys-color-primary);
  letter-spacing: -0.2px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.topnav > a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--md-sys-shape-corner-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  transition: all var(--md-sys-motion-duration) var(--md-sys-motion-easing);
  white-space: nowrap;
}

.topnav > a:hover {
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
}

.topnav > a.active {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.theme-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--md-sys-shape-corner-full);
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
  transition: background-color var(--md-sys-motion-duration) var(--md-sys-motion-easing);
}

.theme-button:hover {
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
}

.night-mode-btn {
  width: 22px;
  height: 22px;
  opacity: 0.85;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 32px;
  background: linear-gradient(180deg, var(--md-sys-color-surface-container-low) 0%, var(--md-sys-color-surface) 100%);
  text-align: center;
}

.hero-art {
  display: none; /* Modern clean Material look */
}

.hero-time {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 18px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-time strong {
  color: var(--md-sys-color-primary);
  font-weight: 700;
  font-size: 1rem;
}

.hero-copy h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.hero-copy p {
  font-size: 1rem;
  color: var(--md-sys-color-on-surface-variant);
}

.hero-copy .wordmark {
  display: none;
}

/* ==========================================================================
   M3 Search Stage
   ========================================================================== */
.content-wrap {
  flex: 1;
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 0 20px 48px;
}

.search-stage {
  max-width: 680px;
  margin: 0 auto 36px;
}

/* Engine Selection Chips */
.engine-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.engine-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-small);
  background-color: var(--md-sys-color-surface-container-lowest);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--md-sys-motion-duration) var(--md-sys-motion-easing);
}

.engine-chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.engine-chip:hover {
  background-color: var(--md-sys-color-surface-container);
  border-color: var(--md-sys-color-outline);
  color: var(--md-sys-color-on-surface);
}

.engine-chip.active {
  background-color: var(--md-sys-color-primary-container);
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary-container);
  font-weight: 600;
}

/* M3 Search Bar Container */
.search-container {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 12px 0 24px;
  border-radius: var(--md-sys-shape-corner-extra-large);
  background-color: var(--md-sys-color-surface-container-high);
  box-shadow: var(--md-sys-elevation-1);
  transition: all var(--md-sys-motion-duration) var(--md-sys-motion-easing);
}

.search-container:focus-within {
  background-color: var(--md-sys-color-surface-container-lowest);
  box-shadow: var(--md-sys-elevation-2);
  outline: 2px solid var(--md-sys-color-primary);
}

.search-container input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 1rem;
  color: var(--md-sys-color-on-surface);
}

.search-container input::placeholder {
  color: var(--md-sys-color-on-surface-variant);
  opacity: 0.8;
}

.search-container button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--md-sys-shape-corner-full);
  background: transparent;
  color: var(--md-sys-color-primary);
  cursor: pointer;
  transition: background-color var(--md-sys-motion-duration) var(--md-sys-motion-easing);
}

.search-container button:hover {
  background-color: var(--md-sys-color-surface-container-highest);
}

.search-container button svg {
  width: 22px;
  height: 22px;
}

/* ==========================================================================
   Category Segmented Filter Chips
   ========================================================================== */
#navigation {
  margin-bottom: 28px;
}

.breadcrumb-pipe {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  list-style: none;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: none;
}

.breadcrumb-pipe::-webkit-scrollbar {
  display: none;
}

.breadcrumb-item {
  flex: 0 0 auto;
}

.breadcrumb-item a {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--md-sys-shape-corner-small);
  border: 1px solid var(--md-sys-color-outline-variant);
  background-color: var(--md-sys-color-surface-container-lowest);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--md-sys-motion-duration) var(--md-sys-motion-easing);
}

.breadcrumb-item a:hover {
  background-color: var(--md-sys-color-surface-container-low);
  border-color: var(--md-sys-color-outline);
  color: var(--md-sys-color-on-surface);
}

.breadcrumb-item.active a {
  background-color: var(--md-sys-color-secondary-container);
  border-color: var(--md-sys-color-secondary);
  color: var(--md-sys-color-on-secondary-container);
  font-weight: 600;
}

/* Empty State */
.empty-state {
  margin: 32px auto;
  padding: 40px;
  max-width: 480px;
  border-radius: var(--md-sys-shape-corner-large);
  background-color: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface-variant);
  text-align: center;
  font-size: 1rem;
}

/* ==========================================================================
   M3 Category Sections & Tool Cards
   ========================================================================== */
.category-card {
  margin-bottom: 32px;
  border-radius: var(--md-sys-shape-corner-large);
  background-color: transparent;
  border: 0;
}

.nya-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
  margin-bottom: 16px;
  padding-left: 4px;
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--md-sys-shape-corner-small);
  background-color: var(--md-sys-color-surface-container-high);
}

.tool-icon img, .tool-icon svg {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* M3 Responsive Grid */
.row.g-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.col-lg-3, .col-md-4, .col-6 {
  width: 100% !important;
  max-width: 100% !important;
}

/* M3 Interactive Tool Link Card */
.tool-link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 16px;
  border-radius: var(--md-sys-shape-corner-large);
  background-color: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface);
  font-size: 0.9375rem;
  font-weight: 500;
  box-shadow: var(--md-sys-elevation-0);
  transition: all var(--md-sys-motion-duration) var(--md-sys-motion-easing);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-link .link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: var(--md-sys-shape-corner-small);
  background-color: var(--md-sys-color-surface-container);
  overflow: hidden;
}

.tool-link .link-icon img, .tool-link .link-icon svg {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.tool-link:hover {
  background-color: var(--md-sys-color-surface-container-lowest);
  border-color: var(--md-sys-color-primary);
  box-shadow: var(--md-sys-elevation-2);
  transform: translateY(-2px);
  color: var(--md-sys-color-primary);
}

.tool-link:active {
  transform: translateY(0);
  background-color: var(--md-sys-color-surface-container);
}

/* ==========================================================================
   QQ Groups Section (M3 Cards)
   ========================================================================== */
.qq-category-card {
  padding: 24px;
  border-radius: var(--md-sys-shape-corner-large);
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.qq-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.qq-section-head .nya-title {
  margin-bottom: 0;
  padding-left: 0;
}

.qq-submit-open {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border: 0;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--md-sys-elevation-1);
  transition: all var(--md-sys-motion-duration) var(--md-sys-motion-easing);
}

.qq-submit-open:hover {
  box-shadow: var(--md-sys-elevation-2);
  filter: brightness(1.08);
}

.qq-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.qq-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
  flex: 1 1 240px;
  max-width: 360px;
}

.qq-search-field input {
  border: 0;
  background: transparent;
  outline: none;
  font-size: 0.875rem;
  width: 100%;
}

.qq-search-field svg {
  width: 18px;
  height: 18px;
  color: var(--md-sys-color-on-surface-variant);
}

.qq-category-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.qq-filter-button {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--md-sys-shape-corner-small);
  border: 1px solid var(--md-sys-color-outline-variant);
  background-color: var(--md-sys-color-surface-container-lowest);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--md-sys-motion-duration) var(--md-sys-motion-easing);
}

.qq-filter-button.active {
  background-color: var(--md-sys-color-secondary-container);
  border-color: var(--md-sys-color-secondary);
  color: var(--md-sys-color-on-secondary-container);
  font-weight: 600;
}

.qq-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.qq-group-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: var(--md-sys-shape-corner-large);
  background-color: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: var(--md-sys-elevation-0);
  transition: all var(--md-sys-motion-duration) var(--md-sys-motion-easing);
}

.qq-group-card:hover {
  box-shadow: var(--md-sys-elevation-2);
  border-color: var(--md-sys-color-primary);
  transform: translateY(-2px);
}

.qq-image-button {
  position: relative;
  width: 72px;
  height: 72px;
  min-width: 72px;
  border: 0;
  border-radius: var(--md-sys-shape-corner-medium);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
}

.qq-image-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qq-image-button span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2px 0;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.625rem;
  text-align: center;
  backdrop-filter: blur(2px);
}

.qq-group-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.qq-category {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: var(--md-sys-shape-corner-extra-small);
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.6875rem;
  font-weight: 500;
}

.qq-group-copy h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
  line-height: 1.3;
}

.qq-number {
  font-size: 0.8125rem;
  color: var(--md-sys-color-primary);
  font-weight: 500;
}

.qq-description {
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Insights Section (M3 Surface Container Cards)
   ========================================================================== */
.insight-section {
  width: min(1320px, 100%);
  margin: 0 auto 48px;
  padding: 0 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.info-card {
  height: 420px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: var(--md-sys-shape-corner-large);
  background-color: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: var(--md-sys-elevation-0);
  transition: all var(--md-sys-motion-duration) var(--md-sys-motion-easing);
  overflow: hidden;
}

.info-card:hover {
  box-shadow: var(--md-sys-elevation-1);
}

.info-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--md-sys-color-surface-container);
}

.info-card-header > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.info-card-header span {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  font-weight: 500;
}

.info-card-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.info-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
}

.info-list::-webkit-scrollbar {
  width: 4px;
}

.info-list::-webkit-scrollbar-thumb {
  background-color: var(--md-sys-color-outline-variant);
  border-radius: 4px;
}

.info-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--md-sys-color-surface-container-low);
  font-size: 0.84375rem;
}

.info-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.6875rem;
  font-weight: 600;
}

.info-rank--1 {
  background-color: #ba1a1a;
  color: #fff;
}

.info-rank--2 {
  background-color: #d97706;
  color: #fff;
}

.info-rank--3 {
  background-color: #ca8a04;
  color: #fff;
}

.info-year {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--md-sys-color-primary);
  min-width: 42px;
}

.info-item-title {
  flex: 1;
  color: var(--md-sys-color-on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-item-title:hover {
  color: var(--md-sys-color-primary);
}

.info-tag {
  font-size: 0.625rem;
  padding: 1px 6px;
  border-radius: var(--md-sys-shape-corner-extra-small);
  white-space: nowrap;
}

.info-tag--hot {
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}

.info-tag--new {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.info-card-footer {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant);
  text-align: right;
}

/* Calendar details */
.calendar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
  flex: 1;
  overflow-y: auto;
}

.calendar-list div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
  border-bottom: 1px solid var(--md-sys-color-surface-container);
}

.calendar-list dt {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--md-sys-color-primary);
}

.calendar-list dd {
  font-size: 0.8125rem;
  color: var(--md-sys-color-on-surface);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background-color: var(--md-sys-color-surface-container-low);
  border-top: 1px solid var(--md-sys-color-outline-variant);
  padding: 40px 24px 24px;
}

.footer-shell {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--md-sys-color-primary);
  margin-bottom: 8px;
}

.footer-brand img {
  width: 28px;
  height: 28px;
}

.footer-intro p {
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--md-sys-color-on-surface-variant);
  letter-spacing: 0.5px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
  transition: color var(--md-sys-motion-duration) var(--md-sys-motion-easing);
}

.footer-links a:hover {
  color: var(--md-sys-color-primary);
}

.footer-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-action, .footer-back-to-top {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--md-sys-shape-corner-full);
  border: 1px solid var(--md-sys-color-outline-variant);
  background-color: var(--md-sys-color-surface-container-lowest);
  color: var(--md-sys-color-on-surface);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--md-sys-motion-duration) var(--md-sys-motion-easing);
}

.footer-action:hover, .footer-back-to-top:hover {
  background-color: var(--md-sys-color-surface-container);
  border-color: var(--md-sys-color-outline);
}

.footer-bottom {
  max-width: 1320px;
  margin: 32px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant);
  text-align: center;
}

/* ==========================================================================
   M3 Dialog (Modal)
   ========================================================================== */
.qq-dialog {
  margin: auto;
  padding: 32px;
  border-radius: var(--md-sys-shape-corner-extra-large);
  border: 0;
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  box-shadow: var(--md-sys-elevation-3);
  max-width: 480px;
  width: calc(100% - 32px);
}

.qq-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}

.qq-dialog h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.qq-dialog-intro {
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 20px;
}

.qq-dialog label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 14px;
}

.qq-dialog input, .qq-dialog select, .qq-dialog textarea {
  height: 48px;
  padding: 0 14px;
  border-radius: var(--md-sys-shape-corner-small);
  border: 1px solid var(--md-sys-color-outline);
  background-color: var(--md-sys-color-surface-container-lowest);
  color: var(--md-sys-color-on-surface);
  outline: none;
}

.qq-dialog textarea {
  height: 80px;
  padding: 10px 14px;
}

.qq-dialog input:focus, .qq-dialog select:focus, .qq-dialog textarea:focus {
  border-color: var(--md-sys-color-primary);
  border-width: 2px;
}

.qq-dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--md-sys-shape-corner-full);
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 1.25rem;
  cursor: pointer;
}

.qq-submit-button {
  width: 100%;
  height: 44px;
  border-radius: var(--md-sys-shape-corner-full);
  border: 0;
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: var(--md-sys-elevation-1);
}

.qq-submit-button:hover {
  filter: brightness(1.08);
}

.qq-preview-dialog {
  text-align: center;
  padding: 24px;
}

.qq-preview-dialog img {
  max-width: 260px;
  border-radius: var(--md-sys-shape-corner-medium);
  margin-top: 16px;
}

/* Honeypot */
.qq-honeypot {
  display: none !important;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .topbar {
    padding: 0 16px;
  }
  .hero-copy h1 {
    font-size: 1.75rem;
  }
  .row.g-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .tool-link {
    height: 52px;
    padding: 0 10px;
    font-size: 0.84375rem;
    gap: 8px;
  }
  .tool-link .link-icon {
    width: 26px;
    height: 26px;
    min-width: 26px;
  }
  .tool-link .link-icon img, .tool-link .link-icon svg {
    width: 18px;
    height: 18px;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
}

/* Refined Material 3 Micro-interactions & Polish */
.tool-link > span:not(.link-icon) {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Material You Active State Layers */
.engine-chip:active, .breadcrumb-item a:active, .qq-filter-button:active {
  transform: scale(0.97);
}

/* Custom Scrollbar for modern feel */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--md-sys-color-outline);
}

/* Selection */
::selection {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}
