:root {
  --opx-content-max: 720px;
  --opx-wide-max: 1120px;
  --opx-gutter: clamp(16px, 4.5vw, 24px);
  --opx-ink: #15181c;
  --opx-muted: #616973;
  --opx-line: #dfe3e8;
  --opx-table-line: #c8cfd6;
  --opx-table-stripe: #f0f0f0;
  --opx-surface: #f6f7f8;
  --opx-paper: #ffffff;
  --opx-link: #0b57d0;
  --opx-radius: 8px;
}
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--opx-ink); background: var(--opx-paper); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
strong, b { font-weight: 700; font-synthesis: weight; }
a { text-underline-offset: .16em; }
a:focus-visible, summary:focus-visible, input:focus-visible, button:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.opx-site-header { border-bottom: 1px solid var(--opx-line); background: var(--opx-paper); }
.opx-site-header-inner { max-width: var(--opx-wide-max); margin: 0 auto; padding: 18px var(--opx-gutter); }
.opx-site-header .wp-block-site-title { margin: 0; font-size: 1.35rem; letter-spacing: .04em; font-weight: 800; }
.opx-site-header .wp-block-site-title a { color: var(--opx-ink); text-decoration: none; }
.opx-primary-nav ul, .opx-footer-nav ul { display: flex; flex-wrap: wrap; gap: 18px; padding: 0; margin: 0; list-style: none; }
.opx-primary-nav a, .opx-footer-nav a { color: var(--opx-ink); text-decoration: none; font-size: .92rem; }
.opx-primary-nav a:hover, .opx-footer-nav a:hover { text-decoration: underline; }
.opx-nav-mobile { display: none; }
.opx-main { padding: 48px var(--opx-gutter) 72px; }
.opx-article-shell { max-width: var(--opx-content-max); margin: 0 auto; }
.opx-classification { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; font-size: .9rem; font-weight: 700; }
.opx-classification a { color: var(--opx-link); text-decoration: none; }
.opx-article-title { margin: 0 0 18px; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.2; letter-spacing: -.018em; }
.opx-deck { margin: 0 0 18px; color: #30363d; font-size: clamp(1.08rem, 2vw, 1.28rem); line-height: 1.65; }
.opx-article-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 24px; color: var(--opx-muted); font-size: .88rem; }
.opx-featured-image { margin: 0 0 36px; }
.opx-featured-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--opx-radius); }
.opx-article-content { font-size: 1rem; line-height: 1.78; }
.opx-article-content h2 { margin-top: 2.35em; margin-bottom: .72em; font-size: clamp(1.45rem, 2.2vw, 1.8rem); }
.opx-article-content h3 { margin-top: 1.9em; margin-bottom: .65em; font-size: 1.25rem; }
.opx-article-content p, .opx-article-content ul, .opx-article-content ol { margin-top: 0; margin-bottom: 1.35em; }
.opx-article-content .wp-block-table { margin-block: 1.78em; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.opx-article-content table { width: 100%; border-collapse: collapse; table-layout: auto; font-size: 12px !important; line-height: 1.55; }
.opx-article-content th, .opx-article-content td { padding: 8px 10px; border: 1px solid var(--opx-table-line); text-align: start; vertical-align: top; font-size: 12px !important; line-height: 1.55; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.opx-article-content th { font-weight: 700; }
/* OPXpress article tables use the striped treatment by default.
   Keep the row stripe visibly lighter than the grid so structure stays clear. */
.opx-article-content .wp-block-table tbody tr:nth-child(odd) { background: var(--opx-table-stripe); }
.opx-article-content .wp-block-table tbody tr:nth-child(even) { background: var(--opx-paper); }
/* Core Table block adds a heavy thead/tfoot rule. Let the cell grid own every line instead. */
.opx-article-content .wp-block-table,
.opx-article-content .wp-block-table.is-style-stripes { border: 0; }
.opx-article-content .wp-block-table thead { border-bottom: 0; }
.opx-article-content .wp-block-table tfoot { border-top: 0; }
.opx-article-content .wp-block-image { margin-block-end: 1.78em; }
.opx-article-content .wp-block-quote {
  background: #e4eeff;
  padding: .44rem;
}

/* Gutenberg editor parity for article-body tables, images and quotes. */
.editor-styles-wrapper .wp-block-table { margin-block: 1.78em; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.editor-styles-wrapper .wp-block-table table { width: 100%; table-layout: auto; font-size: 12px !important; line-height: 1.55; }
.editor-styles-wrapper .wp-block-table th,
.editor-styles-wrapper .wp-block-table td { border: 1px solid var(--opx-table-line); }
.editor-styles-wrapper .wp-block-table th, .editor-styles-wrapper .wp-block-table td { font-size: 12px !important; line-height: 1.55; padding: 8px 10px; vertical-align: top; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.editor-styles-wrapper .wp-block-table tbody tr:nth-child(odd) { background: var(--opx-table-stripe); }
.editor-styles-wrapper .wp-block-table tbody tr:nth-child(even) { background: var(--opx-paper); }
.editor-styles-wrapper .wp-block-table,
.editor-styles-wrapper .wp-block-table.is-style-stripes { border: 0; }
.editor-styles-wrapper .wp-block-table thead { border-bottom: 0; }
.editor-styles-wrapper .wp-block-table tfoot { border-top: 0; }

/* OPX-DEV-009: keep identifying labels readable, never split company names mid-word. */
.opx-article-content .wp-block-table th:first-child,
.opx-article-content .wp-block-table td:first-child,
.editor-styles-wrapper .wp-block-table th:first-child,
.editor-styles-wrapper .wp-block-table td:first-child {
  white-space: nowrap;
}
/* OPX-DEV-015: fit short numeric columns to their content instead of allowing
   year/rank columns to absorb free space in otherwise full-width tables.
   Detection is based on actual row values (14 locales), not a fixed column index. */
.opx-article-content .wp-block-table .opx-fit-compact,
.editor-styles-wrapper .wp-block-table .opx-fit-compact {
  width: 1%;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
/* Entirely numeric/short tables do not need to fill the article width. */
.opx-article-content .wp-block-table table.opx-table-all-compact,
.editor-styles-wrapper .wp-block-table table.opx-table-all-compact {
  width: max-content;
}
/* Simple tables may fit the viewport. Wide analytical tables keep a comfortable
   minimum reading width, with scrolling contained inside the table only. */
@media (max-width: 680px) {
  .opx-article-content .wp-block-table table,
  .editor-styles-wrapper .wp-block-table table { min-width: 0; }
  .opx-article-content .wp-block-table table.opx-table-wide-reading,
  .editor-styles-wrapper .wp-block-table table.opx-table-wide-reading { min-width: 620px; }
}

/* OPX-DEV-010: visible, accessible table-scroll cues only when narrow AND overflowing. */
.opx-article-content .opx-table-scroll-shell { margin-block: 1.78em; min-width: 0; max-width: 100%; }
.opx-article-content .opx-table-scroll-frame { position: relative; min-width: 0; max-width: 100%; }
.opx-article-content .opx-table-scroll-frame > .wp-block-table { margin: 0; max-width: 100%; }
.opx-table-scroll-fade { position: absolute; top: 0; bottom: 0; width: 20px; z-index: 1; opacity: 0; pointer-events: none; transition: opacity 120ms ease; }
.opx-table-scroll-fade-left { left: 0; background: linear-gradient(to right, rgba(21,24,28,.15), transparent); }
.opx-table-scroll-fade-right { right: 0; background: linear-gradient(to left, rgba(21,24,28,.15), transparent); }
.opx-table-scroll-hint { display: none; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 6px; color: var(--opx-muted); font-size: 11px; line-height: 1.45; }
.opx-table-scroll-arrow { font-size: 15px; font-weight: 700; line-height: 1; }
@media (max-width: 680px) {
  .opx-table-has-overflow .opx-table-scroll-hint { display: flex; }
  .opx-table-more-left .opx-table-scroll-fade-left,
  .opx-table-more-right .opx-table-scroll-fade-right { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .opx-table-scroll-fade { transition: none; }
}

.editor-styles-wrapper .wp-block-image { margin-block-end: 1.78em; }
.editor-styles-wrapper .wp-block-quote {
  background: #e4eeff;
  padding: .44rem;
}
.opx-trust-block, .opx-disclaimer, .opx-article-context { max-width: var(--opx-content-max); margin: 40px auto 0; }
.opx-sources { padding-top: 30px; border-top: 1px solid var(--opx-line); }
.opx-sources h2, .opx-related h2 { margin: 0 0 18px; font-size: 1.35rem; }
.opx-source-groups { display: grid; gap: 1.35rem; }
.opx-source-group { min-width: 0; }
.opx-source-group-title { margin: 0 0 .35rem; font-size: .9rem; line-height: 1.45; font-weight: 700; }
.opx-source-list { margin: 0; padding-inline-start: 1.4rem; }
.opx-source-row { padding: .55rem 0 .62rem .18rem; border-bottom: 1px solid var(--opx-line); }
.opx-source-title { display: inline; }
.opx-source-meta { display: flex; flex-wrap: wrap; gap: .25rem .4rem; margin-top: .16rem; color: var(--opx-muted); }
.opx-source-publisher { font-weight: 500; }
.opx-source-meta-separator { opacity: .7; }
.opx-source-date { color: var(--opx-muted); }
.opx-disclaimer { padding: 16px 18px; border-inline-start: 3px solid var(--opx-line); background: var(--opx-surface); color: var(--opx-muted); font-size: .88rem; }
.opx-disclaimer p { margin: 0; }
.opx-article-context { display: flex; flex-wrap: wrap; gap: 6px 9px; padding-top: 18px; color: var(--opx-muted); font-size: .9rem; }
.opx-context-label { font-weight: 700; color: var(--opx-ink); }
.opx-related { max-width: var(--opx-wide-max); margin: 56px auto 0; padding-top: 30px; border-top: 1px solid var(--opx-line); }
.opx-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.opx-related-card { min-width: 0; }
.opx-related-media { display: block; margin-bottom: 12px; overflow: hidden; border-radius: var(--opx-radius); background: var(--opx-surface); }
.opx-related-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.opx-related-type { margin-bottom: 6px; color: var(--opx-link); font-size: .78rem; font-weight: 700; }
.opx-related-card h3 { margin: 0 0 8px; font-size: 1.08rem; line-height: 1.45; }
.opx-related-card h3 a { color: var(--opx-ink); text-decoration: none; }
.opx-related-card p { margin: 0 0 9px; color: var(--opx-muted); font-size: .9rem; line-height: 1.55; }
.opx-related-card time { color: var(--opx-muted); font-size: .78rem; }
.opx-ad-slot { max-width: var(--opx-wide-max); margin: 32px auto; min-height: 90px; text-align: center; }
.opx-ad-label { margin-bottom: 5px; color: var(--opx-muted); font-size: .68rem; letter-spacing: .04em; }
.opx-site-footer { border-top: 1px solid var(--opx-line); background: var(--opx-surface); }
.opx-site-footer-inner { max-width: var(--opx-wide-max); margin: 0 auto; padding: 36px var(--opx-gutter); }
.opx-footer-brand { margin: 0 0 18px; font-weight: 800; letter-spacing: .04em; }
.opx-footer-copy { margin: 18px 0 0; color: var(--opx-muted); font-size: .78rem; }
.opx-listing { max-width: var(--opx-wide-max); margin: 0 auto; }
.opx-listing .wp-block-post-template { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 28px; list-style: none; padding: 0; }
.opx-listing .wp-block-post-title { font-size: 1.12rem; line-height: 1.45; }
.opx-listing .wp-block-post-title a { color: var(--opx-ink); text-decoration: none; }
.opx-listing .wp-block-post-excerpt { color: var(--opx-muted); font-size: .9rem; }
.opx-listing .wp-block-post-featured-image img { aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--opx-radius); }
@media (max-width: 767px) {
  body { font-size: 17px; }
  .opx-site-header-inner { padding-top: 14px; padding-bottom: 14px; }
  .opx-nav-desktop { display: none; }
  .opx-nav-mobile { display: block; }
  .opx-nav-mobile summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
  .opx-nav-mobile ul { display: grid; gap: 0; margin-top: 8px; border-top: 1px solid var(--opx-line); }
  .opx-nav-mobile li { border-bottom: 1px solid var(--opx-line); }
  .opx-nav-mobile a { display: block; padding: 12px 0; }
  .opx-main { padding-top: 32px; padding-bottom: 52px; }
  .opx-article-title { font-size: clamp(2rem, 9vw, 2.65rem); }
  .opx-featured-image { margin-inline: calc(-1 * var(--opx-gutter)); }
  .opx-featured-image img { border-radius: 0; }
  .opx-related-grid, .opx-listing .wp-block-post-template { grid-template-columns: 1fr; }
  .opx-related { margin-top: 44px; }
}

/* v0.1.2 — runtime image-ratio and narrow-header fixes */
.opx-featured-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--opx-radius);
}
.opx-featured-image img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: inherit;
}

.opx-related-media {
  aspect-ratio: 16 / 9;
}
.opx-related-image {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.opx-listing .wp-block-post-featured-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--opx-radius);
}
.opx-listing .wp-block-post-featured-image img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: inherit;
}

.opx-site-header-inner > * {
  min-width: 0;
}
.opx-site-header .wp-block-search {
  min-width: 0;
  max-width: 360px;
}

@media (max-width: 767px) {
  .opx-site-header-inner {
    gap: 10px 14px;
  }
  .opx-site-header .wp-block-site-title {
    flex: 1 1 auto;
  }
  .opx-primary-nav {
    flex: 0 0 auto;
  }
  .opx-site-header .wp-block-search {
    flex: 1 0 100%;
    width: 100%;
    max-width: none;
    order: 3;
  }
  .opx-site-header .wp-block-search__inside-wrapper {
    width: 100%;
    box-sizing: border-box;
  }
  .opx-site-header .wp-block-search__input {
    min-width: 0;
  }
  .opx-featured-image {
    border-radius: 0;
  }
}

/* v0.1.3 — P3 Discovery / reusable article-card system */
.opx-discovery-header {
  max-width: var(--opx-wide-max);
  margin: 0 auto 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--opx-line);
}
.opx-discovery-eyebrow {
  margin-bottom: 8px;
  color: var(--opx-link);
  font-size: .78rem;
  font-weight: 700;
}
.opx-discovery-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -.018em;
}
.opx-discovery-header p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--opx-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.opx-listing .wp-block-post-template {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 30px;
}
.opx-listing .wp-block-post-template > li {
  min-width: 0;
}
.opx-card {
  height: 100%;
}
.opx-card-media {
  margin: 0 0 14px;
}
.opx-card-media a,
.opx-card-media img {
  display: block;
  width: 100%;
  height: 100%;
}
.opx-card-body {
  min-width: 0;
}
.opx-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin: 0 0 8px;
  color: var(--opx-link);
  font-size: .76rem;
  font-weight: 700;
}
.opx-card-meta a {
  color: inherit;
  text-decoration: none;
}
.opx-card-meta a:hover {
  text-decoration: underline;
}
.opx-listing .opx-card-title {
  margin: 0 0 9px;
  font-size: clamp(1.12rem, 2vw, 1.34rem);
  line-height: 1.42;
}
.opx-listing .opx-card-excerpt {
  margin: 0 0 10px;
  color: var(--opx-muted);
  font-size: .92rem;
  line-height: 1.62;
}
.opx-listing .opx-card-excerpt p {
  margin: 0;
}
.opx-listing .opx-card-date {
  margin: 0;
  color: var(--opx-muted);
  font-size: .78rem;
}

/* The first item on the first homepage page acts as the editorial lead. */
.opx-home-listing .wp-block-post-template > li:first-child {
  grid-column: 1 / -1;
}
.opx-home-listing .wp-block-post-template > li:first-child .opx-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 28px;
  align-items: start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--opx-line);
}
.opx-home-listing .wp-block-post-template > li:first-child .opx-card-media {
  margin: 0;
}
.opx-home-listing .wp-block-post-template > li:first-child .opx-card-title {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.3;
}
.opx-home-listing .wp-block-post-template > li:first-child .opx-card-excerpt {
  font-size: 1rem;
}

.opx-pagination {
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid var(--opx-line);
  font-size: .9rem;
}
.opx-pagination a,
.opx-pagination .current {
  display: inline-flex;
  min-width: 36px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
}

.opx-search-listing .wp-block-post-template {
  display: block;
}
.opx-search-card {
  max-width: 820px;
  padding: 24px 0;
  border-bottom: 1px solid var(--opx-line);
}
.opx-search-card:first-child {
  padding-top: 0;
}
.opx-search-card .opx-card-title {
  margin: 0 0 7px;
  font-size: 1.3rem;
}
.opx-search-card .opx-card-excerpt {
  max-width: 720px;
}
.opx-search-empty {
  max-width: 720px;
  padding: 24px;
  background: var(--opx-surface);
  border-radius: var(--opx-radius);
}

@media (max-width: 767px) {
  .opx-discovery-header {
    margin-bottom: 24px;
    padding-bottom: 18px;
  }
  .opx-discovery-header h1 {
    font-size: 1.75rem;
  }
  .opx-listing .wp-block-post-template {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .opx-home-listing .wp-block-post-template > li:first-child .opx-card {
    display: block;
    padding-bottom: 30px;
  }
  .opx-home-listing .wp-block-post-template > li:first-child .opx-card-media {
    margin-bottom: 14px;
  }
  .opx-home-listing .wp-block-post-template > li:first-child .opx-card-title {
    font-size: 1.45rem;
  }
  .opx-search-card {
    padding: 22px 0;
  }
}

/* v0.1.4 — Institutional / Trust Pages */
.opx-page-shell {
  max-width: var(--opx-content-max);
  margin: 0 auto;
}
.opx-page-title {
  margin: 0 0 28px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  letter-spacing: -.018em;
}
.opx-page-content {
  font-size: 1rem;
  line-height: 1.78;
}
.opx-page-content > :first-child {
  margin-top: 0;
}
.opx-page-content h2 {
  margin-top: 2.25em;
  margin-bottom: .72em;
  font-size: clamp(1.4rem, 2.1vw, 1.75rem);
}
.opx-page-content h3 {
  margin-top: 1.8em;
  margin-bottom: .65em;
  font-size: 1.2rem;
}
.opx-page-content p,
.opx-page-content ul,
.opx-page-content ol {
  margin-top: 0;
  margin-bottom: 1.3em;
}
.opx-page-content li + li {
  margin-top: .35em;
}
.opx-page-updated {
  margin: 42px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--opx-line);
  color: var(--opx-muted);
  font-size: .82rem;
}
.opx-footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 48px;
}
.opx-footer-group-title {
  margin-bottom: 9px;
  color: var(--opx-muted);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.opx-footer-nav .opx-footer-group ul {
  display: grid;
  gap: 8px;
}

@media (max-width: 767px) {
  .opx-page-title {
    margin-bottom: 22px;
    font-size: 2rem;
  }
  .opx-footer-nav {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* v0.1.13 - 14-locale/profile heading system */
:root {
  --opx-font-heading: "Noto Sans Thai", system-ui, sans-serif;
}
body.opx-profile-ltr-latin { --opx-font-heading: "Noto Sans", system-ui, sans-serif; }
body.opx-locale-ja { --opx-font-heading: "Noto Sans JP", "Hiragino Kaku Gothic ProN", system-ui, sans-serif; }
body.opx-locale-zh-cn { --opx-font-heading: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
body.opx-locale-zh-tw { --opx-font-heading: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; }
body.opx-locale-ko { --opx-font-heading: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; }
body.opx-profile-ltr-indic { --opx-font-heading: "Noto Sans Devanagari", system-ui, sans-serif; }
body.opx-profile-rtl-arabic { --opx-font-heading: "Noto Sans Arabic", system-ui, sans-serif; }

/* Publication heading / navigation typography. Body copy intentionally stays on the system stack. */
.opx-site-header .wp-block-site-title,
.opx-primary-nav,
.opx-article-title,
.opx-article-content h2,
.opx-article-content h3,
.opx-sources h2,
.opx-related h2,
.opx-related-card h3,
.opx-discovery-header h1,
.opx-listing .opx-card-title,
.opx-page-title,
.opx-page-content h2,
.opx-page-content h3,
.opx-footer-brand {
  font-family: var(--opx-font-heading);
  font-synthesis: none;
}

.opx-site-header .wp-block-site-title,
.opx-footer-brand { font-weight: 600; letter-spacing: .005em; }
.opx-primary-nav { font-weight: 500; }

/* Golden Article H1 — approved after desktop/mobile runtime QA. */
.opx-article-title {
  font-size: clamp(2rem, 3vw, 2.7rem) !important;
  line-height: 1.28 !important;
  font-weight: 600 !important;
  letter-spacing: 0;
  text-wrap: balance;
}
.opx-article-content h2 {
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  line-height: 1.38;
  font-weight: 600;
  margin-top: 2.3em;
  margin-bottom: .75em;
}
.opx-article-content h3 {
  font-size: clamp(1.08rem, 1.45vw, 1.25rem);
  line-height: 1.42;
  font-weight: 500;
}

/* Sources are a trust/reference layer, intentionally subordinate to the article body. */
.opx-trust-block.opx-sources {
  margin-top: 3.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--opx-line);
}
.opx-sources h2 {
  margin: 0 0 .7rem;
  font-size: 1.08rem;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0;
}
.opx-source-groups { margin-top: .1rem; }
.opx-source-group-title {
  color: var(--opx-ink);
  font-size: .88rem;
  line-height: 1.45;
  font-weight: 700;
}
.opx-source-list { margin-top: 0; }
.opx-source-row {
  font-size: .86rem;
  line-height: 1.5;
}
.opx-source-row::marker {
  color: var(--opx-muted);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}
.opx-source-title {
  font-size: .9rem;
  line-height: 1.52;
  font-weight: 400;
}
.opx-source-meta {
  font-size: .75rem;
  line-height: 1.45;
}
.opx-source-publisher,
.opx-source-date {
  color: var(--opx-muted);
  font-size: inherit;
  line-height: inherit;
  font-weight: 400;
}

/* Discovery/card sizes stay unchanged; multilingual Noto headings use a calmer weight. */
.opx-listing .opx-card-title { font-weight: 600; }

@media (max-width: 640px) {
  .opx-article-title {
    font-size: 1.82rem !important;
    line-height: 1.34 !important;
    letter-spacing: -.01em;
  }
  .opx-article-content h2 {
    font-size: 1.22rem;
    line-height: 1.42;
    margin-top: 2.15em;
  }
  .opx-article-content h3 { font-size: 1.08rem; }
  .opx-trust-block.opx-sources { margin-top: 2.6rem; padding-top: 1rem; }
  .opx-sources h2 { font-size: 1rem; }
  .opx-source-groups { gap: 1.05rem; }
  .opx-source-group-title { font-size: .84rem; }
  .opx-source-list { padding-inline-start: 1.25rem; }
  .opx-source-row { padding-top: .48rem; padding-bottom: .54rem; }
  .opx-source-title { font-size: .86rem; }
}



/* v0.1.19 - compact language switcher + no-scroll menu
 * Keeps the scalable registry-ordered locale menu and routing contract, while
 * tightening the trigger/menu footprint and making the chevron more legible. */
.opx-language-switcher {
  position: relative;
  font-family: var(--opx-font-heading);
  font-size: .84rem;
  line-height: 1.2;
  z-index: 20;
}
.opx-language-switcher details {
  position: relative;
}
.opx-language-switcher summary {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 58px;
  min-height: 36px;
  padding: 0 9px 0 11px;
  cursor: pointer;
  list-style: none;
  color: var(--opx-ink);
  background: var(--opx-paper);
  border: 1px solid #cfd5dc;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(21, 24, 28, .08);
  font-weight: 600;
  user-select: none;
}
.opx-language-switcher summary::-webkit-details-marker { display: none; }
.opx-language-switcher summary:hover {
  border-color: #aeb6bf;
  background: #fbfbfc;
}
.opx-language-switcher summary:focus-visible {
  outline: 3px solid var(--opx-link);
  outline-offset: 2px;
}
.opx-language-switcher details[open] > summary {
  border-color: #9ea7b1;
  box-shadow: 0 2px 6px rgba(21, 24, 28, .12);
}
.opx-language-current-short {
  color: var(--opx-ink);
  font-weight: 600;
  letter-spacing: .02em;
}
.opx-language-chevron {
  color: var(--opx-ink);
  font-size: 1.10rem;
  font-weight: 700;
  line-height: .7;
  transform: translateY(-1px);
  transform-origin: center;
  transition: transform .15s ease;
}
.opx-language-switcher details[open] .opx-language-chevron {
  transform: translateY(1px) rotate(180deg);
}
.opx-language-menu {
  position: absolute;
  z-index: 50;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  display: grid;
  min-width: 186px;
  max-height: none;
  overflow: visible;
  padding: 5px;
  border: 1px solid #d7dce2;
  border-radius: 7px;
  background: var(--opx-paper);
  box-shadow: 0 10px 30px rgba(21, 24, 28, .14);
}
.opx-language-menu a,
.opx-language-menu > span {
  box-sizing: border-box;
  display: block;
  min-height: 33px;
  padding: 7px 9px;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
}
.opx-language-menu a { color: var(--opx-ink); }
.opx-language-menu a:hover,
.opx-language-menu a:focus-visible {
  background: var(--opx-surface);
  color: var(--opx-link);
  text-decoration: none;
}
.opx-language-menu .opx-lang-current {
  background: var(--opx-surface);
  color: var(--opx-ink);
  font-weight: 600;
}
.opx-language-menu .opx-lang-unavailable {
  color: #9aa1a9;
  cursor: default;
}
@media (max-width: 767px) {
  .opx-language-switcher { margin-inline-start: auto; }
  .opx-language-switcher summary {
    min-width: 56px;
    min-height: 36px;
    padding-inline: 10px 8px;
  }
  .opx-language-menu { min-width: 184px; }
}

/* v0.1.7 — language-aware Noto heading system */
.opx-discovery-header h1,
.opx-page-title,
.opx-related h2,
.opx-sources h2,
.opx-related-card h3 {
  font-weight: 600;
  letter-spacing: 0;
}
.opx-language-switcher { font-weight: 500; }
.opx-language-switcher .opx-lang-current { font-weight: 600; }

/* Thai needs more vertical breathing room than Latin, especially at larger sizes. */
html[lang^="th"] .opx-article-title,
html[lang^="th"] .opx-discovery-header h1,
html[lang^="th"] .opx-page-title {
  line-height: 1.34 !important;
  letter-spacing: 0;
}
html[lang^="th"] .opx-listing .opx-card-title,
html[lang^="th"] .opx-article-content h2,
html[lang^="th"] .opx-article-content h3 {
  line-height: 1.48;
  letter-spacing: 0;
}

/* Simplified Chinese: Noto Sans SC with mainland-CN glyph shapes and neutral news/UI metrics. */
html[lang^="zh"] .opx-article-title,
html[lang^="zh"] .opx-discovery-header h1,
html[lang^="zh"] .opx-page-title {
  line-height: 1.34 !important;
  letter-spacing: 0;
}
html[lang^="zh"] .opx-listing .opx-card-title,
html[lang^="zh"] .opx-article-content h2,
html[lang^="zh"] .opx-article-content h3 {
  line-height: 1.46;
  letter-spacing: 0;
}


/* v0.1.12 - Multilingual v2 presentation profiles / RTL hardening */
html[dir="rtl"] body { direction: rtl; }
.opx-profile-rtl-arabic,
.opx-profile-ltr-indic,
.opx-profile-ltr-cjk { font-synthesis: none; }

.opx-profile-ltr-cjk .opx-article-title,
.opx-profile-ltr-cjk .opx-discovery-header h1,
.opx-profile-ltr-cjk .opx-page-title {
  line-height: 1.34 !important;
  letter-spacing: 0;
}
.opx-profile-ltr-cjk .opx-listing .opx-card-title,
.opx-profile-ltr-cjk .opx-article-content h2,
.opx-profile-ltr-cjk .opx-article-content h3 {
  line-height: 1.46;
  letter-spacing: 0;
}
.opx-profile-ltr-indic .opx-article-title,
.opx-profile-ltr-indic .opx-discovery-header h1,
.opx-profile-ltr-indic .opx-page-title {
  line-height: 1.42 !important;
  letter-spacing: 0;
}
.opx-profile-ltr-indic .opx-article-content,
.opx-profile-ltr-indic .opx-listing .opx-card-title {
  line-height: 1.82;
}
.opx-profile-rtl-arabic .opx-article-title,
.opx-profile-rtl-arabic .opx-discovery-header h1,
.opx-profile-rtl-arabic .opx-page-title {
  line-height: 1.48 !important;
  letter-spacing: 0;
}
.opx-profile-rtl-arabic .opx-article-content {
  line-height: 1.95;
}
.opx-profile-rtl-arabic .opx-primary-nav ul,
.opx-profile-rtl-arabic .opx-footer-nav ul,
.opx-profile-rtl-arabic .opx-article-meta,
.opx-profile-rtl-arabic .opx-classification,
.opx-profile-rtl-arabic .opx-article-context {
  direction: rtl;
}
.opx-profile-rtl-arabic input,
.opx-profile-rtl-arabic textarea,
.opx-profile-rtl-arabic select {
  direction: rtl;
  text-align: start;
}
.opx-profile-rtl-arabic input[type="url"],
.opx-profile-rtl-arabic input[type="email"] {
  direction: ltr;
  text-align: start;
}
bdi { unicode-bidi: isolate; }
code, kbd, samp {
  direction: ltr;
  unicode-bidi: isolate;
}


/* v0.1.14 - desktop header overflow hardening for long multilingual menus */
@media (min-width: 768px) {
  .opx-site-header-inner {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto minmax(180px, 280px);
    align-items: center;
    gap: 12px 16px;
  }
  .opx-site-header .wp-block-site-title {
    white-space: nowrap;
  }
  .opx-primary-nav {
    min-width: 0;
  }
  .opx-primary-nav .opx-nav-desktop > ul {
    width: 100%;
    justify-content: flex-start;
    gap: 10px 16px;
  }
  .opx-language-switcher {
    justify-self: end;
    white-space: nowrap;
  }
  .opx-site-header .wp-block-search {
    width: 100%;
    max-width: none;
    min-width: 0;
    justify-self: end;
  }
  .opx-site-header .wp-block-search__inside-wrapper {
    width: 100%;
    box-sizing: border-box;
  }
  .opx-site-header .wp-block-search__input {
    min-width: 0;
  }
}

@media (min-width: 768px) and (max-width: 1120px) {
  .opx-site-header-inner {
    grid-template-columns: auto minmax(0, 1fr) auto minmax(160px, 220px);
    gap: 10px 12px;
  }
  .opx-primary-nav a {
    font-size: .88rem;
  }
  .opx-primary-nav .opx-nav-desktop > ul {
    gap: 8px 12px;
  }
  .opx-language-switcher {
    font-size: .76rem;
  }
}


/* v0.1.15 - resilient two-row desktop header
 * Row 1: brand + primary nav + language switcher
 * Row 2: search, aligned to the logical end.
 * This prevents long localized nav labels from squeezing the logo/search. */
@media (min-width: 768px) {
  .opx-site-header-inner {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between;
    align-items: center;
    gap: 10px 18px;
  }

  .opx-site-header .wp-block-site-title {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .opx-primary-nav {
    flex: 1 1 auto;
    min-width: 0;
  }

  .opx-primary-nav .opx-nav-desktop > ul {
    justify-content: center;
    gap: 18px;
  }

  .opx-language-switcher {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .opx-site-header .wp-block-search {
    order: 10;
    flex: 0 0 100%;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
  }

  .opx-site-header .wp-block-search__inside-wrapper {
    width: min(360px, 100%);
    margin-inline-start: auto;
    box-sizing: border-box;
  }

  .opx-site-header .wp-block-search__input {
    min-width: 0;
  }
}

@media (min-width: 768px) and (max-width: 1120px) {
  .opx-primary-nav .opx-nav-desktop > ul {
    gap: 12px;
  }
  .opx-primary-nav a {
    font-size: .9rem;
  }
}


/* v0.1.16 - search-first resilient publication header
 * Desktop row 1: brand | wide centered search | language
 * Desktop row 2: primary navigation centered independently.
 * Long localized menu labels can wrap without displacing search or brand. */
.opx-site-header-inner {
  max-width: var(--opx-wide-max);
  margin: 0 auto;
  padding: 14px var(--opx-gutter) 12px;
}

@media (min-width: 768px) {
  .opx-site-header-inner {
    display: block !important;
  }

  .opx-site-header-top {
    display: grid !important;
    grid-template-columns: minmax(150px, 1fr) minmax(320px, 620px) minmax(150px, 1fr);
    align-items: center;
    gap: 16px 24px;
    width: 100%;
  }

  .opx-site-header .wp-block-site-title {
    justify-self: start;
    white-space: nowrap;
  }

  .opx-site-header .wp-block-search {
    order: initial;
    justify-self: center;
    width: 100%;
    max-width: 620px;
    min-width: 0;
    margin: 0;
  }

  .opx-site-header .wp-block-search__inside-wrapper {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
  }

  .opx-site-header .wp-block-search__input {
    min-width: 0;
  }

  .opx-language-switcher {
    justify-self: end;
    margin-inline-start: 0;
    white-space: nowrap;
  }

  .opx-site-header-nav-row {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--opx-line);
  }

  .opx-primary-nav {
    width: 100%;
    min-width: 0;
  }

  .opx-primary-nav .opx-nav-desktop > ul {
    width: 100%;
    justify-content: center;
    gap: 10px 24px;
  }
}

@media (min-width: 768px) and (max-width: 1120px) {
  .opx-site-header-top {
    grid-template-columns: minmax(130px, .75fr) minmax(300px, 1.6fr) minmax(110px, .75fr);
    gap: 14px 18px;
  }

  .opx-site-header .wp-block-search {
    max-width: 560px;
  }

  .opx-primary-nav .opx-nav-desktop > ul {
    gap: 8px 18px;
  }

  .opx-primary-nav a {
    font-size: .9rem;
  }
}

@media (max-width: 767px) {
  .opx-site-header-inner {
    display: block !important;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .opx-site-header-top {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 12px;
  }

  .opx-site-header .wp-block-site-title {
    grid-column: 1;
    grid-row: 1;
  }

  .opx-language-switcher {
    grid-column: 2;
    grid-row: 1;
    margin-inline-start: 0;
    justify-self: end;
  }

  .opx-site-header .wp-block-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .opx-site-header-nav-row {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--opx-line);
  }
}


/* v0.1.17 - canonical two-row publication header
 * Row 1: brand | centered wide search | language
 * Row 2: primary navigation, independent from search width.
 * A one-time PHP migration normalizes legacy Site Editor header overrides. */
@media (min-width: 768px) {
  .opx-site-header-inner {
    display: block !important;
    max-width: var(--opx-wide-max);
    margin: 0 auto;
    padding: 16px var(--opx-gutter) 12px;
  }

  .opx-site-header-top {
    display: grid !important;
    grid-template-columns: minmax(150px, 1fr) minmax(360px, 620px) minmax(150px, 1fr);
    align-items: center;
    gap: 16px 24px;
    width: 100%;
  }

  .opx-site-header-top .wp-block-site-logo,
  .opx-site-header-top .wp-block-site-title {
    justify-self: start;
    margin: 0;
  }

  .opx-site-header-top .wp-block-search {
    justify-self: center;
    width: 100%;
    max-width: 620px;
    min-width: 0;
    margin: 0;
  }

  .opx-site-header-top .wp-block-search__inside-wrapper {
    width: 100%;
    box-sizing: border-box;
  }

  .opx-site-header-top .wp-block-search__input {
    min-width: 0;
  }

  .opx-site-header-top .opx-language-switcher {
    justify-self: end;
    margin: 0;
    white-space: nowrap;
  }

  .opx-site-header-nav-row {
    margin-top: 12px;
    padding-top: 0;
    border-top: 0;
  }

  .opx-site-header-nav-row .opx-primary-nav {
    width: 100%;
    min-width: 0;
  }

  .opx-site-header-nav-row .opx-nav-desktop > ul {
    width: 100%;
    justify-content: center;
    gap: 10px 26px;
  }
}

@media (min-width: 768px) and (max-width: 1120px) {
  .opx-site-header-top {
    grid-template-columns: minmax(130px, .8fr) minmax(300px, 1.6fr) minmax(110px, .8fr);
    gap: 14px 18px;
  }
  .opx-site-header-top .wp-block-search { max-width: 560px; }
  .opx-site-header-nav-row .opx-nav-desktop > ul { gap: 8px 18px; }
  .opx-site-header-nav-row .opx-primary-nav a { font-size: .9rem; }
}

@media (max-width: 767px) {
  .opx-site-header-top {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 12px;
  }
  .opx-site-header-top .wp-block-site-logo,
  .opx-site-header-top .wp-block-site-title {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }
  .opx-site-header-top .opx-language-switcher {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    margin: 0;
  }
  .opx-site-header-top .wp-block-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .opx-site-header-nav-row {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--opx-line);
  }
}


/* OPX-DEV-017: bundled JPEG images retain responsive Gutenberg behavior under Speed Toolkit picture wrapping. */
.opx-featured-image picture, .opx-card-media picture, .opx-related-image picture,
.wp-block-image picture { display: block; max-width: 100%; }
.opx-featured-image picture img, .opx-card-media picture img,
.wp-block-image picture img { max-width: 100%; height: auto; }
