/* GATE extends the shared Groundstate portal theme used by Commons/Software. */
.gate-page { color-scheme:dark; font-size:16px; line-height:1.6; }
.gate-portal { max-width:1040px; }
.gate-page .topbar { flex-wrap:wrap; }
.gate-page .topbar nav { flex-wrap:wrap; max-width:100%; }
.gate-page .topbar nav a { white-space:nowrap; }
.gate-hero { min-height:190px; }
.gate-page .portal-hero p { font-size:.95rem; line-height:1.6; }
.gate-intro { color:#bcc6cc; margin:20px 0; max-width:850px; }
.gate-page .notice { padding:16px 20px; border:1px solid var(--line); border-left:2px solid var(--cyan); background:var(--panel); color:#bcc6cc; margin:20px 0; }
.gate-page #gate-form, .gate-page #result, .gate-page #fallback { padding:clamp(18px,3vw,32px); margin:20px 0; border:1px solid var(--line); background:linear-gradient(120deg,rgba(10,14,19,.92),rgba(10,14,19,.78)); backdrop-filter:blur(7px); }
.gate-page h2 { margin:0 0 14px; font-weight:600; text-transform:uppercase; letter-spacing:.08em; font-size:1.15rem; }
.gate-page #progress { color:var(--cyan); font-size:.75rem; text-transform:uppercase; letter-spacing:.15em; padding-bottom:14px; margin:0 0 22px; border-bottom:1px solid var(--line); }
.gate-page #steps section>p { color:#bcc6cc; }
.gate-page fieldset { min-width:0; padding:18px 20px; border:1px solid var(--line); margin:24px 0; background:rgba(255,255,255,.018); }
.gate-page legend { padding:0 8px; color:#e0e8ed; font-weight:600; line-height:1.5; max-width:100%; }
.gate-page label { display:block; margin:12px 0; color:#c6ced3; cursor:pointer; }
.gate-page label.choice { display:flex; align-items:flex-start; gap:12px; margin:5px 0; padding:10px 12px; border:1px solid transparent; background:rgba(255,255,255,.018); }
.gate-page label.choice:hover { border-color:rgba(113,217,255,.25); background:rgba(113,217,255,.045); }
.gate-page label.choice:has(input:checked) { border-color:rgba(113,217,255,.4); background:rgba(113,217,255,.08); }
.gate-page input[type=radio], .gate-page input[type=checkbox] { margin-top:6px; accent-color:var(--cyan); flex:none; width:17px; height:17px; }
.gate-page input:not([type=radio]):not([type=checkbox]), .gate-page textarea { width:100%; min-width:0; padding:12px 14px; border:1px solid var(--line); border-radius:2px; background:rgba(5,9,13,.75); color:var(--ink); font:inherit; }
.gate-page textarea { resize:vertical; min-height:105px; }
.gate-page .buttons { display:flex; gap:10px; flex-wrap:wrap; margin:24px 0; }
.gate-page .btn { font-size:.75rem; padding:.8rem 1.1rem; line-height:1.4; text-align:center; }
.gate-page button:disabled { opacity:.5; cursor:wait; }
.gate-page [hidden] { display:none!important; }
.gate-page :focus-visible { outline:2px solid var(--cyan); outline-offset:4px; }
.gate-page #form-error { color:var(--warn); overflow-wrap:anywhere; }
.gate-page .small { font-size:.85rem; color:var(--muted); }
.gate-page .check { padding:16px; border:1px solid var(--line); background:rgba(113,217,255,.035); }
.gate-page .trap { display:none; }
.gate-page .rank { display:flex; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); padding:10px 0; color:#c6ced3; }
.gate-page .rank span:last-child { color:var(--cyan); }
.gate-page #result h2:not(:first-child) { margin-top:28px; }
.gate-page footer { border-top:1px solid var(--line); margin-top:32px; padding-top:24px; color:var(--muted); font-size:.85rem; }
.gate-page footer a { color:var(--cyan); }
@media(max-width:760px) {
 .gate-page .topbar { position:relative; top:auto; gap:14px; }
 .gate-page .topbar nav { margin-left:0; width:100%; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); }
 .gate-page .topbar nav a { padding:.65rem .3rem; text-align:center; font-size:.64rem; letter-spacing:.04em; }
 .gate-hero { grid-template-columns:1fr; padding:24px; }
 .gate-hero .hero-stat { display:none; }
}
@media(max-width:480px) {
 .gate-page .portal { padding:20px 16px 40px; }
 .gate-page fieldset { padding:14px; }
 .gate-page .buttons>* { flex:1 1 auto; }
 .gate-page .rank { font-size:.9rem; }
}
