/* Theme tokens keep the visual system in one place. */
:root {
  /* The journal currently uses one light color scheme. */
  color-scheme: light;
  /* Main text colors. */
  --ink: #18221f;
  --ink-soft: #43504b;
  /* Main surface colors. */
  --paper: #f7f4ed;
  --paper-deep: #ece7dc;
  --white: #fffefa;
  /* Brand accent colors. */
  --accent: #9b382e;
  --accent-dark: #74271f;
  --teal: #1f5c58;
  /* Interface detail colors. */
  --line: #d9d1c4;
  --focus-inner: #fffefa;
  --focus-outer: #101816;
  /* Shared shape values. */
  --shadow: 0 22px 55px rgba(24, 34, 31, .13);
  --radius: 4px;
  /* Shared type families. */
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Maximum page width. */
  --max: 1240px;
}

/* Apply the same box model everywhere. */
* { box-sizing: border-box; }
/* Hidden elements must leave the layout. */
[hidden] { display: none !important; }
/* Smooth normal anchor jumps. */
html { scroll-behavior: smooth; }
/* Set the global page surface. */
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.62; }
/* Use the journal accent for links. */
a { color: var(--accent-dark); text-underline-offset: .2em; }
a:hover { color: var(--accent); }
/* Keep images inside their containers. */
img { max-width: 100%; height: auto; }
/* Inherit the page type and color in controls. */
button, input, textarea, select { font: inherit; color: inherit; }
/* Keep tap targets large enough. */
button, .button { min-height: 44px; }
/* Two colors keep focus visible on light and dark surfaces. */
:focus-visible { outline: 3px solid var(--focus-inner); outline-offset: 2px; box-shadow: 0 0 0 5px var(--focus-outer); }

/* Shared wrappers control line length. */
.shell { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.narrow { width: min(calc(100% - 2rem), 790px); }

/* The skip link appears on keyboard focus. */
.skip-link { position: fixed; z-index: 999; left: 1rem; top: 1rem; transform: translateY(-160%); background: #fff; padding: .75rem 1rem; color: #000; }
.skip-link:focus { transform: none; }

/* The sticky header keeps navigation nearby. */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247,244,237,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
/* Align the brand with navigation. */
.header-inner { display: flex; align-items: center; min-height: 82px; gap: 2rem; }
/* The brand links back to the homepage. */
.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 60px; height: 60px; object-fit: contain; flex: 0 0 auto; }
.brand strong { display: block; font: 700 1.12rem/1.15 var(--serif); letter-spacing: .015em; }
.brand small { display: block; color: var(--ink-soft); font-size: .7rem; margin-top: .18rem; max-width: 270px; line-height: 1.25; }
/* Desktop navigation stays on one row. */
.primary-nav { display: flex; align-items: center; gap: 1.25rem; }
.primary-nav a { color: var(--ink); text-decoration: none; font-weight: 650; font-size: .9rem; padding-block: .45rem; border-bottom: 2px solid transparent; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--accent-dark); border-bottom-color: var(--accent); }
/* Search receives a distinct outline. */
.search-link { border: 1px solid var(--ink) !important; border-radius: 999px; padding: .45rem .8rem !important; }
/* Mobile layouts reveal this control. */
.nav-toggle { display: none; border: 1px solid var(--ink); background: transparent; border-radius: 999px; padding: .45rem .85rem; }

/* Headings use the editorial typeface. */
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.25vw, 4.1rem); font-weight: 650; letter-spacing: -.035em; margin: 0 0 1.2rem; }
h2 { font-size: clamp(1.85rem, 3.4vw, 3rem); margin: 0 0 1rem; }
h3 { font-size: clamp(1.25rem, 2vw, 1.65rem); }
/* Eyebrows label page context. */
.eyebrow { margin: 0 0 .7rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 800; font-size: .73rem; color: var(--accent-dark); }
/* Ledes introduce the page. */
.lede { color: var(--ink-soft); font: 1.23rem/1.65 var(--serif); max-width: 62ch; }

/* The homepage photo leads into the issue. */
.home-photo-lead { position: relative; height: clamp(300px, 35vw, 440px); margin: clamp(2rem, 4vw, 3.5rem) auto 0; overflow: hidden; border: 1px solid #b9b0a2; background: var(--paper-deep); }
.home-photo-lead img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 47%; filter: saturate(.76) contrast(.95) brightness(.99); }

/* The hero presents the current issue. */
.hero { position: relative; min-height: 650px; display: grid; align-items: center; overflow: clip; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, var(--paper), #f0ece2); padding: clamp(3.5rem, 7vw, 7rem) 0; }
/* A dot field adds a quiet journal motif. */
.hero::before { content: ""; position: absolute; width: min(34vw, 420px); height: min(25vw, 310px); top: 7%; right: 2%; opacity: .5; background-image: radial-gradient(circle, rgba(31,92,88,.42) 0 1.15px, transparent 1.35px); background-size: 15px 15px; -webkit-mask-image: linear-gradient(225deg, #000 12%, rgba(0,0,0,.72) 42%, transparent 82%); mask-image: linear-gradient(225deg, #000 12%, rgba(0,0,0,.72) 42%, transparent 82%); pointer-events: none; }
/* The hero uses a text and cover grid. */
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr); gap: clamp(3rem, 7vw, 7rem); align-items: center; }
.hero-copy h1 { max-width: 13ch; }
.hero-subtitle { font: italic 1.28rem/1.5 var(--serif); color: var(--ink-soft); }
/* Cover links lift slightly on hover. */
.cover-link { display: block; justify-self: center; width: min(100%, 360px); transition: transform .25s ease; }
.cover-link:hover { transform: translateY(-5px); }
/* Every cover uses a flat offset edge. */
.issue-cover { display: block; border: 1px solid #bfb5a6; box-shadow: 8px 8px 0 #e3dbce; background: #ddd; }
.hero-cover { width: 100%; aspect-ratio: 3/4; object-fit: cover; }

/* Action buttons wrap on narrow screens. */
.button-row { display: flex; gap: .85rem; flex-wrap: wrap; margin: 1.8rem 0; }
.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: 1px solid var(--ink); padding: .7rem 1.05rem; font-weight: 750; border-radius: 2px; cursor: pointer; }
/* Primary actions use the red accent. */
.button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.button.primary:hover { background: var(--accent-dark); }
/* Quiet actions keep the paper surface. */
.button.quiet { background: transparent; color: var(--ink); }
.button.quiet:hover { background: var(--paper-deep); }
/* Unavailable actions remain visible. */
.button.unavailable { cursor: not-allowed; opacity: .7; border-style: dashed; }
.button.unavailable:hover { background: transparent; }
.text-link { font-weight: 800; }

/* Issue facts sit below hero actions. */
.issue-facts { display: flex; flex-wrap: wrap; gap: 1rem 2.4rem; margin-top: 2.2rem; }
.issue-facts div { display: grid; gap: .12rem; }
.issue-facts dt { text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; font-weight: 800; color: var(--ink-soft); }
.issue-facts dd { margin: 0; font-family: var(--serif); font-size: 1.1rem; }

/* Standard sections share vertical rhythm. */
.section { padding: clamp(3.5rem, 7vw, 7rem) 0; }
.home .section { padding-block: clamp(4.5rem, 8vw, 8rem); }
.section-heading { margin-bottom: 2.3rem; }
.split-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }

/* Feature cards form the issue overview. */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.feature-card { background: var(--white); padding: 1.55rem; min-height: 330px; display: flex; flex-direction: column; }
.feature-card h3 { margin-top: .3rem; }
.feature-card h3 a, .archive-card h2 a, .toc-list h4 a, .announcement-card h3 a, .announcement-list h2 a { color: var(--ink); text-decoration: none; }
.feature-card h3 a:hover, .archive-card h2 a:hover, .toc-list h4 a:hover { color: var(--accent-dark); text-decoration: underline; }
.feature-card .text-link { margin-top: auto; }
/* Small text carries secondary detail. */
.section-label, .byline, .small { color: var(--ink-soft); font-size: .86rem; }

/* The dark band separates journal context. */
.band { background: var(--ink); color: #f6f0e6; padding: clamp(3.5rem, 6vw, 6rem) 0; }
.band a { color: #ffd8c7; }
.band .eyebrow { color: #efaaa2; }
.band-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; align-items: start; }
.band .prose { color: #e6e1d9; }

/* Prose styles support long reading. */
.prose { font: 1.08rem/1.82 var(--serif); color: #28332f; }
.prose h2, .prose h3 { margin-top: 2.2em; }
.prose a { overflow-wrap: anywhere; }
.prose.compact { font-size: 1rem; }

/* Inner pages reuse the photo treatment. */
.page-photo { height: clamp(300px, 34vw, 420px); margin: clamp(2rem, 4vw, 3.5rem) auto 0; overflow: hidden; border: 1px solid #b9b0a2; background: var(--paper-deep); }
.page-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; filter: saturate(.76) contrast(.95) brightness(.99); }
.page-photo-submit img { object-position: 50% 46%; }
/* Information pages use a tighter photo rhythm. */
.information-page .page-photo { height: clamp(240px, 28vw, 350px); margin-top: clamp(1.25rem, 2.5vw, 2rem); }

/* Page headers share one paper gradient. */
.page-hero, .issue-hero, .article-header { padding: clamp(3.7rem, 8vw, 7.2rem) 0; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, var(--paper), #eee9df); }
.page-hero.with-photo { padding-block: clamp(2.8rem, 5vw, 4.8rem); background: var(--paper); }
.compact-hero h1 { font-size: clamp(2.2rem, 4vw, 3.9rem); }
/* Compact public pages avoid oversized empty bands. */
.announcements-page .page-hero { padding-block: clamp(2.4rem, 4vw, 3.5rem); }
.information-page .page-hero { padding-top: clamp(2.4rem, 4vw, 3.5rem); padding-bottom: clamp(1.5rem, 2.5vw, 2rem); }
.information-page .page-hero .lede { margin-bottom: 0; }

/* Editorial information starts closer to its page heading. */
.announcements-page main > .section { padding-block: clamp(2.75rem, 5vw, 4.5rem); }
.information-page main > .section { padding-top: clamp(2rem, 3vw, 3rem); padding-bottom: clamp(2.75rem, 5vw, 4.5rem); }
.information-page main > .section > :first-child { margin-top: 0; }
.information-page main > .section > :last-child { margin-bottom: 0; }
/* Information subtitles keep nearby text connected. */
.information-page .prose h2 { font-size: clamp(1.8rem, 3vw, 2.65rem); margin-top: 1.4em; }

/* Issue headers place the cover beside copy. */
.issue-hero-grid { display: grid; grid-template-columns: minmax(220px, 360px) 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.issue-hero .issue-cover { width: 100%; aspect-ratio: 3/4; object-fit: cover; }

/* Metadata uses aligned definition lists. */
.metadata-list { margin: 0; }
.metadata-list div { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.metadata-list dt { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; color: var(--ink-soft); }
.metadata-list dd { margin: .25rem 0 0; overflow-wrap: anywhere; }
.inline-metadata { display: flex; gap: 1.5rem 2.8rem; flex-wrap: wrap; margin-top: 2rem; }
.inline-metadata div { border: 0; padding: 0; }

/* Content pages reserve room for a sidebar. */
.issue-layout, .article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(2.5rem, 6vw, 6rem); padding-block: clamp(3.5rem, 7vw, 7rem); }
/* Historical issues can use one column. */
.issue-layout-single { grid-template-columns: minmax(0, 1fr); }
.issue-layout-single .issue-contents { width: min(100%, 980px); margin-inline: auto; }

/* Table sections keep clear separation. */
.toc-section + .toc-section { margin-top: 3.3rem; }
.toc-section > h3 { border-top: 4px solid var(--ink); padding-top: .8rem; font-size: 1.45rem; }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { display: grid; grid-template-columns: 1fr auto; gap: 2rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.toc-list h3 { margin: 0 0 .35rem; font-size: 1.22rem; }
.toc-list p { margin: 0; }
.pages { font-family: var(--serif); white-space: nowrap; color: var(--ink-soft); }

/* Sidebar cards group supporting facts. */
.sidebar-card { background: var(--white); border: 1px solid var(--line); padding: 1.3rem; margin-bottom: 1rem; }
.sidebar-card h2 { font-size: 1.35rem; }
.sidebar-card h3 { font-size: 1.05rem; margin-top: 1.6rem; }
.muted-card { background: var(--paper-deep); }
.sticky-card { position: sticky; top: 105px; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li + li { margin-top: .75rem; }

/* Archive cards pair covers with titles. */
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3.2rem 2rem; }
.archive-card { display: grid; grid-template-columns: 125px 1fr; gap: 1.25rem; align-items: start; }
.archive-cover img { width: 125px; aspect-ratio: 3/4; object-fit: cover; border: 1px solid #bfb5a6; box-shadow: 6px 6px 0 #e3dbce; }
.archive-card h2 { font-size: 1.4rem; }

/* Announcement cards use a teal rule. */
.announcement-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.announcement-card { border-top: 4px solid var(--teal); background: var(--white); padding: 1.5rem; }
.announcement-card time, .announcement-list time { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.announcement-list article { padding: 2rem 0; border-bottom: 1px solid var(--line); }
.announcements-page .announcement-list article:first-child { padding-top: 0; }
.announcements-page .announcement-list article:last-child { padding-bottom: 0; }

/* Article headers limit very long titles. */
.article-header h1 { max-width: 18ch; font-size: clamp(2.05rem, 3.5vw, 3.55rem); }
/* Breadcrumbs show the archive path. */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .55rem; font-size: .8rem; margin-bottom: 2.5rem; }
/* Author cards keep affiliations readable. */
.author-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.1rem; margin-top: 2.2rem; }
.author { border-left: 3px solid var(--accent); padding-left: .8rem; display: grid; }
.author span, .author a { font-size: .83rem; color: var(--ink-soft); }

/* Abstracts open the article body. */
.abstract { border-top: 5px solid var(--ink); border-bottom: 1px solid var(--line); padding: 1.5rem 0 2rem; margin-bottom: 3rem; }
.abstract h2 { font-size: 1.45rem; }
.abstract p { font: 1.15rem/1.75 var(--serif); }

/* Reader headings keep downloads nearby. */
.reader-heading-row { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: 1rem; }
/* The reader uses a dark document frame. */
.pdf-reader { border: 1px solid #555; background: #525659; min-height: 700px; }
/* Reader controls stay visible while scrolling. */
.pdf-toolbar { position: sticky; top: 82px; z-index: 5; display: flex; align-items: center; gap: .45rem; padding: .55rem; background: #252827; color: #fff; }
.pdf-toolbar button, .pdf-toolbar a, .pdf-toolbar input { min-height: 34px; border: 1px solid #777; background: #3b3f3e; color: #fff; padding: .3rem .55rem; text-decoration: none; }
.pdf-toolbar input { width: 4rem; }
.toolbar-spacer { flex: 1; }
/* The stage may scroll around a large page. */
.pdf-stage { min-height: 650px; padding: 1.5rem; overflow: auto; display: grid; place-items: start center; }
.pdf-stage canvas { background: #fff; box-shadow: 0 3px 16px rgba(0,0,0,.35); max-width: none; }
.pdf-status { color: #fff; }

/* Citation exports stay compact. */
.citation-links { display: flex; gap: .55rem; flex-wrap: wrap; }
.citation-links a { background: var(--paper-deep); padding: .35rem .55rem; text-decoration: none; font-size: .82rem; }
.copy-citation { margin-top: .8rem; width: 100%; border: 1px solid var(--ink); background: transparent; color: var(--ink); padding: .65rem .8rem; font-weight: 750; cursor: pointer; }
.copy-citation:hover { background: var(--paper-deep); }

/* Notices highlight useful context. */
.notice { padding: 1rem 1.2rem; border-left: 5px solid var(--teal); background: #e7f2ef; margin: 0 0 2rem; }
.notice.warning { border-color: #ad6c00; background: #fff0ca; }

/* Search controls use a joined field. */
.search-form label { display: block; font-weight: 800; margin-bottom: .45rem; }
.search-input-row { display: flex; }
.search-input-row input { flex: 1; min-height: 54px; border: 2px solid var(--ink); padding: .7rem 1rem; background: var(--white); }
.search-input-row button { border: 2px solid var(--ink); border-left: 0; background: var(--ink); color: #fff; padding: .7rem 1rem; }
.search-result { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.search-result h2 { font-size: 1.4rem; margin-bottom: .5rem; }

/* Homepage news uses two columns. */
.home .announcement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; }
/* The branding strip joins both marks. */
.home-branding { background: linear-gradient(180deg, var(--paper-deep), var(--paper)); border-block: 1px solid var(--line); padding: clamp(3rem, 6vw, 5rem) 0; }
.home-branding-inner { display: flex; align-items: center; justify-content: center; gap: clamp(1.5rem, 5vw, 4rem); }
.home-branding img { display: block; width: clamp(150px, 18vw, 210px); height: auto; opacity: .92; }

/* The footer closes every public page. */
.site-footer { background: #101816; color: #e9e4db; padding: 4rem 0 1.5rem; }
.site-footer a { color: #ffd6c6; }
.site-footer h2 { font-size: 1.18rem; }
.site-footer address { font-style: normal; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 3rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1.5rem; border-top: 1px solid #45504c; margin-top: 3rem; padding-top: 1rem; font-size: .76rem; color: #b9c0bc; }

/* Inline code uses a quiet surface. */
code { background: var(--paper-deep); padding: .1em .3em; border-radius: 2px; }

/* Tablet layouts collapse wide grids. */
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 81px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 1rem; flex-direction: column; align-items: stretch; }
  .primary-nav.open { display: flex; }
  .hero-grid, .issue-hero-grid, .band-grid, .issue-layout, .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-main, .article-sidebar { min-width: 0; }
  .hero-copy { order: 0; }
  .cover-link { order: 1; width: min(55%, 320px); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .archive-grid { grid-template-columns: 1fr 1fr; }
  .announcement-grid { grid-template-columns: 1fr; }
  .home .announcement-grid { grid-template-columns: 1fr 1fr; }
  .issue-sidebar, .article-sidebar { grid-row: auto; }
  .sticky-card { position: static; }
}

/* Phone layouts reduce width pressure. */
@media (max-width: 650px) {
  .brand small { display: none; }
  .brand img { width: 50px; height: 50px; }
  .header-inner { min-height: 70px; }
  .primary-nav { top: 69px; }
  .feature-grid, .archive-grid, .footer-grid { grid-template-columns: 1fr; }
  .home-photo-lead, .page-photo { height: 250px; margin-top: 1rem; }
  .hero { min-height: auto; padding-block: 3.5rem 4.5rem; }
  .hero-grid { gap: 2.8rem; }
  .hero::before { width: 72vw; height: 52vw; top: auto; right: -10%; bottom: 3%; opacity: .38; }
  .cover-link { width: min(65%, 230px); }
  .archive-card { grid-template-columns: 95px 1fr; }
  .archive-cover img { width: 95px; }
  .split-heading, .reader-heading-row, .footer-bottom { display: block; }
  .toc-list li { grid-template-columns: 1fr; gap: .3rem; }
  .pdf-toolbar { top: 70px; flex-wrap: wrap; }
  .pdf-stage { padding: .6rem; min-height: 520px; }
  .article-layout { width: min(calc(100% - 1rem), var(--max)); }
  .home .announcement-grid { grid-template-columns: 1fr; }
  .home-branding-inner { gap: 1rem; }
  .home-branding img { width: min(42vw, 165px); }
}

/* Motion preferences disable animation. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Print keeps only article content. */
@media print {
  .site-header, .site-footer, .pdf-reader, .button-row, .reader-section, .article-sidebar { display: none !important; }
  body { background: #fff; color: #000; }
  .article-layout { display: block; }
}
