:root {
  --bg: #f7f0df;
  --panel: #fffaf0;
  --panel-strong: #f1e3c4;
  --ink: #2f2517;
  --muted: #6b5a42;
  --line: #dcc89f;
  --accent: #7a3f18;
  --accent-dark: #563013;
  --green-border: #72986f;
  --green-bg: #edf6e9;
  --warning-bg: #fff4d8;
  --warning-border: #d8ad4c;
  --shadow: 0 20px 60px rgba(64, 43, 20, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --max: 1120px;
  --content-max: 980px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(122, 63, 24, 0.12), transparent 34rem),
    linear-gradient(180deg, #f5ecd7 0%, var(--bg) 42%, #f9f3e7 100%);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
}
a { color: var(--accent-dark); text-underline-offset: 0.2em; }
.page-shell { width: min(var(--max), calc(100% - 36px)); margin: 0 auto; }
.content-shell { width: min(var(--content-max), calc(100% - 36px)); margin: 0 auto; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; }
.brand-mark { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.seal { width: 42px; height: 42px; border: 1px solid var(--accent); border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: var(--accent-dark); background: rgba(255, 250, 240, 0.68); }
.brand-title { display: block; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.03em; }
.brand-subtitle { display: block; margin-top: -2px; color: var(--muted); font-size: 0.85rem; }
.nav-links { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: flex-end; font-size: 0.95rem; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--accent-dark); text-decoration: underline; }

.eyebrow { color: var(--accent-dark); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 14px; }
.edition-note { font-size: 0.72em; font-weight: 600; letter-spacing: normal; white-space: nowrap; }
.edition-note a { color: inherit; }

.hero { padding: 48px clamp(24px, 5vw, 58px); margin: 28px 0 34px; border-radius: var(--radius-lg); background: rgba(255, 250, 240, 0.86); border: 1px solid rgba(220, 200, 159, 0.86); box-shadow: var(--shadow); }
.hero h1, h1 { margin: 0; font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: 0.98; letter-spacing: -0.055em; color: #2a2013; }
.hero p { max-width: 780px; margin: 22px 0 0; color: var(--muted); font-size: 1.26rem; }
.hero-home { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr); gap: 28px; align-items: stretch; padding: 42px 0 28px; }
.hero-card, .side-card, .content-card, .notice-card, .card { background: rgba(255, 250, 240, 0.84); border: 1px solid rgba(220, 200, 159, 0.86); box-shadow: var(--shadow); border-radius: var(--radius-lg); }
.hero-card { padding: clamp(32px, 6vw, 64px); position: relative; overflow: hidden; }
.hero-card::after { content: ""; position: absolute; right: -70px; bottom: -70px; width: 220px; height: 220px; border-radius: 50%; border: 1px solid rgba(122, 63, 24, 0.16); box-shadow: 0 0 0 34px rgba(122, 63, 24, 0.04); }
.hero-card h1 { font-size: clamp(3rem, 7vw, 6.2rem); line-height: 0.92; }
.hero-card h2 { margin: 18px 0 0; max-width: 720px; font-size: clamp(1.35rem, 2.5vw, 2.15rem); line-height: 1.25; font-weight: 500; color: var(--muted); }
.hero-copy {  margin: 24px 0 0;  max-width: 720px;  font-size: 1.22rem;  line-height: 1.65;  color: #4b3b26;}
.side-card { padding: 28px; display: flex; flex-direction: column; justify-content: space-between; min-height: 100%; background: linear-gradient(180deg, rgba(241, 227, 196, 0.8), rgba(255, 250, 240, 0.9)), var(--panel); }
.source-panel { margin: 0 0 26px; padding: 16px; border-radius: 22px; background: rgba(255, 250, 240, 0.68); border: 1px solid rgba(122, 63, 24, 0.14); }
.source-panel img { display: block; width: 100%; height: auto; border-radius: 14px; background: #efe4c9; border: 1px solid rgba(122, 63, 24, 0.12); }
.source-caption { margin: 10px 4px 0; color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.reviewed-text { margin-top: 14px; padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.42); border: 1px solid rgba(220, 200, 159, 0.82); }
.reviewed-label { margin: 0 0 10px; color: var(--accent-dark); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.reviewed-verse { color: #352513; font-size: clamp(1.05rem, 2vw, 1.22rem); line-height: 1.9; }
.reviewed-verse p { margin: 0 0 10px; }
.reviewed-verse p:last-child { margin-bottom: 0; }

.section { padding: 34px 0; }
section { padding: 30px 0; }
.section-heading { max-width: 760px; margin: 0 0 20px; }
.section-heading h2, h2 { margin: 0 0 14px; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -0.04em; }
.section-heading p {margin: 12px 0 0; color: var(--muted); font-size: 1.22rem; line-height: 1.65; }
h3 { margin: 24px 0 8px; font-size: 1.3rem; line-height: 1.25; }
p { margin: 0 0 16px; color: var(--muted); font-size: 1.22rem; }
ul { margin: 12px 0 0; padding-left: 1.2rem; color: var(--muted); font-size: 1.22rem; }
li + li { margin-top: 8px; }
.card, .content-card, .notice-card { padding: clamp(24px, 4vw, 38px); border-radius: var(--radius-md); box-shadow: 0 12px 34px rgba(64, 43, 20, 0.08); }
.content-card .number { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 16px; border-radius: 50%; background: var(--panel-strong); color: var(--accent-dark); font-weight: 700; font-size: 0.95rem; }
.notice-card { border-color: rgba(114, 152, 111, 0.72); background: linear-gradient(180deg, rgba(237, 246, 233, 0.94), rgba(255, 250, 240, 0.9)); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-2, .definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.definition-grid { margin-top: 18px; }
.mini-card { padding: 18px; border-radius: 16px; background: rgba(255, 255, 255, 0.38); border: 1px solid rgba(220, 200, 159, 0.76); }
.mini-card h3 { margin-top: 0; }
.mini-card p:last-child, .card p:last-child { margin-bottom: 0; }

.editorial-list { display: grid; gap: 14px; margin-top: 18px; }
.editorial-item { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 16px; border-radius: 16px; background: rgba(255, 250, 240, 0.72); border: 1px solid rgba(220, 200, 159, 0.7); }
.check { color: var(--accent-dark); font-weight: 700; }
.editorial-item p { color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; text-decoration: none; font-weight: 700; border: 1px solid transparent; }
.button-primary { background: var(--accent); color: #fffaf0; box-shadow: 0 14px 28px rgba(122, 63, 24, 0.18); }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { color: var(--accent-dark); border-color: var(--line); background: rgba(255, 255, 255, 0.32); }
.button-secondary:hover { background: #fffaf0; }

.cta-band { margin: 40px 0 64px; padding: clamp(28px, 5vw, 46px); border-radius: var(--radius-lg); background: #2f2517; color: #fff7e8; display: flex; gap: 24px; justify-content: space-between; align-items: center; box-shadow: var(--shadow); }
.cta-band h2 { margin: 0; font-size: clamp(1.8rem, 3.5vw, 3rem); line-height: 1.08; letter-spacing: -0.04em; }
.cta-band p { margin: 10px 0 0; color: #e3d2b0; max-width: 720px; }
.cta-band .button-primary { background: #fff7e8; color: #2f2517; white-space: nowrap; }

.toc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 34px; }
.toc a { display: block; padding: 14px 16px; border-radius: 14px; background: rgba(255, 250, 240, 0.68); border: 1px solid rgba(220, 200, 159, 0.78); color: var(--accent-dark); text-decoration: none; font-weight: 700; font-size: 1.08rem; }
.toc a:hover { background: #fffaf0; text-decoration: underline; }
.edition-line { display: inline-block; margin-top: 20px; padding: 8px 12px; border-radius: 999px; background: rgba(241, 227, 196, 0.72); border: 1px solid rgba(220, 200, 159, 0.86); color: var(--accent-dark); font-size: 1rem; font-weight: 700; }
.copyright-line { color: #385336; font-weight: 700; }
.callout { margin-top: 18px; padding: 18px; border-radius: 16px; background: var(--green-bg); border: 1px solid var(--green-border); }
.callout p { margin: 0; color: #385336; }
.warning { margin-top: 18px; padding: 18px; border-radius: 16px; background: var(--warning-bg); border: 1px solid var(--warning-border); }
.warning p { margin: 0; color: #604716; }
.formula { margin: 14px 0; padding: 14px 16px; border-radius: 14px; background: rgba(241, 227, 196, 0.56); border: 1px solid rgba(220, 200, 159, 0.8); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #352513; overflow-x: auto; }

.table-wrap { overflow-x: auto; margin-top: 18px; }
.cer-table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 16px; background: rgba(255, 255, 255, 0.38); border: 1px solid rgba(220, 200, 159, 0.76); }
.cer-table th, .cer-table td { padding: 14px 15px; border-bottom: 1px solid rgba(220, 200, 159, 0.76); text-align: left; vertical-align: top; color: var(--muted); font-size: 1.12rem; }
.cer-table th { color: var(--accent-dark); background: rgba(241, 227, 196, 0.56); font-weight: 700; }
.cer-table tr:last-child td { border-bottom: 0; }
.cer-table td:nth-child(3), .cer-table td:nth-child(4), .cer-table td:nth-child(5) { font-variant-numeric: tabular-nums; white-space: nowrap; }

footer { border-top: 1px solid rgba(220, 200, 159, 0.9); padding: 28px 0 36px; color: var(--muted); font-size: 0.95rem; }
.footer-inner { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .topbar, .footer-inner, .cta-band { align-items: flex-start; flex-direction: column; }
  .nav-links { justify-content: flex-start; }
  .hero-home, .grid-3, .grid-2, .definition-grid, .toc { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .page-shell, .content-shell { width: min(var(--max), calc(100% - 24px)); }
  .hero, .hero-card, .side-card, .content-card, .notice-card, .card, .cta-band { border-radius: 20px; }
  .hero-card { padding: 28px 22px; }
  .actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
}


/* Contact and support pages */
.contact-form { display: grid; gap: 18px; margin-top: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.contact-form label { display: grid; gap: 7px; color: var(--accent-dark); font-weight: 700; font-size: 1rem; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(220, 200, 159, 0.9);
  border-radius: 14px;
  background: rgba(255, 250, 240, 0.86);
  color: var(--ink);
  font: inherit;
  font-size: 1.1rem;
  padding: 12px 14px;
}
.contact-form textarea { resize: vertical; min-height: 180px; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 3px solid rgba(122, 63, 24, 0.18);
  border-color: var(--accent);
}
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

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

.site-logo {
  display: block;
  width: min(320px, 78vw);
  height: auto;
}

.site-logo-full {
  max-height: 90px;
  object-fit: contain;
}
