/* Same publishing system as the Emotional Integration site:
   warm paper, navy, Georgia for reading, Segoe UI for the interface,
   rounded cards, pill buttons. One column on a phone, three downloads on a desktop. */
:root {
  --ink: #1c2430;
  --blue: #3a6ea5;
  --navy: #1e3354;
  --paper: #fbf8f2;
  --line: #d5deea;
  --card: #f7f1e3;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
a { color: var(--navy); }
a:focus, .btn:focus {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.wrap {
  width: min(calc(52rem + 200px), 100%);
  margin-inline: auto;
  padding-inline: 1rem;
}
.site-header {
  background: #eef3f8;
  border-bottom: 1px solid var(--line);
  padding: 2.2rem 0 1.6rem;
}
.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2rem;
}
.header-copy {
  flex: 1 1 18rem;
  min-width: 0;
  max-width: 100%;
}
.header-portrait {
  flex: 0 0 auto;
  width: 13rem;
  height: 13rem;
  max-width: 100%;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 12px;
}
.book-area {
  background-color: var(--paper);
  background-image: linear-gradient(rgba(251, 248, 242, 0.75), rgba(251, 248, 242, 0.75)), url("/assets/cover.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%, cover;
  padding: 1.5rem 0 2.4rem;
}
.publisher {
  margin: 0 0 0.8rem;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--blue);
}
h1 {
  margin: 0;
  max-width: 100%;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: clamp(1.62rem, 4.2vw, 2.5rem);
  font-weight: 650;
  line-height: 1.1;
  color: var(--navy);
}
.subtitle {
  margin: 0.45rem 0 0;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  color: var(--navy);
}
.opening {
  margin: 0.85rem 0 0;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy);
}
.status {
  margin: 1rem 0 0;
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 650;
  color: var(--navy);
}
main { padding: 0 0 3rem; }
.why-matters {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 2.2rem 0 2.4rem;
}
.why-matters h2 {
  margin: 0 0 0.6rem;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1.35rem;
  color: var(--navy);
}
.why-matters p { margin: 0.85rem 0 0; }
.support {
  background: #d4e4f4;
  border-top: 1px solid #b7cfe6;
  border-bottom: 1px solid #b7cfe6;
  padding: 2.1rem 0 2.2rem;
}
.support p {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
}
.support-line {
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.45;
  color: var(--navy);
}
.donate-form { margin: 1rem 0 0; }
.donate-form input[type="image"] {
  border: 0;
  height: auto;
  vertical-align: middle;
}
.archive-download { text-align: center; font-family: "Segoe UI", Arial, sans-serif; font-size: 0.95rem; margin: 0.5rem 0 1.5rem; }
.archive-download a { display: inline-block; padding: 0.55rem 0.3rem; text-decoration: underline; text-underline-offset: 0.2em; }
.downloads {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 801px) {
  .downloads {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.card {
  background: var(--card);
  border-radius: 18px;
  padding: 1.3rem 1.35rem 1.4rem;
  box-shadow: 0 1px 0 rgba(30, 51, 84, 0.06);
}
.card h2 {
  margin: 0 0 0.4rem;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1.35rem;
  color: var(--navy);
}
.card p { margin: 0 0 1rem; }
.file {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 650;
  text-decoration: none;
}
.waiting {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #3d4a5c;
}
.book-offer {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  margin-top: 1.8rem;
}
.book-offer-copy,
.book-offer-buy {
  flex: 1 1 0;
  width: 50%;
  min-width: 0;
  background: transparent;
  border: 1px solid var(--navy);
  border-radius: 18px;
  padding: 1rem;
}
.book-offer-copy p { margin: 0.75rem 0 0; }
.book-offer-copy .lead { margin: 0; }
.book-offer-buy {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.book-cover-link {
  flex: 0 0 auto;
  line-height: 0;
}
.book-cover-link img {
  display: block;
  width: 200px;
  height: auto;
  box-shadow: 0 8px 22px rgba(30, 51, 84, 0.22);
}
.book-offer-note {
  flex: 1 1 auto;
  min-width: 0;
}
.book-offer-note a {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 650;
  line-height: 1.25;
}
.book-offer-note p {
  margin: 0.45rem 0 0;
  font-size: 0.98rem;
}
.intro { margin-top: 1.8rem; }
.author-work { margin-top: 2.2rem; }
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
@media (min-width: 700px) {
  .project-grid { grid-template-columns: 1fr 1fr; }
}
.project {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--card);
  border-radius: 18px;
  padding: 1rem;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(30, 51, 84, 0.06);
}
.project img {
  display: block;
  width: 100%;
  height: 10.5rem;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
}
.project h3 {
  margin: 0.7rem 0 0;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1.2rem;
  color: var(--navy);
}
.project p { margin: 0; }
.project-link {
  margin-top: auto;
  padding-top: 0.45rem;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--navy);
  text-decoration: underline;
}
.project:hover .project-link,
.project:focus .project-link { color: var(--blue); }
.intro h2 {
  margin: 1.4rem 0 0.6rem;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1.35rem;
  color: var(--navy);
}
.intro h2:first-child { margin-top: 0; }
.lead {
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--navy);
}
.note {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #3d4a5c;
}
.back {
  margin: 0 0 1rem;
  font-family: "Segoe UI", Arial, sans-serif;
}
.license-summary h2,
.license-full h2 {
  margin: 0 0 0.6rem;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1.35rem;
  color: var(--navy);
}
.license-full { margin-top: 2.2rem; }
.license-text {
  margin: 0;
  padding: 1.2rem 1.3rem;
  border-radius: 18px;
  background: var(--card);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.site-footer {
  border-top: 1px solid var(--line);
  background: #eef3f8;
  padding: 1.3rem 0 1.6rem;
  font-family: "Segoe UI", Arial, sans-serif;
}
.site-footer p { margin: 0.2rem 0; }
.footer-contact {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.copy-email {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  cursor: pointer;
}
.copy-email:hover { color: var(--blue); }
.copy-email:focus {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.copied-note {
  display: inline-block;
  margin: 0;
  padding: 0.02rem 0.4rem;
  border: 1px solid var(--navy);
  border-radius: 5px;
  background: #fff;
  color: var(--navy);
  font-size: 0.75rem;
  line-height: 1.35;
}
.copied-note[hidden] { display: none; }

@media (max-width: 540px) {
  .header-copy { flex-basis: 100%; }
  .site-header h1 {
    font-size: 1.55rem;
    max-width: 16rem;
  }
}
@media (max-width: 800px) {
  .site-header { padding: 1.5rem 0 1.2rem; }
  .btn { width: 100%; }
  .book-area { padding: 1.2rem 0 1.8rem; }
  .book-offer {
    flex-direction: column;
    align-items: stretch;
    gap: 1.15rem;
    margin-top: 1.2rem;
  }
  .book-offer-copy,
  .book-offer-buy {
    flex: 0 0 auto;
    width: 100%;
  }
  .book-offer-buy {
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
  }
  .book-cover-link {
    width: min(90vw, 28rem);
    max-width: 100%;
  }
  .book-cover-link img { width: 100%; }
  .book-offer-note {
    flex-basis: auto;
    min-width: 0;
    max-width: 22rem;
    text-align: center;
  }
  .intro { margin-top: 1.2rem; }
  .why-matters { padding: 1.7rem 0 1.8rem; }
  .support { padding: 1.7rem 0 1.8rem; }
  .author-work { margin-top: 1.6rem; }
  .lead { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Article addendums use the site's warm paper and muted blue palette. */
.site-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.3rem; font-family: "Segoe UI", Arial, sans-serif; }
.site-nav a { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0.35rem 1rem; border: 1px solid #aabdd0; border-radius: 999px; background: rgba(255,255,255,0.65); color: var(--navy); font-size: 0.95rem; font-weight: 600; text-decoration: none; }
.site-nav a:hover { background: #e3edf5; border-color: var(--blue); }
.site-nav a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.site-nav a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.contact-main { padding-bottom: 0; }
.contact-details { padding: 2.1rem 0; }
.contact-details h2 { margin: 0 0 0.7rem; font-family: "Segoe UI", Arial, sans-serif; color: var(--navy); }
.contact-details p { margin: 0; font-size: 1.2rem; overflow-wrap: anywhere; }
.contact-details a { text-underline-offset: 0.2em; }
.article-preview { background: #eef3f8; border-top: 1px solid #e1d8c7; padding: 2.2rem 0 2.4rem; }
.urgency-preview { background: #f7f1e3; }
.article-preview h2, .articles-intro h2 { margin: 0 0 0.7rem; font-family: "Segoe UI", Arial, sans-serif; font-size: 1.65rem; line-height: 1.25; color: var(--navy); }
.article-preview p { margin: 0.9rem 0 0; font-size: 1.08rem; }
.read-article-link { display: inline-block; padding-block: 0.35rem; font-family: "Segoe UI", Arial, sans-serif; font-weight: 650; text-decoration: underline; text-underline-offset: 0.2em; }
.reading-wrap { max-width: 50rem; padding-inline: 1.4rem; }
.articles-main { padding-bottom: 0; }
.articles-intro { padding: 2.1rem 0; }
.articles-intro p { margin: 0; }
.article-index { margin-top: 1.5rem; }
.article-index h3 { font-family: "Segoe UI", Arial, sans-serif; color: var(--navy); }
.article-index ol { margin: 0; padding-left: 1.4rem; }
.article-index li { padding-left: 0.3rem; }
.article-index li + li { margin-top: 1rem; }
.article-index li > a { font-weight: 700; text-underline-offset: 0.2em; }
.article-index li > p { margin: 0.25rem 0 0; font-size: 1rem; line-height: 1.5; }
.published-article { padding: 2.8rem 0 3rem; border-top: 1px solid #dfd6c7; scroll-margin-top: 1rem; }
.article-palette-1 { background: #f7f1e3; }
.article-palette-2 { background: #f2ecdf; }
.article-palette-3 { background: #eef3f8; }
.article-palette-4 { background: #e3edf5; }
.article-palette-5 { background: #ede5d6; }
.article-heading h2 { margin: 0 0 0.6rem; font-family: "Segoe UI", Arial, sans-serif; font-size: clamp(1.75rem, 4.4vw, 2.35rem); line-height: 1.2; color: var(--navy); }
.article-byline { margin: 0 0 0.3rem; font-family: "Segoe UI", Arial, sans-serif; font-size: 1rem; font-weight: 650; color: var(--navy); }
.article-date { margin: 0; font-family: "Segoe UI", Arial, sans-serif; font-size: 0.95rem; color: #465469; }
.article-downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1rem; margin-top: 1rem; padding-block: 0.75rem; border-top: 1px solid #d9d0bf; border-bottom: 1px solid #d9d0bf; font-family: "Segoe UI", Arial, sans-serif; }
.article-downloads a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; text-underline-offset: 0.2em; }
.article-content { margin-top: 1.8rem; font-size: 1.08rem; line-height: 1.8; overflow-wrap: break-word; }
.article-content p { margin: 0 0 1.15rem; }
.article-content h3 { margin: 2.2rem 0 0.9rem; font-family: "Segoe UI", Arial, sans-serif; font-size: 1.35rem; line-height: 1.35; color: var(--navy); }
.article-content blockquote { margin: 1.5rem 0; padding: 1rem 1.2rem; border-left: 3px solid var(--blue); background: rgba(255,255,255,0.45); }
.article-content blockquote p:last-child { margin-bottom: 0; }
.article-content a, .article-return a { text-underline-offset: 0.17em; }
.article-return { margin: 2rem 0 0; font-family: "Segoe UI", Arial, sans-serif; font-weight: 650; }
@media (max-width: 800px) {
  .article-preview { padding: 1.7rem 0 1.8rem; }
  .published-article { padding: 2rem 0 2.2rem; }
  .article-content { font-size: 1.03rem; line-height: 1.75; }
  .article-downloads span { flex-basis: 100%; }
}

/* Public, read-only statistics dashboard. */
.stats-page { background: var(--paper); }
.stats-main { padding-top: 1.8rem; }
.stats-period, .stats-help { font-family: "Segoe UI", Arial, sans-serif; color: #465469; font-size: 0.95rem; }
.stats-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.4rem 0 1.8rem; }
.stats-card { background: var(--card); border: 1px solid #e1d8c7; border-radius: 14px; padding: 1.1rem 1.3rem; font-family: "Segoe UI", Arial, sans-serif; }
.stats-card span { display: block; color: #465469; }
.stats-card strong { display: block; font-size: clamp(1.8rem, 4vw, 2.7rem); color: var(--navy); line-height: 1.3; margin-top: 0.35rem; }
.stats-table-wrap { width: 100%; overflow-x: auto; border: 1px solid #d8d0c0; border-radius: 14px; background: white; }
.stats-table { border-collapse: collapse; width: 100%; min-width: 580px; font-family: "Segoe UI", Arial, sans-serif; font-size: 0.96rem; }
.stats-table caption { text-align: left; padding: 1.1rem 1.2rem; color: var(--navy); font-size: 1.15rem; font-weight: 700; background: #f7f1e3; }
.stats-table th, .stats-table td { text-align: left; padding: 0.9rem 1.1rem; border-top: 1px solid #e5e7eb; vertical-align: top; }
.stats-table thead { background: var(--navy); color: white; }
.stats-table tbody tr:nth-child(2n) { background: #fbf8f2; }
.stats-table .stats-group { background: #e6edf5; color: var(--navy); }
.stats-table .stat-number { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.stats-table small { display: block; margin-top: 0.25rem; color: #647084; font-weight: 400; }
.stats-table th[scope="row"] { font-weight: 500; overflow-wrap: anywhere; max-width: 26rem; }
.stats-help { max-width: 55rem; margin-top: 1.2rem; }
.stats-notice { padding: 1rem; border: 1px solid #b26a23; border-radius: 10px; background: #fff1db; }
@media (max-width: 560px) { .stats-summary { gap: 0.5rem; } .stats-card { padding: 0.8rem 0.55rem; } .stats-card span { font-size: 0.8rem; } }

.author-position-preview { background: #eef3f8; border-bottom: 1px solid #e1d8c7; padding: 2.2rem 0 2.4rem; }
.author-position-preview h2 { margin: 0 0 0.7rem; font-family: "Segoe UI", Arial, sans-serif; font-size: 1.65rem; line-height: 1.25; color: var(--navy); }
.author-position-preview p { margin: 0.9rem 0 0; font-size: 1.08rem; }
@media (max-width: 800px) { .author-position-preview { padding: 1.7rem 0 1.8rem; } }

.article-content h4 { margin: 1.8rem 0 0.75rem; font-family: "Segoe UI", Arial, sans-serif; font-size: 1.15rem; line-height: 1.4; color: var(--navy); }
.article-content li { margin-bottom: 0.5rem; }
.article-content hr { border: 0; border-top: 1px solid #d5cec0; margin: 2rem 0; }
