:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #5d6b7a;
  --navy: #163b64;
  --blue: #25658f;
  --gold: #b58b36;
  --cream: #f8f5ef;
  --paper: #ffffff;
  --line: #d9e2ec;
  --shadow: 0 18px 40px rgba(31, 41, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--cream);
}

body {
  margin: 0 !important;
  color: var(--ink) !important;
  font-family: "Segoe UI", Arial, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  background: var(--cream) !important;
}

body > p {
  display: none;
}

body > table,
#AutoNumber1 {
  display: block;
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#AutoNumber1 > tbody,
#AutoNumber1 > tbody > tr {
  display: block;
  width: 100%;
}

#AutoNumber1 > tbody > tr > td {
  display: block;
  width: min(1120px, calc(100% - 32px)) !important;
  margin: 0 auto;
  padding: 0 !important;
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif !important;
  font-size: 16px !important;
  vertical-align: top;
}

#AutoNumber1 > tbody > tr > td:first-child {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100% !important;
  max-width: none;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.legacy-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

#AutoNumber1 > tbody > tr > td:nth-child(2),
#AutoNumber1 > tbody > tr > td:last-child {
  padding: 40px 0 64px !important;
}

.legacy-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0;
  color: var(--ink);
  font-size: 0.93rem;
}

.legacy-nav::before {
  margin-right: auto;
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  content: "Ohio Spiritual Warfare Center";
}

.legacy-nav a[aria-current="page"] {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.legacy-nav a,
a {
  color: var(--blue);
}

.legacy-nav a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.legacy-nav a:hover,
.legacy-nav a:focus,
a:hover,
a:focus {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.pageheader {
  display: inline-block;
  margin: 0 0 14px;
  color: var(--navy) !important;
  font-family: "Segoe UI", Arial, sans-serif !important;
  font-size: clamp(1.75rem, 3vw, 2.4rem) !important;
  font-weight: 700 !important;
  line-height: 1.15;
  text-decoration: none;
}

.sectiontitle {
  color: var(--navy) !important;
  font-family: "Segoe UI", Arial, sans-serif !important;
  font-size: 1.12rem !important;
  font-weight: 700 !important;
  text-decoration: none;
}

.title,
.darkblueBD,
.sectionheader16GxLF {
  display: block;
  margin: 1.4rem 0 0.75rem;
  color: var(--navy) !important;
  font-family: "Segoe UI", Arial, sans-serif !important;
  font-size: 1.12rem !important;
  font-weight: 700 !important;
  line-height: 1.35;
  text-decoration: none;
}

.title {
  margin-top: 0;
  font-size: 1.4rem !important;
}

.redBD {
  color: #9b1c31 !important;
  font-weight: 700 !important;
}

.footnote,
.redfootnote,
.smalltext {
  color: var(--muted) !important;
  font-size: 0.9rem !important;
}

.prayer {
  color: #6d2232 !important;
  font-style: italic;
}

p {
  margin: 0 0 1rem;
}

blockquote {
  margin: 1.25rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 4px solid var(--gold);
  color: #34495e;
}

blockquote p:last-child {
  margin-bottom: 0;
}

.plain-article,
.plain-article span,
.plain-article font {
  font-family: inherit !important;
  font-size: inherit !important;
}

.plain-article p {
  margin: 0 0 1rem;
}

.plain-article h1,
.plain-article h2 {
  margin: 1.25rem 0 0.75rem;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  line-height: inherit;
}

.plain-article ul {
  margin: 0 0 1rem 1.3rem;
  padding-left: 1rem;
}

.plain-article li {
  margin-bottom: 0.35rem;
}

hr {
  height: 1px;
  margin: 28px 0;
  border: 0;
  background: var(--line);
}

img {
  max-width: 100%;
  height: auto;
}

input,
textarea {
  max-width: 100%;
  border: 1px solid var(--line);
  padding: 8px 10px;
  color: var(--ink);
  font: inherit;
  background: var(--paper);
}

input[type="submit"] {
  min-height: 44px;
  padding: 9px 16px;
  border-color: var(--blue);
  color: #ffffff;
  font-weight: 700;
  background: var(--blue);
  cursor: pointer;
}

textarea {
  width: min(100%, 620px) !important;
}

.notice,
#Content {
  max-width: 780px;
}

#Content {
  position: static !important;
  width: auto !important;
  height: auto !important;
  left: auto !important;
  top: auto !important;
}

.rosary-frame {
  width: 100%;
  min-height: 1200px;
  border: 0;
}

#frmRosary {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 22px 28px;
  align-items: start;
  max-width: 920px;
}

#frmRosary .pageheader {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

#frmRosary p {
  margin: 0;
}

#frmRosary img[usemap],
#frmRosary img[useMap] {
  display: block;
  width: min(100%, 292px);
  height: auto;
  margin: 0;
}

#frmRosary #Layer1,
#frmRosary #Layer2,
#frmRosary #Layer3 {
  position: static !important;
  z-index: auto !important;
  left: auto !important;
  top: auto !important;
  width: auto !important;
  height: auto !important;
}

#frmRosary #Layer2,
#frmRosary #Layer3 {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--paper);
}

#frmRosary #Layer1 {
  grid-column: 2;
  grid-row: 2 / span 2;
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--paper);
}

#frmRosary #Prayers,
#frmRosary #Mysteries {
  display: block;
  color: var(--ink) !important;
  font-size: 0.98rem !important;
  line-height: 1.55;
  white-space: pre-wrap;
}

#frmRosary select {
  width: 100%;
  max-width: 280px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  color: var(--ink);
  font: inherit;
  background: #ffffff;
}

#frmRosary > table {
  grid-column: 1 / -1;
  width: 100% !important;
  border-collapse: collapse;
}

#frmRosary > table td {
  width: auto !important;
  padding: 10px !important;
}

#frmRosary textarea#Prayers,
#frmRosary textarea#Mysteries {
  width: 100% !important;
  min-height: 150px;
  border: 1px solid var(--line) !important;
  padding: 12px;
  background: var(--paper) !important;
}

.page-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 68px;
}

.page-intro {
  max-width: 760px;
  margin-bottom: 28px;
}

.page-intro h1 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.1;
}

.page-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.contact-form {
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(31, 41, 51, 0.08);
}

.form-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}

.contact-form label span {
  font-size: 0.94rem;
}

.contact-form label small {
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--muted);
}

.contact-form strong {
  color: #9b1c31;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  background: #ffffff;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 3px solid rgba(37, 101, 143, 0.18);
  border-color: var(--blue);
}

.full-field {
  display: grid;
  margin-top: 18px;
}

.narrative-field {
  width: 100%;
}

.contact-form .narrative-field textarea {
  width: 100% !important;
  max-width: 100% !important;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.form-actions button {
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid var(--blue);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  background: var(--blue);
  cursor: pointer;
}

.form-actions button:hover,
.form-actions button:focus {
  background: var(--navy);
}

.form-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.rosary-page {
  width: min(1040px, calc(100% - 32px));
}

.rosary-layout {
  display: grid;
  grid-template-columns: 320px minmax(220px, 0.8fr) minmax(280px, 1.2fr);
  gap: 20px;
  align-items: start;
}

.rosary-image-panel,
.rosary-card,
.rosary-controls {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(31, 41, 51, 0.08);
}

.rosary-image-panel {
  display: flex;
  justify-content: center;
  padding: 18px 14px;
}

.rosary-image-panel img {
  width: 292px;
  max-width: 100%;
  height: auto;
}

.rosary-controls {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.rosary-controls label {
  color: var(--navy);
  font-weight: 700;
}

.rosary-controls select {
  width: 100%;
  border: 1px solid var(--line);
  padding: 9px 10px;
  color: var(--ink);
  font: inherit;
  background: #ffffff;
}

.rosary-card {
  padding: 18px;
}

.rosary-card h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 1.08rem;
  line-height: 1.25;
}

.rosary-card pre {
  min-height: 180px;
  margin: 0;
  color: var(--ink);
  font: inherit;
  white-space: pre-wrap;
}

.rosary-prayer-card {
  min-height: 360px;
}

.article-page {
  background: #f6f3ec !important;
}

.article-hero {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.article-hero-inner,
.essay-content {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
}

.article-hero-inner {
  padding: 38px 0 34px;
}

.breadcrumb {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.article-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.article-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1.02;
}

.article-subtitle {
  max-width: 720px;
  margin: 14px 0 0;
  color: #34495e;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.35;
}

.essay-byline {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.essay-byline span {
  font-size: 0.9rem;
}

.essay-content {
  padding: 36px 0 70px;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.72;
}

.essay-intro {
  margin-bottom: 34px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  font-size: 1.12rem;
}

.essay-section {
  margin-top: 42px;
}

.essay-section h2 {
  margin: 0 0 18px;
  padding-top: 22px;
  border-top: 3px solid var(--gold);
  color: var(--navy);
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.2;
}

.essay-content blockquote {
  margin: 22px 0;
  padding: 14px 0 14px 20px;
  border-left: 4px solid var(--gold);
  color: #34495e;
  background: rgba(255, 255, 255, 0.54);
}

.essay-content ol,
.essay-content ul {
  margin: 0 0 1.2rem 1.4rem;
  padding: 0;
}

.strategy-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 22px !important;
  list-style: none;
}

.strategy-list li {
  min-height: 96px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  color: var(--navy);
  font-weight: 800;
  line-height: 1.28;
  background: #ffffff;
}

.essay-footer {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .legacy-nav {
    gap: 7px 12px;
    padding: 10px 0;
  }

  .legacy-nav::before {
    flex-basis: 100%;
    margin-right: 0;
  }

  #AutoNumber1 > tbody > tr > td:nth-child(2),
  #AutoNumber1 > tbody > tr > td:last-child {
    padding: 28px 0 48px !important;
  }

  #frmRosary {
    grid-template-columns: 1fr;
  }

  #frmRosary #Layer1 {
    grid-column: auto;
    grid-row: auto;
  }

  .page-shell {
    padding: 30px 0 48px;
  }

  .contact-form {
    padding: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    display: block;
  }

  .form-actions button {
    width: 100%;
  }

  .form-actions p {
    margin-top: 12px;
  }

  .rosary-layout {
    grid-template-columns: 1fr;
  }

  .article-hero-inner {
    padding: 30px 0 28px;
  }

  .essay-content {
    padding: 30px 0 54px;
  }

  .strategy-list {
    grid-template-columns: 1fr;
  }

  .strategy-list li {
    min-height: 0;
  }

  .rosary-prayer-card {
    min-height: 0;
  }
}
