@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
  --ink: #171f26;
  --ink-soft: #4b5f70;
  --ink-mute: #6b8195;
  --blue: #c8e0f4;
  --pink: #f5e0e8;
  --surface: #e3edf6;
  --hi: #f7fbfe;
  --lo: #d4e3f0;
  --accent: #2f6389;
  --line: rgba(116, 148, 178, 0.42);
  --rail: 252px;
  --r: 16px;
  --sh-out: -6px -6px 16px rgba(255, 255, 255, 0.92), 8px 8px 22px rgba(44, 72, 100, 0.16);
  --sh-in: inset -3px -3px 8px rgba(255, 255, 255, 0.95), inset 3px 3px 9px rgba(44, 72, 100, 0.2);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 0 0 var(--rail);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.78;
  color: var(--ink);
  background: linear-gradient(150deg, #edf4fb 0%, #e3edf6 45%, #d9e7f3 100%);
  background-attachment: fixed;
}

a { color: var(--accent); }

:focus-visible {
  outline: 3px solid #7ba6c8;
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 左侧固定竖排栏 ---------- */

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--rail);
  padding: 26px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  background: linear-gradient(160deg, #f4f9fd 0%, #dbe8f4 100%);
  box-shadow: 7px 0 20px rgba(44, 72, 100, 0.14);
}

.brand {
  display: block;
  padding: 12px 15px;
  border-radius: var(--r);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(145deg, #f8fcff, #d8e6f3);
  box-shadow: var(--sh-out);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.brand:active { transform: scale(0.985); box-shadow: var(--sh-in); }

.menu-box { display: block; }

.menu-box summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 15px;
  min-height: 44px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  background: linear-gradient(145deg, #e7f0f8, #cfe0ee);
  box-shadow: var(--sh-in);
  transition: color 0.15s ease;
}

.menu-box summary::-webkit-details-marker { display: none; }
.menu-box summary::after {
  content: '';
  float: right;
  width: 8px;
  height: 8px;
  margin-top: 9px;
  border-right: 2px solid var(--ink-mute);
  border-bottom: 2px solid var(--ink-mute);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.menu-box[open] summary::after { transform: rotate(-135deg); }
.menu-box summary:hover { color: var(--ink); }

.menu {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.menu li a,
aside li a {
  display: block;
  padding: 11px 4px;
  min-height: 44px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.menu li:last-child a,
aside li:last-child a { border-bottom: 0; }

.menu li a:hover,
aside li a:hover,
.menu li a:focus-visible,
aside li a:focus-visible {
  color: var(--ink);
  padding-left: 10px;
}

.find {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.find input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #e1ebf5;
  box-shadow: var(--sh-in);
}

.find input::placeholder { color: var(--ink-mute); }

.find button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink);
  cursor: pointer;
  background: linear-gradient(145deg, #fbeef3, #f0d9e2);
  box-shadow: var(--sh-out);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.find button:active { transform: scale(0.98); box-shadow: var(--sh-in); }

/* ---------- 首屏 ---------- */

main { display: block; }

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  padding: 80px 56px 104px;
  border-radius: 0 0 50% 50% / 0 0 9% 9%;
  background: linear-gradient(150deg, var(--blue) 0%, var(--pink) 100%);
}

.hero-img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  filter: saturate(0.8) contrast(0.96);
  transform: scale(1.06);
  will-change: transform;
}

.hero-in {
  position: relative;
  max-width: 780px;
  text-align: right;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 5.4vw, 64px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.015em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.hero p {
  margin: 0 0 0 auto;
  max-width: 54ch;
  font-size: clamp(16px, 1.5vw, 19px);
  color: #2c3d4a;
}

/* ---------- 正文骨架 ---------- */

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 34px 76px;
}

.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

aside {
  position: sticky;
  top: 28px;
  padding: 22px 18px;
  border-radius: var(--r);
  background: linear-gradient(145deg, #f8fcff, #dde9f4);
  box-shadow: var(--sh-out);
}

aside small {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
}

aside h2 {
  margin: 0 0 14px;
  font-size: 19px;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

aside ul { list-style: none; margin: 0; padding: 0; }

article { min-width: 0; }

article section {
  margin: 0 0 28px;
  padding: 30px 28px;
  border-radius: var(--r);
  background: linear-gradient(145deg, #f5fafe, #dbe8f4);
  box-shadow: var(--sh-out);
  scroll-margin-top: 28px;
}

article section:last-child { margin-bottom: 0; }

article small {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
}

article h2 {
  margin: 0 0 0.7em;
  font-size: clamp(22px, 2.4vw, 29px);
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
}

article h3 {
  margin: 1.4em 0 0.55em;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
}

article p { margin: 0 0 1em; }
article p:last-child { margin-bottom: 0; }

article ul,
article ol { margin: 0 0 1em 1.25em; padding: 0; }
article li { margin: 0.35em 0; }

article a { text-underline-offset: 3px; }

article blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-left: 4px solid #e2b9c9;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(145deg, #fdf4f7, #f3e2e9);
  color: #2c3d4a;
}

article img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 1em 0;
}

article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 16px;
}

article th,
article td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

article th { background: rgba(255, 255, 255, 0.5); font-weight: 600; }

article time {
  display: inline-block;
  font-size: 16px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}

article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.65);
}

/* ---------- 页脚 ---------- */

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 22px;
  margin: 0 34px 40px;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
}

footer address {
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.02em;
}

footer ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
  margin: 0;
  padding: 0;
}

footer ul a {
  display: block;
  min-height: 44px;
  padding: 10px 4px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
  text-decoration: none;
}

footer ul a:hover { color: var(--ink); }

footer .copy {
  width: 100%;
  margin: 0;
  text-align: center;
  font-size: 16px;
  color: var(--ink-mute);
}

/* ---------- 移动端 ---------- */

@media (max-width: 900px) {
  body { padding: 0; }

  .rail {
    inset: 0 0 auto 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    overflow: visible;
    background: linear-gradient(160deg, #f5fafd, #ddeaf5);
    box-shadow: 0 6px 18px rgba(44, 72, 100, 0.16);
  }

  .brand {
    padding: 9px 13px;
    font-size: 17px;
  }

  .menu-box { margin-left: auto; }

  .menu-box summary { padding: 9px 13px; }

  .menu {
    position: absolute;
    z-index: 50;
    top: 100%;
    right: 14px;
    width: min(80vw, 310px);
    margin-top: 8px;
    padding: 8px 14px;
    border-radius: 14px;
    background: linear-gradient(160deg, #f6fbfe, #dde9f4);
    box-shadow: 0 16px 34px rgba(38, 64, 88, 0.24);
  }

  .find {
    order: 3;
    flex: 1 1 100%;
    flex-direction: row;
    margin-top: 2px;
  }

  .find input { flex: 1; }
  .find button { flex: 0 0 auto; }

  .hero {
    min-height: calc(100svh - 108px);
    padding: 104px 22px 72px;
    justify-content: flex-start;
    border-radius: 0 0 42% 42% / 0 0 7% 7%;
  }

  .hero-in { text-align: left; }
  .hero p { margin-left: 0; }

  .wrap { padding: 32px 16px 52px; }
  .shell { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  aside { position: static; }
  article section { padding: 24px 18px; }
  footer { margin: 0 16px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .hero-img { transform: none; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
