:root {
  color-scheme: light;
  --ink: #202842;
  --muted: #536078;
  --accent: #a93451;
  --paper: #f7f9f7;
  --line: #dce8e5;
  --teal: #155e63;
  --serif: Georgia, "Times New Roman", serif;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.65; background: radial-gradient(ellipse at 2% 12%, #f9eee8 0, transparent 30rem), radial-gradient(ellipse at 98% 38%, #e4f2ee 0, transparent 32rem), var(--paper); }
.wrap { width: min(1120px, calc(100% - 3rem)); margin: auto; }
header { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 4px 24px rgb(25 62 61 / 4%); }
.header, .heading, .section-title { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.header { min-height: 88px; padding: 1rem 0; }
.brand { display: inline-flex; align-items: center; gap: .85rem; color: var(--ink); text-decoration: none; font: 600 1.15rem/1.2 var(--serif); }
.brand small { display: block; margin-top: .35rem; color: var(--muted); font: 700 .57rem/1.2 system-ui, sans-serif; letter-spacing: .16em; }
.brand-mark { display: grid; place-items: center; width: 47px; height: 47px; border-radius: 15px 15px 15px 4px; background: linear-gradient(140deg, #245c63, #47867e); color: #fff; font: 1.45rem var(--serif); box-shadow: 0 7px 16px rgb(31 91 93 / 20%); }
.brand-mark .book-icon { width: 29px; height: 29px; }
.main-nav { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center; }
.main-nav a { color: var(--ink); text-decoration: none; font-size: .86rem; font-weight: 600; }
.main-nav a:hover { color: var(--accent); }
.main-nav a:last-child { padding: .6rem .9rem; border-radius: 999px; background: #eaf3f0; color: #19595b; }
.main-nav a:last-child:hover { background: #d9eae5; }
.page-tabs { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 4px 24px rgb(25 62 61 / 4%); }
.page-tabs-scroll { overflow-x: auto; }
.page-tabs ul { display: flex; width: max-content; min-width: 100%; gap: .35rem; padding: 0; margin: 0; list-style: none; }
.page-tabs a { display: block; padding: .85rem 1rem; border-bottom: 3px solid transparent; color: var(--muted); font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.page-tabs a:hover { color: var(--teal); background: #f2f8f6; }
.page-tabs a[aria-current="page"] { color: #185e60; border-bottom-color: #4a9286; background: #edf6f3; }
.page-tabs .manage-tab { margin-left: auto; }
.page-tabs .manage-tab a { color: var(--accent); }
.page-tabs a:focus-visible { outline-offset: -3px; }
main { padding: clamp(2.5rem, 5vw, 4.5rem) 0 5rem; min-height: 72vh; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.16; letter-spacing: -.025em; }
h1 { font-size: clamp(2.6rem, 5.5vw, 4.8rem); margin: .55rem 0 1.3rem; }
.page-title { font-size: clamp(1.75rem, 3.67vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 2.7vw, 2.15rem); }
h3 { font-size: 1.35rem; }
a { color: #285d84; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
.eyebrow, .card-label { color: var(--accent); font: 700 .68rem/1.4 system-ui, sans-serif; letter-spacing: .16em; }
.accent { color: var(--accent); }
.intro { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, .7fr); gap: 2rem; align-items: center; padding: clamp(2.2rem, 5vw, 4.6rem); border: 1px solid #416e6d; border-radius: 28px 28px 72px 28px; background: radial-gradient(circle at 85% 12%, rgb(155 188 164 / 22%), transparent 37%), radial-gradient(circle at 60% 100%, rgb(108 175 163 / 20%), transparent 38%), linear-gradient(125deg, #203e49, #285b5d 65%, #477d72); color: #fff; box-shadow: 0 24px 60px rgb(30 73 72 / 16%); overflow: hidden; }
.intro h1 { max-width: 700px; }
.intro h1 em { color: #ffd1b6; font-weight: 400; }
.intro-text { max-width: 510px; color: #edf8f4; font-size: 1.03rem; }
.intro-seal { position: relative; display: grid; place-items: center; justify-self: center; width: min(100%, 240px); aspect-ratio: 1; border: 1px solid rgb(255 255 255 / 48%); border-radius: 50%; background: rgb(255 255 255 / 7%); color: #ffe0c9; }
.intro-seal::before, .intro-seal::after { content: ""; position: absolute; inset: 12%; border: 1px solid rgb(255 255 255 / 28%); border-radius: 50%; }
.intro-seal::after { inset: -10% 12%; transform: rotate(45deg); }
.intro-seal .book-icon { width: 90px; height: 90px; transform: translateY(-.35rem); }
.intro-seal small { position: absolute; bottom: 15%; text-align: center; font: 700 .55rem/1.5 system-ui, sans-serif; letter-spacing: .16em; }
.section-title { align-items: end; margin: 4.2rem 0 1.5rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.section-title h2, .section-title p { margin: 0; }
.section-title > p { color: var(--muted); font-size: .9rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.2rem; }
.panel, .card { display: block; background: #fff; padding: clamp(1.5rem, 3vw, 2.2rem); border: 1px solid var(--line); border-radius: 18px; margin: 1.15rem 0; overflow-wrap: anywhere; }
.panel { box-shadow: 0 12px 35px rgb(31 67 64 / 6%); }
.panel h2:first-child { margin-top: 0; }
.card { display: flex; min-height: 230px; flex-direction: column; border-top: 5px solid #58938c; background: linear-gradient(155deg, #fff, #eef7f4); color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.card:nth-child(3n+2) { border-top-color: #d26e77; background: linear-gradient(155deg, #fff, #fff3f1); }
.card:nth-child(3n+3) { border-top-color: #7195a5; background: linear-gradient(155deg, #fff, #eff6f8); }
.card:hover { color: var(--ink); border-color: #7aa79c; transform: translateY(-4px); box-shadow: 0 18px 36px rgb(31 67 64 / 12%); }
.card h3 { margin: 1.4rem 0; font-size: 1.75rem; }
.card-bottom { display: flex; justify-content: space-between; margin-top: auto; padding-top: 1rem; border-top: 1px solid #ddebe6; color: var(--muted); font-size: .85rem; }
.card-bottom span { color: var(--accent); font-size: 1.15rem; }
.page-introduction { margin: 2rem 0; padding: 1.3rem 1.6rem; background: #eaf5f3; border-left: 4px solid #4f9c91; border-radius: 4px 16px 16px 4px; overflow-wrap: anywhere; }
.page-introduction .card-label { margin: 0 0 .7rem; }
.page-introduction .markdown > :last-child { margin-bottom: 0; }
.publication-card { padding: clamp(1.8rem, 4vw, 3.2rem); border-top: 5px solid #6fa79d; }
.publication-card + .publication-card { border-top-color: #e39182; }
.publication-card h2 { margin: .65rem 0 1.5rem; }
.publication-card h3 { margin: 2rem 0 .75rem; }
label { display: block; font-size: .88rem; font-weight: 650; margin: 1.25rem 0; }
input, textarea, select { display: block; width: 100%; margin-top: .45rem; padding: .8rem; border: 1px solid #b7bfce; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid #4d8c86; outline-offset: 3px; }
textarea { resize: vertical; }
.markdown-editor { font: .9rem/1.6 ui-monospace, Consolas, monospace; min-height: 24rem; tab-size: 2; }
.editor-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.editor-tools[hidden] { display: none; }
.editor-tools label, .editor-tools select { width: auto; margin: 0; }
.editor-tools select { max-width: 100%; }
.editor-tools input { width: 7rem; margin: 0; }
.attachment-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: .75rem 0; }
.attachment-row input[type="hidden"] { display: none; }
.markdown img { max-width: 100%; height: auto; }
button, .button { display: inline-block; border: 1px solid #245e61; border-radius: 10px; background: #245e61; color: #fff; padding: .8rem 1.2rem; font: 600 .85rem system-ui, sans-serif; text-decoration: none; cursor: pointer; }
button[hidden] { display: none; }
button:hover, .button:hover { background: #184a4e; color: #fff; }
.secondary { background: transparent; color: #245e61; }
.secondary:hover { background: #245e61; color: #fff; }
.message { background: #e1f4ec; padding: 1rem 1.2rem; border-left: 4px solid #36846d; border-radius: 4px 12px 12px 4px; color: #214f40; }
.error { background: #fcebed; color: #802c38; border-color: #b94a60; }
.credentials code { overflow-wrap: anywhere; }
.editor-remove { margin-top: 1rem; }
.page-order { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.page-order button:disabled { opacity: .45; cursor: not-allowed; }
.markdown { white-space: pre-wrap; line-height: 1.8; }
.markdown.rendered { white-space: normal; }
.markdown p, .markdown ul, .markdown ol { white-space: normal; }
.markdown blockquote { margin: 1.5rem 0; padding: .25rem 1.25rem; border-left: 4px solid #6fa79d; background: #f0f7f4; border-radius: 0 12px 12px 0; }
.markdown table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.markdown th, .markdown td { padding: .6rem .8rem; border: 1px solid var(--line); text-align: left; }
.markdown th { background: #edf5f2; }
.markdown pre { padding: 1rem 1.2rem; background: #f0f6f3; border: 1px solid var(--line); border-radius: 12px; }
.markdown mjx-container { color: #202842; }
.markdown mjx-container[display="true"] { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: .5rem 0; }
pre { overflow-x: auto; }
summary { color: #245e61; font-weight: 650; cursor: pointer; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; color: var(--muted); padding: 2rem 0; border-top: 1px solid var(--line); font-size: .8rem; }
footer span:first-child { color: var(--ink); font: 1rem var(--serif); }
@media (min-width: 900px) {
  .intro { padding-block: clamp(.97rem, calc(5.33vw - 2rem), 2.67rem); }
  .intro h1 { font-size: clamp(1.5rem, 2.47vw, 2.13rem); margin: .23rem 0 .55rem; }
  .intro-text { font-size: .95rem; margin: .5rem 0; }
  .intro-seal { width: min(100%, clamp(7rem, 10.625vw, 8.5rem)); }
  .intro-seal .book-icon { width: clamp(2.375rem, 3.75vw, 3rem); height: clamp(2.375rem, 3.75vw, 3rem); }
  .intro-seal small { font-size: .5rem; }
}
@media (max-width: 650px) {
  .wrap { width: min(100% - 2rem, 1120px); }
  .header { gap: 1rem; }
  .brand { font-size: 1rem; }
  .main-nav { width: 100%; justify-content: space-between; padding-top: .65rem; border-top: 1px solid var(--line); }
  .intro { grid-template-columns: 1fr; }
  .intro-seal { display: none; }
  .section-title { margin-top: 3rem; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }
