/* ============================================================
   PPTX Theme Editor — Styles
   Brand: Ink #111827 · Slate #334155 · Indigo #4F46E5 · Teal #14B8A6
   ============================================================ */

:root {
  /* Bootstrap 5 brand token overrides */
  --bs-primary:           #4F46E5;
  --bs-primary-rgb:       79, 70, 229;
  --bs-secondary:         #111827;
  --bs-secondary-rgb:     17, 24, 39;
  --bs-body-font-family:  'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-color:        #111827;
  --bs-border-radius:     6px;
  --bs-border-radius-lg:  10px;
  --bs-danger:            #c0392b;
  --bs-danger-rgb:        192, 57, 43;
  --bs-link-color:        #4F46E5;
  --bs-link-hover-color:  #6366F1;

  /* Brand palette */
  --ink:          #111827;
  --slate:        #334155;
  --indigo:       #4F46E5;
  --indigo-light: #6366F1;
  --teal:         #14B8A6;
  --orange:       #F59E0B;
  --dark-grey:  #111827;
  --mid-grey:   #6B7280;
  --light-grey: #D1D5DB;
  --border:     #E5E7EB;
  --off-white:  #F3F4F6;
  --white:      #ffffff;
  --danger:     #c0392b;
  --danger-hover: #a93226;

  --font-head: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 2px 8px rgba(0,0,0,0.12);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.18);
  --transition: 150ms ease;
}

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

body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--dark-grey);
  background: #F8FAFC;
  min-height: 100vh;
}

/* ---- Header ---- */
.app-header {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.brand-lockup,
.footer-brand {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 30px;
  height: 40px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
  flex: 0 0 auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-left: auto;
}

.landing-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: color var(--transition);
}

.landing-nav a:hover {
  color: var(--indigo);
}

.header-cta {
  min-height: 40px;
  padding-left: 18px;
  padding-right: 18px;
}

body.editor-active .landing-nav,
body.editor-active .header-cta {
  display: none;
}

/* Mobile nav toggle — hidden until the narrow breakpoint reveals it */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 11px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

body.editor-active .nav-toggle {
  display: none;
}

/* ---- Drop zone / file input ---- */
.drop-zone {
  margin: 28px 32px 0;
  border: 2px dashed var(--light-grey);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  background: var(--white);
  transition: border-color var(--transition), background var(--transition);
  cursor: pointer;
}

.drop-zone.drag-over,
.drop-zone:hover {
  border-color: var(--indigo);
  background: #f0fffe;
}

.drop-zone input[type="file"] {
  display: none;
}

.drop-zone label {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.drop-zone .drop-icon {
  font-size: 36px;
  line-height: 1;
}

.drop-zone .drop-primary {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.drop-zone .drop-secondary {
  font-size: 12px;
  color: var(--mid-grey);
}

/* ---- File info bar ---- */
.file-bar {
  display: none;
  margin: 0 0 0 auto;
  padding: 10px 16px;
  background: var(--indigo);
  color: var(--white);
  box-shadow: inset 4px 0 0 var(--teal), 0 8px 22px rgba(79, 70, 229, 0.18);
  border-radius: var(--radius);
  font-size: 13px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: min(720px, 58vw);
}

.file-bar.visible {
  display: flex;
  animation: file-bar-enter 220ms ease-out both;
}

.file-bar .file-name {
  flex: 1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-bar .file-size {
  flex: 0 0 auto;
  opacity: 0.65;
  font-size: 12px;
  white-space: nowrap;
}

@keyframes file-bar-enter {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Buttons — extend Bootstrap base with brand variants ---- */
/* Bootstrap's .btn base handles display, padding, cursor, transition.
   We declare brand colors via CSS custom properties. */

.btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  --bs-btn-bg:           var(--indigo);
  --bs-btn-color:        #fff;
  --bs-btn-border-color: var(--indigo);
  --bs-btn-hover-bg:     var(--indigo-light);
  --bs-btn-hover-color:  #fff;
  --bs-btn-hover-border-color: var(--indigo-light);
}

.btn-ink {
  --bs-btn-bg:           var(--ink);
  --bs-btn-color:        #fff;
  --bs-btn-border-color: var(--ink);
  --bs-btn-hover-bg:     var(--slate);
  --bs-btn-hover-color:  #fff;
  --bs-btn-hover-border-color: var(--slate);
}

.btn-ghost {
  --bs-btn-bg:            transparent;
  --bs-btn-color:         var(--ink);
  --bs-btn-border-color:  var(--light-grey);
  --bs-btn-hover-bg:      transparent;
  --bs-btn-hover-color:   var(--indigo);
  --bs-btn-hover-border-color: var(--indigo);
}

.btn-danger {
  --bs-btn-bg:           var(--danger);
  --bs-btn-color:        #fff;
  --bs-btn-border-color: var(--danger);
  --bs-btn-hover-bg:     var(--danger-hover);
  --bs-btn-hover-color:  #fff;
  --bs-btn-hover-border-color: var(--danger-hover);
}

.btn-sm { padding: 5px 10px; font-size: 12px; }

.btn-xs {
  --bs-btn-padding-y:   3px;
  --bs-btn-padding-x:   10px;
  --bs-btn-font-size:   11px;
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 4px;
}

/* File bar: white ghost on dark background */
.file-bar .btn-ghost {
  --bs-btn-color:             #fff;
  --bs-btn-border-color:      rgba(255,255,255,0.4);
  --bs-btn-hover-color:       #fff;
  --bs-btn-hover-border-color: #fff;
  --bs-btn-hover-bg:          rgba(255,255,255,0.12);
  flex: 0 0 auto;
}

/* ---- Editor shell: collapsible left sidebar nav + content ---- */
.tabs-container {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 0;
}

body.mode-transitioning #landing,
body.mode-transitioning #tabsContainer {
  pointer-events: none;
}

body.mode-entering-editor #landing {
  animation: landing-mode-out 260ms ease-in both;
}

body.mode-entering-editor #tabsContainer {
  animation: editor-mode-in 380ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body.mode-entering-landing #tabsContainer {
  animation: editor-mode-out 240ms ease-in both;
}

body.mode-entering-landing #landing {
  animation: landing-mode-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes landing-mode-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translateY(-18px) scale(0.985);
    filter: blur(2px);
  }
}

@keyframes editor-mode-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes editor-mode-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes landing-mode-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .file-bar.visible,
  body.mode-entering-editor #landing,
  body.mode-entering-editor #tabsContainer,
  body.mode-entering-landing #tabsContainer,
  body.mode-entering-landing #landing {
    animation: none !important;
    filter: none !important;
    transform: none !important;
  }
}

/* ---- Left rail: brand + file header, then the scrolling tab list ---- */
/* In editor mode the top header is hidden; the rail carries the branding. */
body.editor-active .app-header { display: none; }

.side-rail {
  position: sticky;
  top: 0;
  align-self: flex-start;
  flex: 0 0 212px;
  width: 212px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-right: 1px solid var(--border);
  transition: flex-basis var(--transition), width var(--transition);
}

.side-rail-header {
  padding: 12px 10px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.side-rail-top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.side-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
}
.side-brand-mark { flex-shrink: 0; display: flex; }
.side-brand-mark img { width: 22px; height: auto; }
.side-brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The loaded file sits in its own card with the full name + actions. */
.side-file-card {
  display: none;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--off-white);
}
.side-file-card.visible { display: block; }
.side-file-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  overflow-wrap: anywhere;     /* never truncate — wrap the full filename */
}
.side-file-size {
  font-size: 11px;
  color: var(--mid-grey);
  margin-top: 2px;
}
.side-file-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.side-file-export {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.side-file-export-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 8px;
  background: #fff;
  color: var(--indigo);
  font-size: 10px;
  font-weight: 700;
}
.side-file-change { flex-shrink: 0; }

.side-nav {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.side-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 5px 7px;
  border: none;
  background: transparent;
  color: var(--mid-grey);
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  font-size: 16px;
}
.side-nav-toggle:hover { color: var(--ink); background: var(--off-white); }

.tab-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm, 8px);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--mid-grey);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.tab-btn:hover { color: var(--ink); background: var(--off-white); }
.tab-btn.active { color: var(--indigo); background: #eef2ff; }

.tab-ico { font-size: 16px; flex-shrink: 0; width: 18px; text-align: center; }
.tab-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Group heading between sets of tabs. */
.side-nav-group {
  padding: 14px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--mid-grey);
  user-select: none;
}
/* Pin Export to the bottom of the rail, set off from the list above. */
.tab-btn-bottom {
  margin-top: auto;
  margin-bottom: 2px;
}
/* Export stands out as the primary action; brighter once there are changes. */
.tab-btn-export {
  color: var(--indigo);
  border: 1px solid var(--border);
}
.tab-btn-export .tab-ico { color: var(--indigo); }
.tab-btn-export:hover { background: #eef2ff; }
.tab-btn-export.has-changes {
  background: var(--indigo);
  color: #fff;
  border-color: var(--indigo);
}
.tab-btn-export.has-changes .tab-ico { color: #fff; }
.tab-btn-export.has-changes:hover { background: #4338ca; }
/* Numeric change-count pill. */
.tab-badge-count {
  background: #fff;
  color: var(--indigo);
}
.tab-btn-export:not(.has-changes) .tab-badge-count {
  background: var(--indigo);
  color: #fff;
}

/* Collapsed: group label becomes a thin divider rule. */
.tabs-container.nav-collapsed .side-nav-group {
  padding: 0;
  margin: 8px 12px;
  height: 1px;
  font-size: 0;
  letter-spacing: 0;
  background: var(--border);
  overflow: hidden;
}

/* Collapsed: icons only, labels hidden, badges shown as a dot. */
.tabs-container.nav-collapsed .side-rail { flex-basis: 56px; width: 56px; }
.tabs-container.nav-collapsed .tab-label { display: none; }
.tabs-container.nav-collapsed .tab-btn { justify-content: center; padding: 9px 0; gap: 0; }
/* Collapsed header: stack the logo above the toggle; drop the name + file info. */
.tabs-container.nav-collapsed .side-rail-header { padding: 10px 6px; }
.tabs-container.nav-collapsed .side-rail-top { flex-direction: column; gap: 6px; }
.tabs-container.nav-collapsed .side-brand { justify-content: center; }
.tabs-container.nav-collapsed .side-brand-name { display: none; }
.tabs-container.nav-collapsed .side-file-card { display: none !important; }
.tabs-container.nav-collapsed .tab-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  min-width: 0;
  padding: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  font-size: 0;
  overflow: hidden;
}

.tab-content {
  flex: 1;
  min-width: 0;
  padding: 16px 32px 32px;
}

.tab-panel {
  display: none;
  padding: 8px 0 24px;
}

.tab-panel.active { display: block; }

/* ---- Section heading ---- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}

.section-head h2 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
}

.section-head p {
  font-size: 12px;
  color: var(--mid-grey);
}

/* ---- Theme block ---- */
.theme-block {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.theme-block-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--mid-grey);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-primary-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
  background: var(--indigo);
  border-radius: 10px;
  text-transform: uppercase;
  line-height: 1.4;
}

.theme-block-path {
  font-size: 11px;
  font-family: monospace;
  color: var(--light-grey);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.theme-block-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.theme-block-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  padding-top: 2px;
}

.btn-xs {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ---- PowerPoint-style theme color strip ---- */
.pp-color-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pp-color-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 68px;
}

.pp-color-square {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  border: 1.5px solid rgba(0,0,0,0.12);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform var(--transition), box-shadow var(--transition);
}

.pp-color-square:hover {
  transform: scale(1.06);
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  border-color: rgba(0,0,0,0.25);
}



/* Hidden native color picker — opened programmatically */
.pp-picker-hidden {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.pp-color-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--mid-grey);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  letter-spacing: 0.02em;
}

.pp-hex-input {
  width: 68px;
  padding: 4px 5px;
  border: 1.5px solid var(--light-grey);
  border-radius: var(--radius);
  font-family: monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--dark-grey);
  text-align: center;
  background: var(--white);
  transition: border-color var(--transition);
  letter-spacing: 0.05em;
}

.pp-hex-input:focus {
  outline: none;
  border-color: var(--indigo);
}

/* ---- Custom colors — 10×4 grid ---- */
.cust-grid-10 {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.cust-grid-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
  min-width: 0;
  position: relative;
}

/* Delete button — top-right corner of swatch, visible on hover */
.cust-del-btn {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity var(--transition), background var(--transition);
  z-index: 2;
}
/* Reveal on hover, keyboard focus, and touch (no hover) — not hover-only */
.cust-grid-cell:hover .cust-del-btn,
.cust-grid-cell:focus-within .cust-del-btn,
.cust-del-btn:focus-visible { opacity: 1; }
@media (hover: none) { .cust-del-btn { opacity: 1; } }
.cust-del-btn:hover { background: var(--danger); }
.cust-del-btn:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }

/* Drag-and-drop states */
.cust-grid-cell[draggable="true"] { cursor: grab; }
.cust-grid-cell.cust-dragging { opacity: 0.35; }
.cust-grid-cell.cust-drag-over .cust-grid-square {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
}

.cust-grid-square {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 1.5px solid rgba(0,0,0,0.1);
  transition: transform var(--transition);
}

.cust-grid-cell:hover .cust-grid-square {
  transform: scale(1.08);
  border-color: rgba(0,0,0,0.25);
}

.cust-grid-label {
  font-size: 9px;
  color: var(--mid-grey);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  line-height: 1.2;
}

/* Spacer cells (name="" or name="blank") — invisible, occupy grid space only */
.cust-grid-spacer {
  pointer-events: none;
}

.cust-square-add {
  background: var(--bg-main) !important;
  border: 1.5px dashed var(--border) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: var(--mid-grey);
  font-size: 14px;
  cursor: pointer;
  pointer-events: auto;
}

.cust-square-add:hover {
  border-color: var(--indigo) !important;
  color: var(--indigo);
}

/* Hex input inside custom color cells */
.cust-hex-input {
  width: 100%;
  padding: 2px 3px;
  border: 1px solid var(--light-grey);
  border-radius: 3px;
  font-family: monospace;
  font-size: 9px;
  font-weight: 600;
  color: var(--dark-grey);
  text-align: center;
  background: var(--white);
  letter-spacing: 0.03em;
  transition: border-color var(--transition);
}

.cust-hex-input:focus {
  outline: none;
  border-color: var(--indigo);
}

/* ---- Changelog (export tab) ---- */
.changelog-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.changelog-entry {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  color: var(--dark-grey);
  padding: 6px 10px;
  background: var(--off-white);
  border-radius: var(--radius);
  border-left: 3px solid var(--indigo);
}

.changelog-time {
  font-size: 10px;
  color: var(--mid-grey);
  font-family: monospace;
  flex-shrink: 0;
}

.changelog-empty {
  font-size: 13px;
  color: var(--mid-grey);
  font-style: italic;
  margin-top: 12px;
}

/* ---- MRU section ---- */
.mru-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.mru-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.mru-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.1);
  title: attr(data-hex);
}

.mru-empty {
  font-size: 12px;
  color: var(--mid-grey);
  font-style: italic;
  margin: 12px 0;
}

/* ---- Fonts tab ---- */
.font-scheme-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.font-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.font-field label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mid-grey);
}

.font-field input[type="text"] {
  padding: 8px 12px;
  border: 1.5px solid var(--light-grey);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--dark-grey);
  background: var(--white);
  transition: border-color var(--transition);
  width: 100%;
}

.font-field input[type="text"]:focus {
  outline: none;
  border-color: var(--indigo);
}

.font-preview {
  font-size: 18px;
  color: var(--ink);
  margin-top: 4px;
  min-height: 28px;
}

/* Secondary script typefaces (East Asian / Complex Script) */
.font-script-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.font-script-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.font-script-field label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mid-grey);
}

.font-script-field input[type="text"] {
  padding: 6px 10px;
  border: 1.5px solid var(--light-grey);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--dark-grey);
  background: var(--off-white);
  transition: border-color var(--transition);
  width: 100%;
}

.font-script-field input[type="text"]:focus {
  outline: none;
  border-color: var(--indigo);
  background: var(--white);
}

/* ---- Media tab ---- */
.media-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.media-count {
  font-size: 12px;
  color: var(--mid-grey);
  margin-left: auto;
}

.media-view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  overflow: hidden;
}
.media-view-toggle .btn { border: none; border-radius: 0; }
.media-view-toggle .btn.active {
  background: var(--ink);
  color: var(--white);
}

.media-list-table .media-list-name {
  font-family: monospace;
  font-size: 12px;
  color: var(--ink);
}
.media-list-thumb {
  width: 52px;
  padding: 6px 8px 6px 0 !important;
}
.media-list-thumb img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--off-white);
}
.media-list-thumb img.transparent-bg {
  background-image:
    linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
    linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
}
.media-list-thumb-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 20px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--off-white);
}
.media-flag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
  white-space: nowrap;
}
.media-flag.is-warn { color: #b45309; }
.media-flag.is-muted { color: var(--mid-grey); }

/* ---- Gallery grid ---- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
}

.media-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dark-grey);
  aspect-ratio: 1;
  cursor: default;
}

/* Audio cards are wider/shorter — 16:9 doesn't suit a square */
.media-card.is-audio {
  aspect-ratio: 2 / 1;
  grid-column: span 2;
}

/* No-preview cards */
.media-card.no-preview {
  aspect-ratio: 1;
}

/* ---- Thumbnail image ---- */
.media-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Checkerboard for images with potential transparency (PNG, WebP, SVG, GIF) */
.media-card.transparent-bg {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #d0d0d0 25%, transparent 25%),
    linear-gradient(-45deg, #d0d0d0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d0d0d0 75%),
    linear-gradient(-45deg, transparent 75%, #d0d0d0 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0px;
}

.media-card.transparent-bg .media-thumb-img {
  object-fit: contain;
}

/* ---- Video thumbnail ---- */
.media-thumb-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Audio placeholder ---- */
.media-audio-bg {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #1a2e3d;
}

.media-audio-icon {
  font-size: 22px;
  opacity: 0.7;
}

.media-audio-el {
  width: 90%;
  height: 28px;
}

/* ---- No-preview placeholder ---- */
.media-no-preview-bg {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #2a2825;
}

.media-no-preview-icon { font-size: 24px; opacity: 0.5; }

.media-no-preview-ext {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}

/* ---- Hover overlay ---- */
.media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 55%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 7px 8px;
  gap: 4px;
}

.media-card:hover .media-overlay { opacity: 1; }

/* Always show overlay on audio/no-preview since there's nothing to see */
.media-card.is-audio .media-overlay,
.media-card.no-preview .media-overlay {
  opacity: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 70%);
}

.media-overlay-filename {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.media-overlay-ext {
  font-size: 9px;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.media-overlay-dl {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition), background var(--transition);
  backdrop-filter: blur(4px);
}

.media-card:hover .media-overlay-dl,
.media-card:focus-within .media-overlay-dl,
.media-overlay-dl:focus-visible,
.media-card.is-audio .media-overlay-dl,
.media-card.no-preview .media-overlay-dl { opacity: 1; }
@media (hover: none) { .media-overlay-dl { opacity: 1; } }
.media-overlay-dl:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.media-overlay-dl:hover { background: rgba(255,255,255,0.3); }

/* ---- Export tab ---- */
.export-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  max-width: 560px;
}

.export-section h3 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 8px;
}

.export-section p {
  font-size: 13px;
  color: var(--mid-grey);
  line-height: 1.6;
  margin-bottom: 16px;
}

.export-warning {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm, 6px);
  background: #fff7e6;
  border: 1px solid #f0d9a8;
  color: #8a6116;
  font-size: 12.5px;
  line-height: 1.5;
}

.export-warning .bi {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---- Empty / loading states ---- */
.state-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--mid-grey);
}

.state-empty .state-icon { font-size: 40px; margin-bottom: 12px; }
.state-empty p { font-size: 13px; }

/* ---- Toast ---- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  background: var(--ink);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 200ms ease forwards;
  max-width: 320px;
}

.toast.success { background: var(--indigo); }
.toast.error   { background: var(--danger); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Utility ---- */
.hidden { display: none !important; }

hr.divider {
  border: none;
  border-top: 1px solid var(--light-grey);
  margin: 20px 0;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--light-grey); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--mid-grey); }

/* ============================================================
   Dashboard
   ============================================================ */

.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

/* ---- Overview cards (one per section, stat inside, links to its tab) ---- */
.dash-overview-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 28px;
}
.dash-overview-group {
  min-width: 0;
}
.dash-overview-group-title {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--mid-grey);
}
.dash-overview-group-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
  gap: 14px;
}
.dash-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.dash-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: #c7d2fe;
}
.dash-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.dash-card-icon { font-size: 16px; color: var(--indigo); flex-shrink: 0; }
.dash-card-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-card-go {
  font-size: 13px;
  color: var(--mid-grey);
  flex-shrink: 0;
  transition: transform var(--transition), color var(--transition);
}
.dash-card:hover .dash-card-go {
  color: var(--indigo);
  transform: translate(2px, -2px);
}
/* Description, then the statistics listed underneath. */
.dash-card-desc {
  font-size: 12px;
  color: var(--mid-grey);
  line-height: 1.45;
  margin: 6px 0 0;
}
.dash-card-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;          /* sits under the description, pinned to the bottom */
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.dash-card-stat-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.dash-card-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  flex-shrink: 0;
}
.dash-card-stat-value.is-text {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-card-stat-label {
  font-size: 11.5px;
  color: var(--mid-grey);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-card-stat-line.is-flag .dash-card-stat-value { color: #b45309; }
.dash-card-stat-line.is-flag .dash-card-stat-label { color: #b45309; }

.dash-stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.dash-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.dash-stat-card.is-clickable { cursor: pointer; }

/* ---- Health monitor ---- */
.health-ok {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: #ecfdf3;
  border: 1px solid #b7e4c7;
  color: #16794c;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}
.health-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.health-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--white);
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  transition: background var(--transition);
}
.health-item:hover { background: var(--off-white); }
.health-item > span { flex: 1; }
.health-item .health-go { color: var(--mid-grey); font-size: 12px; }
.health-item.is-warn { border-left: 3px solid #d97706; }
.health-item.is-warn > .bi:first-child { color: #d97706; }
.health-item.is-info { border-left: 3px solid var(--indigo); }
.health-item.is-info > .bi:first-child { color: var(--indigo); }

.dash-stat-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.dash-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}

.dash-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--mid-grey);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.dash-section-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 12px;
}

.tab-section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.dash-actions-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.dash-action-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  border: 1.5px solid transparent;
}

.dash-action-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--indigo);
}

.dash-action-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.dash-action-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.dash-action-desc {
  font-size: 12px;
  color: var(--mid-grey);
  line-height: 1.4;
}

/* ---- Theme preview (PowerPoint style) ---- */
.dash-theme-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.dash-theme-block {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 14px 16px 16px;
  box-shadow: var(--shadow);
  flex: 0 1 340px;
  min-width: 260px;
}

.dash-theme-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.dash-theme-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--mid-grey);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dash-theme-path {
  font-size: 10px;
  font-family: monospace;
  color: var(--light-grey);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.dash-preview-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--mid-grey);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 10px 0 4px;
}

.dash-preview-label:first-of-type {
  margin-top: 0;
}

/* 10-column grid mimicking PowerPoint's color picker */
.ppt-color-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
}

/* Custom colors grid in dashboard — same 10-col layout as theme colors */
.ppt-cust-grid {
  grid-template-columns: repeat(10, 1fr);
}

.ppt-color-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.08);
  cursor: default;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
}

.ppt-color-cell:hover {
  transform: scale(1.18);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  z-index: 2;
  position: relative;
  border-color: rgba(0,0,0,0.25);
}

.ppt-color-base {
  border-radius: 3px 3px 0 0;
  border-bottom: 2px solid rgba(0,0,0,0.12);
}

/* ---- Key files ---- */
.dash-key-files {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}

.dash-key-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 13px;
}

.dash-key-file-row:last-child {
  border-bottom: none;
}

.dash-key-file-row:hover {
  background: rgba(0, 166, 160, 0.05);
}

.dash-key-file-icon {
  font-size: 12px;
  flex-shrink: 0;
}

.dash-key-file-path {
  font-family: monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.dash-key-file-desc {
  font-size: 11px;
  color: var(--mid-grey);
  margin-left: auto;
  white-space: nowrap;
}

/* ============================================================
   File Browser & XML Editor
   ============================================================ */

/* ---- Split pane ---- */
.file-split {
  display: flex;
  gap: 0;
  min-height: 600px;
  max-height: calc(100vh - 200px);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ---- Left pane: tree ---- */
.file-tree-pane {
  width: 280px;
  min-width: 220px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  border-right: 1.5px solid var(--light-grey);
  background: #fafaf9;
  flex-shrink: 0;
}

.file-tree-search {
  padding: 10px 14px;
  border: none;
  border-bottom: 1.5px solid var(--light-grey);
  font-family: var(--font-body);
  font-size: 13px;
  background: var(--white);
  color: var(--dark-grey);
  outline: none;
}

.file-tree-search::placeholder {
  color: var(--light-grey);
}

.file-tree-search:focus {
  border-bottom-color: var(--indigo);
}

.file-tree {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0;
}

/* ---- Tree nodes ---- */
.tree-folder-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: var(--dark-grey);
  transition: background var(--transition);
  border-radius: 3px;
  margin: 0 4px;
}

.tree-folder-toggle:hover {
  background: rgba(0, 166, 160, 0.08);
}

.tree-arrow {
  font-size: 9px;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
  color: var(--mid-grey);
  transition: transform var(--transition);
}

.tree-folder-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.tree-folder-name {
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-folder-children {
  /* Animated via display toggle in JS */
}

.tree-file {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: var(--mid-grey);
  transition: background var(--transition), color var(--transition);
  border-radius: 3px;
  margin: 0 4px;
}

.tree-file:hover {
  background: rgba(0, 166, 160, 0.06);
  color: var(--dark-grey);
}

.tree-file.active {
  background: var(--indigo);
  color: var(--white);
}

.tree-file.active .tree-file-name {
  color: var(--white);
}

.tree-file-xml {
  color: var(--ink);
}

.tree-file-icon {
  font-size: 12px;
  flex-shrink: 0;
}

.tree-file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-body);
}
.tree-size {
  margin-left: auto;
  padding-left: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}
.file-tree-legend {
  padding: 4px 10px 6px;
  font-size: 10.5px;
  color: var(--mid-grey);
}
.file-tree-legend .tree-size-raw,
.file-tree-legend .tree-size-packed { font-weight: 600; }

.tree-size-raw { color: var(--mid-grey); }
.tree-size-packed {
  font-size: 9.5px;
  color: var(--border-strong, #9aa3af);
}
.tree-folder-toggle, .tree-file { display: flex; align-items: center; }
.tree-file-large .tree-size-raw {
  color: #b45309;
  font-weight: 600;
}

/* ---- Right pane: editor ---- */
.file-editor-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--white);
}

.file-breadcrumb {
  padding: 8px 16px;
  font-size: 12px;
  font-family: monospace;
  color: var(--mid-grey);
  background: #f8f8f7;
  border-bottom: 1px solid var(--light-grey);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.file-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--light-grey);
  background: var(--white);
  flex-shrink: 0;
}

.editor-status {
  font-size: 11px;
  color: var(--indigo);
  font-weight: 600;
  margin-left: auto;
}

/* ---- CodeMirror wrapper ---- */
.editor-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.editor-wrapper .CodeMirror {
  height: 100%;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.6;
}

/* CodeMirror theme overrides */
.editor-wrapper .CodeMirror {
  background: #1e2330;
  color: #c5cdd9;
}

.editor-wrapper .CodeMirror-gutters {
  background: #181c28;
  border-right: 1px solid #2a3040;
}

.editor-wrapper .CodeMirror-linenumber {
  color: #4a5568;
}

.editor-wrapper .CodeMirror-cursor {
  border-left-color: var(--indigo);
}

.editor-wrapper .CodeMirror-selected {
  background: rgba(0, 166, 160, 0.2) !important;
}

.editor-wrapper .CodeMirror-activeline-background {
  background: rgba(255, 255, 255, 0.03);
}

.editor-wrapper .CodeMirror-foldgutter {
  width: 16px;
}

.editor-wrapper .CodeMirror-foldgutter-open,
.editor-wrapper .CodeMirror-foldgutter-folded {
  color: #4a5568;
}

/* XML syntax highlighting */
.editor-wrapper .cm-tag { color: #00A6A0; }          /* teal for tag names */
.editor-wrapper .cm-attribute { color: #DE7C00; }    /* topaz for attributes */
.editor-wrapper .cm-string { color: #7359C2; }       /* lilac for string values */
.editor-wrapper .cm-comment { color: #6b6764; font-style: italic; }
.editor-wrapper .cm-meta { color: #F96459; }         /* coral for processing instructions */
.editor-wrapper .cm-error { color: #EF442E; background: rgba(239,68,46,0.1); }

/* CodeMirror dialog (search) overrides */
.editor-wrapper .CodeMirror-dialog {
  background: #181c28;
  border-bottom: 1px solid #2a3040;
  color: #c5cdd9;
  font-size: 12px;
  padding: 4px 12px;
}

.editor-wrapper .CodeMirror-dialog input {
  background: #2a3040;
  color: #c5cdd9;
  border: 1px solid #3a4050;
  border-radius: 3px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 12px;
}

/* ---- Preview wrapper ---- */
.preview-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  gap: 16px;
  overflow: auto;
  background: #f5f5f4;
}

.preview-image {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.preview-video {
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.preview-audio-icon {
  font-size: 48px;
  opacity: 0.3;
}

.preview-binary-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.preview-binary-icon {
  font-size: 48px;
  opacity: 0.3;
}

.preview-binary-text {
  font-size: 14px;
  color: var(--dark-grey);
}

.preview-meta {
  font-size: 12px;
  color: var(--mid-grey);
}

.preview-file-meta {
  font-size: 11px;
  color: var(--mid-grey);
  padding: 8px 16px;
  border-top: 1px solid var(--light-grey);
  width: 100%;
  text-align: center;
  flex-shrink: 0;
}

/* ---- Editor empty state ---- */
.editor-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--mid-grey);
  padding: 40px;
  text-align: center;
}

.editor-empty-state .state-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.editor-empty-state p {
  font-size: 13px;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .app-header, .drop-zone { margin-left: 16px; margin-right: 16px; }
  .tab-content { padding: 12px 16px 24px; }
  .color-grid { grid-template-columns: 1fr 1fr; }
  .font-scheme-row { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .file-split { flex-direction: column; min-height: auto; max-height: none; }
  .file-tree-pane { width: 100%; max-width: none; border-right: none; border-bottom: 1.5px solid var(--light-grey); max-height: 300px; }
}

/* ============================================================
   Color Audit section
   ============================================================ */
.audit-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
  margin-top: 8px;
}
.audit-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mid-grey);
  padding: 6px 10px;
  border-bottom: 2px solid var(--light-grey);
  text-align: left;
}
.audit-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--off-white);
  vertical-align: middle;
}
.audit-table tr:last-child td { border-bottom: none; }
.audit-swatch {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.1);
  display: inline-block;
  vertical-align: middle;
  cursor: default;
}
.audit-hex {
  font-family: monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.audit-files {
  font-size: 11px;
  color: var(--mid-grey);
  font-family: monospace;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Audit tables show the full slide/file lists — never truncate them. */
.font-audit-table .audit-files,
.color-audit-table .audit-files {
  max-width: none;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}
.audit-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}
.audit-tag.is-brand {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #4338ca;
}
.audit-tag.is-theme {
  background: var(--off-white);
  border: 1px solid var(--border);
  color: var(--ink);
  font-family: monospace;
}
.audit-variant {
  font-family: monospace;
  font-size: 11px;
  color: var(--slate, #334155);
}
.ts-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}
.ts-flag.is-match { color: #16794c; }
.ts-flag.is-diff { color: #b45309; }

/* ---- "Used by" master pills (shown wherever themes are listed) ---- */
.theme-usedby {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 2px;
}
.theme-usedby-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mid-grey);
}
.theme-usedby-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  background: var(--off-white);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-body);
}
.theme-usedby-pill:hover { border-color: var(--indigo); color: var(--indigo); }
.theme-usedby-pill .bi { font-size: 12px; }
.theme-usedby-pill.is-slideMaster .bi { color: #0d9488; }
.theme-usedby-pill.is-notesMaster .bi { color: #9333ea; }
.theme-usedby-pill.is-handoutMaster .bi { color: #b45309; }

/* ---- Graph Explorer (columnar flowchart) ---- */
.ge-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 8px;
}
.ge-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}
.ge-legend-item span { color: var(--mid-grey); }
.ge-legend-item .bi { font-size: 13px; color: var(--ge-color, var(--mid-grey)); }
.ge-hint {
  font-size: 11.5px;
  color: var(--mid-grey);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Per-kind colour. */
.ge-kind-presentation { --ge-color: #b45309; }
.ge-kind-theme { --ge-color: #4f46e5; }
.ge-kind-master { --ge-color: #0d9488; }
.ge-kind-layout { --ge-color: #2563eb; }
.ge-kind-slide { --ge-color: #475569; }
.ge-kind-media { --ge-color: #db2777; }
.ge-kind-chart { --ge-color: #7c3aed; }
.ge-kind-embedding { --ge-color: #16794c; }
.ge-kind-notes { --ge-color: #9333ea; }
.ge-kind-settings { --ge-color: #6b7280; }
.ge-kind-other { --ge-color: #94a3b8; }
.ge-legend-item .bi { color: var(--ge-color, var(--mid-grey)); }

.ge-flow {
  position: relative;
  overflow: auto;
  height: 480px;          /* replaced at runtime to fill down to the window */
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle, rgba(148,163,184,0.16) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--white);
}
.ge-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.ge-topbar .ge-hint { margin: 0; flex: 1; }
.ge-controls { display: flex; gap: 6px; flex-shrink: 0; }
.ge-flow-inner {
  position: relative;
  width: max-content;
  min-width: 100%;
  padding: 18px;
}
.ge-flow-edges {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.ge-flow-edge {
  fill: none;
  stroke: #cbd5e1;
  stroke-width: 1.4;
}
.ge-flow-edge-hot { stroke: var(--indigo); stroke-width: 2.2; }

.ge-flow-cols {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 52px;             /* room for the connectors between columns */
  align-items: flex-start;
}
.ge-flow-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 150px;
}
.ge-flow-col-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mid-grey);
  padding-bottom: 4px;
}
.ge-flow-col-head .bi { color: var(--ge-color, var(--mid-grey)); font-size: 13px; }
.ge-flow-col-count {
  margin-left: auto;
  background: var(--off-white);
  border-radius: 999px;
  padding: 0 7px;
  font-size: 10px;
  color: var(--mid-grey);
}

.ge-flow-node {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ge-color, var(--mid-grey));
  border-radius: var(--radius-md, 8px);
  padding: 7px 10px;
  cursor: pointer;
  font: inherit;
  transition: box-shadow var(--transition), transform var(--transition), opacity var(--transition);
}
.ge-flow-node:hover { box-shadow: var(--shadow); transform: translateX(1px); }
.ge-flow-node-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ge-color, var(--mid-grey));
  color: #fff;
}
.ge-flow-node-icon .bi { font-size: 12px; }
.ge-flow-node-icon.is-thumb {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  background: var(--off-white);
  overflow: hidden;
  border: 1px solid var(--border);
}
.ge-flow-node-icon.is-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ge-flow-node-body { min-width: 0; display: flex; flex-direction: column; }
.ge-flow-node-label {
  font-size: 12px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ge-flow-node-meta {
  font-size: 10px;
  color: var(--mid-grey);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ge-flow-node.is-media { min-width: 184px; align-items: center; }
.ge-flow-node-open {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: var(--light-grey);
  opacity: 0;
  cursor: pointer;
  transition: color var(--transition), opacity var(--transition);
}
.ge-flow-node-open .bi { font-size: 12px; }
.ge-flow-node:hover .ge-flow-node-open { opacity: 1; }
.ge-flow-node-open:hover { color: var(--indigo); }

/* Hover focus: dim everything, then light up the hovered node + neighbours. */
.ge-flow.ge-dim .ge-flow-node { opacity: 0.3; }
.ge-flow.ge-dim .ge-flow-edge { opacity: 0.12; }
.ge-flow.ge-dim .ge-flow-node.ge-hot { opacity: 1; box-shadow: 0 0 0 2px rgba(79,70,229,0.35); }
.ge-flow.ge-dim .ge-flow-edge-hot { opacity: 1; }

/* Click-to-filter: related lineage stays solid + highlighted, the rest fades. */
.ge-flow.ge-filtered .ge-flow-node.ge-faded { opacity: 0.28; }
.ge-flow.ge-filtered .ge-flow-node.ge-related { box-shadow: 0 0 0 2px rgba(79,70,229,0.30); }
.ge-flow-edge-faded { opacity: 0.1; }

/* ---- Slide Master audit ---- */
.master-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 10px);
  margin-bottom: 14px;
  overflow: hidden;
}
.master-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: var(--off-white);
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.master-head:hover { background: #eef0f3; }
.master-arrow {
  font-size: 10px;
  color: var(--mid-grey);
  flex-shrink: 0;
}
.master-name {
  font-family: var(--font-head);
  font-size: 15px;
  color: var(--ink);
  font-weight: 600;
}
.master-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--mid-grey);
}
.master-theme {
  display: inline-flex;
  align-items: center;
  font-family: monospace;
}
.master-body { padding: 4px 16px 12px; }
.master-foot {
  padding-top: 10px;
  display: flex;
  gap: 4px;
}
.layout-unused {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--mid-grey);
}
.norm-slot-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--off-white);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}
.norm-scheme-name {
  font-family: monospace;
  font-size: 11px;
  color: var(--mid-grey);
  margin-left: 4px;
}
.section-spinner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  color: var(--mid-grey);
  font-size: 13px;
  justify-content: center;
}

/* ============================================================
   Media replace button
   ============================================================ */
.media-overlay-replace {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition), background var(--transition);
  padding: 0;
  line-height: 1;
}
.media-card:hover .media-overlay-replace { opacity: 1; }
.media-overlay-replace:hover { background: rgba(0,0,0,0.7); }

/* ============================================================
   Export filename input
   ============================================================ */
.export-filename-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.export-filename-input {
  flex: 1;
  max-width: 360px;
  padding: 7px 12px;
  border: 1.5px solid var(--light-grey);
  border-radius: var(--radius);
  font-family: monospace;
  font-size: 13px;
  color: var(--dark-grey);
  background: var(--white);
  transition: border-color var(--transition);
}
.export-filename-input:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(0,166,160,0.12);
}

/* ============================================================
   Bootstrap Tooltip — navy brand override
   ============================================================ */
.tooltip-inner {
  background-color: var(--ink);
  font-family: var(--font-body);
  font-size: 12px;
  padding: 4px 8px;
}
.tooltip.bs-tooltip-top .tooltip-arrow::before { border-top-color: var(--ink); }
.tooltip.bs-tooltip-bottom .tooltip-arrow::before { border-bottom-color: var(--ink); }
.tooltip.bs-tooltip-start .tooltip-arrow::before { border-left-color: var(--ink); }
.tooltip.bs-tooltip-end .tooltip-arrow::before { border-right-color: var(--ink); }

/* ============================================================
   Bootstrap Modal — brand overrides
   ============================================================ */
.modal-header { border-bottom-color: var(--light-grey); }
.modal-footer { border-top-color: var(--light-grey); }
.modal-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
}

/* ============================================================
   Tab count badges
   ============================================================ */
.tab-badge {
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 10px;
  background: var(--indigo);
  color: #fff;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
}

/* ---- MRU editor delete button ---- */
.mru-del-btn {
  background: none;
  border: none;
  color: var(--mid-grey);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  min-width: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  margin-top: 2px;
  transition: color var(--transition), background var(--transition);
}
.mru-del-btn:hover {
  color: var(--danger);
  background: rgba(192,57,43,0.08);
}
.mru-del-btn:focus-visible { outline: 2px solid var(--indigo); outline-offset: 1px; }

/* ============================================================
   Landing page — mirrors the editor dashboard before file load
   ============================================================ */
.landing {
  background: #fff;
  color: var(--ink);
  margin: 0;
  padding: 0 32px;
}

.landing-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-width: 0;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  align-items: center;
  gap: 56px;
  padding: 72px 0 56px;
}

.hero-copy {
  max-width: 590px;
  min-width: 0;
}

.hero-kicker {
  color: var(--indigo);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-headline {
  font-family: var(--font-head);
  font-size: 48px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0;
}

.hero-headline .hero-private {
  color: var(--indigo);
}

.hero-online-line {
  display: inline;
}

.hero-rotator {
  --hero-rotator-lines: 5;
  color: var(--ink);
  display: inline-grid;
  grid-template-areas: "stack";
  height: 1.12em;
  min-width: 9.8em;
  overflow: hidden;
  position: relative;
  vertical-align: bottom;
}

.hero-rotator-items {
  display: grid;
  grid-area: stack;
}

.hero-rotator-items span {
  display: block;
  grid-area: 1 / 1;
  height: 1.12em;
  opacity: 0;
  transform: translateY(0.36em);
  animation: hero-rotate-word 12.5s ease-in-out infinite;
  animation-delay: -0.3s;
  will-change: opacity, transform;
}

.hero-rotator-items span:nth-child(2) { animation-delay: 2.2s; }
.hero-rotator-items span:nth-child(3) { animation-delay: 4.7s; }
.hero-rotator-items span:nth-child(4) { animation-delay: 7.2s; }
.hero-rotator-items span:nth-child(5) { animation-delay: 9.7s; }

.hero-rotator::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.1em;
  bottom: 0.02em;
  height: 0.1em;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.18);
  transform: scaleX(0);
  transform-origin: left;
  animation: hero-rotator-underline 2.5s ease-in-out infinite;
}

@keyframes hero-rotate-word {
  0% {
    opacity: 0;
    transform: translateY(0.36em);
  }
  4%,
  18% {
    opacity: 1;
    transform: translateY(0);
  }
  24%,
  100% {
    opacity: 0;
    transform: translateY(-0.28em);
  }
}

@keyframes hero-rotator-underline {
  0%,
  12% {
    transform: scaleX(0);
  }
  30%,
  72% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0);
    transform-origin: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-rotator-items span,
  .hero-rotator::after {
    animation: none;
  }

  .hero-rotator-items span:first-child {
    opacity: 1;
    transform: none;
  }
}

.hero-subhead {
  max-width: 560px;
  margin: 22px 0 24px;
  font-size: 17px;
  line-height: 1.65;
  color: #1F2937;
  overflow-wrap: break-word;
}

.hero-subhead code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--ink);
}

.hero-checks {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  color: var(--slate);
  font-size: 15px;
}

.hero-checks li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-checks i {
  color: var(--indigo);
  font-size: 21px;
  width: 24px;
  text-align: center;
}

.hero-uploader {
  min-width: 0;
}

.landing .drop-zone {
  margin: 0;
  min-height: 400px;
  padding: 40px 32px;
  border-color: #A5B4FC;
  background: #fff;
  box-shadow: 0 18px 50px rgba(79, 70, 229, 0.10);
}

.landing .drop-zone:hover,
.landing .drop-zone.drag-over {
  border-color: var(--indigo);
  background: #F8FAFC;
}

.landing .drop-zone label {
  min-height: 316px;
  justify-content: center;
  gap: 13px;
}

.pptx-document {
  width: 110px;
  height: 128px;
  color: #C7D2FE;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.pptx-document > i {
  font-size: 112px;
  line-height: 1;
}

.pptx-document span {
  position: absolute;
  bottom: 31px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--orange);
  color: #fff;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.landing .drop-primary {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
}

.landing .drop-secondary {
  color: var(--indigo);
  font-size: 17px;
  font-weight: 800;
}

.drop-privacy {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--slate);
  margin-top: 22px;
  font-size: 14px;
}

.drop-privacy i {
  color: var(--slate);
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  margin-bottom: 66px;
}

.feature-strip article {
  padding: 24px 22px;
  border-right: 1px solid var(--border);
  min-width: 0;
}

.feature-strip article:last-child {
  border-right: none;
}

.feature-strip i,
.edit-card > i,
.tool-grid i {
  color: var(--indigo);
  font-size: 28px;
  margin-bottom: 12px;
  display: inline-flex;
}

.feature-strip article:nth-child(4) i,
.tool-grid article:nth-child(4) i {
  color: var(--orange);
}

.feature-strip h2 {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--ink);
}

.feature-strip p,
.edit-card p,
.tool-grid p,
.step-card p,
.landing-footer p {
  margin: 0;
  color: var(--slate);
  font-size: 14px;
  line-height: 1.6;
}

.landing-section {
  padding: 0 0 68px;
}

.landing-section > h2 {
  text-align: center;
  font-size: 27px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 22px;
  letter-spacing: 0;
}

.step-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
}

.step-card {
  text-align: center;
  position: relative;
  padding: 0 18px;
}

.step-card:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 77px;
  left: calc(50% + 56px);
  width: calc(100% + 32px - 112px);
  border-top: 1.5px dashed #A5B4FC;
  z-index: 0;
}

.step-icon {
  width: 82px;
  height: 82px;
  margin: 0 auto 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  position: relative;
  z-index: 1;
}

.step-icon > i {
  font-size: 42px;
}

.palette-icon {
  display: grid;
  grid-template-columns: repeat(3, 20px);
  gap: 5px;
  padding: 17px;
}

.palette-icon span {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.08);
}

.step-number {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--indigo);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  margin: 0 auto 12px;
  position: relative;
  z-index: 1;
}

.step-card h3,
.edit-card h3,
.tool-grid h3 {
  display: inline;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

.step-card p {
  max-width: 320px;
  margin: 10px auto 0;
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Merged Features section: subtitle + groups mirroring the nav */
.section-sub {
  text-align: center;
  font-size: 15px;
  color: var(--mid-grey);
  margin: -10px 0 26px;
}
.section-sub em { color: var(--ink); font-style: normal; font-weight: 700; }

.feature-group { margin-top: 30px; }
.feature-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mid-grey);
  margin: 0 0 14px;
}
.feature-group-title .bi { color: var(--indigo); font-size: 15px; }
.feature-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(244px, 1fr));
  gap: 18px;
}

.edit-card,
.tool-grid article {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  padding: 22px 22px 20px;
  min-width: 0;
}

.edit-card h3,
.tool-grid h3 {
  display: block;
  margin-bottom: 9px;
}

.edit-card-coming-soon {
  background: #F8FAFC;
}

.edit-card-coming-soon > i {
  color: var(--mid-grey);
}

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin: 0 0 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #EEF2FF;
  color: var(--indigo);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Featured Brand Kit card — full width, above the grouped features */
.edit-card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 30px;
  align-items: center;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #FBFCFF 0%, #F3F4FF 100%);
  border-color: #C7D2FE;
}

.featured-text { position: relative; }

.new-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--indigo);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.featured-text > i {
  display: block;
  font-size: 26px;
  color: var(--indigo);
  margin-bottom: 8px;
}

.featured-text h3 { margin-bottom: 8px; }
.featured-text p { color: var(--mid-grey); }

/* Mini replica of PowerPoint's color menu */
.featured-menu {
  background: #2b2b2b;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}

.fm-label {
  font-size: 12px;
  font-weight: 700;
  color: #f4f4f4;
  margin: 4px 0 7px;
}
.fm-label:not(:first-child) { margin-top: 12px; }

.fm-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
}

.fm-row span {
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Tint/shade grid below the theme base row */
.fm-variants {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 3px;
}

/* Custom colors fade out, implying the full (up to 50) palette */
.fm-custom {
  display: flex;
  flex-direction: column;
  gap: 3px;
  -webkit-mask-image: linear-gradient(to bottom, #000 22%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 22%, transparent 92%);
}

@media (max-width: 760px) {
  .edit-card-featured {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

.mini-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.mini-swatches span {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.08);
}

.mini-swatches.soft span {
  width: 24px;
}

.xml-sample,
.font-sample,
.media-sample {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  color: var(--indigo);
  font-size: 26px;
  font-weight: 800;
}

.xml-sample {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 22px;
}

.media-sample i {
  font-size: 27px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 22px;
}

.tool-grid article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 14px;
  align-items: start;
  box-shadow: none;
}

.tool-grid i {
  margin: 0;
  font-size: 22px;
  grid-row: span 2;
}

.site-footer {
  background: #fff;
  color: var(--ink);
  padding: 0 32px 44px;
}

/* Once a file is loaded the editor takes over — hide the marketing footer. */
body.editor-active .site-footer {
  display: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(140px, 1fr));
  gap: 32px;
  padding: 0;
}

.footer-intro p {
  max-width: 340px;
  margin-top: 14px;
}

.footer-brand {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-brand strong {
  font-size: 17px;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 9px;
}

.footer-links h2 {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin: 0 0 3px;
}

.footer-links a {
  color: var(--slate);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--indigo);
}

.footer-intro p {
  margin: 0;
  color: var(--slate);
  font-size: 14px;
  line-height: 1.6;
}

.footer-brand .brand-mark {
  width: 24px;
  height: 32px;
}

/* ============================================================
   SEO content pages
   ============================================================ */
.seo-page {
  background: #fff;
  color: var(--ink);
}

.seo-main {
  padding: 0 32px;
}

.seo-hero,
.seo-section,
.seo-cta {
  max-width: 980px;
  margin: 0 auto;
}

.seo-hero {
  display: grid;
  gap: 20px;
  padding: 72px 0 54px;
  border-bottom: 1px solid var(--border);
}

.seo-eyebrow {
  color: var(--indigo);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.seo-hero h1 {
  max-width: 820px;
  font-size: 48px;
  font-weight: 800;
  line-height: 1.08;
  margin: 0;
  letter-spacing: 0;
}

.seo-lede {
  max-width: 760px;
  color: var(--slate);
  font-size: 18px;
  line-height: 1.7;
  margin: 0;
}

.seo-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.seo-section {
  padding: 48px 0 0;
}

.seo-section h2 {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  margin: 0 0 14px;
}

.seo-section h3 {
  font-size: 17px;
  line-height: 1.3;
  font-weight: 800;
  margin: 0 0 8px;
}

.seo-section p,
.seo-section li,
.seo-cta p {
  color: var(--slate);
  font-size: 16px;
  line-height: 1.7;
}

.seo-section p {
  margin: 0 0 16px;
}

.seo-list,
.seo-steps {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.seo-list li,
.seo-steps li {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  background: #F8FAFC;
}

.seo-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.seo-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  min-width: 0;
}

.seo-card i {
  color: var(--indigo);
  display: inline-flex;
  font-size: 24px;
  margin-bottom: 12px;
}

.seo-card p {
  margin: 0;
  font-size: 15px;
}

.seo-cta {
  display: grid;
  gap: 16px;
  margin-top: 56px;
  margin-bottom: 54px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #F8FAFC;
}

.seo-cta h2 {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
}

.seo-cta p {
  max-width: 720px;
  margin: 0;
}

.seo-page .site-footer {
  padding-top: 44px;
  border-top: 1px solid var(--border);
}

@media (max-width: 1100px) {
  .landing-nav { gap: 18px; }
  .landing-hero { grid-template-columns: 1fr; gap: 34px; }
  .hero-copy { max-width: 760px; }
  .hero-online-line { display: block; }
  .feature-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-strip article { border-bottom: 1px solid var(--border); }
  .feature-strip article:nth-child(2n) { border-right: none; }
  .feature-strip article:nth-last-child(-n+1) { border-bottom: none; }
  .edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .app-header {
    height: auto;
    min-height: 68px;
    padding: 14px 20px;
    margin-left: 0;
    margin-right: 0;
    flex-wrap: wrap;
    gap: 14px;
  }

  .brand-name { font-size: 19px; }
  .landing-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .landing-nav::-webkit-scrollbar { display: none; }
  .header-cta { margin-left: auto; }
  .file-bar {
    order: 3;
    width: 100%;
    margin-left: 0;
  }
  .landing { padding-left: 20px; padding-right: 20px; }
  .landing-hero { padding-top: 48px; padding-bottom: 52px; }
  .hero-headline { font-size: 38px; }
  .hero-subhead { font-size: 16px; }
  .step-row,
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .step-card:not(:last-child)::after { display: none; }
}

@media (max-width: 600px) {
  .landing {
    padding: 0 16px;
  }

  .site-footer {
    padding: 0 16px 36px;
  }

  .app-header {
    padding-left: 16px;
    padding-right: 16px;
    gap: 10px;
  }

  .brand-mark {
    width: 27px;
    height: 36px;
  }

  /* Trim the brand and CTA so logo + hamburger + CTA stay on one row */
  .brand-name {
    font-size: 16px;
  }

  .header-cta {
    min-height: 36px;
    padding-left: 12px;
    padding-right: 12px;
    margin-left: 0;
  }

  /* Collapse the nav behind a hamburger instead of hiding it outright */
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .landing-nav {
    display: none;
  }

  .app-header.nav-open .landing-nav {
    display: flex;
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    overflow: visible;
    margin-left: 0;
  }

  .app-header.nav-open .landing-nav a {
    padding: 13px 2px;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
  }

  .app-header.nav-open .landing-nav a:last-child {
    border-bottom: none;
  }

  .landing-hero {
    padding: 36px 0 44px;
  }

  .hero-headline {
    font-size: 33px;
  }

  .hero-checks {
    font-size: 13px;
  }

  .landing .drop-zone {
    min-height: 320px;
    padding: 30px 18px;
  }

  .landing .drop-zone label {
    min-height: 252px;
  }

  .pptx-document {
    width: 88px;
    height: 104px;
  }

  .pptx-document > i {
    font-size: 92px;
  }

  .pptx-document span {
    bottom: 25px;
    font-size: 12px;
  }

  .landing .drop-primary {
    font-size: 22px;
  }

  .landing .drop-secondary {
    font-size: 15px;
  }

  .feature-strip,
  .edit-grid {
    grid-template-columns: 1fr;
  }

  .feature-strip {
    margin-bottom: 52px;
  }

  .landing-section {
    padding-bottom: 56px;
  }

  .feature-strip article,
  .feature-strip article:nth-child(2n) {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .feature-strip article:last-child {
    border-bottom: none;
  }

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

  .footer-intro {
    grid-column: 1 / -1;
  }

  .seo-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .seo-main {
    padding: 0 16px;
  }

  .seo-hero {
    padding: 46px 0 38px;
  }

  .seo-hero h1 {
    font-size: 34px;
  }

  .seo-lede {
    font-size: 16px;
  }

  .seo-section {
    padding-top: 38px;
  }

  .seo-section h2,
  .seo-cta h2 {
    font-size: 24px;
  }

  .seo-cta {
    margin-top: 42px;
    padding: 22px;
  }

}

/* ============================================================
   Brand Kit
   ============================================================ */
.brand-kit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.brand-kit-editor {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.brand-kit-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

.brand-kit-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.brand-kit-card-head h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.brand-kit-hint,
.brand-kit-count {
  font-size: 12px;
  color: var(--mid-grey);
  font-weight: 500;
}

.bk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.bk-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border-radius: 7px;
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: outline-color var(--transition), background var(--transition);
}

.bk-row.is-selected {
  background: rgba(79, 70, 229, 0.06);
  outline-color: rgba(79, 70, 229, 0.36);
}

.bk-swatch {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,0.12);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform var(--transition);
}
.bk-swatch:hover { transform: scale(1.08); }

.bk-hex {
  width: 78px;
  flex-shrink: 0;
  padding: 5px 7px;
  border: 1.5px solid var(--light-grey);
  border-radius: var(--radius);
  font-family: monospace;
  font-size: 12px;
  color: var(--ink);
  background: var(--white);
}
.bk-hex:focus { outline: none; border-color: var(--indigo); }

.bk-slot-label {
  font-size: 12px;
  color: var(--mid-grey);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.bk-name {
  flex: 1;
  min-width: 0;
  padding: 5px 8px;
  border: 1.5px solid var(--light-grey);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--ink);
  background: var(--white);
}
.bk-name:focus { outline: none; border-color: var(--indigo); }

.bk-del {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--mid-grey);
  font-size: 18px;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.bk-del:hover { background: rgba(192,57,43,0.1); color: var(--danger); }

.bk-empty {
  font-size: 13px;
  color: var(--mid-grey);
  font-style: italic;
}

/* Preview column */
.brand-kit-preview-col { min-width: 0; }

.brand-kit-preview-sticky {
  position: sticky;
  top: 16px;
}

.brand-kit-preview-caption {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mid-grey);
  margin-bottom: 8px;
}

.brand-kit-apply {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Warning banner inside the theme-selector dialog */
.theme-selector-warn {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #92400e;
  font-size: 12.5px;
  line-height: 1.45;
}

.theme-selector-warn i {
  color: var(--orange);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---- PowerPoint color-menu preview ---- */
.pp-menu {
  background: #2b2b2b;
  border-radius: 8px;
  padding: 12px 14px 14px;
  box-shadow: 0 10px 34px rgba(0,0,0,0.34);
  color: #e8e8e8;
  user-select: none;
  width: 100%;
  max-width: 340px;
}

.pp-menu-label {
  font-size: 14px;
  font-weight: 700;
  color: #f4f4f4;
  margin: 10px 0 7px;
}

.pp-menu-label-link {
  display: block;
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.pp-menu-label-link:hover,
.pp-menu-label-link:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pp-menu-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
}

.pp-menu-row-base { margin-bottom: 4px; }
.pp-menu-variants {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pp-menu-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
}

.pp-menu-cell {
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  transition: transform var(--transition);
}
.pp-menu-cell:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
}
.pp-menu-row-base .pp-menu-cell { border-radius: 3px; }
.pp-menu-cell:hover {
  transform: scale(1.12);
  border-color: #fff;
  position: relative;
  z-index: 2;
}
.pp-menu-cell.selected {
  outline: 2px solid #fff;
  outline-offset: -1px;
  box-shadow: 0 0 0 1px #2b2b2b;
}

.pp-menu-row-recent { grid-template-columns: repeat(10, 1fr); }

.pp-menu-empty {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #8a8a8a;
  font-style: italic;
  padding: 2px 0;
}

.pp-menu-empty-btn {
  grid-column: 1 / -1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #e8e8e8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.pp-menu-empty-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
}

.pp-menu-empty-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
}

@media (max-width: 900px) {
  .brand-kit-layout { grid-template-columns: 1fr; }
  .brand-kit-preview-sticky { position: static; }
  .pp-menu { max-width: 360px; margin: 0 auto; }
}

@media (max-width: 560px) {
  .bk-grid { grid-template-columns: 1fr; }
}
