.blog-page {
  background:
    linear-gradient(90deg, rgba(23, 22, 22, 0.035) 1px, transparent 1px) 0 0 / 34px 34px,
    var(--paper);
}

.blog-page .desktop-nav [aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 4px;
  text-underline-offset: 8px;
}

.blog-hero {
  display: grid;
  max-width: var(--max);
  min-height: 640px;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.75fr);
  align-items: end;
  gap: clamp(44px, 7vw, 110px);
  margin: 0 auto;
  padding: clamp(76px, 10vw, 148px) var(--gutter) clamp(70px, 9vw, 124px);
}

.blog-hero-copy h1 {
  max-width: 930px;
  margin-bottom: 30px;
  font-size: clamp(54px, 7.4vw, 108px);
}

.blog-hero-copy .eyebrow,
.library-heading .eyebrow,
.ask-editor .eyebrow {
  margin-bottom: 18px;
  color: #8a233f;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.blog-hero-intro {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.55;
}

.editorial-promise {
  position: relative;
  overflow: hidden;
  padding: 38px;
  background: var(--coral);
  border: var(--line);
  border-radius: 30px 30px 0 30px;
  box-shadow: 9px 9px 0 var(--ink);
}

.editorial-promise .promise-number {
  position: absolute;
  top: -42px;
  right: 12px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 190px;
  font-weight: 900;
  line-height: 1;
}

.editorial-promise h2 {
  position: relative;
  max-width: 350px;
  margin: 0 0 32px;
  font-size: clamp(28px, 3vw, 42px);
}

.editorial-promise ol {
  position: relative;
  display: grid;
  gap: 15px;
  margin: 0;
  padding: 0;
  counter-reset: promise;
  list-style: none;
}

.editorial-promise li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
  font-weight: 760;
}

.editorial-promise li::before {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: white;
  content: counter(promise);
  counter-increment: promise;
  font-size: 13px;
}

.status-explainer {
  display: grid;
  max-width: var(--max);
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
  background: var(--surface);
  border: var(--line);
}

.status-explainer article {
  display: grid;
  min-height: 150px;
  grid-template-columns: 24px 1fr;
  gap: 16px;
  align-items: start;
  padding: 28px;
  border-right: var(--line);
}

.status-explainer article:last-child {
  border-right: 0;
}

.state-dot {
  width: 22px;
  height: 22px;
  margin-top: 5px;
  background: var(--green);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.state-refresh .state-dot {
  background: var(--yellow);
}

.state-legacy .state-dot {
  background: #d8d3ca;
}

.status-explainer strong {
  display: block;
  margin-bottom: 5px;
  font-size: 20px;
}

.status-explainer p {
  margin: 0;
  color: #554f4a;
  font-size: 14px;
  line-height: 1.45;
}

.featured-story {
  display: grid;
  max-width: var(--max);
  min-height: 510px;
  grid-template-columns: 0.72fr 1.28fr;
  align-items: stretch;
  margin: clamp(78px, 10vw, 140px) auto;
  background: var(--pink);
  border: var(--line);
  box-shadow: 12px 12px 0 var(--ink);
}

.featured-mark {
  display: grid;
  overflow: hidden;
  place-items: center;
  background: var(--yellow);
  border-right: var(--line);
  font-size: clamp(160px, 26vw, 390px);
  font-weight: 900;
  letter-spacing: -0.12em;
  line-height: 0.75;
  text-indent: -0.08em;
}

.featured-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(38px, 7vw, 88px);
}

.featured-copy .card-kicker {
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.featured-copy h2 {
  max-width: 710px;
  margin-bottom: 24px;
}

.featured-copy > p:not(.card-kicker) {
  max-width: 670px;
  margin-bottom: 32px;
  font-size: 20px;
}

.restored-guides {
  max-width: var(--max);
  margin: 0 auto clamp(96px, 12vw, 170px);
  padding: 0 var(--gutter);
}

.restored-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.65fr);
  gap: 70px;
  align-items: end;
  margin-bottom: 42px;
}

.restored-heading .eyebrow {
  margin-bottom: 18px;
  color: #8a233f;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.restored-heading h2,
.restored-heading p {
  margin-bottom: 0;
}

.restored-heading > p {
  padding-left: 18px;
  border-left: 4px solid var(--coral);
  color: #4e4843;
  font-size: 15px;
}

.restored-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: var(--line);
  border-left: var(--line);
}

.restored-card {
  display: grid;
  min-height: 190px;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: start;
  padding: 30px;
  background: var(--surface);
  border-right: var(--line);
  border-bottom: var(--line);
  text-decoration: none;
}

.restored-card-wide {
  grid-column: 1 / -1;
  min-height: 235px;
  background: var(--yellow);
}

.restored-card-evidence {
  background: var(--pink);
}

.restored-card:hover,
.restored-card:focus-visible {
  box-shadow: inset 0 0 0 4px var(--ink);
  outline: 0;
}

.restored-card > span:last-child {
  font-size: 24px;
}

.restored-index {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: white;
  font-size: 12px;
  font-weight: 850;
}

.restored-copy {
  display: grid;
  gap: 12px;
}

.restored-copy small {
  color: #514b46;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.restored-copy strong {
  max-width: 800px;
  font-size: clamp(26px, 3.2vw, 48px);
  line-height: 1.08;
}

.restored-card:not(.restored-card-wide) .restored-copy strong {
  font-size: clamp(24px, 2.4vw, 34px);
}

.library {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(100px, 12vw, 170px);
}

.library-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.65fr);
  gap: 70px;
  align-items: end;
  margin-bottom: 52px;
}

.library-heading h2 {
  margin-bottom: 0;
}

.migration-note {
  margin-bottom: 7px;
  padding-left: 18px;
  border-left: 4px solid var(--coral);
  color: #4e4843;
  font-size: 15px;
}

.library-controls {
  display: grid;
  grid-template-columns: minmax(300px, 1.7fr) repeat(2, minmax(150px, 0.62fr));
  gap: 10px;
  padding: 18px;
  background: var(--ink);
  color: white;
}

.library-controls label {
  display: block;
  margin: 0 0 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.search-field > div {
  display: flex;
}

.library-controls input,
.library-controls select,
.library-controls button {
  min-height: 50px;
  border: 2px solid white;
  border-radius: 0;
  font: inherit;
}

.library-controls input,
.library-controls select {
  width: 100%;
  padding: 10px 13px;
  background: white;
  color: var(--ink);
}

.library-controls select {
  cursor: pointer;
}

.library-controls input:focus-visible,
.library-controls select:focus-visible,
.library-controls button:focus-visible {
  outline-color: var(--yellow);
}

#clear-search {
  flex: 0 0 auto;
  padding: 0 16px;
  background: var(--yellow);
  border-left: 0;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.results-toolbar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 2px;
  border-bottom: var(--line);
}

.results-toolbar p {
  margin: 0;
  font-weight: 780;
}

.reset-filters {
  padding: 7px 0;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-left: var(--line);
}

.article-card {
  position: relative;
  display: flex;
  min-height: 440px;
  flex-direction: column;
  padding: 28px;
  background: var(--surface);
  border-right: var(--line);
  border-bottom: var(--line);
}

.article-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 9px;
  background: var(--green);
  content: "";
}

.article-card[data-status="refresh"]::before {
  background: var(--yellow);
}

.article-card[data-status="legacy"]::before {
  background: #d8d3ca;
}

.article-meta,
.article-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #5b544f;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: var(--green);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
}

.article-card[data-status="refresh"] .article-status {
  background: var(--yellow);
}

.article-card[data-status="legacy"] .article-status {
  background: #e5e0d8;
}

.article-card h3 {
  margin: 26px 0 16px;
  font-size: clamp(26px, 2.3vw, 35px);
}

.article-card h3 a {
  text-decoration: none;
}

.article-card h3 a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.article-card h3 a:focus-visible {
  outline: 0;
}

.article-card:has(h3 a:focus-visible) {
  outline: 4px solid #6d4aff;
  outline-offset: 3px;
}

.article-card .article-dek {
  margin-bottom: 28px;
  color: #504a45;
  font-size: 15px;
  line-height: 1.55;
}

.article-card .article-source {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid #bbb3a8;
}

.article-card .arrow {
  margin-left: auto;
  color: var(--ink);
  font-size: 22px;
}

.article-card:hover {
  z-index: 1;
  box-shadow: inset 0 0 0 4px var(--ink);
}

.empty-state {
  padding: 80px 28px;
  background: var(--surface);
  border: var(--line);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  font-size: 25px;
}

.empty-state p {
  margin: 0;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  min-height: 45px;
  padding: 8px 12px;
  background: var(--surface);
  border: var(--line);
  color: inherit;
  font-weight: 800;
  text-decoration: none;
}

.pagination a {
  cursor: pointer;
}

.pagination [aria-current="page"] {
  background: var(--ink);
  color: white;
}

.pagination .is-disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.ask-editor {
  display: grid;
  max-width: var(--max);
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: end;
  margin: 0 auto clamp(60px, 8vw, 110px);
  padding: clamp(58px, 8vw, 100px);
  background: var(--blue);
  border: var(--line);
  border-radius: 40px 40px 0 40px;
}

.ask-editor h2 {
  margin-bottom: 0;
}

.ask-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.ask-actions > a:not(.button) {
  font-weight: 820;
  text-underline-offset: 5px;
}

.ask-actions p {
  margin: 0;
  font-size: 13px;
}

/* Article reader */
.article-reader-page {
  background: var(--paper);
}

.article-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(60px, 9vw, 128px) var(--gutter) 120px;
}

.article-back {
  display: inline-flex;
  margin-bottom: 48px;
  font-size: 14px;
  font-weight: 820;
  text-underline-offset: 6px;
}

.article-header {
  max-width: 980px;
}

.article-header .reader-status {
  display: inline-flex;
  margin-bottom: 24px;
  padding: 7px 12px;
  background: var(--green);
  border: var(--line);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.article-header[data-status="refresh"] .reader-status {
  background: var(--yellow);
}

.article-header[data-status="legacy"] .reader-status {
  background: #e5e0d8;
}

.article-header h1 {
  margin-bottom: 30px;
  font-size: clamp(48px, 7.5vw, 100px);
}

.reader-dek {
  max-width: 850px;
  margin-bottom: 36px;
  font-size: clamp(19px, 2.2vw, 27px);
  line-height: 1.5;
}

.reader-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 20px 0;
  border-top: var(--line);
  border-bottom: var(--line);
  color: #514b46;
  font-size: 13px;
  font-weight: 720;
}

.reader-alert {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 18px;
  max-width: 900px;
  margin: 42px 0;
  padding: 24px;
  background: var(--yellow);
  border: var(--line);
}

.reader-alert::before {
  width: 14px;
  height: 100%;
  background: var(--ink);
  content: "";
}

.reader-alert strong {
  display: block;
  margin-bottom: 5px;
}

.reader-alert p {
  margin: 0;
  font-size: 14px;
}

.article-body-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(220px, 280px);
  gap: clamp(48px, 9vw, 110px);
  align-items: start;
  margin-top: 64px;
}

.article-body-layout > * {
  min-width: 0;
}

.article-body {
  font-family: Georgia, "Noto Serif TC", "Songti TC", serif;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.78;
}

.article-body h2,
.article-body h3 {
  margin-top: 1.8em;
  font-family: Inter, "Avenir Next", "PingFang TC", sans-serif;
}

.article-body h2 {
  font-size: clamp(32px, 4vw, 48px);
}

.article-body h3 {
  font-size: clamp(25px, 3vw, 33px);
}

.article-body p,
.article-body ul,
.article-body ol {
  margin-bottom: 1.35em;
}

.article-body li + li {
  margin-top: 0.55em;
}

.article-body .article-callout {
  margin: 2em 0;
  padding: 26px;
  background: var(--blue);
  border: var(--line);
  font-family: Inter, "Avenir Next", "PingFang TC", sans-serif;
  font-size: 17px;
  font-weight: 690;
}

.article-aside {
  position: sticky;
  top: 120px;
  padding: 24px;
  background: var(--surface);
  border: var(--line);
}

.article-aside h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.article-aside dl {
  margin: 0;
}

.article-aside dt {
  margin-top: 16px;
  color: #6b625b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-aside dd {
  margin: 3px 0 0;
  font-size: 14px;
  font-weight: 760;
}

.article-aside a {
  word-break: break-word;
  text-underline-offset: 4px;
}

.article-end-cta {
  margin-top: 80px;
  padding: 40px;
  background: var(--coral);
  border: var(--line);
}

.article-end-cta h2 {
  font-size: clamp(30px, 4vw, 46px);
}

.not-found {
  max-width: 760px;
  margin: 0 auto;
  padding: 120px var(--gutter);
  text-align: center;
}

@media (max-width: 1080px) {
  .blog-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .editorial-promise {
    max-width: 650px;
  }

  .featured-story {
    margin-right: var(--gutter);
    margin-left: var(--gutter);
  }

  .library-controls {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-field {
    grid-column: 1 / -1;
  }

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

@media (max-width: 780px) {
  .blog-hero-copy h1 {
    font-size: clamp(48px, 14vw, 74px);
  }

  .status-explainer,
  .featured-story,
  .library-heading,
  .ask-editor,
  .article-body-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .status-explainer {
    margin-right: 20px;
    margin-left: 20px;
  }

  .status-explainer article {
    min-height: 0;
    border-right: 0;
    border-bottom: var(--line);
  }

  .status-explainer article:last-child {
    border-bottom: 0;
  }

  .featured-story {
    min-height: 0;
  }

  .featured-mark {
    min-height: 250px;
    border-right: 0;
    border-bottom: var(--line);
  }

  .library-heading {
    gap: 24px;
  }

  .restored-heading,
  .restored-grid {
    grid-template-columns: 1fr;
  }

  .restored-heading {
    gap: 24px;
  }

  .restored-card-wide {
    grid-column: auto;
  }

  .library-controls {
    grid-template-columns: 1fr;
  }

  .search-field {
    grid-column: auto;
  }

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

  .article-card {
    min-height: 390px;
  }

  .ask-editor {
    margin-right: 20px;
    margin-left: 20px;
    padding: 44px 28px;
  }

  .article-aside {
    position: static;
  }
}

@media (max-width: 480px) {
  .blog-hero {
    padding-top: 56px;
  }

  .blog-hero-copy h1 {
    font-size: 43px;
  }

  .editorial-promise {
    padding: 28px;
    border-radius: 22px 22px 0 22px;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .status-explainer {
    margin-right: 12px;
    margin-left: 12px;
  }

  .featured-story {
    margin-right: 12px;
    margin-left: 12px;
    box-shadow: 7px 7px 0 var(--ink);
  }

  .featured-copy {
    padding: 30px 24px;
  }

  .library {
    padding-right: 12px;
    padding-left: 12px;
  }

  .restored-guides {
    padding-right: 12px;
    padding-left: 12px;
  }

  .restored-card {
    min-height: 170px;
    grid-template-columns: 1fr auto;
    padding: 24px;
  }

  .restored-index {
    display: none;
  }

  .article-card {
    padding: 25px;
  }

  .results-toolbar {
    align-items: flex-start;
  }

  .pagination a,
  .pagination span {
    min-width: 42px;
  }

  .article-shell {
    padding-right: 20px;
    padding-left: 20px;
  }

  .article-header h1 {
    font-size: 43px;
  }

  .reader-byline {
    display: grid;
  }

  .article-end-cta {
    padding: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-page *,
  .article-reader-page * {
    scroll-behavior: auto !important;
  }
}
