.nav-dropdown > summary {
  position: relative;
  gap: .65rem;
  isolation: isolate;
}

.nav-dropdown > summary::after {
  position: absolute;
  right: 1rem;
  bottom: 12px;
  left: 1rem;
  height: 3px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(.25);
  transition: opacity .18s ease, transform .18s ease;
}

.nav-dropdown > summary:hover::after,
.nav-dropdown > summary:focus-visible::after,
.nav-dropdown[open] > summary::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-chevron {
  display: grid;
  width: 22px;
  height: 22px;
  margin: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #292923;
  transform: none;
  transition: background .2s ease, transform .25s cubic-bezier(.2, .75, .25, 1.2);
}

.nav-chevron svg {
  width: 14px;
  height: 10px;
  overflow: visible;
}

.nav-chevron path {
  fill: none;
  stroke: var(--acid);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.nav-chevron circle {
  fill: var(--acid);
}

.nav-dropdown > summary:hover .nav-chevron,
.nav-dropdown > summary:focus-visible .nav-chevron,
.nav-dropdown[open] .nav-chevron {
  background: var(--ink);
}

.nav-dropdown[open] .nav-chevron {
  margin: 0;
  transform: rotate(180deg);
}

.nav-dropdown-panel {
  top: calc(100% + 12px);
  left: 50%;
  width: min(820px, calc(100vw - 48px));
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #e7e3d8;
  color: var(--ink);
  box-shadow: 0 26px 70px rgb(0 0 0 / 34%), 0 4px 12px rgb(0 0 0 / 20%);
  transform: translateX(-50%);
  transform-origin: 50% 0;
  animation: nav-console-open .22s cubic-bezier(.2, .7, .2, 1) both;
}

.nav-dropdown-panel::before {
  top: -12px;
  left: 50%;
  width: 24px;
  height: 24px;
  background: var(--ink);
  transform: translateX(-50%) rotate(45deg);
}

.nav-dropdown-intro {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1.25rem 1.4rem;
  background: var(--ink);
  color: #fff;
}

.nav-console-mark {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5px;
  height: 46px;
  padding: 8px;
  border-radius: 12px;
  background: var(--acid);
}

.nav-console-mark i {
  display: block;
  width: 6px;
  border-radius: 6px;
  background: var(--ink);
}

.nav-console-mark i:nth-child(1) { height: 35%; }
.nav-console-mark i:nth-child(2) { height: 68%; }
.nav-console-mark i:nth-child(3) { height: 100%; }
.nav-console-mark i:nth-child(4) { height: 55%; }
.nav-console-mark i:nth-child(5) { height: 80%; }

.nav-dropdown-intro > div:nth-child(2) {
  display: grid;
  gap: .25rem;
}

.nav-dropdown-intro strong {
  color: #fff;
  font: 700 1.65rem/1 var(--display);
  letter-spacing: -.035em;
}

.nav-dropdown-intro span {
  color: #d8d6ce;
  font-size: .75rem;
}

.nav-dropdown-intro > a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: .7rem .9rem;
  border-radius: 999px;
  background: var(--acid);
  color: var(--ink);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-dropdown-intro > a:hover,
.nav-dropdown-intro > a:focus-visible {
  background: #fff;
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.nav-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
  padding: .8rem;
}

.nav-dropdown-grid > a {
  display: grid;
  grid-template-rows: 54px auto;
  gap: .7rem;
  min-height: 150px;
  padding: 1rem;
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgb(17 17 15 / 8%);
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.nav-topic-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 14px 14px 14px 4px;
  background: var(--acid);
  color: var(--ink);
  transition: border-radius .18s ease, transform .18s ease;
}

.nav-topic-icon svg {
  width: 38px;
  height: 38px;
}

.nav-topic-icon path,
.nav-topic-icon circle,
.nav-topic-icon rect {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.nav-topic-icon circle[cx="20"][r="2"] {
  fill: currentColor;
}

.nav-topic-copy {
  display: grid;
  align-content: start;
  gap: .35rem;
}

.nav-dropdown-grid .nav-topic-copy strong {
  color: var(--ink);
  font: 700 1.08rem/1.05 var(--display);
  letter-spacing: -.015em;
}

.nav-dropdown-grid .nav-topic-copy > span {
  color: #3f3e38;
  font-size: .68rem;
  line-height: 1.4;
}

.nav-dropdown-grid > a:hover,
.nav-dropdown-grid > a:focus-visible {
  background: var(--acid);
  color: var(--ink);
  outline: 0;
  box-shadow: 0 12px 28px rgb(17 17 15 / 24%);
  transform: translateY(-3px);
}

.nav-dropdown-grid > a:hover .nav-topic-copy > span,
.nav-dropdown-grid > a:focus-visible .nav-topic-copy > span {
  color: #2f2f2b;
}

.nav-dropdown-grid > a:hover .nav-topic-icon,
.nav-dropdown-grid > a:focus-visible .nav-topic-icon {
  background: var(--ink);
  color: var(--acid);
  border-radius: 50%;
  transform: rotate(-5deg) scale(1.04);
}

@keyframes nav-console-open {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(.98); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@media (max-width: 1100px) {
  .nav-dropdown-panel {
    left: auto;
    right: -190px;
    width: min(760px, calc(100vw - 32px));
    transform: none;
    transform-origin: 75% 0;
  }

  @keyframes nav-console-open {
    from { opacity: 0; transform: translateY(-8px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

@media (max-width: 940px) {
  .nav-dropdown-panel { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-dropdown-panel { animation: none; }
  .nav-dropdown-grid > a,
  .nav-topic-icon,
  .nav-chevron { transition: none; }
}

/* Keep editorial headings and their introductory copy aligned to the full
   width of the section they introduce. Long-form article prose retains its
   separate reading measure in site.css. */
.hero-dek,
.page-header > p:last-child,
.tool-identity > p,
.tool-callout p,
.article-answer,
.article-dek,
.article-opening,
.story-row p,
.collection-context article,
.collection-supplement > div,
.ledger-copy p,
.hub-practice,
.worked-example p,
.article-next p,
.legacy-lead,
.research-credit,
.research-section > p,
.research-pending,
.research-profile-directory p,
.collection-context-links h2,
.collection-context-links p,
.static-page > .prose:first-of-type,
.section-heading,
.section-heading p {
  width: 100%;
  max-width: none;
}
