/* The rules every door page wears (users/gate/base.html).
   Served as a file, never inline: the edge's content security policy allows
   style only from the site's own files (kongosa#2755). */
/* The door's palette, written once (kongosa#2415). Every rule reads these through
   var(); --door-brand-rgb is the brand as channels for its translucent forms.
   --door-divider is the platform's divider on the dark ground, the line its bars
   and sections draw (web/src/tokens/theme.ts dark `divider`, kongosa#3426); the
   backend image carries backend/ only, so the door holds the value here and
   test_the_door_footer_wears_the_platform_hairline pins it. --door-brand-fill is the logo
   violet the app fills its brand buttons with in the dark (web/index.css dark --kg-brand-fill,
   kongosa#5672). */
/* Each dark palette's ground (kongosa#1077), the app's own (web/src/tokens/darkPalettes.ts
   `bg`). A door page names its palette on <html>: the platform's default
   (users/templatetags/door_theme.py), then this device's own (users/gate/door_theme.js).
   Graphite is the :root ground below. scripts/check-door-grounds.sh holds these, the
   :root ground and door_theme.py's map to the app's values. They come before :root so
   a token read in file order keeps the :root value; the attribute outranks :root. */
:root[data-dark-palette="midnight"] { --door-ground: #080918; }
:root[data-dark-palette="dim"] { --door-ground: #22252E; }
:root { --door-ground: #1A1A1A; --door-brand: #5B4FFF; --door-brand-rgb: 91, 79, 255; --door-brand-fill: #4123C5; --door-ink: #9D95FF; --door-success: #34C759; --door-divider: rgba(255,255,255,0.06); }
*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }
/* A class rule that sets display must never outrank the hidden attribute. */
[hidden] { display: none !important; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--door-ground); }
/* The screen ground (kongosa#3367). iOS 27 draws its own blur over the top of a
   web app opened from the home screen unless the page holds a real, opaque
   element with position: fixed at the top edge, at z-index auto or above. It
   does not check that the element is seen, so the ground lies under the door's
   .shell (positioned, later in the page) in the canvas's own color and changes
   no pixel. A pseudo-element, a z-index of -1 and a display-mode: standalone
   scope each brought the blur back in the simulator. */
.screen-ground { position: fixed; inset: 0; background: var(--door-ground); }
/* iOS Safari zooms the page IN when a focused field's text is under 16px and
   never zooms back out on blur, so one tap in the sign-in field leaves the
   door oversized until it is pinched back by hand. The threshold is the
   platform's; 16px on touch pointers is the floor that avoids it. */
@media (pointer: coarse) {
  input, textarea, select { font-size: 16px !important; }
}
img { display: block; vertical-align: middle; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: inherit; }
button, input { font: inherit; letter-spacing: inherit; color: inherit; background-color: transparent; border-radius: 0; opacity: 1; }
button { cursor: pointer; border: none; background: none; }
::placeholder { opacity: 1; color: color-mix(in oklab, currentcolor 50%, transparent); }
::-webkit-scrollbar { width: 0; }

.shell { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--door-ground); font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; overflow-y: auto; }
.page-header { flex-shrink: 0; }
.page-header .bar { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.page-header nav { display: flex; align-items: center; justify-content: center; padding: 16px 0 0; }
.page-header nav a { display: block; height: 48px; }
.page-header nav img { width: auto; height: 100%; object-fit: contain; }
/* COMMENTED OUT (kongosa#5595): the door's own line under the logo. WHAT: a
   512px column (.mark-column) holding the line (.tagline) 54.5% across it.
   WHY: the line now stands in the one home that draws the logo with it,
   users/_brand_mark.html and users/brand_mark.css. Kept until the founder's
   purge review.
.mark-column { width: 100%; max-width: 512px; margin: 0 auto; padding: 0 24px 16px; box-sizing: border-box; }
.tagline { width: fit-content; margin-top: 1.4px; margin-bottom: 0; margin-left: 54.5%; transform: translateX(-54.5%); font-size: 14px; font-style: italic; letter-spacing: 0.5px; color: #B0B3C1; }
*/
.brand-mark-header { --brand-mark-h: 48px; padding-bottom: 16px; }
/* COMMENTED OUT (kongosa#5672): the footer line's 12px floor, half its 24px logo.
   Why: the footer draws the logo without its line now, and a fixed size was a
   second ratio (kongosa#5595). Replaced by: line=False on the footer's include.
.brand-mark-footer { --brand-mark-h: 24px; --brand-mark-line: 12px; }
*/
.brand-mark-footer { --brand-mark-h: 24px; }
.page-main { position: relative; overflow: hidden; flex-shrink: 0; }
.auth-mark { display: flex; flex-direction: column; align-items: center; padding-top: max(28px, env(safe-area-inset-top)); padding-bottom: 28px; }
/* COMMENTED OUT (kongosa#5595): the log-in frame's own logo size and column
   padding; users/brand_mark.css draws the logo at 40px with its line.
.auth-mark img { height: 40px; object-fit: contain; }
.auth-mark .mark-column { padding-bottom: 0; }
*/
.auth-main { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 8px 0 24px; }
.auth-column { position: relative; z-index: 1; max-width: 420px; width: 100%; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.auth-title { text-align: center; font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; color: #fff; margin: 0; }
/* The app's WebView return page (users/gate/webview_return.html) moves on by
   script at once, so its words would only flash between the door and the app
   (kongosa#3961). They stay hidden, and show only to a WebView that has not
   moved on after 3 s, which keeps the link for one that runs no script. */
.app-return-waits { animation: app-return-shows 0s 3s both; }
@keyframes app-return-shows { from { visibility: hidden; } to { visibility: visible; } }
.auth-lede { margin: 12px auto 0; max-width: 320px; text-align: center; font-size: 14px; color: rgba(255,255,255,0.6); }
.pill-form { margin: 40px auto 0; display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
/* The idle border is a control's own boundary, so it clears WCAG's 3:1 on
   the door's ground (1.4.11): 0.40 white is 3.83:1 there and 3.37:1 against
   the field's fill. */
.field { border: 1px solid rgba(255,255,255,0.40); }
/* RETIRED (kongosa#3769, founder, Door Lab note 944).
   What: the round `.pill` input of the forgot-password and reset-password pages
   (full-width, 9999px radius, centered text, its own fill and focus state).
   Why: one input shape on every door page, the rounded rectangle log-in and create
   account draw; the submit button is untouched.
   Replaced by: `.field`.
.pill { width: 100%; border-radius: 9999px; padding: 14px 20px; font-size: 15px; text-align: center; background: rgba(255,255,255,0.06); color: #fff; outline: none; box-sizing: border-box; transition: border-color 0.15s, background 0.15s; }
.pill:focus { background: rgba(255,255,255,0.08); border-color: rgba(var(--door-brand-rgb), 0.6); }
*/
/* A refused field (kongosa#679): drawn from the same attribute a screen
   reader reads, so the two can never disagree. */
.field[aria-invalid="true"] { border-color: rgba(252,165,165,0.70); }
.pill-submit { width: 100%; border-radius: 9999px; padding: 14px 0; font-size: 16px; font-weight: 600; color: #fff; border: none; background: linear-gradient(to right, #4169E1, var(--door-brand)); box-shadow: 0 10px 25px rgba(var(--door-brand-rgb), 0.302); cursor: pointer; }
.pill-submit:disabled { cursor: not-allowed; opacity: 0.6; }
.pill-foot { margin-top: 8px; text-align: center; font-size: 14px; color: rgba(255,255,255,0.6); }
.back { background: none; border: none; padding: 0; font-weight: 600; color: #fff; cursor: pointer; font-size: 14px; }
.done-card { margin: 32px auto 0; max-width: 420px; border-radius: 16px; border: 1px solid #7C6FFF4D; background: #7C6FFF1A; padding: 20px; text-align: center; }
.done-card .body { margin: 12px 0 0; font-size: 14px; color: rgba(255,255,255,0.7); }
.done-card .body b { font-weight: 500; color: #fff; }
.done-card .foot { margin-top: 20px; }
.page-section { padding-top: 48px; padding-bottom: 32px; position: relative; z-index: 1; }
.page-column { max-width: 512px; margin: 0 auto; padding: 0 24px; }

h2 { margin: 0; font-size: 24px; font-weight: 700; line-height: 36px; letter-spacing: -0.025em; color: #fff; }
/* The join line's question ("Not a member?") is never fainter than the link
   that answers it (founder, 2026-09-18, kongosa#689). */
.lede { margin-top: 8px; margin-bottom: 0; font-size: 14px; font-weight: 600; line-height: 24px; color: rgba(255,255,255,0.6); }
.inline-link { background: none; border: none; padding: 0; font-size: 14px; font-weight: 600; color: var(--door-ink); cursor: pointer; }
/* RETIRED (kongosa#5502, founder Nov 19 2026, Production marks 2201 and 2202).
   What: `.brand-name { color: var(--door-ink); }`, the brand name written as text in
   the door's ink, the tone its links wear (kongosa#5259).
   Why: "i want that stylized Kongosa. text back ... its the correct styling": the name
   written as text wears the logo the join line has drawn since Sep 15.
   Replaced by: `.brand-name, .wordmark` below. Kept for the founder's purge review.
.brand-name { color: var(--door-ink); }
*/
/* The brand name written as text wears the logo: white letters, a brand outline and a
   soft brand glow, so "Kongosa." in a sentence reads as the wordmark does (kongosa#5502).
   The login join line's <b class="wordmark"> is the same look, so both share this rule. */
/* Written in the logo's own lowercase, "kongosa." (founder, lab note 3842, kept with his
   Production mark 3844, kongosa#5672); the templates keep writing "Kongosa.", so a screen
   reader and a copy of the words still read the name. */
.brand-name, .wordmark { font-weight: 800; color: #fff; text-transform: lowercase; text-shadow: -1px 0 var(--door-brand), 0 -1px var(--door-brand), 1px 0 var(--door-brand), 0 1px var(--door-brand), 1px 2px 0 var(--door-brand), 0 0 12px rgba(var(--door-brand-rgb), 0.65); }
.door-form { display: flex; flex-direction: column; gap: 24px; }
.label { display: block; font-size: 14px; line-height: 24px; font-weight: 500; color: rgba(255,255,255,0.9); margin-bottom: 6px; }
.field { width: 100%; padding: 8px 12px; border-radius: 6px; background: rgba(255,255,255,0.05); color: #fff; font-size: 15px; line-height: 24px; outline: none; box-sizing: border-box; transition: border-color 0.15s, box-shadow 0.15s; }
.field:focus { border-color: var(--door-brand); box-shadow: 0 0 0 3px rgba(var(--door-brand-rgb), 0.18); }
/* The door's one notice. A rounded rectangle on a tinted ground with a
   matching border — the same object whatever it says, so a refusal, a
   confirmation and a standing condition are recognizably one family and
   none of them is a stray line of small text.
   Inks are the ramped values, not the accents: an accent chosen to be a
   SURFACE is under the text floor when it becomes a word. */
.notice { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 24px; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 20px; border: 1px solid; }
/* The band stands 40px under the join line and 24px over the first field,
   the rhythm the form itself keeps between its fields. */
.lede + .notice { margin-top: 40px; }
.notice + .door-form { margin-top: 24px; }
.notice-glyph { flex-shrink: 0; width: 18px; height: 18px; border-radius: 9999px; font-size: 12px; font-weight: 800; line-height: 18px; text-align: center; color: var(--door-ground); }
.notice-error { color: #fca5a5; background: rgba(252,165,165,0.10); border-color: rgba(252,165,165,0.35); }
.notice-error .notice-glyph { background: #fca5a5; }
/* Good news is the prototype's purple, never green (founder, 2026-09-21;
   ForgotPasswordDrawer, kongosa#2089): pri ground, pri border and a bare pri
   check. The words take the readable ink: 6.39:1 on that ground over the
   shell, 5.65:1 over a done card. */
.notice-success { color: var(--door-ink); background: rgba(var(--door-brand-rgb), 0.078); border-color: rgba(var(--door-brand-rgb), 0.188); }
/* The account-created page's words are white on the dark ground (founder, lab note
   939, Nov 13 2026: "our bg is already dark enough so a whitish text should be
   fine"); its check stays the brand color. */
.done-card-white .notice-success { color: #fff; }
.notice-check { flex-shrink: 0; width: 14px; height: 14px; margin-top: 3px; color: var(--door-brand); }
.notice-info { color: #93C5FD; background: rgba(147,197,253,0.10); border-color: rgba(147,197,253,0.35); }
.notice-info .notice-glyph { background: #93C5FD; }
.field-error { margin-top: 6px; font-size: 13px; line-height: 18px; color: #fca5a5; }
.pill-form .field-error { margin-top: 0; text-align: center; }
/* RETIRED (kongosa#5672, founder Production marks 3843 and 3844, Nov 28 2026).
   What: the submit button in the blue-to-purple gradient with a soft brand glow:
   .primary { width: 100%; padding: 14px 0; border-radius: 9999px; background: linear-gradient(to right, #4169E1, var(--door-brand)); border: none; font-size: 15px; font-weight: 600; color: #fff; cursor: pointer; box-shadow: 0 10px 25px rgba(var(--door-brand-rgb), 0.2); }
   Why: "i want to experiment with replacing the auth button to a solid brand color raised
   capsul like the accept/decline button capsule" (Nov 26 2026), then his Production marks.
   Replaced by: the lifted brand capsule below. Kept for the founder's purge review. */
/* The submit button is the raised capsule a call's Accept wears (web core/ui/capsule-button.tsx,
   LIFTED.brand): the solid logo violet, white words in bold, 52 tall, and a hard edge under it in
   the brand's deeper step that closes when it is pressed. No gradient, no glow. */
.primary { width: 100%; height: 52px; padding: 0; border-radius: 9999px; background: var(--door-brand-fill); border: none; font-size: 15px; font-weight: 700; color: #fff; cursor: pointer; box-shadow: 0 3px 0 0 color-mix(in srgb, var(--door-brand) 50%, black); }
.primary:active { transform: translateY(3px); box-shadow: 0 0 0 0 color-mix(in srgb, var(--door-brand) 50%, black); }
.primary:disabled { background: #9093AC; cursor: default; box-shadow: none; }

.or { margin-top: 24px; }
.or .rule { display: flex; align-items: center; gap: 12px; }
.or .rule span { height: 1px; flex: 1; background: rgba(255,255,255,0.10); }
.or .rule b { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.55); }
.or form { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.or .notice { margin: 0; }
.tiktok { width: 100%; padding: 14px 0; border-radius: 9999px; background: #000; border: none; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 15px; font-weight: 600; color: #fff; cursor: pointer; }
.tiktok:disabled { cursor: default; opacity: 0.6; }
.tiktok img { width: 20px; height: 20px; border-radius: 50%; }
.tiktok-paused { margin: 10px 0 0; text-align: center; font-size: 13px; line-height: 20px; color: rgba(255,255,255,0.6); }

.terms { margin: 24px auto 0; max-width: 320px; text-align: center; font-size: 12px; line-height: 18px; color: rgba(255,255,255,0.5); }
/* Each link is 14px of a 12px line, under the 28px tap floor (kongosa#2359).
   Its hit area grows without moving a word: 30px tall, into the margin and the
   plain words around it. The first link reaches up, the second down, so on
   adjacent rows they meet at the line between and never take each other's
   taps. A link never breaks across two lines, where the hit area would
   collapse to the words alone; at default size neither link wraps. */
.terms a { position: relative; white-space: nowrap; color: rgba(255,255,255,0.7); text-decoration: underline; }
.terms a::after { content: ""; position: absolute; left: 0; right: 0; top: -14px; bottom: -2px; }
.terms a + a::after { top: -2px; bottom: -14px; }

.badges { margin-top: 32px; margin-left: auto; margin-right: auto; max-width: 448px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.badges .row { display: flex; align-items: center; justify-content: center; gap: 16px; }
.badges .row a { display: inline-flex; }
/* The Google Play badge is a disabled button until its public beta answers (kongosa#4765,
   founder, Nov 5 2026: "for now the web app store links should only enable the iOS
   link since it works"; kongosa#4764): gray, with the forbidden pointer, off the tab order. */
.badges .row button { display: inline-flex; padding: 0; filter: grayscale(1); cursor: not-allowed; }
/* Below 360px the two badges side by side do not fit, and the global img rule (max-width:
   100%) shrinks the App Store badge to 37px tall, under the 44pt tap target (Apple HIG
   Accessibility). The row wraps and each badge keeps its size (kongosa#4765). */
@media (max-width: 359px) {
  .badges .row { flex-wrap: wrap; }
  .badges .row a, .badges .row button { flex: none; }
}
/* The line under the badges says what is true today (kongosa#4765, founder, Nov 6 2026). */
.badges .status { margin: 0; font-size: 14px; line-height: 1.4; text-align: center; color: rgba(255,255,255,0.6); }
/* The store badges are for a browser tab and the installed web app (kongosa#3426).
   The app's WebView never receives them (the view marks it). */
/* RETIRED (kongosa#3426, founder, Door Lab note 941).
   What: `@media (display-mode: standalone) { .badges { display: none; } }`, which
   hid the store badges in the web app installed to the home screen.
   Why: the installed web app has no device features to offer in their place, so it
   keeps them exactly as a browser tab does; only the iOS and Android app drops them.
   Replaced by: nothing; the page is the same in a tab and in the installed web app.
@media (display-mode: standalone) { .badges { display: none; } }
*/
/* RETIRED (kongosa#4765): the badges' gray-out and the line under them.
   What: `.badges .row span` (filter: grayscale(1), cursor: not-allowed) and
   `.badges p` (the 13px uppercase caption "Not in the app stores yet").
   Why: the founder opened the iOS beta and Play open testing, Nov 5 2026:
   the badges are links, in full color, and say nothing of being missing.
   Replaced by: `.badges .row a` above, and for the Google badge alone (a disabled
   button for now) `.badges .row button`; the line under them returns as `.badges .status`, in sentence
   case with the truth in it. Kept for the founder's purge review. */

/* The footer takes the platform's top hairline and keeps no border of its own
   (founder, lab note 2199, Production marks 2198 and 2205, kongosa#3426). */
/* The hairline's 1px comes out of the footer's top padding, so the space above the
   footer's logo stays the 72px "a bit" kongosa#3642 settled (section 32 + line 1 + 39). */
.site-footer { background: var(--door-ground); padding: 39px 0 40px; border-top: 1px solid var(--door-divider); }
.site-footer .wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.site-footer .top { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
/* COMMENTED OUT (kongosa#5595): the footer's bare logo link. The footer draws
   users/_brand_mark.html (place "footer", 24px) with its line.
.site-footer .home { display: block; height: 24px; }
.site-footer .home img { height: 100%; width: auto; display: block; }
*/
.site-footer nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 24px; font-size: 14px; color: rgba(255,255,255,0.6); }
.site-footer nav a { color: inherit; text-decoration: none; }
.site-footer .gloss { max-width: 36rem; margin: 24px auto 0; text-align: center; font-size: 12px; line-height: 1.6; color: rgba(255,255,255,0.35); }
.site-footer .maker { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.site-footer .copyright, .site-footer .build { margin: 0; text-align: center; font-size: 11px; color: #9699B2; }
.site-footer .co-red { color: #e01010; }
.site-footer .co-green { color: #10b000; }
.site-footer .co-gold { color: #c0c010; }
.site-footer .platform { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.site-footer .platform span { font-size: 14px; letter-spacing: 0.02em; color: rgba(255,255,255,0.4); }
.site-footer .platform a { display: block; max-width: 160px; }
.site-footer .platform img { width: 100%; height: auto; display: block; }
