/* Keyuan identity, editorial pages and shared navigation. */
.keyuan-site {
  --ky-header-height: 84px;
  --ky-blue: #1259ac;
  --ky-deep: #103353;
  --ky-muted: #536b80;
  --ky-line: #d8e3ec;
  color: var(--ky-deep);
}
.keyuan-site .site-header { height: var(--ky-header-height); z-index: 60 }
.keyuan-site .site-header .header-inner { height: 100%; gap: clamp(16px, 1.8vw, 32px); width: min(1500px, calc(100% - 5vw)) }
.ky-wordmark { display: inline-flex; align-items: center; gap: 10px; flex: none; color: #123b68; white-space: nowrap }
.ky-wordmark img { height: 48px; width: auto; object-fit: contain }
.ky-wordmark strong { font-size: clamp(24px, 1.95vw, 30px); line-height: 1.2; font-weight: 750; letter-spacing: .035em }
.keyuan-site .site-header #main-nav { gap: clamp(14px, 1.45vw, 26px); margin-inline: auto }
.keyuan-site #main-nav > a, .ky-nav-section > summary { font-size: 16px; font-weight: 600; letter-spacing: 0; color: #253e56 }
.ky-nav-section { position: relative; height: 100% }
.ky-nav-section > summary { height: 100%; display: flex; align-items: center; gap: 7px; cursor: pointer; list-style: none }
.ky-nav-section > summary::-webkit-details-marker, .keyuan-site .member-dropdown > summary::-webkit-details-marker { display: none }
.ky-nav-section > summary::after { content: ''; border: solid currentColor; border-width: 0 1.5px 1.5px 0; width: 6px; height: 6px; transform: translateY(-2px) rotate(45deg) }
.ky-nav-section[open] > summary::after { transform: translateY(2px) rotate(225deg) }
.ky-nav-section[open] > summary, .ky-nav-section.is-current > summary, .keyuan-site #main-nav > a.active { color: var(--ky-blue) }
.ky-nav-section.is-current::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--ky-blue) }
.ky-nav-panel { position: absolute; top: 100%; left: -20px; width: max-content; min-width: 186px; padding: 8px; border: 1px solid var(--ky-line); border-top: 3px solid var(--ky-blue); background: white; box-shadow: 0 15px 30px #1336561a; max-height: calc(100dvh - var(--ky-header-height) - 10px); overflow-y: auto }
.ky-nav-panel a { display: block; padding: 8px 13px; color: #263e55; font-size: 15px; line-height: 1.55 }
.ky-nav-panel a:is(:hover,:focus-visible) { background: #eef5fc; color: var(--ky-blue) }
.keyuan-site .member-dropdown > summary { border: 1px solid #c8d6e5; border-radius: 3px; padding: 7px 13px; line-height: 1.5; font-size: 14px; color: var(--ky-blue); cursor: pointer }
.keyuan-site :focus-visible { outline: 2px solid #1161d2; outline-offset: 3px }
.keyuan-site .page-hero { min-height: 0; height: clamp(240px, 23vw, 340px); display: flex; align-items: center }
.keyuan-site .page-hero > .wrap { padding-block: 24px }
.keyuan-site .page-hero .breadcrumbs { margin: 0 0 20px }
.keyuan-site .page-hero .hero-corner { display: none }
.keyuan-site .page-hero .eyebrow { font-size: 12px; letter-spacing: .15em }
.keyuan-site .page-hero h1 { font-size: clamp(34px,3.3vw,53px); line-height: 1.24; overflow-wrap: anywhere }
.keyuan-site .page-hero > .wrap > p:not(.eyebrow) { max-width: 64ch }
.keyuan-site .wrap { --wrap: 1320px }
.ky-section-nav { position: sticky; top: var(--ky-header-height); background: #fff; border-bottom: 1px solid var(--ky-line); z-index: 12 }
.ky-section-nav .wrap { display: flex; gap: clamp(16px,3vw,48px); overflow: auto; scrollbar-width: thin }
.ky-section-nav a { display: flex; align-items: center; padding-block: 12px; min-height: 50px; white-space: nowrap; font-size: 16px; border-bottom: 3px solid transparent }
.ky-section-nav a[aria-current], .ky-section-nav a:hover { border-color: var(--ky-blue); color: var(--ky-blue) }
.ky-home-hero { position: relative; display: flex; align-items: center; min-height: clamp(410px, 40vw, 610px); isolation: isolate; color: white; background: #27455d }
.ky-home-hero > img, .ky-home-hero::after { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1 }
.ky-home-hero > img { object-fit: cover; object-position: center 54% }
.ky-home-hero::after { content: ''; background: linear-gradient(90deg,#0b273dd1 0%,#103048a8 31%,#123a491a 72%) }
.ky-home-hero > .wrap { padding-block: clamp(50px,7vw,108px) }
.ky-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .18em; margin: 0 0 18px; line-height: 1.4 }
.ky-home-hero h1 { font-size: clamp(44px,5.7vw,86px); line-height: 1.15; font-weight: 680; color: white; letter-spacing: .025em }
.ky-home-intro { font-size: clamp(16px,1.35vw,22px); color: #f2f8ff; line-height: 1.85; margin: 22px 0 30px }
.ky-hero-button { display: inline-block; background: #fff; color: #124677; padding: 12px 20px; font-weight: 700; border-radius: 2px }
.ky-hero-button:hover { background: #e8f2fc }
.ky-band, .ky-process-feature { padding-block: clamp(52px,6vw,90px) }
html:has(.ky-section-nav) { scroll-padding-top: 0 }
.ky-section-nav ~ .ky-band[id] { scroll-margin-top: calc(var(--ky-header-height) + 49px) }
.ky-section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-bottom: clamp(20px,2.6vw,38px) }
.keyuan-site .ky-section-head h2, .ky-company-line h2, .ky-process-feature h2 { color: var(--ky-deep); font-size: clamp(28px,3vw,45px); letter-spacing: -.025em; line-height: 1.3 }
.ky-family-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(16px,2vw,30px) }
.ky-family-card { display: block; padding-bottom: 16px; border-bottom: 1px solid var(--ky-line) }
.ky-family-card > div { overflow: hidden; background: #f4f6f8; aspect-ratio: 4/3 }
.ky-family-card img { width: 100%; height: 100%; object-fit: contain; background: white; transition: transform .3s }
.ky-family-card:hover img { transform: scale(1.035) }
.ky-family-card h3 { color: var(--ky-deep); font-size: clamp(19px,1.6vw,26px); margin: 16px 0 3px }
.ky-family-card p, .ky-readings p, .ky-editorial p, .ky-company-line p, .ky-lead-copy, .ky-milestone p { color: var(--ky-muted); line-height: 1.9 }
.ky-family-card p { font-size: 14px }
.ky-process-feature { background: #103657; color: white }
.ky-process-feature .wrap, .ky-editorial, .ky-company-line .wrap { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); align-items: center; gap: clamp(28px,6vw,96px) }
.ky-process-feature h2 { color: #fff }
.ky-process-feature p:not(.ky-eyebrow) { color: #d5e4f0; font-size: 17px; line-height: 1.95; margin: 24px 0 }
.ky-process-feature .text-link { color: #fff; border-color: #8faeca }
.ky-process-feature figure, .ky-editorial figure, .ky-article figure { margin: 0 }
.ky-process-feature figure img, .ky-editorial img { width: 100%; max-height: 420px; object-fit: contain; background: #edf2f6; display: block }
.ky-process-feature figure img { background: #0a2032 }
.keyuan-site figcaption { font-size: 12px; margin-top: 8px; color: var(--ky-muted) }
.ky-process-feature figcaption { color: #b5cddd }
.ky-scenarios, .ky-readings { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(20px,2.3vw,36px) }
.ky-scenarios a { display: block; position: relative; background: #152c43; overflow: hidden }
.ky-scenarios img { width: 100%; aspect-ratio: 1.58; object-fit: cover; display: block }
.ky-scenarios span { display: grid; gap: 2px; padding: 15px 20px 18px; background: #eaf1f7 }
.ky-scenarios strong { font-size: 22px; color: var(--ky-deep) }
.ky-scenarios small { font-size: 14px; color: var(--ky-muted) }
.ky-company-line, .ky-section-nav ~ .ky-band:nth-of-type(odd) { background: #f2f6fa }
.ky-company-line p, .ky-editorial p, .ky-lead-copy, .ky-article p { font-size: clamp(16px,1.2vw,19px) }
.ky-company-line .text-link, .ky-editorial .text-link { margin-top: 20px }
.ky-readings > a { display: grid; grid-template-columns: 96px minmax(0,1fr); align-items: start; gap: 16px; border-top: 1px solid var(--ky-line); padding-top: 18px }
.ky-readings img { width: 96px; aspect-ratio: 1; object-fit: cover }
.ky-readings h3 { font-size: 19px; line-height: 1.45; margin-bottom: 9px }
.ky-readings p { font-size: 14px }
.ky-editorial h3, .ky-milestone h3 { font-size: clamp(21px,2vw,29px); line-height: 1.5; margin-bottom: 14px }
.ky-editorial p + p { margin-top: 12px }
.ky-actions { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 22px }
.ky-lead-copy { max-width: 62em }
.ky-milestone { display: grid; grid-template-columns: minmax(160px,.42fr) 1fr; border-top: 1px solid var(--ky-line); padding-top: 24px; gap: 20px }
.ky-milestone time { font-size: clamp(26px,3vw,42px); color: var(--ky-blue) }
.ky-milestone .text-link { margin-top: 12px }
.ky-process-steps { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); padding: 0; margin: 0; gap: 20px; counter-reset: stage; list-style: none }
.ky-process-steps li { border-top: 2px solid #a6c2de; padding-top: 10px; counter-increment: stage }
.ky-process-steps li::before { content: counter(stage, decimal-leading-zero); display: block; font-size: 14px; color: var(--ky-blue); margin: 0 0 12px }
.ky-process-steps strong { font-size: 20px }
.ky-process-steps p, .ky-spec-list dd { color: var(--ky-muted) }
.ky-spec-list { max-width: 900px; margin: 0 }
.ky-spec-list > div { display: grid; grid-template-columns: 165px 1fr; gap: 15px; padding: 14px 0; border-top: 1px solid var(--ky-line) }
.ky-spec-list dt { font-weight: 650 }
.ky-spec-list dd { margin: 0 }
.ky-article { max-width: 840px; padding-block: clamp(42px,6vw,86px) }
.keyuan-site .ky-article h2 { font-size: clamp(23px,2vw,32px); margin: 34px 0 10px }
.ky-article p { color: var(--ky-muted); line-height: 1.95 }
.ky-article figure { margin-block: 24px; width: min(100%,560px) }
.ky-article figure img { max-height: 310px; width: 100%; object-fit: contain; background: #f3f6f9 }
@media(max-width:1199px) {
  .keyuan-site { --ky-header-height: 72px }
  .keyuan-site .site-header #main-nav { top: 100%; margin: 0; max-height: calc(100dvh - var(--ky-header-height)); overflow-y: auto; padding: 8px max(4vw,20px) 18px; }
  .keyuan-site .site-header #main-nav.is-open { display: block }
  .keyuan-site #main-nav > a, .ky-nav-section > summary { display: flex; align-items: center; justify-content: space-between; min-height: 45px; padding: 10px 0; border-bottom: 1px solid var(--ky-line); line-height: 1.5; font-size: 16px }
  .ky-nav-section { height: auto }
  .ky-nav-section.is-current::after { display: none }
  .ky-nav-panel { position: static; width: 100%; min-width: 0; padding: 4px 10px 10px; max-height: none; box-shadow: none; border: none; background: #f4f7fb }
  .ky-nav-panel a { padding: 10px 12px }
  .ky-readings > a { grid-template-columns: 1fr }
  .ky-readings img { width: 100%; max-height: 140px; object-fit: contain; background: #f2f5f8 }
}
@media(max-width:767px) {
  .keyuan-site { --ky-header-height: 64px }
  .keyuan-site .site-header .header-inner { width: calc(100% - 36px) }
  .ky-wordmark { gap: 8px }
  .ky-wordmark img { height: 38px }
  .ky-wordmark strong { font-size: 22px }
  .keyuan-site .page-hero { height: auto; min-height: 220px }
  .keyuan-site .page-hero h1 { font-size: clamp(30px,6.7vw,40px) }
  .ky-home-hero { min-height: 395px }
  .ky-home-hero > img { object-position: 54% center }
  .ky-home-hero::after { background: linear-gradient(90deg,#102f48bd,#18395152) }
  .ky-home-hero h1 { font-size: clamp(39px,9.5vw,57px) }
  .ky-home-intro { font-size: 16px }
  .ky-family-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 14px }
  .ky-family-card p { font-size: 12px }
  .ky-process-feature .wrap, .ky-editorial, .ky-company-line .wrap, .ky-milestone { grid-template-columns: 1fr; gap: 24px }
  .ky-scenarios, .ky-readings, .ky-process-steps { grid-template-columns: 1fr }
  .ky-scenarios a { display: grid; grid-template-columns: minmax(100px,.8fr) 1fr; background: #eaf1f7 }
  .ky-scenarios img { height: 100%; aspect-ratio: 1.4 }
  .ky-scenarios span { padding: 12px; align-content: center }
  .ky-readings > a { grid-template-columns: 84px minmax(0,1fr) }
  .ky-readings img { height: 84px; object-fit: cover }
  .ky-readings h3 { font-size: 18px }
  .ky-process-steps { gap: 10px }
  .ky-process-steps li { display: grid; grid-template-columns: 30px 1fr; column-gap: 9px }
  .ky-process-steps li::before { margin: 3px 0 }
  .ky-process-steps p { grid-column: 2 }
  .ky-spec-list > div { grid-template-columns: minmax(72px,.36fr) 1fr }
  .ky-section-nav a { font-size: 14px; min-height: 44px }
}
@media(prefers-reduced-motion: reduce) {
  .ky-family-card img { transition: none }
}
