:root {
  --bg: #f4f1ea;
  --bg-soft: #fbfaf7;
  --paper: #fffdf8;
  --paper-strong: #ffffff;
  --ink: #1d2c26;
  --muted: #66736d;
  --line: rgba(35, 70, 59, 0.14);
  --brand: #176b5b;
  --brand-2: #2d9b7c;
  --brand-3: #9b6a35;
  --gold: #c59a52;
  --red: #a45b50;
  --shadow: 0 22px 70px rgba(24, 48, 40, 0.12);
  --shadow-soft: 0 12px 35px rgba(24, 48, 40, 0.08);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(244, 241, 234, 0.96)),
    var(--bg);
  color: var(--ink);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    Arial,
    sans-serif;
  line-height: 1.7;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 248, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}

.brand strong {
  display: block;
  color: var(--brand);
  font-size: 20px;
  line-height: 1.1;
  font-weight: 700;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(23, 107, 91, 0.22);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #f5ead3, #dbece0 56%, #f7fbf4);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.62);
}

.brand-stem,
.brand-leaf {
  position: absolute;
  display: block;
}

.brand-stem {
  left: 20px;
  top: 12px;
  width: 2px;
  height: 20px;
  background: var(--brand);
  transform: rotate(20deg);
  transform-origin: bottom;
}

.brand-leaf {
  width: 13px;
  height: 20px;
  background: var(--brand-2);
  border-radius: 100% 0 100% 0;
}

.leaf-one {
  left: 12px;
  top: 10px;
  transform: rotate(-35deg);
}

.leaf-two {
  left: 22px;
  top: 15px;
  transform: rotate(60deg);
  background: var(--brand);
}

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  gap: 4px;
}

.nav-link {
  padding: 8px 10px;
  border-radius: 999px;
  color: #40504a;
  font-size: 14px;
  white-space: nowrap;
  transition:
    color 0.2s,
    background 0.2s;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand);
  background: rgba(23, 107, 91, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand);
  cursor: pointer;
}

.header-contact {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle span {
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.icon-search {
  position: relative;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon-search::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 8px;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
  border-radius: 2px;
}

.search-panel {
  position: sticky;
  top: 72px;
  z-index: 40;
  display: none;
  background: rgba(251, 250, 247, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.search-panel.is-open {
  display: block;
}

.search-panel-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  padding: 22px 0 24px;
}

.search-panel h2 {
  margin: 6px 0 0;
  font-size: 20px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 14px 0 18px;
  border: 1px solid rgba(23, 107, 91, 0.22);
  border-radius: var(--radius);
  background: #fff;
  color: var(--brand);
}

.search-input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.search-input-wrap button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.search-results {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.search-empty,
.search-result-item {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
}

.search-empty {
  grid-column: 1 / -1;
  padding: 16px;
  color: var(--muted);
}

.search-result-item {
  padding: 10px 12px;
  cursor: pointer;
}

.search-result-item span {
  display: block;
  color: var(--brand);
  font-size: 12px;
}

.search-result-item strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.page-section {
  scroll-margin-top: 92px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  padding: 76px 0 38px;
  background:
    linear-gradient(120deg, rgba(23, 107, 91, 0.06), rgba(197, 154, 82, 0.08)),
    radial-gradient(circle at 88% 15%, rgba(45, 155, 124, 0.2), transparent 28%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(380px, 0.86fr);
  align-items: center;
  gap: 54px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.hero-copy h1 {
  margin: 16px 0 20px;
  color: #10251f;
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 800;
}

.hero-copy h1 em {
  display: block;
  color: var(--brand);
  font-style: normal;
}

.hero-lead {
  max-width: 680px;
  margin: 0;
  color: #46544f;
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}

.button-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 22px rgba(23, 107, 91, 0.2);
}

.button-quiet {
  border-color: rgba(23, 107, 91, 0.22);
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand);
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 570px;
  margin-top: 28px;
  color: var(--muted);
}

.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(164, 91, 80, 0.42);
  color: var(--red);
  border-radius: 50%;
  font-family: "STKaiti", "KaiTi", serif;
  font-weight: 700;
}

.hero-art {
  position: relative;
  min-height: 500px;
}

.paper-stack,
.hero-card {
  position: absolute;
  inset: 52px 26px 40px 26px;
  border-radius: 12px;
}

.paper-back {
  transform: rotate(-7deg) translate(-18px, 18px);
  background: #e7dfce;
}

.paper-mid {
  transform: rotate(5deg) translate(16px, 8px);
  background: #d6e6dd;
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(248, 243, 233, 0.96)),
    #fff;
  border: 1px solid rgba(23, 107, 91, 0.12);
  box-shadow: var(--shadow);
}

.hero-card-top,
.hero-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
}

.status-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-2);
}

.ink-branch {
  position: relative;
  width: 230px;
  height: 160px;
  margin: 18px auto 0;
}

.branch-main {
  position: absolute;
  left: 109px;
  top: 18px;
  width: 5px;
  height: 128px;
  border-radius: 999px;
  background: linear-gradient(var(--brand), var(--brand-3));
  transform: rotate(17deg);
}

.branch-leaf {
  position: absolute;
  width: 54px;
  height: 82px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #2d9b7c, #d8ead8);
  box-shadow: inset -8px -8px 18px rgba(23, 107, 91, 0.16);
}

.leaf-a {
  left: 54px;
  top: 18px;
  transform: rotate(-58deg);
}

.leaf-b {
  left: 132px;
  top: 32px;
  transform: rotate(28deg);
}

.leaf-c {
  left: 70px;
  top: 88px;
  transform: rotate(-34deg);
}

.leaf-d {
  left: 134px;
  top: 94px;
  transform: rotate(48deg);
}

.hero-quote {
  margin: 0;
  color: #233830;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 31px;
  line-height: 1.45;
  text-align: center;
}

.hero-quote-source {
  margin: 10px 0 0;
  color: var(--brand-3);
  text-align: center;
}

.hero-card-footer strong {
  color: var(--brand);
  font-size: 34px;
  line-height: 1;
}

.floating-label {
  position: absolute;
  padding: 8px 13px;
  border: 1px solid rgba(23, 107, 91, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-soft);
  color: var(--brand);
  font-size: 14px;
}

.label-one {
  left: 4px;
  top: 90px;
}

.label-two {
  right: -2px;
  top: 190px;
}

.label-three {
  left: 28px;
  bottom: 70px;
}

.metric-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.6fr;
  gap: 12px;
  margin-top: 36px;
}

.metric-item {
  min-height: 98px;
  padding: 18px;
  border: 1px solid rgba(23, 107, 91, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.metric-item strong {
  display: block;
  color: var(--brand);
  font-size: 30px;
  line-height: 1.1;
}

.metric-item span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.metric-message {
  background: linear-gradient(135deg, var(--brand), #24453d);
}

.metric-message span,
.metric-message strong {
  color: #fff;
}

.intro-section,
.content-section,
.about-section,
.contact-section,
.quote-section {
  padding: 72px 0;
}

.intro-grid,
.section-heading,
.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.section-title {
  margin: 10px 0 0;
  color: #172b25;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.22;
  letter-spacing: 0;
}

.intro-text,
.section-heading p,
.about-lead,
.contact-grid p {
  margin: 0;
  color: #53625d;
  font-size: 16px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.feature-card,
.content-card,
.case-card,
.book-card,
.library-item,
.exam-subject,
.contact-card,
.about-facts,
.library-feature,
.exam-intro,
.lecture-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
  box-shadow: var(--shadow-soft);
}

.feature-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 232px;
  padding: 22px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.feature-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(23, 107, 91, 0.06);
}

.feature-card:hover,
.content-card:hover,
.case-card:hover,
.book-card:hover,
.library-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(24, 48, 40, 0.12);
}

.feature-accent {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.feature-card h3,
.content-card h3,
.case-card h3,
.lecture-card h3,
.book-card h3,
.library-item h3,
.exam-subject h3 {
  margin: 10px 0 8px;
  color: #172b25;
  font-size: 21px;
  line-height: 1.35;
}

.feature-card p,
.content-card p,
.case-card p,
.lecture-card p,
.book-card p,
.library-item p,
.exam-subject p {
  margin: 0;
  color: var(--muted);
}

.feature-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.feature-foot strong {
  color: var(--brand);
}

.tinted-section {
  background: rgba(255, 253, 248, 0.58);
  border-top: 1px solid rgba(23, 107, 91, 0.08);
  border-bottom: 1px solid rgba(23, 107, 91, 0.08);
}

.dark-section {
  background:
    linear-gradient(140deg, rgba(27, 72, 61, 0.98), rgba(24, 42, 37, 0.98)),
    #1b483d;
  color: #fff;
}

.light-heading .section-title,
.light-heading p,
.dark-section .eyebrow {
  color: #fff;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 22px;
}

.category-chip {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(23, 107, 91, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.category-chip.is-active {
  background: var(--brand);
  color: #fff;
}

.content-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.content-card {
  position: relative;
  min-height: 250px;
  padding: 22px;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.medicine-card {
  padding-top: 64px;
}

.card-symbol {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(45, 155, 124, 0.12);
  color: var(--brand);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 22px;
  font-weight: 700;
}

.card-kicker,
.card-meta-line,
.book-author {
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(23, 107, 91, 0.08);
  color: var(--brand);
  font-size: 12px;
}

.card-meta-line {
  margin-top: 18px;
}

.case-list {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.case-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  padding: 24px;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.case-side {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(244, 241, 234, 0.72);
}

.case-side span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.case-side strong {
  color: #38463f;
  font-size: 14px;
}

.lecture-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.lecture-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}

.lecture-cover {
  position: relative;
  height: 168px;
  background:
    linear-gradient(135deg, rgba(197, 154, 82, 0.3), rgba(45, 155, 124, 0.42)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 12px);
}

.lecture-index {
  position: absolute;
  left: 20px;
  top: 18px;
  font-size: 34px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.74);
}

.play-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.play-ring::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 18px;
  border-left: 16px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.lecture-content {
  padding: 20px;
}

.dark-section .card-kicker,
.lecture-card p {
  color: rgba(255, 255, 255, 0.72);
}

.lecture-card h3 {
  color: #fff;
}

.chapter-line,
.modal-chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chapter-line span,
.modal-chapters span {
  display: inline-flex;
  min-height: 28px;
  padding: 0 10px;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

.modal-chapters span {
  background: rgba(23, 107, 91, 0.08);
  color: var(--brand);
}

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

.book-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.book-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 156px;
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, #2e6d5d, #213b34),
    var(--brand);
  color: #f6ead3;
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.07);
}

.book-cover span {
  writing-mode: vertical-rl;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 25px;
  letter-spacing: 0;
}

.exam-layout,
.library-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  margin-top: 34px;
}

.exam-intro,
.library-feature {
  padding: 26px;
}

.exam-badge,
.library-ribbon {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(23, 107, 91, 0.1);
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
}

.exam-intro h3,
.library-feature h3 {
  margin: 18px 0 10px;
  font-size: 27px;
  line-height: 1.25;
}

.exam-intro p,
.library-feature p {
  margin: 0 0 22px;
  color: var(--muted);
}

.exam-subjects {
  display: grid;
  gap: 12px;
}

.exam-subject {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

.exam-subject h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.exam-subject strong {
  color: var(--brand);
  white-space: nowrap;
}

.library-feature {
  min-height: 100%;
  background:
    linear-gradient(150deg, rgba(23, 107, 91, 0.92), rgba(31, 63, 55, 0.96)),
    var(--brand);
  color: #fff;
}

.library-feature .library-ribbon {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.library-feature p {
  color: rgba(255, 255, 255, 0.78);
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

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

.library-item {
  padding: 20px;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.library-item span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.quote-section {
  padding: 54px 0;
}

.quote-layout {
  position: relative;
  padding: 36px 44px;
  border-left: 4px solid var(--brand);
  background: rgba(255, 253, 248, 0.72);
}

.quote-mark {
  position: absolute;
  left: 20px;
  top: 2px;
  color: rgba(23, 107, 91, 0.18);
  font-size: 96px;
  line-height: 1;
  font-family: Georgia, serif;
}

blockquote {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #243931;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.65;
}

.quote-caption {
  display: block;
  margin-top: 16px;
  color: var(--brand);
}

.about-facts,
.contact-card {
  padding: 24px;
}

.fact-row,
.contact-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.fact-row:last-child,
.contact-row:last-child {
  border-bottom: 0;
}

.fact-row span,
.contact-row span {
  color: var(--muted);
}

.fact-row strong,
.contact-row strong {
  color: #1d342d;
}

.online-status {
  color: var(--brand) !important;
}

.contact-section {
  background: rgba(255, 253, 248, 0.68);
}

.site-footer {
  padding: 36px 0;
  background: #172923;
  color: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 30px;
  align-items: center;
}

.footer-brand {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.footer-inner p {
  margin: 4px 0 0;
}

.footer-links,
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
}

.footer-links a {
  color: #fff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(12, 28, 23, 0.58);
  backdrop-filter: blur(6px);
}

.modal-backdrop[hidden] {
  display: none;
}

.detail-modal {
  position: relative;
  width: min(720px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow-y: auto;
  padding: 34px;
  border-radius: 12px;
  background: var(--paper-strong);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.detail-modal h2 {
  margin: 12px 0 6px;
  color: #172b25;
  font-size: 32px;
  line-height: 1.22;
}

.modal-meta {
  color: var(--brand);
  font-weight: 600;
}

.modal-body {
  margin-top: 22px;
  color: #3d4b45;
}

.modal-body p {
  margin: 0;
}

.modal-dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0 0 18px;
}

.modal-dl dt {
  color: var(--brand);
  font-weight: 700;
}

.modal-dl dd {
  margin: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 28px;
}

.document-page {
  min-height: 100vh;
  padding: 44px 20px;
  background: var(--bg);
}

.document-card {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-strong);
  box-shadow: var(--shadow-soft);
}

.document-card h1 {
  margin: 16px 0 6px;
  color: var(--brand);
  font-size: 34px;
}

.document-card h2 {
  margin: 28px 0 8px;
  color: #172b25;
  font-size: 21px;
}

.document-card p {
  margin: 0 0 12px;
  color: #425049;
}

.document-date {
  color: var(--muted) !important;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--brand);
  font-weight: 700;
}

@media (max-width: 1080px) {
  .main-nav {
    position: fixed;
    left: 20px;
    right: 20px;
    top: 78px;
    z-index: 60;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 253, 248, 0.98);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-link {
    border-radius: var(--radius);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero-grid,
  .intro-grid,
  .section-heading,
  .about-grid,
  .contact-grid,
  .search-panel-inner {
    grid-template-columns: 1fr;
  }

  .search-results {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-art {
    min-height: 430px;
  }

  .feature-grid,
  .content-card-grid,
  .lecture-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exam-layout,
  .library-layout {
    grid-template-columns: 1fr;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 28px, var(--max));
  }

  .header-inner {
    min-height: 64px;
  }

  .brand small,
  .header-contact {
    display: none;
  }

  .search-panel {
    top: 64px;
  }

  .hero-section {
    padding-top: 48px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-art {
    min-height: 360px;
  }

  .paper-stack,
  .hero-card {
    inset: 34px 12px 28px;
  }

  .hero-card {
    padding: 20px;
  }

  .hero-quote {
    font-size: 23px;
  }

  .ink-branch {
    width: 190px;
    height: 122px;
    transform: scale(0.82);
  }

  .floating-label {
    display: none;
  }

  .metric-strip,
  .feature-grid,
  .content-card-grid,
  .lecture-grid,
  .book-grid,
  .library-list,
  .search-results {
    grid-template-columns: 1fr;
  }

  .intro-section,
  .content-section,
  .about-section,
  .contact-section,
  .quote-section {
    padding: 48px 0;
  }

  .section-title {
    font-size: 30px;
  }

  .case-card {
    grid-template-columns: 1fr;
  }

  .book-card {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
  }

  .book-cover {
    min-height: 130px;
  }

  .book-cover span {
    font-size: 21px;
  }

  .exam-subject {
    align-items: flex-start;
    flex-direction: column;
  }

  .fact-row,
  .contact-row,
  .modal-dl {
    grid-template-columns: 1fr;
  }

  .detail-modal {
    padding: 28px 20px;
  }

  .detail-modal h2 {
    font-size: 26px;
  }

  .document-card {
    padding: 28px 20px;
  }
}
