.section.notes-preview,
.section.notes-list,
.section.article-detail {
  position: relative;
  overflow: hidden;
  padding: clamp(78px, 7vw, 112px) 44px;
  background: #fffdfa;
}

.section.notes-preview::before,
.section.notes-list::before,
.section.article-detail::before {
  content: "guides";
  position: absolute;
  right: -0.12em;
  top: 0.02em;
  color: rgba(23, 34, 57, 0.03);
  font-family: var(--ff-serif);
  font-size: clamp(6rem, 14vw, 17rem);
  line-height: 0.8;
  letter-spacing: -0.075em;
  pointer-events: none;
}

.section.notes-preview .container,
.section.notes-list .container,
.section.article-detail .container {
  position: relative;
  z-index: 1;
  width: min(100%, 1320px);
  margin: 0 auto;
}

/* Section heads */

.notes-head,
.notes-page-head {
  max-width: 1000px;
  margin: 0 auto clamp(46px, 5vw, 70px);
  text-align: center;
}

.notes-head .eyebrow,
.notes-page-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.notes-head .eyebrow::before,
.notes-page-head .eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.notes-head h2,
.notes-page-head h1 {
  max-width: 940px;
  margin: 0 auto;
  color: #172239;
  font-family: var(--ff-serif);
  font-size: clamp(2.35rem, 3.5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.052em;
}

.notes-head p,
.notes-page-head p {
  max-width: 700px;
  margin: 18px auto 0;
  color: #6f756d;
  font-size: clamp(0.98rem, 1.1vw, 1.06rem);
  line-height: 1.62;
}

/* Category label */

.note-category {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: #c56535;
  color: #fffdfa;
  padding: 6px 9px 5px;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: uppercase;
}

/* Homepage preview */

.notes-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: min(88vw, 1680px);
  margin: 0 auto;
}

.note-preview-card {
  position: relative;
  min-height: 250px;
  padding: 26px 24px 58px;
  border: 1px solid rgba(230, 222, 206, 0.95);
  border-radius: 26px;
  background: rgba(255, 253, 250, 0.92);
  box-shadow: 0 18px 46px rgba(23, 34, 57, 0.06);
}

.note-preview-card::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #c56535, #788766);
  opacity: 0.24;
}

.note-preview-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 12px;
  margin-bottom: 14px;
}

.note-preview-card time,
.article-row time,
.article-detail time {
  color: #c56535;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.note-preview-card h3 {
  margin: 0;
  color: #172239;
  font-family: var(--ff-serif);
  font-size: clamp(1.45rem, 1.85vw, 2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.note-preview-card p {
  display: -webkit-box;
  margin: 12px 0 0;
  overflow: hidden;
  color: #6f756d;
  font-size: 0.94rem;
  line-height: 1.5;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.note-preview-card .arrow-link {
  position: absolute;
  left: 24px;
  bottom: 38px;
}

/* Filters */

.notes-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: min(88vw, 1680px);
  margin: 0 auto 48px;
}

.notes-filter__button {
  border: 1px solid rgba(230, 222, 206, 0.95);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.94);
  color: #172239;
  padding: 10px 15px;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.notes-filter__button:hover,
.notes-filter__button.is-active {
  background: #172239;
  border-color: #172239;
  color: #fffdfa;
  transform: translateY(-1px);
}

/* Article listing */

.article-list {
  display: grid;
  gap: 14px;
  width: min(88vw, 1680px);
  margin: 0 auto;
}

.article-row {
  border: 1px solid rgba(230, 222, 206, 0.95);
  border-radius: 26px;
  background: rgba(255, 253, 250, 0.94);
  box-shadow: 0 16px 42px rgba(23, 34, 57, 0.045);
}

.article-row[hidden] {
  display: none;
}

.article-row__link {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 44px;
  gap: 34px;
  align-items: center;
  padding: 28px 32px;
  color: inherit;
  text-decoration: none;
}

.article-row__meta {
  display: grid;
  gap: 12px;
  align-content: start;
}

.article-row__main h2 {
  margin: 0;
  color: #172239;
  font-family: var(--ff-serif);
  font-size: clamp(1.65rem, 2.05vw, 2.4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.article-row__main p {
  display: -webkit-box;
  max-width: 760px;
  margin: 10px 0 0;
  overflow: hidden;
  color: #6f756d;
  font-size: 0.98rem;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.article-row__arrow {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f7f1e6;
  color: #c56535;
  font-weight: 900;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.article-row:hover .article-row__arrow {
  transform: translateX(3px);
  background: #172239;
  color: #fffdfa;
}

/* Article detail — Kin-style split editorial layout */

.section.article-detail {
  padding-top: clamp(64px, 6vw, 96px);
}

.article-detail__shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1220px);
  margin: 0 auto;
}

.article-detail__back {
  display: inline-flex;
  margin-bottom: 34px;
  color: #c56535;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.article-detail__back:hover {
  color: #172239;
}

.article-detail__hero {
  display: grid;
  grid-template-columns: minmax(0, 0.58fr) minmax(320px, 0.42fr);
  gap: clamp(42px, 6vw, 88px);
  align-items: start;
  margin-bottom: clamp(52px, 7vw, 92px);
}

.article-detail__intro {
  max-width: 680px;
}

.article-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.article-detail h1 {
  margin: 0;
  color: #172239;
  font-family: var(--ff-serif);
  font-size: clamp(2.9rem, 4.5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.058em;
}

.article-detail__teaser {
  max-width: 620px;
  margin: 26px 0 0;
  color: #172239;
  font-size: clamp(1.06rem, 1.25vw, 1.18rem);
  line-height: 1.62;
  font-weight: 800;
}

.article-detail__feature {
  position: relative;
  display: grid;
  gap: 18px;
}

.article-detail__feature::before {
  content: "";
  position: absolute;
  right: -74px;
  top: 42%;
  width: 92px;
  height: 92px;
  border-radius: 22px;
  background: rgba(197, 101, 53, 0.84);
  transform: rotate(45deg);
  opacity: 0.8;
  pointer-events: none;
}

.article-detail__feature::after {
  content: "";
  position: absolute;
  left: -96px;
  bottom: 34px;
  width: 130px;
  height: 110px;
  border-radius: 30px;
  background: rgba(229, 234, 223, 0.95);
  transform: rotate(14deg);
  opacity: 0.78;
  pointer-events: none;
}

.article-detail__image,
.article-detail__feature-card,
.article-detail__resource {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid rgba(230, 222, 206, 0.95);
  border-radius: 28px;
  background: rgba(255, 253, 250, 0.94);
  box-shadow: 0 20px 56px rgba(23, 34, 57, 0.07);
}

.article-detail__image img {
  display: block;
  width: 100%;
  height: auto;
}

.article-detail__feature-card,
.article-detail__resource {
  padding: 28px;
}

.article-detail__feature-card span,
.article-detail__resource span,
.article-detail__side-note span {
  display: block;
  margin-bottom: 10px;
  color: #c56535;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-detail__feature-card strong,
.article-detail__resource strong {
  display: block;
  color: #172239;
  font-family: var(--ff-serif);
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: capitalize;
}

.article-detail__feature-card p,
.article-detail__resource p,
.article-detail__side-note p {
  margin: 12px 0 0;
  color: #6f756d;
  font-size: 0.96rem;
  line-height: 1.56;
}

.article-detail__resource .button {
  margin-top: 20px;
}

.article-detail__content-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) 260px;
  gap: clamp(42px, 6vw, 78px);
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
}

.article-detail__body {
  color: #465044;
  font-size: 1.04rem;
  line-height: 1.78;
}

.article-detail__body > *:first-child {
  margin-top: 0;
}

.article-detail__body > *:last-child {
  margin-bottom: 0;
}

.article-detail__body h2:first-child {
  display: none;
}

.article-detail__body h2,
.article-detail__body h3 {
  margin: 42px 0 16px;
  color: #172239;
  font-family: var(--ff-serif);
  line-height: 1;
  letter-spacing: -0.045em;
}

.article-detail__body h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.article-detail__body h3 {
  font-size: clamp(1.65rem, 2.4vw, 2.35rem);
}

.article-detail__body p {
  margin: 0 0 1.2em;
}

.article-detail__body ul,
.article-detail__body ol {
  margin: 1.2em 0;
  padding-left: 1.35em;
}

.article-detail__body li {
  margin: 0.45em 0;
}

.article-detail__side-note {
  position: sticky;
  top: 110px;
  padding: 24px;
  border: 1px solid rgba(230, 222, 206, 0.95);
  border-radius: 24px;
  background: rgba(255, 253, 250, 0.86);
  box-shadow: 0 18px 46px rgba(23, 34, 57, 0.045);
}

.article-detail__missing {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 980px) {
  .section.notes-preview,
  .section.notes-list,
  .section.article-detail {
    padding: 76px 24px;
  }

  .notes-preview-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

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

  .article-row__meta {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

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

  .article-detail__feature::before,
  .article-detail__feature::after {
    display: none;
  }

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

  .article-detail__side-note {
    position: static;
  }
}

@media (max-width: 760px) {
  .section.notes-preview,
  .section.notes-list,
  .section.article-detail {
    padding: 64px 20px;
  }

  .notes-head h2,
  .notes-page-head h1 {
    font-size: clamp(2.25rem, 9.2vw, 3.15rem);
  }

  .article-row__link {
    padding: 24px 22px;
  }

  .article-row__arrow {
    display: none;
  }

  .article-detail h1 {
    font-size: clamp(2.45rem, 10.5vw, 3.65rem);
  }

  .article-detail__body {
    font-size: 1rem;
    line-height: 1.68;
  }

  .article-detail__image,
  .article-detail__feature-card,
  .article-detail__resource {
    border-radius: 24px;
  }
}

/* Article detail reading width refinement
   Let the article text use more horizontal space once it passes the side note.
*/

@media (min-width: 981px) {
  .article-detail__content-layout {
    display: block !important;
    max-width: 1040px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .article-detail__side-note {
    float: right;
    width: 260px;
    margin: 0 0 32px 56px;
    position: static !important;
  }

  .article-detail__body {
    max-width: none !important;
    font-size: 1.05rem;
    line-height: 1.78;
  }

  .article-detail__body p,
  .article-detail__body ul,
  .article-detail__body ol,
  .article-detail__body h2,
  .article-detail__body h3 {
    max-width: 780px;
  }

  .article-detail__body p:nth-of-type(n+5),
  .article-detail__body ul:nth-of-type(n+2),
  .article-detail__body ol:nth-of-type(n+2),
  .article-detail__body h2:nth-of-type(n+2),
  .article-detail__body h3:nth-of-type(n+2) {
    max-width: 900px;
  }
}

/* Article detail final layout correction
   Wider body; Guide and Useful When sit together in the hero/sidebar area.
*/

.article-detail__shell {
  width: min(100%, 1280px) !important;
  max-width: 1280px !important;
}

.article-detail__hero {
  display: grid !important;
  grid-template-columns: minmax(0, 0.58fr) minmax(320px, 0.42fr) !important;
  gap: clamp(48px, 7vw, 112px) !important;
  align-items: start !important;
  width: min(88vw, 1680px) !important;
  margin: 0 auto clamp(54px, 7vw, 92px) !important;
}

.article-detail__intro {
  max-width: 720px !important;
}

.article-detail__feature {
  display: grid !important;
  gap: 18px !important;
  max-width: 460px !important;
  margin-left: auto !important;
}

.article-detail__feature-card,
.article-detail__side-note,
.article-detail__resource {
  position: relative !important;
  inset: auto !important;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 26px 28px !important;
  background: #f8f3eb !important;
}

.article-detail__side-note {
  display: block !important;
}

.article-detail__content-layout {
  display: block !important;
  width: min(100%, 980px) !important;
  max-width: 980px !important;
  margin: 0 auto !important;
}

.article-detail__body {
  max-width: none !important;
  width: 100% !important;
  font-size: 1.06rem !important;
  line-height: 1.78 !important;
}

.article-detail__body p,
.article-detail__body ul,
.article-detail__body ol,
.article-detail__body h2,
.article-detail__body h3 {
  max-width: 880px !important;
}

.article-detail__body p:nth-of-type(n+5),
.article-detail__body ul:nth-of-type(n+2),
.article-detail__body ol:nth-of-type(n+2),
.article-detail__body h2:nth-of-type(n+2),
.article-detail__body h3:nth-of-type(n+2) {
  max-width: 940px !important;
}

@media (max-width: 980px) {
  .article-detail__hero {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  .article-detail__feature {
    max-width: none !important;
    margin-left: 0 !important;
  }

  .article-detail__content-layout {
    width: 100% !important;
  }

  .article-detail__body p,
  .article-detail__body ul,
  .article-detail__body ol,
  .article-detail__body h2,
  .article-detail__body h3 {
    max-width: none !important;
  }
}

/* Article detail wider editorial body
   Body now spans the same visual width as the hero area, with readable columns on desktop.
*/

@media (min-width: 1100px) {
  .article-detail__content-layout {
    width: min(88vw, 1680px) !important;
    max-width: 1180px !important;
    margin: 0 auto !important;
  }

  .article-detail__body {
    width: 100% !important;
    max-width: none !important;
    column-count: 2;
    column-gap: clamp(54px, 6vw, 86px);
    column-fill: balance;
  }

  .article-detail__body p,
  .article-detail__body ul,
  .article-detail__body ol {
    max-width: none !important;
    break-inside: avoid;
  }

  .article-detail__body h2,
  .article-detail__body h3 {
    max-width: none !important;
    break-after: avoid;
    break-inside: avoid;
  }

  .article-detail__body > * {
    break-inside: avoid;
  }

  .article-detail__body h2:first-child {
    display: none !important;
  }
}

@media (min-width: 981px) and (max-width: 1099px) {
  .article-detail__content-layout {
    width: min(100%, 980px) !important;
    max-width: 980px !important;
  }

  .article-detail__body p,
  .article-detail__body ul,
  .article-detail__body ol,
  .article-detail__body h2,
  .article-detail__body h3 {
    max-width: 900px !important;
  }
}

/* Article detail single-column reading correction
   Remove the two-column article flow. Keep one continuous, wider text measure.
*/

@media (min-width: 981px) {
  .article-detail__content-layout {
    display: block !important;
    width: min(100%, 1040px) !important;
    max-width: 1040px !important;
    margin: 0 auto !important;
  }

  .article-detail__body {
    column-count: auto !important;
    column-gap: normal !important;
    column-fill: auto !important;
    width: 100% !important;
    max-width: none !important;
    font-size: 1.06rem !important;
    line-height: 1.78 !important;
  }

  .article-detail__body p,
  .article-detail__body ul,
  .article-detail__body ol,
  .article-detail__body h2,
  .article-detail__body h3,
  .article-detail__body blockquote {
    max-width: 940px !important;
    break-inside: auto !important;
  }

  .article-detail__body h2,
  .article-detail__body h3 {
    max-width: 900px !important;
  }
}

/* Article detail full-width reading correction
   Make body text run to the full article measure rather than a narrow internal paragraph cap.
*/

@media (min-width: 981px) {
  .article-detail__content-layout {
    width: min(88vw, 1680px) !important;
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
  }

  .article-detail__body {
    width: 100% !important;
    max-width: 100% !important;
    column-count: auto !important;
    column-gap: normal !important;
  }

  .article-detail__body p,
  .article-detail__body ul,
  .article-detail__body ol,
  .article-detail__body h2,
  .article-detail__body h3,
  .article-detail__body h4,
  .article-detail__body blockquote,
  .article-detail__body figure,
  .article-detail__body table {
    width: 100% !important;
    max-width: 100% !important;
  }

  .article-detail__body p {
    max-width: 100% !important;
  }
}

/* Article detail final paragraph-width override
   Force every article body element to use the full article measure.
*/

@media (min-width: 981px) {
  .article-detail .article-detail__content-layout {
    width: min(88vw, 1680px) !important;
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
  }

  .article-detail .article-detail__body {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    column-count: auto !important;
    column-gap: normal !important;
    column-fill: auto !important;
  }

  .article-detail .article-detail__body > *,
  .article-detail .article-detail__body > p,
  .article-detail .article-detail__body > p:nth-of-type(n),
  .article-detail .article-detail__body > ul,
  .article-detail .article-detail__body > ul:nth-of-type(n),
  .article-detail .article-detail__body > ol,
  .article-detail .article-detail__body > ol:nth-of-type(n),
  .article-detail .article-detail__body > h2,
  .article-detail .article-detail__body > h2:nth-of-type(n),
  .article-detail .article-detail__body > h3,
  .article-detail .article-detail__body > h3:nth-of-type(n),
  .article-detail .article-detail__body > h4,
  .article-detail .article-detail__body > h4:nth-of-type(n),
  .article-detail .article-detail__body > blockquote,
  .article-detail .article-detail__body > figure,
  .article-detail .article-detail__body > table {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}


/* Messy Middle design system: guide card consistency */
.note-preview-card h3,
.notes-preview-card h3 {
  font-family: var(--mm-serif, Georgia, "Times New Roman", serif);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.note-preview-card p,
.notes-preview-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
