/* Website 83 editorial redesign — 2026-08-04 */

:root {
  --page-max: 78rem;
  --reading-max: 64rem;
  --card-border: color-mix(in srgb, var(--border) 72%, white);
  --soft-shadow: 0 16px 44px rgba(24, 48, 42, .09);
}

body {
  background:
    radial-gradient(circle at 85% 8%, rgba(47, 102, 112, .08), transparent 28rem),
    var(--paper);
}

.container {
  width: min(100% - 2.5rem, var(--page-max));
}

.site-header {
  position: sticky;
  top: 0;
  border-color: rgba(94, 107, 102, .2);
}

.language-switcher {
  display: flex;
  min-height: 2.65rem;
  align-items: center;
  justify-content: flex-end;
  padding-block: .45rem;
  border-bottom: 1px solid rgba(94, 107, 102, .16);
  font-size: .84rem;
}

.language-switcher a {
  font-weight: 750;
  text-decoration: none;
}

.section {
  padding-block: clamp(3.25rem, 5.5vw, 5rem);
}

.home-page .hero {
  min-height: auto !important;
  padding-block: clamp(3rem, 6vw, 5.75rem) !important;
}

.home-page .hero__grid {
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(22rem, .95fr);
}

.home-page .hero h1 {
  max-width: 11ch;
  margin-bottom: 1.15rem;
  font-size: clamp(3rem, 5.3vw, 4.8rem);
  letter-spacing: -.035em;
}

.home-page .hero__copy > .lede {
  max-width: 38rem;
  font-size: clamp(1.05rem, 1.4vw, 1.24rem);
}

.home-page .hero__image-frame {
  border-radius: 1.4rem .35rem 1.4rem .35rem;
  box-shadow: 0 24px 70px rgba(24, 48, 42, .16);
}

.home-page .source-strip {
  margin-top: 0;
  padding-block: 1rem;
}
.az-home-page .tool-hero {
  padding-block: clamp(3rem, 7vw, 6rem);
  background:
    radial-gradient(circle at 82% 28%, color-mix(in srgb, var(--brass) 18%, transparent) 0 9rem, transparent 9.1rem),
    linear-gradient(135deg, var(--paper), color-mix(in srgb, var(--paper-deep) 72%, white));
}

.az-home-page .tool-hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(24rem, .86fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.az-home-page .tool-hero h1 {
  max-width: 13ch;
  font-size: clamp(3.2rem, 5.8vw, 5.55rem);
  line-height: .98;
}

.az-home-page .az-home-hero__visual {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 1.4rem .35rem 1.4rem .35rem;
  background: var(--paper-deep);
  box-shadow: 0 24px 70px rgba(24, 48, 42, .18);
}

.az-home-page .az-home-hero__visual img {
  width: 100%;
  height: clamp(23rem, 34vw, 32rem);
  object-fit: cover;
}

.az-home-page .az-home-hero__visual figcaption {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  padding: .75rem .9rem;
  color: var(--white);
  background: rgba(24, 48, 42, .88);
  border-radius: .55rem;
  font-size: .78rem;
}

.az-home-page .tool-hero + .section .calculator-layout {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  max-width: 58rem;
}

.library-v2 {
  background:
    linear-gradient(180deg, rgba(232, 223, 207, .35), rgba(255, 253, 248, .84));
}

.library-intro {
  display: grid;
  max-width: 64rem;
  gap: .8rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.library-intro h2 {
  max-width: 22ch;
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.65rem);
}

.library-intro .lede {
  max-width: 48rem;
  margin: 0;
}

.featured-grid {
  display: grid;
  gap: 1.15rem;
  margin-bottom: clamp(3rem, 5vw, 4.5rem);
}

.feature-story {
  display: grid;
  overflow: hidden;
  min-width: 0;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  box-shadow: var(--soft-shadow);
}

.feature-story__media {
  overflow: hidden;
  background: var(--paper-deep);
}

.feature-story img {
  width: 100%;
  height: 100%;
  min-height: 15rem;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform .35s ease;
}

.feature-story:hover img {
  transform: scale(1.018);
}

.feature-story__body {
  display: grid;
  align-content: start;
  gap: .7rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
}

.feature-story__number,
.library-group__count {
  color: var(--terracotta);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.feature-story__body h3,
.compact-story h3 {
  margin: 0;
  font-family: var(--font-body);
  letter-spacing: -.015em;
}

.feature-story__body h3 {
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  line-height: 1.22;
}

.feature-story__body h3 a,
.compact-story h3 a {
  color: inherit;
  text-decoration: none;
}

.feature-story__body h3 a:hover,
.compact-story h3 a:hover {
  color: var(--terracotta);
}

.feature-story__body p,
.compact-story p {
  margin: 0;
}

.feature-story__meta,
.compact-story__meta {
  color: var(--terracotta);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.library-groups {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}

.library-group {
  display: grid;
  gap: 1.25rem;
}

.library-group__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--border);
}

.library-group__header h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
}

.compact-story-grid {
  display: grid;
  gap: 1rem;
}

.compact-story {
  display: grid;
  overflow: hidden;
  min-width: 0;
  grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr);
  background: rgba(255, 253, 248, .9);
  border: 1px solid var(--card-border);
  border-radius: .85rem;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.compact-story:hover {
  border-color: rgba(47, 102, 112, .5);
  box-shadow: 0 12px 30px rgba(24, 48, 42, .08);
  transform: translateY(-2px);
}

.compact-story img {
  width: 100%;
  height: 100%;
  min-height: 9.25rem;
  object-fit: cover;
}

.compact-story__body {
  display: grid;
  align-content: center;
  gap: .45rem;
  padding: 1.15rem;
}

.compact-story h3 {
  font-size: 1.12rem;
  line-height: 1.35;
}

.compact-story__description {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Article reading system */
.article-page .tool-hero {
  padding-block: clamp(2.6rem, 5vw, 4.5rem) clamp(2.4rem, 4vw, 3.4rem);
  background:
    linear-gradient(112deg, rgba(179, 138, 67, .13), rgba(47, 102, 112, .045) 58%, transparent);
}

.article-page .tool-hero .container {
  max-width: 72rem;
}

.article-page .tool-hero h1 {
  max-width: 22ch;
  margin-bottom: 1.1rem;
  font-size: clamp(2.45rem, 5vw, 4.6rem);
  letter-spacing: -.035em;
}

.article-page .tool-intro {
  max-width: 47rem;
  margin-bottom: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.5rem;
}

.article-meta-bar span {
  padding: .34rem .65rem;
  color: var(--forest);
  background: rgba(255, 253, 248, .78);
  border: 1px solid rgba(94, 107, 102, .25);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 760;
}

.article-page main > .section {
  padding-block: clamp(2.4rem, 4vw, 3.75rem);
}

.article-page .article-lead {
  padding-block: clamp(2.2rem, 4vw, 3.2rem);
  background: rgba(255, 253, 248, .58);
}

.article-page .article-lead .calculator-layout {
  grid-template-columns: minmax(17rem, .85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: stretch;
}

.article-page .article-lead .article-card {
  align-self: start;
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  box-shadow: var(--soft-shadow);
}

.article-page .article-lead .article-card__image {
  aspect-ratio: 3 / 2;
}

.article-page .article-lead .article-card__body {
  padding: .85rem 1rem;
  color: var(--muted);
  font-size: .8rem;
}

.article-page .article-lead .source-strip {
  display: block;
  padding: 0;
  border: 0;
}

.article-page .article-lead .source-strip__label {
  margin-bottom: .85rem;
}

.article-page .article-lead .source-strip ul {
  display: grid;
  gap: .55rem;
}

.article-page .article-lead .source-strip li {
  padding: .75rem .85rem;
  color: var(--ink);
  background: rgba(255, 253, 248, .94);
  border: 1px solid var(--card-border);
  border-radius: .65rem;
  font-size: .82rem;
  line-height: 1.5;
}

.article-page .article-lead .source-strip a {
  font-weight: 780;
}

.article-overview {
  padding-block: clamp(2.5rem, 4vw, 3.5rem);
  color: var(--paper);
  background: var(--ink);
}

.article-overview .eyebrow,
.article-overview .lede {
  color: var(--paper-deep);
}

.article-overview__header {
  display: grid;
  max-width: 52rem;
  gap: .65rem;
  margin-bottom: 1.5rem;
}

.article-overview__header h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.85rem, 3vw, 2.65rem);
}

.article-overview__grid {
  display: grid;
  gap: .8rem;
}

.article-overview__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .8rem;
  align-items: start;
  padding: 1rem;
  background: rgba(255, 253, 248, .075);
  border: 1px solid rgba(255, 253, 248, .14);
  border-radius: .75rem;
}

.article-overview__number {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--ink);
  background: var(--brass);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 800;
}

.article-overview__item p {
  margin: 0;
  color: var(--white);
  font-weight: 680;
  line-height: 1.45;
}

.article-page main > .section:not(.article-lead):not(.article-overview):not(.case-study) > .container {
  width: min(100% - 2.5rem, var(--reading-max));
}

.article-page main > .section[data-section] {
  border-top: 1px solid rgba(94, 107, 102, .18);
}

.article-page main > .section[data-section]:nth-of-type(even) {
  background: rgba(255, 253, 248, .38);
}

.article-page main > .section[data-section] h2,
.article-page main > article .section h2 {
  max-width: 25ch;
  margin-bottom: 1.2rem;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  letter-spacing: -.02em;
}

.article-page main > .section[data-section] p,
.article-page main > article .section p {
  max-width: 67ch;
}

.article-page .tool-copy {
  position: static;
  max-width: none;
}

.article-page .tool-card,
.article-page .formula-card,
.article-page .tool-note,
.article-page .disclaimer-panel {
  border-color: var(--card-border);
  box-shadow: 0 10px 28px rgba(24, 48, 42, .055);
}

.article-page .viewpoint-matrix {
  margin-block: 1.4rem;
  border-radius: .85rem;
}

.article-page .viewpoint-matrix table {
  font-size: .92rem;
}

.case-study {
  padding-block: clamp(3rem, 5vw, 4.75rem);
  color: var(--paper);
  background:
    radial-gradient(circle at 90% 5%, rgba(179, 138, 67, .23), transparent 22rem),
    var(--forest);
}

.case-study__header {
  display: grid;
  max-width: 55rem;
  gap: .75rem;
  margin-bottom: 1.6rem;
}

.case-study .eyebrow {
  color: #e9bd79;
}

.case-study h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
}

.case-study__intro {
  margin: 0;
  color: var(--paper-deep);
  font-size: 1.05rem;
}

.case-study__table {
  overflow-x: auto;
  background: rgba(255, 253, 248, .97);
  border-radius: .9rem;
  box-shadow: 0 20px 55px rgba(0, 0, 0, .16);
}

.case-study table {
  width: 100%;
  min-width: 48rem;
  border-collapse: collapse;
  color: var(--ink);
  font-size: .9rem;
}

.case-study th,
.case-study td {
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.case-study thead th {
  color: var(--white);
  background: var(--caspian);
}

.case-study tbody tr:last-child th,
.case-study tbody tr:last-child td {
  border-bottom: 0;
}

.case-study__boundary {
  max-width: 58rem;
  padding-left: 1rem;
  margin: 1.25rem 0 0;
  color: var(--paper-deep);
  border-left: .25rem solid var(--brass);
}

@media (min-width: 760px) {
  .featured-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }

  .feature-story:first-child {
    grid-row: span 2;
  }

  .feature-story:first-child img {
    min-height: 21rem;
  }

  .compact-story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-overview__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .home-page .hero__grid,
  .az-home-page .tool-hero .container,
  .article-page .article-lead .calculator-layout {
    grid-template-columns: 1fr;
  }

  .home-page .hero__image-frame {
    max-width: 42rem;
  }
}

@media (max-width: 620px) {
  .container,
  .article-page main > .section:not(.article-lead):not(.article-overview):not(.case-study) > .container {
    width: min(100% - 1.25rem, var(--page-max));
  }

  .site-header {
    position: relative;
  }

  .language-switcher {
    justify-content: flex-start;
  }

  .home-page .hero {
    padding-block: 1.5rem 2.5rem !important;
  }

  .home-page .hero h1 {
    font-size: clamp(2.35rem, 12vw, 3.2rem);
  }

  .home-page .hero__image-frame {
    order: 0;
    max-height: none;
  }

  .home-page .hero__image {
    height: auto;
  }

  .home-page .hero__caption,
  .home-page .hero__copy > .lede {
    display: block;
  }
  .az-home-page .tool-hero {
    padding-block: 2rem 1.75rem;
  }

  .az-home-page .tool-hero h1 {
    max-width: none;
    font-size: clamp(2.35rem, 11vw, 3rem);
    line-height: 1.02;
  }

  .az-home-page .tool-hero + .section {
    padding-top: 1rem;
  }

  .az-home-page .az-home-hero__visual img {
    height: 13rem;
  }

  .az-home-page .az-home-hero__visual figcaption {
    right: .7rem;
    bottom: .7rem;
    left: .7rem;
  }

  .compact-story {
    grid-template-columns: 7.4rem minmax(0, 1fr);
  }

  .compact-story img {
    min-height: 8.5rem;
  }

  .compact-story__body {
    padding: .85rem;
  }

  .compact-story__description {
    -webkit-line-clamp: 3;
  }

  .article-page .tool-hero {
    padding-block: 2rem 2.25rem;
  }

  .article-page .tool-hero h1,
  html[lang="az-AZ"] .article-page .tool-hero h1 {
    max-width: none;
    font-size: clamp(2.05rem, 10vw, 2.75rem);
    line-height: 1.04;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: auto;
  }

  .article-meta-bar {
    gap: .4rem;
  }

  .article-meta-bar span {
    font-size: .72rem;
  }

  .article-overview__grid {
    grid-template-columns: 1fr;
  }

  .case-study table {
    min-width: 0;
    table-layout: fixed;
    font-size: .78rem;
  }

  .case-study th,
  .case-study td {
    padding: .65rem .55rem;
    overflow-wrap: anywhere;
    hyphens: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feature-story img,
  .compact-story {
    transition: none;
  }
}



.source-date-ledger {
  grid-column: 1 / -1;
  padding-top: .85rem;
  border-top: 1px solid var(--border);
}
.source-date-ledger p { margin: 0 0 .55rem; }
.source-strip .source-date-ledger ul {
  display: grid;
  gap: .45rem;
}
.source-strip .source-date-ledger li {
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  line-height: 1.5;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(24, 48, 42, .06);
}
.table-wrap table { width: 100%; min-width: 42rem; border-collapse: collapse; }
.table-wrap th, .table-wrap td { padding: .8rem .9rem; border-top: 1px solid var(--border); text-align: left; vertical-align: top; }
.table-wrap thead th { color: var(--white); background: var(--forest); border-top: 0; }
.home-directory__links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: .55rem 1.25rem; padding: 0; list-style: none; }
.home-directory__links a { display: block; padding: .65rem .75rem; border-bottom: 1px solid var(--border); color: var(--forest); font-weight: 700; text-decoration: none; }
.home-directory__links a:hover { color: var(--terracotta); background: var(--paper); }
.az-home-hero__actions { display: flex; flex-wrap: wrap; gap: .65rem; margin: 1rem 0; }
.az-home-hero__invite { width: fit-content; max-width: 100%; }
.az-home-hero__disclosure { max-width: 42rem; }

@media (max-width: 620px) {
  .az-home-page .tool-hero { padding-block: .8rem 1rem; }
  .az-home-page .tool-hero h1 { font-size: clamp(2rem, 9.7vw, 2.55rem); line-height: 1; margin-bottom: .65rem; }
  .az-home-page .tool-hero .tool-intro { margin-bottom: .6rem; font-size: .95rem; line-height: 1.45; }
  .az-home-hero__actions { margin: .55rem 0; }
  .az-home-hero__actions .button { min-height: 2.35rem; padding: .48rem .78rem; font-size: .82rem; }
  .az-home-hero__invite { gap: .42rem; padding: .45rem .55rem; font-size: .78rem; }
  .az-home-hero__invite code { font-size: .92rem; }
  .az-home-hero__disclosure { margin-top: .4rem; font-size: .68rem; line-height: 1.35; }
  .az-home-page .az-home-hero__visual img { height: 9rem; }
  .az-home-page .az-home-hero__visual figcaption { padding: .45rem .55rem; font-size: .66rem; }

  .evidence-position-section .viewpoint-matrix { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .evidence-position-section .viewpoint-matrix table,
  .evidence-position-section .viewpoint-matrix tbody,
  .evidence-position-section .viewpoint-matrix tr,
  .evidence-position-section .viewpoint-matrix th,
  .evidence-position-section .viewpoint-matrix td { display: block; width: 100%; min-width: 0; }
  .evidence-position-section .viewpoint-matrix thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .evidence-position-section .viewpoint-matrix tbody { display: grid; gap: .85rem; }
  .evidence-position-section .viewpoint-matrix tr { overflow: hidden; border: 1px solid var(--border); border-radius: .85rem; background: var(--white); }
  .evidence-position-section .viewpoint-matrix th[scope="row"] { padding: .65rem .75rem; color: var(--white); background: var(--forest); }
  .evidence-position-section .viewpoint-matrix td { padding: .65rem .75rem; border-top: 1px solid var(--border); font-size: .84rem; }
  .evidence-position-section .viewpoint-matrix td::before { display: block; margin-bottom: .25rem; color: var(--terracotta); font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
  html[lang="zh-Hant"] .evidence-position-section td:nth-child(2)::before { content: "本頁檢查重點"; }
  html[lang="zh-Hant"] .evidence-position-section td:nth-child(3)::before { content: "不可推出"; }
  html[lang="zh-Hant"] .evidence-position-section td:nth-child(4)::before { content: "日期與原文"; }
  html[lang="az-AZ"] .evidence-position-section td:nth-child(2)::before { content: "Səhifənin yoxlama istiqaməti"; }
  html[lang="az-AZ"] .evidence-position-section td:nth-child(3)::before { content: "Çıxarıla bilməyən nəticə"; }
  html[lang="az-AZ"] .evidence-position-section td:nth-child(4)::before { content: "Tarix və orijinal"; }
}

.viewpoint-record-bindings { display: block; margin-top: .55rem; color: var(--muted); font-size: .76rem; line-height: 1.45; }

.evidence-gap { margin: .55rem 0 0; color: var(--terracotta); font-size: .84rem; }


@media (min-width: 900px) {
  .home-page .hero {
    padding-block: 1.5rem 1.75rem !important;
  }

  .home-page .hero__grid {
    gap: clamp(1.5rem, 3vw, 3rem);
  }

  .home-page .hero h1 {
    margin-bottom: .7rem;
    font-size: clamp(2.8rem, 4.25vw, 3.8rem);
  }

  .home-page .button-row {
    margin-block: .75rem;
  }

  .home-page .hero__content-link,
  .home-page .disclosure {
    margin-top: .5rem;
  }

  .az-home-page .tool-hero {
    padding-block: 1.45rem 1.75rem;
  }

  .az-home-page .tool-hero .container {
    grid-template-columns: minmax(0, 1.08fr) minmax(23rem, .92fr);
    gap: clamp(2rem, 4vw, 4rem);
  }

  .az-home-page .tool-hero h1 {
    max-width: 15ch;
    margin-bottom: .8rem;
    font-size: clamp(3rem, 4.35vw, 4rem);
    line-height: 1;
  }

  .az-home-page .tool-hero .tool-intro {
    max-width: 44rem;
    margin-bottom: .5rem;
    font-size: 1.08rem;
    line-height: 1.5;
  }

  .az-home-page .az-home-hero__actions {
    margin: .65rem 0;
  }

  .az-home-page .az-home-hero__actions .button {
    min-height: 2.65rem;
    padding: .55rem .9rem;
    font-size: .88rem;
  }

  .az-home-page .az-home-hero__invite {
    gap: .55rem;
    min-height: 3rem;
    padding: .5rem .65rem;
    font-size: .85rem;
  }

  .az-home-page .az-home-hero__disclosure {
    margin-top: .4rem;
    font-size: .72rem;
    line-height: 1.38;
  }

  .az-home-page .az-home-hero__visual img {
    height: clamp(20rem, 28vw, 24rem);
  }
}


@media (max-width: 620px) {
  .evidence-position-section .viewpoint-matrix caption {
    display: block;
    width: 100%;
    padding: .55rem .2rem .75rem;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.45;
    text-align: left;
  }
}


@media (max-width: 899px) {
  .tool-workspace .calculator-layout > .tool-form {
    order: -1;
  }
}
