@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300&display=swap');

:root {
  --ice: #c8e0f4;
  --rose: #f5e0e8;
  --ink: #171f26;
  --ink2: rgba(23, 31, 38, 0.64);
  --out: -6px -6px 14px rgba(255, 255, 255, 0.92), 7px 7px 18px rgba(23, 31, 38, 0.13);
  --out-sm: -3px -3px 8px rgba(255, 255, 255, 0.9), 4px 4px 10px rgba(23, 31, 38, 0.12);
  --in: inset -3px -3px 7px rgba(255, 255, 255, 0.95), inset 3px 3px 8px rgba(23, 31, 38, 0.14);
  --r: 14px;
  --panel: linear-gradient(150deg, #eef5fb, #e3edf6);
  --panel-pink: linear-gradient(150deg, #f9edf2, #f1dfe8);
}

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

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

body {
  margin: 0;
  font-family: 'Source Serif 4', Georgia, 'Songti SC', 'Source Han Serif SC', serif;
  font-size: 17px;
  line-height: 1.78;
  color: var(--ink);
  background: linear-gradient(168deg, #e5eff8 0%, #eef2f7 46%, #f9ecf2 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-kerning: normal;
}

p {
  margin: 0 0 1em;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 8px 18px 10px;
  background: rgba(232, 241, 249, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 22px rgba(23, 31, 38, 0.1);
}

.brandbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  max-width: 1120px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 2px 4px;
  text-decoration: none;
}

.brand .mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--out-sm);
}

.brand-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.searchbox {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 4px 5px 4px 12px;
  border-radius: var(--r);
  background: linear-gradient(145deg, #e3edf7, #f4f8fc);
  box-shadow: var(--in);
}

.searchbox input {
  width: 132px;
  min-height: 38px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  outline: none;
}

.searchbox input::placeholder {
  color: var(--ink2);
}

.searchbox button {
  min-width: 46px;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(145deg, #fbeaf1, #f1dde7);
  box-shadow: var(--out-sm);
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.searchbox button:active {
  transform: scale(0.96);
  box-shadow: var(--in);
}

.tabs {
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 8px;
}

.tabs p {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
}

.tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: var(--r);
  font-size: 16px;
  text-decoration: none;
  background: linear-gradient(145deg, #f1f7fc, #e1ebf5);
  box-shadow: var(--out-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tabs a:hover {
  transform: translateY(-1px);
}

.tabs a:active {
  transform: scale(0.98);
  box-shadow: var(--in);
}

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 45vh;
  max-width: 1120px;
  margin: 22px auto 0;
  overflow: hidden;
  border-radius: 16px;
  border-bottom-left-radius: 50% 46px;
  border-bottom-right-radius: 50% 46px;
  background: linear-gradient(150deg, #dbe9f5, #f3e3eb);
  box-shadow: var(--out);
}

.hero-media {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-media.live img {
  opacity: 0;
}

.hero-media.live img.is-on {
  opacity: 1;
}

.hero-media:not(.live) img:first-child {
  opacity: 1;
}

.hero-copy {
  position: relative;
  max-width: 640px;
  margin: clamp(20px, 5vw, 56px);
  padding: clamp(18px, 3vw, 30px);
  border-radius: 16px;
  background: rgba(250, 244, 247, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--out);
}

.kicker {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: 0.22em;
  color: var(--ink2);
}

.hero h1 {
  margin: 0 0 10px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: clamp(30px, 6.4vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.012em;
}

.lede {
  margin: 0;
  font-size: 18px;
  line-height: 1.62;
  color: var(--ink2);
}

.shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px 20px 10px;
}

.rail {
  position: sticky;
  top: 152px;
  display: grid;
  gap: 18px;
}

.panel {
  padding: 16px 16px 18px;
  border-radius: 4px;
  border-bottom: 3px solid rgba(200, 224, 244, 1);
  background: var(--panel);
  box-shadow: var(--out-sm);
}

.panel-pink {
  border-bottom-color: rgba(245, 224, 232, 1);
  background: var(--panel-pink);
}

.panel h2 {
  margin: 0 0 12px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 19px;
  line-height: 1.3;
}

.panel h2 span,
.body h2 span,
.body h3 span {
  display: inline-block;
  padding-bottom: 4px;
  background: linear-gradient(90deg, var(--ice), var(--rose)) left bottom / 100% 3px no-repeat;
}

.panel p {
  margin: 0;
}

.raillinks {
  display: grid;
  gap: 6px;
}

.raillinks a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 16px;
  text-decoration: none;
  background: linear-gradient(145deg, #f3f8fd, #e5eef7);
  box-shadow: var(--out-sm);
}

.raillinks a:active {
  transform: scale(0.99);
  box-shadow: var(--in);
}

.totop {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  font-size: 16px;
  text-decoration: none;
  background: linear-gradient(145deg, #fbeaf1, #f2dde8);
  box-shadow: var(--out-sm);
}

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

.stage {
  min-width: 0;
}

.copy {
  min-width: 0;
}

.body {
  display: grid;
  gap: 20px;
}

.body > section {
  padding: clamp(20px, 3.2vw, 34px);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.3));
  box-shadow: var(--out-sm);
  scroll-margin-top: 158px;
}

.body h2 {
  margin: 0 0 14px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(23px, 3.2vw, 32px);
  line-height: 1.22;
  letter-spacing: -0.008em;
}

.body h3 {
  margin: 24px 0 10px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 21px;
  line-height: 1.35;
}

.body p {
  font-size: 17px;
}

.body ul,
.body ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.body li {
  margin-bottom: 0.35em;
}

.body a {
  color: #1c3b4f;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.body img {
  margin: 16px 0;
  border-radius: 12px;
  box-shadow: var(--out-sm);
}

.body blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: linear-gradient(150deg, #f8edf2, #f1e1ea);
  box-shadow: var(--in);
}

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

.body table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 16px;
}

.body th,
.body td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(23, 31, 38, 0.1);
}

.body code,
.body pre {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 15px;
}

.foot {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 18px 22px;
  max-width: 1120px;
  margin: 34px auto 0;
  padding: 26px 20px 46px;
  box-shadow: 0 -10px 24px rgba(255, 255, 255, 0.75);
}

.foot p {
  margin: 0;
  font-size: 16px;
}

.f-brand a {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 20px;
  text-decoration: none;
}

.f-links a {
  display: block;
  min-height: 40px;
  padding: 8px 0;
  font-size: 16px;
  text-decoration: none;
  color: var(--ink2);
}

.f-links a:hover {
  color: var(--ink);
}

.sub {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub input {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: #e9f1f8;
  box-shadow: var(--in);
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  outline: none;
}

.sub button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, #fbe9f1, #f1dde7);
  box-shadow: var(--out-sm);
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sub button:active {
  transform: scale(0.97);
  box-shadow: var(--in);
}

.foot small {
  grid-column: 1 / -1;
  padding-top: 6px;
  font-size: 16px;
  color: var(--ink2);
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-top: 26px;
  }

  .rail {
    position: static;
    order: 2;
  }

  .stage {
    order: 1;
  }

  .foot {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .searchbox input {
    width: 92px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .masthead {
    padding: 6px 14px 8px;
  }

  .hero {
    margin: 14px 12px 0;
    min-height: 46vh;
    border-bottom-left-radius: 50% 30px;
    border-bottom-right-radius: 50% 30px;
  }

  .hero-copy {
    margin: 16px;
  }

  .brand-name {
    font-size: 19px;
  }

  .tabs a {
    padding: 0 11px;
  }

  .body > section {
    scroll-margin-top: 168px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

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