:root {
  /* KAINOS Digital Palette */
  --ek-bg: #FAF9FC;
  --ek-surface: #FFFFFF;
  --ek-surface-subtle: #F3F0FA;
  --ek-surface-muted: #EDE8F7;
  --ek-border: #E2DAF2;
  --ek-border-strong: #DCD3F0;
  --ek-ink: #161224;
  --ek-ink-muted: #504968;
  --ek-ink-soft: #6E6687;
  --ek-accent: #5B35D5;
  --ek-accent-hover: #4523B4;
  --ek-accent-soft: #EDE8F7;
  --ek-accent-border: #DCD3F0;
  --ek-accent-ring: rgba(91, 53, 213, 0.14);
  --ek-backdrop: rgba(22, 18, 36, 0.48);
  --ek-modal-backdrop: rgba(22, 18, 36, 0.56);

  /* Semantic Status Palette (Preserved) */
  --ek-amber: #b45309;
  --ek-amber-bg: #fff7e6;
  --ek-amber-border: #f0d7a6;
  --ek-amber-ink: #713f12;
  --ek-danger: #b42318;
  --ek-danger-bg: #fff1f0;
  --ek-danger-border: #f2c4c0;
  --ek-ok: #167647;
  --ek-ok-bg: #eaf8f0;
  --ek-ok-border: #bfe6ce;

  /* Layout & Geometry */
  --ek-sidebar-w: 248px;
  --ek-topbar-h: 64px;
  --ek-container-max: 1200px;
  --ek-radius-sm: 8px;
  --ek-radius-md: 12px;
  --ek-radius-lg: 16px;

  /* Typography */
  --ek-font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ek-font-heading: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ek-font-sans: var(--ek-font-body);
  --ek-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--ek-topbar-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--ek-font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ek-ink);
  background: var(--ek-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.ek-drawer-open {
  overflow: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--ek-font-heading);
  color: var(--ek-ink);
}

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

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

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--ek-accent);
  outline-offset: 2px;
}

.ek-tabular {
  font-variant-numeric: tabular-nums;
}

.ek-mono {
  font-family: var(--ek-font-mono);
  font-variant-numeric: tabular-nums;
}

/* Shell Layout */
.ek-shell {
  min-height: 100vh;
  display: flex;
}

.ek-shell.ek-shell-topnav {
  flex-direction: column;
}

/* KAINOS Sticky Top Navigation */
.ek-header {
  position: sticky;
  top: 0;
  z-index: 45;
  height: var(--ek-topbar-h);
  background: rgba(250, 249, 252, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ek-border);
  width: 100%;
}

.ek-header-inner {
  max-width: var(--ek-container-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.ek-header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.ek-header-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: var(--ek-radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ek-ink-muted);
  white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease;
}

.ek-header-link:hover {
  background: var(--ek-surface-subtle);
  color: var(--ek-ink);
}

.ek-header-link.is-active,
.ek-header-link[aria-current="page"] {
  background: var(--ek-accent-soft);
  color: var(--ek-accent-hover);
  font-weight: 600;
}

.ek-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ek-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 14px;
  border-radius: var(--ek-radius-sm);
  border: 1px solid transparent;
  background: var(--ek-accent);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 140ms ease;
}

.ek-header-cta:hover {
  background: var(--ek-accent-hover);
}

.ek-header .ek-mobile-menu-btn {
  display: none;
}

/* Legacy Mobile Top Bar (kept for subpages prior to migration) */
.ek-mobile-bar {
  display: none;
}

/* Sidebar / Mobile Slide-Out Drawer */
.ek-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--ek-sidebar-w);
  background: var(--ek-surface);
  border-right: 1px solid var(--ek-border);
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow-y: auto;
}

/* Hide drawer sidebar on desktop when KAINOS top navigation is active */
.ek-shell-topnav .ek-sidebar {
  display: none;
}

.ek-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--ek-topbar-h);
  padding: 8px 18px;
  border-bottom: 1px solid var(--ek-border);
}

.ek-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ek-font-heading);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ek-ink);
  white-space: nowrap;
  flex-shrink: 0;
}

.ek-brand-kainos {
  align-items: center;
  gap: 2px;
}

.ek-brand-symbol {
  width: 48px;
  height: 48px;
  display: block;
  flex-shrink: 0;
}

.ek-brand-wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1;
  gap: 3px;
}

.ek-brand-wordmark-main {
  font-family: var(--ek-font-heading);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--ek-ink);
}

.ek-brand-wordmark-sub {
  font-family: var(--ek-font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5em;
  color: var(--ek-ink-soft);
}

.ek-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--ek-radius-sm);
  background: var(--ek-accent);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font-family: var(--ek-font-heading);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.ek-sidebar-close {
  display: none;
  border: 1px solid var(--ek-border);
  background: var(--ek-surface-subtle);
  color: var(--ek-ink);
  width: 40px;
  height: 40px;
  border-radius: var(--ek-radius-sm);
  font-size: 20px;
  line-height: 1;
}

.ek-sidebar-nav {
  padding: 14px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.ek-nav-group-label {
  padding: 12px 10px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ek-ink-soft);
  letter-spacing: 0.04em;
}

.ek-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--ek-radius-sm);
  border: 0;
  background: transparent;
  color: var(--ek-ink-muted);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease;
}

.ek-nav-item:hover {
  background: var(--ek-surface-subtle);
  color: var(--ek-ink);
}

.ek-nav-item.is-active,
.ek-nav-item[aria-current="page"] {
  background: var(--ek-accent-soft);
  color: var(--ek-accent-hover);
  font-weight: 600;
}

.ek-nav-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  color: currentColor;
}

.ek-nav-item-external {
  margin-top: 6px;
  border: 1px solid var(--ek-border-strong);
  background: var(--ek-surface-subtle);
  color: var(--ek-accent-hover);
  font-weight: 600;
}

.ek-nav-item-external:hover {
  background: var(--ek-surface-muted);
  border-color: var(--ek-accent);
  color: var(--ek-accent-hover);
}

.ek-nav-ext-arrow {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.85;
}

.ek-sidebar-foot {
  padding: 14px 18px 16px;
  border-top: 1px solid var(--ek-border);
  font-size: 12px;
  color: var(--ek-ink-soft);
  line-height: 1.5;
}

.ek-sidebar-foot a {
  color: var(--ek-ink-muted);
  font-weight: 600;
}

.ek-sidebar-foot a:hover {
  color: var(--ek-accent);
  text-decoration: underline;
}

.ek-sidebar-backdrop {
  display: none;
}

/* Main Workspace Area */
.ek-main {
  margin-left: var(--ek-sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  scroll-margin-top: var(--ek-topbar-h);
}

.ek-shell-topnav .ek-main {
  margin-left: 0;
  width: 100%;
}

.ek-container {
  width: 100%;
  max-width: var(--ek-container-max);
  margin: 0 auto;
  padding: 24px 32px 64px;
}

.ek-container-compact {
  padding: 16px 32px 48px;
}

.ek-container-game {
  padding: 12px 24px 28px;
}

/* KAINOS Editorial Hero */
.ek-hero-editorial {
  padding: 2px 0 20px;
  border-bottom: 1px solid var(--ek-border);
  margin-bottom: 22px;
  scroll-margin-top: calc(var(--ek-topbar-h) + 20px);
}

.ek-hero-editorial-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.ek-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ek-accent);
  margin: 0 0 8px;
}

.ek-hero-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--ek-font-heading);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--ek-ink);
  margin: 0 auto 10px;
}

.ek-hero-brand .ek-brand-mark {
  width: 28px;
  height: 28px;
  font-size: 13.5px;
}

.ek-hero-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ek-accent-hover);
  background: var(--ek-accent-soft);
  border: 1px solid var(--ek-border);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.ek-hero-editorial h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.3vw, 28px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ek-ink);
  text-wrap: balance;
}

.ek-hero-desc {
  margin: 0 auto 8px;
  color: var(--ek-ink-muted);
  font-size: clamp(14.5px, 1.4vw, 16px);
  font-weight: 400;
  line-height: 1.5;
  max-width: 58ch;
}

.ek-hero-editorial .ek-meta-line {
  justify-content: center;
  font-size: 12.5px;
}

.ek-hero-search-wrap {
  margin: 28px auto 0;
  max-width: 600px;
  text-align: center;
}

.ek-hero-search-wrap .ek-search-input {
  text-align: left;
}

/* Legacy boxed hero support (for unmigrated pages prior to Stage 2) */
.ek-intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.9fr);
  grid-template-areas:
    "hero search"
    "cats cats";
  gap: 20px;
  align-items: stretch;
}

.ek-hero {
  grid-area: hero;
  background: var(--ek-surface);
  border: 1px solid var(--ek-border);
  border-top: 3px solid var(--ek-accent);
  border-radius: var(--ek-radius-lg);
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ek-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(25px, 2.5vw, 34px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ek-ink);
  text-wrap: balance;
}

.ek-search-panel {
  grid-area: search;
  background: var(--ek-surface);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-lg);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ek-search-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ek-ink);
  margin-bottom: 8px;
}

.ek-search-form {
  display: flex;
  gap: 6px;
  width: 100%;
  background: var(--ek-surface);
  border: 1px solid var(--ek-border-strong);
  border-radius: var(--ek-radius-md);
  padding: 5px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.ek-search-form:focus-within {
  border-color: var(--ek-accent);
  box-shadow: 0 0 0 3px var(--ek-accent-ring);
}

.ek-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 9px 12px;
  font-size: 14.5px;
  color: var(--ek-ink);
  outline: none;
}

.ek-search-input::placeholder {
  color: var(--ek-ink-soft);
}

.ek-search-hint {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--ek-ink-soft);
  line-height: 1.45;
}

.ek-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 18px;
  border-radius: var(--ek-radius-sm);
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.ek-btn-primary {
  background: var(--ek-accent);
  color: #FFFFFF;
}

.ek-btn-primary:hover {
  background: var(--ek-accent-hover);
}

.ek-btn-secondary {
  background: var(--ek-surface);
  color: var(--ek-ink);
  border-color: var(--ek-border-strong);
}

.ek-btn-secondary:hover {
  background: var(--ek-surface-subtle);
  border-color: var(--ek-accent);
}

.ek-btn-soft {
  background: var(--ek-accent-soft);
  color: var(--ek-accent-hover);
  border-color: var(--ek-border);
}

.ek-btn-soft:hover {
  background: var(--ek-border);
}

.ek-meta-line {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ek-ink-soft);
}

.ek-hero-aside {
  background: var(--ek-surface-subtle);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-md);
  padding: 18px;
}

.ek-hero-aside-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ek-ink);
}

.ek-quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ek-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px;
  background: var(--ek-surface);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-sm);
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--ek-ink);
  transition: border-color 140ms ease, background-color 140ms ease;
}

.ek-quick-btn:hover {
  border-color: var(--ek-accent);
  background: var(--ek-surface-subtle);
}

.ek-quick-btn small {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ek-ink-soft);
}

/* Section Spacing & Headers */
.ek-section {
  margin-top: 52px;
  scroll-margin-top: calc(var(--ek-topbar-h) + 20px);
}

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

.ek-section-head h2 {
  margin: 0 0 4px;
  font-size: clamp(21px, 2.2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ek-ink);
}

.ek-section-head p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ek-ink-muted);
}

.ek-section-meta {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ek-ink-soft);
  white-space: nowrap;
}

/* Balanced Category Grid */
.ek-categories-section {
  margin-top: 0;
  scroll-margin-top: calc(var(--ek-topbar-h) + 20px);
}

.ek-cat-head {
  margin-bottom: 12px;
}

.ek-cat-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ek-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ek-cat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 15px 16px;
  background: var(--ek-surface);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-md);
  text-align: left;
  min-width: 0;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.ek-cat-card:hover {
  border-color: var(--ek-accent);
  background: var(--ek-surface-subtle);
}

.ek-cat-card.is-active {
  border-color: var(--ek-accent);
  background: var(--ek-accent-soft);
}

.ek-cat-card-wide {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.ek-cat-card-wide .ek-cat-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}

.ek-cat-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ek-cat-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--ek-radius-sm);
  background: var(--ek-surface-subtle);
  border: 1px solid var(--ek-border);
  color: var(--ek-accent);
  display: grid;
  place-items: center;
  margin-bottom: 2px;
}

.ek-cat-card.is-active .ek-cat-icon {
  background: var(--ek-surface);
  border-color: var(--ek-border-strong);
}

.ek-cat-card strong {
  font-family: var(--ek-font-heading);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ek-ink);
}

.ek-cat-card span:not(.ek-cat-icon):not(.ek-cat-card-body) {
  font-size: 13px;
  color: var(--ek-ink-muted);
  line-height: 1.45;
}

/* Photo Tools Spotlight */
.ek-photo-spotlight {
  background: var(--ek-surface);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-lg);
  padding: 28px 30px;
}

.ek-photo-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.ek-other-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.ek-feature-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ek-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--ek-radius-sm);
  background: var(--ek-surface);
  border: 1px solid var(--ek-border-strong);
  color: var(--ek-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ek-feature-head .ek-card-kicker {
  margin-bottom: 0;
}

.ek-tool-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ek-tool-card-head .ek-tool-meta {
  margin-bottom: 0;
}

.ek-tool-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--ek-radius-sm);
  background: var(--ek-surface-subtle);
  border: 1px solid var(--ek-border);
  color: var(--ek-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ek-feature-card {
  background: var(--ek-surface-subtle);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.ek-feature-card.is-highlighted {
  background: var(--ek-accent-soft);
  border-color: var(--ek-border-strong);
}

.ek-feature-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ek-ink);
}

.ek-feature-card .ek-card-kicker {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ek-accent);
  margin-bottom: 6px;
}

.ek-feature-card p {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--ek-ink-muted);
  flex: 1;
}

/* Filter Toolbar + Tool Directory Grid */
.ek-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.ek-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--ek-surface);
  border: 1px solid var(--ek-border);
  padding: 4px;
  border-radius: var(--ek-radius-md);
}

.ek-filter-tab {
  border: 0;
  background: transparent;
  color: var(--ek-ink-muted);
  padding: 7px 14px;
  min-height: 36px;
  border-radius: var(--ek-radius-sm);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease;
}

.ek-filter-tab:hover {
  color: var(--ek-ink);
  background: var(--ek-surface-subtle);
}

.ek-filter-tab.is-active {
  background: var(--ek-accent);
  color: #FFFFFF;
}

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

.ek-tool-card {
  background: var(--ek-surface);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.ek-tool-card:hover {
  border-color: var(--ek-accent);
  background: var(--ek-surface);
}

.ek-tool-meta {
  font-size: 12px;
  font-weight: 500;
  color: var(--ek-ink-soft);
  margin-bottom: 8px;
}

.ek-tool-card h3 {
  margin: 0 0 8px;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ek-ink);
}

.ek-tool-card p {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--ek-ink-muted);
  line-height: 1.55;
  flex: 1;
}

.ek-tool-action {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--ek-accent);
  font-size: 13.5px;
  font-weight: 600;
}

.ek-tool-action:hover {
  color: var(--ek-accent-hover);
  text-decoration: underline;
}

.ek-empty-state {
  display: none;
  background: var(--ek-surface);
  border: 1px dashed var(--ek-border-strong);
  border-radius: var(--ek-radius-md);
  padding: 28px;
  text-align: center;
  color: var(--ek-ink-muted);
}

/* Promo Banners: Mini Game & Free CV Maker */
.ek-split-promos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.ek-promo-card {
  background: var(--ek-surface);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-lg);
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  scroll-margin-top: calc(var(--ek-topbar-h) + 20px);
}

.ek-promo-card.is-cv {
  background: var(--ek-surface-subtle);
  border-color: var(--ek-border-strong);
}

.ek-promo-kicker {
  font-size: 12px;
  font-weight: 600;
  color: var(--ek-accent);
  margin: 0 0 6px;
}

.ek-promo-card h2 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.ek-promo-card p {
  margin: 0;
  font-size: 14px;
  color: var(--ek-ink-muted);
}

.ek-promo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* How It Works & FAQ */
.ek-how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ek-how-card {
  background: var(--ek-surface);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-md);
  padding: 22px;
}

.ek-how-step {
  font-family: var(--ek-font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ek-accent);
  margin-bottom: 8px;
}

.ek-how-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}

.ek-how-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ek-ink-muted);
}

.ek-faq-list {
  background: var(--ek-surface);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-md);
  padding: 4px 24px;
}

.ek-faq-list details {
  border-bottom: 1px solid var(--ek-border);
  padding: 18px 0;
}

.ek-faq-list details:last-child {
  border-bottom: 0;
}

.ek-faq-list summary {
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ek-ink);
}

.ek-faq-list details p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--ek-ink-muted);
}

/* Footer */
.ek-footer {
  margin-top: auto;
  border-top: 1px solid var(--ek-border);
  background: var(--ek-surface);
}

.ek-footer-inner {
  max-width: var(--ek-container-max);
  margin: 0 auto;
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.ek-footer-copy {
  font-size: 13px;
  color: var(--ek-ink-muted);
}

.ek-footer-copy a {
  color: var(--ek-accent);
  font-weight: 600;
}

.ek-footer-copy a:hover {
  color: var(--ek-accent-hover);
  text-decoration: underline;
}

.ek-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ek-ink-muted);
}

.ek-footer-links a:hover {
  color: var(--ek-accent);
  text-decoration: underline;
}

/* Modals & Tool Workspaces */
.ek-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--ek-modal-backdrop);
  padding: 18px;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}

.ek-modal-backdrop.open {
  display: flex;
}

.ek-modal {
  position: relative;
  width: min(100%, 760px);
  max-height: min(92vh, 920px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--ek-radius-lg);
  background: var(--ek-surface);
  border: 1px solid var(--ek-border-strong);
  box-shadow: 0 16px 40px rgba(22, 18, 36, 0.14);
}

.ek-modal-head {
  padding: 16px 24px;
  border-bottom: 1px solid var(--ek-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  background: var(--ek-surface);
}

.ek-modal-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.ek-close-btn {
  border: 1px solid var(--ek-border);
  width: 38px;
  height: 38px;
  border-radius: var(--ek-radius-sm);
  background: var(--ek-surface-subtle);
  color: var(--ek-ink);
  font-size: 20px;
  line-height: 1;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.ek-close-btn:hover {
  background: var(--ek-surface-muted);
  border-color: var(--ek-border-strong);
}

.ek-modal-body {
  padding: 22px 24px 24px;
  background: var(--ek-surface);
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.tool-panel {
  display: none;
}

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

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ek-ink);
}

.field input[type="text"],
.field input[type="number"],
.field input[type="date"],
.field input[type="search"],
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--ek-border-strong);
  border-radius: var(--ek-radius-sm);
  padding: 10px 12px;
  background: var(--ek-surface);
  color: var(--ek-ink);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input[type="text"]:focus,
.field input[type="number"]:focus,
.field input[type="date"]:focus,
.field input[type="search"]:focus,
.field select:focus,
.field textarea:focus,
.ek-srt-textarea:focus {
  border-color: var(--ek-accent);
  box-shadow: 0 0 0 3px var(--ek-accent-ring);
  outline: none;
}

input[type="checkbox"],
input[type="range"] {
  accent-color: var(--ek-accent);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.55;
}

.row-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.action {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--ek-radius-sm);
  padding: 9px 16px;
  background: var(--ek-accent);
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.action:hover:not(:disabled) {
  background: var(--ek-accent-hover);
}

.action.secondary {
  background: var(--ek-surface-subtle);
  color: var(--ek-accent-hover);
  border-color: var(--ek-border-strong);
}

.action.secondary:hover:not(:disabled) {
  background: var(--ek-surface-muted);
  border-color: var(--ek-accent);
}

.action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.result-box {
  background: var(--ek-surface-subtle);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-md);
  padding: 15px;
  margin-top: 14px;
  color: var(--ek-ink);
  font-size: 13.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.stat {
  background: var(--ek-surface-subtle);
  border: 1px solid var(--ek-border);
  padding: 11px;
  border-radius: var(--ek-radius-sm);
}

.stat strong {
  display: block;
  font-family: var(--ek-font-heading);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ek-ink);
}

.stat span {
  color: var(--ek-ink-soft);
  font-size: 11.5px;
}

.upload-zone {
  border: 1.5px dashed var(--ek-border-strong);
  border-radius: var(--ek-radius-md);
  padding: 20px;
  text-align: center;
  background: var(--ek-surface-subtle);
}

.upload-zone p {
  color: var(--ek-ink-muted);
  font-size: 13px;
  margin: 6px 0 10px;
}

.preview-img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  margin: 12px auto;
  border-radius: var(--ek-radius-sm);
  border: 1px solid var(--ek-border);
}

/* Semantic Warning Notice (Preserved) */
.notice {
  background: var(--ek-amber-bg);
  border: 1px solid var(--ek-amber-border);
  border-radius: var(--ek-radius-sm);
  padding: 11px 13px;
  color: var(--ek-amber-ink);
  font-size: 13px;
  line-height: 1.55;
  margin-top: 10px;
}

.small-muted {
  color: var(--ek-ink-soft);
  font-size: 12.5px;
  line-height: 1.55;
}

.copy-row {
  display: flex;
  gap: 8px;
}

/* Standalone Subpage Content Panels */
.ek-page-header {
  background: var(--ek-surface);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-lg);
  padding: 30px 32px;
  margin: 0 auto 28px;
}

.ek-page-header .ek-eyebrow {
  color: var(--ek-accent);
  margin: 0 0 10px;
}

.ek-page-header h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.ek-page-header p:not(.ek-eyebrow) {
  margin: 0;
  color: var(--ek-ink-muted);
  max-width: 68ch;
}

.ek-page-header-compact {
  padding: 18px 24px;
  margin-bottom: 14px;
}

.ek-page-header-compact .ek-eyebrow {
  margin: 0 0 4px;
}

.ek-page-header-compact h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.6vw, 30px);
}

.ek-page-header-compact h1:last-child {
  margin-bottom: 0;
}

.ek-page-header-compact p:not(.ek-eyebrow) {
  font-size: 14.5px;
  line-height: 1.5;
}

.ek-tool-filter-field {
  margin: 10px 0 0;
  max-width: 440px;
}

.ek-tool-filter-field input {
  padding: 8px 12px;
}

.ek-section-compact {
  margin-top: 14px;
}

.ek-section-compact .ek-section-head {
  margin-bottom: 12px;
  gap: 6px 14px;
}

.ek-section-compact .ek-pdf-card {
  padding: 16px 18px;
  gap: 4px;
}

.ek-page-header-game {
  max-width: 720px;
  padding: 11px 18px;
  margin: 0 auto 10px;
}

.ek-page-header-game .ek-eyebrow {
  font-size: 11px;
  margin: 0 0 2px;
}

.ek-page-header-game h1 {
  font-size: 21px;
  line-height: 1.15;
  margin: 0 0 2px;
}

.ek-page-header-game p:not(.ek-eyebrow) {
  font-size: 13px;
  line-height: 1.35;
}

.ek-article-card {
  background: var(--ek-surface);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-lg);
  padding: 30px 34px;
}

.ek-article-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 8px;
}

.ek-article-card h2:first-child {
  margin-top: 0;
}

.ek-article-card p,
.ek-article-card li {
  color: var(--ek-ink-muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.ek-article-card a {
  color: var(--ek-accent);
  font-weight: 600;
  text-decoration: underline;
}

.ek-article-card a:hover {
  color: var(--ek-accent-hover);
}

/* PDF & Audio/Video Tools Page Specific */
.ek-pdf-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.ek-progress-wrap {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--ek-surface-subtle);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-sm);
}

.ek-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ek-ink);
  margin-bottom: 8px;
}

.ek-progress-track {
  height: 8px;
  background: var(--ek-border);
  border-radius: 99px;
  overflow: hidden;
}

.ek-progress-fill {
  height: 100%;
  background: var(--ek-accent);
  border-radius: 99px;
  transition: width 150ms linear;
}

.ek-av-audio {
  width: 100%;
  max-width: 440px;
  height: 40px;
}

.ek-pdf-card {
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-md);
  padding: 20px;
  text-align: left;
  background: var(--ek-surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.ek-pdf-card:hover,
.ek-pdf-card.is-selected {
  border-color: var(--ek-accent);
  background: var(--ek-accent-soft);
}

.ek-pdf-card[hidden] {
  display: none;
}

.ek-pdf-workspace {
  display: none;
  margin-top: 20px;
  background: var(--ek-surface);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-lg);
  padding: 24px 26px;
  scroll-margin-top: calc(var(--ek-topbar-h) + 20px);
}

.ek-pdf-workspace.active {
  display: block;
}

.ek-pdf-workspace .ek-section-head {
  flex-wrap: nowrap;
  align-items: flex-start;
}

.ek-drop {
  border: 1.5px dashed var(--ek-border-strong);
  border-radius: var(--ek-radius-md);
  padding: 26px 18px;
  text-align: center;
  background: var(--ek-surface-subtle);
  transition: border-color 140ms ease, background-color 140ms ease;
}

.ek-drop.drag {
  border-color: var(--ek-accent);
  background: var(--ek-accent-soft);
}

.ek-file-list {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.ek-file-item {
  padding: 9px 12px;
  background: var(--ek-surface-subtle);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-sm);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* Semantic Status Lines & Result Banners (Preserved) */
.ek-status-line {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--ek-radius-sm);
  font-size: 13.5px;
  background: var(--ek-surface-subtle);
  color: var(--ek-ink-muted);
}

.ek-status-line.error {
  background: var(--ek-danger-bg);
  color: var(--ek-danger);
  border: 1px solid var(--ek-danger-border);
}

.ek-status-line.ok {
  background: var(--ek-ok-bg);
  color: var(--ek-ok);
  border: 1px solid var(--ek-ok-border);
}

.ek-status-line.warn {
  background: var(--ek-amber-bg);
  color: var(--ek-amber);
  border: 1px solid var(--ek-amber-border);
}

.ek-result-banner {
  display: none;
  margin-top: 14px;
  padding: 14px;
  background: var(--ek-ok-bg);
  border: 1px solid var(--ek-ok-border);
  border-radius: var(--ek-radius-sm);
}

.ek-result-banner.show {
  display: block;
}

.ek-result-banner a:not(.action) {
  color: var(--ek-ok);
  font-weight: 700;
  text-decoration: underline;
}

.ek-result-banner a.action {
  color: #FFFFFF;
  text-decoration: none;
}

/* SRT Checker Specific */
.ek-srt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(290px, 0.85fr);
  gap: 16px;
}

.ek-panel-card {
  background: var(--ek-surface);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-md);
  padding: 20px;
  min-width: 0;
}

.ek-srt-textarea {
  width: 100%;
  min-height: 290px;
  resize: vertical;
  border: 1px solid var(--ek-border-strong);
  border-radius: var(--ek-radius-sm);
  padding: 12px;
  font-family: var(--ek-font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  background: var(--ek-surface);
  color: var(--ek-ink);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.ek-srt-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
}

.ek-issue-item {
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-sm);
  padding: 10px 12px;
  background: var(--ek-surface-subtle);
  overflow-wrap: anywhere;
}

.ek-issue-item.error {
  border-color: var(--ek-danger-border);
  background: var(--ek-danger-bg);
}

.ek-issue-item.warning {
  border-color: var(--ek-amber-border);
  background: var(--ek-amber-bg);
}

.ek-issue-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ek-issue-severity {
  font-family: var(--ek-font-mono);
  font-size: 11px;
  font-weight: 700;
}

.ek-issue-item.error .ek-issue-severity {
  color: var(--ek-danger);
}

.ek-issue-item.warning .ek-issue-severity {
  color: var(--ek-amber);
}

/* Odd One Out Game Specific */
.ek-game-box {
  max-width: 720px;
  margin: 0 auto;
  background: var(--ek-surface);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-lg);
  padding: 14px 20px;
}

.ek-game-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.ek-game-modes {
  display: flex;
  gap: 3px;
  background: var(--ek-surface-subtle);
  border: 1px solid var(--ek-border);
  padding: 3px;
  border-radius: var(--ek-radius-md);
}

.ek-game-mode {
  border: 0;
  background: transparent;
  color: var(--ek-ink-muted);
  padding: 6px 12px;
  border-radius: var(--ek-radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  transition: background-color 140ms ease, color 140ms ease;
}

.ek-game-mode:hover {
  color: var(--ek-ink);
}

.ek-game-mode.active {
  background: var(--ek-surface);
  color: var(--ek-accent-hover);
  box-shadow: 0 1px 2px rgba(22, 18, 36, 0.06);
}

.ek-game-stats {
  display: flex;
  gap: 6px;
}

.ek-game-stat {
  background: var(--ek-surface-subtle);
  border: 1px solid var(--ek-border);
  border-radius: var(--ek-radius-sm);
  padding: 4px 10px;
  min-width: 62px;
  text-align: center;
}

.ek-game-stat b {
  display: block;
  font-family: var(--ek-font-heading);
  font-size: 15.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  color: var(--ek-ink);
}

.ek-game-stat span {
  font-size: 10.5px;
  color: var(--ek-ink-soft);
}

.ek-timerbar {
  height: 5px;
  background: var(--ek-surface-muted);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 10px;
}

.ek-timerfill {
  height: 100%;
  width: 100%;
  background: var(--ek-accent);
  transition: width 0.2s linear, background-color 0.2s ease;
}

.ek-game-prompt {
  text-align: center;
  margin-bottom: 8px;
}

.ek-game-prompt h2 {
  margin: 0 0 2px;
  font-size: 16.5px;
  line-height: 1.2;
}

.ek-game-prompt p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.35;
}

.ek-game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 288px;
  margin: 0 auto;
}

.ek-game-tile {
  width: 100%;
  min-width: 0;
  padding: 0;
  aspect-ratio: 1;
  border: 1px solid var(--ek-border-strong);
  border-radius: var(--ek-radius-md);
  background: var(--ek-surface-subtle);
  display: grid;
  place-items: center;
  color: var(--ek-accent-hover);
  transition: border-color 120ms ease, background-color 120ms ease;
}

.ek-game-tile:hover:not(:disabled) {
  border-color: var(--ek-accent);
  background: var(--ek-accent-soft);
}

.ek-game-tile.correct {
  border-color: var(--ek-ok);
  background: var(--ek-ok-bg);
  color: var(--ek-ok);
}

.ek-game-tile.wrong {
  border-color: var(--ek-danger);
  background: var(--ek-danger-bg);
  color: var(--ek-danger);
}

.ek-game-tile .shape {
  font-size: clamp(26px, 6vw, 38px);
  line-height: 1;
}

.ek-game-tile .number {
  font-size: clamp(19px, 4.5vw, 27px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ek-game-tile .word {
  font-size: clamp(11.5px, 2.8vw, 14.5px);
  font-weight: 600;
  padding: 4px;
  text-align: center;
  overflow-wrap: anywhere;
}

.ek-game-feedback {
  min-height: 20px;
  text-align: center;
  margin: 8px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ek-accent);
}

.ek-game-actions {
  justify-content: center;
  margin-top: 0;
  gap: 8px;
}

.ek-game-actions .action {
  padding: 8px 16px;
  min-height: 36px;
  font-size: 13px;
}

.ek-game-meta {
  justify-content: center;
  margin-top: 8px;
  font-size: 11.5px;
  gap: 6px;
}

.ek-game-overlay {
  display: none;
  text-align: center;
  padding: 20px 12px 10px;
}

.ek-game-overlay.show {
  display: block;
}

/* Responsive Breakpoints */
@media (max-width: 1120px) {
  .ek-header-inner {
    padding: 0 20px;
    gap: 12px;
  }
  .ek-header-nav {
    gap: 2px;
  }
  .ek-header-link {
    padding: 6px 8px;
    font-size: 12.5px;
  }
  .ek-header-cta {
    padding: 6px 11px;
    font-size: 12.5px;
  }
  .ek-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ek-cat-card-wide {
    grid-column: 1 / -1;
  }
  .ek-photo-spotlight-grid,
  .ek-tool-grid,
  .ek-pdf-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 959px) {
  .ek-shell {
    flex-direction: column;
  }
  .ek-header-inner {
    padding: 0 16px;
  }
  .ek-header-nav,
  .ek-header-cta {
    display: none;
  }
  .ek-header .ek-mobile-menu-btn {
    display: inline-flex;
  }
  .ek-intro-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "cats"
      "search";
    gap: 14px;
  }
  .ek-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: var(--ek-topbar-h);
    padding: 0 16px;
    background: var(--ek-surface);
    border-bottom: 1px solid var(--ek-border);
    position: sticky;
    top: 0;
    z-index: 35;
  }
  .ek-mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: var(--ek-radius-sm);
    border: 1px solid var(--ek-border-strong);
    background: var(--ek-surface);
    color: var(--ek-ink);
    font-size: 13px;
    font-weight: 600;
  }
  .ek-mobile-menu-btn:hover {
    border-color: var(--ek-accent);
    background: var(--ek-surface-subtle);
  }
  .ek-shell-topnav .ek-sidebar,
  .ek-sidebar {
    display: flex;
    transform: translateX(-100%);
    transition: transform 180ms ease;
    width: min(84vw, 286px);
    box-shadow: 0 12px 32px rgba(22, 18, 36, 0.14);
  }
  .ek-shell-topnav .ek-sidebar.is-open,
  .ek-sidebar.is-open {
    transform: translateX(0);
  }
  .ek-sidebar-close {
    display: grid;
    place-items: center;
  }
  .ek-sidebar-backdrop.is-open {
    display: block;
    position: fixed;
    inset: 0;
    background: var(--ek-backdrop);
    z-index: 48;
  }
  .ek-main {
    margin-left: 0;
  }
  .ek-container {
    padding: 20px 16px 48px;
  }
  .ek-container-compact {
    padding: 12px 16px 36px;
  }
  .ek-container-game {
    padding: 10px 12px 24px;
  }
  .ek-hero-editorial {
    padding: 4px 0 22px;
    margin-bottom: 22px;
  }
  .ek-section {
    margin-top: 38px;
  }
  .ek-section-compact {
    margin-top: 12px;
  }
  .ek-footer-inner {
    padding: 22px 16px;
  }
  .ek-srt-grid,
  .ek-other-spotlight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ek-hero-editorial h1 {
    font-size: 23px;
    margin-bottom: 6px;
  }
  .ek-hero {
    padding: 20px 16px;
  }
  .ek-hero-badge {
    margin-bottom: 10px;
  }
  .ek-hero h1 {
    font-size: 24px;
    margin-bottom: 6px;
  }
  .ek-hero-desc {
    font-size: 15.5px;
    margin-bottom: 10px;
  }
  .ek-meta-line {
    font-size: 12.5px;
  }
  .ek-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .ek-category-grid > .ek-cat-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .ek-cat-card {
    padding: 14px;
    gap: 4px;
  }
  .ek-cat-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 2px;
  }
  .ek-cat-card strong {
    font-size: 13.5px;
  }
  .ek-cat-card span:not(.ek-cat-icon):not(.ek-cat-card-body) {
    font-size: 12px;
    line-height: 1.35;
  }
  .ek-search-panel {
    padding: 16px;
  }
  .ek-search-form {
    padding: 4px;
  }
  .ek-search-form .ek-btn {
    padding: 8px 13px;
    font-size: 13px;
  }
  .ek-photo-spotlight,
  .ek-promo-card,
  .ek-page-header,
  .ek-article-card,
  .ek-pdf-workspace {
    padding: 20px 16px;
  }
  .ek-photo-spotlight-grid,
  .ek-other-spotlight-grid,
  .ek-tool-grid,
  .ek-split-promos,
  .ek-how-grid,
  .ek-pdf-tools-grid,
  .ek-av-tools-grid,
  .row-fields,
  .ek-quick-links {
    grid-template-columns: 1fr;
  }
  .ek-modal-backdrop {
    padding: 8px;
  }
  .ek-modal-head,
  .ek-modal-body {
    padding: 16px;
  }
  .ek-page-header-compact {
    padding: 10px 14px;
    margin-bottom: 8px;
  }
  .ek-page-header-compact .ek-eyebrow {
    font-size: 11px;
    margin-bottom: 2px;
  }
  .ek-page-header-compact h1 {
    font-size: 19.5px;
    line-height: 1.15;
    margin-bottom: 3px;
  }
  .ek-page-header-compact p:not(.ek-eyebrow) {
    font-size: 12.5px;
    line-height: 1.38;
  }
  .ek-tool-filter-field {
    margin-top: 8px;
  }
  .ek-tool-filter-field input {
    padding: 7px 11px;
    font-size: 13.5px;
  }
  .ek-section-compact {
    margin-top: 8px;
  }
  .ek-section-compact .ek-section-head {
    flex-wrap: nowrap;
    align-items: flex-start;
    margin-bottom: 8px;
  }
  .ek-section-compact .ek-section-meta {
    flex-shrink: 0;
  }
  .ek-section-compact .ek-section-head h2 {
    font-size: 17.5px;
  }
  .ek-section-compact .ek-pdf-tools-grid,
  .ek-section-compact .ek-av-tools-grid {
    gap: 8px;
  }
  .ek-section-compact .ek-pdf-card {
    padding: 10px 13px;
    gap: 2px;
  }
  .ek-page-header-game {
    padding: 9px 12px;
    margin-bottom: 8px;
  }
  .ek-page-header-game .ek-eyebrow {
    font-size: 10.5px;
    margin-bottom: 1px;
  }
  .ek-page-header-game h1 {
    font-size: 19px;
    margin-bottom: 2px;
  }
  .ek-page-header-game p:not(.ek-eyebrow) {
    font-size: 12px;
    line-height: 1.3;
  }
  .ek-game-box {
    padding: 10px 12px;
  }
  .ek-game-toolbar {
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
  }
  .ek-game-modes {
    width: 100%;
    max-width: 264px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ek-game-mode {
    padding: 5px 6px;
    font-size: 12px;
    text-align: center;
  }
  .ek-game-stats {
    width: 100%;
    max-width: 264px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .ek-game-stat {
    min-width: 0;
    padding: 3px 6px;
  }
  .ek-game-stat b {
    font-size: 14.5px;
  }
  .ek-game-stat span {
    font-size: 10px;
  }
  .ek-timerbar {
    height: 5px;
    margin-bottom: 8px;
  }
  .ek-game-prompt {
    margin-bottom: 6px;
  }
  .ek-game-prompt h2 {
    font-size: 15px;
  }
  .ek-game-prompt p {
    font-size: 12px;
  }
  .ek-game-grid {
    gap: 7px;
    max-width: 244px;
  }
  .ek-game-feedback {
    min-height: 18px;
    margin: 6px 0 5px;
    font-size: 12px;
  }
  .ek-game-actions .action {
    padding: 7px 14px;
    min-height: 36px;
    font-size: 12.5px;
  }
  .ek-game-meta {
    margin-top: 6px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
