:root {
  --ink: #142536;
  --muted: #52606c;
  --paper: #f7f3ea;
  --white: #fffdf8;
  --line: #d8d0c0;
  --maize: #f2c14e;
  --teal: #1d7773;
  --navy: #18344d;
  --shadow: 0 18px 48px rgba(20, 37, 54, .10);
  --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Arial, Helvetica, sans-serif; line-height: 1.6; }
a { color: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .7rem 1rem; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }
.site-header { max-width: var(--max); margin: 0 auto; padding: 1.25rem 2rem; display: flex; justify-content: space-between; align-items: center; gap: 2rem; border-bottom: 1px solid var(--line); }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.2; }
.brand strong { font-family: Georgia, 'Times New Roman', serif; font-size: 1.25rem; }
.brand span { color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
nav { display: flex; align-items: center; gap: 1.4rem; }
nav a { font-size: .9rem; font-weight: 700; text-decoration: none; }
nav a:hover, nav a:focus { text-decoration: underline; text-underline-offset: .25rem; }
.nav-cta { border: 1px solid var(--ink); padding: .45rem .8rem; }
main { overflow: hidden; }
.portfolio-hero { position: relative; max-width: var(--max); margin: 0 auto; padding: 6.5rem 2rem 5rem; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .75fr); gap: 5rem; align-items: center; }
.portfolio-hero::before { content: ''; position: absolute; inset: 0 -50vw; z-index: -1; background-image: linear-gradient(rgba(24,52,77,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(24,52,77,.045) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(to bottom, black, transparent); }
.eyebrow { margin: 0 0 .8rem; color: var(--teal); font-size: .76rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; line-height: 1.08; }
h1 { max-width: 820px; margin: 0 0 1.4rem; font-size: clamp(3.4rem, 7vw, 6.4rem); letter-spacing: -.055em; }
h2 { margin: 0; font-size: clamp(2.3rem, 4.5vw, 4rem); letter-spacing: -.04em; }
h3 { margin: 0; font-size: 1.65rem; }
.lede { max-width: 760px; margin: 0; color: var(--muted); font-size: 1.12rem; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: .75rem 1rem; border: 1px solid var(--ink); font-weight: 800; text-decoration: none; }
.button.primary { background: var(--ink); color: white; }
.button.secondary { background: transparent; }
.button:hover, .button:focus { transform: translateY(-2px); box-shadow: 0 6px 0 var(--maize); }
.evidence-card { padding: 1.7rem; background: var(--navy); color: white; box-shadow: 12px 12px 0 var(--maize); }
.card-label { margin: 0 0 1rem; color: #c8e4e1; font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.evidence-card dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; }
.evidence-card dl div { padding: 1rem .65rem; border-top: 1px solid rgba(255,255,255,.22); }
.evidence-card dt { font-family: Georgia, 'Times New Roman', serif; font-size: 1.8rem; font-weight: 700; }
.evidence-card dd { margin: .1rem 0 0; color: #d7e1e7; font-size: .78rem; line-height: 1.35; }
.evidence-card > p:last-child { margin: 1.1rem 0 0; color: #d7e1e7; font-size: .8rem; }
.section { max-width: var(--max); margin: 0 auto; padding: 6rem 2rem; }
.section-intro { max-width: 780px; margin-bottom: 3rem; }
.section-intro > p:last-child { color: var(--muted); }
.case-list { border-top: 2px solid var(--ink); }
.case-row { display: grid; grid-template-columns: 60px minmax(0,1fr) 190px; gap: 1.5rem; align-items: start; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.case-row.feature { background: var(--white); margin: 0 -1.5rem; padding: 2rem 1.5rem; border-left: 6px solid var(--maize); }
.case-row.private { color: #34495b; }
.case-number { color: var(--teal); font-family: Georgia, 'Times New Roman', serif; font-size: 1.2rem; font-weight: 700; }
.case-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.case-meta span { padding: .2rem .5rem; background: #e8e1d3; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.case-main > p { max-width: 760px; margin: .75rem 0; color: var(--muted); }
.result-list { display: flex; flex-wrap: wrap; gap: .9rem 1.5rem; margin: 1rem 0 0; padding: 0; list-style: none; font-size: .87rem; }
.result-list strong { color: var(--teal); font-size: 1rem; }
.case-visual { margin: 1.3rem 0 0; }
.case-visual img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.case-visual figcaption { margin-top: .45rem; color: var(--muted); font-size: .75rem; }
.case-action { align-self: center; text-align: right; }
.case-action a { font-weight: 800; text-decoration: none; border-bottom: 2px solid var(--maize); }
.case-action a:hover, .case-action a:focus { color: var(--teal); }
.library-preview { padding-top: 3rem; }
.library-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.library-grid article { padding: 1.7rem; background: var(--white); border: 1px solid var(--line); border-top: 5px solid var(--teal); }
.library-grid .status { margin: 0 0 1.2rem; color: var(--teal); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.library-grid article > p:not(.status) { color: var(--muted); }
.library-grid a, .library-link a { font-weight: 800; text-decoration-color: var(--maize); text-decoration-thickness: 2px; text-underline-offset: .25rem; }
.library-link { margin-top: 1.4rem; text-align: right; }
.methods { max-width: none; background: var(--navy); color: white; padding-left: max(2rem, calc((100vw - var(--max)) / 2 + 2rem)); padding-right: max(2rem, calc((100vw - var(--max)) / 2 + 2rem)); }
.methods .eyebrow { color: #78c8c1; }
.method-grid { margin-top: 3rem; display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid rgba(255,255,255,.3); border-left: 1px solid rgba(255,255,255,.3); }
.method-grid article { padding: 1.5rem; border-right: 1px solid rgba(255,255,255,.3); border-bottom: 1px solid rgba(255,255,255,.3); }
.method-grid article > span { color: var(--maize); font-weight: 800; }
.method-grid h3 { margin-top: 2.5rem; font-size: 1.35rem; }
.method-grid p { margin-bottom: 0; color: #cdd9e0; font-size: .9rem; }
.tool-line { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; align-items: center; }
.tool-line strong { margin-right: .4rem; }
.tool-line span { padding: .3rem .6rem; border: 1px solid rgba(255,255,255,.35); font-size: .78rem; }
.closing { max-width: 900px; margin: 0 auto; padding: 7rem 2rem; text-align: left; }
.closing p:not(.eyebrow) { max-width: 760px; margin: .9rem 0 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.closing .actions { justify-content: flex-start; }
footer { max-width: var(--max); margin: 0 auto; padding: 1.5rem 2rem 2.5rem; display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.study-hero { max-width: var(--max); margin: 0 auto; padding: 5rem 2rem 3.5rem; }
.study-hero h1 { max-width: 950px; font-size: clamp(3rem, 6vw, 5.6rem); }
.study-hero .lede { max-width: 820px; }
.breadcrumb { margin-bottom: 2rem; font-size: .82rem; font-weight: 700; }
.breadcrumb a { text-underline-offset: .2rem; }
.study-layout { max-width: var(--max); margin: 0 auto; padding: 0 2rem 6rem; display: grid; grid-template-columns: minmax(0,1.6fr) minmax(250px,.65fr); gap: 5rem; }
.study-body section { padding: 2.2rem 0; border-top: 1px solid var(--line); }
.study-body h2 { font-size: 2rem; }
.study-body h3 { margin-top: 1.4rem; font-size: 1.2rem; }
.study-body p, .study-body li { color: var(--muted); }
.study-body ul, .study-body ol { padding-left: 1.2rem; }
.study-body code { padding: .1rem .3rem; background: #e8e1d3; color: var(--ink); }
.metric-table { width: 100%; margin-top: 1.3rem; border-collapse: collapse; }
.metric-table th, .metric-table td { padding: .7rem .5rem; border-bottom: 1px solid var(--line); text-align: left; }
.metric-table th { color: var(--muted); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.metric-table td:last-child { font-weight: 800; }
.diagnostic-visual { margin: 1.5rem 0; }
.diagnostic-visual img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.diagnostic-visual figcaption { margin-top: .55rem; color: var(--muted); font-size: .78rem; }
.diagnostic-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.study-aside { align-self: start; position: sticky; top: 1.5rem; padding: 1.4rem; background: var(--white); border-top: 5px solid var(--maize); box-shadow: var(--shadow); }
.study-aside h2 { font-size: 1.25rem; }
.study-aside dl { margin: 1rem 0; }
.study-aside dt { margin-top: .9rem; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.study-aside dd { margin: .15rem 0; }
.study-aside .button { width: 100%; margin-top: .5rem; }
.callout { margin: 1.5rem 0; padding: 1.1rem 1.2rem; background: #e5f0ee; border-left: 5px solid var(--teal); }
.callout strong { color: var(--ink); }
.next-study { display: flex; justify-content: space-between; gap: 1rem; padding-top: 2rem; border-top: 2px solid var(--ink); }
.library-hero { padding-bottom: 2rem; }
.catalog-section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.catalog-section.compact-top { padding-top: 1rem; }
.catalog-heading { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: end; margin-bottom: 2rem; }
.catalog-heading h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.catalog-heading > p { margin: 0; color: var(--muted); }
.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.catalog-grid article { display: flex; flex-direction: column; padding: 1.5rem; min-height: 260px; background: var(--white); border: 1px solid var(--line); }
.catalog-grid h3 { margin-top: 1.1rem; }
.catalog-grid article > p { color: var(--muted); }
.catalog-status { align-self: flex-start; padding: .25rem .5rem; font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.catalog-status.ready { background: #d9eee9; color: #155b57; }
.catalog-status.context { background: #dce6ef; color: #244d70; }
.catalog-status.supporting { background: #f7e6aa; color: #654d00; }
.catalog-status.archive { background: #ece7dc; color: #665e52; }
.catalog-links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: auto; padding-top: 1rem; }
.catalog-links a { font-weight: 800; text-decoration-color: var(--maize); text-decoration-thickness: 2px; text-underline-offset: .25rem; }
.archive-grid article { min-height: 230px; }
.catalog-note { margin-top: 1.2rem; padding: 1rem 1.2rem; border-left: 5px solid var(--line); color: var(--muted); background: rgba(255,255,255,.45); }
@media (max-width: 850px) {
  .site-header { align-items: flex-start; }
  nav { flex-wrap: wrap; justify-content: flex-end; gap: .7rem 1rem; }
  .portfolio-hero, .study-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .diagnostic-pair { grid-template-columns: 1fr; }
  .catalog-heading { grid-template-columns: 1fr; gap: 1rem; }
  .portfolio-hero { padding-top: 4rem; }
  .case-row { grid-template-columns: 44px 1fr; }
  .case-action { grid-column: 2; text-align: left; }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .study-aside { position: static; }
}
@media (max-width: 560px) {
  .site-header { padding: 1rem; flex-direction: column; }
  nav { justify-content: flex-start; }
  nav a:first-child, nav a:nth-child(2) { display: none; }
  .portfolio-hero, .section, .study-hero, .study-layout, .closing { padding-left: 1rem; padding-right: 1rem; }
  h1 { font-size: 3.15rem; }
  .evidence-card dl, .method-grid { grid-template-columns: 1fr; }
  .library-grid { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: 1fr; }
  .case-row, .case-row.feature { grid-template-columns: 1fr; margin-left: 0; margin-right: 0; }
  .case-action { grid-column: 1; }
  .result-list { display: grid; }
  footer, .next-study { flex-direction: column; }
}
