/*
 * EDGE FILES — article explorer.
 * Editorial OS design, scoped to /blog/post/ and taxonomy pages.
 * Preserve actual Hugo links, paginator and every existing post.
 */
body.posts-index-page .posts-index.ef-files {
  --ef-bg: #080d14;
  --ef-surface: #15181e;
  --ef-panel: #111a26;
  --ef-selected: #2e3540;
  --ef-border: rgba(175, 200, 232,.13);
  --ef-border-strong: rgba(175, 200, 232,.2);
  --ef-ink: #f7f9fc;
  --ef-muted: #a4aab2;
  --ef-dim: #777f8a;
  --ef-accent: #4a9dff;
  --ef-focus: #8cc4ff;
  --ef-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  width: 100% !important;
  max-width: none !important;
  margin: 0;
  padding: clamp(16px, 2vw, 30px) clamp(12px, 2vw, 32px) clamp(36px, 5vw, 78px) !important;
  color: var(--ef-ink);
  box-sizing: border-box;
}
body.posts-index-page .posts-index.ef-files *,
body.posts-index-page .posts-index.ef-files *::before,
body.posts-index-page .posts-index.ef-files *::after { box-sizing: border-box; }
body.posts-index-page .posts-index.ef-files :is(a, button, input, select):focus-visible {
  outline: 2px solid var(--ef-focus) !important;
  outline-offset: 3px;
}
body.posts-index-page .posts-index.ef-files [hidden] { display: none !important; }
body.posts-index-page .posts-index.ef-files .ef-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
body.posts-index-page .posts-index.ef-files .ef-intro {
  position: relative;
  overflow: hidden;
  padding: clamp(22px,3.4vw,49px) clamp(22px,3.4vw,52px);
  border: 1px solid var(--ef-border);
  border-top: 2px solid var(--ef-accent);
  border-radius: 4px 4px 0 0;
  background: #0b0d10;
}
body.posts-index-page .posts-index.ef-files .ef-intro-kicker {
  display: block;
  margin-bottom: clamp(16px,2vw,32px);
  color: var(--ef-accent);
  font: 700 11px/1.45 var(--ef-mono);
  letter-spacing: .16em;
}
body.posts-index-page .posts-index.ef-files .ef-intro-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
body.posts-index-page .posts-index.ef-files .ef-intro h1 {
  margin: 0;
  color: #f7f9fc;
  font: 750 clamp(36px, 4.4vw, 69px)/1.03 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  letter-spacing: -.075em !important;
  text-wrap: balance;
}
body.posts-index-page .posts-index.ef-files .ef-intro h1 em {
  color: #e7eff9;
  font: 400 1em/1 Georgia, "Times New Roman", serif;
  letter-spacing: -.07em;
}
body.posts-index-page .posts-index.ef-files .ef-intro p {
  max-width: 750px;
  margin: 18px 0 0;
  color: #b1b5bb;
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.55;
}
body.posts-index-page .posts-index.ef-files .ef-intro-mark {
  flex: 0 0 auto;
  padding-bottom: 4px;
  color: #292d33;
  font: 850 clamp(76px, 9.3vw, 144px)/.85 Arial, sans-serif;
  letter-spacing: -.11em;
  user-select: none;
}
body.posts-index-page .posts-index.ef-files .ef-intro-mark span { color: #3773a8; }

body.posts-index-page .posts-index.ef-files .ef-window {
  position: relative;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #3a414a;
  border-radius: 8px;
  background: var(--ef-bg);
  box-shadow: 0 32px 100px rgba(0,0,0,.25);
}
body.posts-index-page .posts-index.ef-files .ef-titlebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 47px;
  padding: 0 18px;
  border-bottom: 1px solid var(--ef-border-strong);
  background: #21252d;
  color: #c7cbd0;
}
body.posts-index-page .posts-index.ef-files .ef-window-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
body.posts-index-page .posts-index.ef-files .ef-window-controls i {
  width: 11px;
  height: 11px;
  display: block;
  border-radius: 50%;
  background: #fa6966;
  border: 1px solid rgba(0,0,0,.14);
}
body.posts-index-page .posts-index.ef-files .ef-window-controls i:nth-child(2) { background: #ecc55f; }
body.posts-index-page .posts-index.ef-files .ef-window-controls i:nth-child(3) { background: #61c88c; }
body.posts-index-page .posts-index.ef-files .ef-window-name {
  color: #e5e5e6;
  font: 700 11px/1.4 var(--ef-mono);
  letter-spacing: .15em;
}
body.posts-index-page .posts-index.ef-files .ef-version {
  justify-self: end;
  color: #949ba5;
  font: 600 10px/1.4 var(--ef-mono);
  letter-spacing: .08em;
}
body.posts-index-page .posts-index.ef-files .ef-version span { color: var(--ef-accent); }
body.posts-index-page .posts-index.ef-files .ef-layout {
  display: grid;
  grid-template-columns: clamp(200px, 16vw, 238px) minmax(0,1fr);
  min-height: 540px;
}

/* Actual site taxonomy pages work as folders; never simulate folder links. */
body.posts-index-page .posts-index.ef-files .ef-sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  padding: 24px 11px 19px;
  border-right: 1px solid var(--ef-border-strong);
  background: #191d23;
}
body.posts-index-page .posts-index.ef-files .ef-sidebar-section { min-width: 0; }
body.posts-index-page .posts-index.ef-files .ef-sidebar-label {
  display: block;
  margin: 0 10px 10px;
  color: #838b98;
  font: 750 10px/1.4 var(--ef-mono);
  letter-spacing: .11em;
}
body.posts-index-page .posts-index.ef-files .ef-sidebar nav {
  display: grid;
  gap: 3px;
}
body.posts-index-page .posts-index.ef-files .ef-sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #bbc1ca;
  font-size: 12px;
  font-weight: 570;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
body.posts-index-page .posts-index.ef-files .ef-sidebar-link svg {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  color: #9bbde7;
}
body.posts-index-page .posts-index.ef-files .ef-sidebar-link span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.posts-index-page .posts-index.ef-files .ef-sidebar-link small {
  flex: 0 0 auto;
  color: #929aa5;
  font: 650 10px/1.4 var(--ef-mono);
}
body.posts-index-page .posts-index.ef-files .ef-sidebar-link:hover {
  background: #292e37;
  color: #fff;
}
body.posts-index-page .posts-index.ef-files .ef-sidebar-link.is-active,
body.posts-index-page .posts-index.ef-files .ef-sidebar-link[aria-current="page"] {
  border-color: #475361;
  background: #313943;
  color: #fff;
}
body.posts-index-page .posts-index.ef-files .ef-sidebar-link.is-active svg { color: var(--ef-accent); }
body.posts-index-page .posts-index.ef-files .ef-sidebar-signature {
  margin: auto 9px 0;
  padding-top: 18px;
  border-top: 1px solid var(--ef-border);
  color: #727b87;
  font: 600 10px/1.8 var(--ef-mono);
  letter-spacing: .06em;
}

body.posts-index-page .posts-index.ef-files .ef-workspace {
  min-width: 0;
  background: #0d141e;
}
body.posts-index-page .posts-index.ef-files .ef-pathbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 51px;
  padding: 10px clamp(16px,2vw,27px);
  border-bottom: 1px solid var(--ef-border);
  background: #171a20;
}
body.posts-index-page .posts-index.ef-files .ef-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #77808e;
  font: 600 11px/1.6 var(--ef-mono);
  letter-spacing: .02em;
}
body.posts-index-page .posts-index.ef-files .ef-breadcrumbs a {
  color: #aab1bb;
  text-decoration: none;
}
body.posts-index-page .posts-index.ef-files .ef-breadcrumbs a:hover { color: var(--ef-accent); }
body.posts-index-page .posts-index.ef-files .ef-breadcrumbs strong {
  color: #edf5ff;
  font-weight: 700;
}
body.posts-index-page .posts-index.ef-files .ef-disk-icon {
  display: inline-flex;
  min-width: 27px;
  min-height: 25px;
  justify-content: center;
  align-items: center;
  border: 1px solid #606875;
  border-radius: 3px;
  background: #282d35;
  color: var(--ef-accent);
  font-weight: 800;
}
body.posts-index-page .posts-index.ef-files .ef-path-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: #9aa29d;
  font: 600 10px/1.5 var(--ef-mono);
  white-space: nowrap;
}
body.posts-index-page .posts-index.ef-files .ef-path-status > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #61c88c;
}
body.posts-index-page .posts-index.ef-files .ef-workspace-intro {
  padding: clamp(23px,3vw,40px) clamp(17px,2.4vw,33px) 17px;
}
body.posts-index-page .posts-index.ef-files .ef-workspace-kicker {
  color: var(--ef-accent);
  font: 700 10px/1.4 var(--ef-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
body.posts-index-page .posts-index.ef-files .ef-workspace-intro h2 {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 5px;
  color: var(--ef-ink);
  font: 750 clamp(27px, 2.5vw, 41px)/1.13 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: -.06em;
  overflow-wrap: anywhere;
}
body.posts-index-page .posts-index.ef-files .ef-file-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 24px;
  padding: 3px 6px;
  border: 1px solid #4d4f55;
  border-radius: 5px;
  color: #b2c3d8;
  font: 700 11px/1 var(--ef-mono);
  letter-spacing: 0;
}
body.posts-index-page .posts-index.ef-files .ef-workspace-intro p {
  margin: 0;
  color: #aab0b9;
  font-size: 13px;
  line-height: 1.5;
}
body.posts-index-page .posts-index.ef-files .ef-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(17px,2.4vw,33px) 23px;
}
body.posts-index-page .posts-index.ef-files .ef-search {
  display: flex;
  flex: 1 1 330px;
  align-items: center;
  gap: 11px;
  min-width: 0;
  max-width: 515px;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #46505e;
  border-radius: 5px;
  color: #a4aeb9;
  background: #1c2027;
}
body.posts-index-page .posts-index.ef-files .ef-search:focus-within { border-color: var(--ef-accent); }
body.posts-index-page .posts-index.ef-files .ef-search svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}
body.posts-index-page .posts-index.ef-files .ef-search input {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 8px 0;
  border: none !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  color: #f6f5f1 !important;
  background: transparent !important;
  font: 500 13px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
body.posts-index-page .posts-index.ef-files .ef-search input::placeholder { color: #8f9aa8; }
body.posts-index-page .posts-index.ef-files .ef-search kbd {
  display: inline-flex;
  min-width: 19px;
  min-height: 22px;
  justify-content: center;
  align-items: center;
  border: 1px solid #535c67;
  border-radius: 3px;
  color: #bdc2ca;
  font: 650 11px var(--ef-mono);
}
body.posts-index-page .posts-index.ef-files .ef-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 10px;
}
body.posts-index-page .posts-index.ef-files .ef-sort-label {
  color: #9ba4af;
  font: 600 11px var(--ef-mono);
}
body.posts-index-page .posts-index.ef-files select {
  min-height: 44px;
  max-width: 175px;
  padding: 9px 24px 9px 10px;
  border: 1px solid #46505e;
  border-radius: 5px;
  background: #1c2027;
  color: #e5e8ec;
  font: 600 12px -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  cursor: pointer;
}
body.posts-index-page .posts-index.ef-files .ef-view-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid #46505e;
  border-radius: 5px;
  background: #1a1e25;
}
body.posts-index-page .posts-index.ef-files .ef-view-switch button {
  display: grid;
  width: 38px;
  height: 36px;
  place-items: center;
  border: none;
  border-radius: 3px;
  color: #9ea6b3;
  background: transparent;
  cursor: pointer;
}
body.posts-index-page .posts-index.ef-files .ef-view-switch button[aria-pressed="true"] {
  color: #72b7ff;
  background: #37363a;
}
body.posts-index-page .posts-index.ef-files .ef-view-switch button:hover { color: #fff; }
body.posts-index-page .posts-index.ef-files .ef-view-switch svg { width: 19px; height: 19px; }
body.posts-index-page .posts-index.ef-files .ef-directory-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px clamp(17px,2.4vw,33px);
  border-top: 1px solid var(--ef-border);
  border-bottom: 1px solid var(--ef-border);
  background: #141e2b;
  color: #a4abb4;
  font: 650 10px/1.4 var(--ef-mono);
  letter-spacing: .09em;
}
body.posts-index-page .posts-index.ef-files .ef-directory-heading span:first-child {
  color: #e0cbc0;
}

/* Grid view is the default. List view is a genuine alternative, not a cosmetic toggle. */
body.posts-index-page .posts-index.ef-files .ef-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 305px), 1fr));
  align-items: stretch;
  gap: clamp(10px,1.3vw,18px);
  padding: clamp(17px,2.4vw,33px);
}
body.posts-index-page .posts-index.ef-files .ef-file {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #333b45;
  border-radius: 6px;
  background: #1a1e25;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
body.posts-index-page .posts-index.ef-files .ef-file:hover,
body.posts-index-page .posts-index.ef-files .ef-file:focus-within {
  z-index: 2;
  border-color: var(--ef-accent);
  background: #232630;
  transform: translateY(-2px);
}
body.posts-index-page .posts-index.ef-files .ef-file-open {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  color: inherit;
  text-decoration: none !important;
}
body.posts-index-page .posts-index.ef-files .ef-file-preview {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-width: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #10141a;
  border-bottom: 1px solid #3a414a;
}
body.posts-index-page .posts-index.ef-files .ef-file-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 52%, rgba(0,0,0,.2));
  pointer-events: none;
}
body.posts-index-page .posts-index.ef-files .ef-file-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: none;
  transition: transform .28s ease;
}
body.posts-index-page .posts-index.ef-files .ef-file:hover .ef-file-preview img { transform: scale(1.02); }
body.posts-index-page .posts-index.ef-files .ef-file-icon {
  display: grid;
  width: 58px;
  place-items: center;
  color: #a9bbcf;
}
body.posts-index-page .posts-index.ef-files .ef-file-icon svg { width: 48px; height: 56px; }
body.posts-index-page .posts-index.ef-files .ef-file-badge {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  padding: 5px 7px;
  border: 1px solid rgba(255,255,255,.23);
  border-radius: 3px;
  background: rgba(17,19,23,.86);
  color: #eee6df;
  font: 750 10px/1 var(--ef-mono);
  letter-spacing: .04em;
}
body.posts-index-page .posts-index.ef-files .ef-file-info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: clamp(13px, 1.4vw, 19px);
}
body.posts-index-page .posts-index.ef-files .ef-file-class {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ef-accent);
  font: 700 10px/1.4 var(--ef-mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}
body.posts-index-page .posts-index.ef-files .ef-file-class span:last-child { color: #858e9b; white-space: nowrap; }
body.posts-index-page .posts-index.ef-files .ef-file h3 {
  margin: 12px 0 10px;
  color: #f5f4f0;
  font-size: clamp(17px, 1.5vw, 23px) !important;
  font-weight: 680;
  line-height: 1.18;
  letter-spacing: -.04em;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
body.posts-index-page .posts-index.ef-files .ef-file p {
  display: -webkit-box;
  margin: 0 0 19px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #acb3bc;
  font-size: 12px;
  line-height: 1.55;
}
body.posts-index-page .posts-index.ef-files .ef-file-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #39404a;
  color: #8d96a1;
  font: 700 10px/1.35 var(--ef-mono);
  letter-spacing: .04em;
}
body.posts-index-page .posts-index.ef-files .ef-file-bottom span:last-child { color: #a9cfff; }
body.posts-index-page .posts-index.ef-files .ef-file:hover .ef-file-bottom span:last-child { color: var(--ef-accent); }

body.posts-index-page .posts-index.ef-files.ef-view-list .ef-grid {
  grid-template-columns: minmax(0,1fr);
  gap: 7px;
}
body.posts-index-page .posts-index.ef-files.ef-view-list .ef-file-open {
  display: grid;
  grid-template-columns: clamp(90px, 12vw, 146px) minmax(0,1fr);
  align-items: stretch;
}
body.posts-index-page .posts-index.ef-files.ef-view-list .ef-file-preview {
  height: 100%;
  min-height: 104px;
  aspect-ratio: auto;
  border-right: 1px solid #3a414a;
  border-bottom: none;
}
body.posts-index-page .posts-index.ef-files.ef-view-list .ef-file-info {
  padding: 12px 18px;
}
body.posts-index-page .posts-index.ef-files.ef-view-list .ef-file h3 {
  margin: 4px 0 5px;
  font-size: clamp(16px,1.2vw,19px) !important;
}
body.posts-index-page .posts-index.ef-files.ef-view-list .ef-file p {
  margin: 0 0 6px;
  -webkit-line-clamp: 1;
}
body.posts-index-page .posts-index.ef-files.ef-view-list .ef-file-bottom {
  margin-top: 4px;
  padding-top: 6px;
}
body.posts-index-page .posts-index.ef-files .ef-empty {
  margin: 12px clamp(17px,2.4vw,33px) 24px;
  padding: 22px;
  border: 1px dashed #555d67;
  border-radius: 5px;
  color: #d6d2ce;
  background: #1d2026;
  font-size: 14px;
  line-height: 1.55;
}
body.posts-index-page .posts-index.ef-files .ef-statusbar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 14px clamp(17px,2.4vw,33px);
  border-top: 1px solid var(--ef-border);
  background: #141e2b;
  color: #89939f;
  font: 650 10px/1.5 var(--ef-mono);
  letter-spacing: .03em;
}
body.posts-index-page .posts-index.ef-files .ef-statusbar > span:last-child { color: #aeaaa6; }
body.posts-index-page .posts-index.ef-files .ef-pagination {
  padding: 10px 0 20px;
}
body.posts-index-page .posts-index.ef-files .newsletter-signup {
  margin-top: clamp(28px,3vw,45px);
}

/* Tablet and compact desktop: keep the Files OS navigation horizontal
   until BOTH the global journal dock and the folder rail fit comfortably. */
@media (max-width: 1299px) {
  body.posts-index-page .posts-index.ef-files .ef-layout {
    grid-template-columns: 1fr;
  }
  body.posts-index-page .posts-index.ef-files .ef-sidebar {
    display: block;
    padding: 13px 15px;
    border-right: none;
    border-bottom: 1px solid var(--ef-border);
  }
  body.posts-index-page .posts-index.ef-files .ef-sidebar-section {
    margin-bottom: 10px;
  }
  body.posts-index-page .posts-index.ef-files .ef-sidebar-section nav {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: thin;
    padding: 2px 1px 4px;
  }
  body.posts-index-page .posts-index.ef-files .ef-sidebar-link {
    flex: 0 0 auto;
    max-width: 225px;
    min-height: 37px;
    padding: 7px 10px;
    white-space: nowrap;
  }
  body.posts-index-page .posts-index.ef-files .ef-sidebar-label { margin: 0 0 5px; }
  body.posts-index-page .posts-index.ef-files .ef-sidebar-extras,
  body.posts-index-page .posts-index.ef-files .ef-sidebar-signature { display: none; }
  body.posts-index-page .posts-index.ef-files .ef-titlebar { min-height: 44px; }
}
@media (max-width: 730px) {
  body.posts-index-page .posts-index.ef-files {
    padding: 12px 10px 50px !important;
  }
  body.posts-index-page .posts-index.ef-files .ef-intro {
    padding: 22px;
  }
  body.posts-index-page .posts-index.ef-files .ef-intro h1 { font-size: clamp(32px, 8vw, 49px) !important; }
  body.posts-index-page .posts-index.ef-files .ef-intro-mark { display: none; }
  body.posts-index-page .posts-index.ef-files .ef-intro p { font-size: 13px; }
  body.posts-index-page .posts-index.ef-files .ef-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding-bottom: 16px;
  }
  body.posts-index-page .posts-index.ef-files .ef-search {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
  }
  body.posts-index-page .posts-index.ef-files .ef-toolbar-actions {
    justify-content: space-between;
    width: 100%;
  }
  body.posts-index-page .posts-index.ef-files .ef-toolbar-actions select {
    max-width: min(47vw, 185px);
  }
  body.posts-index-page .posts-index.ef-files .ef-grid { grid-template-columns: minmax(0,1fr); }
  body.posts-index-page .posts-index.ef-files .ef-directory-heading { letter-spacing: .01em; }
}
@media (max-width: 440px) {
  body.posts-index-page .posts-index.ef-files .ef-titlebar {
    padding: 0 12px;
  }
  body.posts-index-page .posts-index.ef-files .ef-version { font-size: 9px; }
  body.posts-index-page .posts-index.ef-files .ef-window-name { font-size: 10px; }
  body.posts-index-page .posts-index.ef-files .ef-intro p { margin-top: 12px; }
  body.posts-index-page .posts-index.ef-files .ef-path-status { display: none; }
  body.posts-index-page .posts-index.ef-files .ef-workspace-intro {
    padding-top: 21px;
  }
  body.posts-index-page .posts-index.ef-files .ef-file-info { padding: 17px; }
  body.posts-index-page .posts-index.ef-files .ef-file h3 { font-size: 22px !important; }
  body.posts-index-page .posts-index.ef-files.ef-view-list .ef-file-open {
    grid-template-columns: 90px minmax(0,1fr);
  }
  body.posts-index-page .posts-index.ef-files.ef-view-list .ef-file-info { padding: 11px; }
  body.posts-index-page .posts-index.ef-files.ef-view-list .ef-file h3 { font-size: 15px !important; }
  body.posts-index-page .posts-index.ef-files.ef-view-list .ef-file p { display: none; }
  body.posts-index-page .posts-index.ef-files.ef-view-list .ef-file-class { font-size: 9px; }
  body.posts-index-page .posts-index.ef-files.ef-view-list .ef-file-class span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body.posts-index-page .posts-index.ef-files * { transition-duration: .01ms !important; }
}


/* ========================================================================
   EDGE FILES / FLUID CANVAS — Nov 2026
   Uses the actual browser viewport rather than Hugo Stack's compact
   1280px container and legacy 1180px post index main width.
   Applies to the article archive and every taxonomy folder; no changes
   to the Files OS search, sorting, pagination or card semantics.
   ======================================================================== */

/* Remove the two nested, obsolete width ceilings at all screen sizes.
   Use overflow-safe flex children so columns shrink without clipping. */
body.posts-index-page .main-container {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin-inline: 0 !important;
  box-sizing: border-box;
}

body.posts-index-page main.main {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin-inline: 0 !important;
}

body.posts-index-page .posts-index.ef-files {
  min-width: 0;
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

body.posts-index-page .posts-index.ef-files .ef-window,
body.posts-index-page .posts-index.ef-files .ef-workspace,
body.posts-index-page .posts-index.ef-files .ef-grid,
body.posts-index-page .posts-index.ef-files .ef-file {
  min-width: 0;
}

body.posts-index-page .posts-index.ef-files .ef-file h3 {
  font-size: clamp(18px, 1.35vw, 24px) !important;
  line-height: 1.22;
  overflow-wrap: break-word;
}

body.posts-index-page .posts-index.ef-files .ef-file p {
  font-size: 14px;
  line-height: 1.5;
}

body.posts-index-page .posts-index.ef-files .ef-layout {
  grid-template-columns: clamp(208px, 15vw, 245px) minmax(0, 1fr);
}

/* Desktop: retain the existing EMA global navigation dock, give the
   entire remaining canvas to Files OS and remove the unused right rail. */
@media (min-width: 1024px) {
  body.posts-index-page .main-container {
    gap: clamp(16px, 1.5vw, 30px) !important;
    padding: 18px clamp(16px, 1.8vw, 40px) 56px !important;
  }

  body.posts-index-page .main-container > .left-sidebar {
    flex: 0 0 clamp(190px, 13vw, 235px);
    width: clamp(190px, 13vw, 235px) !important;
    max-width: clamp(190px, 13vw, 235px) !important;
    min-width: 0;
    box-sizing: border-box;
  }

  body.posts-index-page .main-container > .right-sidebar {
    display: none !important;
    flex: 0 0 0 !important;
    width: 0 !important;
    max-width: 0 !important;
  }

  body.posts-index-page .main-container > main.main {
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: none !important;
  }
}

/* At laptop/tablet widths, the subject folders become a horizontally
   scrollable navigation strip above the article grid. The old rail
   would otherwise squeeze the content between two different sidebars. */
@media (min-width: 1031px) and (max-width: 1299px) {
  body.posts-index-page .posts-index.ef-files .ef-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Full window remains usable on ultrawide monitors; grid adapts to
   available WORKSPACE width rather than viewport breakpoints. */
@media (min-width: 1300px) {
  body.posts-index-page .posts-index.ef-files .ef-layout {
    grid-template-columns: clamp(208px, 15vw, 245px) minmax(0, 1fr);
  }
}

/* Tablet + phones: preserve the original theme's mobile navigation,
   stop max-width: 768px from centering the archive in dead space. */
@media (max-width: 1023px) {
  body.posts-index-page .main-container {
    padding-inline: clamp(10px, 2.4vw, 24px) !important;
  }

  body.posts-index-page .main-container > main.main {
    flex: 1 1 auto;
    width: 100% !important;
  }

  body.posts-index-page .posts-index.ef-files {
    padding-inline: 0 !important;
  }

  body.posts-index-page .posts-index.ef-files .ef-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Comfortable touch targets and compact toolbar on narrow phones. */
@media (max-width: 730px) {
  body.posts-index-page .posts-index.ef-files .ef-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: clamp(12px, 3.8vw, 22px);
  }

  body.posts-index-page .posts-index.ef-files .ef-sidebar-link,
  body.posts-index-page .posts-index.ef-files .ef-view-switch button {
    min-height: 44px;
  }

  body.posts-index-page .posts-index.ef-files .ef-workspace-intro {
    padding-inline: clamp(16px, 4vw, 26px);
  }

  body.posts-index-page .posts-index.ef-files .ef-toolbar {
    padding-inline: clamp(16px, 4vw, 26px);
  }
}
