/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 */
/* Hallmark · macrostructure: cinematic chapters + editorial indexes · tone: assured · anchor hue: royal blue */

html,
body {
  overflow-x: clip !important;
  font-family: var(--font-body) !important;
}

body {
  color: var(--color-ink);
}

h1,
h2,
h3,
h4,
.title-xl,
.news-visual-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-display) !important;
  font-style: normal;
}

a,
button,
input,
[role="tab"] {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[role="tab"]:focus-visible {
  outline: 3px solid var(--color-focus) !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}

a:active,
button:active,
[role="tab"]:active {
  filter: brightness(0.94);
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed !important;
  opacity: 0.55 !important;
  filter: saturate(0.55);
}

.nav a,
.detail-nav a,
.hotline,
.service,
.btn,
.primary-action,
.secondary-action,
.product-family-tab,
.product-model-tab,
.case-filter,
.case-link,
.term-item a {
  white-space: nowrap;
}

.site-header,
.detail-header,
.topbar-inner {
  border-radius: var(--radius-panel) !important;
  box-shadow: 0 12px 32px oklch(38% 0.1 255 / 0.1) !important;
}

.nav,
.detail-nav {
  gap: clamp(10px, 1.35vw, 24px) !important;
}

.nav a,
.detail-nav a {
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out) !important;
}

.btn,
.testimonial-card,
.news-item,
.news-card,
.case-card,
.story-card,
.term-item {
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out) !important;
}

.btn:hover,
.testimonial-card:hover,
.news-item:hover,
.news-card:hover,
.case-card:hover,
.story-card:hover,
.term-item:hover {
  transform: none !important;
}

/* Keep motion only where it communicates the first impression or the 3.0 progression. */
.panel:not(.kv-panel):not(.science-panel) .reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Section hierarchy: Chinese headings carry the page; repeated English eyebrows do not. */
.timeline-panel .section-heading .eyebrow,
.testimonial-panel .section-heading .eyebrow,
.news-panel .section-heading .eyebrow,
.page-hero .eyebrow,
.manual-eyebrow,
.hero-copy .eyebrow {
  display: none !important;
}

.section-heading,
.page-hero {
  text-align: left !important;
}

.section-heading .title-xl,
.section-heading .lead,
.page-hero h1,
.page-hero p {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.section-heading .title-xl,
.page-hero h1 {
  font-size: var(--text-display-small) !important;
  letter-spacing: -0.025em !important;
}

.section-heading .lead,
.page-hero p {
  max-width: 720px !important;
  font-size: var(--text-body) !important;
}

/* The floating navigation is the only glass surface. */
.product-family-nav,
.product-model-nav,
.case-controls,
.hero-tags {
  backdrop-filter: none !important;
  box-shadow: none !important;
  border-color: var(--color-rule) !important;
  background: var(--color-white-glass) !important;
}

/* Honor becomes a flat editorial ledger instead of cards inside a card. */
.honor-ledger {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.award-entry {
  padding: 15px 2px !important;
  border: 0 !important;
  border-bottom: var(--rule-thin) solid var(--color-rule) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.award-entry:last-child {
  border-bottom: 0 !important;
}

/* Testimonials use an editorial rhythm: one lead story and three supporting voices. */
.testimonial-grid {
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 0.88fr)) !important;
  gap: 0 !important;
  border-top: var(--rule-thin) solid var(--color-rule);
  border-bottom: var(--rule-thin) solid var(--color-rule);
}

.testimonial-card {
  border: 0 !important;
  border-right: var(--rule-thin) solid var(--color-rule) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.testimonial-card:last-child {
  border-right: 0 !important;
}

.testimonial-card:first-child h3 {
  font-size: 1.12em !important;
}

.news-item {
  border-width: 0 0 var(--rule-thin) 0 !important;
  border-color: var(--color-rule) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Content pages share a calmer document system. */
.page-hero {
  margin-top: clamp(64px, 8vw, 104px) !important;
  margin-bottom: clamp(40px, 6vw, 72px) !important;
}

.page-hero h1 {
  max-width: 900px !important;
}

.quick-answer,
.term-boundary,
.case-note,
.notice {
  box-shadow: none !important;
}

.case-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr) !important;
  gap: var(--space-6) !important;
}

.case-card,
.story-card,
.news-card,
.term-item,
.guide-item {
  border-color: var(--color-rule) !important;
  border-radius: var(--radius-media) !important;
  box-shadow: none !important;
}

.case-card:nth-child(3n + 1) {
  grid-column: span 2;
}

.term-list {
  gap: 0 !important;
  border-top: var(--rule-thin) solid var(--color-rule);
}

.term-item {
  border-width: 0 0 var(--rule-thin) 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.term-search {
  outline: 0;
  border-radius: var(--radius-control) !important;
  box-shadow: none !important;
}

.manual-heading {
  border-bottom: var(--rule-thin) solid var(--color-rule);
}

@media (min-width: 901px) and (max-width: 1180px) {
  .site-header,
  .detail-header,
  .topbar-inner {
    grid-template-columns: 170px minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  .site-header .service,
  .site-header .hotline,
  .detail-header .back-home,
  .topbar-inner .hotline {
    display: none !important;
  }

  .brand-logo,
  .brand img,
  .detail-logo img {
    width: 132px !important;
  }

  .nav,
  .detail-nav {
    justify-content: flex-end !important;
    font-size: 12px !important;
  }
}

/* Native flow for touch, mobile and short browser windows. */
@media (max-width: 900px), (max-height: 719px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    overflow-x: clip !important;
    overflow-y: auto !important;
    scroll-snap-type: y proximity !important;
    overscroll-behavior-y: auto !important;
    touch-action: pan-y !important;
  }

  .page {
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    transition: none !important;
    position: relative !important;
    overflow: visible !important;
  }

  .panel,
  .kv-panel {
    width: 100% !important;
    height: auto !important;
    min-height: 100svh !important;
    max-height: none !important;
    overflow: clip !important;
    scroll-snap-align: start;
    scroll-snap-stop: normal !important;
    scroll-margin-top: 72px;
  }

  .kv-panel,
  .science-panel,
  .quality-panel {
    height: 100svh !important;
    min-height: 100svh !important;
  }

  .panel-inner {
    height: auto !important;
    min-height: 100svh !important;
  }

  .side-nav,
  .page-meter {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .site-header,
  .detail-header,
  .topbar-inner {
    border-radius: 0 0 var(--radius-panel) var(--radius-panel) !important;
    box-shadow: 0 8px 22px oklch(38% 0.1 255 / 0.1) !important;
  }

  .nav.open,
  .detail-nav.open {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 2px !important;
  }

  .nav.open a,
  .detail-nav.open a {
    justify-content: flex-start !important;
    white-space: nowrap;
  }

  .panel-inner {
    width: min(calc(100% - 28px), 720px) !important;
    padding-top: 92px !important;
    padding-bottom: 36px !important;
  }

  .section-heading {
    width: 100% !important;
    max-width: 620px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .section-heading .title-xl {
    font-size: clamp(1.8rem, 8.4vw, 2.55rem) !important;
    line-height: 1.16 !important;
  }

  .testimonial-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  .testimonial-card {
    border-right: 0 !important;
    border-bottom: var(--rule-thin) solid var(--color-rule) !important;
  }

  .testimonial-card:last-child {
    border-bottom: 0 !important;
  }

  .news-item:nth-child(n + 3) {
    display: grid !important;
  }

  .case-grid,
  .term-list {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .case-card:nth-child(3n + 1) {
    grid-column: auto;
  }

  .term-group-head {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .page-hero,
  .hero.wrap {
    text-align: left !important;
  }

  .page-hero h1,
  .page-hero p {
    max-width: none !important;
  }
}

@media (max-width: 414px) {
  .panel-inner {
    width: calc(100% - 24px) !important;
    padding-top: 84px !important;
  }

  .brand-logo,
  .brand img,
  .detail-logo img {
    width: 128px !important;
  }

  .title-xl,
  .page-hero h1,
  .hero h1,
  #detail-title {
    overflow-wrap: anywhere !important;
    font-size: clamp(1.7rem, 9vw, 2.3rem) !important;
  }

  .product-family-tab,
  .product-model-tab,
  .case-filter {
    min-height: 40px;
    font-size: 12px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 50ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 50ms !important;
  }
}
/* Hallmark - pre-emit critique: P5 H5 E4 S5 R5 V4 - macrostructure: cinematic chapters + editorial indexes - theme: studied-DNA (Bekari brand visuals) - contrast: pass (40-41) - nav: N2 - footer: Ft2 - honest: pass (46) - chrome: pass (47) - responsive/mobile: pass (34, 49-57) */
