:root {
  --sidebar-expanded-width: clamp(220px, 16vw, 240px);
  --sidebar-collapsed-width: 68px;
  --sidebar-current-width: var(--sidebar-expanded-width);
  --content-gutter: clamp(24px, 2vw, 32px);
  --mobile-header-height: 60px;
  --mobile-drawer-width: min(84vw, 340px);
}

body.dc-shell-ready {
  margin: 0;
  padding: 0 !important;
  overflow-x: hidden;
}

body.dc-shell-ready.dc-drawer-open {
  overflow: hidden;
}

body.dc-command-palette-open {
  overflow: hidden;
}

.dc-app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-current-width) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dc-app-shell.is-collapsed {
  --sidebar-current-width: var(--sidebar-collapsed-width);
}

.dc-main-column {
  grid-column: 2;
  min-width: 0;
  width: 100%;
  padding-inline: var(--content-gutter);
  container-type: inline-size;
}

.dc-main-column > .page-shell,
.dc-main-column > .tracker {
  width: 100%;
}

.dc-shell-ready .page-shell {
  max-width: 1040px;
}

.dc-shell-ready .page-shell.is-home {
  max-width: 1160px;
}

.dc-shell-ready > .site-header,
.dc-shell-ready .dc-main-column > .page-shell > .site-header,
.dc-shell-ready .dc-main-column > .tracker > .site-header,
.dc-shell-ready .site-header-peek {
  display: none !important;
}

.dc-shell-ready .dc-main-column > .tracker > .site-header-app {
  display: block !important;
}

.dc-shell-ready .dc-main-column > .tracker > .site-header-app .site-header-bar,
.dc-shell-ready .dc-main-column > .tracker > .site-header-app .site-nav-rail {
  display: none !important;
}

.dc-shell-ready .dc-main-column > .tracker > .site-header-peek:not([hidden]) {
  display: inline-flex !important;
}

.dc-sidebar {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-current-width);
  min-width: 0;
  height: 100vh;
  padding: 14px 10px;
  overflow: hidden;
  border-right: 1px solid var(--border, rgba(255,255,255,0.06));
  background: #0d0d10;
  transition: width 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dc-sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-bottom: 12px;
}

.dc-sidebar-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  height: 40px;
  padding: 0 8px;
  color: var(--text-1, #f0eef8);
  text-decoration: none;
  border-radius: var(--r-sm, 10px);
}

.dc-sidebar-brand:focus-visible,
.dc-sidebar-toggle:focus-visible,
.dc-drawer-close:focus-visible,
.dc-mobile-menu-button:focus-visible,
.dc-sidebar .site-search-inline-input:focus-visible,
.dc-drawer .site-search-inline-input:focus-visible,
.dc-sidebar-nav a:focus-visible,
.dc-sidebar-nav summary:focus-visible,
.dc-drawer-nav a:focus-visible,
.dc-drawer-nav summary:focus-visible {
  outline: 2px solid var(--accent, #c9a84c);
  outline-offset: 2px;
}

.dc-brand-full {
  display: block;
  width: auto;
  height: 22px;
  max-width: 154px;
}

.dc-brand-mark {
  display: none;
  width: 24px;
  height: 24px;
}

.dc-sidebar-toggle,
.dc-drawer-close,
.dc-mobile-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-strong, rgba(255,255,255,0.1));
  border-radius: var(--r-sm, 10px);
  background: rgba(255,255,255,0.025);
  color: var(--text-2, #8a879e);
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.dc-sidebar-toggle {
  border-color: transparent;
  background: transparent;
}

.dc-skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #c9a84c;
  border-radius: 8px;
  background: #171719;
  color: #f2d675;
  font: 700 14px/1.2 Inter, system-ui, sans-serif;
  text-decoration: none;
  transform: translateY(calc(-100% - 16px));
  transition: transform 160ms ease;
}

.dc-skip-link:focus,
.dc-skip-link:focus-visible {
  outline: 2px solid #f2d675;
  outline-offset: 2px;
  transform: translateY(0);
}

.dc-sidebar-toggle .dc-icon {
  width: 19px;
  height: 19px;
  color: var(--text-2, #8a879e);
}

.dc-sidebar-toggle:hover,
.dc-drawer-close:hover,
.dc-mobile-menu-button:hover {
  color: var(--accent-soft, #efd58b);
  border-color: rgba(201,168,76,0.28);
  background: rgba(201,168,76,0.08);
}

.dc-sidebar-search,
.dc-drawer-search {
  margin-bottom: 14px;
}

.dc-sidebar .site-search-inline,
.dc-drawer .site-search-inline {
  position: relative;
  display: block;
  width: 100%;
}

.dc-sidebar .site-search-inline-icon,
.dc-drawer .site-search-inline-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 1;
  width: 17px;
  height: 17px;
  color: var(--text-3, #56536a);
  pointer-events: none;
  transform: translateY(-50%);
  transition: color 180ms ease;
}

.dc-sidebar .site-search-inline-input,
.dc-drawer .site-search-inline-input {
  appearance: none;
  width: 100%;
  height: 44px;
  min-width: 0;
  padding: 0 12px 0 39px;
  border: 1px solid var(--border-strong, rgba(255,255,255,0.1));
  border-radius: var(--r-sm, 10px);
  outline: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)),
    rgba(255,255,255,0.015);
  color: var(--text-1, #f0eef8);
  cursor: text;
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-size: 0.82rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
  transition:
    border-color 180ms ease,
    background 180ms ease;
}

.dc-sidebar .site-search-inline-input::placeholder,
.dc-drawer .site-search-inline-input::placeholder {
  color: var(--text-3, #56536a);
}

.dc-sidebar .site-search-inline-input:hover,
.dc-drawer .site-search-inline-input:hover {
  border-color: rgba(255,255,255,0.18);
}

.dc-sidebar .site-search-inline.is-expanded .site-search-inline-input,
.dc-drawer .site-search-inline.is-expanded .site-search-inline-input {
  /* content.css has a same-or-lower-specificity `.site-search-inline.is-expanded
     .site-search-inline-input { width: min(320px, ...) }` for the header search
     pill; without a width here it wins and the sidebar/drawer input grows to
     320px, overflowing the column. */
  width: 100%;
  border-color: rgba(201,168,76,0.34);
  background:
    linear-gradient(180deg, rgba(201,168,76,0.055), rgba(255,255,255,0.018)),
    rgba(255,255,255,0.018);
}

.dc-sidebar .site-search-inline.is-expanded .site-search-inline-icon,
.dc-drawer .site-search-inline.is-expanded .site-search-inline-icon {
  color: var(--accent, #c9a84c);
}

.dc-sidebar .site-search-inline-results,
.dc-drawer .site-search-inline-results {
  position: absolute;
  top: calc(100% + 8px);
  right: auto;
  left: 0;
  z-index: 120;
  /* .dc-sidebar has overflow: hidden (needed to clip labels during the
     collapse/expand width transition), so this can't be wider than the
     sidebar itself or its right edge gets silently clipped off. */
  width: 100%;
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border-strong, rgba(255,255,255,0.1));
  border-radius: var(--r, 14px);
  background: var(--surface-2, #17171d);
  box-shadow: 0 24px 60px rgba(0,0,0,0.48);
}

.dc-sidebar .site-search-inline-results[hidden],
.dc-drawer .site-search-inline-results[hidden] {
  display: none;
}

.dc-sidebar .site-search-result,
.dc-drawer .site-search-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--text-1, #f0eef8);
  text-decoration: none;
}

.dc-sidebar .site-search-result:hover,
.dc-sidebar .site-search-result.is-active,
.dc-drawer .site-search-result:hover,
.dc-drawer .site-search-result.is-active {
  background: rgba(201,168,76,0.1);
}

.dc-sidebar .site-search-result-kind,
.dc-drawer .site-search-result-kind {
  color: var(--accent, #c9a84c);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dc-sidebar .site-search-result-title,
.dc-drawer .site-search-result-title {
  font-size: 0.85rem;
  font-weight: 650;
}

.dc-sidebar .site-search-result-desc,
.dc-drawer .site-search-result-desc {
  overflow: hidden;
  color: var(--text-2, #8a879e);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dc-sidebar .site-search-inline-empty,
.dc-drawer .site-search-inline-empty {
  padding: 9px 10px;
  color: var(--text-3, #56536a);
  font-size: 0.8rem;
}

.dc-sidebar-nav,
.dc-drawer-nav {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 0;
  /* Only ever scroll vertically. Declaring a single axis as `auto` makes CSS
     promote the other axis from `visible` to `auto` too, which surfaced a
     phantom horizontal scrollbar under the nav when an item was highlighted.
     Labels already ellipsis-clip, so clipping the x-axis loses nothing. */
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.14) transparent;
}

.dc-sidebar-nav {
  flex: 1 1 auto;
  padding-bottom: 20px;
}

.dc-nav-link,
.dc-nav-summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--r-sm, 10px);
  background: transparent;
  color: var(--text-2, #8a879e);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.dc-nav-link .dc-icon,
.dc-nav-summary .dc-icon {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  color: var(--text-2, #8a879e);
  transition: color 180ms ease;
}

.dc-nav-avatar {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  object-fit: cover;
}

.dc-nav-label {
  min-width: 0;
  padding-block: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.28;
  white-space: nowrap;
}

.dc-nav-link:hover,
.dc-nav-summary:hover {
  color: var(--text-1, #f0eef8);
  background: rgba(255,255,255,0.045);
}

.dc-nav-link:hover .dc-icon,
.dc-nav-summary:hover .dc-icon {
  color: var(--text-2, #8a879e);
}

.dc-nav-link[aria-current="page"],
.dc-nav-accordion.is-current > .dc-nav-summary {
  color: var(--accent-soft, #efd58b);
  border-color: rgba(201,168,76,0.12);
  background: rgba(201,168,76,0.09);
}

.dc-nav-link[aria-current="page"]::before,
.dc-nav-accordion.is-current > .dc-nav-summary::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent, #c9a84c);
}

.dc-nav-link[aria-current="page"] .dc-icon,
.dc-nav-accordion.is-current > .dc-nav-summary .dc-icon {
  color: var(--accent, #c9a84c);
}

.dc-account-widget {
  flex: 0 0 auto;
  padding: 0 10px 10px;
}
.dc-account-widget:empty { display: none; }
.dc-app-shell.is-collapsed .dc-account-widget { padding-inline: 0; }
.dc-account-widget-btn.is-primary {
  border-color: color-mix(in srgb, var(--accent, #c9a84c) 45%, transparent);
  color: var(--accent-soft, #efd58b);
}
.dc-account-widget-btn.is-primary:hover,
.dc-account-widget-btn.is-primary:focus-visible {
  background: color-mix(in srgb, var(--accent, #c9a84c) 12%, transparent);
  border-color: var(--accent, #c9a84c);
}
.dc-account-widget-btn.is-primary .dc-icon { color: var(--accent, #c9a84c); }

.dc-sidebar-social {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  flex: 0 0 auto;
  padding-top: 12px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.06));
}

.dc-community-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 44px;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--r-sm, 10px);
  background: rgba(255,255,255,0.02);
  color: var(--text-2, #8a879e);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.dc-community-link--contact {
  grid-column: 1 / -1;
}

.dc-community-link:hover,
.dc-community-link:focus-visible {
  color: var(--accent-soft, #efd58b);
  border-color: rgba(201,168,76,0.25);
  background: rgba(201,168,76,0.08);
}

.dc-community-link--reddit:hover,
.dc-community-link--reddit:focus-visible {
  color: #ff4500;
  border-color: rgba(255,69,0,0.42);
  background: rgba(255,69,0,0.11);
}

.dc-community-link--discord:hover,
.dc-community-link--discord:focus-visible {
  color: #5865f2;
  border-color: rgba(88,101,242,0.46);
  background: rgba(88,101,242,0.12);
}

.dc-community-link:focus-visible {
  outline: 2px solid var(--accent, #c9a84c);
  outline-offset: 2px;
}

.dc-community-icon {
  display: block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.dc-community-icon--discord {
  width: 18px;
  height: 18px;
}

.dc-community-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dc-shell-main > .site-footer .site-legal {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.06));
  text-align: center;
}

.dc-shell-main > .site-footer .footer-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 4px;
}

.dc-shell-main > .site-footer .footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-soft, #efd58b);
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.dc-shell-main > .site-footer .footer-social-icon {
  display: block;
  width: 22px;
  height: 22px;
  color: currentColor;
}

.dc-shell-main > .site-footer .footer-social-icon--discord {
  width: 18px;
  height: 18px;
}

.dc-shell-main > .site-footer .footer-social-link:hover,
.dc-shell-main > .site-footer .footer-social-link:focus-visible {
  transform: translateY(-2px);
}

.dc-shell-main > .site-footer .footer-social-link--reddit:hover,
.dc-shell-main > .site-footer .footer-social-link--reddit:focus-visible {
  color: #ff4500;
}

.dc-shell-main > .site-footer .footer-social-link--reddit:hover .footer-social-icon,
.dc-shell-main > .site-footer .footer-social-link--reddit:focus-visible .footer-social-icon {
  color: #ff4500;
}

.dc-shell-main > .site-footer .footer-social-link--discord:hover,
.dc-shell-main > .site-footer .footer-social-link--discord:focus-visible {
  color: #5865f2;
}

.dc-shell-main > .site-footer .footer-social-link--discord:hover .footer-social-icon,
.dc-shell-main > .site-footer .footer-social-link--discord:focus-visible .footer-social-icon {
  color: #5865f2;
}

.dc-shell-main > .site-footer .site-legal p {
  margin: 0;
  color: var(--text-2, #8a879e);
  font-size: 0.82rem;
  line-height: 1.65;
}

.dc-shell-main > .site-footer .site-legal a {
  color: var(--accent-soft, #efd58b);
  text-decoration: none;
}

.dc-shell-main > .site-footer .site-legal a:hover,
.dc-shell-main > .site-footer .site-legal a:focus-visible {
  text-decoration: underline;
}

.dc-shell-main > .site-footer .site-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
}

.dc-nav-accordion {
  min-width: 0;
}

.dc-nav-summary {
  list-style: none;
  justify-content: flex-start;
}

.dc-nav-summary::-webkit-details-marker {
  display: none;
}

.dc-nav-summary::marker {
  content: "";
}

.dc-nav-chevron {
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: auto;
  transition: transform 180ms ease;
}

.dc-nav-chevron .dc-icon {
  width: 16px;
  height: 16px;
}

.dc-nav-accordion[open] > .dc-nav-summary .dc-nav-chevron {
  transform: rotate(180deg);
}

.dc-nav-submenu {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 200ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 160ms ease;
}

.dc-nav-accordion[open] > .dc-nav-submenu {
  grid-template-rows: 1fr;
  opacity: 1;
}

.dc-nav-submenu-inner {
  min-height: 0;
  overflow: hidden;
}

.dc-nav-group {
  display: grid;
  gap: 2px;
  padding: 6px 0 4px 18px;
}

.dc-nav-group + .dc-nav-group {
  margin-top: 4px;
}

.dc-nav-group-title {
  padding: 5px 10px 3px;
  overflow: hidden;
  color: var(--text-3, #56536a);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.dc-nav-submenu .dc-nav-link {
  min-height: 36px;
  padding-left: 10px;
  font-size: 0.82rem;
  font-weight: 450;
  color: var(--text-3, #6f6c85);
}

.dc-nav-submenu .dc-nav-link:hover {
  color: var(--text-1, #f0eef8);
}

.dc-nav-submenu .dc-nav-link[aria-current="page"] {
  color: var(--accent-soft, #efd58b);
  font-weight: 600;
}

.dc-nav-submenu .dc-nav-link::before {
  top: 10px;
  bottom: 10px;
  width: 2px;
}

/* "View all <category> tools" -- the doorway into the complete /commander-tools
   directory. It reads as a quiet "more" affordance rather than a destination
   row: accent-tinted, a trailing arrow, and never the active-page bar. */
.dc-nav-viewall {
  color: var(--accent-soft, #efd58b);
  font-weight: 600;
}

.dc-nav-viewall .dc-nav-label {
  flex: 0 1 auto;
}

.dc-nav-viewall-arrow {
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: 6px;
  opacity: 0.7;
  transition: transform 160ms ease;
}

.dc-nav-viewall-arrow .dc-icon {
  width: 15px;
  height: 15px;
}

.dc-nav-viewall:hover {
  color: var(--accent, #c9a84c);
  background: rgba(201,168,76,0.07);
}

.dc-nav-viewall:hover .dc-nav-viewall-arrow {
  transform: translateX(2px);
}

/* Set the first-level content links (My Decks / Play / All Tools / Blog) apart
   from the four intent categories above, so the user's own content and the full
   directory feel like their own group -- spacing only, no extra container. */
.dc-nav-section-break {
  margin-top: 16px;
}

.dc-app-shell.is-collapsed .dc-sidebar {
  padding-inline: 8px;
}

.dc-app-shell.is-collapsed .dc-sidebar-header {
  justify-content: center;
  flex-wrap: wrap;
  height: auto;
}

.dc-app-shell.is-collapsed .dc-sidebar-brand {
  justify-content: center;
  flex: 0 0 100%;
  padding-inline: 0;
}

.dc-app-shell.is-collapsed .dc-brand-full {
  display: none;
}

.dc-app-shell.is-collapsed .dc-brand-mark {
  display: block;
}

.dc-app-shell.is-collapsed .dc-sidebar-toggle {
  width: 44px;
}

.dc-app-shell.is-collapsed .dc-sidebar-search {
  margin-top: 2px;
}

.dc-app-shell.is-collapsed .dc-sidebar .site-search-inline {
  /* Match the other 44px collapsed icon buttons (toggle, nav links,
     community links), which all center in the rail via justify-content or
     margin. Without this the wrap stays full-width and the absolutely
     positioned icon (left: 13px) sits toward the wrap's left edge instead
     of centered in the 68px rail. */
  width: 44px;
  margin: 0 auto;
}

.dc-app-shell.is-collapsed .dc-sidebar .site-search-inline-input {
  width: 44px;
  padding-right: 0;
  color: transparent;
  cursor: pointer;
  /* In the collapsed rail the input reads as an icon button, so drop the
     boxed field treatment (border, filled background, inset highlight) and
     match the transparent-at-rest, subtle-on-hover look of the nav links
     beside it. Otherwise a square outlines the search glyph. */
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.dc-app-shell.is-collapsed .dc-sidebar .site-search-inline-input:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.045);
}

.dc-app-shell.is-collapsed .dc-sidebar .site-search-inline-input::placeholder {
  color: transparent;
}

.dc-app-shell.is-collapsed .dc-sidebar .site-search-inline.is-expanded .site-search-inline-input {
  color: transparent;
}

.dc-app-shell.is-collapsed .dc-sidebar .site-search-inline-results {
  left: calc(100% + 12px);
  top: 0;
}

.dc-app-shell.is-collapsed .dc-nav-link,
.dc-app-shell.is-collapsed .dc-nav-summary {
  justify-content: center;
  padding-inline: 0;
}

.dc-app-shell.is-collapsed .dc-nav-label,
.dc-app-shell.is-collapsed .dc-nav-chevron {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.dc-app-shell.is-collapsed .dc-nav-accordion[open] > .dc-nav-submenu {
  grid-template-rows: 0fr;
  opacity: 0;
}

.dc-app-shell.is-collapsed .dc-sidebar-social {
  grid-template-columns: 1fr;
  /* .dc-community-link gets an explicit 42px width below, which stops it
     from stretching to fill the single 1fr column -- without this it
     start-aligns (left) in that column instead of centering like the
     other 42px rail icons. */
  justify-items: center;
}

.dc-app-shell.is-collapsed .dc-community-link {
  width: 42px;
  padding: 0;
}

.dc-app-shell.is-collapsed .dc-community-link--contact {
  grid-column: auto;
}

.dc-app-shell.is-collapsed .dc-community-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.dc-app-shell.is-collapsed [data-tooltip]::after {
  content: attr(data-tooltip);
  position: fixed;
  left: calc(var(--sidebar-collapsed-width) + 10px);
  z-index: 120;
  max-width: 240px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong, rgba(255,255,255,0.1));
  border-radius: 8px;
  background: var(--surface-2, #17171d);
  color: var(--text-1, #f0eef8);
  box-shadow: 0 12px 28px rgba(0,0,0,0.34);
  font-size: 0.78rem;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.dc-app-shell.is-collapsed [data-tooltip]:hover::after,
.dc-app-shell.is-collapsed [data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

.dc-mobile-bar,
.dc-drawer,
.dc-nav-overlay {
  display: none;
}

.dc-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  padding: 0;
  border: 0;
  background: rgba(0,0,0,0.58);
  opacity: 0;
  cursor: pointer;
  transition: opacity 200ms ease;
}

.dc-nav-overlay.is-visible {
  display: block;
  opacity: 1;
}

.dc-mobile-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  align-items: center;
  justify-content: space-between;
  height: var(--mobile-header-height);
  padding: 0 var(--mobile-content-gutter, 18px);
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
  background: rgba(10,10,12,0.94);
  backdrop-filter: blur(18px) saturate(1.08);
}

.dc-mobile-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.dc-mobile-brand img {
  width: auto;
  height: 22px;
  max-width: min(48vw, 170px);
}

.dc-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 90;
  flex-direction: column;
  width: var(--mobile-drawer-width);
  max-width: calc(100vw - 40px);
  padding: 14px 12px 20px;
  border-right: 1px solid var(--border-strong, rgba(255,255,255,0.1));
  background: #0d0d10;
  box-shadow: 24px 0 60px rgba(0,0,0,0.38);
  transform: translateX(-105%);
  transition: transform 210ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dc-drawer.is-open {
  transform: translateX(0);
}

.dc-drawer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 12px;
}

.dc-drawer-header .dc-sidebar-brand {
  padding-left: 6px;
}

.dc-drawer-nav {
  padding-bottom: 28px;
}

.dc-drawer .dc-sidebar-social {
  margin-top: auto;
}

/* 2026 UI refinement: clearer context, compact controls, tactile depth. */
.dc-page-context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  width: 100%;
  grid-column: 1 / -1;
  margin: 0 0 14px;
  color: color-mix(in srgb, var(--text-2, #8a879e) 82%, white);
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.035em;
}

.dc-page-context a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease;
}

.dc-page-context a:hover,
.dc-page-context a:focus-visible,
.dc-page-context-current {
  color: var(--accent-soft, #efd58b);
}

.dc-page-context a:focus-visible {
  outline: 2px solid var(--accent, #c9a84c);
  outline-offset: 3px;
  border-radius: 4px;
}

.dc-page-context-separator {
  color: color-mix(in srgb, var(--text-3, #56536a) 74%, transparent);
}

.site-search-shortcut {
  position: absolute;
  top: 50%;
  right: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 7px;
  background: rgba(0,0,0,0.2);
  color: color-mix(in srgb, var(--text-2, #8a879e) 82%, white);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
}

.dc-sidebar .site-search-inline-input,
.dc-drawer .site-search-inline-input {
  padding-right: 64px;
}

.site-search-result-group + .site-search-result-group {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,0.055);
}

.site-search-result-group-title {
  padding: 4px 10px 5px;
  color: var(--accent, #c9a84c);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dc-command-palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(2,2,4,0.68);
  backdrop-filter: blur(7px);
  cursor: default;
  animation: dc-overlay-in 180ms ease both;
}

.site-search-inline.is-command-palette {
  position: fixed;
  top: clamp(84px, 15vh, 150px);
  left: 50%;
  z-index: 200;
  display: block;
  width: min(580px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid rgba(201,168,76,0.26);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 0%, rgba(201,168,76,0.1), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018)),
    #111116;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.09),
    0 34px 90px rgba(0,0,0,0.62);
  transform: translateX(-50%);
  animation: dc-palette-in 190ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* The palette is reparented to <body> when open, so its rules must not depend
   on a .dc-sidebar/.dc-drawer ancestor. The wrap grows tall (input + in-flow
   results), so the absolutely-positioned icon/shortcut can't use top:50% of the
   wrap -- anchor them to the input row instead (10px pad + 52px input / 2). */
.site-search-inline.is-command-palette .site-search-inline-icon,
.site-search-inline.is-command-palette .site-search-shortcut {
  top: 36px;
}

.site-search-inline.is-command-palette .site-search-inline-icon {
  left: 24px;
  width: 18px;
  height: 18px;
  color: var(--accent, #c9a84c);
}

.site-search-inline.is-command-palette .site-search-inline-input {
  width: 100%;
  height: 52px;
  padding-left: 44px;
  padding-right: 64px;
  border-color: rgba(255,255,255,0.11);
  border-radius: 12px;
  background: rgba(5,5,8,0.62);
  color: var(--text-1, #f0eef8);
  cursor: text;
  font-size: 0.96rem;
}

.site-search-inline.is-command-palette .site-search-inline-input::placeholder {
  color: var(--text-3, #56536a);
}

.site-search-inline.is-command-palette .site-search-shortcut {
  right: 20px;
}

.dc-app-shell.is-collapsed .dc-sidebar .site-search-shortcut {
  display: none;
}

.dc-app-shell.is-collapsed .dc-sidebar .site-search-inline.is-command-palette .site-search-shortcut {
  display: inline-flex;
}

.dc-app-shell.is-collapsed .dc-sidebar .site-search-inline.is-command-palette .site-search-inline-input {
  width: 100%;
  padding-right: 64px;
  color: var(--text-1, #f0eef8);
}

.site-search-inline.is-command-palette .site-search-inline-results {
  position: static;
  width: 100%;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  margin-top: 8px;
  padding: 4px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

.site-search-inline.is-command-palette .site-search-result {
  min-height: 54px;
  justify-content: center;
  padding: 9px 12px;
}

.site-search-inline.is-command-palette .site-search-result-title {
  font-size: 0.9rem;
}

.site-search-inline.is-command-palette .site-search-result-desc {
  font-size: 0.76rem;
}

.dc-shell-ready .page-intro,
.dc-shell-ready .prose p,
.dc-shell-ready .prose li,
.dc-shell-ready .tool-card p,
.dc-shell-ready .seo-note-card p,
.dc-shell-ready .related-tool-card p {
  color: var(--text-2, #8a879e);
  color: color-mix(in srgb, var(--text-2, #8a879e) 88%, white);
  line-height: 1.68;
}

.dc-shell-ready .page-intro {
  font-size: clamp(1rem, 1.1vw, 1.06rem);
}

.dc-shell-ready .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.115em;
}

.dc-shell-ready .page-card,
.dc-shell-ready .tool-card,
.dc-shell-ready .calc-card,
.dc-shell-ready .deck-audit-card,
.dc-shell-ready .worked-example-card,
.dc-shell-ready .seo-note-card,
.dc-shell-ready .related-tool-card {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.085),
    0 1px 0 rgba(255,255,255,0.025),
    0 18px 46px rgba(0,0,0,0.24);
}

.dc-shell-ready .tabs.tracker-section-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 12px 0 0;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)),
    rgba(8,8,11,0.72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.045),
    0 12px 28px rgba(0,0,0,0.18);
  scrollbar-width: none;
}

.dc-shell-ready .tabs.tracker-section-tabs::-webkit-scrollbar {
  display: none;
}

.dc-shell-ready .tracker-section-tabs .tab-btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 15px;
  border-color: transparent;
  border-radius: 12px;
  background: transparent;
  font-size: 0.86rem;
  white-space: nowrap;
  box-shadow: none;
}

.dc-shell-ready .tracker-section-tabs .tab-btn:hover {
  color: var(--text-1, #f0eef8);
  background: rgba(255,255,255,0.045);
}

.dc-shell-ready .tracker-section-tabs .tab-btn[aria-selected="true"] {
  border-color: rgba(201,168,76,0.24);
  background:
    linear-gradient(180deg, rgba(201,168,76,0.15), rgba(201,168,76,0.055)),
    rgba(255,255,255,0.02);
  color: var(--accent-soft, #efd58b);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.055);
}

.dc-shell-ready .calc-copy,
.dc-shell-ready .calc-guide p,
.dc-shell-ready .calc-guide li,
.dc-shell-ready .utility-copy,
.dc-shell-ready .utility-sub {
  color: color-mix(in srgb, var(--text-2, #8a879e) 88%, white);
  font-size: 0.8rem;
}

@media (hover: hover) {
  .dc-nav-link:hover,
  .dc-nav-summary:hover {
    transform: translateX(2px);
  }

  .dc-shell-ready .back-link:hover,
  .dc-shell-ready .primary-link:hover,
  .dc-shell-ready .action-btn:hover,
  .dc-shell-ready .utility-action:hover {
    transform: translateY(-2px);
  }
}

.dc-shell-ready .back-link:active,
.dc-shell-ready .primary-link:active,
.dc-shell-ready .action-btn:active,
.dc-shell-ready .utility-action:active {
  transform: translateY(0) scale(0.985);
}

@keyframes dc-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dc-palette-in {
  from { opacity: 0; transform: translate(-50%, -8px) scale(0.985); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@media (min-width: 1600px) {
  :root {
    --sidebar-expanded-width: clamp(240px, 13vw, 272px);
    --sidebar-collapsed-width: 68px;
    --content-gutter: clamp(32px, 2.5vw, 48px);
  }

  .dc-shell-ready .page-shell.is-home {
    max-width: 1500px;
  }

  .dc-shell-ready .landing-hero-grid {
    grid-template-columns: minmax(0, 1.78fr) minmax(360px, 1fr);
  }

  .dc-shell-ready .lp-feature-block {
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  }
}

@media (min-width: 1280px) and (max-width: 1599px) {
  :root {
    --sidebar-expanded-width: clamp(220px, 16vw, 240px);
    --sidebar-collapsed-width: 68px;
    --content-gutter: clamp(24px, 2vw, 32px);
  }

  .dc-shell-ready .landing-hero-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(340px, 1fr);
  }

  .dc-shell-ready .lp-feature-block {
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr);
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  :root {
    --sidebar-expanded-width: clamp(216px, 21vw, 232px);
    --sidebar-collapsed-width: 68px;
    --content-gutter: clamp(20px, 2vw, 24px);
  }

  .dc-shell-ready .landing-hero-grid {
    grid-template-columns: minmax(0, 1.27fr) minmax(300px, 1fr);
  }

  .dc-shell-ready .lp-feature-block {
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 1fr);
    gap: 28px;
  }
}

@media (min-width: 900px) and (max-width: 1023px) {
  :root {
    --sidebar-expanded-width: clamp(260px, 30vw, 300px);
    --sidebar-collapsed-width: clamp(60px, 7vw, 68px);
    --sidebar-current-width: var(--sidebar-collapsed-width);
    --content-gutter: clamp(20px, 2.3vw, 24px);
  }

  .dc-app-shell,
  .dc-app-shell.is-collapsed {
    grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
  }

  .dc-sidebar {
    width: var(--sidebar-collapsed-width);
    padding-inline: 8px;
  }

  .dc-app-shell.is-tablet-open .dc-sidebar {
    position: fixed;
    left: 0;
    width: var(--sidebar-expanded-width);
    box-shadow: 24px 0 60px rgba(0,0,0,0.42);
  }

  .dc-app-shell:not(.is-tablet-open) .dc-sidebar-header {
    justify-content: center;
    flex-wrap: wrap;
  }

  .dc-app-shell:not(.is-tablet-open) .dc-sidebar-brand {
    justify-content: center;
    flex: 0 0 100%;
    padding: 0;
  }

  .dc-app-shell:not(.is-tablet-open) .dc-brand-full,
  .dc-app-shell:not(.is-tablet-open) .dc-nav-label,
  .dc-app-shell:not(.is-tablet-open) .dc-nav-chevron {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .dc-app-shell:not(.is-tablet-open) .dc-brand-mark {
    position: static;
    display: block;
    width: 24px;
    height: 24px;
    clip-path: none;
  }

  .dc-app-shell:not(.is-tablet-open) .dc-nav-link,
  .dc-app-shell:not(.is-tablet-open) .dc-nav-summary {
    justify-content: center;
    padding-inline: 0;
  }

  .dc-app-shell:not(.is-tablet-open) .dc-sidebar .site-search-inline-input {
    width: 42px;
    padding-right: 0;
    color: transparent;
  }

  .dc-app-shell:not(.is-tablet-open) .dc-sidebar .site-search-inline-input::placeholder {
    color: transparent;
  }

  .dc-app-shell:not(.is-tablet-open) .dc-sidebar .site-search-shortcut {
    display: none;
  }

  .dc-app-shell:not(.is-tablet-open) .dc-sidebar .site-search-inline.is-command-palette .site-search-shortcut {
    display: inline-flex;
  }

  .dc-app-shell:not(.is-tablet-open) .dc-sidebar .site-search-inline.is-command-palette .site-search-inline-input {
    width: 100%;
    padding-right: 64px;
    color: var(--text-1, #f0eef8);
  }

  .dc-app-shell:not(.is-tablet-open) .dc-nav-accordion[open] > .dc-nav-submenu {
    grid-template-rows: 0fr;
    opacity: 0;
  }

  .dc-shell-ready .landing-hero-grid {
    grid-template-columns: 1fr;
  }

  .dc-shell-ready .lp-feature-block {
    grid-template-columns: 1fr;
  }

  .dc-shell-ready .landing-steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dc-shell-ready .landing-steps-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 899px) {
  :root {
    --mobile-content-gutter: clamp(18px, 3vw, 24px);
    --mobile-header-height: 60px;
    --mobile-drawer-width: clamp(280px, 40vw, 320px);
  }

  .dc-app-shell {
    display: block;
    min-height: 100vh;
  }

  .dc-sidebar {
    display: none;
  }

  .dc-mobile-bar,
  .dc-drawer {
    display: flex;
  }

  .dc-nav-overlay {
    z-index: 85;
  }

  .dc-main-column {
    grid-column: auto;
    padding-top: var(--mobile-header-height);
    padding-inline: var(--mobile-content-gutter);
  }

  .site-search-shortcut {
    display: none;
  }

  .dc-shell-ready .tabs.tracker-section-tabs {
    width: 100%;
  }

  .dc-shell-ready .landing-hero-grid,
  .dc-shell-ready .lp-feature-block {
    grid-template-columns: 1fr;
  }

  .dc-shell-ready .landing-steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dc-shell-ready .landing-steps-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 430px) and (max-width: 767px) {
  :root {
    --mobile-content-gutter: clamp(16px, 4vw, 20px);
    --mobile-header-height: 60px;
    --mobile-drawer-width: min(84vw, 340px);
  }

  .dc-shell-ready .landing-steps-grid {
    grid-template-columns: 1fr;
  }

  .dc-shell-ready .landing-steps-grid > :last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (max-width: 429px) {
  :root {
    --mobile-content-gutter: 16px;
    --mobile-header-height: 58px;
    --mobile-drawer-width: min(88vw, 320px);
  }

  .dc-nav-link,
  .dc-nav-summary {
    min-height: 46px;
  }

  .dc-mobile-brand img {
    max-width: 52vw;
  }

  .dc-shell-ready .landing-steps-grid {
    grid-template-columns: 1fr;
  }

  .dc-shell-ready .landing-steps-grid > :last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@container (max-width: 760px) {
  .landing-hero-grid,
  .lp-feature-block {
    grid-template-columns: 1fr !important;
  }

  .landing-hero-grid {
    gap: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dc-app-shell,
  .dc-sidebar,
  .dc-drawer,
  .dc-nav-overlay,
  .dc-nav-submenu,
  .dc-nav-chevron,
  .dc-nav-link,
  .dc-nav-summary,
  .dc-sidebar-toggle,
  .dc-drawer-close,
  .dc-mobile-menu-button {
    scroll-behavior: auto;
    transition: none !important;
  }

  .dc-command-palette-overlay,
  .site-search-inline.is-command-palette {
    animation: none !important;
  }
}

/* ---------------------------------------------------------------------------
 * Pre-shell layout reservation (Cumulative Layout Shift).
 *
 * site-nav.js moves the page into .dc-app-shell, hides the static
 * <header class="site-header">, and adds .dc-shell-ready, which caps
 * .page-shell at 1040px inside a sidebar grid column. Until that runs the page
 * paints with no sidebar and a 1200px column, so at a 1280px viewport every
 * element on the page jumped 212px sideways and 75px up the moment the shell
 * mounted. Measured on /commander-deck-audit: x 33 -> 245, width 1200 -> 994.
 *
 * These rules give the pre-shell paint the same geometry the shell settles on,
 * so mounting it is a no-op for layout. They only apply before .dc-shell-ready
 * lands, and every value they set is what the shell would have set anyway, so
 * the finished page is unchanged. The hardcoded footer nav on every page stays
 * visible as the fallback if site-nav.js never runs.
 * ------------------------------------------------------------------------ */
body:not(.dc-shell-ready) {
  margin: 0;
}

body:not(.dc-shell-ready) .page-shell {
  max-width: 1040px;
  margin-inline: auto;
}

body:not(.dc-shell-ready) .page-shell.is-home {
  max-width: 1160px;
}

body:not(.dc-shell-ready) .site-header {
  display: none;
}

@media (min-width: 900px) {
  body:not(.dc-shell-ready) {
    padding-inline-end: var(--content-gutter);
    padding-inline-start: calc(var(--sidebar-current-width) + var(--content-gutter));
  }
}

@media (max-width: 899px) {
  body:not(.dc-shell-ready) {
    padding-top: var(--mobile-header-height);
    padding-inline: var(--mobile-content-gutter, 20px);
  }
}
