:root{
  color-scheme: dark;
  --bg:#07110d;
  --bg-soft:#0d1813;
  --panel:#102019;
  --panel-strong:#14251d;
  --line:#22382f;
  --line-soft:rgba(255,255,255,.08);
  --text:#eff8f1;
  --muted:#a7b8ad;
  --gold:#d8be6d;
  --gold-soft:#f1e0aa;
  --green:#7de0ab;
  --green-deep:#2d8d5f;
  --danger:#ff9b9b;
  --shadow:0 14px 40px rgba(0,0,0,.22);
  --radius-xl:26px;
  --radius-lg:20px;
  --radius-md:14px;
  --radius-sm:10px;
  --font-sans: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:var(--font-sans);
  color:var(--text);
  background:
    radial-gradient(circle at 85% 10%, rgba(216,190,109,.09), transparent 26%),
    radial-gradient(circle at 15% 0%, rgba(125,224,171,.08), transparent 24%),
    linear-gradient(135deg, #050b08 0%, #09120e 48%, #07110d 100%);
}
body::before{content:none}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
img{display:block;max-width:100%}

.shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:300px minmax(0,1fr);
}

.side{
  position:sticky;
  top:0;
  align-self:start;
  min-height:100vh;
  padding:28px 22px;
  border-right:1px solid var(--line);
  background:linear-gradient(180deg, rgba(8,14,10,.92), rgba(7,12,9,.82));
  backdrop-filter:blur(16px);
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:14px;
  margin-bottom:28px;
}

.brand-mark{
  display:grid;
  grid-template:repeat(2,6px)/repeat(2,6px);
  gap:4px;
  width:36px;
  height:36px;
  padding:7px;
  border-radius:8px;
  background:var(--gold);
  flex:0 0 auto;
}
.brand-mark i{border-radius:1px;background:#0f1612}
.brand-mark i:nth-child(2){opacity:.6}
.brand-mark i:nth-child(3){opacity:.78}

.brand strong,
.brand small{display:block}
.brand strong{font-size:18px;letter-spacing:.02em}
.brand small{margin-top:3px;color:var(--muted);font-size:10px;letter-spacing:.18em}

.side-card{
  padding:18px;
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  background:linear-gradient(135deg, rgba(216,190,109,.11), rgba(125,224,171,.06));
  box-shadow:var(--shadow);
}
.side-card .eyebrow,
.hero > .hero-copy > p:first-child,
.signal-strip span{
  display:block;
  color:var(--gold-soft);
  font-size:10px;
  font-weight:700;
  letter-spacing:.18em;
  text-transform:uppercase;
}
.side-card p{
  margin:14px 0 0;
  color:#eef6ef;
  line-height:1.8;
  font-size:13px;
}

.side nav{
  display:grid;
  gap:10px;
  margin-top:24px;
}
.side nav a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:50px;
  padding:0 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.02);
  color:var(--muted);
  transition:transform .16s ease,border-color .16s ease,background .16s ease,color .16s ease;
}
.side nav a::after{
  content:"↗";
  color:rgba(255,255,255,.4);
}
.side nav a:hover{
  transform:translateY(-1px);
  border-color:rgba(216,190,109,.38);
  color:var(--text);
  background:rgba(216,190,109,.08);
}

.side-foot{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:22px;
}
.side-foot span{
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--muted);
  background:rgba(255,255,255,.03);
  font-size:11px;
}

.content{
  padding:28px 28px 40px;
}

body:not(.authed) .grid,
body:not(.authed) .story-cards,
body:not(.authed) .panel,
body:not(.authed) .forms {
  display:none !important;
}
body:not(.authed) #logout,
body.authed #login,
body.authed #qr-login {
  display:none !important;
}

.hero,
.signal-strip,
.story-cards article,
.panel,
.forms article{
  border:1px solid var(--line);
  border-radius:var(--radius-xl);
  background:rgba(16,32,25,.78);
  box-shadow:var(--shadow);
}

.hero{
  display:grid;
  grid-template-columns:minmax(0,1.18fr) minmax(360px,.82fr);
  gap:22px;
  padding:28px;
  background:
    linear-gradient(135deg, rgba(216,190,109,.14), rgba(125,224,171,.08)),
    rgba(16,32,25,.8);
}

.hero-copy{
  display:grid;
  align-content:start;
  gap:18px;
}

.hero-copy h1{
  margin:0;
  max-width:720px;
  font-size:clamp(34px, 4vw, 58px);
  line-height:1.03;
  letter-spacing:-.04em;
}
.hero-copy .lead{
  max-width:760px;
  margin:0;
  color:var(--muted);
  font-size:15px;
  line-height:1.85;
}

.login-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}
.hero button,
form button{
  min-height:46px;
  padding:0 18px;
  border:0;
  border-radius:999px;
  background:linear-gradient(135deg, var(--gold), var(--gold-soft));
  color:#101612;
  font-weight:800;
  letter-spacing:.01em;
  box-shadow:0 12px 26px rgba(216,190,109,.22);
}
.hero button.secondary,
.qr-login-panel button.secondary{
  background:transparent;
  color:var(--gold-soft);
  border:1px solid rgba(216,190,109,.45);
  box-shadow:none;
}

.hero-pills{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.hero-pills span{
  padding:9px 12px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  background:rgba(255,255,255,.04);
  color:#edf7ef;
  font-size:12px;
}

.hero-panel{
  display:grid;
  align-content:start;
  gap:16px;
}
.hero-visual{
  margin:0;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  border-radius:26px;
  background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,0,0,.14));
}
.hero-visual img{
  width:100%;
  aspect-ratio:1.42 / 1;
  object-fit:cover;
  object-position:center;
  filter:saturate(1.06) contrast(1.02);
}

.qr-login-panel{
  display:grid;
  gap:10px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:24px;
  background:rgba(7,12,9,.66);
  backdrop-filter:blur(16px);
}
.qr-login-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
}
.qr-login-head span{
  font-size:14px;
  font-weight:800;
}
.qr-login-head small{
  color:var(--muted);
}
.qr-login-frame{
  position:relative;
  display:grid;
  place-items:center;
  min-height:260px;
  overflow:hidden;
  border:1px solid rgba(216,190,109,.24);
  border-radius:20px;
  background:
    radial-gradient(circle at 50% 50%, rgba(216,190,109,.08), transparent 58%),
    #fff;
}
.qr-login-frame img{
  width:238px;
  height:238px;
  object-fit:contain;
}
.qr-login-frame span{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  color:var(--green-deep);
  font-weight:700;
  background:#fff;
}
.qr-login-panel p{
  margin:2px 0 0;
  color:var(--green);
}
.qr-login-panel a{
  color:var(--gold-soft);
  text-decoration:underline;
  text-underline-offset:3px;
}

.signal-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0;
  margin-top:18px;
  overflow:hidden;
}
.signal-strip div{
  display:grid;
  gap:8px;
  min-height:96px;
  padding:20px 22px;
  border-right:1px solid var(--line);
}
.signal-strip div:last-child{border-right:0}
.signal-strip strong{
  font-size:14px;
  line-height:1.55;
  color:#f5fbf4;
}

.grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin-top:18px;
}
.grid article{
  padding:22px;
  border:1px solid var(--line);
  border-radius:24px;
  background:rgba(18,34,27,.86);
}
.grid span{
  display:block;
  font-size:38px;
  line-height:1;
  font-weight:900;
  color:var(--green);
}
.grid small{
  display:block;
  margin-top:10px;
  color:var(--muted);
  font-size:12px;
}

.story-cards{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin-top:18px;
}
.story-cards article{
  padding:22px;
  background:rgba(255,255,255,.03);
}
.story-cards span{
  display:inline-grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:10px;
  background:rgba(216,190,109,.15);
  color:var(--gold-soft);
  font-size:11px;
  font-weight:800;
}
.story-cards h2{
  margin:16px 0 10px;
  font-size:21px;
}
.story-cards p{
  margin:0;
  color:var(--muted);
  line-height:1.8;
}

.panel{
  margin-top:18px;
  padding:22px;
}
.panel-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}
.panel-head h2,
.forms h2{
  margin:0;
  font-size:22px;
}
.panel-head span{
  color:var(--muted);
  font-size:12px;
}
pre{
  margin:0;
  padding:18px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:rgba(0,0,0,.22);
  color:#d7efe0;
  white-space:pre-wrap;
  line-height:1.7;
  overflow:auto;
  max-height:520px;
}

.forms{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-top:18px;
}
.forms article{
  padding:22px;
  background:rgba(16,32,25,.84);
}
form{
  display:grid;
  gap:10px;
  margin-top:14px;
}
input,select,textarea{
  width:100%;
  min-height:46px;
  padding:12px 14px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background:rgba(4,9,7,.82);
  color:var(--text);
}
textarea{
  min-height:110px;
  resize:vertical;
}
input::placeholder,textarea::placeholder{
  color:#809387;
}
input:focus,select:focus,textarea:focus,button:focus-visible,a:focus-visible{
  outline:2px solid rgba(216,190,109,.55);
  outline-offset:2px;
}

.danger{color:var(--danger)}

@media (max-width: 1180px){
  .shell{grid-template-columns:260px minmax(0,1fr)}
  .hero{grid-template-columns:1fr}
}

@media (max-width: 860px){
  .shell{grid-template-columns:1fr}
  .side{
    position:relative;
    min-height:auto;
    border-right:0;
    border-bottom:1px solid var(--line);
  }
  .content{padding:18px}
  .grid,
  .story-cards,
  .forms,
  .signal-strip{
    grid-template-columns:1fr;
  }
  .panel-head,
  .hero-copy,
  .hero-panel{
    gap:14px;
  }
  .hero-copy h1{font-size:32px}
  .hero-visual img{aspect-ratio:1.32 / 1}
}
