/* hero-current header overrides — load after hero-current.css; body.eh-study only */

/* ---------- REST (wordmark still in hero): no brand column, flat bar ---------- */
body.eh-study .s13-header:not([data-s55-head]) {
  box-sizing: border-box;
  display: grid;
  align-items: center;
  gap: 0 28px;
  width: 100vw;
  max-width: none;
  margin: 0 calc(50% - 50vw);
  padding-inline: max(var(--page-pad, 40px), calc((100vw - 1168px) / 2));
  min-height: 56px;
  border: 0;
  border-left: 0;
  background: #171020;
  color: #e8dded;
}

body.eh-study .s13-header:not([data-s55-head])::after {
  content: none;
  display: none;
}

body.eh-study .s13-header:not([data-s55-head]) .s13-brand {
  display: none !important;
  visibility: hidden;
  min-width: 0;
  width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
}

body.eh-study .s13-header:not([data-s55-head]) > .hero-now {
  display: flex;
  align-items: center;
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  width: auto;
  max-width: 100%;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  grid-template-columns: unset;
  grid-template-rows: unset;
}

body.eh-study .s13-header:not([data-s55-head]) #s14-nav {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(10px, 1.2vw, 21px);
  margin: 0;
  padding: 0;
  border: 0;
}

body.eh-study .s13-header:not([data-s55-head]) .s14-menu-toggle {
  display: none;
}

@media (min-width: 1101px) {
  body.eh-study .s13-header:not([data-s55-head]) {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(64px, auto);
    min-height: 64px;
  }
}

@media (max-width: 1100px) {
  body.eh-study .s13-header:not([data-s55-head]) {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 56px;
    gap: 0 10px;
    min-height: 56px;
  }
}

@media (max-width: 760px) {
  body.eh-study .s13-header:not([data-s55-head]) .s14-menu-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  body.eh-study .s13-header:not([data-s55-head]) #s14-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 8px;
    width: 100%;
    padding: 8px 0 12px;
    border-top: 0;
  }

  body.eh-study[data-s14-nav="closed"] .s13-header:not([data-s55-head]) {
    grid-template-rows: 56px;
  }

  body.eh-study[data-s14-nav="open"] .s13-header:not([data-s55-head]) {
    grid-template-rows: 56px auto;
  }

  body.eh-study[data-s14-nav="closed"] .s13-header:not([data-s55-head]) #s14-nav {
    display: none;
  }
}

@media (max-width: 360px) {
  body.eh-study .s13-header:not([data-s55-head]) #s14-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Compact / handover bar: restore brand, flat purple backplate ---------- */
body.eh-study .s13-header[data-s55-head] .s13-brand {
  visibility: visible;
  display: flex;
}

/* Keep the team name present while the mark draws; never reserve a blank wordmark slot. */
body.eh-study .s13-header[data-s55-head="reading"][data-s55-arrive="full"] .s55-brand-word {
  animation: none;
  clip-path: none;
}

body.eh-study .s13-header[data-s55-head]::before {
  border-bottom: 0;
  background: #171020;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

/* ---------- Nav + MENU icon/label pairing (not brand or ON AIR lamp) ---------- */
body.eh-study .s13-header .hero-now .hero-now-label {
  flex: 0 0 auto;
  white-space: nowrap;
}

body.eh-study .s13-header #s14-nav a,
body.eh-study .s13-header .s14-menu-toggle {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-height: 44px;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom: 0;
  font: 600 14px/20px "Barlow Condensed", "Zen Kaku Gothic New", sans-serif;
  letter-spacing: 0.055em;
  white-space: nowrap;
}

body.eh-study .s13-header #s14-nav a:hover {
  text-decoration: none;
}

body.eh-study .s13-header #s14-nav a span,
body.eh-study .s13-header .s14-menu-toggle > span {
  display: block;
  margin: 0;
  line-height: 20px;
}

body.eh-study .s13-header #s14-nav .ui-icon,
body.eh-study .s13-header .s14-menu-toggle .ui-icon {
  display: block;
  flex: none;
  width: 18px;
  height: 18px;
}

body.eh-study .s13-header #s14-nav .s41-lettering--nav {
  display: none;
}

/* The menu controller's real breakpoint is760px; keep desktop button absent. */
@media (min-width: 761px) {
  body.eh-study .s13-header .s14-menu-toggle { display: none; }
}

@media (min-width: 761px) and (max-width: 1100px) {
  body.eh-study .s13-header[data-s55-head] { column-gap: 16px; }
}

@media (max-width: 374px) {
  body.eh-study .s13-header .hero-now[data-state="live"] .s55-onair-short::after { content: "人"; }
}

@media (max-width: 760px) {
  body.eh-study .s13-header #s14-nav a {
    flex-direction: row;
    justify-content: flex-start;
    min-height: 44px;
    padding: 6px 0;
  }
}

/* Ensure the arriving wordmark always has its opaque reading surface. */
body.eh-study .s13-header[data-s55-head="reading"][data-s55-arrive]::before {
  animation: none;
  opacity: 1;
}
