:root {
  --sg-red: #FF2D20;
  --sg-red-hi: #FF4030;
  --sg-ink: #08090B;
  --sg-panel: #101215;
  --sg-line: #24282E;
  --sg-line-2: #2E343B;
  --sg-text: #ffffff;
  --sg-dim: #8A929C;
  --sg-dim-2: #6E7681;
  --sg-dim-3: #4B525B;
}

* { box-sizing: border-box; }

body.sg-auth {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--sg-ink);
  color: var(--sg-text);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  display: flex;
  flex-direction: column;
  position: relative;
}

.sg-scanlines, .sg-grid, .sg-sweep, .sg-glow { position: absolute; pointer-events: none; }
.sg-scanlines { inset: 0; z-index: 3; background: repeating-linear-gradient(180deg, rgba(255,255,255,.045) 0 1px, transparent 1px 4px); }
.sg-grid { inset: 0; background:
  linear-gradient(90deg, rgba(255,45,32,.055) 0 1px, transparent 1px 100%) 0 0/72px 72px,
  linear-gradient(180deg, rgba(255,45,32,.055) 0 1px, transparent 1px 100%) 0 0/72px 72px; }
.sg-sweep { left: 0; right: 0; height: 150px; z-index: 2; background: linear-gradient(180deg, transparent, rgba(255,45,32,.07) 60%, transparent); animation: sg-sweep 7s linear infinite; }
.sg-glow { inset: 0; background: radial-gradient(ellipse at 22% 45%, rgba(255,45,32,.10), transparent 55%); }

@keyframes sg-sweep { 0% { transform: translateY(-20vh); } 100% { transform: translateY(120vh); } }
@keyframes sg-blink { 0%,45% { opacity: 1; } 46%,100% { opacity: .25; } }
@keyframes sg-caret { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
@keyframes sg-rowin { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes sg-slice { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } 40% { transform: translateX(var(--sg-dx, 14px)); } 70% { transform: translateX(calc(var(--sg-dx, 14px) * -0.6)); opacity: .9; } 100% { transform: translateX(0); opacity: 0; } }
@keyframes sg-flash { 0% { opacity: 0; } 20% { opacity: 1; } 55% { opacity: .2; } 75% { opacity: .85; } 100% { opacity: 0; } }
@keyframes sg-static { 0% { opacity: .85; } 100% { opacity: 0; } }

.sg-topbar {
  position: relative; z-index: 4; flex: none;
  height: 38px; display: flex; align-items: center; gap: 26px; padding: 0 40px;
  background: var(--sg-red); color: var(--sg-ink);
  font-weight: 700; font-size: 12px; letter-spacing: .2em;
}
.sg-topbar .sg-dim { opacity: .72; color: inherit; }
.sg-audio {
  margin-left: auto; display: flex; align-items: center; gap: 7px;
  background: transparent; border: 1px solid rgba(8,9,11,.45); color: var(--sg-ink);
  font: 700 10px 'JetBrains Mono', monospace; letter-spacing: .2em; padding: 4px 9px; cursor: pointer;
}
.sg-audio-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sg-ink); opacity: .35; }
.sg-audio[aria-pressed="true"] .sg-audio-dot { opacity: 1; }
.sg-status { display: flex; align-items: center; gap: 8px; }
.sg-blink { width: 8px; height: 8px; border-radius: 50%; background: var(--sg-ink); animation: sg-blink 1.1s steps(1) infinite; }

.sg-main {
  position: relative; z-index: 4; flex: 1 1 0; min-height: 0; overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; gap: 40px; padding: 24px 40px 18px;
}
.sg-brand { flex: 1 1 340px; min-width: 300px; display: flex; flex-direction: column; gap: 24px; }

.sg-lockup { position: relative; display: flex; align-items: center; gap: 18px; will-change: transform; }
.sg-noise { position: absolute; left: -16px; right: -16px; top: -18px; bottom: -18px; overflow: hidden; pointer-events: none; z-index: 2; }
.sg-symbol { position: relative; width: 78px; height: 78px; flex: none; }
.sg-symbol img { position: absolute; left: 0; top: 0; width: 78px; will-change: transform, filter; }
.sg-ghost { filter: hue-rotate(160deg) saturate(2); opacity: .5; }
.sg-wordmark { font-weight: 700; font-size: 36px; letter-spacing: -.045em; line-height: 1; }
.sg-wordmark span { color: var(--sg-red); }
.sg-tagline { font-weight: 500; font-size: 12px; letter-spacing: .28em; color: var(--sg-red); margin-top: 10px; }
.sg-lede { max-width: 440px; margin: 0; font-size: 13px; line-height: 1.75; letter-spacing: .1em; color: var(--sg-dim-2); }

.sg-feed { border: 1px solid var(--sg-line); background: rgba(16,18,21,.72); max-width: 480px; }
.sg-feed-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid var(--sg-line); font-size: 12px; letter-spacing: .2em; color: var(--sg-dim-2); }
.sg-feed-head span:last-child { color: var(--sg-red); }
.sg-feed-body { height: 96px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg,#000 66%,transparent); mask-image: linear-gradient(180deg,#000 66%,transparent); padding: 10px 14px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; letter-spacing: .04em; }
.sg-row { display: flex; gap: 10px; flex: none; color: var(--sg-dim); animation: sg-rowin .28s ease-out both; }
.sg-row .t { color: var(--sg-dim-3); }
.sg-row .s { min-width: 96px; color: #C9D1D9; }
.sg-row.heavy .s { color: var(--sg-red); }

.sg-panel { flex: 0 1 372px; min-width: 300px; }
.sg-card { position: relative; border: 1px solid var(--sg-line); background: var(--sg-panel); padding: 24px 26px 26px; }
.sg-card::before, .sg-card::after {
  content: ''; position: absolute; width: 9px; height: 9px; background: var(--sg-red);
}
.sg-card::before { left: -1px; top: -1px; box-shadow: calc(100% + 2px) 0 0 var(--sg-red); }
.sg-card::after { left: -1px; bottom: -1px; box-shadow: calc(100% + 2px) 0 0 var(--sg-red); }

.sg-hero-tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: .2em; color: var(--sg-ink); background: var(--sg-red); padding: 4px 8px; }
.sg-card-title { font-weight: 700; font-size: 23px; letter-spacing: -.035em; color: #fff; margin: 14px 0 6px; }
.sg-prompt { display: flex; align-items: center; gap: 7px; font-size: 12px; letter-spacing: .12em; color: var(--sg-dim-2); margin-bottom: 20px; }
.sg-accent { color: var(--sg-red); }
.sg-caret { width: 6px; height: 12px; background: var(--sg-red); display: inline-block; animation: sg-caret 1s steps(1) infinite; }

.sg-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.sg-field { display: flex; flex-direction: column; gap: 7px; font-size: 12px; letter-spacing: .18em; color: var(--sg-dim); }
.sg-field input {
  width: 100%; background: var(--sg-ink); border: 1px solid var(--sg-line-2); color: #fff;
  font: 400 13px 'JetBrains Mono', monospace; padding: 11px 12px; letter-spacing: .04em; border-radius: 0;
}
.sg-field input::placeholder { color: var(--sg-dim-3); }
.sg-field input:focus { outline: none; border-color: var(--sg-red); box-shadow: 0 0 0 1px var(--sg-red); }
.sg-submit {
  width: 100%; margin-top: 4px; background: var(--sg-red); border: none; color: var(--sg-ink);
  font: 700 12px 'JetBrains Mono', monospace; letter-spacing: .24em; padding: 14px; cursor: pointer; transition: background .15s;
}
.sg-submit:hover { background: var(--sg-red-hi); }

.sg-chips { display: flex; align-items: stretch; margin-top: 18px; font-size: 12px; font-weight: 500; letter-spacing: .16em; }
.sg-chip { border: 1px solid var(--sg-line-2); border-left: none; color: var(--sg-dim); padding: 4px 9px; }
.sg-chip-live { background: var(--sg-red); color: var(--sg-ink); border: none; padding: 4px 8px; }
.sg-docref { font-size: 12px; letter-spacing: .16em; color: var(--sg-dim-3); margin-top: 14px; text-align: right; }

.sg-notice { margin-bottom: 14px; padding: 10px 12px; border-left: 3px solid var(--sg-red); background: rgba(255,45,32,.10); color: #FFD9D6; font-size: 12px; letter-spacing: .08em; line-height: 1.5; }
.sg-notice-success { border-left-color: #3FB950; background: rgba(63,185,80,.12); color: #C7F0CD; }
.sg-notice-warning { border-left-color: #FF9E00; background: rgba(255,158,0,.12); color: #FFE3B0; }
.sg-notice-error { border-left-color: var(--sg-red); }

.sg-footbar {
  position: relative; z-index: 4; flex: none; height: 34px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 40px;
  border-top: 1px solid #1A1D22; font-size: 12px; letter-spacing: .18em; color: var(--sg-dim-3);
}

@media (prefers-reduced-motion: reduce) {
  .sg-sweep, .sg-blink, .sg-caret { animation: none; }
}
@media (max-width: 900px) {
  body.sg-auth { height: auto; min-height: 100vh; overflow: auto; }
  .sg-main { overflow: visible; }
}
