:root {
  color-scheme: dark;
  --bg: #080b14;
  --panel: #101522;
  --panel-2: #151b2a;
  --line: #283149;
  --text: #f5f7ff;
  --muted: #9ba6bd;
  --accent: #7c89ff;
  --accent-2: #a8b1ff;
  --good: #69d7a5;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% -10%, #1d2852 0, transparent 32rem), var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
.topbar { height: 72px; padding: 0 clamp(20px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(8,11,20,.78); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #6978ff; border-radius: 10px; background: linear-gradient(145deg,#7080ff,#4855be); font-size: 12px; box-shadow: 0 8px 30px rgba(92,108,255,.3); }
.account { display: flex; align-items: center; gap: 18px; font-size: 14px; color: var(--muted); }
.quiet-link, .back-link { color: var(--accent-2); }
main { width: min(1440px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0 80px; }
.eyebrow { margin: 0 0 8px; color: var(--accent-2); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(34px, 5vw, 64px); line-height: 1; letter-spacing: -.055em; }
h2 { letter-spacing: -.025em; }
.login-shell { min-height: calc(100vh - 204px); display: grid; grid-template-columns: minmax(0,1.2fr) minmax(320px,.8fr); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; background: rgba(16,21,34,.8); box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.login-panel { padding: clamp(42px,8vw,110px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.login-panel h1 { max-width: 680px; }
.lede { max-width: 600px; margin: 28px 0; color: var(--muted); font-size: 18px; line-height: 1.65; }
.discord-button, button { border: 0; border-radius: 10px; background: var(--accent); color: white; font: inherit; font-weight: 750; cursor: pointer; }
.discord-button { padding: 15px 22px; }
.discord-button:hover, button:hover { background: #919cff; }
.fine-print { max-width: 520px; margin: 20px 0 0; color: #7f899e; font-size: 13px; line-height: 1.5; }
.signal-panel { padding: 56px; background: linear-gradient(160deg,rgba(102,117,255,.18),rgba(13,18,31,.82)); display: flex; flex-direction: column; justify-content: space-between; }
.pulse { width: 120px; height: 120px; border-radius: 50%; border: 1px solid rgba(161,173,255,.45); box-shadow: inset 0 0 0 28px rgba(112,128,255,.08), 0 0 80px rgba(96,112,255,.25); }
.signal-panel dl { margin: 40px 0 0; }
.signal-panel dl div { padding: 18px 0; border-top: 1px solid rgba(255,255,255,.13); }
.signal-panel dt { font-weight: 750; }
.signal-panel dd { margin: 7px 0 0; color: var(--muted); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 38px; }
.page-head h1 { font-size: clamp(34px,4vw,54px); }
.split-head { gap: 40px; }
.back-link { display: inline-block; margin-bottom: 28px; font-size: 14px; }
.guild-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(330px,1fr)); gap: 18px; }
.guild-card { min-height: 140px; padding: 24px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg,var(--panel-2),var(--panel)); transition: transform .18s ease,border-color .18s ease; }
.guild-card:hover { transform: translateY(-3px); border-color: #5867cf; }
.guild-monogram { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 15px; background: #293256; color: #c8ceff; font-weight: 800; }
.guild-copy h2 { margin-bottom: 7px; font-size: 18px; }
.guild-copy p, .guild-meta { margin: 0; color: var(--muted); font-size: 13px; }
.guild-meta { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; }
.settings-form { width: min(520px,100%); padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.field label { display: block; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.field input { width: 100%; }
.field small { display: block; margin-top: 7px; color: #778198; }
.check-field { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.check-field input { min-width: auto; flex: none; accent-color: var(--accent); }
.settings-form button { min-height: 42px; }
input { min-width: 0; flex: 1; border: 1px solid #36415f; border-radius: 9px; background: #0b0f19; color: var(--text); padding: 11px 12px; font: inherit; }
button { padding: 0 17px; }
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.stats-row div { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.stats-row span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.stats-row strong { font-size: 17px; }
.activity-panel { border: 1px solid var(--line); border-radius: 18px; background: rgba(16,21,34,.9); overflow: hidden; }
.section-title { padding: 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.section-title h2 { margin: 0; font-size: 22px; }
.section-title > span { color: var(--muted); font-size: 13px; }
.event-row { border-bottom: 1px solid rgba(255,255,255,.07); }
.event-row:last-child { border-bottom: 0; }
.event-row summary { padding: 18px 24px; display: grid; grid-template-columns: minmax(220px,1.1fr) minmax(180px,1fr) minmax(170px,1fr) minmax(190px,.8fr); gap: 18px; align-items: center; cursor: pointer; list-style: none; }
.event-row summary::-webkit-details-marker { display: none; }
.event-row summary:hover { background: rgba(124,137,255,.06); }
.event-type { font-weight: 750; }
.event-subject, .event-actor, time { color: var(--muted); font-size: 13px; }
.event-detail { padding: 22px 24px 26px; display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; background: #0b0f19; }
.event-detail h3 { color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
pre { min-height: 120px; max-height: 320px; margin: 0; padding: 14px; overflow: auto; border: 1px solid #20283b; border-radius: 10px; background: #080b12; color: #c9d1e4; font: 12px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace; white-space: pre-wrap; }
.event-id { grid-column: 1/-1; margin: 4px 0 0; color: #68738b; font: 12px ui-monospace,SFMono-Regular,Consolas,monospace; }
.empty-state { padding: 64px 28px; border: 1px dashed #35405d; border-radius: 18px; text-align: center; color: var(--muted); }
.empty-state h2 { color: var(--text); }
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .signal-panel { min-height: 360px; }
  .split-head { align-items: stretch; flex-direction: column; }
  .settings-form { width: 100%; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .event-row summary { grid-template-columns: 1fr 1fr; }
  .event-detail { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  main { width: min(100% - 24px,1440px); padding-top: 30px; }
  .topbar { padding: 0 16px; }
  .account > span { display: none; }
  .login-panel, .signal-panel { padding: 32px 24px; }
  .guild-card { grid-template-columns: auto 1fr; }
  .guild-meta { display: none; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .settings-form { grid-template-columns: 1fr; }
  .event-row summary { grid-template-columns: 1fr; gap: 7px; }
}
