/*
 * EDGE JOURNAL / UNIFIED OS SHELL
 * v20261108-fusion1
 *
 * One application window for home, archives, folders and posts.
 * Global Stack sidebar = one explorer: no duplicated category rails.
 * Mobile <=1200px = same folders in an accessible sliding drawer.
 * All existing Hugo URLs, search, sorting, pagination and reading stay native.
 */
body.edge-os-enabled {
  --os-bg: #05090e;
  --os-panel: #080d14;
  --os-surface: #0d141e;
  --os-raised: #111a26;
  --os-border: rgba(175, 200, 232, .17);
  --os-strong: rgba(175, 200, 232, .27);
  --os-ink: #f7f9fc;
  --os-muted: #a9b7c9;
  --os-soft: #7f92a8;
  --os-accent: #4a9dff;
  --os-accent-soft: #8cc4ff;
  --os-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #05090e;
  color: var(--os-ink);
}
body.edge-os-enabled,
body.edge-os-enabled .edge-os-shell,
body.edge-os-enabled .edge-os-shell * {
  box-sizing: border-box;
}
body.edge-os-enabled :is(a, button, input, select, summary):focus-visible {
  outline: 2px solid var(--os-accent-soft) !important;
  outline-offset: 2px;
}
body.edge-os-enabled .edge-os-shell {
  width: calc(100% - clamp(24px, 2.4vw, 48px));
  max-width: 2400px;
  min-width: 0;
  min-height: calc(100dvh - 32px);
  margin: clamp(12px, 1.2vw, 24px) auto;
  overflow: clip;
  border: 1px solid var(--os-strong);
  border-radius: 11px;
  background: var(--os-panel);
  box-shadow: 0 28px 110px rgba(0,0,0,.42);
  isolation: isolate;
}

/* Window controls are intentionally decorative: no pretend close action. */
body.edge-os-enabled .edge-os-topbar {
  position: sticky;
  top: 0;
  z-index: 1100;
  display: grid;
  grid-template-columns: minmax(76px, 120px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  height: 54px;
  padding: 0 clamp(14px, 1.45vw, 24px);
  border-bottom: 1px solid var(--os-strong);
  background: rgba(23, 31, 43, .97);
  backdrop-filter: blur(14px);
}
body.edge-os-enabled .edge-os-topbar__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
body.edge-os-enabled .edge-os-topbar__controls i {
  display: block;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(200, 216, 236, .38);
  border-radius: 50%;
  background: #263343;
}
body.edge-os-enabled .edge-os-topbar__controls i:nth-child(2) { background: #324459; }
body.edge-os-enabled .edge-os-topbar__controls i:nth-child(3) { background: #4a9dff; }
body.edge-os-enabled .edge-os-topbar__identity {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  gap: clamp(8px, 1.2vw, 18px);
  color: var(--os-ink);
  text-decoration: none;
}
body.edge-os-enabled .edge-os-topbar__disk {
  flex: 0 0 auto;
  display: grid;
  width: 27px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(140,196,255,.5);
  border-radius: 3px;
  color: var(--os-accent-soft);
  font: 800 11px var(--os-mono);
}
body.edge-os-enabled .edge-os-topbar__brand {
  white-space: nowrap;
  color: #f7f9fc;
  font: 760 12px/1.2 var(--os-mono);
  letter-spacing: .12em;
}
body.edge-os-enabled .edge-os-topbar__brand b {
  color: var(--os-accent-soft);
  font-weight: inherit;
}
body.edge-os-enabled .edge-os-topbar__slash {
  flex: 0 0 auto;
  color: #607389;
  font: 600 12px var(--os-mono);
}
body.edge-os-enabled .edge-os-topbar__context {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--os-muted);
  font: 650 10px/1.4 var(--os-mono);
  letter-spacing: .12em;
}
body.edge-os-enabled .edge-os-topbar__right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}
body.edge-os-enabled .edge-os-topbar__general,
body.edge-os-enabled .edge-os-topbar__languages a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(145,177,215,.35);
  border-radius: 4px;
  color: #b8cce4;
  background: rgba(24,37,54,.72);
  font: 700 10px/1 var(--os-mono);
  letter-spacing: .06em;
  text-decoration: none;
}
body.edge-os-enabled .edge-os-topbar__general:hover,
body.edge-os-enabled .edge-os-topbar__languages a:hover,
body.edge-os-enabled .edge-os-topbar__languages a.is-active {
  border-color: var(--os-accent);
  color: #fff;
  background: rgba(74,157,255,.16);
}
body.edge-os-enabled .edge-os-topbar__languages {
  display: inline-flex;
  gap: 3px;
}
body.edge-os-enabled .edge-os-topbar__status {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--os-muted);
  font: 700 10px var(--os-mono);
  letter-spacing: .1em;
}
body.edge-os-enabled .edge-os-topbar__status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #61c88c;
  box-shadow: 0 0 0 3px rgba(97,200,140,.1);
}
body.edge-os-enabled .edge-os-topbar__menu {
  display: none;
  gap: 9px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--os-strong);
  border-radius: 4px;
  padding: 0 12px;
  color: var(--os-ink);
  background: #182536;
  font: 700 12px var(--os-mono);
  cursor: pointer;
}
body.edge-os-enabled .edge-os-topbar__menu-lines { display: grid; gap: 4px; }
body.edge-os-enabled .edge-os-topbar__menu-lines i {
  display: block;
  width: 16px;
  height: 1px;
  background: currentColor;
}
body.edge-os-enabled .edge-os-backdrop { display: none; }

/* The global EMA dock is now the explorer's OWN sidebar. */
body.edge-os-enabled .edge-os-shell > .main-container {
  display: grid !important;
  grid-template-columns: clamp(230px, 16vw, 288px) minmax(0, 1fr) !important;
  gap: 0 !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  min-height: calc(100dvh - 110px);
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}
body.edge-os-enabled .edge-os-shell > .main-container > .left-sidebar {
  position: sticky !important;
  top: 54px !important;
  align-self: start !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  height: calc(100dvh - 78px) !important;
  max-height: calc(100dvh - 78px) !important;
  overflow: hidden !important;
  /* The sidebar frame never scrolls. Only its flexible middle region does. */
  overscroll-behavior: auto;
  gap: 0 !important;
  margin: 0 !important;
  padding: clamp(18px,1.8vw,29px) clamp(12px,1.4vw,23px) !important;
  border: 0 !important;
  border-right: 1px solid var(--os-strong) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: linear-gradient(180deg, #111a26, #0b121c 80%) !important;
}
body.edge-os-enabled .edge-os-shell > .main-container > .left-sidebar::after { display: none !important; }
body.edge-os-enabled .edge-os-shell > .main-container > .right-sidebar { display: none !important; }
body.edge-os-enabled .edge-os-shell > .main-container > main.main {
  position: relative;
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: clamp(15px,1.85vw,32px) !important;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(15px,1.7vw,25px);
  overflow: visible;
  background: #080d14;
}
/* The sidebar is a three-zone application rail: stable identity, scrollable
   folders/TOC (and existing ad), and a permanently readable bottom signature. */
body.edge-os-enabled .left-sidebar > .edge-os-sidebar-head {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 13px;
  min-width: 0;
  width: 100%;
}
body.edge-os-enabled .left-sidebar > .edge-os-sidebar-scroll {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0 !important;
  width: 100%;
  margin-top: 15px;
  padding: 15px 3px 17px;
  border-top: 1px solid var(--os-border);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(145,177,215,.50) transparent;
  scrollbar-gutter: stable;
  scroll-padding-block: 14px 22px;
}
body.edge-os-enabled .left-sidebar > .edge-os-sidebar-scroll:focus-visible {
  outline: 2px solid var(--os-accent-soft);
  outline-offset: -2px;
}
body.edge-os-enabled .left-sidebar > .edge-os-sidebar-scroll .edge-os-folder-section {
  border-top: 0;
  padding-top: 0;
}
body.edge-os-enabled .left-sidebar > .edge-os-sidebar-scroll .journal-sidebar-ad {
  width: min(160px, 100%);
  max-width: 100%;
  margin: 20px auto 8px;
  padding-top: 15px;
  border-top: 1px solid var(--os-border);
}
body.edge-os-enabled .left-sidebar > .edge-os-sidebar-footer {
  display: grid;
  flex: 0 0 auto;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 14px 8px max(12px, env(safe-area-inset-bottom));
  background: #0c1520;
  border-top: 1px solid var(--os-strong);
  font: 650 10px/1.4 var(--os-mono);
  letter-spacing: .06em;
  overflow-wrap: anywhere;
}
body.edge-os-enabled .left-sidebar header {
  display: flex;
  flex-direction: column !important;
  gap: 8px !important;
  min-width: 0;
  margin: 0 !important;
  padding: 2px 4px 19px !important;
  border-bottom: 1px solid var(--os-border);
}
body.edge-os-enabled .left-sidebar .site-avatar,
body.edge-os-enabled .left-sidebar .site-avatar .site-logo {
  max-width: 98px;
  max-height: 70px;
  object-fit: contain;
}
body.edge-os-enabled .left-sidebar .site-avatar {
  width: 98px;
  height: 70px;
  flex: 0 0 auto;
  margin: 0 0 4px !important;
}
body.edge-os-enabled .left-sidebar .edge-signature-code {
  color: #88b5e9 !important;
  font: 750 10px/1.5 var(--os-mono) !important;
  letter-spacing: .11em;
}
body.edge-os-enabled .left-sidebar .edge-signature .site-name a em {
  color: var(--os-accent-soft) !important;
}
body.edge-os-enabled .left-sidebar .site-description {
  margin: 7px 0 0;
  color: var(--os-muted) !important;
}
body.edge-os-enabled .left-sidebar .dock-navigation { min-width: 0; margin: 0 !important; }
body.edge-os-enabled .left-sidebar .dock-section-label,
body.edge-os-enabled .edge-os-sidebar-label {
  display: block;
  margin: 0 8px 9px;
  color: #8296af;
  font: 750 10px/1.5 var(--os-mono);
  letter-spacing: .13em;
  text-transform: uppercase;
}
body.edge-os-enabled .left-sidebar .dock-navigation .menu {
  display: grid;
  gap: 3px !important;
  width: 100%;
  min-width: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}
body.edge-os-enabled .left-sidebar .dock-navigation .menu li { min-width: 0; }
body.edge-os-enabled .left-sidebar .dock-navigation .menu li > a {
  min-height: 42px !important;
  padding: 9px 11px !important;
  border-radius: 4px !important;
  color: #b8c6d9;
  font-size: 13px !important;
}
body.edge-os-enabled .left-sidebar .dock-navigation .menu li.current > a {
  border: 1px solid rgba(74,157,255,.42) !important;
  color: #eaf4ff !important;
  background: rgba(74,157,255,.11) !important;
  box-shadow: inset 2px 0 var(--os-accent) !important;
}
body.edge-os-enabled .left-sidebar .dock-navigation .menu li > a:hover,
body.edge-os-enabled .edge-os-folder-link:hover {
  background: rgba(140,196,255,.075) !important;
  color: #f7f9fc !important;
}
body.edge-os-enabled .left-sidebar .edge-os-nav-list {
  display: grid !important;
  gap: 3px;
  width: 100%;
  min-width: 0;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0;
  padding: 0;
  list-style: none;
  visibility: visible !important;
  opacity: 1 !important;
}
body.edge-os-enabled .left-sidebar .edge-os-nav-list li {
  display: list-item !important;
  position: static !important;
  min-width: 0;
  height: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}
body.edge-os-enabled .left-sidebar .edge-os-nav-list li > a {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #b8c6d9;
  font-size: 13px;
  text-decoration: none;
  visibility: visible !important;
  opacity: 1 !important;
}
body.edge-os-enabled .left-sidebar .edge-os-nav-list li > a:hover,
body.edge-os-enabled .left-sidebar .edge-os-nav-list li.current > a {
  border-color: rgba(74,157,255,.42);
  color: #eaf4ff;
  background: rgba(74,157,255,.11);
  box-shadow: inset 2px 0 var(--os-accent);
}
body.edge-os-enabled .left-sidebar .edge-os-nav-list svg {
  width: 20px;
  height: 20px;
}
body.edge-os-enabled .left-sidebar .edge-os-nav-list small {
  color: #8296af;
  font: 700 12px/1 var(--os-mono);
}
body.edge-os-enabled .left-sidebar .edge-os-tools-navigation {
  border-top: 1px solid var(--os-border);
  padding-top: 18px;
}

/* Final sidebar isolation: the theme's legacy menu rules must not leak into
   the three Explorer sections or make links overlap between them. */
body.edge-os-enabled .left-sidebar .edge-os-primary-navigation,
body.edge-os-enabled .left-sidebar .edge-os-tools-navigation {
  display: block !important;
  position: relative !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  flex: 0 0 auto !important;
  transform: none !important;
}
body.edge-os-enabled .left-sidebar .edge-os-primary-navigation .edge-os-nav-list,
body.edge-os-enabled .left-sidebar .edge-os-tools-navigation .edge-os-nav-list {
  display: flex !important;
  position: static !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 3px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}
body.edge-os-enabled .left-sidebar .edge-os-nav-list > li {
  display: block !important;
  position: static !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  transform: none !important;
}
body.edge-os-enabled .left-sidebar .edge-os-nav-list > li > a {
  position: static !important;
  display: grid !important;
  width: 100% !important;
  min-height: 42px !important;
  height: auto !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  transform: none !important;
  white-space: normal !important;
}
body.edge-os-enabled .left-sidebar .tools-dock-item > a {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
body.edge-os-enabled .left-sidebar .tools-dock-item > a small {
  color: #8296af;
  font: 700 12px/1 var(--os-mono);
}
body.edge-os-enabled .left-sidebar .menu-bottom-section {
  margin-top: 6px;
  padding-top: 9px;
  border-top: 1px solid var(--os-border);
}
body.edge-os-enabled .edge-os-folder-section {
  min-width: 0;
  border-top: 1px solid var(--os-border);
  padding-top: 18px;
}
body.edge-os-enabled .edge-os-folder-list {
  display: grid;
  gap: 3px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.edge-os-enabled .edge-os-folder-link {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 8px 9px;
  color: #abb8c9;
  text-decoration: none;
  font-size: 12px;
  transition: background .18s, color .18s, border-color .18s;
}
body.edge-os-enabled .edge-os-folder-link svg {
  width: 17px;
  height: 17px;
  color: #7daae1;
}
body.edge-os-enabled .edge-os-folder-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.edge-os-enabled .edge-os-folder-link small {
  color: #7f91a6;
  font: 700 10px var(--os-mono);
}
body.edge-os-enabled .edge-os-folder-link.is-active {
  background: #203249;
  border-color: rgba(74,157,255,.35);
  color: #f7f9fc;
}
body.edge-os-enabled .edge-os-folder-link.is-active svg { color: var(--os-accent-soft); }
body.edge-os-enabled .edge-os-current-file {
  min-width: 0;
  padding: 18px 9px 14px;
  border-top: 1px solid var(--os-border);
  background: rgba(255,255,255,.013);
}
body.edge-os-enabled .edge-os-current-file > strong {
  display: block;
  margin: 11px 0 8px;
  font: 650 14px/1.34 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  color: var(--os-ink);
  overflow-wrap: anywhere;
}
body.edge-os-enabled .edge-os-current-file > small {
  display: block;
  font: 700 10px var(--os-mono);
  color: var(--os-accent-soft);
  letter-spacing: .06em;
}
body.edge-os-enabled .edge-os-article-toc { margin-top: 15px; }
body.edge-os-enabled .edge-os-article-toc :is(ul, li) { list-style: none; padding: 0; margin: 0; }
body.edge-os-enabled .edge-os-article-toc ul ul {
  padding-left: 10px;
  border-left: 1px solid var(--os-border);
}
body.edge-os-enabled .edge-os-article-toc a {
  display: block;
  padding: 9px 5px;
  border-left: 2px solid transparent;
  color: #9eafc5;
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: anywhere;
}
body.edge-os-enabled .edge-os-article-toc a:hover,
body.edge-os-enabled .edge-os-article-toc a[aria-current="location"] {
  color: #e9f3ff;
  border-left-color: var(--os-accent);
  background: rgba(74,157,255,.07);
}
body.edge-os-enabled .edge-os-return {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  margin-top: 12px;
  color: var(--os-accent-soft);
  font: 700 11px var(--os-mono);
  text-decoration: none;
}
body.edge-os-enabled .edge-os-sidebar-footer a { color: #b6c5d8; }
body.edge-os-enabled .edge-os-sidebar-footer span { color: #667991; }
body.edge-os-enabled .edge-os-sidebar-top { display: none; }
body.edge-os-enabled .left-sidebar > .hamburger { display: none !important; }
body.edge-os-enabled .journal-sidebar-ad { max-width: 100%; overflow: hidden; }

/* Files OS and the global navigator now inhabit the same shell.
   The old local folder rail and second titlebar are redundant. */
body.edge-os-enabled .posts-index.ef-files {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  padding: 0 !important;
  margin: 0 !important;
}
body.edge-os-enabled .posts-index.ef-files .ef-intro {
  padding: clamp(22px, 2.9vw, 43px) clamp(20px, 2.9vw, 43px);
  border: 1px solid var(--os-border);
  border-top: 2px solid var(--os-accent);
  border-radius: 3px;
  background: #0c1420;
}
body.edge-os-enabled .posts-index.ef-files .ef-intro-kicker {
  color: var(--os-accent-soft);
}
body.edge-os-enabled .posts-index.ef-files .ef-intro-mark { color: #273a50; }
body.edge-os-enabled .posts-index.ef-files .ef-intro-mark span { color: var(--os-accent); }
body.edge-os-enabled .posts-index.ef-files .ef-window {
  overflow: visible;
  border: 1px solid var(--os-border);
  border-radius: 3px;
  margin-top: clamp(12px,1.2vw,20px);
  background: #0d141e;
  box-shadow: none;
}
body.edge-os-enabled .posts-index.ef-files .ef-titlebar,
body.edge-os-enabled .posts-index.ef-files .ef-sidebar { display: none !important; }
body.edge-os-enabled .posts-index.ef-files .ef-layout {
  display: block !important;
  min-height: 0;
}
body.edge-os-enabled .posts-index.ef-files .ef-workspace { width: 100%; min-width: 0; }
body.edge-os-enabled .posts-index.ef-files .ef-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 282px), 1fr));
  gap: clamp(12px,1.4vw,22px);
}
body.edge-os-enabled .posts-index.ef-files.ef-view-list .ef-grid {
  grid-template-columns: minmax(0,1fr);
}
body.edge-os-enabled .posts-index.ef-files .ef-file {
  min-width: 0;
  border-color: var(--os-border);
  background: #131e2a;
}
body.edge-os-enabled .posts-index.ef-files .ef-file:hover,
body.edge-os-enabled .posts-index.ef-files .ef-file:focus-within {
  border-color: var(--os-accent);
  background: #1a2837;
}
body.edge-os-enabled .posts-index.ef-files .ef-file h3 {
  font-size: clamp(19px,1.32vw,24px) !important;
  line-height: 1.21;
}
body.edge-os-enabled .posts-index.ef-files .ef-file-preview { background: #080d14; }
body.edge-os-enabled .posts-index.ef-files .ef-workspace-intro { padding-top: 28px; }
body.edge-os-enabled .posts-index.ef-files .ef-pathbar {
  background: #182536;
  border-bottom-color: var(--os-border);
}
body.edge-os-enabled .posts-index.ef-files .ef-directory-heading,
body.edge-os-enabled .posts-index.ef-files .ef-statusbar {
  background: #192534;
  border-color: var(--os-border);
}

/* A post opens as a document in the same application, not a detached page. */
body.edge-os-enabled .edge-os-shell .edge-post-path {
  border-color: var(--os-strong);
  background: #172334;
}
body.edge-os-enabled .edge-os-shell .main-article {
  width: 100%;
  margin-top: -1px !important;
  border: 1px solid var(--os-strong) !important;
  border-radius: 0 !important;
  background: var(--os-surface) !important;
  box-shadow: none !important;
}
body.edge-os-enabled .edge-os-shell .main-article > .article-header {
  border-color: var(--os-border) !important;
}
body.edge-os-enabled .edge-os-shell .article-reading-layout {
  display: block !important;
  max-width: 1160px;
  margin-inline: auto;
}
body.edge-os-enabled .edge-os-shell .article-reading-rail {
  display: none !important; /* The same table of contents lives in the unified sidebar. */
}
body.edge-os-enabled .edge-os-shell .article-reading-body,
body.edge-os-enabled .edge-os-shell .article-reading-body.is-compact-grid {
  margin-inline: auto !important;
  max-width: 890px !important;
}
body.edge-os-enabled .edge-os-shell .edge-compact-grid {
  display: block !important;
  grid-template-columns: 1fr !important;
}
body.edge-os-enabled .edge-os-shell .edge-compact-section {
  break-inside: auto;
}

/* The homepage remains an app view, not a second visual window. */
body.edge-os-enabled .edge-os-shell .edge-journal.eh-redesign {
  min-width: 0;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-bottom: clamp(36px,4vw,70px);
}
body.edge-os-enabled .edge-os-shell .ej-intro {
  border-color: var(--os-border) !important;
  background: #0d141e !important;
}
body.edge-os-enabled .edge-os-shell .ej-dispatches .ej-grid {
  min-width: 0;
}

/* Responsive OS: small laptops/tablets become a full-screen window with
   a real sliding explorer. Same navigation, no duplicated mobile menu. */
@media (max-width: 1200px) {
  html { scroll-padding-top: 68px; }
  body.edge-os-enabled .edge-os-shell {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    margin: 0;
    overflow: clip;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  body.edge-os-enabled .edge-os-topbar {
    position: sticky;
    height: 59px;
    top: 0;
    z-index: 1200;
    grid-template-columns: 30px minmax(0,1fr) auto;
    gap: 9px;
    padding: 0 clamp(12px,2.4vw,24px);
  }
  body.edge-os-enabled .edge-os-topbar__controls { gap: 5px; }
  body.edge-os-enabled .edge-os-topbar__controls i { width: 7px; height: 7px; }
  body.edge-os-enabled .edge-os-topbar__right { gap: 10px; }
  body.edge-os-enabled .edge-os-topbar__menu { display: inline-flex; }
  body.edge-os-enabled .edge-os-topbar__status { display: none; }
  body.edge-os-enabled .edge-os-shell > .main-container {
    display: block !important;
    width: 100% !important;
    min-height: calc(100dvh - 59px);
    padding: 0 !important;
  }
  body.edge-os-enabled .edge-os-shell > .main-container > main.main {
    width: 100% !important;
    min-width: 0;
    padding: clamp(12px,2.2vw,26px) !important;
  }
  body.edge-os-enabled .edge-os-shell > .main-container > .left-sidebar {
    position: fixed !important;
    z-index: 1302;
    inset: 0 auto 0 0;
    top: 0 !important;
    width: min(90vw, 355px) !important;
    max-width: min(90vw, 355px) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 0;
    border-right: 1px solid var(--os-strong) !important;
    padding: 17px 16px 24px !important;
    background: #101a27 !important;
    box-shadow: 18px 0 70px rgba(0,0,0,.45) !important;
    transform: translateX(-103%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .26s cubic-bezier(.2,.75,.2,1), opacity .18s, visibility .26s step-end;
    overscroll-behavior: contain;
  }
  body.edge-os-enabled .left-sidebar > .edge-os-sidebar-scroll {
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }
  body.edge-os-enabled.edge-os-nav-open .edge-os-shell > .main-container > .left-sidebar {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform .26s cubic-bezier(.2,.75,.2,1), opacity .18s, visibility 0s;
  }
  body.edge-os-enabled .edge-os-sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 45px;
    border-bottom: 1px solid var(--os-border);
    padding: 0 4px 12px;
    color: #91b3d8;
    font: 700 11px var(--os-mono);
    letter-spacing: .1em;
  }
  body.edge-os-enabled .edge-os-sidebar-close {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--os-border);
    border-radius: 3px;
    background: #1b2b3e;
    color: var(--os-ink);
    font-size: 24px;
    cursor: pointer;
  }
  body.edge-os-enabled .edge-os-backdrop {
    display: block;
    position: fixed;
    z-index: 1301;
    inset: 0;
    padding: 0;
    border: 0;
    background: rgba(1,4,9,.7);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s, visibility .2s step-end;
  }
  body.edge-os-enabled.edge-os-nav-open .edge-os-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .2s, visibility 0s;
  }
  html.edge-os-scroll-locked,
  html.edge-os-scroll-locked body { overflow: hidden !important; }
  body.edge-os-enabled .posts-index.ef-files .ef-intro-mark { display: none; }
  body.edge-os-enabled .article-reading-layout { padding-inline: clamp(16px,3vw,28px) !important; }
  body.edge-os-enabled .edge-os-shell .ej-intro { padding-inline: clamp(14px,3vw,28px) !important; }
}
@media (max-width: 640px) {
  body.edge-os-enabled .edge-os-topbar { height: 56px; }
  body.edge-os-enabled .edge-os-topbar__slash,
  body.edge-os-enabled .edge-os-topbar__context { display: none; }
  body.edge-os-enabled .edge-os-topbar__brand { font-size: 11px; letter-spacing: .04em; }
  body.edge-os-enabled .edge-os-topbar__menu { padding: 0 10px; }
  body.edge-os-enabled .edge-os-topbar__menu > span:last-child { display: none; }
  body.edge-os-enabled .edge-os-shell > .main-container > main.main {
    padding: 12px !important;
    gap: 12px;
  }
  body.edge-os-enabled .posts-index.ef-files .ef-intro {
    padding: 19px 16px;
  }
  body.edge-os-enabled .posts-index.ef-files .ef-grid {
    grid-template-columns: minmax(0,1fr);
    padding: 13px;
  }
  body.edge-os-enabled .edge-post-path {
    min-height: 44px;
    gap: 6px;
    padding: 8px 10px;
  }
  body.edge-os-enabled .edge-post-path__status { display: none; }
  body.edge-os-enabled .edge-os-shell .article-reading-layout { padding: 20px 16px 34px !important; }
  body.edge-os-enabled .edge-os-shell .main-article > .article-header .article-title {
    font-size: clamp(28px,7.5vw,40px) !important;
    line-height: 1.1 !important;
  }
  body.edge-os-enabled .edge-os-shell .edge-journal.eh-redesign { padding-inline: 0 !important; }
  body.edge-os-enabled .edge-os-shell .newsletter-signup { margin-inline: 0 !important; }
  body.edge-os-enabled .edge-os-shell .ej-dispatches .ej-card {
    min-width: 0;
  }
}
/* For short landscape browsers, fall back to a single scroll surface so even
   the pinned header/footer remain reachable rather than disappearing. */
@media (max-height: 620px) {
  body.edge-os-enabled .edge-os-shell > .main-container > .left-sidebar {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior-y: auto;
  }
  body.edge-os-enabled .left-sidebar > .edge-os-sidebar-head,
  body.edge-os-enabled .left-sidebar > .edge-os-sidebar-footer {
    flex: 0 0 auto;
  }
  body.edge-os-enabled .left-sidebar > .edge-os-sidebar-scroll {
    flex: 0 0 auto;
    overflow: visible;
    margin-bottom: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.edge-os-enabled .edge-os-shell > .main-container > .left-sidebar,
  body.edge-os-enabled .edge-os-backdrop {
    transition: none !important;
  }
}
