/* ============================================================
   YANZ Professional Editorial Layer · 2026-08
   Shared presentation rules for the institutional website.
   Loaded after legacy page styles so old pages inherit one grid.
   ============================================================ */

:root {
  --ink: #13180f;
  --ink-2: #2f382b;
  --slate: #42493f;
  --slate-2: #667063;
  --slate-3: #8d9589;
  --green: #78d64b;
  --green-mid: #62be38;
  --green-deep: #397f20;
  --green-soft: #edf8e7;
  --green-tint: #f6fbf2;
  --paper: #fff;
  --paper-2: #f5f6f1;
  --paper-3: #eceee7;
  --rule: #dfe3da;
  --rule-soft: #ebeee7;
  --rule-strong: #bfc7bb;
  --shadow-soft: 0 14px 40px rgba(19, 24, 15, .08);
}

html { background: var(--paper); }
body {
  color: var(--slate);
  font-size: 16px;
  line-height: 1.72;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
.wrap { width: min(100%, 1376px); max-width: none; padding-inline: clamp(24px, 4vw, 64px); }
.wrap.narrow { width: min(100%, 1040px); }

h1, h2, h3, h4, h5 {
  text-wrap: balance;
  color: var(--ink);
}
h1 { font-size: clamp(2.75rem, 5.45vw, 5.25rem); line-height: .98; letter-spacing: -.052em; font-weight: 650; }
h2 { font-size: clamp(2rem, 3.8vw, 3.35rem); line-height: 1.06; letter-spacing: -.04em; font-weight: 630; }
h3 { line-height: 1.2; }
p { text-wrap: pretty; }

/* Institutional masthead */
.topbar {
  padding: 0;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--rule);
  box-shadow: none;
}
.topbar .inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 3vw, 52px);
  flex-wrap: nowrap;
}
.brand { gap: 15px; min-width: max-content; }
.brand .logo { width: 106px; height: auto; }
.brand .meta { border-color: var(--rule); padding-left: 15px; }
.brand .meta .system { font-size: .8rem; letter-spacing: .035em; }
.brand .meta .sub { font-size: .7rem; }
.topbar nav {
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(13px, 1.45vw, 25px);
  min-width: 0;
}
.topbar nav a {
  padding: 26px 0 23px;
  color: var(--slate);
  font-size: clamp(.79rem, .78vw, .9rem);
  line-height: 1;
  letter-spacing: .01em;
  white-space: nowrap;
  border-bottom-width: 3px;
}
.topbar nav a.active { font-weight: 650; }
.topbar nav a.nav-cta {
  padding-inline: 14px;
  color: var(--ink);
  background: var(--green);
  border: 1px solid var(--green);
}
.topbar nav a.nav-cta:hover { color: var(--ink); background: #83df55; border-color: #83df55; }
.loginbox { margin-left: -24px; }
.login-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: 2px !important;
  padding: 8px 12px !important;
  font-size: .82rem !important;
}
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 2px;
  color: var(--ink);
  background: transparent;
  border: 0;
  font: 650 .82rem/1 var(--font-sans);
  letter-spacing: .04em;
  cursor: pointer;
}
.nav-toggle > span[aria-hidden] { width: 22px; height: 14px; position: relative; border-block: 1.5px solid currentColor; }
.nav-toggle > span[aria-hidden]::after { content: ""; position: absolute; inset: 5px 0 auto; border-top: 1.5px solid currentColor; }

/* Flagship hero: 12-column editorial layout */
.hero { border-bottom: 1px solid var(--rule); }
.hero.dark { padding: clamp(6rem, 10vw, 10.25rem) 0 clamp(5rem, 8vw, 8.25rem); background: var(--ink); }
.hero.dark > .wrap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(18px, 2vw, 30px);
}
.hero.dark > .wrap > * { grid-column: 1 / span 8; }
.hero.dark .eyebrow { margin-bottom: clamp(1.8rem, 3vw, 3rem); color: #aeb7aa; font-size: .76rem; }
.hero.dark h1 { max-width: 12ch; margin-bottom: 2rem; }
.hero.dark .lead { max-width: 65ch; margin: 0; color: #c8cec4; font-size: clamp(1rem, 1.25vw, 1.16rem); }
.hero.dark::before { width: min(44vw, 650px); height: 14px; right: -6vw; top: 37%; }
.hero.dark::after { width: min(34vw, 490px); right: 2vw; top: 24%; }
.hero.compact { padding: clamp(4rem, 7vw, 7rem) 0 clamp(2.75rem, 5vw, 4.75rem); }
.hero.compact h1 { max-width: 15ch; }
.hero.compact .lead { max-width: 62ch; }

.statband-bg { background: var(--green); }
.statband .sb { min-height: 136px; padding: 31px 24px 27px; border-right-color: rgba(19, 24, 15, .18); }
.statband .sb .v { color: var(--ink); font-size: clamp(2.1rem, 3.4vw, 3.4rem); letter-spacing: -.04em; }
.statband .sb .l { color: rgba(19, 24, 15, .74); font-size: .8rem; letter-spacing: .025em; }

/* Editorial spacing and headings */
main { display: block; }
.section { padding: clamp(4.5rem, 8vw, 8.5rem) 0 !important; margin: 0 !important; border-top: 1px solid var(--rule); }
.section:first-child { border-top: 0; }
.section-num, .section-eyebrow, .block-head .tag {
  font-size: .73rem !important;
  line-height: 1.25;
  letter-spacing: .16em !important;
  text-transform: uppercase;
}
.section > h2, .block-head h2 { margin-top: 0 !important; }
.section-subhead { margin-top: 2.25rem; }
.measure { max-width: 60ch; }
.minor-offset { margin-top: .4rem; }
.supporting-copy { color: var(--slate-2); font-size: .94rem; }
.evidence-subhead { margin: 1.8rem 0 .4rem; color: var(--ink); font-size: 1.05rem; }
.evidence-copy { font-size: .96rem; }
.col-metric { width: 88px; }
.scale-subhead { margin: 1.8rem 0 .4rem; color: var(--ink); font-size: 1.05rem; }
.scale-subhead--first { margin-top: 1.6rem; }
.scale-copy { font-size: .92rem; }
.tier-band .tier-1 { background: #a33a32; }
.tier-band .tier-2 { background: #bf6628; }
.tier-band .tier-3 { background: #b98713; }
.tier-band .tier-4 { background: #628f34; }
.tier-band .tier-5 { background: #397f20; }
.tier-band .tier-6 { background: #2e702f; }
.tier-band .tier-7 { background: #235727; }
.tier-text-1 { color: #a33a32; }
.tier-text-3 { color: #b98713; }
.tier-text-5 { color: #397f20; }
.tier-text-7 { color: #235727; }
.ctarow--flush { padding-left: 0 !important; }
.report-level--pre { color: var(--fail); }
.report-level--basic { color: var(--half); }
.report-level--junior { color: var(--green-deep); }
.report-level--senior { color: #235727; }
.statband-frame { margin: 1.4rem 0; border-radius: 0; }
.statband-frame__inner { padding-inline: 1.5rem; }
.block { padding: clamp(4.5rem, 7vw, 7rem) 0 !important; }
.block-head { display: grid; grid-template-columns: 110px minmax(0, 1fr); column-gap: 28px; align-items: start; }
.block-head .num { grid-row: 1 / span 2; font-size: clamp(2.25rem, 4vw, 4rem) !important; color: var(--green-deep); }
.block-head .tag, .block-head h2 { grid-column: 2; }

/* Flat, report-like information modules */
.tile, .board, .rep-big, .m-card, .lvl-card, .five-rep .fr, .eng5 .e,
.annc, .quick a, .rep2 a.card, .gallery img {
  border-radius: 0 !important;
  box-shadow: none !important;
}
.tile, .board, .rep-big, .m-card, .lvl-card { border-color: var(--rule) !important; }
.tile:hover, .board:hover, .rep-big:hover, .quick a:hover, .rep2 a.card:hover { background: var(--green-tint); border-color: var(--green-deep) !important; }
.card-grid, .two-rep, .m-grid { gap: clamp(16px, 2vw, 28px); }
.vi-cards, .contact-grid, .mini-grid, .metric-grid, .who-grid, .rep-grid4, .subj-grid { border-radius: 0 !important; }
.note, .infobox, .callout { background: var(--paper-2); border-left-color: var(--green-deep); }
.btn { border-radius: 2px !important; min-height: 42px; }
.btn.primary { background: var(--ink) !important; border-color: var(--ink) !important; }

table { border-top: 2px solid var(--ink); }
thead th { padding: 13px 15px; color: var(--ink); background: var(--paper-2); }
tbody td { padding: 15px; }

/* Homepage legacy components, normalized without changing content. */
.annbar { margin-top: 48px !important; gap: 24px !important; }
.annc { padding: 25px 28px !important; }
.annc .tag { border-radius: 2px !important; }
.quick { gap: 1px !important; background: var(--rule); border: 1px solid var(--rule); }
.quick a { min-height: 92px; justify-content: center; border: 0 !important; background: var(--paper) !important; }
.boards { gap: 1px !important; background: var(--rule); border: 1px solid var(--rule); }
.board { min-height: 246px; padding: 25px 24px !important; border: 0 !important; border-top: 3px solid var(--green) !important; }
.board .bt { font-size: 1.18rem !important; }
.board .bcta { margin-top: auto !important; padding-top: 20px; }
.rep2 { gap: 24px !important; }
.rep2 a.card { border-color: var(--rule) !important; }
.rep2 .ch { padding: 24px 25px 8px !important; }
.rep2 .shots { overflow: hidden; padding: 18px 25px 25px !important; }
.rep2 .shots img { border-radius: 0 !important; box-shadow: none !important; }
.section-intro { margin-top: clamp(4.75rem, 7vw, 7rem); }
.section-intro__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 22px; border-bottom: 1px solid var(--ink); padding-bottom: 18px; }
.section-intro__title { margin: 0 !important; font-size: clamp(1.75rem, 2.9vw, 2.75rem) !important; }
.section-intro__meta { max-width: 55ch; color: var(--slate-2); font-size: .82rem; text-align: right; }
.editorial-space { margin-top: clamp(4rem, 6vw, 6rem); }

.feature-case { display: block; color: inherit; border: 0 !important; }
.feature-case__canvas { position: relative; overflow: hidden; padding: clamp(34px, 5vw, 68px); color: #fff; background: var(--ink); }
.feature-case__graphic { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.feature-case__content { position: relative; z-index: 2; max-width: 66ch; }
.feature-case__eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; color: var(--green); font-size: .76rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.feature-case__eyebrow::before { content: ""; width: 34px; border-top: 2px solid currentColor; }
.feature-case__title { margin: 0 0 .65em !important; color: #fff; font-size: clamp(2rem, 3.8vw, 3.5rem) !important; }
.feature-case__title span { color: var(--green); }
.feature-case__copy { margin: 0 0 1.8rem; color: #c8cec4; font-size: 1.04rem; }
.feature-case__copy b { color: #fff; }
.feature-case__metrics { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 28px; border-block: 1px solid #364033; }
.feature-case__metric { padding: 19px 20px; border-right: 1px solid #364033; }
.feature-case__metric:first-child { padding-left: 0; }
.feature-case__metric:last-child { border-right: 0; }
.feature-case__metric strong { display: block; color: var(--green); font-size: 1.5rem; line-height: 1.1; }
.feature-case__metric span { display: block; margin-top: 5px; color: #aeb7aa; font-size: .76rem; }
.feature-case__action { display: inline-flex; color: #fff; font-weight: 650; }
.feature-case__action::after { content: "  →"; color: var(--green); white-space: pre; }
.feature-case__aside { margin-left: 20px; color: #aeb7aa; font-size: .84rem; }

.demo-banner { display: flex; align-items: center; gap: 24px; padding: 27px 30px; color: #fff; background: var(--ink); border-top: 3px solid var(--green); }
.demo-banner__copy { flex: 1; min-width: 0; }
.demo-banner__eyebrow { color: var(--green); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.demo-banner__title { margin: 4px 0; color: #fff; font-size: 1.28rem; font-weight: 700; }
.demo-banner__text { color: #bdc7b9; font-size: .86rem; }
.demo-banner__action { color: var(--green); font-weight: 700; white-space: nowrap; }

/* Sitemap and utility pages */
.map-list { gap: 0 !important; }
.map-list li { min-height: 132px; padding: 24px 26px !important; border-bottom: 1px solid var(--rule); }
.utility-page { min-height: calc(100vh - 76px); display: grid; align-items: center; padding-block: 64px; }
.utility-panel { display: grid; grid-template-columns: minmax(0, 7fr) minmax(220px, 3fr); gap: 40px; align-items: end; padding-block: 48px; border-block: 1px solid var(--ink); }
.utility-code { color: var(--green-deep); font-size: clamp(4rem, 12vw, 10rem); font-weight: 650; line-height: .8; letter-spacing: -.06em; }

footer { margin-top: 0; padding: clamp(3rem, 6vw, 5.5rem) 0 2.5rem; background: var(--ink); }
footer .inner { grid-template-columns: minmax(240px, 4fr) minmax(0, 8fr); gap: clamp(40px, 8vw, 120px); }
footer .brand .logo { filter: brightness(0) invert(1); }

@media (max-width: 1120px) {
  .topbar .inner { grid-template-columns: minmax(0, 1fr) auto; gap: 18px; }
  .topbar.nav-enhanced .nav-toggle { display: inline-flex; justify-self: end; }
  .topbar.nav-enhanced nav,
  .topbar.nav-enhanced .loginbox { display: none; }
  .topbar.nav-enhanced.is-open .inner { padding-bottom: 22px; }
  .topbar.nav-enhanced.is-open nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-self: stretch;
    gap: 0;
    border-block: 1px solid var(--rule);
  }
  .topbar.nav-enhanced.is-open nav a {
    padding: 15px 10px;
    border-bottom: 1px solid var(--rule-soft);
    font-size: .88rem;
  }
  .topbar.nav-enhanced.is-open nav a.nav-cta { margin: 7px 0; padding: 9px 12px; align-self: center; }
  .topbar.nav-enhanced.is-open .loginbox { grid-column: 1 / -1; display: flex; margin: 0; }
  .hero.dark > .wrap > * { grid-column: 1 / span 9; }
}

@media (max-width: 760px) {
  .wrap, .wrap.narrow, .wrap.wide { padding-inline: 20px; }
  .topbar { padding: 0; }
  .topbar .inner { min-height: 66px; }
  .brand { padding: 0; }
  .brand .logo { width: 92px; height: auto; }
  .topbar.nav-enhanced.is-open nav { grid-template-columns: 1fr 1fr; }
  .topbar.nav-enhanced.is-open nav a { white-space: normal; }
  .hero.dark { padding: 5.5rem 0 4.75rem; }
  .hero.dark > .wrap { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .hero.dark > .wrap > * { grid-column: 1 / -1; }
  .hero.dark h1 { max-width: 11ch; font-size: clamp(2.6rem, 13vw, 4rem); }
  .hero.dark::before { width: 360px; right: -180px; top: 38%; opacity: .6; }
  .hero.dark::after { width: 280px; right: -110px; top: 29%; opacity: .45; }
  .statband .sb { min-height: 112px; padding: 23px 16px; }
  .statband .sb:first-child { padding-left: 0; }
  .statband .sb:nth-child(2n) { padding-right: 0; }
  .section { padding-block: 4.75rem !important; }
  .block { padding-block: 4rem !important; }
  .block-head { grid-template-columns: 52px minmax(0, 1fr); gap: 14px; }
  .block-head .num { font-size: 2rem !important; }
  .section-intro__head { display: block; }
  .section-intro__meta { margin-top: 8px; text-align: left; }
  .feature-case__canvas { padding: 34px 24px; }
  .feature-case__metrics { grid-template-columns: 1fr 1fr; }
  .feature-case__metric { padding: 15px 12px; border-bottom: 1px solid #364033; }
  .feature-case__metric:nth-child(2) { border-right: 0; }
  .feature-case__metric:nth-child(3) { padding-left: 0; border-bottom: 0; }
  .feature-case__metric:nth-child(4) { border-right: 0; border-bottom: 0; }
  .feature-case__aside { display: block; margin: 12px 0 0; }
  .demo-banner { align-items: flex-start; flex-direction: column; padding: 24px 22px; }
  .rep2 .shots { overflow-x: auto; }
  .rep2 .shots img { flex: 0 0 auto; }
  .utility-page { min-height: calc(100vh - 66px); }
  .utility-panel { grid-template-columns: 1fr; gap: 28px; }
  footer .inner { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .topbar.nav-enhanced.is-open nav { grid-template-columns: 1fr; }
  .feature-case__metrics { grid-template-columns: 1fr; }
  .feature-case__metric { padding-inline: 0; border-right: 0; border-bottom: 1px solid #364033 !important; }
  .feature-case__metric:last-child { border-bottom: 0 !important; }
}

@media print {
  .nav-toggle { display: none !important; }
  .topbar nav { display: none !important; }
  .hero::before, .hero::after { display: none; }
}
