:root {
  --ink: #111827;
  --muted: #738095;
  --line: #dfe5ed;
  --paper: #f4f6f9;
  --blue: #2459e0;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); font-family: "Avenir Next", "PingFang SC", sans-serif; }
button { font: inherit; cursor: pointer; }
.portal-header { position: sticky; top: 0; z-index: 10; height: 76px; display: grid; grid-template-columns: 230px 1fr 230px; align-items: center; padding: 0 28px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: white; background: var(--ink); border-radius: 6px 13px 6px 13px; font-size: 12px; font-weight: 800; }
.brand b, .brand small { display: block; }.brand b { letter-spacing: .12em; }.brand small { margin-top: 2px; color: var(--muted); font-size: 8px; letter-spacing: .18em; }
nav { height: 100%; display: flex; justify-content: center; gap: 8px; }
.tab { position: relative; min-width: 135px; padding: 0 16px; color: var(--muted); border: 0; background: transparent; }
.tab::after { content: ""; position: absolute; right: 18px; bottom: 0; left: 18px; height: 3px; background: var(--blue); transform: scaleX(0); transition: .2s ease; }
.tab:hover, .tab.active { color: var(--ink); }.tab.active::after { transform: scaleX(1); }
.tab-index { margin-right: 8px; color: #a2acba; font-size: 10px; letter-spacing: .1em; }
.demo-badge { justify-self: end; padding: 8px 12px; color: #587062; background: #eaf2eb; border-radius: 999px; font-size: 11px; }
.demo-badge i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; background: #4fa562; border-radius: 50%; }
main { padding: 18px 24px 28px; }
.project-meta { max-width: 1500px; margin: 0 auto 12px; display: flex; justify-content: space-between; align-items: end; }
.project-meta p { margin: 0 0 3px; color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.project-meta h1 { margin: 0; font-family: "Songti SC", serif; font-size: 22px; }
.project-meta a { color: var(--muted); font-size: 11px; text-decoration: none; }.project-meta a:hover { color: var(--blue); }
.frame-shell { position: relative; max-width: 1500px; height: calc(100vh - 143px); min-height: 600px; margin: auto; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 18px 45px rgba(28,40,63,.1); }
iframe { width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .25s ease; }iframe.ready { opacity: 1; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; background: white; }.loading.hidden { display: none; }
@media (max-width: 760px) {
  .portal-header { height: auto; grid-template-columns: 1fr auto; padding: 12px 15px 0; }
  .demo-badge { display: none; }
  nav { grid-column: 1 / -1; width: 100%; height: 48px; }
  .tab { min-width: 0; flex: 1; }
  main { padding: 14px 10px; }
  .frame-shell { height: calc(100vh - 154px); min-height: 520px; border-radius: 9px; }
  .project-meta { display: none; }
}
