@charset "UTF-8";

/*
	gate.css - THE GATE THEME CONTRACT (habport G1, 2026-11-20; map design/habeeriya-port.md
	§9 G1, decisions D76 and D94-D99).

	Every gate page (signup/gate.php, its refusal pages included) and every gate
	confirmation page (signup/confirm.php, D97) loads this file after fp.css and
	monkseal.css and BEFORE the gate's own style list (fp_gate_css, "a,b,c" ->
	css/a/s.css, css/b/s.css, ...). It holds three things and no colour values:

	1. THE TOKENS. A gate palette is a fixed set of token PAIRS,
	   --fp-gate-<name>-light / --fp-gate-<name>-dark. A gate STYLE (css/<style>/s.css)
	   declares the pairs - every pair, both halves (D76: "both palettes, always");
	   in a list of several styles the FIRST must declare all of them, a later one may
	   re-declare any. A missing pair is not an error the browser reports: the
	   property it feeds falls back to the browser's default (a transparent box,
	   inherited text). css/default/s.css is the model, and the list is below.

	2. THE SWITCH, once, here (as sites/fpsites.css and fp.css do theirs): the
	   resolved --fp-gate-<name> is the -light half unless <html data-fp-theme> asks
	   for dark - "dark" always, "auto" when the visitor's OS prefers dark. gate.php
	   and confirm.php always write "auto" (D94: the VISITOR'S OS decides - no
	   per-gate setting); the UCP's ☀️/🌙 preview frames (D99) write "light" and
	   "dark" to show each half. color-scheme moves with the palette, so the
	   browser's own widgets (inputs, the select, the button, scrollbars) and its
	   Canvas / CanvasText follow - snippet #10's `background-color: Canvas` box
	   included. No attribute = light, as every gate was before G1.

	3. THE RULES. The page's own parts (.sucontainer, .sulabel, the invite label and
	   ticket, the picture frame) and the ROLE CLASSES a body, an invite's contents or
	   a snippet shown on a gate may use (D95) - each paints its role's three tokens:

	     fp-gate-band    a strong title strip (Habeeriya's gold-on-black name)
	     fp-gate-notice  "look here" (the invitational label, a call to sign up)
	     fp-gate-info    a calm side note (the Telegram line, a meeting's date)
	     fp-gate-accent  a highlight (an invite's own box)
	     fp-gate-quiet   a subdued box (an invite's fine print)
	     fp-gate-ok      success (confirm.php's "you're on the list")
	     fp-gate-alert   failure / warning (confirm.php's refusals, an owner's notices)

	   A role class sets the background, the text colour and the border COLOUR; the
	   body still says the size, padding, radius and border style it wants
	   (class="fp-gate-info" style="padding: 15px; border-radius: 15px;"). For anything
	   the roles do not cover, any resolved token may be named in an inline style:
	   style="border-color: var(--fp-gate-notice-border)". A colour of a body's own
	   (a literal) does not change with the theme: that is what D76's backfill (G2)
	   moved every gate off.

	   THE PANEL (fp-gate-panel, 2026-11-20, found on the live confirmation page): the page's own background and
	   text as a box - for words that would otherwise stand straight on a style's page PICTURE (habeeriya_goth's
	   pattern, unveiled in dark). confirm.php wraps its whole content in one; a body may use it too. Not a role:
	   it has no tokens of its own (page-bg, ink).

	   Links: inside the strong roles (band, notice, accent, ok, alert) a link takes the
	   role's text colour, underlined - the browser's blue would vanish on them; inside
	   info and quiet, and on the page, the browser's own link colours, which follow
	   color-scheme.

	THE TOKEN LIST (each one a pair, -light and -dark):
	  page-bg          the page behind everything (body)
	  page-veil        a wash a style lays over its OWN page picture, in its own rule
	                   (habeeriya_goth's pattern); transparent where there is no picture
	  ink              the page's text
	  surface-bg       .sucontainer - the sign-up form's box (the list's banner is drawn
	  surface-border     over its top by FPSignupForm, inline)
	  label-bg         .sulabel - each field's label chip, and the heading chips
	  label-ink
	  label-border
	  codelabel-bg     .invite_code_label - "קוד הזמנה:" beside the ticket
	  codelabel-ink
	  codelabel-border
	  ticket-bg        .gate_ticket - the invite code itself, 🎟️ … 🎟️
	  ticket-ink
	  ticket-border
	  image-border     .suimage
	  <role>-bg, <role>-ink, <role>-border   for each role above (7 x 3)

	Checking a style: every name above, twice, in css/<style>/s.css -
	map/migrations/habport-20261119/g1/contract.js reads this header's list and
	reports each style's missing and unknown pairs.
*/

:root
{
	--fp-gate-page-bg:          var(--fp-gate-page-bg-light);
	--fp-gate-page-veil:        var(--fp-gate-page-veil-light);
	--fp-gate-ink:              var(--fp-gate-ink-light);
	--fp-gate-surface-bg:       var(--fp-gate-surface-bg-light);
	--fp-gate-surface-border:   var(--fp-gate-surface-border-light);
	--fp-gate-label-bg:         var(--fp-gate-label-bg-light);
	--fp-gate-label-ink:        var(--fp-gate-label-ink-light);
	--fp-gate-label-border:     var(--fp-gate-label-border-light);
	--fp-gate-codelabel-bg:     var(--fp-gate-codelabel-bg-light);
	--fp-gate-codelabel-ink:    var(--fp-gate-codelabel-ink-light);
	--fp-gate-codelabel-border: var(--fp-gate-codelabel-border-light);
	--fp-gate-ticket-bg:        var(--fp-gate-ticket-bg-light);
	--fp-gate-ticket-ink:       var(--fp-gate-ticket-ink-light);
	--fp-gate-ticket-border:    var(--fp-gate-ticket-border-light);
	--fp-gate-image-border:     var(--fp-gate-image-border-light);
	--fp-gate-band-bg:          var(--fp-gate-band-bg-light);
	--fp-gate-band-ink:         var(--fp-gate-band-ink-light);
	--fp-gate-band-border:      var(--fp-gate-band-border-light);
	--fp-gate-notice-bg:        var(--fp-gate-notice-bg-light);
	--fp-gate-notice-ink:       var(--fp-gate-notice-ink-light);
	--fp-gate-notice-border:    var(--fp-gate-notice-border-light);
	--fp-gate-info-bg:          var(--fp-gate-info-bg-light);
	--fp-gate-info-ink:         var(--fp-gate-info-ink-light);
	--fp-gate-info-border:      var(--fp-gate-info-border-light);
	--fp-gate-accent-bg:        var(--fp-gate-accent-bg-light);
	--fp-gate-accent-ink:       var(--fp-gate-accent-ink-light);
	--fp-gate-accent-border:    var(--fp-gate-accent-border-light);
	--fp-gate-quiet-bg:         var(--fp-gate-quiet-bg-light);
	--fp-gate-quiet-ink:        var(--fp-gate-quiet-ink-light);
	--fp-gate-quiet-border:     var(--fp-gate-quiet-border-light);
	--fp-gate-ok-bg:            var(--fp-gate-ok-bg-light);
	--fp-gate-ok-ink:           var(--fp-gate-ok-ink-light);
	--fp-gate-ok-border:        var(--fp-gate-ok-border-light);
	--fp-gate-alert-bg:         var(--fp-gate-alert-bg-light);
	--fp-gate-alert-ink:        var(--fp-gate-alert-ink-light);
	--fp-gate-alert-border:     var(--fp-gate-alert-border-light);
	color-scheme: light;
}

/* THE SWITCH - "auto": the OS decides; "dark": always. Keep the two lists
   identical (a token missing from one ignores one of the two ways of asking). */
@media (prefers-color-scheme: dark)
{
	:root[data-fp-theme="auto"]
	{
		--fp-gate-page-bg:          var(--fp-gate-page-bg-dark);
		--fp-gate-page-veil:        var(--fp-gate-page-veil-dark);
		--fp-gate-ink:              var(--fp-gate-ink-dark);
		--fp-gate-surface-bg:       var(--fp-gate-surface-bg-dark);
		--fp-gate-surface-border:   var(--fp-gate-surface-border-dark);
		--fp-gate-label-bg:         var(--fp-gate-label-bg-dark);
		--fp-gate-label-ink:        var(--fp-gate-label-ink-dark);
		--fp-gate-label-border:     var(--fp-gate-label-border-dark);
		--fp-gate-codelabel-bg:     var(--fp-gate-codelabel-bg-dark);
		--fp-gate-codelabel-ink:    var(--fp-gate-codelabel-ink-dark);
		--fp-gate-codelabel-border: var(--fp-gate-codelabel-border-dark);
		--fp-gate-ticket-bg:        var(--fp-gate-ticket-bg-dark);
		--fp-gate-ticket-ink:       var(--fp-gate-ticket-ink-dark);
		--fp-gate-ticket-border:    var(--fp-gate-ticket-border-dark);
		--fp-gate-image-border:     var(--fp-gate-image-border-dark);
		--fp-gate-band-bg:          var(--fp-gate-band-bg-dark);
		--fp-gate-band-ink:         var(--fp-gate-band-ink-dark);
		--fp-gate-band-border:      var(--fp-gate-band-border-dark);
		--fp-gate-notice-bg:        var(--fp-gate-notice-bg-dark);
		--fp-gate-notice-ink:       var(--fp-gate-notice-ink-dark);
		--fp-gate-notice-border:    var(--fp-gate-notice-border-dark);
		--fp-gate-info-bg:          var(--fp-gate-info-bg-dark);
		--fp-gate-info-ink:         var(--fp-gate-info-ink-dark);
		--fp-gate-info-border:      var(--fp-gate-info-border-dark);
		--fp-gate-accent-bg:        var(--fp-gate-accent-bg-dark);
		--fp-gate-accent-ink:       var(--fp-gate-accent-ink-dark);
		--fp-gate-accent-border:    var(--fp-gate-accent-border-dark);
		--fp-gate-quiet-bg:         var(--fp-gate-quiet-bg-dark);
		--fp-gate-quiet-ink:        var(--fp-gate-quiet-ink-dark);
		--fp-gate-quiet-border:     var(--fp-gate-quiet-border-dark);
		--fp-gate-ok-bg:            var(--fp-gate-ok-bg-dark);
		--fp-gate-ok-ink:           var(--fp-gate-ok-ink-dark);
		--fp-gate-ok-border:        var(--fp-gate-ok-border-dark);
		--fp-gate-alert-bg:         var(--fp-gate-alert-bg-dark);
		--fp-gate-alert-ink:        var(--fp-gate-alert-ink-dark);
		--fp-gate-alert-border:     var(--fp-gate-alert-border-dark);
		color-scheme: dark;
	}
}

:root[data-fp-theme="dark"]
{
	--fp-gate-page-bg:          var(--fp-gate-page-bg-dark);
	--fp-gate-page-veil:        var(--fp-gate-page-veil-dark);
	--fp-gate-ink:              var(--fp-gate-ink-dark);
	--fp-gate-surface-bg:       var(--fp-gate-surface-bg-dark);
	--fp-gate-surface-border:   var(--fp-gate-surface-border-dark);
	--fp-gate-label-bg:         var(--fp-gate-label-bg-dark);
	--fp-gate-label-ink:        var(--fp-gate-label-ink-dark);
	--fp-gate-label-border:     var(--fp-gate-label-border-dark);
	--fp-gate-codelabel-bg:     var(--fp-gate-codelabel-bg-dark);
	--fp-gate-codelabel-ink:    var(--fp-gate-codelabel-ink-dark);
	--fp-gate-codelabel-border: var(--fp-gate-codelabel-border-dark);
	--fp-gate-ticket-bg:        var(--fp-gate-ticket-bg-dark);
	--fp-gate-ticket-ink:       var(--fp-gate-ticket-ink-dark);
	--fp-gate-ticket-border:    var(--fp-gate-ticket-border-dark);
	--fp-gate-image-border:     var(--fp-gate-image-border-dark);
	--fp-gate-band-bg:          var(--fp-gate-band-bg-dark);
	--fp-gate-band-ink:         var(--fp-gate-band-ink-dark);
	--fp-gate-band-border:      var(--fp-gate-band-border-dark);
	--fp-gate-notice-bg:        var(--fp-gate-notice-bg-dark);
	--fp-gate-notice-ink:       var(--fp-gate-notice-ink-dark);
	--fp-gate-notice-border:    var(--fp-gate-notice-border-dark);
	--fp-gate-info-bg:          var(--fp-gate-info-bg-dark);
	--fp-gate-info-ink:         var(--fp-gate-info-ink-dark);
	--fp-gate-info-border:      var(--fp-gate-info-border-dark);
	--fp-gate-accent-bg:        var(--fp-gate-accent-bg-dark);
	--fp-gate-accent-ink:       var(--fp-gate-accent-ink-dark);
	--fp-gate-accent-border:    var(--fp-gate-accent-border-dark);
	--fp-gate-quiet-bg:         var(--fp-gate-quiet-bg-dark);
	--fp-gate-quiet-ink:        var(--fp-gate-quiet-ink-dark);
	--fp-gate-quiet-border:     var(--fp-gate-quiet-border-dark);
	--fp-gate-ok-bg:            var(--fp-gate-ok-bg-dark);
	--fp-gate-ok-ink:           var(--fp-gate-ok-ink-dark);
	--fp-gate-ok-border:        var(--fp-gate-ok-border-dark);
	--fp-gate-alert-bg:         var(--fp-gate-alert-bg-dark);
	--fp-gate-alert-ink:        var(--fp-gate-alert-ink-dark);
	--fp-gate-alert-border:     var(--fp-gate-alert-border-dark);
	color-scheme: dark;
}

/* ---- the page's own parts (until G1 each style file carried these rules, each with its own colours) ---- */

body
{
	background-color: var(--fp-gate-page-bg);
	color: var(--fp-gate-ink);
}

.gate_ticket
{
	font-size: 200%;
	font-weight: bolder;
	border-radius: 10px;
	border-color: var(--fp-gate-ticket-border);
	border-style: solid;
	margin-top: 25px;
	padding: 10px;
	white-space: pre;
	background-color: var(--fp-gate-ticket-bg);
	color: var(--fp-gate-ticket-ink);
}

.input_eng
{
	text-align: left;
	direction: ltr;
}

.sucontainer
{
	width: 750px;
	max-width: calc(100% - 20px);
	margin: 0 auto;
	padding: 0 10px;
	background-color: var(--fp-gate-surface-bg);
	border-width: 2px;
	border-radius: 20px;
	border-color: var(--fp-gate-surface-border);
	border-style: solid;
}

.invite_code_label
{
	background-color: var(--fp-gate-codelabel-bg);
	color: var(--fp-gate-codelabel-ink);
	padding: 3px;
	border-color: var(--fp-gate-codelabel-border);
	border-radius: 4px;
	border-width: 2px;
	border-style: solid;
	display: inline-block;
	margin-bottom: 25px;
}

.sulabel
{
	color: var(--fp-gate-label-ink);
	border-style: solid;
	border-radius: 8px;
	margin-top: 5px;
	margin-bottom: 2px;
	border-color: var(--fp-gate-label-border);
	width: fit-content;
	margin-left: auto;
	margin-right: auto;
	padding-left: 5px;
	padding-right: 5px;
	background-color: var(--fp-gate-label-bg);
}

.suimage
{
	border-radius: 5px;
	border-color: var(--fp-gate-image-border);
	border-style: outset;
	border-width: 1px;
}

/* the panel: the page's background and text as a box (see the header) */
.fp-gate-panel
{
	width: 750px;
	max-width: calc(100% - 20px);
	margin: 0 auto;
	padding: 10px;
	border-radius: 20px;
	background-color: var(--fp-gate-page-bg);
	color: var(--fp-gate-ink);
}

/* ---- the role classes (D95): a body's, an invite's, a gate snippet's; gate.php's and confirm.php's own boxes ---- */

.fp-gate-band   { background-color: var(--fp-gate-band-bg);   color: var(--fp-gate-band-ink);   border-color: var(--fp-gate-band-border); }
.fp-gate-notice { background-color: var(--fp-gate-notice-bg); color: var(--fp-gate-notice-ink); border-color: var(--fp-gate-notice-border); }
.fp-gate-info   { background-color: var(--fp-gate-info-bg);   color: var(--fp-gate-info-ink);   border-color: var(--fp-gate-info-border); }
.fp-gate-accent { background-color: var(--fp-gate-accent-bg); color: var(--fp-gate-accent-ink); border-color: var(--fp-gate-accent-border); }
.fp-gate-quiet  { background-color: var(--fp-gate-quiet-bg);  color: var(--fp-gate-quiet-ink);  border-color: var(--fp-gate-quiet-border); }
.fp-gate-ok     { background-color: var(--fp-gate-ok-bg);     color: var(--fp-gate-ok-ink);     border-color: var(--fp-gate-ok-border); }
.fp-gate-alert  { background-color: var(--fp-gate-alert-bg);  color: var(--fp-gate-alert-ink);  border-color: var(--fp-gate-alert-border); }

.fp-gate-band a, .fp-gate-notice a, .fp-gate-accent a, .fp-gate-ok a, .fp-gate-alert a
{
	color: inherit;
	text-decoration: underline;
}
