@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --ink: #202c2a;
  --muted: #5e6b67;
  --line: #dce4df;
  --paper: #fffefa;
  --canvas: #ffffff;
  --teal: #176c66;
  --teal-dark: #104e49;
  --soft-teal: #e8f3ef;
  --orange: #d95e45;
  font-family: "DM Sans", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
a { color: var(--teal-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange); }
a:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 2px; }
img { max-width: 100%; }

.skip-link { position: absolute; top: -5rem; left: 1rem; z-index: 10; padding: .65rem 1rem; background: white; }
.skip-link:focus { top: 1rem; }
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner { max-width: 1440px; margin: auto; padding: 1rem clamp(1.2rem, 3vw, 3rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--ink); }
.brand-word { display: block; color: #213b38; font-size: 1.45rem; font-weight: 700; letter-spacing: -.075em; }
.brand-divider { height: 1.7rem; border-left: 1px solid #c6d1cb; }
.brand-label { font-family: "Literata", Georgia, serif; font-size: 1.2rem; font-weight: 600; letter-spacing: -.03em; }
.header-nav { display: flex; align-items: center; gap: 1.4rem; font-size: .88rem; font-weight: 600; }
.header-nav a { text-decoration: none; }
.header-nav .yarra-link { border: 1px solid #c6d8d1; border-radius: 999px; padding: .6rem .9rem; }
.page-shell { max-width: 1440px; margin: auto; padding: 0 clamp(1.2rem, 3vw, 3rem); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin: 1.65rem 0; color: var(--muted); font-size: .8rem; }
.breadcrumb a { color: inherit; }
.breadcrumb span[aria-hidden] { color: #98aaa0; }
.eyebrow { color: var(--teal); font-size: .73rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.site-footer { max-width: 1440px; margin: 4rem auto 0; padding: 1.6rem clamp(1.2rem, 3vw, 3rem) 2.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .82rem; }
.site-footer p { margin: 0; }

.home-hero { position: relative; display: flex; align-items: center; min-height: clamp(34rem, 48vw, 44rem); overflow: hidden; border-bottom: 1px solid var(--line); }
.home-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #fff 0%, rgb(255 255 255 / 97%) 24%, rgb(255 255 255 / 82%) 39%, rgb(255 255 255 / 10%) 70%, transparent 100%); pointer-events: none; }
.hero-copy { position: relative; z-index: 2; width: 100%; max-width: 1440px; margin: auto; padding: 3rem clamp(1.2rem, 3vw, 3rem); }
.home-hero h1 { max-width: 14ch; margin: .75rem 0 1.2rem; font: 500 clamp(2.7rem, 5.2vw, 5rem)/1.1 "Literata", Georgia, serif; letter-spacing: -.055em; }
.hero-title-line { white-space: nowrap; }
.home-hero p { max-width: 34rem; margin: 0; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.18rem); line-height: 1.8; }
.hero-image { position: absolute; inset: 0; margin: 0; }
.hero-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.section-kicker { margin: 0; color: var(--teal); font-size: .73rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.all-articles { padding-top: 1.75rem; }
.article-search { max-width: 46rem; margin: 0 auto 1.25rem; }
.article-search label { display: block; margin-bottom: .45rem; font-size: .85rem; font-weight: 700; }
.article-search-ring { padding: 1px; border-radius: 999px; background: linear-gradient(90deg, var(--teal), #9ebeb3); }
.article-search-inner { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; border-radius: inherit; background: #fff; }
.article-search svg { width: 1.15rem; height: 1.15rem; color: var(--teal); flex: 0 0 auto; }
.article-search input { width: 100%; border: 0; outline: 0; color: var(--ink); font: 400 1rem/1.4 "Inter", Arial, sans-serif; }
.category-filters[hidden], .filter-status[hidden], .subject-card[hidden] { display: none; }
.category-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin: 2.5rem 0; }
.category-filters button { padding: .65rem 1rem; border: 1px solid #e1e3e5; border-radius: 999px; background: #fff; color: #333940; font: 600 .85rem/1.3 "Inter", Arial, sans-serif; cursor: pointer; }
.category-filters button:hover { border-color: var(--orange); color: var(--orange); }
.category-filters button[aria-pressed="true"] { border-color: var(--orange); background: #fff3ef; color: #bd4e3c; }
.category-filters button:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.filter-status { margin: -.5rem 0 1.2rem; color: var(--muted); font-size: .85rem; }
.subject-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
.subject-card { display: flex; flex-direction: column; min-height: 220px; padding: 2rem 1.5rem; border: 1px solid var(--line); background: var(--paper); }
.subject-card .subject-number { color: var(--orange); font-size: .75rem; font-weight: 700; letter-spacing: .1em; }
.subject-card h3 { margin: 1.1rem 0 .65rem; font: 500 1.5rem/1.25 "Literata", Georgia, serif; letter-spacing: -.025em; }
.subject-card p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.65; }
.subject-card a { margin-top: auto; padding-top: 1.3rem; font-size: .86rem; font-weight: 700; }
.subject-card.is-quiet { background: #f8faf6; }
.subject-card.is-quiet h3 { color: #65736d; }

.article-main { width: 60%; min-width: 0; margin-inline: auto; }
.article-header { padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.article-header h1 { margin: .7rem 0 1rem; font: 500 clamp(2.6rem, 4.5vw, 4.5rem)/1.15 "Literata", Georgia, serif; letter-spacing: -.05em; }
.article-deck { max-width: 680px; margin: 0; color: #44534e; font: 400 clamp(1.08rem, 1.6vw, 1.25rem)/1.75 "Literata", Georgia, serif; }
.article-summary { margin: 4rem 0; padding: 1.5rem 1.7rem; background: var(--soft-teal); border-left: 3px solid var(--teal); }
.article-summary h2 { margin: 0 0 .55rem; color: var(--teal-dark); font: 600 1.05rem "Literata", Georgia, serif; }
.article-summary p { margin: 0; font-size: 1rem; line-height: 1.75; }
.article-body { font: 400 1.03rem/1.85 "Literata", Georgia, serif; }
.article-body section { scroll-margin-top: 1.5rem; }
.article-body section + section { margin-top: 3.3rem; padding-top: 2.4rem; border-top: 1px solid var(--line); }
.article-body h2 { margin: 0 0 1.2rem; font: 500 2rem/1.3 "Literata", Georgia, serif; letter-spacing: -.03em; }
.article-body h3 { margin: 2.1rem 0 .8rem; font: 600 1.3rem/1.4 "Literata", Georgia, serif; letter-spacing: -.02em; }
.article-body h4 { margin: 1.5rem 0 .65rem; font: 600 1.05rem/1.4 "Literata", Georgia, serif; }
.article-body p { margin: 0 0 1.25rem; }
.article-body ul, .article-body ol { margin: .3rem 0 1.5rem; padding-left: 1.5rem; }
.article-body li { padding-left: .2rem; margin: .28rem 0; }
.article-body blockquote { margin: 1.7rem 0; padding: .6rem 0 .6rem 1.4rem; border-left: 3px solid var(--orange); color: #344f48; font-size: 1.14rem; }
.article-body blockquote p { margin: 0; }
.article-body strong { font-weight: 600; }
.article-body .table-wrap { overflow-x: auto; margin: 1.4rem 0 1.8rem; }
.article-body table { width: 100%; border-collapse: collapse; font: 400 .86rem/1.55 "DM Sans", Arial, sans-serif; }
.article-body th, .article-body td { padding: .7rem .8rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-body th { background: #edf3ed; }
.article-body .process { padding: 1rem 1.2rem; background: #edf3ed; font: 600 .94rem/1.7 "DM Sans", Arial, sans-serif; overflow-x: auto; }
.article-body pre { overflow-x: auto; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; background: #f7f8f7; font: .85rem/1.6 Consolas, monospace; }
.article-body :not(pre) > code { padding: .1rem .3rem; border-radius: 4px; background: #f1f2f1; font: .9em Consolas, monospace; }
.article-body hr { margin: 2rem 0; border: 0; border-top: 1px solid var(--line); }
.article-end { margin: 3rem 0 0; padding: 1.5rem 0 0; border-top: 1px solid var(--line); color: var(--muted); font: 400 .88rem/1.6 "DM Sans", Arial, sans-serif; }
.library-pagination { display: flex; justify-content: center; align-items: center; gap: 1.25rem; margin: 2rem 0; font: 600 .9rem/1.5 "DM Sans", Arial, sans-serif; }
.library-pagination[hidden] { display: none; }
.library-pagination a { color: var(--teal); text-decoration: underline; }

@media (max-width: 1100px) {
  .article-main { width: min(100%, 42rem); }
}
@media (max-width: 900px) {
  .home-hero { align-items: flex-start; min-height: 38rem; }
  .home-hero::after { background: linear-gradient(180deg, #fff 0%, rgb(255 255 255 / 96%) 34%, rgb(255 255 255 / 55%) 60%, transparent 100%); }
  .hero-image img { object-position: 58% center; }
  .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-body { overflow-wrap: break-word; }
}
@media (max-width: 620px) {
  .header-inner { padding-block: .85rem; }
  .brand-word { font-size: 1.25rem; }
  .brand-label { font-size: 1.05rem; }
  .header-nav { gap: .6rem; font-size: .78rem; }
  .header-nav .yarra-link { padding: .5rem .65rem; }
  .home-hero { min-height: 37rem; }
  .home-hero::after { background: linear-gradient(180deg, #fff 0%, rgb(255 255 255 / 98%) 48%, rgb(255 255 255 / 65%) 72%, transparent 100%); }
  .hero-copy { margin: 0 auto; padding-top: 2rem; }
  .hero-image { top: 2rem; }
  .subject-grid { grid-template-columns: 1fr; }
  .subject-card { min-height: 180px; }
  .article-header h1 { font-size: 2.5rem; }
  .article-body { font-size: .98rem; line-height: 1.8; }
  .article-body h2 { font-size: 1.7rem; }
  .site-footer { flex-direction: column; }
}
