:root {
  --ink: #eee9df;
  --muted: #a79fae;
  --night: #08070c;
  --night-soft: #111019;
  --violet: #211b2d;
  --gold: #d0aa68;
  --gold-bright: #ebce94;
  --moon: #c7c2d5;
  --line: rgba(208, 170, 104, 0.2);
  --serif: "Noto Serif SC", "Songti SC", serif;
  --sans: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--night); }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 74% 32%, rgba(74, 57, 98, 0.16), transparent 30rem),
    linear-gradient(180deg, #09080d, #0d0a12 55%, #08070b);
  font-family: var(--sans);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.16;
  pointer-events: none;
  background-image: repeating-radial-gradient(circle at 40% 20%, rgba(255,255,255,.08) 0 1px, transparent 1px 4px);
  background-size: 9px 9px;
}
a { color: inherit; }
button, input { font: inherit; }

.site-header {
  height: 76px;
  padding: 0 max(28px, 5vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 6, 10, 0.82);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(208, 170, 104, 0.15);
}
.brand { text-decoration: none; font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: .14em; display: flex; align-items: center; gap: 11px; }
.orb {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--gold-bright);
  border: 1px solid rgba(235, 206, 148, .48);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3a3046, #120f1a 68%);
  box-shadow: 0 0 28px rgba(208, 170, 104, .16), inset 0 0 15px rgba(208, 170, 104, .12);
}
nav { display: flex; gap: 30px; font-size: 13px; color: var(--muted); }
nav a { text-decoration: none; transition: color .2s; }
nav a:hover { color: var(--gold-bright); }
.quiet-button, .primary-button, .account-button { border: 0; cursor: pointer; border-radius: 999px; }
.quiet-button { padding: 10px 18px; color: var(--gold-bright); border: 1px solid var(--line); background: rgba(24, 20, 31, .72); }

.hero {
  min-height: calc(100vh - 76px);
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 90px max(24px, 6vw) 120px;
  background-image: url("/assets/hero-yinyang-v1.png");
  background-size: cover;
  background-position: center;
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(4, 3, 7, .38), rgba(4, 3, 7, .04) 28%, rgba(4, 3, 7, .18) 66%, #08070c 100%),
    radial-gradient(ellipse at center, rgba(6, 5, 10, .25) 0%, rgba(6, 5, 10, .08) 45%, rgba(6, 5, 10, .42) 100%);
}
.hero-copy { position: relative; z-index: 2; width: min(680px, 72vw); text-align: center; filter: drop-shadow(0 8px 22px rgba(0,0,0,.9)); }
.eyebrow, .section-index { color: var(--gold); letter-spacing: .24em; font-size: 10px; font-weight: 700; }
h1, h2, blockquote { font-family: var(--serif); }
h1 { margin: 22px 0 24px; font-size: clamp(48px, 6vw, 88px); line-height: 1.08; font-weight: 500; letter-spacing: -.045em; text-wrap: balance; }
.lead { max-width: 620px; margin: auto; color: #c8c1cd; font-size: 16px; line-height: 2; text-shadow: 0 2px 12px #000; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 26px; margin-top: 36px; flex-wrap: wrap; }
.primary-button { padding: 15px 25px; color: #171018; background: linear-gradient(135deg, #edcf96, #b98c4c); box-shadow: 0 12px 34px rgba(193, 145, 74, .22), inset 0 1px rgba(255,255,255,.38); font-weight: 700; }
.primary-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.text-link { color: #c9c1ce; font-size: 13px; text-underline-offset: 6px; }
.auth-message { padding: 12px 16px; border: 1px solid rgba(172, 91, 91, .3); border-radius: 12px; margin: 22px auto 0; color: #e5aaa5; background: rgba(76, 27, 31, .78); width: max-content; max-width: 100%; }
.auth-message.success { color: var(--gold-bright); background: rgba(45, 35, 23, .82); }
.archetype { position: absolute; z-index: 2; bottom: 7%; display: grid; gap: 4px; max-width: 250px; text-shadow: 0 3px 16px #000; }
.archetype-left { left: 5vw; text-align: left; }
.archetype-right { right: 5vw; text-align: right; }
.archetype span { color: var(--gold); font-size: 9px; letter-spacing: .24em; }
.archetype b { font-family: var(--serif); color: #f0e8dc; font-size: 28px; font-weight: 500; letter-spacing: .16em; }
.archetype small { color: #9f97a5; font-size: 11px; }

.story-section, .method-section, .boundary-section { padding: 120px max(28px, 12vw); border-top: 1px solid var(--line); }
.story-section { display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 7vw; justify-content: center; background: radial-gradient(circle at 18% 26%, rgba(76, 55, 42, .18), transparent 34rem); }
.story-section article h2 { font-size: 48px; margin: 0 0 36px; font-weight: 500; }
.story-section article p { color: #b5aeba; font-size: 17px; line-height: 2.15; }
.dropcap::first-letter { float: left; font-family: var(--serif); font-size: 76px; line-height: .85; margin: 12px 12px 0 0; color: var(--gold); }
blockquote { margin: 52px 0; padding: 25px 0 25px 32px; border-left: 1px solid var(--gold); color: #e1d6c7; font-size: 26px; line-height: 1.7; }
.method-section { color: var(--ink); background: linear-gradient(145deg, #15111c, #0c0a11 58%, #17111a); }
.method-section .section-index { color: var(--gold); }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.section-title h2, .boundary-section h2, .closing h2 { font-size: clamp(38px, 5vw, 68px); line-height: 1.25; font-weight: 400; }
.section-title p { color: var(--muted); max-width: 350px; line-height: 1.8; }
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 80px; border-top: 1px solid var(--line); }
.method-grid div { padding: 36px 28px 20px 0; border-right: 1px solid var(--line); min-height: 260px; }
.method-grid div + div { padding-left: 28px; }
.method-grid span { color: var(--gold); font-size: 12px; }
.method-grid h3 { font-family: var(--serif); font-size: 22px; margin: 38px 0 18px; }
.method-grid p { color: var(--muted); line-height: 1.8; font-size: 14px; }
.boundary-section { display: grid; grid-template-columns: 1.2fr .8fr; gap: 8vw; align-items: center; background: radial-gradient(circle at 80% 42%, rgba(55, 43, 74, .2), transparent 30rem); }
.boundary-section ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.boundary-section li { padding: 22px 4px; border-bottom: 1px solid var(--line); color: #b7afbb; }
.boundary-section li::before { content: "✦"; color: var(--gold); margin-right: 15px; }
.closing { text-align: center; padding: 140px 28px; color: white; border-top: 1px solid var(--line); background: radial-gradient(circle at 50% 110%, rgba(128, 86, 39, .24), transparent 28rem), #09070d; }
.closing p { color: var(--gold); letter-spacing: .2em; }
.closing h2 { margin: 15px 0 44px; }
.primary-button.light { color: #171018; background: linear-gradient(135deg, #f0d49d, #b98c4c); }
footer { display: flex; justify-content: space-between; gap: 25px; flex-wrap: wrap; padding: 28px max(28px, 5vw); font-size: 12px; color: #817987; border-top: 1px solid var(--line); background: #07060a; }
footer span { display: flex; gap: 20px; }

dialog { border: 1px solid rgba(208, 170, 104, .28); border-radius: 22px; padding: 0; width: min(440px, calc(100vw - 32px)); color: var(--ink); background: linear-gradient(145deg, rgba(27,22,34,.98), rgba(10,9,14,.99)); box-shadow: 0 30px 100px rgba(0,0,0,.75), 0 0 45px rgba(164, 115, 55, .1); }
dialog::backdrop { background: rgba(3, 2, 6, .82); backdrop-filter: blur(9px); }
#account-auth-form { padding: 42px; position: relative; display: grid; gap: 18px; text-align: center; }
.dialog-close { position: absolute; top: 14px; right: 16px; border: 0; color: #aaa1af; background: transparent; font-size: 26px; cursor: pointer; }
.account-mark { width: 58px; height: 58px; margin: auto; display: grid; place-items: center; border: 1px solid rgba(235,206,148,.38); border-radius: 50%; color: var(--gold-bright); background: radial-gradient(circle at 35% 30%, #3b3046, #110e18 70%); font-size: 23px; box-shadow: 0 0 28px rgba(208,170,104,.12); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid rgba(255,255,255,.04); border-radius: 14px; background: #0e0c13; }
.auth-tab { padding: 9px; border: 0; border-radius: 10px; color: #8f8796; background: transparent; cursor: pointer; }
.auth-tab.active { color: #171018; background: linear-gradient(135deg, #e4c789, #b98d4d); box-shadow: 0 4px 14px rgba(0,0,0,.28); font-weight: 700; }
#account-auth-form h2 { margin: 4px 0 0; font-size: 28px; font-weight: 500; }
#account-auth-form p, #account-auth-form small { color: #9d95a3; line-height: 1.7; }
#account-auth-form label { text-align: left; display: grid; gap: 8px; font-size: 12px; color: #aaa1af; }
#account-auth-form input { width: 100%; border: 1px solid rgba(208,170,104,.2); border-radius: 12px; padding: 13px 15px; outline: none; color: var(--ink); background: rgba(5,4,8,.62); }
#account-auth-form input::placeholder { color: #635d68; }
#account-auth-form input:focus { border-color: rgba(235,206,148,.7); box-shadow: 0 0 0 3px rgba(208,170,104,.1); }
.account-button { padding: 14px; color: #171018; background: linear-gradient(135deg, #edcf96, #b98c4c); font-weight: 700; }
.account-button:disabled { opacity: .55; }
#account-auth-form .login-status { margin: 0; padding: 10px 12px; border-radius: 10px; color: #e2a39f; background: rgba(87,34,39,.45); font-size: 13px; }
#account-auth-form .login-status.success { color: var(--gold-bright); background: rgba(61,45,26,.58); }

@media (max-width: 1050px) {
  .hero-copy { width: min(600px, 66vw); }
  .archetype { bottom: 4%; }
}
@media (max-width: 850px) {
  nav { display: none; }
  .hero { min-height: 820px; padding: 90px 22px 120px; background-position: center; }
  .hero-copy { width: min(620px, 92vw); }
  .hero-shade { background: linear-gradient(180deg, rgba(4,3,7,.35), rgba(4,3,7,.18) 40%, rgba(4,3,7,.55) 75%, #08070c); }
  .archetype { display: none; }
  .story-section { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .boundary-section { grid-template-columns: 1fr; }
  .section-title { display: block; }
}
@media (max-width: 520px) {
  .site-header { padding: 0 18px; }
  .brand { font-size: 17px; }
  .quiet-button { font-size: 12px; }
  .hero { min-height: 720px; padding: 72px 20px 100px; background-size: auto 100%; }
  h1 { font-size: clamp(42px, 13vw, 58px); }
  .lead { font-size: 14px; }
  .story-section, .method-section, .boundary-section { padding: 80px 24px; }
  .method-grid { grid-template-columns: 1fr; }
  .method-grid div { border-right: 0; border-bottom: 1px solid var(--line); }
  .method-grid div + div { padding-left: 0; }
  .story-section article h2 { font-size: 38px; }
  footer { display: grid; }
  input { font-size: 16px; }
  dialog { max-height: calc(100dvh - 24px); }
  #account-auth-form { padding: 34px 22px; }
}
