/* Shared masthead and the editorial homepage */
:root {
  --editorial-page: #fcfcfa;
  --editorial-paper: #f6f4ee;
  --editorial-rule: #d8d7cf;
  --editorial-ink: #182b3a;
  --editorial-secondary: #4d5c64;
  --editorial-gold: #84622c;
  --editorial-navy: #162939;
}

[data-theme="dark"] {
  --editorial-page: #141e29;
  --editorial-paper: #1a2632;
  --editorial-rule: #3c4b56;
  --editorial-ink: #f4f1e9;
  --editorial-secondary: #c1cbd1;
  --editorial-gold: #ddb877;
  --editorial-navy: #0d1721;
}

.editorial-skip {
  position: fixed;
  inset: .5rem .75rem auto auto;
  z-index: 100;
  padding: .65rem 1rem;
  border-radius: 3px;
  background: #fff;
  color: #122637;
  transform: translateY(-160%);
}

.editorial-skip:focus { transform: none; }

.masthead {
  background: var(--editorial-navy);
}

.masthead-inner,
.editorial-nav,
#view-home .container { max-width: 1200px; }

.masthead-inner { min-height: 70px; }
.masthead .brand-seal-img { width: 40px; height: 40px; }
.masthead .brand-text { gap: 2px; }
.masthead .brand-title { color: #fff; font-size: 1.32rem; line-height: 1.13; }
.masthead .brand-case { font-size: .78rem; color: #d2dce3; font-weight: 500; }
.masthead .quick-jump-form { border-color: #51606c; border-radius: 3px; }
.masthead .quick-jump-input { padding: .5rem .7rem; font-size: .88rem; }
.masthead .quick-jump-btn,
.masthead #theme-toggle { min-height: 40px; font-size: .88rem; }
.masthead #theme-toggle { border-color: #51606c; border-radius: 3px; }
.masthead :focus-visible,
.editorial-nav :focus-visible { outline: 2px solid #d8edf9; outline-offset: -3px; }

.editorial-nav-shell {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--editorial-navy);
  border-bottom: 1px solid #42515a;
}

.editorial-nav,
.nav-extra { display: flex; align-items: stretch; }

.editorial-nav { position: relative; gap: .25rem; }
.nav-extra { gap: inherit; }
.editorial-nav .nav-tab,
.editorial-nav .nav-more {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .65rem .95rem;
  color: #d5dfe6;
  min-height: 45px;
  font: 600 .92rem/1.3 var(--font-sans);
  text-decoration: none;
  background: transparent;
  border: 0;
  border-block-end: 3px solid transparent;
  border-radius: 0;
  cursor: pointer;
}

.editorial-nav .nav-tab:hover,
.editorial-nav .nav-more:hover { background: #243b49; color: #fff; }
.editorial-nav .nav-tab.is-active,
.editorial-nav .nav-tab[aria-current="page"],
.editorial-nav .nav-more[aria-expanded="true"],
.editorial-nav:has(.nav-extra [aria-current="page"]) .nav-more {
  color: white;
  background: #304959;
  border-block-end: 3px double #c4d4df;
}

.editorial-nav .nav-more { display: none; }
.nav-chevron {
  width: .48rem;
  height: .48rem;
  border: solid currentColor;
  border-width: 0 0 1.5px 1.5px;
  transform: translateY(-2px) rotate(-45deg);
}

button[aria-expanded="true"] .nav-chevron { transform: translateY(2px) rotate(135deg); }
#view-home { background: var(--editorial-page); }
.editorial-hero {
  background: var(--editorial-paper);
  color: var(--editorial-ink);
  border-bottom: 1px solid var(--editorial-rule);
}

.editorial-hero-grid {
  display: grid;
  grid-template-columns: 1fr minmax(0, .94fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  padding-block: clamp(2.5rem, 4.2vw, 4rem);
}

.editorial-intro { min-width: 0; }
.editorial-docket,
.editorial-date,
.editorial-photo figcaption,
.editorial-simulation p { color: var(--editorial-secondary); }

.editorial-docket {
  margin: 0 0 .8rem;
  font-size: .85rem;
  line-height: 1.55;
  font-weight: 600;
}

.editorial-docket span { margin-inline: .25em; color: var(--editorial-gold); }
.editorial-intro h1 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(3rem, 5vw, 4.55rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.035em;
}

.editorial-lead {
  margin: 1rem 0 .55rem;
  max-width: 34em;
  font-size: clamp(1.06rem, 1.45vw, 1.26rem);
  line-height: 1.58;
}

.editorial-status {
  margin: 0;
  max-width: 36em;
  color: var(--editorial-secondary);
  font-size: .98rem;
  line-height: 1.58;
}

.editorial-status strong { color: var(--editorial-ink); }
.editorial-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.45rem; }
.editorial-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  padding: .66rem 1.15rem;
  min-height: 46px;
  font-weight: 700;
  line-height: 1.4;
  border: 1px solid #1f394b;
  border-radius: 3px;
  text-decoration: none;
}

.editorial-action.primary { color: #fff; background: #1b3547; }
.editorial-action.primary:hover { background: #2b4c61; }
.editorial-action.secondary { color: var(--editorial-ink); border-color: #9ca5a6; }
.editorial-action.secondary:hover { border-color: var(--editorial-ink); }
[data-theme="dark"] .editorial-action.primary { background: #e2c389; color: #15232e; border-color: #e2c389; }
[data-theme="dark"] .editorial-action.primary:hover { background: #f1dbaa; }
.editorial-date { margin: .7rem 0 0; font-size: .84rem; }
.editorial-date time,
.editorial-photo time,
.simulation-estimate bdi { font-variant-numeric: tabular-nums; }
.simulation-estimate bdi { font-family: var(--font-mono); }
.editorial-photo { min-width: 0; margin: 0; }
.editorial-photo img {
  width: 100%;
  aspect-ratio: 16 / 9.6;
  object-fit: cover;
  object-position: center 48%;
  border-radius: 2px;
}

.editorial-photo figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: .1rem .65rem;
  margin-block-start: .52rem;
  font-size: .8rem;
  line-height: 1.55;
}

.editorial-photo a { color: inherit; }
.editorial-photo a:hover { color: var(--editorial-ink); }
.editorial-simulation { padding-block: clamp(1.8rem, 3.6vw, 3rem) 1.4rem; color: var(--editorial-ink); }
.simulation-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 1.25rem;
}

.simulation-heading h2 {
  margin: 0;
  font: 700 clamp(1.9rem, 3.2vw, 2.85rem)/1.2 var(--font-serif);
  letter-spacing: -.03em;
}

.simulation-heading p { margin: .35rem 0 0; max-width: 53em; line-height: 1.6; }
.simulation-heading > a { white-space: nowrap; font-weight: 600; color: var(--editorial-ink); }
.simulation-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.simulation-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(6rem, 11vw, 9.5rem);
  align-items: center;
  gap: clamp(.65rem, 2vw, 1.4rem);
  padding: 1.1rem;
  border: 1px solid var(--editorial-rule);
  border-block-start: 3px double var(--editorial-rule-ink);
  background: var(--editorial-page);
  color: var(--editorial-ink);
  text-decoration: none;
}

.simulation-copy {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-width: 0;
}

.simulation-art {
  width: 100%;
  aspect-ratio: 1;
  background-color: #f8f5ec;
  background-image: url("../assets/images/case-illustrations.webp");
  background-size: 200% 200%;
  background-repeat: no-repeat;
  border-radius: 2px;
}

.simulation-card[data-open-case="case_4000"] .simulation-art { background-position: left top; }
.simulation-card[data-open-case="case_2000"] .simulation-art { background-position: right top; }
.simulation-card[data-open-case="case_1000"] .simulation-art { background-position: left bottom; }
.simulation-card[data-open-case="case_preliminary"] .simulation-art { background-position: right bottom; }

[data-theme="dark"] .simulation-art {
  background-color: #d8cfb9;
  background-blend-mode: multiply;
}

.simulation-card:hover { color: var(--editorial-ink); background: var(--editorial-paper); border-color: var(--editorial-rule-ink); }
.simulation-case { color: var(--editorial-gold); font-size: .84rem; font-weight: 700; }
.simulation-card h3 { margin: .16rem 0 .5rem; font: 700 clamp(1.4rem, 2.1vw, 1.8rem)/1.25 var(--font-serif); }
.simulation-card p { margin: 0; font-size: 1rem; color: var(--editorial-ink); }
.simulation-estimate { font-size: .9rem; line-height: 1.55; color: var(--editorial-secondary); margin-block: .2rem 1rem; }
.simulation-link { margin-block-start: auto; color: var(--editorial-ink); font-size: .88rem; font-weight: 700; }
.simulation-link span { margin-inline-start: .35rem; color: var(--editorial-gold); }
.editorial-details details { border-block: 1px solid var(--editorial-rule); }
.editorial-details summary { cursor: pointer; color: var(--editorial-ink); font-weight: 700; padding: .7rem .1rem; }
.editorial-method { max-width: 73ch; margin-block-end: 1.5rem; font-size: 1rem; line-height: 1.75; color: var(--editorial-secondary); }
#view-home .home-block .block-title { color: var(--editorial-ink); }

@media (max-width: 850px) {
  .editorial-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .editorial-nav .nav-more { display: inline-flex; }
  .editorial-nav .nav-extra {
    display: none;
    position: absolute;
    inset: 100% auto auto 1rem;
    width: min(18rem, calc(100vw - 2rem));
    padding: .35rem;
    background: var(--editorial-navy);
    border: 1px solid #556573;
    box-shadow: 0 .6rem 1.6rem #08111f3b;
    max-height: 65vh;
    overflow: auto;
  }
  .editorial-nav:has(.nav-more[aria-expanded="true"]) .nav-extra { display: grid; }
  .editorial-nav .nav-extra .nav-tab { justify-content: flex-start; }
  .editorial-nav .nav-tab, .editorial-nav .nav-more { font-size: .96rem; min-height: 46px; }
}

@media (max-width: 700px) {
  .masthead-inner { min-height: 56px; }
  .masthead .brand-title { font-size: 1.04rem; }
  .masthead .brand-case { font-size: .74rem; }
  .masthead .brand-seal-img { width: 34px; height: 34px; }
  .masthead #theme-toggle { min-height: 44px; }
  .editorial-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; padding-block: 1.6rem 1.15rem; }
  .editorial-docket { font-size: .81rem; margin-bottom: .5rem; }
  .editorial-intro h1 { font-size: clamp(2.8rem, 9.5vw, 3.7rem); }
  .editorial-lead { margin-top: .7rem; font-size: 1.06rem; }
  .editorial-status { font-size: .94rem; }
  .editorial-actions { margin-top: 1rem; gap: .5rem; }
  .editorial-action.primary { gap: .45rem; }
  .editorial-action { font-size: .95rem; padding-inline: .8rem; }
  .editorial-photo img { max-height: 240px; aspect-ratio: 1.95; }
  .editorial-photo figcaption { font-size: .77rem; }
  .simulation-heading { display: block; }
  .simulation-heading > a { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; }
  .simulation-cards { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
  .simulation-card { grid-template-columns: minmax(0, 1fr) clamp(4.65rem, 22vw, 7rem); }
}

@media (max-width: 480px) {
  .simulation-card { padding: .85rem 1rem; }
  .simulation-card h3 { margin: .12rem 0 .35rem; }
  .simulation-estimate { margin-bottom: .65rem; }
}
@media (max-width: 370px) {
  .editorial-actions { gap: .4rem; }
  .editorial-action { font-size: .9rem; padding-inline: .7rem; gap: .35rem; }
}
