/* Flash Learn / Reference Stylesheet (Linear & Claude Inspired) */
.learn-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--store-bg, #090a0f);
  color: var(--store-text, #f8fafc);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.learn-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  box-sizing: border-box;
}

/* Hero Section */
.learn-hero {
  margin-bottom: 32px;
  text-align: left;
}

.learn-hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 10px;
}

.learn-hero-title {
  font-size: clamp(2rem, 3.4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin: 0 0 10px;
  color: var(--store-text, #f8fafc);
}

.learn-hero-desc {
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--store-muted, #8b949e);
  max-width: 680px;
  margin: 0;
}

/* Control & Filter Strip */
.learn-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  background: var(--store-card-bg, #0e1117);
  border: 1px solid var(--store-border, rgba(255, 255, 255, 0.07));
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.16);
}

.learn-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.learn-search-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.learn-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #64748b;
  pointer-events: none;
}

.learn-search-input {
  width: 100%;
  height: 38px;
  padding: 0 38px 0 36px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--store-border, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  color: var(--store-text, #f8fafc);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
  box-sizing: border-box;
}

.learn-search-input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.learn-search-kbd {
  position: absolute;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: inherit;
  font-weight: 500;
  color: #8b949e;
  pointer-events: none;
  line-height: 1;
}

.learn-search-clear {
  position: absolute;
  right: 10px;
  width: 20px;
  height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  color: #8b949e;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
}

.learn-search-clear.is-visible {
  display: flex;
}

.learn-search-clear:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #f8fafc;
}

.learn-toggle-all-btn {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--store-border, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  color: #8b949e;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.learn-toggle-all-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #f8fafc;
}

/* Category Filter Chips (Linear Segmented Tabs) */
.learn-filter-chips {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.learn-chip {
  padding: 5px 11px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: #8b949e;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.learn-chip:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.04);
}

.learn-chip.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-weight: 600;
}

.learn-results-meta {
  margin-left: auto;
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Glossary Cards List */
.learn-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.glossary-card {
  background: var(--store-card-bg, #0e1117);
  border: 1px solid var(--store-border, rgba(255, 255, 255, 0.07));
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.glossary-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.glossary-card.is-open {
  border-color: rgba(255, 255, 255, 0.16);
  background: #10141d;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}

/* Card Header Button (High-density compact) */
.glossary-card-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.glossary-card-header:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.3);
  outline-offset: -1px;
}

.glossary-icon-wrap {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b949e;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.glossary-icon-wrap svg {
  width: 16px;
  height: 16px;
}

.glossary-card:hover .glossary-icon-wrap,
.glossary-card.is-open .glossary-icon-wrap {
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.15);
}

.glossary-card-titles {
  flex: 1;
  min-width: 0;
}

.glossary-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.glossary-category-pill {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: #8b949e;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.glossary-card-title {
  font-size: 0.91rem;
  font-weight: 600;
  margin: 0 0 2px;
  letter-spacing: -0.015em;
  color: var(--store-text, #f8fafc);
}

.glossary-card-snippet {
  font-size: 0.77rem;
  color: var(--store-muted, #8b949e);
  margin: 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.glossary-card-chevron {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #64748b;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), color 0.18s ease;
}

.glossary-card.is-open .glossary-card-chevron {
  transform: rotate(180deg);
  color: #f8fafc;
}

/* Accordion Smooth Dropdown Animation via Grid */
.glossary-card-body-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

.glossary-card.is-open .glossary-card-body-wrap {
  grid-template-rows: 1fr;
}

.glossary-card-body-inner {
  overflow: hidden;
}

.glossary-card-content {
  padding: 10px 16px 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
}

@media (max-width: 680px) {
  .glossary-card-content {
    padding: 8px 12px 14px;
  }
}

.glossary-content-text {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #cbd5e1;
  margin: 0 0 14px;
}

.glossary-content-text p {
  margin: 0 0 10px;
}

.glossary-steps-list {
  margin: 10px 0 16px;
  padding-left: 18px;
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.65;
}

.glossary-steps-list li {
  margin-bottom: 7px;
}

.glossary-steps-list li strong {
  color: #f8fafc;
  font-weight: 600;
}

/* Path Snippet Box with Copy Button */
.glossary-path-cluster {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}

.glossary-path-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #090a0f;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 8px 12px;
}

.glossary-path-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.glossary-path-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.glossary-path-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.glossary-path-code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: #e2e8f0;
  word-break: break-all;
  user-select: all;
}

.glossary-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.73rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.glossary-copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

.glossary-copy-btn.is-copied {
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.25);
}

/* Callout Tip Box */
.glossary-tip-box {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid #64748b;
  border-radius: 0 7px 7px 0;
  padding: 10px 14px;
  margin: 14px 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #94a3b8;
}

.glossary-tip-box svg {
  width: 16px;
  height: 16px;
  min-width: 16px;
  color: #94a3b8;
  margin-top: 2px;
}

.glossary-tip-box strong {
  color: #f8fafc;
  font-weight: 600;
}

/* Card Action Footer */
.glossary-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.glossary-related-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  transition: gap 0.15s ease, color 0.15s ease;
}

.glossary-related-link:hover {
  color: #f8fafc;
  gap: 8px;
}

/* Empty State */
.learn-empty-state {
  display: none;
  text-align: center;
  padding: 50px 20px;
  background: var(--store-card-bg, #0e1117);
  border: 1px dashed var(--store-border, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
}

.learn-empty-state.is-visible {
  display: block;
}

.learn-empty-state svg {
  width: 36px;
  height: 36px;
  color: #64748b;
  margin-bottom: 12px;
}

.learn-empty-state h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: #f8fafc;
}

.learn-empty-state p {
  font-size: 0.86rem;
  color: #8b949e;
  margin: 0 0 16px;
}

.learn-reset-btn {
  padding: 7px 15px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.learn-reset-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Bright Theme Overrides (Harmonized Midnight Sapphire & Precision Cyan) */
html[data-theme="bright"] .learn-page {
  color: #f0f6fc;
}

html[data-theme="bright"] .learn-hero-eyebrow {
  color: #64748b;
}

html[data-theme="bright"] .learn-hero-title {
  color: #f0f6fc;
}

html[data-theme="bright"] .learn-hero-desc {
  color: #94a3b8;
}

html[data-theme="bright"] .learn-controls-bar {
  background: rgba(18, 26, 37, 0.88);
  border-color: rgba(56, 189, 248, 0.14);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
}

html[data-theme="bright"] .learn-search-input {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(56, 189, 248, 0.16);
  color: #f0f6fc;
}

html[data-theme="bright"] .learn-search-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px #38bdf8;
  background: rgba(15, 23, 42, 0.75);
}

html[data-theme="bright"] .learn-search-kbd {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
}

html[data-theme="bright"] .learn-search-clear {
  background: rgba(56, 189, 248, 0.12);
  color: #94a3b8;
}

html[data-theme="bright"] .learn-search-clear:hover {
  background: rgba(56, 189, 248, 0.22);
  color: #f0f6fc;
}

html[data-theme="bright"] .learn-toggle-all-btn {
  background: rgba(56, 189, 248, 0.05);
  border-color: rgba(56, 189, 248, 0.14);
  color: #94a3b8;
}

html[data-theme="bright"] .learn-toggle-all-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.28);
  color: #f0f6fc;
}

html[data-theme="bright"] .learn-chip {
  color: #94a3b8;
}

html[data-theme="bright"] .learn-chip:hover {
  color: #f0f6fc;
  background: rgba(56, 189, 248, 0.08);
}

html[data-theme="bright"] .learn-chip.is-active {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.32);
}

html[data-theme="bright"] .learn-results-meta {
  color: #64748b;
}

html[data-theme="bright"] .glossary-card {
  background: rgba(18, 26, 37, 0.84);
  border-color: rgba(56, 189, 248, 0.14);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

html[data-theme="bright"] .glossary-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

html[data-theme="bright"] .glossary-card.is-open {
  border-color: rgba(56, 189, 248, 0.36);
  background: rgba(22, 33, 48, 0.92);
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.35);
}

html[data-theme="bright"] .glossary-card-header:focus-visible {
  outline-color: #38bdf8;
}

html[data-theme="bright"] .glossary-icon-wrap {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
}

html[data-theme="bright"] .glossary-card:hover .glossary-icon-wrap,
html[data-theme="bright"] .glossary-card.is-open .glossary-icon-wrap {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

html[data-theme="bright"] .glossary-category-pill {
  background: rgba(56, 189, 248, 0.07);
  border-color: rgba(56, 189, 248, 0.16);
  color: #94a3b8;
}

html[data-theme="bright"] .glossary-card-title {
  color: #f0f6fc;
}

html[data-theme="bright"] .glossary-card-snippet {
  color: #94a3b8;
}

html[data-theme="bright"] .glossary-card-chevron {
  color: #64748b;
}

html[data-theme="bright"] .glossary-card.is-open .glossary-card-chevron {
  color: #38bdf8;
}

html[data-theme="bright"] .glossary-card-content {
  border-top-color: rgba(56, 189, 248, 0.09);
}

html[data-theme="bright"] .glossary-content-text {
  color: #cbd5e1;
}

html[data-theme="bright"] .glossary-steps-list {
  color: #cbd5e1;
}

html[data-theme="bright"] .glossary-steps-list li strong {
  color: #f0f6fc;
}

html[data-theme="bright"] .glossary-path-box {
  background: rgba(10, 15, 23, 0.85);
  border-color: rgba(56, 189, 248, 0.12);
}

html[data-theme="bright"] .glossary-path-label {
  color: #64748b;
}

html[data-theme="bright"] .glossary-path-code {
  color: #7dd3fc;
}

html[data-theme="bright"] .glossary-copy-btn {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.18);
  color: #94a3b8;
}

html[data-theme="bright"] .glossary-copy-btn:hover {
  background: rgba(56, 189, 248, 0.16);
  color: #f0f6fc;
  border-color: rgba(56, 189, 248, 0.3);
}

html[data-theme="bright"] .glossary-copy-btn.is-copied {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}

html[data-theme="bright"] .glossary-tip-box {
  background: rgba(56, 189, 248, 0.04);
  border-color: rgba(56, 189, 248, 0.14);
  border-left-color: #38bdf8;
  color: #94a3b8;
}

html[data-theme="bright"] .glossary-tip-box svg {
  color: #38bdf8;
}

html[data-theme="bright"] .glossary-tip-box strong {
  color: #f0f6fc;
}

html[data-theme="bright"] .glossary-card-footer {
  border-top-color: rgba(56, 189, 248, 0.09);
}

html[data-theme="bright"] .glossary-related-link {
  color: #94a3b8;
}

html[data-theme="bright"] .glossary-related-link:hover {
  color: #38bdf8;
}

html[data-theme="bright"] .learn-empty-state {
  background: rgba(18, 26, 37, 0.85);
  border-color: rgba(56, 189, 248, 0.18);
}

html[data-theme="bright"] .learn-empty-state h3 {
  color: #f0f6fc;
}

html[data-theme="bright"] .learn-empty-state p {
  color: #94a3b8;
}

html[data-theme="bright"] .learn-reset-btn {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

/* Category Pill Styling for New Topics */
.glossary-category-pill.is-basics {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.glossary-category-pill.is-fuses {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.glossary-category-pill.is-macros {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.glossary-category-pill.is-modules {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

/* Tool Reference Cards & Compact Mini Preview */
.tool-reference-card .glossary-card-header {
  gap: 12px;
}

.tool-preview-thumb-wrap {
  width: 44px;
  height: 30px;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background: #10141d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.tool-preview-thumb-wrap:hover {
  transform: scale(1.06);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.tool-preview-thumb-wrap img,
.tool-preview-thumb-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tool-preview-expand-badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.76);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.tool-preview-thumb-wrap:hover .tool-preview-expand-badge {
  opacity: 1;
  background: rgba(56, 189, 248, 0.9);
}

/* Compact Multi-Preview Strip */
.tool-multi-previews-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.tool-multi-previews-strip::-webkit-scrollbar {
  height: 4px;
}

.tool-multi-previews-strip::-webkit-scrollbar-track {
  background: transparent;
}

.tool-multi-previews-strip::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.tool-preview-tile {
  flex: 0 0 92px;
  width: 92px;
  height: 58px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: #090c12;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tool-preview-tile:hover {
  transform: scale(1.05);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.tool-preview-tile img,
.tool-preview-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tool-preview-tile-badge {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 15px;
  height: 15px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  pointer-events: none;
}

.tool-preview-tile-badge svg {
  width: 8px;
  height: 8px;
}

.tool-preview-tile:hover .tool-preview-tile-badge {
  background: rgba(56, 189, 248, 0.9);
}

/* Fallback Compact Detail Banner */
.tool-detail-banner {
  max-width: 340px;
  width: 100%;
  height: 140px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c1017;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.tool-detail-banner:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.tool-detail-banner img,
.tool-detail-banner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tool-detail-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.8));
  display: flex;
  align-items: flex-end;
  padding: 6px 10px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.tool-detail-banner:hover .tool-detail-banner-overlay {
  opacity: 1;
}

.tool-guide-section {
  margin-bottom: 10px;
}

.tool-section-heading {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin: 0 0 4px;
  font-weight: 600;
}

.tool-usage-tip-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-left: 3px solid #38bdf8;
  font-size: 0.81rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.tool-usage-tip-box svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #38bdf8;
}

.tool-controls-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tool-control-pill {
  display: inline-flex;
  align-items: center;
  padding: 2.5px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 500;
  color: #cbd5e1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tool-control-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Tool Showcase Card in Documentation */
.tool-showcase-section {
  margin-top: 14px;
}

.tool-showcase-card {
  display: flex;
  gap: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 12px;
  align-items: flex-start;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.tool-showcase-card:hover {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.035);
}

.tool-showcase-video-wrap {
  flex: 0 0 140px;
  width: 140px;
  height: 94px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: #090c12;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tool-showcase-video-wrap:hover {
  transform: scale(1.03);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.tool-showcase-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tool-showcase-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tool-showcase-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.tool-showcase-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: #f8fafc;
}

.tool-showcase-by {
  font-size: 0.78rem;
  color: #8b949e;
}

.tool-showcase-by a {
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
}

.tool-showcase-by a:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.tool-showcase-plugins {
  font-size: 0.76rem;
  line-height: 1.4;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 5px 8px;
}

.tool-showcase-plugins-label {
  color: #64748b;
  font-weight: 600;
  margin-right: 4px;
}

.tool-showcase-plugins-list {
  color: #e2e8f0;
}

.tool-showcase-note {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #94a3b8;
  margin: 0;
}

.tool-showcase-footer {
  margin-top: 2px;
}

.tool-showcase-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s ease;
}

.tool-showcase-ext-link:hover {
  opacity: 0.85;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .tool-showcase-card {
    flex-direction: column;
  }
  .tool-showcase-video-wrap {
    width: 100%;
    height: 160px;
    flex: none;
  }
}

html[data-theme="bright"] .tool-showcase-card {
  background: rgba(18, 26, 37, 0.6);
  border-color: rgba(56, 189, 248, 0.14);
}

html[data-theme="bright"] .tool-showcase-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(18, 26, 37, 0.8);
}

html[data-theme="bright"] .tool-showcase-plugins {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(56, 189, 248, 0.12);
}



/* Basics Multi-Section Layout */
.basics-subsections {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.basics-subsection {
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.basics-subsection:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.basics-subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f8fafc;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.basics-subtitle svg {
  color: #38bdf8;
  flex-shrink: 0;
}

/* Lightbox Preview Modal */
.learn-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 20px;
  box-sizing: border-box;
}

.learn-preview-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.learn-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 12, 0.88);
  backdrop-filter: blur(16px);
}

.learn-modal-container {
  position: relative;
  z-index: 1;
  max-width: 840px;
  width: 100%;
  max-height: 90vh;
  background: #0e1217;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.learn-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.learn-modal-titles {
  display: flex;
  align-items: center;
  gap: 10px;
}

.learn-modal-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.learn-modal-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.learn-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.15s ease;
}

.learn-modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.learn-modal-media-wrap {
  padding: 16px;
  background: #06090e;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  max-height: 65vh;
  overflow: hidden;
}

.learn-modal-media-wrap video {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 8px;
  outline: none;
  background: #000;
}

.learn-modal-media-wrap img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 8px;
}

.learn-modal-footer {
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  justify-content: flex-end;
}

