:root {
  --ink: #e8f6ef;
  --ink-strong: #f4fff9;
  --muted: #9db8aa;
  --muted-strong: #bfd7ca;
  --line: rgba(159, 225, 203, .18);
  --line-strong: rgba(159, 225, 203, .34);
  --brand: #35e09a;
  --brand-strong: #7ff1bc;
  --gold: #c9ae6e;
  --soft: rgba(53, 224, 154, .09);
  --code: #06100d;
  --page: #060b09;
  --panel: rgba(9, 22, 18, .78);
  --panel-strong: rgba(12, 31, 24, .9);
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--page); }
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 78% -10%, rgba(53,224,154,.16), transparent 68%),
    radial-gradient(720px 480px at 8% 18%, rgba(38,124,102,.14), transparent 70%),
    linear-gradient(180deg, #07100d 0%, #060b09 46%, #08110e 100%);
  font: 15px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .34;
  background-image:
    radial-gradient(circle at 12% 22%, rgba(255,255,255,.8) 0 1px, transparent 1.4px),
    radial-gradient(circle at 68% 34%, rgba(159,225,203,.8) 0 1px, transparent 1.5px),
    radial-gradient(circle at 42% 74%, rgba(255,255,255,.52) 0 1px, transparent 1.3px),
    radial-gradient(circle at 91% 78%, rgba(159,225,203,.65) 0 1px, transparent 1.4px);
  background-size: 220px 220px, 330px 330px, 270px 270px, 390px 390px;
  animation: star-drift 32s linear infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: -20% -10%;
  z-index: -1;
  pointer-events: none;
  opacity: .38;
  background: linear-gradient(116deg, transparent 28%, rgba(76,223,167,.05) 42%, rgba(201,174,110,.07) 49%, transparent 62%);
  transform: rotate(-8deg);
  filter: blur(26px);
}

@keyframes star-drift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-24px, 18px, 0); } }

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }

header {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 70px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 14, 11, .76);
  box-shadow: 0 12px 38px rgba(0,0,0,.24);
  backdrop-filter: blur(18px) saturate(120%);
}

.bar {
  max-width: 1240px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: auto;
  padding: 0 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--ink-strong);
  font-weight: 760;
  text-decoration: none;
  font-size: 16px;
  letter-spacing: .02em;
}

.brand img {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: brightness(1.45) saturate(1.22) drop-shadow(0 0 16px rgba(53,224,154,.3));
}

.bar nav { display: flex; align-items: center; gap: 18px; }
.bar nav a { color: var(--muted-strong); text-decoration: none; font-size: 13px; }
.bar nav a:hover { color: var(--ink-strong); }
.bar .button {
  color: #04120b;
  background: linear-gradient(135deg, #7ff1bc, #35e09a);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  padding: 8px 15px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(53,224,154,.22);
}
.bar .button:hover { color: #04120b; transform: translateY(-1px); }

.layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 52px 28px 88px;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 46px;
}

aside {
  position: sticky;
  top: 98px;
  align-self: start;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(13,33,26,.78), rgba(8,21,17,.66));
  box-shadow: 0 18px 42px rgba(0,0,0,.22);
  backdrop-filter: blur(16px);
}

aside strong { display: block; margin: 0 0 11px; color: var(--gold); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
aside a { display: block; padding: 7px 8px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 13px; transition: color .2s ease, background .2s ease, transform .2s ease; }
aside a:hover { color: var(--ink-strong); background: rgba(53,224,154,.1); transform: translateX(2px); }

main { min-width: 0; max-width: 880px; }
.eyebrow { color: var(--brand); font-weight: 800; letter-spacing: .12em; font-size: 12px; text-transform: uppercase; }
h1 { margin: 10px 0 14px; color: var(--ink-strong); font-size: clamp(30px, 4vw, 44px); line-height: 1.2; letter-spacing: -.03em; }
h2 { margin: 54px 0 16px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--ink-strong); font-size: 25px; line-height: 1.3; letter-spacing: -.02em; scroll-margin-top: 96px; }
h3 { margin: 28px 0 9px; color: var(--muted-strong); font-size: 18px; }
p { margin: 9px 0 15px; }
.lead { color: var(--muted-strong); font-size: 17px; }
.muted { color: var(--muted); }

.ai-entry {
  position: relative;
  overflow: hidden;
  margin: 0 0 36px;
  padding: 28px 30px 24px;
  border: 1px solid rgba(127,241,188,.46);
  border-radius: 22px;
  background:
    radial-gradient(480px 180px at 92% 0%, rgba(53,224,154,.2), transparent 72%),
    linear-gradient(135deg, rgba(14,46,34,.94), rgba(8,24,19,.8));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.07);
}
.ai-entry::after { content: ""; position: absolute; width: 240px; height: 240px; right: -90px; top: -100px; border: 1px solid rgba(127,241,188,.18); border-radius: 50%; box-shadow: 0 0 0 18px rgba(127,241,188,.03), 0 0 0 38px rgba(127,241,188,.02); pointer-events: none; }
.ai-entry-kicker { color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.ai-entry-title { position: relative; z-index: 1; margin: 7px 0 12px; color: var(--ink-strong); font-size: clamp(25px, 3vw, 34px); line-height: 1.3; font-weight: 800; letter-spacing: -.025em; }
.ai-entry p { position: relative; z-index: 1; color: var(--muted-strong); }
.ai-entry .muted { font-size: 13px; }

.callout {
  margin: 22px 0 30px;
  padding: 17px 19px;
  border: 1px solid rgba(127,241,188,.28);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(53,224,154,.1), rgba(12,30,24,.62));
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
}
.callout b { display: block; margin-bottom: 4px; color: var(--brand-strong); }

code {
  padding: 2px 6px;
  border: 1px solid rgba(159,225,203,.15);
  border-radius: 6px;
  background: rgba(159,225,203,.1);
  color: #c8f5df;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .9em;
  overflow-wrap: anywhere;
}

pre {
  position: relative;
  overflow: auto;
  margin: 13px 0 22px;
  padding: 20px 20px 19px;
  border: 1px solid rgba(159,225,203,.18);
  border-radius: 14px;
  background: linear-gradient(145deg, #071510, #04100c);
  color: #cde8da;
  box-shadow: 0 18px 40px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.04);
  line-height: 1.65;
  font-size: 13px;
}
pre code { padding: 0; border: 0; color: inherit; background: transparent; white-space: pre; }
.copy {
  position: absolute;
  top: 9px;
  right: 10px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid rgba(127,241,188,.3);
  border-radius: 8px;
  color: var(--brand-strong);
  background: rgba(53,224,154,.11);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  transition: background .2s ease, transform .2s ease;
}
.copy:hover { background: rgba(53,224,154,.2); transform: translateY(-1px); }
.copy:focus-visible, .bar a:focus-visible, aside a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

table {
  width: 100%;
  margin: 13px 0 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  border-spacing: 0;
  overflow: auto;
  background: rgba(8, 23, 18, .72);
  box-shadow: 0 14px 32px rgba(0,0,0,.18);
}
th, td { padding: 11px 13px; text-align: left; border-bottom: 1px solid rgba(159,225,203,.12); vertical-align: top; }
th { color: var(--gold); background: rgba(53,224,154,.07); font-size: 12px; letter-spacing: .04em; }
td { color: var(--muted-strong); }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; padding: 1px 8px; border: 1px solid rgba(127,241,188,.28); border-radius: 999px; color: var(--brand-strong); background: rgba(53,224,154,.1); font-size: 12px; font-weight: 700; }
ul, ol { margin: 8px 0 18px; padding-left: 23px; }
li { margin: 6px 0; }
.footer { margin-top: 52px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.payment-announcement[hidden] { display: none; }
.payment-announcement { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(1,7,5,.78); backdrop-filter: blur(12px); }
.payment-announcement-card { width: min(100%, 520px); padding: 28px 28px 24px; border: 1px solid rgba(239,157,157,.42); border-radius: 18px; background: linear-gradient(145deg, #10221b, #0a1511); box-shadow: 0 28px 72px rgba(0,0,0,.45); }
.payment-announcement-kicker { margin: 0 0 8px; color: #ffb2a9; font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.payment-announcement-title { margin: 0 0 12px; color: #fff1ee; font-size: 24px; line-height: 1.35; }
.payment-announcement-text { margin: 0 0 20px; color: var(--muted-strong); font-size: 16px; }
.payment-announcement-text strong { color: #ffb2a9; }
.payment-announcement-close { display: block; width: 100%; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 10px; color: #170707; background: #ffb2a9; font: inherit; font-weight: 800; cursor: pointer; }
.payment-announcement-close:hover { background: #ffd1cc; }
body.announcement-open { overflow: hidden; }

@media (max-width: 800px) {
  header { height: 60px; }
  .bar { padding: 0 16px; }
  .brand { font-size: 14px; }
  .brand img { width: 30px; height: 30px; }
  .bar nav { gap: 8px; }
  .bar nav a:not(.button) { display: none; }
  .bar .button { padding: 8px 12px; font-size: 12px; }
  .layout { display: block; padding: 30px 16px 58px; }
  aside { position: static; display: flex; gap: 6px; overflow-x: auto; margin: 0 0 26px; padding: 9px; white-space: nowrap; }
  aside strong { display: none; }
  aside a { flex: 0 0 auto; padding: 7px 9px; font-size: 12px; }
  h1 { font-size: 30px; }
  h2 { margin-top: 42px; padding-top: 22px; font-size: 22px; }
  .ai-entry { padding: 22px 19px 18px; border-radius: 18px; }
  .ai-entry-title { font-size: 25px; }
  pre { padding: 18px 15px; font-size: 12px; }
  table { display: block; max-width: 100%; overflow-x: auto; white-space: nowrap; }
  th, td { padding: 9px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
