/* Civic Dawn for the editor's entry pages (sign-up, sign-in, invite): the same design as newcastleaihub.com.au.
   Palette: sky #87CEEB · petrol #1B5C7A · gold #FFCC00 · green #4C8C3B · near-black #0A0B0D. Fonts are self-hosted
   (the CSP allows 'self' only). Scoped to body.auth-page so the editor app itself is untouched. */
@font-face { font-family: "Bricolage Grotesque"; src: url(/fonts/bricolage-grotesque.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/instrument-sans.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/fonts/ibm-plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/fonts/ibm-plex-mono-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

body.auth-page { margin: 0; min-height: 100vh; background: #0a0b0d; color: #f4f6f8; font: 400 15px/1.5 "Instrument Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.auth-page ::selection { background: #ffcc00; color: #000; }
.auth-page :focus-visible { outline: 2px solid #ffcc00; outline-offset: 3px; }
.auth-page .mono, .auth-page .eyebrow, .auth-page .auth-bar, .auth-page label, .auth-page .stamp, .auth-page .note { font-family: "IBM Plex Mono", ui-monospace, monospace; }

.auth-bar { height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; background: #0b0c0e; border-bottom: 1px solid rgba(255,255,255,.13); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.7); white-space: nowrap; overflow: hidden; }
.auth-bar span:first-child { display: flex; align-items: center; gap: 8px; }
@media (max-width: 640px) { .auth-bar span:last-child { display: none; } }
.led { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4c8c3b; box-shadow: 0 0 8px 1px rgba(76,140,59,.6); animation: led-breathe 3s ease-in-out infinite; }
@keyframes led-breathe { 0%, 100% { box-shadow: 0 0 8px 1px rgba(76,140,59,.6); } 50% { box-shadow: 0 0 12px 3px rgba(76,140,59,.85); } }

.auth { position: relative; min-height: calc(100vh - 32px); display: flex; align-items: center; justify-content: center; padding: 40px 16px; box-sizing: border-box; overflow: hidden; }
.auth::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 42px 42px; -webkit-mask-image: radial-gradient(110% 90% at 50% 0%, #000 25%, transparent 78%); mask-image: radial-gradient(110% 90% at 50% 0%, #000 25%, transparent 78%); }
.auth::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(55% 60% at 82% 8%, rgba(135,206,235,.16), transparent 60%), radial-gradient(45% 55% at 8% 95%, rgba(27,92,122,.10), transparent 55%); }

.auth .card { position: relative; z-index: 1; width: min(560px, 100%); box-sizing: border-box; padding: 32px; display: flex; flex-direction: column; gap: 14px; background: #101114; border: 1px solid rgba(255,255,255,.14); border-radius: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 24px 60px -24px rgba(0,0,0,.55), 0 0 60px -18px rgba(135,206,235,.3); animation: rise .7s cubic-bezier(.16,1,.3,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.auth-brand { font: 800 19px "Bricolage Grotesque", system-ui, sans-serif; letter-spacing: -.02em; color: #f4f6f8; text-decoration: none; }
.auth-brand span { color: #87ceeb; }
.eyebrow { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: #87ceeb; margin: 6px 0 0; }
.auth h1 { margin: 0; font: 800 2.1rem/1.03 "Bricolage Grotesque", system-ui, sans-serif; letter-spacing: -.03em; }
.auth h1 .cursor::after { content: "▍"; color: #87ceeb; margin-left: .08em; animation: blink 1.1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.auth .muted { color: #a9bcc6; margin: 0; }
.auth .small { font-size: 13px; }
.auth a { color: #87ceeb; }
.auth label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #a9bcc6; }
.auth input[type=text], .auth input[type=email], .auth input[type=password], .auth input[type=tel] { width: 100%; box-sizing: border-box; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.13); border-radius: 3px; padding: 12px 14px; color: #f4f6f8; font: 400 15.5px "Instrument Sans", system-ui, sans-serif; transition: border-color .15s; }
.auth input:focus { outline: 2px solid rgba(135,206,235,.35); outline-offset: 0; border-color: #87ceeb; }
.auth .row { display: flex; gap: 8px; align-items: stretch; }
.auth .row input { flex: 1; min-width: 0; }
.auth .btn, .auth .btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 3px; padding: 13px 22px; font: 600 15px "Instrument Sans", system-ui, sans-serif; cursor: pointer; transition: all .2s; white-space: nowrap; }
.auth .btn { background: transparent; color: #f4f6f8; border: 1px solid rgba(255,255,255,.3); }
.auth .btn:hover { background: rgba(255,255,255,.08); }
.auth .btn-primary { background: #ffcc00; color: #000; border: 0; box-shadow: 0 6px 22px -8px rgba(255,204,0,.55); }
.auth .btn-primary:hover { background: #e6b800; transform: translateY(-1px); }
.auth .btn:disabled, .auth .btn-primary:disabled { opacity: .6; cursor: default; transform: none; }
.auth .err { color: #ffb199; margin: 0; font-size: 14px; min-height: 1em; }
.auth .err:empty { display: none; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; border: 0; }
.seg legend { padding: 0; margin-bottom: 8px; }
.seg .opt { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.13); border-radius: 3px; cursor: pointer; font: 500 14px "Instrument Sans", system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: #f4f6f8; }
.seg .opt:has(input:checked) { border-color: #87ceeb; background: rgba(135,206,235,.08); }
.seg input { accent-color: #87ceeb; margin: 0; }
@media (max-width: 480px) { .seg { grid-template-columns: 1fr; } .auth .card { padding: 24px 18px; } }
.note { font-size: 12px; letter-spacing: .02em; color: #a9bcc6; margin: -4px 0 0; min-height: 1.4em; }
.note.ok { color: #6fbf5a; }
.note.bad { color: #ffb199; }
.stamp { display: inline-block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #6fbf5a; border: 1px solid rgba(76,140,59,.55); border-radius: 2px; padding: 1.5px 6px; }
.auth .foot { border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; margin-top: 4px; }
.auth .code { font: 600 28px "IBM Plex Mono", monospace; letter-spacing: .3em; text-align: center; }
@media (prefers-reduced-motion: reduce) { .led, .auth .card, .auth h1 .cursor::after { animation: none !important; } }

/* the [hidden] attribute must beat the flex display on cards and wrappers */
.auth-page [hidden], .auth [hidden] { display: none !important; }

.auth .opt.tick { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px dashed rgba(255,255,255,.2); border-radius: 3px; cursor: pointer; font: 400 13px/1.45 "Instrument Sans", system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: #a9bcc6; margin-top: -4px; }
.auth .opt.tick input { accent-color: #87ceeb; margin: 3px 0 0; flex: none; }
.auth .opt.tick:has(input:checked) { border-color: #87ceeb; color: #f4f6f8; }
.auth .opt.tick[hidden] { display: none !important; }
