/* curviocheerdck.com — shared stylesheet
   Scholarly monograph: parchment ground, maroon headings, forest-green links,
   hairline rules, numbered sections, sticky table of contents. */

:root {
  --parchment: #F3EBD8;
  --sand: #E9DDC2;
  --ink: #2A2420;
  --maroon: #5B1A1E;
  --green: #234D32;
  --green-dark: #183624;
  --rule: #C9B99A;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Helvetica, Arial, sans-serif;
  --s1: 4px;
  --s2: 8px;
  --s3: 16px;
  --s4: 24px;
  --s5: 40px;
  --s6: 64px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  min-width: 0;
}

img, svg { max-width: 100%; display: block; }
img { height: auto; }

a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
a:hover { color: var(--green-dark); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: normal;
  letter-spacing: -0.01em;
  color: var(--maroon);
  line-height: 1.2;
  margin: 0 0 var(--s4);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

p, ul, ol, table, figure, dl, address { margin: 0 0 var(--s4); }
address { font-style: normal; }
sup { line-height: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--s3);
  top: -100px;
  background: var(--green);
  color: var(--parchment);
  padding: var(--s2) var(--s3);
  font-family: var(--sans);
  font-size: 14px;
  z-index: 100;
}
.skip-link:focus { top: var(--s2); color: var(--parchment); }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--s4);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.2;
  padding: 10px 18px;
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--parchment);
  text-decoration: none;
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--parchment); }
.btn--ghost { background: transparent; color: var(--green); }
.btn--ghost:hover { background: transparent; color: var(--green-dark); border-color: var(--green-dark); }
.btn--light, .hero .btn--light { background: var(--parchment); border-color: var(--parchment); color: var(--maroon); }
.btn--light:hover, .hero .btn--light:hover { background: var(--sand); border-color: var(--sand); color: var(--maroon); }
.btn--ghost-light { background: transparent; border-color: var(--parchment); color: var(--parchment); }
.btn--ghost-light:hover { background: transparent; border-color: var(--sand); color: var(--sand); }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--parchment);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--maroon);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.brand:hover { color: var(--maroon); }
.brand__mark { width: 28px; height: 28px; flex-shrink: 0; }

.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}
.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--s4);
  font-family: var(--sans);
  font-size: 14px;
}
.site-nav__list a {
  color: var(--ink);
  text-decoration: none;
  padding: var(--s2) 0;
  display: inline-block;
  border-bottom: 1px solid transparent;
}
.site-nav__list a:hover,
.site-nav__list a[aria-current="page"] {
  color: var(--green);
  border-bottom-color: var(--green);
}
.site-nav__item--guides { display: none; }

.cta {
  flex-shrink: 0;
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.2;
  padding: 8px 14px;
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--parchment);
  text-decoration: none;
}
.cta:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--parchment); }

.nav-toggle { display: none; }

@media (max-width: 1023px) {
  .site-nav__item--topic { display: none; }
  .site-nav__item--guides { display: block; }
}

@media (max-width: 767px) {
  :root { --header-h: 52px; }
  .cta { margin-left: auto; }
  .cta__long { display: none; }
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--maroon);
    cursor: pointer;
    flex-shrink: 0;
  }
  .nav-toggle__bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--maroon);
    margin: 0 auto;
  }
  .nav-toggle.is-open .nav-toggle__bar:nth-child(2) { width: 12px; }
  .site-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0; bottom: 0;
    background: var(--parchment);
    border-top: 1px solid var(--rule);
    padding: var(--s4);
    z-index: 50;
    overflow-y: auto;
  }
  .site-nav.is-open { display: block; }
  .site-nav__list { flex-direction: column; gap: 0; font-size: 18px; }
  .site-nav__list li { border-bottom: 1px solid var(--rule); }
  .site-nav__list a { display: block; padding: var(--s3) 0; border-bottom: 0; }
  .site-nav__item--topic, .site-nav__item--guides { display: block; }
}

/* ---------- Hero (flat two-tone band) ---------- */
.hero {
  background: linear-gradient(90deg, var(--maroon) 0 50%, var(--green) 50% 100%);
  color: var(--parchment);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.hero__main {
  background: var(--maroon);
  padding: var(--s6) var(--s5) var(--s6) 0;
}
.hero__aside {
  background: var(--green);
  padding: var(--s6) 0 var(--s6) var(--s5);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
}
.hero h1 { color: var(--parchment); font-size: 2.75rem; margin-bottom: var(--s4); max-width: 20ch; }
.hero__kicker,
.hero__aside-title {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 var(--s3);
}
.hero__lede { font-size: 1.15rem; max-width: 48ch; margin-bottom: var(--s5); }
.hero__actions { margin: 0; display: flex; flex-wrap: wrap; gap: var(--s3); }
.hero a { color: var(--parchment); }
.hero a:hover { color: var(--sand); }
.hero__meta { margin: var(--s4) 0 0; }
.hero__meta div { padding: var(--s3) 0; border-top: 1px solid rgba(243, 235, 216, .35); }
.hero__meta dt { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; margin-bottom: var(--s1); }
.hero__meta dd { margin: 0; }

@media (max-width: 767px) {
  .hero { background: var(--maroon); }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__main { padding: var(--s5) 0; }
  .hero__aside { margin: 0 calc(-1 * var(--s4)); padding: var(--s5) var(--s4); }
  .hero h1 { font-size: 2rem; }
}

/* ---------- Home sections ---------- */
.section { padding: var(--s6) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section__kicker {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: var(--s3);
}
.section__title { font-size: 2rem; }
.section__intro, .prose { max-width: 68ch; }
.section__intro { margin-bottom: var(--s5); }

/* Register rows (not cards) */
.register {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 68ch;
}
.register__row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: var(--s4);
  padding: var(--s5) 0;
  border-top: 1px solid var(--rule);
}
.register__row:last-child { border-bottom: 1px solid var(--rule); }
.register__numeral {
  font-family: var(--serif);
  font-size: 3rem;
  line-height: 1;
  color: var(--maroon);
}
.register__body { min-width: 0; }
.register__title { font-size: 1.5rem; margin: 0 0 var(--s4); }
.register__title a { color: var(--maroon); text-decoration: none; }
.register__title a:hover { color: var(--green-dark); text-decoration: underline; }
.register__abstract { margin: 0 0 var(--s4); }
.register__link {
  display: block;
  text-align: right;
  font-family: var(--sans);
  font-size: 14px;
}

@media (max-width: 599px) {
  .register__row { grid-template-columns: 1fr; }
  .register__numeral { font-size: 2.5rem; }
}

/* Statistics */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s4);
  margin: var(--s5) 0 0;
  max-width: 68ch;
  padding-top: var(--s4);
  border-top: 1px solid var(--rule);
}
.stat { display: flex; flex-direction: column; }
.stat__value { font-size: 2.5rem; line-height: 1; color: var(--maroon); }
.stat__label { font-family: var(--sans); font-size: 13px; margin-top: 12px; }

@media (max-width: 599px) {
  .stats { grid-template-columns: 1fr; }
}

/* ---------- Two-region layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: var(--s6);
  padding-top: var(--s6);
  padding-bottom: var(--s6);
  align-items: start;
}
.toc-wrap { min-width: 0; }
.toc {
  position: sticky;
  top: 24px;
  background: var(--sand);
  padding: var(--s4);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
}
.toc__title {
  margin: 0 0 var(--s3);
  color: var(--maroon);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
}
.toc__list { margin: 0; padding-left: var(--s4); }
.toc__list li { margin-bottom: var(--s2); }
.toc__list li::marker { color: var(--maroon); }
.toc__list a { color: var(--ink); text-decoration: none; }
.toc__list a:hover { color: var(--green); text-decoration: underline; }
.toc__list a.is-active { color: var(--green); text-decoration: underline; }

@media (max-width: 899px) {
  .layout { grid-template-columns: 1fr; gap: var(--s5); padding-top: var(--s5); }
  .toc { position: static; }
}

/* ---------- Article ---------- */
.article {
  max-width: 68ch;
  min-width: 0;
  counter-reset: sec;
}
.article__kicker {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: var(--s3);
}
.article .lede { font-size: 1.15rem; margin-bottom: var(--s5); }
.article h2 {
  counter-increment: sec;
  counter-reset: sub;
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule);
  scroll-margin-top: var(--s4);
}
.article h2::before {
  content: counter(sec) ".";
  display: inline-block;
  min-width: 2.25rem;
  color: var(--maroon);
}
.article h3 {
  counter-increment: sub;
  margin-top: var(--s5);
}
.article h3::before {
  content: counter(sec) "." counter(sub);
  display: inline-block;
  min-width: 2.5rem;
  color: var(--maroon);
}
.article ul, .article ol { padding-left: var(--s4); }
.article li { margin-bottom: var(--s2); }

.scope-note {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: var(--s4) 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: var(--s4);
}
.scope-note p:last-child { margin-bottom: 0; }

/* Footnotes and references */
.fn a {
  color: var(--maroon);
  text-decoration: none;
  font-family: var(--sans);
  font-size: .7em;
  padding: 0 1px;
}
.fn a:hover { color: var(--maroon); text-decoration: underline; }
.references {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.6;
}
.references li { margin-bottom: var(--s3); }
.references li:target { border-left: 2px solid var(--maroon); padding-left: var(--s3); margin-left: calc(-1 * var(--s3) - 2px); }
.ref-back { margin-left: var(--s2); text-decoration: none; }

/* Figures */
.figure { margin: var(--s5) 0; }
.figure__image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.figure figcaption, .map figcaption {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  margin-top: var(--s2);
}

/* Tables */
.table-wrap { overflow-x: auto; margin: var(--s4) 0; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--sand);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
}
caption {
  text-align: left;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--maroon);
  padding: 0 0 var(--s2);
}
th, td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
  min-width: 88px;
}
th { color: var(--maroon); font-weight: normal; }
thead th { border-bottom: 1px solid var(--maroon); }
tbody th { font-family: var(--serif); font-size: 15px; }

/* ---------- Forms ---------- */
.form { max-width: 68ch; }
.form[hidden] { display: none; }
.field { margin-bottom: var(--s4); }
.field label {
  display: block;
  font-family: var(--sans);
  font-size: 14px;
  margin-bottom: var(--s2);
  color: var(--maroon);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--sand);
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
}
.field textarea { min-height: 160px; resize: vertical; }
.field__error {
  display: none;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--maroon);
  margin: var(--s2) 0 0;
}
.field.is-invalid .field__error { display: block; }
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-color: var(--maroon); }
.field--check { display: flex; gap: var(--s3); align-items: flex-start; }
.field--check input { width: 18px; height: 18px; margin: 4px 0 0; padding: 0; flex-shrink: 0; }
.field--check label { color: var(--ink); margin-bottom: 0; line-height: 1.5; }
.form__actions { margin: var(--s5) 0 0; }
.form-success {
  display: none;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: var(--s4) 0;
  margin: var(--s4) 0;
}
.form-success.is-visible { display: block; }
.form-success p { margin: 0; }

/* Contact details */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
}
.contact-grid h3 { margin-top: 0; }
.contact-grid h3::before { content: none; }
.contact-list div { padding: var(--s2) 0; border-bottom: 1px solid var(--rule); }
.contact-list dt { font-family: var(--sans); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--maroon); }
.contact-list dd { margin: var(--s1) 0 0; }
@media (max-width: 767px) {
  .contact-grid { grid-template-columns: 1fr; gap: var(--s4); }
}

.map { margin: var(--s4) 0 0; }
.map__svg {
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  background: var(--sand);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: var(--s6) 0 var(--s5);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--s5);
}
.site-footer h2 {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: var(--s3);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--s2); }
.site-footer__bottom {
  border-top: 1px solid var(--rule);
  margin-top: var(--s5);
  padding-top: var(--s4);
  font-size: 13px;
}
.site-footer__bottom p { margin: 0; }
.footer-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  font: inherit;
  cursor: pointer;
}
.footer-btn:hover { color: var(--green-dark); }
@media (max-width: 767px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: var(--s4); }
}

/* ---------- Cookie consent ---------- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: var(--sand);
  border-top: 1px solid var(--rule);
  padding: var(--s4);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
}
.cookie-banner__text { margin: 0; flex: 1 1 280px; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: var(--s2); }

.cookie-prefs {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s4);
  background: rgba(42, 36, 32, .6);
}
.cookie-prefs[hidden] { display: none; }
.cookie-prefs__panel {
  background: var(--parchment);
  border: 1px solid var(--rule);
  max-width: 520px;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding: var(--s5) var(--s4);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
}
.cookie-prefs__title { font-size: 1.5rem; }
.cookie-prefs__option {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  padding: var(--s3) 0;
  border-top: 1px solid var(--rule);
}
.cookie-prefs__option input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; }
.cookie-prefs__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule);
}

/* ---------- Small screens ---------- */
@media (max-width: 399px) {
  .wrap { padding: 0 var(--s3); }
  .site-header__inner { gap: var(--s2); }
  .brand { font-size: 1rem; gap: 6px; }
  .brand__mark { width: 24px; height: 24px; }
  .cta { padding: 8px 10px; }
  h1 { font-size: 1.75rem; }
  .hero h1 { font-size: 1.75rem; }
  .hero__aside { margin: 0 calc(-1 * var(--s3)); padding: var(--s5) var(--s3); }
  .section__title { font-size: 1.5rem; }
  .article h2 { font-size: 1.5rem; }
  .register__title { font-size: 1.25rem; }
  .toc { padding: var(--s3); }
  th, td { padding: 10px 12px; }
  .cookie-banner { padding: var(--s3); }
  .cookie-prefs { padding: var(--s3); }
  .cookie-prefs__panel { padding: var(--s4) var(--s3); }
}

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