/* ==========================================================================
   Company pages — /about/…, /zh-hant/about/… (company/templates/company/).
   Built on the discovery cluster shell (home/css/discovery.css). Colours,
   radii and elevation reference the design tokens only (--ds-*, see
   design-system/AI_RULES.md); spacing sits on the 4px grid and the one real
   breakpoint is desktop 813px.
   ========================================================================== */

.company-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding-top: 24px;
}
@media (min-width: 813px) {
  .company-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
}

/* Section menu: a scrolling chip row on phones, a sticky list on desktop. */
.company-nav__title {
  margin: 0 0 8px;
  color: var(--ds-ink);
  font-family: var(--discovery-font-display);
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
}
.company-nav ul {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0 0 4px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}
.company-nav ul::-webkit-scrollbar { display: none; }
.company-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--ds-line);
  border-radius: 12px;
  background: var(--ds-card);
  color: var(--ds-ink-soft);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 150ms var(--discovery-ease), background-color 150ms var(--discovery-ease),
    border-color 150ms var(--discovery-ease);
}
.company-nav a:hover { color: var(--ds-ink); border-color: var(--ds-brand); }
.company-nav a .material-icons-outlined { font-size: 20px; }
/* Labels on a brand tint take the ink colour (--ds-link drops below AA on a tint). */
.company-nav a[aria-current="page"] {
  border-color: var(--ds-brand);
  background: color-mix(in srgb, var(--ds-brand) 14%, var(--ds-card));
  color: var(--ds-ink);
}
.company-nav a[aria-current="page"] .material-icons-outlined { color: var(--ds-link); }
@media (min-width: 813px) {
  .company-nav { position: sticky; top: 24px; }
  .company-nav ul { flex-direction: column; gap: 4px; padding: 0; overflow: visible; }
  .company-nav a { border-color: transparent; background: transparent; white-space: normal; }
  .company-nav a:hover { background: var(--ds-surface); border-color: transparent; }
  .company-nav a[aria-current="page"] { border-color: transparent; box-shadow: inset 4px 0 0 var(--ds-brand); }
}

/* Staff strip: preview notice and the admin shortcut. */
.company-staff {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--ds-line);
  border-radius: 12px;
  background: var(--ds-card);
  color: var(--ds-ink-soft);
  font-size: 14px;
  line-height: 20px;
}
.company-staff--preview { border-color: var(--ds-warning); color: var(--ds-warning-text); }
.company-staff .discovery-button { margin-left: auto; }

/* Hero */
.company-hero { padding-bottom: 8px; }
.company-hero h1 {
  margin: 0 0 16px;
  font-size: 32px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.company-hero__lead { max-width: 62ch; margin: 0 0 16px; color: var(--ds-ink-soft); font-size: 17px; line-height: 26px; }

.company-article { min-width: 0; }
.company-prose p,
.company-section p { max-width: 68ch; }
.company-prose p { margin: 0 0 16px; }

/* The one-paragraph definition answer engines quote. */
.company-summary {
  max-width: 68ch;
  margin: 8px 0 0;
  padding: 20px 24px;
  border-left: 4px solid var(--ds-brand);
  border-radius: 0 16px 16px 0;
  background: var(--ds-card);
  box-shadow: var(--ds-shadow-card);
  font-size: 17px;
  line-height: 26px;
}

.company-section { padding-top: 40px; }
.company-section > h2 { margin: 0 0 16px; font-size: 24px; line-height: 32px; font-weight: 600; }
.company-note { margin: 12px 0 0; color: var(--ds-ink-soft); font-size: 13px; line-height: 18px; }

/* At-a-glance facts and the legal-entity table. */
.company-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  border: 1px solid var(--ds-card-border);
  border-radius: 16px;
  background: var(--ds-card);
  box-shadow: var(--ds-shadow-card);
  overflow: hidden;
}
.company-facts > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 12px 20px;
  border-top: 1px solid var(--ds-line);
}
.company-facts > div:first-child { border-top: 0; }
.company-facts dt { color: var(--ds-ink-soft); font-size: 13px; line-height: 18px; font-weight: 600; }
.company-facts dd { margin: 0; overflow-wrap: anywhere; }
.company-facts address { font-style: normal; }
.company-page .company-facts a,
.company-page .company-terms a,
.company-page .company-card h3 a,
.company-page .company-person__links a { color: var(--ds-link); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 813px) {
  .company-facts > div { grid-template-columns: 200px minmax(0, 1fr); gap: 16px; }
}

.company-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0 0; }
.company-actions__label { color: var(--ds-ink-soft); font-size: 14px; line-height: 20px; font-weight: 600; }

/* Cards: pillars, commitments, values, products, business areas. */
.company-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 600px) {
  .company-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .company-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.company-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--ds-card-border);
  border-radius: 16px;
  background: var(--ds-card);
  box-shadow: var(--ds-shadow-card);
}
.company-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ds-brand) 14%, var(--ds-card));
  color: var(--ds-link);
}
.company-card h3 { margin: 4px 0 0; font-size: 18px; line-height: 24px; font-weight: 600; }
.company-card p { margin: 0; color: var(--ds-ink-soft); }

/* Vision / mission statements. */
.company-statements { display: grid; gap: 16px; padding-top: 24px; }
@media (min-width: 813px) {
  .company-statements { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.company-statement {
  padding: 24px;
  border: 1px solid var(--ds-card-border);
  border-top: 4px solid var(--ds-brand);
  border-radius: 16px;
  background: var(--ds-card);
  box-shadow: var(--ds-shadow-card);
}
.company-statement p { margin: 0 0 12px; color: var(--ds-ink-soft); }
.company-statement p:last-child { margin-bottom: 0; }
.company-page .company-statement__text {
  color: var(--ds-ink);
  font-family: var(--discovery-font-display);
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
}

/* Live figures. */
.company-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.company-stats li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border-radius: 16px;
  background: var(--ds-card);
  box-shadow: var(--ds-shadow-card);
}
.company-stats strong { font-family: var(--discovery-font-display); font-size: 28px; line-height: 36px; }
.company-stats span { color: var(--ds-ink-soft); font-size: 14px; line-height: 20px; }

/* Key terms. */
.company-terms { display: grid; gap: 12px; margin: 0; }
.company-terms > div { padding: 16px 20px; border-radius: 12px; background: var(--ds-card); border: 1px solid var(--ds-line); }
.company-terms dt { font-weight: 700; }
.company-terms dd { margin: 4px 0 0; color: var(--ds-ink-soft); }

/* FAQ: always visible — answer engines and readers see the same text. */
.company-faq { display: grid; gap: 12px; }
.company-faq__item { padding: 16px 20px; border-radius: 12px; background: var(--ds-card); border: 1px solid var(--ds-line); }
.company-faq__item h3 { margin: 0 0 8px; font-size: 18px; line-height: 24px; font-weight: 600; }
.company-faq__item p { margin: 0; color: var(--ds-ink-soft); }

/* Operating principles. */
.company-principles { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: principle; }
.company-principles li {
  position: relative;
  padding: 16px 20px 16px 64px;
  border-radius: 12px;
  background: var(--ds-card);
  border: 1px solid var(--ds-line);
  counter-increment: principle;
}
.company-principles li::before {
  content: counter(principle);
  position: absolute;
  top: 16px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--ds-brand);
  color: var(--ds-on-cta);
  font-size: 14px;
  font-weight: 700;
}
.company-principles h3 { margin: 0 0 4px; font-size: 18px; line-height: 24px; font-weight: 600; }
.company-principles p { margin: 0; color: var(--ds-ink-soft); }

/* Leadership and board. */
.company-people { display: grid; gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; }
.company-person {
  display: flex;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--ds-card-border);
  border-radius: 16px;
  background: var(--ds-card);
  box-shadow: var(--ds-shadow-card);
}
.company-person__photo {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--ds-surface);
}
.company-person__photo--initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--ds-brand) 14%, var(--ds-card));
  color: var(--ds-link);
  font-family: var(--discovery-font-display);
  font-size: 32px;
  font-weight: 700;
}
.company-person__body { min-width: 0; }
.company-person h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; }
.company-person__latin { color: var(--ds-ink-soft); font-size: 15px; font-weight: 500; }
.company-person__role { margin: 4px 0 12px; color: var(--ds-link); font-weight: 600; }
.company-person p { margin: 0 0 12px; }
.company-person__links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
@media (max-width: 599px) {
  .company-person { flex-direction: column; }
}

/* Document center. */
.company-docs { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.company-docs a {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 12px 20px;
  border: 1px solid var(--ds-line);
  border-radius: 12px;
  background: var(--ds-card);
  color: var(--ds-ink);
  transition: border-color 150ms var(--discovery-ease);
}
.company-docs a:hover { border-color: var(--ds-brand); }
.company-docs a > .material-icons-outlined { margin-left: auto; color: var(--ds-link); }
.company-docs__format {
  flex: none;
  min-width: 52px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--ds-surface);
  color: var(--ds-ink-soft);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}
.company-docs__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.company-docs__text span,
.company-docs__text time { color: var(--ds-ink-soft); font-size: 14px; line-height: 20px; }

@media (prefers-reduced-motion: reduce) {
  .company-nav a,
  .company-docs a { transition: none; }
}
