diff --git a/DESIGN.md b/DESIGN.md index 88a08fc..3205474 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -134,6 +134,43 @@ military cosplay. - Explicit textual states paired with icons, color, and motion. - Responsive density from mobile touch layouts through scaled 4K workspaces. +## Brand Identity + +SHD.build uses the two-color Core Segments identity. The emblem connects the +orange Division signal with ISAC's role as the site's analytic system: + +- Three unequal Signal Orange arc segments form the outer circle. Each segment + has square ends. +- The widest break sits in the upper-right quadrant and contains one detached + Signal Orange square, which represents a data packet. +- A Field Manual White open square forms the ISAC core at the center. + +Keep the emblem in Signal Orange and Field Manual White on Operations Black, +Terminal Black, or another approved dark surface. SHD.build has no one-color +emblem. Do not close the arc gaps, equalize the segments, remove the data +packet, fill the ISAC core, add letters to the emblem, or recolor either part. +If a placement cannot reproduce both colors, use a dark holding surface or omit +the emblem. + +The standard lockup pairs the emblem with the heavy angular `SHD.build` +wordmark. Set `SHD` in Field Manual White and `.build` in Signal Orange. Place +the uppercase descriptor `RESURGENCE DATA & TOOLS` below the wordmark in +restrained telemetry type. Do not substitute another descriptor. + +Use the complete lockup in the 76px global header and shared footer. The header +uses a 38px emblem; keep the wordmark and descriptor compact enough to preserve +the navigation grid. Mobile headers may use the emblem alone when the complete +lockup would crowd navigation. Favicons and app icons use the emblem without +text. Small-size artwork must retain both colors, widen the arc gaps where the +pixel grid requires it, and keep the packet and open core distinct. + +Treat the emblem as decorative when visible `SHD.build` text names the product. +Give an emblem-only home link the accessible name `SHD.build home`. Preserve +the approved colors and full opacity in focus, disabled, and compact contexts; +use text or control styling to communicate state instead of fading the mark. +The Field Manual White core and Signal Orange arcs must remain distinct from +their background at every delivered size. + ## Colors The palette uses Operations Black, Terminal Graphite, Field Manual White, rare diff --git a/database/schema.sql b/database/schema.sql index 75122e3..3566f50 100644 --- a/database/schema.sql +++ b/database/schema.sql @@ -1123,3 +1123,21 @@ CREATE TABLE IF NOT EXISTS external_service_alert_deliveries ( ); CREATE INDEX IF NOT EXISTS external_service_alert_pending_idx ON external_service_alert_deliveries(delivered_at,created_at); +CREATE TABLE IF NOT EXISTS site_launch_settings ( + id TEXT PRIMARY KEY CHECK(id='primary'), + coming_soon_enabled INTEGER NOT NULL DEFAULT 1 CHECK(coming_soon_enabled IN (0,1)), + account_creation_enabled INTEGER NOT NULL DEFAULT 1 CHECK(account_creation_enabled IN (0,1)), + news_enabled INTEGER NOT NULL DEFAULT 1 CHECK(news_enabled IN (0,1)), + database_enabled INTEGER NOT NULL DEFAULT 1 CHECK(database_enabled IN (0,1)), + builds_enabled INTEGER NOT NULL DEFAULT 1 CHECK(builds_enabled IN (0,1)), + guides_enabled INTEGER NOT NULL DEFAULT 1 CHECK(guides_enabled IN (0,1)), + builder_enabled INTEGER NOT NULL DEFAULT 1 CHECK(builder_enabled IN (0,1)), + updated_at TEXT NOT NULL, + updated_by TEXT REFERENCES users(id) +); +INSERT OR IGNORE INTO site_launch_settings( + id,coming_soon_enabled,account_creation_enabled,news_enabled,database_enabled, + builds_enabled,guides_enabled,builder_enabled,updated_at +) VALUES('primary',1,1,1,1,1,1,1,'2026-07-27T00:00:00.000Z'); +INSERT OR IGNORE INTO permissions(id,name,description) + VALUES('permission-site-settings-manage','site.settings.manage','Manage launch mode, account creation, and public section availability'); diff --git a/docs/DEPLOYMENT.md b/docs/DEPLOYMENT.md index 91288b3..b159d51 100644 --- a/docs/DEPLOYMENT.md +++ b/docs/DEPLOYMENT.md @@ -121,6 +121,46 @@ existing embedded-database connection instead of opening the locked database from a second process. The endpoint runs automated system messages, Oversight consolidation, and email digest checks and is not published through a host port. +## Prelaunch operation + +The launch-control migration creates `site_launch_settings` with these defaults +for a database that does not contain the row: + +- Coming Soon: enabled +- Account creation: enabled +- News, Database, Builds, Guides, and Builder: enabled + +The migration uses an insert-if-missing seed. Later deployments preserve the +operator's settings, and configuration changes take effect without a restart. +A full environment bootstrap copies the source row. Canonical ISAC game-data +imports leave the target environment's launch settings unchanged. + +Use this operator flow after the first deployment: + +1. Open `/sign-in`; the launch gate keeps that route available. +2. Sign in with an existing Administrator account. +3. Open ISAC → System Configuration → Site Controls. +4. Set account creation and public-section availability. +5. Review the complete change set, then confirm it. +6. Use `PREVIEW PAGE` to inspect `/coming-soon` with the authenticated + `ENTER FULL SITE` return action. The preview lists each section's current + availability. +7. Verify `/coming-soon` and the affected public routes in a signed-out browser + session before public release. Sign in and verify the same disabled routes + remain unavailable. + +Keep Coming Soon enabled while preparing production. Section controls can be +set in advance because the launch gate takes precedence for signed-out traffic. +Set Account Creation to Disabled if prelaunch access must remain limited to +existing identities. Switch the Launch Gate to Public Launch after verification. +Disabled sections remain absent from navigation and unavailable by direct URL +for every user, including authenticated agents. Authentication bypasses only +the Coming Soon gate. + +Turn Coming Soon on to restore the promotional gate. Site-control changes append +`system_configuration / site_access.updated` audit events, including the +operator and complete before/after settings. + ## Initial development-data bootstrap Initialize the first staging release from the development database, including diff --git a/docs/DESIGN_SYSTEM.md b/docs/DESIGN_SYSTEM.md index 782166c..6a8e041 100644 --- a/docs/DESIGN_SYSTEM.md +++ b/docs/DESIGN_SYSTEM.md @@ -1,9 +1,10 @@ # SHD.build Design System -This document defines the visual language for SHD.build, the independent -Division Resurgence community for builds, guides, game data, news, and -discussion. New pages use the same tactical intelligence network as the admin -dashboard. Public pages may use more space and larger editorial typography. +This document defines the visual language for SHD.build, an independent +Division Resurgence data-and-tools site for builds, guides, game data, news, +and discussion. New pages use the same tactical intelligence network as the +admin dashboard. Public pages may use more space and larger editorial +typography. ## Design principles @@ -16,6 +17,43 @@ dashboard. Public pages may use more space and larger editorial typography. underlines. Communicate hover and focus through SHD accent color, borders, brightness, and the required focus-visible outline. +## Brand identity + +SHD.build uses the two-color Core Segments identity. The emblem combines the +orange Division signal with ISAC's analytic role in the product: + +- Three unequal Signal Orange arc segments form the outer circle. Each segment + has square ends. +- The widest break sits in the upper-right quadrant and contains one detached + Signal Orange square, which represents a data packet. +- A Field Manual White open square forms the ISAC core at the center. + +Keep the emblem in Signal Orange and Field Manual White on Operations Black, +Terminal Black, or another approved dark surface. SHD.build has no one-color +emblem. Do not close the arc gaps, equalize the segments, remove the data +packet, fill the ISAC core, add letters to the emblem, or recolor either part. +Use a dark holding surface or omit the emblem when a placement cannot reproduce +both colors. + +The standard lockup pairs the emblem with the heavy angular `SHD.build` +wordmark. Set `SHD` in Field Manual White and `.build` in Signal Orange. Place +the uppercase descriptor `RESURGENCE DATA & TOOLS` below the wordmark in +restrained telemetry type. Do not substitute another descriptor. + +Use the complete lockup in the 76px global header and shared footer. The header +uses a 38px emblem; keep the wordmark and descriptor compact enough to preserve +the navigation grid. Mobile headers may use the emblem alone when the complete +lockup would crowd navigation. Favicons and app icons use the emblem without +text. Small-size artwork must retain both colors, widen the arc gaps where the +pixel grid requires it, and keep the packet and open core distinct. + +Treat the emblem as decorative when visible `SHD.build` text names the product. +Give an emblem-only home link the accessible name `SHD.build home`. Preserve +the approved colors and full opacity in focus, disabled, and compact contexts; +use text or control styling to communicate state instead of fading the mark. +The Field Manual White core and Signal Orange arcs must remain distinct from +their background at every delivered size. + ### Routed error console Expected HTTP errors and unexpected server faults use one shared SHD exception @@ -64,19 +102,18 @@ from the orange links reserved for SHD navigation and legal resources. Support and legal links form a compact horizontal rail that may wrap at intermediate widths and becomes a two-column touch-friendly grid on narrow mobile screens. -The footer repeats the complete SHD brand lockup used by the global header: -double-ring SHD mark, white `SHD`, orange `.build`, and the restrained -`RESURGENCE COMMUNITY` descriptor. Do not substitute a plain text wordmark or -color the complete product name orange. +The footer repeats the complete Core Segments lockup used by the global header: +two-color emblem, Field Manual White `SHD`, Signal Orange `.build`, and the +`RESURGENCE DATA & TOOLS` descriptor. Do not substitute a plain text wordmark, +drop either emblem color, or color the complete product name orange. -### Community platform positioning +### Platform positioning -SHD.build is a Division Resurgence community. Primary product language and -global navigation represent five durable -channels: News, Database, Builds, Guides, and Builder. Loadout-specific terms -remain appropriate inside build routes, but the global brand descriptor, -homepage metadata, hero, sign-in introduction, and footer describe the broader -community platform. +SHD.build provides Division Resurgence data and tools for players. Primary +product language and global navigation represent five durable channels: News, +Database, Builds, Guides, and Builder. Loadout-specific terms remain +appropriate inside build routes. The global brand descriptor, homepage +metadata, hero, sign-in introduction, and footer describe the broader toolset. The homepage uses a community-channel grid to establish this information architecture. Each channel has an operational code, plain-language purpose, @@ -265,9 +302,10 @@ explains it. At viewports up to 900px, replace the hidden desktop link rail and account controls with a labeled square `MENU` control in the shared site header. Activating it opens a right-side SHD navigation panel over a dismissible -backdrop. The panel includes Home, Discover, Builder, Guides, Sign In or My -Profile, and ISAC when authorized; authenticated agents also receive identity -state and Sign Out inside the panel. +backdrop. The panel includes Home, each enabled public destination, Sign In or +My Profile, and ISAC when authorized. Authenticated agents also receive identity +state and Sign Out inside the panel. Section availability controls both desktop +and mobile navigation. Use numbered full-width navigation rows, explicit active-route text styling, orange action indicators, and minimum 44px interaction targets. Opening moves @@ -294,6 +332,53 @@ squeezed beside long module headings on mobile. - Community build cards retain the colored top rule, abstract loadout artwork, concise tags, agent attribution, and a full-width terminal action. +### Prelaunch network shell + +Use the standalone prelaunch shell for `/coming-soon`. It replaces the global +application shell while the public launch gate is active, so visitors see one +clear deployment message instead of navigation into gated sections. Keep the +SHD.build mark, a visible network-state block, one primary access action, the +Discord community action, the deployment manifest, and legal links. Signed-out +visitors receive `AGENT SIGN IN`; an authenticated operator previewing the page +receives `ENTER FULL SITE`. + +The desktop composition pairs the launch statement with a technical network +visual. Use the shared grid background, square borders, restrained orange +emphasis, and telemetry labels. Orange identifies the primary action and active +signal paths. Green may reinforce a staged or available state; red may reinforce +an unavailable channel. Every state also needs a text label. + +The deployment manifest lists News, Database, Builds, Guides, and Builder with +plain-language descriptions. A visitor who follows a disabled-section URL sees +the affected section name in a status notice. The page must state whether new +agent registration is open without implying that sign-in for existing accounts +has closed. The manifest uses the saved section controls as its source of truth +and marks unavailable sections in text. An authenticated preview follows the +same availability states. + +At widths below 900px, stack the launch statement above the network visual and +collapse the manifest to one column as space requires. Preserve 44px action +targets and keep status text within the viewport. Reduce the radar sweep and +other ambient motion under `prefers-reduced-motion`; retain the static rings, +nodes, and labels. + +ISAC Site Controls use three connected command panels: Launch Gate, Account +Creation, and Public Sections. Use `SegmentedChoice` for each finite state. +Display the pending-change count outside the panels and require a confirmation +modal that lists every changed setting as previous state, arrow, and proposed +state. A successful save closes the modal and refreshes the network-state +summary. Keep a `PREVIEW PAGE` link in the command toolbar so authenticated +operators can inspect the promotional page without ending their session. +Operators need text for enabled, disabled, coming-soon, and public states; color +supports those labels. + +The Launch Gate controls signed-out entry to the application. Public Section +controls apply to everyone. When an operator disables News, Database, Builds, +Guides, or Builder, remove that destination from global navigation for signed-in +and signed-out users and block its route family on the server. The promotional +page identifies a disabled destination when a user follows an old bookmark or +direct URL. Do not present authentication as a way around a disabled section. + ### Agent and authentication surfaces - Account pages should read as an agent dossier: identity and access at the top, @@ -390,6 +475,11 @@ squeezed beside long module headings on mobile. - Authentication uses one unified access screen rather than separate sign-in and registration destinations. Verified email and first-time OAuth identities may create an account; returning identities sign into the matching account. +- With account creation disabled, keep returning-agent methods available, hide + the password `CREATE ACCOUNT` mode, and show a concise registration-state + notice. Provider and email controls must explain that unknown identities + cannot create an account without suggesting that existing identities lost + access. - Password access uses an explicit `SIGN IN` / `CREATE ACCOUNT` mode switch inside the fallback panel. Account creation separates the public display name from the private ASCII login username. diff --git a/docs/architecture.md b/docs/architecture.md index 8a2cbd8..b8eee3c 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -42,6 +42,47 @@ provide a persistent writable filesystem and can override the location with `TDR_DATABASE_PATH`. This rules out ephemeral serverless filesystems unless a persistent volume is attached. +## Site launch controls + +The singleton `site_launch_settings` row stores the public launch gate, account +creation state, and availability for News, Database, Builds, Guides, and +Builder. Schema migration creates the row with Coming Soon enabled, account +creation enabled, and all five sections enabled. The application caches the row +for five seconds and clears the process cache after an operator saves changes. + +Agents with `site.settings.manage` edit the row from ISAC → System +Configuration → Site Controls. The save action requires an explicit value for +all seven controls and a confirmation token. A successful update records +`system_configuration / site_access.updated` with the operator, target row, and +complete before/after snapshots. + +The request hook applies the launch gate to anonymous traffic and section +availability to every request: + +- With Coming Soon enabled, anonymous `GET` and `HEAD` requests redirect to + `/coming-soon`. Anonymous mutations outside exempt routes receive a JSON 404. +- Authenticated agents bypass the Coming Soon gate and enter the application. +- A disabled public section blocks its route family for every user, including + authenticated agents: `/news`, `/database`, `/builds`, `/guides`, or + `/builder`. `GET` and `HEAD` requests redirect to `/coming-soon` with the + unavailable section identified. Mutations receive a JSON 404. +- Authentication callbacks, sign-in, contact, legal pages, health endpoints, + scheduler endpoints, application assets, and the prelaunch page remain + reachable without a session. + +The global navigation omits disabled sections for every user. Server checks +remain authoritative for direct URLs and mutations. An authenticated operator +may open `/coming-soon` to preview the promotional page, but the preview does +not override section availability. + +Account creation uses a separate control. Closing registration blocks password +registration, a magic-link request for an unknown email, and Discord OAuth for +an unknown Discord identity. Existing password, email, and Discord identities +can still sign in. The sign-in page hides the password registration form and +explains registration closure. This guard runs on the server, so a crafted form +submission or OAuth callback cannot create an account while registration is +closed. + ## Increment plan 1. Product shell and anonymous local-draft builder. diff --git a/package-lock.json b/package-lock.json index 6eb4220..72f924e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "@sveltejs/vite-plugin-svelte": "^7.1.2", "@types/node": "^26.1.1", "@types/nodemailer": "^8.0.1", + "opentype.js": "^2.0.0", "svelte": "^5.56.1", "svelte-check": "^4.6.0", "typescript": "^6.0.3", @@ -2878,6 +2879,16 @@ "node": ">=12.20.0" } }, + "node_modules/opentype.js": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/opentype.js/-/opentype.js-2.0.0.tgz", + "integrity": "sha512-kCyjv6xdDY1W/jLWZ/L3QhhTlKUqDZMQ5+Jdlw12b3dXkKNpYBqqlMMj0YDQPShWFTMwgZI1hG14kN3XUDSg/A==", + "dev": true, + "license": "MIT", + "bin": { + "ot": "bin/ot" + } + }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", diff --git a/package.json b/package.json index 53e641b..901cf46 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "build:app": "vite build", "build:staging": "dotenvx run -f .env.staging -- vite build", "build": "dotenvx run -f .env.production -- vite build", + "brand:render": "node scripts/render-brand-assets.mjs", "start": "node build", "preview": "node build", "db:migrate": "dotenvx run -f .env.development -- node scripts/db-migrate.mjs", @@ -60,6 +61,7 @@ "@sveltejs/vite-plugin-svelte": "^7.1.2", "@types/node": "^26.1.1", "@types/nodemailer": "^8.0.1", + "opentype.js": "^2.0.0", "svelte": "^5.56.1", "svelte-check": "^4.6.0", "typescript": "^6.0.3", diff --git a/scripts/render-brand-assets.mjs b/scripts/render-brand-assets.mjs new file mode 100644 index 0000000..16a9695 --- /dev/null +++ b/scripts/render-brand-assets.mjs @@ -0,0 +1,163 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import opentype from 'opentype.js'; +import sharp from 'sharp'; + +const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); +const outputDirectory = path.join(root, 'static', 'brand'); +const fontDirectory = path.join(root, 'node_modules', '@fontsource', 'barlow', 'files'); +const heavy = opentype.parse(fs.readFileSync(path.join(fontDirectory, 'barlow-latin-900-normal.woff')).buffer); +const medium = opentype.parse(fs.readFileSync(path.join(fontDirectory, 'barlow-latin-700-normal.woff')).buffer); + +fs.mkdirSync(outputDirectory, { recursive: true }); + +const colors = { + background: '#0a0c0d', + surface: '#111415', + border: '#303536', + grid: '#2a3031', + orange: '#f6a821', + white: '#ecebe5' +}; + +function trackedPath(font, value, x, baseline, size, tracking = 0) { + let cursor = x; + let data = ''; + for (const character of value) { + const glyph = font.charToGlyph(character); + data += glyph.getPath(cursor, baseline, size).toPathData(2); + cursor += glyph.advanceWidth * size / font.unitsPerEm + tracking; + } + return { data, width: cursor - x - tracking }; +} + +function emblem(x, y, size) { + const scale = size / 100; + return ` + + + + + + + + + `; +} + +async function writePng(svg, filename, width, height) { + await sharp(Buffer.from(svg)) + .resize(width, height, { fit: 'fill' }) + .png({ compressionLevel: 9, adaptiveFiltering: true }) + .toFile(path.join(outputDirectory, filename)); +} + +const transparentLogo = ` + + ${emblem(72, 72, 880)} + `; + +const serverIcon = ` + + + + + ${emblem(132, 132, 760)} + `; + +const shd = trackedPath(heavy, 'SHD', 0, 0, 190, -3); +const build = trackedPath(heavy, '.build', 0, 0, 190, -2); +const descriptor = trackedPath(medium, 'RESURGENCE DATA & TOOLS', 0, 0, 43, 7); +const wordmarkWidth = shd.width + build.width; +const lockupX = 600; +const wordmarkBaseline = 590; + +const banner = ` + + + + + + + + + + + + + + + + + + + + ${emblem(188, 314, 330)} + + + + + + + + + + + + + `; + +const inviteSplash = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + ${emblem(-92, 224, 620)} + ${emblem(1465, 326, 410)} + + + + + + + + + + + + + `; + +await writePng(transparentLogo, 'shd-core-segments.png', 1024, 1024); +await writePng(serverIcon, 'shd-build-discord-icon.png', 1024, 1024); +await writePng(banner, 'shd-build-discord-banner-1920x1080.png', 1920, 1080); +await writePng(inviteSplash, 'shd-build-discord-invite-background-1920x1080.png', 1920, 1080); +await sharp(path.join(outputDirectory, 'shd-build-discord-banner-1920x1080.png')) + .resize(960, 540) + .png({ compressionLevel: 9, adaptiveFiltering: true }) + .toFile(path.join(outputDirectory, 'shd-build-discord-banner-960x540.png')); + +console.log(`Rendered brand assets to ${outputDirectory}`); diff --git a/src/app.css b/src/app.css index 42ec775..28c4f10 100644 --- a/src/app.css +++ b/src/app.css @@ -48,13 +48,12 @@ .discord-contact.discord-contact{grid-template-columns:30px minmax(0,1fr) auto;align-items:center;align-content:normal;gap:11px}.discord-contact>img{width:26px;height:20px;object-fit:contain}.discord-contact>span{display:grid;gap:5px}.discord-contact>span small{font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:1.2px}.discord-contact>span strong{font-size:var(--shd-type-telemetry);letter-spacing:.8px}.discord-contact.discord-contact>b{grid-column:auto;grid-row:auto;align-self:center} .footer-links .footer-discord{min-height:38px;display:flex;align-items:center;gap:9px;margin-bottom:2px;padding:7px 9px;border:1px solid #5865f2;background:#171a32;color:#fff}.footer-discord img{width:20px;height:16px;object-fit:contain}.footer-discord span{display:grid;gap:3px;font-size:var(--shd-type-telemetry);line-height:1}.footer-discord small{color:#aeb6ff;font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:.8px}.footer-links .footer-discord:hover,.footer-links .footer-discord:focus-visible{border-color:#929bff;background:#202446;color:#fff}.footer-links .footer-discord:active{transform:translateY(1px);filter:brightness(.88)} .footer-nav{width:max-content;max-width:520px;height:auto;display:flex;flex-wrap:wrap;align-items:center;gap:0;margin:0}.footer-nav a{display:inline-flex;align-items:center;min-height:24px;padding:0 9px;border-left:1px solid var(--shd-border);color:var(--shd-orange);font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:.8px}.footer-nav a:first-child{padding-left:0;border-left:0}.footer-nav a:hover,.footer-nav a:focus-visible{color:var(--shd-orange-hover)}@media(max-width:800px){.footer-nav{width:100%;max-width:none}.footer-nav a{min-height:30px}}@media(max-width:500px){.footer-nav{display:grid;grid-template-columns:1fr 1fr}.footer-nav a{padding:0 8px;border-top:1px solid var(--shd-border);border-left:0}.footer-nav a:nth-child(even){border-left:1px solid var(--shd-border)}.footer-nav a:nth-child(-n+2){border-top:0}} - .footer-brand.footer-brand{gap:12px}.footer-brand .brand-mark{position:relative;width:36px;height:36px;font-size:var(--shd-type-telemetry)}.footer-brand .brand-mark i{position:absolute;inset:3px;border:1px solid #f6a82155;border-radius:50%}.footer-brand .brand-mark b{position:relative;color:var(--shd-orange);font-size:var(--shd-type-telemetry)}.footer-brand .brand-name{display:block;margin:0;font-size:14px;line-height:1;color:#fff}.footer-brand .brand-name>span{color:var(--shd-orange)}.footer-brand .brand-name small{margin-top:4px;color:var(--shd-text-dim);font-size:var(--shd-type-telemetry);letter-spacing:1.3px} @media(min-width:2200px){:root{--shd-display-scale:1.15}html{zoom:var(--shd-display-scale)}} @media(min-width:2800px){:root{--shd-display-scale:1.3}} @media(min-width:3400px){:root{--shd-display-scale:1.5}} body:before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.08;background-image:linear-gradient(rgba(255,255,255,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.08) 1px,transparent 1px);background-size:48px 48px} header{height:76px;border-bottom:1px solid #292d2f;display:flex;align-items:center;padding:0 max(24px,5vw);position:relative;z-index:5;background:rgba(10,12,13,.93)} - .brand{display:flex;align-items:center;gap:12px;color:#fff;text-decoration:none;font-weight:900;letter-spacing:1.4px}.brand-mark{display:grid;place-items:center;width:36px;height:36px;border:2px solid #f6a821;border-radius:50%;color:#f6a821}.accent{color:#f6a821} + .brand{display:flex;align-items:center;color:#fff;text-decoration:none;font-weight:900}.accent{color:#f6a821} nav{margin:auto;display:flex;height:100%}nav button{border:0;background:none;color:#868b8d;padding:0 22px;font-size:12px;font-weight:800;letter-spacing:1.5px;cursor:pointer;border-bottom:2px solid transparent}nav button.active,nav button:hover{color:#fff;border-color:#f6a821} .sign-in{background:none;border:1px solid #45494a;color:#fff;padding:12px 18px;font-size:var(--shd-type-telemetry);font-weight:800;letter-spacing:1.4px;cursor:pointer}.sign-in span{color:#f6a821;margin-left:12px} main{position:relative;z-index:1}.hero{min-height:660px;display:grid;grid-template-columns:1fr 1fr;max-width:1400px;margin:auto;padding:76px 5vw 40px;gap:40px;overflow:hidden}.hero-copy{padding-top:28px}.eyebrow{color:#9da1a2;font-size:var(--shd-type-telemetry);letter-spacing:2.4px;font-weight:800}.eyebrow span{display:inline-block;width:28px;height:2px;background:#f6a821;vertical-align:middle;margin-right:10px} @@ -70,7 +69,7 @@ @media(max-width:900px){header nav{display:none}.sign-in{margin-left:auto}.hero{grid-template-columns:1fr;padding-top:35px}.hero h1{font-size:62px}.loadout-preview{min-height:500px}.build-grid{grid-template-columns:1fr}.builder-layout,.admin-grid{grid-template-columns:1fr}.slot-grid{grid-template-columns:1fr}.summary{order:-1}.page-title{align-items:start;gap:25px}.page-title input{font-size:30px;width:100%}}@media(max-width:560px){.hero{padding-left:20px;padding-right:20px}.hero h1{font-size:48px;letter-spacing:-3px}.metrics{gap:25px}.hero-actions{flex-direction:column}.loadout-preview{display:none}.hero{min-height:auto;padding-bottom:60px}.page-title{flex-direction:column}.admin-grid{display:block}.data-panel{overflow:auto}.data-row{min-width:650px}.brand{font-size:13px}} /* Routed application compatibility: preserve the original SHD visual system. */ -.site-header{height:76px}.site-header .brand-mark{border:2px solid #f6a821;border-radius:50%;background:transparent;color:#f6a821;font-size:var(--shd-type-telemetry)}.site-header .brand b{color:#f6a821}.site-header nav a{display:grid;place-items:center;color:#868b8d;padding:0 22px;font-size:12px;font-weight:800;letter-spacing:1.5px;border-bottom:2px solid transparent}.site-header nav a.active,.site-header nav a:hover{color:#fff;border-color:#f6a821}.site-header .account{margin-left:auto;display:flex;align-items:center;gap:15px}.site-header .account>a{display:flex;flex-direction:column;font-size:var(--shd-type-telemetry);font-weight:800}.site-header .account small{font-size:var(--shd-type-telemetry);color:#6f7577}.site-header .account button{background:none;border:1px solid #45494a;color:#fff;padding:12px 18px;font-size:var(--shd-type-telemetry);font-weight:800;letter-spacing:1.2px} +.site-header{height:76px}.site-header nav a{display:grid;place-items:center;color:#868b8d;padding:0 22px;font-size:12px;font-weight:800;letter-spacing:1.5px;border-bottom:2px solid transparent}.site-header nav a.active,.site-header nav a:hover{color:#fff;border-color:#f6a821}.site-header .account{margin-left:auto;display:flex;align-items:center;gap:15px}.site-header .account>a{display:flex;flex-direction:column;font-size:var(--shd-type-telemetry);font-weight:800}.site-header .account small{font-size:var(--shd-type-telemetry);color:#6f7577}.site-header .account button{background:none;border:1px solid #45494a;color:#fff;padding:12px 18px;font-size:var(--shd-type-telemetry);font-weight:800;letter-spacing:1.2px} .page{width:100%;max-width:1640px;margin:auto;padding:52px clamp(18px,3vw,48px);min-height:calc(100vh - 76px)}.page.hero{max-width:1400px;padding:76px 5vw 40px}.page-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:35px}.page-head h1{font-size:50px;margin:6px 0;text-transform:uppercase}.page-head h2{font-size:25px;margin:5px 0}.page-head>div>input{background:transparent;border:0;border-bottom:1px solid #333;color:#fff;font-size:42px;font-weight:800;max-width:600px}.muted{color:#858b8d;line-height:1.55} .panel,.card,.table{background:#141718;border:1px solid #303536}.panel,.card{padding:24px}.grid{display:grid;gap:20px}.cards{grid-template-columns:repeat(3,minmax(0,1fr))}.card{border-top:2px solid #f6a821}.card small,.label{font-size:var(--shd-type-telemetry);color:#747a7c;letter-spacing:1.4px}.card h3{font-size:19px;text-transform:uppercase;margin:14px 0}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.field{display:block;font-size:var(--shd-type-telemetry);letter-spacing:1.2px;color:#999;margin:9px 0}.field input,.field select,.field textarea,input,select,textarea{display:block;width:100%;margin-top:6px;background:#0d0f10;border:1px solid #363b3c;color:#fff;padding:11px}.field textarea{resize:vertical}.form-actions{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid #303536;margin-top:14px;padding-top:14px}.error,.success{font-size:var(--shd-type-telemetry);border-left:2px solid;padding-left:10px}.error{color:#ff8e78;border-color:#ff6648}.success{color:#83c998;border-color:#55b673} .builder{display:grid;grid-template-columns:1fr 340px;gap:24px}.slots{display:grid;grid-template-columns:1fr 1fr;gap:14px}.slot{text-align:left;min-height:160px;background:#141718;border:1px solid #303536;color:#eee;cursor:pointer}.slot:hover{border-color:#f6a821}.stats{height:max-content}.stats div{display:flex;justify-content:space-between;font-size:var(--shd-type-telemetry);padding:14px 0;border-bottom:1px solid #303536} @@ -86,7 +85,7 @@ @media(max-width:900px){.admin-command{align-items:flex-start}.command-status>div:nth-child(n+2){display:none}.admin-dashboard{grid-template-columns:1fr}.admin-sidebar{position:static;height:auto;min-height:0}.admin-sidebar nav{display:grid;grid-template-columns:1fr 1fr}.sidebar-foot{display:none}.module-kpis{grid-template-columns:1fr 1fr}.dashboard-editor .form-grid{grid-template-columns:1fr 1fr}.tier-grid{grid-template-columns:1fr}}@media(max-width:560px){.admin-command,.module-toolbar{flex-direction:column;align-items:flex-start;gap:12px}.module-toolbar>div:last-child{width:100%}.module-toolbar button{flex:1}.module-kpis{grid-template-columns:1fr 1fr}.dashboard-editor .form-grid{grid-template-columns:1fr}.talent-identity{grid-template-columns:1fr!important}} /* Shared SHD routed surfaces */ -.site-header .brand-mark{position:relative}.site-header .brand-mark i{position:absolute;inset:3px;border:1px solid #f6a82155;border-radius:50%}.site-header .brand-mark b{position:relative;font-size:var(--shd-type-telemetry)}.brand-name{display:grid;font-size:14px;line-height:1}.brand-name>span{display:inline;color:#f6a821}.brand-name small{font-size:var(--shd-type-telemetry);color:#555d5f;letter-spacing:1.3px;margin-top:4px}.site-header .account small i{display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--shd-success);box-shadow:0 0 6px var(--shd-success);margin-right:3px} +.site-header .account small i{display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--shd-success);box-shadow:0 0 6px var(--shd-success);margin-right:3px} .catalogue-page,.guides-page,.profile-page{padding-top:34px}.catalogue-hero{min-height:230px;display:flex;justify-content:space-between;align-items:center;padding:25px 32px;margin-bottom:12px;border:1px solid var(--shd-border);background:radial-gradient(circle at 80% 50%,#332714 0,transparent 30%),linear-gradient(120deg,#141718,#0d1011);clip-path:polygon(0 0,97% 0,100% 18%,100% 100%,3% 100%,0 82%)}.catalogue-hero h1{font-size:clamp(48px,6vw,82px);line-height:.82;letter-spacing:-3px;margin:14px 0}.catalogue-hero h1 em{font-style:normal;color:var(--shd-orange)}.catalogue-hero>div>p:last-child{max-width:580px;color:var(--shd-text-muted);font:15px/1.55 var(--shd-font-editorial)}.catalogue-count{min-width:210px;display:grid;text-align:right}.catalogue-count strong{font-size:38px}.catalogue-count span{font-size:var(--shd-type-telemetry);color:#6d7476;letter-spacing:1.5px;margin:3px 0 18px}.catalogue-count .primary{justify-self:end}.filter-bar{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:7px;align-items:end;margin:12px 0 18px;padding:11px;background:#101314;border:1px solid #2d3233}.filter-bar label{font-size:var(--shd-type-telemetry);color:#72797b;letter-spacing:1.2px}.filter-bar input,.filter-bar select{height:38px;margin-top:6px;padding:0 10px;font-size:var(--shd-type-telemetry)}.filter-bar button{height:38px;padding:0 14px}.catalogue-grid{max-width:none}.catalogue-grid article{position:relative}.build-open{width:100%;margin-top:15px;padding:10px;border:1px solid #3a4041;background:#101314;color:#f6a821;font-size:var(--shd-type-telemetry);font-weight:bold;letter-spacing:1px}.guide-layout{display:grid;grid-template-columns:1fr 330px;gap:12px}.guide-feature{min-height:360px;padding:35px;position:relative;border:1px solid #303536;border-top:2px solid #f6a821;background:linear-gradient(135deg,#151819,#0d1011)}.guide-code{position:absolute;right:25px;top:22px;color:#4f5658;font-size:var(--shd-type-telemetry);letter-spacing:1.5px}.guide-feature h2{font-size:42px;line-height:.95;margin:20px 0}.guide-feature>p:not(.eyebrow){max-width:650px;color:#858b8d;font:15px/1.6 var(--shd-font-editorial)}.guide-meta{display:flex;gap:8px;position:absolute;left:35px;bottom:30px}.guide-meta span{display:grid;padding:8px 11px;border:1px solid #303536;color:#60686a;font-size:var(--shd-type-telemetry);letter-spacing:1px}.guide-meta b{color:#d7d9d5;font-size:var(--shd-type-telemetry);margin-top:4px}.guide-index{border:1px solid #303536;background:#111415;padding:20px}.guide-index>div{display:grid;grid-template-columns:30px 1fr auto;align-items:center;min-height:54px;border-top:1px solid #292e2f}.guide-index small{color:#535b5d;font-size:var(--shd-type-telemetry)}.guide-index span{font-size:var(--shd-type-telemetry);letter-spacing:.8px}.guide-index b{color:#f6a821} .profile-command{display:flex;justify-content:space-between;align-items:center;padding:0 0 24px;border-bottom:1px solid #303536}.profile-ident{display:flex;align-items:center;gap:18px}.profile-avatar{width:76px;height:76px;display:block;object-fit:cover;border:1px solid #f6a821;border-radius:50%;background:#0a0c0d;box-shadow:0 0 0 6px #0a0c0d,0 0 0 7px #f6a82155}.profile-ident h1{font-size:39px;margin:4px 0}.role-badge{display:inline-block;padding:4px 8px;border:1px solid #6e5226;color:#f6a821;font-size:var(--shd-type-telemetry);letter-spacing:1.3px}.profile-metrics{display:flex;gap:7px}.profile-metrics div{min-width:77px;height:59px;display:grid;place-items:center;padding:7px;background:#111415;border:1px solid #303536}.profile-metrics strong{font-size:20px}.profile-metrics span{font-size:var(--shd-type-telemetry);color:#697174;letter-spacing:1px}.account-alert{display:flex;gap:16px;margin:12px 0;padding:12px 15px;background:#2a2112;border:1px solid #795c2a;border-left:3px solid #f6a821;font-size:var(--shd-type-telemetry)}.account-alert b{color:#f6a821}.account-alert span{color:#b8ad99}.profile-dashboard{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:12px;margin-top:12px}.profile-feed{display:grid;gap:12px}.profile-module,.account-console{background:#111415;border:1px solid #303536;padding:16px}.module-head{display:flex;justify-content:space-between;align-items:center}.module-head h2,.profile-module h2,.account-console h2{font-size:17px;margin:4px 0 12px}.module-head .secondary{padding:10px 12px}.profile-table{border:1px solid #292e2f}.profile-row{display:grid;grid-template-columns:1.5fr .7fr .7fr .3fr;align-items:center;gap:9px;min-height:47px;padding:7px 11px;border-top:1px solid #292e2f;font-size:var(--shd-type-telemetry)}.profile-row.heading{min-height:30px;border:0;background:#0d1011;color:#636b6d;font-size:var(--shd-type-telemetry);letter-spacing:1px}.profile-row>div{display:grid}.profile-row small{font-size:var(--shd-type-telemetry);color:#596164}.profile-row>span{text-transform:uppercase;color:#858d8f}.profile-row button{border:0;background:transparent;color:#f6a821;font-size:var(--shd-type-telemetry)}.profile-empty{text-align:center;padding:38px}.profile-empty>span{font-size:31px;color:#f6a821}.profile-empty b{display:block;font-size:var(--shd-type-telemetry);letter-spacing:1px;margin:10px}.profile-empty p{color:#71797b;font:13px var(--shd-font-editorial)}.profile-empty a{color:#f6a821;font-size:var(--shd-type-telemetry);font-weight:bold}.profile-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px}.large-count{font-size:32px}.count-label{display:block;font-size:var(--shd-type-telemetry);color:#687073;letter-spacing:1.2px}.account-console{height:max-content}.console-head{display:flex;justify-content:space-between;padding-bottom:11px;margin-bottom:15px;border-bottom:1px solid #303536;color:#747c7e;font-size:var(--shd-type-telemetry);letter-spacing:1.3px}.console-head i{width:6px;height:6px;border-radius:50%;background:#75c08c;box-shadow:0 0 6px #75c08c}.console-action{width:100%;margin-top:9px}.connection-card{display:grid;grid-template-columns:35px 1fr auto;align-items:center;padding:10px;border:1px solid #303536}.discord-node{color:#8993ff;font-size:21px}.connection-card div{display:grid}.connection-card b{font-size:var(--shd-type-telemetry)}.connection-card small{font-size:var(--shd-type-telemetry);color:#656d6f;margin-top:3px}.connection-card a{color:#f6a821;font-size:var(--shd-type-telemetry);font-weight:bold} .avatar-picker{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:10px}.avatar-preset-form fieldset{height:100%}.avatar-preset{display:grid;gap:5px;width:100%;height:100%;padding:4px;background:#0b0e0f;border:1px solid #303536;color:#747c7e}.avatar-preset:hover,.avatar-preset:focus-visible{border-color:#8a672b;color:#f6a821}.avatar-preset.selected{border-color:#f6a821;color:#f6a821;box-shadow:inset 0 -2px #f6a821}.avatar-preset img{display:block;width:100%;aspect-ratio:1;object-fit:cover}.avatar-preset span{font-size:var(--shd-type-telemetry);line-height:1.25;text-transform:uppercase;letter-spacing:.4px}.avatar-upload{margin-top:8px} @@ -130,7 +129,7 @@ .isac-operation-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:10px 0 0;border:1px solid var(--shd-border);background:#0d1011}.isac-operation-tabs button{height:40px;border:0;border-left:1px solid var(--shd-border);border-bottom:2px solid transparent;background:transparent;color:var(--shd-text-dim);font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:1px;cursor:pointer}.isac-operation-tabs button:first-child{border-left:0}.isac-operation-tabs button b{margin-left:5px;color:var(--shd-success)}.isac-operation-tabs button:hover,.isac-operation-tabs button:focus-visible{background:#171b1c;color:var(--shd-text)}.isac-operation-tabs button.active{border-bottom-color:var(--shd-orange);background:#211a0e;color:var(--shd-orange)}.isac-operation-tabs button:focus-visible{position:relative;z-index:1;outline:2px solid var(--shd-orange);outline-offset:2px}.user-console-grid{grid-template-columns:minmax(0,1fr)}.isac-panel-hidden{display:none!important}.user-history-registries{display:grid;gap:10px;margin-top:10px}.history-registry{min-width:0;border:1px solid var(--shd-border);background:var(--shd-surface)}.history-filter{display:grid;grid-template-columns:minmax(180px,1fr) 170px 80px;gap:6px;padding:8px;border-bottom:1px solid var(--shd-border-soft)}.history-filter input,.history-filter select{height:34px;margin:0;padding:0 9px;font-size:var(--shd-type-telemetry)}.history-filter button{height:34px;padding:0 9px;font-size:var(--shd-type-telemetry)}.history-registry:last-child .history-filter{grid-template-columns:minmax(180px,1fr) 80px}.history-registry .registry-pagination{margin:0;border-width:0 0 1px}.history-registry .history-list{max-height:none}.history-registry .comment-history>div{grid-template-columns:minmax(140px,.5fr) minmax(260px,1.5fr) auto}.history-registry .comment-history span{white-space:normal;line-height:1.4}@media(max-width:650px){.isac-operation-tabs,.history-filter,.history-registry:last-child .history-filter{grid-template-columns:1fr}.isac-operation-tabs button{border-left:0;border-top:1px solid var(--shd-border)}.isac-operation-tabs button:first-child{border-top:0}} .isac-modal-backdrop{position:fixed;z-index:50;inset:0;display:grid;place-items:center;padding:20px;background:#050607d9;backdrop-filter:blur(3px)}.isac-confirm-modal{width:min(680px,100%);max-height:calc(100vh - 40px);overflow:auto;padding:16px;border:1px solid #5a6061;border-top:2px solid var(--shd-orange);background:#131617;box-shadow:0 24px 80px #000}.access-confirm-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.access-confirm-grid>div{min-height:120px;align-content:start;display:grid;gap:5px;padding:10px;border:1px solid var(--shd-border);background:#0d1011}.access-confirm-grid>div>span{margin-bottom:3px;color:var(--shd-text-dim);font-size:var(--shd-type-telemetry);letter-spacing:1px}.access-confirm-grid b{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:6px 7px;border-left:2px solid #596164;background:#151819;color:#aeb3b4;font-size:var(--shd-type-telemetry)}.access-confirm-grid b span{color:inherit}.access-confirm-grid b em{font-style:normal;color:#747c7e;font-size:var(--shd-type-telemetry);letter-spacing:.8px}.access-confirm-grid b.access-add{border-left-color:var(--shd-success);background:#101713;color:#9bd4ac}.access-confirm-grid b.access-add em{color:var(--shd-success)}.access-confirm-grid b.access-remove{border-left-color:var(--shd-danger);background:#211414;color:#dca096;text-decoration:line-through}.access-confirm-grid b.access-remove em{color:var(--shd-danger);text-decoration:none}.access-confirm-grid small{color:var(--shd-text-dim);font-size:var(--shd-type-telemetry)}@media(max-width:560px){.access-confirm-grid{grid-template-columns:1fr}} .login-investigation-list>div{grid-template-columns:1fr 1fr 1.2fr auto;align-items:center}.login-investigation-list>div>div{display:grid;gap:4px}.login-investigation-list small{color:var(--shd-text-dim);font-size:var(--shd-type-telemetry);letter-spacing:.4px}.deletion-purge-option{display:grid!important;grid-template-columns:20px 1fr;align-items:start;gap:8px;margin:14px 0!important;padding:10px;border:1px solid #70423b;background:#211414}.deletion-purge-option input{width:auto;margin:2px 0 0;accent-color:var(--shd-danger)}.deletion-purge-option span{display:grid;gap:4px}.deletion-purge-option b{color:var(--shd-danger);font-size:var(--shd-type-telemetry)}.deletion-purge-option small{margin:0;color:#b18c85;font-size:var(--shd-type-telemetry)} -.site-footer{position:relative;z-index:2;min-height:150px;display:grid;grid-template-columns:1fr auto minmax(300px,.9fr);align-items:center;gap:28px;padding:28px max(24px,5vw);border-top:1px solid var(--shd-border);background:#080a0b}.footer-brand{width:max-content}.footer-brand .brand-mark{width:30px;height:30px;font-size:var(--shd-type-telemetry)}.site-footer>div>p{margin:8px 0 0;color:var(--shd-text-dim);font:11px var(--shd-font-editorial)}.footer-links{display:grid;gap:8px}.footer-links a{color:var(--shd-orange);font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:1px}.fan-disclaimer{margin:0;color:#555d5f;font-size:var(--shd-type-telemetry);line-height:1.6;letter-spacing:.55px}.legal-page{max-width:1320px;margin:auto;padding:55px clamp(18px,5vw,72px) 90px}.legal-hero{padding-bottom:30px;border-bottom:1px solid var(--shd-border)}.legal-hero h1{margin:18px 0 14px;font-size:clamp(48px,7vw,82px);line-height:.9;letter-spacing:-3px}.legal-hero h1 em{color:var(--shd-orange);font-style:normal}.legal-hero>p:last-child{max-width:720px;color:var(--shd-text-muted);font:15px/1.6 var(--shd-font-editorial)}.legal-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:28px;margin-top:24px}.legal-index{position:sticky;top:95px;height:max-content;display:grid;margin:0;border:1px solid var(--shd-border)}.legal-index a{padding:11px;border-top:1px solid var(--shd-border-soft);color:var(--shd-text-muted);font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:.8px}.legal-index a:first-child{border-top:0}.legal-index a:hover{color:var(--shd-orange);background:#171b1c}.legal-document{display:grid}.legal-document section{scroll-margin-top:90px;display:grid;grid-template-columns:42px 1fr;gap:14px;padding:24px 0;border-top:1px solid var(--shd-border)}.legal-document section:first-child{border-top:0;padding-top:0}.legal-document section>span{color:var(--shd-orange);font-size:var(--shd-type-telemetry);font-weight:900}.legal-document h2{font-size:18px;letter-spacing:.6px}.legal-document p{color:#a1a7a8;font:13px/1.7 var(--shd-font-editorial)}.legal-document a{color:var(--shd-orange)}@media(max-width:800px){.site-footer{grid-template-columns:1fr}.legal-layout{grid-template-columns:1fr}.legal-index{position:static;grid-template-columns:1fr 1fr}.login-investigation-list>div{grid-template-columns:1fr 1fr}}@media(max-width:500px){.legal-index,.login-investigation-list>div{grid-template-columns:1fr}} +.site-footer{position:relative;z-index:2;min-height:150px;display:grid;grid-template-columns:1fr auto minmax(300px,.9fr);align-items:center;gap:28px;padding:28px max(24px,5vw);border-top:1px solid var(--shd-border);background:#080a0b}.footer-brand{width:max-content}.site-footer>div>p{margin:8px 0 0;color:var(--shd-text-dim);font:11px var(--shd-font-editorial)}.footer-links{display:grid;gap:8px}.footer-links a{color:var(--shd-orange);font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:1px}.fan-disclaimer{margin:0;color:#555d5f;font-size:var(--shd-type-telemetry);line-height:1.6;letter-spacing:.55px}.legal-page{max-width:1320px;margin:auto;padding:55px clamp(18px,5vw,72px) 90px}.legal-hero{padding-bottom:30px;border-bottom:1px solid var(--shd-border)}.legal-hero h1{margin:18px 0 14px;font-size:clamp(48px,7vw,82px);line-height:.9;letter-spacing:-3px}.legal-hero h1 em{color:var(--shd-orange);font-style:normal}.legal-hero>p:last-child{max-width:720px;color:var(--shd-text-muted);font:15px/1.6 var(--shd-font-editorial)}.legal-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:28px;margin-top:24px}.legal-index{position:sticky;top:95px;height:max-content;display:grid;margin:0;border:1px solid var(--shd-border)}.legal-index a{padding:11px;border-top:1px solid var(--shd-border-soft);color:var(--shd-text-muted);font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:.8px}.legal-index a:first-child{border-top:0}.legal-index a:hover{color:var(--shd-orange);background:#171b1c}.legal-document{display:grid}.legal-document section{scroll-margin-top:90px;display:grid;grid-template-columns:42px 1fr;gap:14px;padding:24px 0;border-top:1px solid var(--shd-border)}.legal-document section:first-child{border-top:0;padding-top:0}.legal-document section>span{color:var(--shd-orange);font-size:var(--shd-type-telemetry);font-weight:900}.legal-document h2{font-size:18px;letter-spacing:.6px}.legal-document p{color:#a1a7a8;font:13px/1.7 var(--shd-font-editorial)}.legal-document a{color:var(--shd-orange)}@media(max-width:800px){.site-footer{grid-template-columns:1fr}.legal-layout{grid-template-columns:1fr}.legal-index{position:static;grid-template-columns:1fr 1fr}.login-investigation-list>div{grid-template-columns:1fr 1fr}}@media(max-width:500px){.legal-index,.login-investigation-list>div{grid-template-columns:1fr}} .legal-primary{width:max-content;color:#111!important;margin-top:8px}.contact-page{width:100%;max-width:1500px;margin:auto;padding:34px clamp(18px,4vw,58px) 52px}.contact-hero{position:relative;height:auto;min-height:230px;display:grid;grid-template-columns:minmax(0,1fr) 310px;align-items:center;gap:40px;padding:18px 0 30px;border-bottom:1px solid var(--shd-border);background:transparent}.contact-hero>div{min-width:0}.contact-hero h1{margin:18px 0 14px;font-size:clamp(52px,7vw,88px);line-height:.85;letter-spacing:-4px}.contact-hero h1 em{color:var(--shd-orange);font-style:normal}.contact-hero>div>p:last-child{max-width:690px;margin-bottom:0;color:var(--shd-text-muted);font:15px/1.6 var(--shd-font-editorial)}.discord-contact{min-height:82px;display:grid;grid-template-columns:1fr auto;align-content:center;gap:4px 10px;padding:15px 17px;border:1px solid #6571dc;background:#171a32;color:#aeb6ff}.discord-contact span{font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:1.2px}.discord-contact strong{font-size:var(--shd-type-telemetry);letter-spacing:.8px}.discord-contact b{grid-column:2;grid-row:1/3;align-self:center;font-size:18px}.discord-contact:hover,.discord-contact:focus-visible{border-color:#929bff;background:#202446;color:#fff}.contact-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;align-items:start;gap:12px;margin-top:12px}.contact-console,.contact-guidance{border:1px solid var(--shd-border);background:var(--shd-surface)}.contact-console{padding:16px}.contact-console-head{min-height:45px;display:flex;align-items:start;justify-content:space-between;padding-bottom:10px;margin-bottom:13px;border-bottom:1px solid var(--shd-border)}.contact-console-head>div{display:grid;gap:4px}.contact-console-head span{color:var(--shd-text-dim);font-size:var(--shd-type-telemetry);letter-spacing:1.2px}.contact-console-head strong{font-size:13px}.contact-console-head>b{color:var(--shd-success);font-size:var(--shd-type-telemetry);letter-spacing:1px}.contact-console .segmented-choice>div{height:40px}.contact-console .field{margin:10px 0}.contact-console textarea{line-height:1.5}.contact-identity{display:grid;grid-template-columns:1fr 1fr;gap:9px}.contact-honeypot{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}.dmca-contact-fields{margin-top:15px;padding:12px;border:1px solid #74552a;border-left:2px solid var(--quality-high-end);background:#131108}.dmca-contact-fields>header{height:auto;display:flex;align-items:center;justify-content:space-between;padding:0 0 9px;border-bottom:1px solid #493a22;background:transparent}.dmca-contact-fields>header>div{display:grid;gap:4px}.dmca-contact-fields>header span{color:#82755f;font-size:var(--shd-type-telemetry);letter-spacing:1px}.dmca-contact-fields>header strong{color:var(--quality-high-end);font-size:var(--shd-type-telemetry)}.dmca-contact-fields>header a{color:var(--shd-orange);font-size:var(--shd-type-telemetry);font-weight:900}.dmca-contact-fields>p{margin:10px 0;color:#9b927f;font:var(--shd-type-supporting)/1.55 var(--shd-font-editorial)}.legal-attestation{min-height:46px;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:9px;margin-top:7px;padding:8px;border:1px solid #3c382e;background:#0d0f0d;color:#b5b0a3;font-size:var(--shd-type-telemetry);line-height:1.45;cursor:pointer}.legal-attestation input{width:auto;margin:0;accent-color:var(--shd-orange)}.legal-attestation:has(input:checked){border-color:#7c5c29;background:#1b170d}.contact-guidance{height:max-content;display:grid}.contact-guidance>div{position:relative;min-height:126px;padding:16px 16px 14px 50px;border-top:1px solid var(--shd-border)}.contact-guidance>div:first-child{border-top:0}.contact-guidance>div>span{position:absolute;left:15px;top:17px;color:var(--shd-orange);font-size:var(--shd-type-telemetry);font-weight:900}.contact-guidance h2{font-size:13px;letter-spacing:.8px}.contact-guidance p{margin:0;color:var(--shd-text-muted);font:var(--shd-type-supporting)/1.55 var(--shd-font-editorial)}.contact-guidance a{display:inline-block;margin-top:10px;color:var(--shd-orange);font-size:var(--shd-type-telemetry);font-weight:900}.contact-guidance>small{padding:14px;border-top:1px solid var(--shd-border);color:var(--shd-danger);font-size:var(--shd-type-telemetry);line-height:1.5;letter-spacing:.6px}.contact-success{min-height:300px;display:flex;align-items:center;justify-content:center;gap:16px;text-align:left}.contact-success>span{width:48px;height:48px;display:grid;place-items:center;border:1px solid var(--shd-success);color:var(--shd-success);font-size:18px}.contact-success strong{font-size:13px;letter-spacing:1px}.contact-success p{max-width:430px;margin:7px 0 0;color:var(--shd-text-muted);font:13px/1.55 var(--shd-font-editorial)}.contact-message-page{width:100%;max-width:1200px;min-height:calc(100vh - var(--shd-header-height));margin:auto;padding:36px clamp(18px,4vw,55px) 70px}.contact-back{display:inline-block;margin-bottom:12px;color:var(--shd-orange);font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:.8px}.contact-message{border:1px solid var(--shd-border);border-top:2px solid var(--shd-orange);background:var(--shd-surface)}.contact-message>header{position:static;height:62px;display:flex;justify-content:space-between;padding:0 17px;border-bottom:1px solid var(--shd-border);background:#0d1011}.contact-message>header>div{display:grid;gap:4px}.contact-message>header span{color:var(--shd-text-dim);font-size:var(--shd-type-telemetry);letter-spacing:1px}.contact-message>header strong{font-size:var(--shd-type-telemetry)}.contact-message>header time{color:var(--shd-text-muted);font-size:var(--shd-type-telemetry)}.contact-message-title{padding:28px clamp(20px,5vw,55px);border-bottom:1px solid var(--shd-border)}.contact-message-title h1{margin:12px 0;font-size:clamp(30px,5vw,48px)}.contact-message-title>p:last-child{color:var(--shd-text-muted);font-size:var(--shd-type-telemetry);letter-spacing:.8px}.contact-message-title a,.contact-message section a{color:var(--shd-orange)}.contact-message>section{padding:24px clamp(20px,5vw,55px);border-bottom:1px solid var(--shd-border)}.contact-message>section h2{font-size:var(--shd-type-telemetry);letter-spacing:1px}.contact-message>section>p{margin:12px 0 0;color:#c0c4c5;font:14px/1.7 var(--shd-font-editorial);white-space:pre-wrap}.contact-dmca-record dl{display:grid;gap:10px}.contact-dmca-record dl>div{display:grid;grid-template-columns:160px 1fr;gap:12px;padding-top:10px;border-top:1px solid var(--shd-border-soft)}.contact-dmca-record dt{color:var(--shd-text-dim);font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:.8px}.contact-dmca-record dd{margin:0;color:#c0c4c5;font:12px/1.6 var(--shd-font-editorial);white-space:pre-wrap}.contact-message>footer{display:flex;justify-content:flex-end;padding:14px}.contact-message>footer .primary{padding:13px 16px}@media(max-width:900px){.contact-hero,.contact-layout{grid-template-columns:1fr}.contact-hero{min-height:0;align-items:start;gap:20px;padding-top:8px}.discord-contact{width:100%}}@media(max-width:600px){.contact-page{padding-top:24px;padding-bottom:36px}.contact-hero h1{letter-spacing:-2.5px}.contact-identity{grid-template-columns:1fr}.contact-console .segmented-choice>div{height:auto;grid-template-columns:1fr}.contact-console .segmented-choice span{min-height:44px}.dmca-contact-fields>header{align-items:flex-start;flex-direction:column;gap:8px}.contact-dmca-record dl>div{grid-template-columns:1fr}.contact-message>footer .primary{width:100%}} @media(max-width:1100px){.effect-editor{grid-template-columns:1fr}.selection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:900px){.gear-identity,.gear-ranges{grid-template-columns:1fr 1fr}}@media(max-width:560px){.effect-band{grid-template-columns:48px 1fr}.effect-band .field:last-child{grid-column:2}.split-actions{align-items:stretch}.split-actions,.split-actions>div{width:100%}.split-actions>div:last-child button{flex:1}.gear-identity,.gear-ranges,.selection-grid{grid-template-columns:1fr}.range-band{grid-template-columns:48px 1fr}.range-band .field:last-child{grid-column:2}} .dashboard-row>.role-summary{display:flex;flex-wrap:wrap;align-items:center;gap:3px}.role-summary b{flex:0 0 auto;width:max-content;padding:3px 5px;border:1px solid #6e5226;color:var(--shd-orange);font-size:var(--shd-type-telemetry);letter-spacing:.6px} @@ -165,7 +164,7 @@ @media(max-width:900px){.admin-command{align-items:flex-start;gap:12px}.command-status{display:grid;grid-template-columns:repeat(2,minmax(105px,1fr))}}@media(max-width:560px){.admin-command{display:grid}.command-status{width:100%}.command-status>div{min-width:0}} .data-readonly .module-toolbar button,.data-readonly .dashboard-row:not(.table-heading)>button,.data-readonly .dashboard-editor,.data-readonly form[method=post]{display:none!important} .command-status .data-mode-status.oversight{border-left-color:#68a9c4}.command-status .data-mode-status.oversight strong{color:#8ecce5}.oversight-decision-tabs{grid-template-columns:repeat(3,1fr)}.proposal-correction-head{display:flex;align-items:center;justify-content:space-between;margin:10px 0 6px;padding:8px 9px;border:1px solid var(--shd-border);background:#0d1011}.proposal-correction-head>div{display:grid;gap:3px}.proposal-correction-head span{font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:.8px}.proposal-correction-head small{color:var(--shd-text-muted);font-size:var(--shd-type-telemetry)}.proposal-correction-head>b{color:var(--shd-orange);font-size:var(--shd-type-telemetry)}.proposal-correction-grid{max-height:340px;display:grid;grid-template-columns:1fr 1fr;gap:6px;overflow:auto;padding:7px;border:1px solid var(--shd-border);background:#0b0e0f}.proposal-correction-grid .field{margin:0}.proposal-correction-grid .field>span{display:flex;justify-content:space-between}.proposal-correction-grid .field>span small{color:#61696b;font-size:var(--shd-type-telemetry)}.proposal-correction-grid textarea{min-height:74px;resize:vertical}.immutable-proposal-file{display:grid;align-content:center;gap:4px;min-height:54px;padding:8px;border:1px dashed #394041;color:var(--shd-text-muted)}.immutable-proposal-file span,.immutable-proposal-file small{font-size:var(--shd-type-telemetry)}.immutable-proposal-file b{color:var(--shd-text);font-size:var(--shd-type-telemetry)}@media(max-width:700px){.oversight-decision-tabs,.proposal-correction-grid{grid-template-columns:1fr}} -.mobile-nav-toggle,.mobile-nav-layer{display:none}@media(max-width:900px){.site-header{position:relative;z-index:40;padding:0 16px}.site-header>.account,.site-header>.sign-in{display:none}.mobile-nav-toggle{width:52px;height:44px;display:grid;grid-template-columns:1fr;align-content:center;gap:4px;margin-left:auto;padding:6px 8px;border:1px solid var(--shd-border);background:#111415;color:var(--shd-text);cursor:pointer}.mobile-nav-toggle>span{width:20px;height:1px;margin-left:auto;background:var(--shd-orange);transition:transform .14s ease,opacity .14s ease}.mobile-nav-toggle>b{font-size:var(--shd-type-telemetry);letter-spacing:1px;text-align:right}.mobile-nav-toggle[aria-expanded=true]>span:nth-child(1){transform:translateY(5px) rotate(45deg)}.mobile-nav-toggle[aria-expanded=true]>span:nth-child(2){opacity:0}.mobile-nav-toggle[aria-expanded=true]>span:nth-child(3){transform:translateY(-5px) rotate(-45deg)}.mobile-nav-toggle:hover,.mobile-nav-toggle:focus-visible{border-color:var(--shd-orange);background:#171b1c}.mobile-nav-toggle:active{transform:translateY(1px);filter:brightness(.86)}.mobile-nav-layer{position:fixed;z-index:35;inset:76px 0 0;display:grid;grid-template-columns:1fr minmax(270px,82vw)}.mobile-nav-backdrop{grid-column:1;grid-row:1;width:100%;height:100%;padding:0;border:0;background:#050607c9;backdrop-filter:blur(2px);cursor:pointer}.mobile-navigation{grid-column:2;grid-row:1;width:100%;height:100%;display:flex;flex-direction:column;margin:0;overflow-y:auto;border-left:1px solid #4a5051;background:#0d1011;box-shadow:-18px 0 40px #000b}.mobile-nav-heading{min-height:61px;display:flex;align-items:center;justify-content:space-between;padding:11px 14px;border-bottom:1px solid var(--shd-border);background:#111415}.mobile-nav-heading>div{display:grid;gap:4px}.mobile-nav-heading span{color:var(--shd-text-muted);font-size:var(--shd-type-telemetry);letter-spacing:1.2px}.mobile-nav-heading strong{font-size:13px;letter-spacing:1px}.mobile-nav-heading>b{color:var(--shd-success);font-size:var(--shd-type-telemetry);letter-spacing:1px}.mobile-navigation>a{min-height:54px;display:grid;grid-template-columns:42px 1fr 20px;align-items:center;padding:0 13px 0 0;border-bottom:1px solid var(--shd-border-soft);color:#a1a8a9}.mobile-navigation>a small{height:100%;display:grid;place-items:center;background:#111415;color:#555d5f;font-size:var(--shd-type-telemetry);letter-spacing:.7px}.mobile-navigation>a span{padding-left:13px;font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:1px;text-transform:uppercase}.mobile-navigation>a>b{color:var(--shd-orange);font-size:18px}.mobile-navigation>a:hover,.mobile-navigation>a:focus-visible,.mobile-navigation>a.active{background:#171b1c;color:#fff}.mobile-navigation>a.active{box-shadow:inset 2px 0 var(--shd-orange)}.mobile-navigation>a.active small{background:#211a0e;color:var(--shd-orange)}.mobile-navigation>a:active{filter:brightness(.82)}.mobile-agent-state{display:grid;gap:4px;margin-top:auto;padding:14px;border-top:1px solid var(--shd-border)}.mobile-agent-state span{color:#747c7e;font-size:var(--shd-type-telemetry);letter-spacing:1px}.mobile-agent-state i{display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--shd-success);box-shadow:0 0 6px var(--shd-success)}.mobile-agent-state strong{font-size:var(--shd-type-telemetry)}.mobile-navigation form{margin:0;padding:0 14px 14px}.mobile-sign-out{width:100%;min-height:40px;border:1px solid #503b37;background:#1b1211;color:var(--shd-danger);font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:1px;cursor:pointer}.mobile-sign-out:hover,.mobile-sign-out:focus-visible{border-color:var(--shd-danger);background:#251715}.mobile-sign-out:active{transform:translateY(1px);filter:brightness(.86)}}@media(max-width:430px){.mobile-nav-layer{grid-template-columns:36px 1fr}.site-header .brand-name small{display:none}}@media(prefers-reduced-motion:reduce){.mobile-nav-toggle>span{transition:none}} +.mobile-nav-toggle,.mobile-nav-layer{display:none}@media(max-width:900px){.site-header{position:relative;z-index:40;padding:0 16px}.site-header>.account,.site-header>.sign-in{display:none}.mobile-nav-toggle{width:52px;height:44px;display:grid;grid-template-columns:1fr;align-content:center;gap:4px;margin-left:auto;padding:6px 8px;border:1px solid var(--shd-border);background:#111415;color:var(--shd-text);cursor:pointer}.mobile-nav-toggle>span{width:20px;height:1px;margin-left:auto;background:var(--shd-orange);transition:transform .14s ease,opacity .14s ease}.mobile-nav-toggle>b{font-size:var(--shd-type-telemetry);letter-spacing:1px;text-align:right}.mobile-nav-toggle[aria-expanded=true]>span:nth-child(1){transform:translateY(5px) rotate(45deg)}.mobile-nav-toggle[aria-expanded=true]>span:nth-child(2){opacity:0}.mobile-nav-toggle[aria-expanded=true]>span:nth-child(3){transform:translateY(-5px) rotate(-45deg)}.mobile-nav-toggle:hover,.mobile-nav-toggle:focus-visible{border-color:var(--shd-orange);background:#171b1c}.mobile-nav-toggle:active{transform:translateY(1px);filter:brightness(.86)}.mobile-nav-layer{position:fixed;z-index:35;inset:76px 0 0;display:grid;grid-template-columns:1fr minmax(270px,82vw)}.mobile-nav-backdrop{grid-column:1;grid-row:1;width:100%;height:100%;padding:0;border:0;background:#050607c9;backdrop-filter:blur(2px);cursor:pointer}.mobile-navigation{grid-column:2;grid-row:1;width:100%;height:100%;display:flex;flex-direction:column;margin:0;overflow-y:auto;border-left:1px solid #4a5051;background:#0d1011;box-shadow:-18px 0 40px #000b}.mobile-nav-heading{min-height:61px;display:flex;align-items:center;justify-content:space-between;padding:11px 14px;border-bottom:1px solid var(--shd-border);background:#111415}.mobile-nav-heading>div{display:grid;gap:4px}.mobile-nav-heading span{color:var(--shd-text-muted);font-size:var(--shd-type-telemetry);letter-spacing:1.2px}.mobile-nav-heading strong{font-size:13px;letter-spacing:1px}.mobile-nav-heading>b{color:var(--shd-success);font-size:var(--shd-type-telemetry);letter-spacing:1px}.mobile-navigation>a{min-height:54px;display:grid;grid-template-columns:42px 1fr 20px;align-items:center;padding:0 13px 0 0;border-bottom:1px solid var(--shd-border-soft);color:#a1a8a9}.mobile-navigation>a small{height:100%;display:grid;place-items:center;background:#111415;color:#555d5f;font-size:var(--shd-type-telemetry);letter-spacing:.7px}.mobile-navigation>a span{padding-left:13px;font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:1px;text-transform:uppercase}.mobile-navigation>a>b{color:var(--shd-orange);font-size:18px}.mobile-navigation>a:hover,.mobile-navigation>a:focus-visible,.mobile-navigation>a.active{background:#171b1c;color:#fff}.mobile-navigation>a.active{box-shadow:inset 2px 0 var(--shd-orange)}.mobile-navigation>a.active small{background:#211a0e;color:var(--shd-orange)}.mobile-navigation>a:active{filter:brightness(.82)}.mobile-agent-state{display:grid;gap:4px;margin-top:auto;padding:14px;border-top:1px solid var(--shd-border)}.mobile-agent-state span{color:#747c7e;font-size:var(--shd-type-telemetry);letter-spacing:1px}.mobile-agent-state i{display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--shd-success);box-shadow:0 0 6px var(--shd-success)}.mobile-agent-state strong{font-size:var(--shd-type-telemetry)}.mobile-navigation form{margin:0;padding:0 14px 14px}.mobile-sign-out{width:100%;min-height:40px;border:1px solid #503b37;background:#1b1211;color:var(--shd-danger);font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:1px;cursor:pointer}.mobile-sign-out:hover,.mobile-sign-out:focus-visible{border-color:var(--shd-danger);background:#251715}.mobile-sign-out:active{transform:translateY(1px);filter:brightness(.86)}}@media(max-width:430px){.mobile-nav-layer{grid-template-columns:36px 1fr}}@media(prefers-reduced-motion:reduce){.mobile-nav-toggle>span{transition:none}} @media(max-width:700px){.module-toolbar{align-items:stretch;flex-direction:column;gap:11px;padding-bottom:11px}.module-toolbar>div:first-child{width:100%}.module-toolbar>button{width:100%;min-height:48px;justify-content:center}.module-toolbar>div:last-child:has(button){width:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:7px}.module-toolbar>div:last-child:has(button)>button{width:100%;min-height:48px;padding:0 14px;font-size:var(--shd-type-telemetry);letter-spacing:1px}.module-toolbar .primary,.module-toolbar .secondary{height:auto;min-height:48px}} /* Gear shared Tactical Augment profiles */ @@ -238,7 +237,7 @@ /* Global action feedback */ .toast-viewport{position:fixed;z-index:1000;top:calc(var(--shd-header-height) + 12px);right:clamp(12px,2vw,28px);width:min(390px,calc(100vw - 24px));display:grid;gap:8px;pointer-events:none}.toast-message{--toast-tone:#829093;position:relative;min-height:72px;display:grid;grid-template-columns:4px minmax(0,1fr) 34px;overflow:hidden;border:1px solid #414849;border-top:2px solid var(--toast-tone);background:linear-gradient(105deg,#171b1cee,#0c0f10f7);box-shadow:0 12px 30px #000b;color:var(--shd-text);pointer-events:auto;animation:toast-enter .18s ease-out}.toast-message.success{--toast-tone:var(--shd-success)}.toast-message.error{--toast-tone:var(--shd-danger)}.toast-message.warning{--toast-tone:var(--shd-orange)}.toast-message.info{--toast-tone:#6d9daf}.toast-message>i{width:4px;height:100%;background:var(--toast-tone);box-shadow:0 0 12px color-mix(in srgb,var(--toast-tone) 50%,transparent)}.toast-message>div{min-width:0;display:grid;align-content:center;gap:4px;padding:11px 10px}.toast-message span{color:var(--toast-tone);font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:1px}.toast-message strong{overflow-wrap:anywhere;font-size:var(--shd-type-telemetry);line-height:1.3;letter-spacing:.3px}.toast-message p{margin:0;color:#91999b;font-size:var(--shd-type-telemetry);line-height:1.45}.toast-message>button{width:34px;height:34px;margin:4px 3px 0 0;border:0;background:transparent;color:#70787a;font-size:17px;cursor:pointer}.toast-message>button:hover,.toast-message>button:focus-visible{background:#ffffff09;color:var(--toast-tone)}.toast-message>button:active{transform:translateY(1px);filter:brightness(.8)}@keyframes toast-enter{from{opacity:0;transform:translateX(18px)}to{opacity:1;transform:none}}@media(max-width:700px){.toast-viewport{top:calc(var(--shd-header-height) + 8px);right:8px;width:calc(100vw - 16px)}.toast-message{min-height:68px}}@media(prefers-reduced-motion:reduce){.toast-message{animation:none}} -.community-metrics{gap:38px}.community-metrics strong{color:var(--shd-orange);font-size:15px;letter-spacing:1px}.community-preview .gear-node{width:98px;color:var(--shd-text)}.community-preview .gear-node:hover,.community-preview .gear-node:focus-visible{border-color:var(--shd-orange);background:#211a0e}.community-preview .gear-node:active{transform:translateY(1px);filter:brightness(.86)}.community-preview .gear-node b{font-size:var(--shd-type-telemetry);letter-spacing:.55px}.community-channels{padding:58px max(24px,5vw) 70px;border-top:1px solid var(--shd-border);background:#0c0f10}.community-channels>.section-heading{max-width:1240px}.community-channels>.section-heading>p{max-width:310px;margin:0;color:var(--shd-text-muted);font:12px/1.5 var(--shd-font-editorial);text-align:right}.community-channel-grid{max-width:1240px;display:grid;grid-template-columns:repeat(4,1fr);margin:auto;border:1px solid var(--shd-border)}.community-channel-grid>a{min-height:205px;display:flex;flex-direction:column;padding:20px;border-left:1px solid var(--shd-border);background:#111415;color:var(--shd-text)}.community-channel-grid>a:first-child{border-left:0}.community-channel-grid>a:hover,.community-channel-grid>a:focus-visible{background:#171b1c;box-shadow:inset 0 2px var(--shd-orange)}.community-channel-grid>a:active{filter:brightness(.84)}.community-channel-grid small{color:#626a6c;font-size:var(--shd-type-telemetry);letter-spacing:1px}.community-channel-grid strong{margin:18px 0 9px;font-size:14px;letter-spacing:.6px}.community-channel-grid span{color:#858d8f;font:var(--shd-type-supporting)/1.55 var(--shd-font-editorial)}.community-channel-grid b{margin-top:auto;padding-top:17px;color:var(--shd-orange);font-size:var(--shd-type-telemetry);letter-spacing:.8px}.community-index-page{padding-top:34px}.community-index-hero{margin-bottom:12px}.community-database-intro{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}.community-database-intro>div{display:grid;grid-template-columns:150px 1fr 1.4fr;align-items:center;gap:12px;min-height:65px;padding:10px 13px;border:1px solid var(--shd-border);background:#101314}.community-database-intro span{color:#666e70;font-size:var(--shd-type-telemetry);letter-spacing:1px}.community-database-intro strong{color:var(--shd-orange);font-size:var(--shd-type-telemetry);letter-spacing:.7px}.community-database-intro small{color:#7f8789;font:var(--shd-type-telemetry)/1.45 var(--shd-font-editorial)}.database-registry-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.database-registry-grid article{min-height:180px;display:flex;flex-direction:column;padding:17px;border:1px solid var(--shd-border);border-top:2px solid #43494a;background:#111415}.database-registry-grid article:hover{border-top-color:var(--shd-orange);background:#15191a}.database-registry-grid header{height:auto;display:flex;justify-content:space-between}.database-registry-grid header small{color:#596164;font-size:var(--shd-type-telemetry);letter-spacing:.8px}.database-registry-grid header b{color:var(--shd-orange);font-size:20px}.database-registry-grid h2{margin:18px 0 8px;font-size:16px}.database-registry-grid p{color:#858d8f;font:var(--shd-type-supporting)/1.55 var(--shd-font-editorial)}.database-registry-grid>article>span{margin-top:auto;color:#687073;font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:.8px}.news-channel-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:10px}.news-primary{min-height:390px;padding:30px;border:1px solid var(--shd-border);border-top:2px solid var(--shd-orange);background:linear-gradient(135deg,#151819,#0d1011)}.news-primary>div:first-child{display:flex;justify-content:space-between;padding-bottom:13px;margin-bottom:30px;border-bottom:1px solid var(--shd-border);color:#626a6c;font-size:var(--shd-type-telemetry);letter-spacing:1px}.news-primary>div:first-child b{color:var(--shd-orange)}.news-primary h2{max-width:720px;margin:19px 0;font-size:clamp(30px,4vw,52px);line-height:.95}.news-primary>p:not(.eyebrow){max-width:760px;color:#969d9f;font:14px/1.7 var(--shd-font-editorial)}.news-primary footer{display:flex;gap:7px;margin-top:35px}.news-primary footer span{display:grid;padding:8px 10px;border:1px solid var(--shd-border);color:#626a6c;font-size:var(--shd-type-telemetry);letter-spacing:.8px}.news-primary footer b{margin-top:4px;color:#d5d8d5;font-size:var(--shd-type-telemetry)}.news-channel-grid>aside{padding:19px;border:1px solid var(--shd-border);background:#111415}.news-channel-grid>aside>div{min-height:58px;display:grid;grid-template-columns:30px 1fr auto;align-items:center;border-top:1px solid var(--shd-border)}.news-channel-grid>aside small{color:#596164;font-size:var(--shd-type-telemetry)}.news-channel-grid>aside span{font-size:var(--shd-type-telemetry);letter-spacing:.7px}.news-channel-grid>aside b{color:#6e7678;font-size:var(--shd-type-telemetry)}@media(max-width:1100px){.community-channel-grid{grid-template-columns:1fr 1fr}.community-channel-grid>a:nth-child(3){border-left:0;border-top:1px solid var(--shd-border)}.community-channel-grid>a:nth-child(4){border-top:1px solid var(--shd-border)}.community-database-intro{grid-template-columns:1fr}.database-registry-grid{grid-template-columns:1fr 1fr}}@media(max-width:750px){.community-channels>.section-heading>p{display:none}.community-channel-grid,.database-registry-grid,.news-channel-grid{grid-template-columns:1fr}.community-channel-grid>a{min-height:155px;border-left:0;border-top:1px solid var(--shd-border)}.community-channel-grid>a:first-child{border-top:0}.community-database-intro>div{grid-template-columns:1fr}.news-primary{padding:22px}.news-primary footer{flex-wrap:wrap}}@media(max-width:430px){.site-header .brand-name small{display:block;font-size:var(--shd-type-telemetry);letter-spacing:.7px}} +.community-metrics{gap:38px}.community-metrics strong{color:var(--shd-orange);font-size:15px;letter-spacing:1px}.community-preview .gear-node{width:98px;color:var(--shd-text)}.community-preview .gear-node:hover,.community-preview .gear-node:focus-visible{border-color:var(--shd-orange);background:#211a0e}.community-preview .gear-node:active{transform:translateY(1px);filter:brightness(.86)}.community-preview .gear-node b{font-size:var(--shd-type-telemetry);letter-spacing:.55px}.community-channels{padding:58px max(24px,5vw) 70px;border-top:1px solid var(--shd-border);background:#0c0f10}.community-channels>.section-heading{max-width:1240px}.community-channels>.section-heading>p{max-width:310px;margin:0;color:var(--shd-text-muted);font:12px/1.5 var(--shd-font-editorial);text-align:right}.community-channel-grid{max-width:1240px;display:grid;grid-template-columns:repeat(4,1fr);margin:auto;border:1px solid var(--shd-border)}.community-channel-grid>a{min-height:205px;display:flex;flex-direction:column;padding:20px;border-left:1px solid var(--shd-border);background:#111415;color:var(--shd-text)}.community-channel-grid>a:first-child{border-left:0}.community-channel-grid>a:hover,.community-channel-grid>a:focus-visible{background:#171b1c;box-shadow:inset 0 2px var(--shd-orange)}.community-channel-grid>a:active{filter:brightness(.84)}.community-channel-grid small{color:#626a6c;font-size:var(--shd-type-telemetry);letter-spacing:1px}.community-channel-grid strong{margin:18px 0 9px;font-size:14px;letter-spacing:.6px}.community-channel-grid span{color:#858d8f;font:var(--shd-type-supporting)/1.55 var(--shd-font-editorial)}.community-channel-grid b{margin-top:auto;padding-top:17px;color:var(--shd-orange);font-size:var(--shd-type-telemetry);letter-spacing:.8px}.community-index-page{padding-top:34px}.community-index-hero{margin-bottom:12px}.community-database-intro{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}.community-database-intro>div{display:grid;grid-template-columns:150px 1fr 1.4fr;align-items:center;gap:12px;min-height:65px;padding:10px 13px;border:1px solid var(--shd-border);background:#101314}.community-database-intro span{color:#666e70;font-size:var(--shd-type-telemetry);letter-spacing:1px}.community-database-intro strong{color:var(--shd-orange);font-size:var(--shd-type-telemetry);letter-spacing:.7px}.community-database-intro small{color:#7f8789;font:var(--shd-type-telemetry)/1.45 var(--shd-font-editorial)}.database-registry-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.database-registry-grid article{min-height:180px;display:flex;flex-direction:column;padding:17px;border:1px solid var(--shd-border);border-top:2px solid #43494a;background:#111415}.database-registry-grid article:hover{border-top-color:var(--shd-orange);background:#15191a}.database-registry-grid header{height:auto;display:flex;justify-content:space-between}.database-registry-grid header small{color:#596164;font-size:var(--shd-type-telemetry);letter-spacing:.8px}.database-registry-grid header b{color:var(--shd-orange);font-size:20px}.database-registry-grid h2{margin:18px 0 8px;font-size:16px}.database-registry-grid p{color:#858d8f;font:var(--shd-type-supporting)/1.55 var(--shd-font-editorial)}.database-registry-grid>article>span{margin-top:auto;color:#687073;font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:.8px}.news-channel-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:10px}.news-primary{min-height:390px;padding:30px;border:1px solid var(--shd-border);border-top:2px solid var(--shd-orange);background:linear-gradient(135deg,#151819,#0d1011)}.news-primary>div:first-child{display:flex;justify-content:space-between;padding-bottom:13px;margin-bottom:30px;border-bottom:1px solid var(--shd-border);color:#626a6c;font-size:var(--shd-type-telemetry);letter-spacing:1px}.news-primary>div:first-child b{color:var(--shd-orange)}.news-primary h2{max-width:720px;margin:19px 0;font-size:clamp(30px,4vw,52px);line-height:.95}.news-primary>p:not(.eyebrow){max-width:760px;color:#969d9f;font:14px/1.7 var(--shd-font-editorial)}.news-primary footer{display:flex;gap:7px;margin-top:35px}.news-primary footer span{display:grid;padding:8px 10px;border:1px solid var(--shd-border);color:#626a6c;font-size:var(--shd-type-telemetry);letter-spacing:.8px}.news-primary footer b{margin-top:4px;color:#d5d8d5;font-size:var(--shd-type-telemetry)}.news-channel-grid>aside{padding:19px;border:1px solid var(--shd-border);background:#111415}.news-channel-grid>aside>div{min-height:58px;display:grid;grid-template-columns:30px 1fr auto;align-items:center;border-top:1px solid var(--shd-border)}.news-channel-grid>aside small{color:#596164;font-size:var(--shd-type-telemetry)}.news-channel-grid>aside span{font-size:var(--shd-type-telemetry);letter-spacing:.7px}.news-channel-grid>aside b{color:#6e7678;font-size:var(--shd-type-telemetry)}@media(max-width:1100px){.community-channel-grid{grid-template-columns:1fr 1fr}.community-channel-grid>a:nth-child(3){border-left:0;border-top:1px solid var(--shd-border)}.community-channel-grid>a:nth-child(4){border-top:1px solid var(--shd-border)}.community-database-intro{grid-template-columns:1fr}.database-registry-grid{grid-template-columns:1fr 1fr}}@media(max-width:750px){.community-channels>.section-heading>p{display:none}.community-channel-grid,.database-registry-grid,.news-channel-grid{grid-template-columns:1fr}.community-channel-grid>a{min-height:155px;border-left:0;border-top:1px solid var(--shd-border)}.community-channel-grid>a:first-child{border-top:0}.community-database-intro>div{grid-template-columns:1fr}.news-primary{padding:22px}.news-primary footer{flex-wrap:wrap}} /* Readable operational type floors */ .eyebrow, @@ -270,13 +269,7 @@ .database-registry-grid p{ max-width:65ch; } -.site-header .brand-mark b, -.footer-brand .brand-mark b{ - font-size:var(--shd-type-telemetry); -} -.site-header .brand-name small, -.footer-brand .brand-name small, -.site-header .desktop-agent-trigger>span small, + .site-header .desktop-agent-trigger>span small, .site-header .desktop-agent-trigger>span b, .footer-discord span, .footer-discord small, @@ -293,11 +286,6 @@ .fan-disclaimer{ letter-spacing:.04em; } -@media(max-width:430px){ - .site-header .brand-name small{ - font-size:var(--shd-type-telemetry); - } -} /* Keep the user registry action in its dedicated final table column. */ .user-row{ @@ -486,6 +474,209 @@ .metrics-panel header b.metric-warning,.metric-warning{color:var(--shd-orange)} .metrics-panel header b.metric-critical,.metric-critical{color:var(--shd-danger)} +/* Prelaunch shell: an anonymous deployment surface with authenticated entry. */ +.launch-page{ + position:relative; + isolation:isolate; + min-height:100vh; + display:flex; + flex-direction:column; + overflow:hidden; + padding:0 clamp(20px,4vw,72px); + background: + radial-gradient(circle at 72% 35%,rgba(246,168,33,.09),transparent 27%), + linear-gradient(145deg,#111617 0,#090b0c 48%,#0d1011 100%); +} +.launch-grid{ + position:absolute; + inset:0; + z-index:-1; + opacity:.2; + background-image: + linear-gradient(rgba(100,110,112,.14) 1px,transparent 1px), + linear-gradient(90deg,rgba(100,110,112,.14) 1px,transparent 1px); + background-size:48px 48px; + mask-image:linear-gradient(to bottom,#000,transparent 88%); +} +.launch-header{ + min-height:94px; + display:flex; + align-items:center; + justify-content:space-between; + border-bottom:1px solid var(--shd-border); +} +.launch-header .brand{position:static} +.launch-signal{ + display:grid; + grid-template-columns:8px auto; + column-gap:9px; + align-items:center; + padding:10px 13px; + border:1px solid var(--shd-border); + background:rgba(13,16,17,.8); +} +.launch-signal i{ + grid-row:1/3; + width:7px; + height:7px; + border-radius:50%; + background:var(--shd-orange); + box-shadow:0 0 10px rgba(246,168,33,.7); + animation:launch-pulse 2.4s ease-in-out infinite; +} +.launch-signal span,.launch-signal b{font-size:var(--shd-type-telemetry);letter-spacing:1px} +.launch-signal span{color:var(--shd-text-dim)} +.launch-signal b{color:var(--shd-orange)} +.launch-hero{ + min-height:min(680px,calc(100vh - 94px)); + display:grid; + grid-template-columns:minmax(0,1.05fr) minmax(420px,.95fr); + align-items:center; + gap:clamp(36px,7vw,110px); + padding:clamp(54px,7vh,90px) 0; +} +.launch-copy{max-width:780px} +.launch-copy h1{ + margin:18px 0 22px; + font-size:clamp(58px,7.2vw,126px); + line-height:.78; + letter-spacing:-.045em; +} +.launch-copy h1 em{color:var(--shd-orange);font-style:normal} +.launch-lede{ + max-width:680px; + margin:0; + color:#a4abad; + font:clamp(17px,1.25vw,22px)/1.55 var(--shd-font-editorial); +} +.launch-notice{ + max-width:680px; + display:grid; + gap:4px; + margin:20px 0 0; + padding:11px 13px; + border-left:3px solid var(--shd-orange); + background:#18140d; +} +.launch-notice b,.launch-notice span{font-size:var(--shd-type-supporting)} +.launch-notice b{color:var(--shd-orange);letter-spacing:.7px} +.launch-notice span{color:var(--shd-text-muted)} +.launch-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:30px} +.launch-actions a{min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:26px;padding:0 17px} +.launch-actions .secondary{border-color:#4a5152;background:rgba(14,17,18,.8)} +.launch-access-note{margin:13px 0 0;color:#687174;font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:1px} +.launch-core{min-width:0;display:grid;justify-items:center;gap:24px} +.launch-radar{ + position:relative; + width:min(38vw,500px); + aspect-ratio:1; + border:1px solid #3d4445; + background:radial-gradient(circle,rgba(246,168,33,.08),transparent 55%); + transform:rotate(45deg); + box-shadow:0 0 70px rgba(0,0,0,.45),inset 0 0 55px rgba(0,0,0,.5); +} +.radar-ring{ + position:absolute; + inset:12%; + border:1px solid rgba(132,142,143,.25); + border-radius:50%; +} +.radar-ring.ring-b{inset:27%} +.radar-ring.ring-c{inset:41%;border-color:rgba(246,168,33,.5)} +.radar-sweep{ + position:absolute; + inset:8%; + border-radius:50%; + background:conic-gradient(from 0deg,transparent 0 82%,rgba(246,168,33,.14) 96%,rgba(246,168,33,.55)); + animation:radar-sweep 8s linear infinite; +} +.radar-core{ + position:absolute; + inset:39%; + display:grid; + place-items:center; + border:1px solid var(--shd-orange); + background:#0f1213; + transform:rotate(-45deg); + box-shadow:0 12px 30px rgba(0,0,0,.35),inset 0 0 24px rgba(246,168,33,.1); +} +.radar-node{ + position:absolute; + display:flex; + align-items:center; + gap:7px; + color:#8d9597; + font-size:var(--shd-type-telemetry); + font-weight:900; + letter-spacing:1px; + transform:rotate(-45deg); +} +.radar-node i{width:7px;height:7px;border:1px solid var(--shd-orange);background:#211a0e} +.radar-node.node-0{left:7%;top:47%} +.radar-node.node-1{right:-4%;top:47%} +.radar-node.node-2{left:42%;top:8%} +.radar-node.node-3{left:42%;bottom:8%} +.launch-core-status{width:min(100%,500px);display:grid;gap:4px;padding:12px 14px;border-left:2px solid var(--shd-orange);background:#101314} +.launch-core-status span,.launch-core-status small{color:#687174;font-size:var(--shd-type-telemetry);letter-spacing:1px} +.launch-core-status b{font-size:var(--shd-type-supporting);letter-spacing:.5px} +.launch-channels{padding:36px 0 48px;border-top:1px solid var(--shd-border)} +.launch-channels>header{display:flex;align-items:end;justify-content:space-between;margin-bottom:16px} +.launch-channels h2{margin:4px 0 0;font-size:clamp(23px,2.4vw,36px)} +.launch-channels>header>b{color:var(--shd-orange);font-size:var(--shd-type-telemetry);letter-spacing:1px} +.launch-channels>div{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border:1px solid var(--shd-border)} +.launch-channels article{min-height:148px;display:grid;align-content:space-between;gap:15px;padding:16px;border-left:1px solid var(--shd-border);background:rgba(16,19,20,.88)} +.launch-channels article:first-child{border-left:0} +.launch-channels article small,.launch-channels article span{font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:.8px} +.launch-channels article small{color:#697174} +.launch-channels article h3{margin:0;font-size:14px;line-height:1.35} +.launch-channels article span{width:max-content;color:#747c7e} +.launch-channels article span::before{content:"";display:inline-block;width:5px;height:5px;margin-right:6px;background:currentColor} +.launch-channels article span.available{color:var(--shd-success)} +.launch-footer{ + min-height:70px; + display:flex; + align-items:center; + justify-content:space-between; + gap:24px; + margin-top:auto; + border-top:1px solid var(--shd-border); +} +.launch-footer p,.launch-footer a{color:#626a6c;font-size:var(--shd-type-telemetry);font-weight:900;letter-spacing:.8px} +.launch-footer nav{display:flex;gap:18px} +.launch-footer a:hover,.launch-footer a:focus-visible{color:var(--shd-orange)} +@keyframes radar-sweep{to{transform:rotate(1turn)}} +@keyframes launch-pulse{50%{opacity:.45;box-shadow:0 0 3px rgba(246,168,33,.3)}} +@media(max-width:980px){ + .launch-hero{grid-template-columns:1fr;min-height:auto} + .launch-core{padding-bottom:22px} + .launch-radar{width:min(76vw,500px)} + .launch-channels>div{grid-template-columns:repeat(2,minmax(0,1fr))} + .launch-channels article:nth-child(odd){border-left:0} + .launch-channels article:last-child{grid-column:1/-1} +} +@media(max-width:600px){ + .launch-page{padding:0 16px} + .launch-header{min-height:78px} + .launch-signal span{display:none} + .launch-copy h1{font-size:clamp(40px,13vw,62px)} + .launch-actions{display:grid} + .launch-actions a{width:100%} + .launch-access-note{line-height:1.45;overflow-wrap:anywhere} + .radar-node{font-size:8px;letter-spacing:.55px} + .radar-node.node-1{right:6%} + .launch-channels>header,.launch-footer{align-items:flex-start;flex-direction:column} + .launch-channels>header{gap:8px} + .launch-channels>div{grid-template-columns:1fr} + .launch-channels article,.launch-channels article:nth-child(odd){border-left:0;border-top:1px solid var(--shd-border)} + .launch-channels article:first-child{border-top:0} + .launch-channels article:last-child{grid-column:auto} + .launch-footer{padding:18px 0} + .launch-footer nav{flex-wrap:wrap} +} +@media(prefers-reduced-motion:reduce){ + .launch-signal i,.radar-sweep{animation:none} +} + /* State the consequence of an ISAC data mutation before an editor is opened. */ .module-toolbar>div:first-child:last-child{display:block} .mutation-policy-strip{ diff --git a/src/hooks.server.ts b/src/hooks.server.ts index 49956f9..0493132 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -2,6 +2,7 @@ import { json, type Handle, type HandleServerError } from '@sveltejs/kit'; import { stringify } from 'devalue'; import { randomUUID } from 'node:crypto'; import { getSessionUser } from '$lib/server/auth/session'; +import { getSiteAccessBlock, getSiteAccessSettings } from '$lib/server/site-access'; import { DATA_MODULES, proposalActionResult, queueDataProposal, shouldModerateDataMutation, type DataModule } from '$lib/server/data-moderation'; export const handle: Handle = async ({ event, resolve }) => { @@ -9,6 +10,24 @@ export const handle: Handle = async ({ event, resolve }) => { const location = `/isac${event.url.pathname.slice('/admin'.length)}${event.url.search}`; return new Response(null, { status: 308, headers: { location } }); } + const siteSettings = await getSiteAccessSettings(); + const sessionUser = await getSessionUser(event.cookies); + const accessBlock = getSiteAccessBlock(siteSettings, event.url.pathname, Boolean(sessionUser)); + if (accessBlock) { + const target = new URL('/coming-soon', event.url); + if (accessBlock.kind === 'section') target.searchParams.set('unavailable', accessBlock.section); + if (event.request.method === 'GET' || event.request.method === 'HEAD') { + return new Response(null, { status: 303, headers: { location: `${target.pathname}${target.search}` } }); + } + return json( + { + error: accessBlock.kind === 'section' + ? 'This section is not available.' + : 'The public site is not available yet.' + }, + { status: 404 } + ); + } if (event.request.method === 'POST') { const match = event.url.pathname.match(/^\/isac\/([^/]+)$/); const module = match?.[1] as DataModule | undefined; @@ -17,7 +36,7 @@ export const handle: Handle = async ({ event, resolve }) => { // Publishing calculation rules is never a contributor proposal. The // action has its own dedicated permission and confirmation contract. if (module === 'calculations' && action === 'publishRevision') return resolve(event); - const user = await getSessionUser(event.cookies); + const user = sessionUser; const access = await shouldModerateDataMutation(user); if (!access.canManage && access.canPropose && user) { if (!access.contributorEnabled) { diff --git a/src/lib/components/AppShell.svelte b/src/lib/components/AppShell.svelte index bea37c4..7a3a7ca 100644 --- a/src/lib/components/AppShell.svelte +++ b/src/lib/components/AppShell.svelte @@ -1,23 +1,32 @@ + + + + diff --git a/src/lib/components/BrandLockup.svelte b/src/lib/components/BrandLockup.svelte new file mode 100644 index 0000000..8954b75 --- /dev/null +++ b/src/lib/components/BrandLockup.svelte @@ -0,0 +1,79 @@ + + + + + + SHD.build + {descriptor} + + + + diff --git a/src/lib/server/site-access.test.ts b/src/lib/server/site-access.test.ts new file mode 100644 index 0000000..72d76a6 --- /dev/null +++ b/src/lib/server/site-access.test.ts @@ -0,0 +1,197 @@ +import { beforeEach, describe, expect, it, vi } from 'vitest'; + +const databaseRow = vi.hoisted(() => ({ value: undefined as Record | undefined })); + +vi.mock('$lib/server/database', () => ({ + getDatabase: vi.fn(async () => ({ + prepare: vi.fn(async () => ({ + get: vi.fn(async () => databaseRow.value) + })) + })) +})); + +import { + getSiteAccessBlock, + getSiteAccessSettings, + invalidateSiteAccessSettings, + isLaunchGateExempt, + siteSectionForPath, + type SiteAccessSettings, + type SiteSectionKey +} from './site-access'; + +function accessSettings( + overrides: Partial> & { + sections?: Partial; + } = {} +): SiteAccessSettings { + return { + comingSoonEnabled: overrides.comingSoonEnabled ?? false, + accountCreationEnabled: overrides.accountCreationEnabled ?? true, + sections: { + news: true, + database: true, + builds: true, + guides: true, + builder: true, + ...overrides.sections + }, + updatedAt: '2026-07-27T00:00:00.000Z' + }; +} + +describe('siteSectionForPath', () => { + it.each([ + ['/news', 'news'], + ['/news/latest', 'news'], + ['/database', 'database'], + ['/database/weapons/first-wave-vector', 'database'], + ['/builds', 'builds'], + ['/builds/shared-loadout', 'builds'], + ['/guides', 'guides'], + ['/guides/combat-medic', 'guides'], + ['/builder', 'builder'], + ['/builder/loadout-id', 'builder'] + ])('maps %s to the %s launch section', (pathname, section) => { + expect(siteSectionForPath(pathname)).toBe(section); + }); + + it.each(['/', '/newsroom', '/database-tools', '/build', '/guide', '/builder-tools', '/isac'])( + 'does not treat %s as a gated section', + (pathname) => { + expect(siteSectionForPath(pathname)).toBeNull(); + } + ); +}); + +describe('isLaunchGateExempt', () => { + it.each([ + '/coming-soon', + '/sign-in', + '/terms', + '/dmca', + '/contact', + '/auth/discord', + '/auth/discord/callback', + '/api/health/database', + '/api/internal/notifications', + '/_app/immutable/entry/start.js', + '/favicon.svg' + ])('keeps %s reachable while the launch gate is active', (pathname) => { + expect(isLaunchGateExempt(pathname)).toBe(true); + }); + + it.each([ + '/', + '/news', + '/isac', + '/coming-soon/preview', + '/sign-in/help', + '/auth', + '/api/health', + '/api/internal', + '/favicon.png' + ])('does not exempt %s', (pathname) => { + expect(isLaunchGateExempt(pathname)).toBe(false); + }); +}); + +describe('getSiteAccessBlock', () => { + it('gives the global launch gate priority over a disabled section for anonymous visitors', () => { + const settings = accessSettings({ + comingSoonEnabled: true, + sections: { builder: false } + }); + + expect(getSiteAccessBlock(settings, '/builder', false)).toEqual({ kind: 'launch' }); + }); + + it('lets authenticated users bypass the global launch gate when the requested section is enabled', () => { + const settings = accessSettings({ comingSoonEnabled: true }); + + expect(getSiteAccessBlock(settings, '/builder', true)).toBeNull(); + }); + + it.each([ + ['/news', 'news'], + ['/database/weapons', 'database'], + ['/builds/agent-loadout', 'builds'], + ['/guides/combat-medic', 'guides'], + ['/builder', 'builder'] + ] satisfies Array<[string, SiteSectionKey]>)( + 'blocks %s for authenticated and anonymous visitors when the %s section is disabled', + (pathname, section) => { + const settings = accessSettings({ + sections: { [section]: false } + }); + + expect(getSiteAccessBlock(settings, pathname, false)).toEqual({ kind: 'section', section }); + expect(getSiteAccessBlock(settings, pathname, true)).toEqual({ kind: 'section', section }); + } + ); + + it.each(['/coming-soon', '/sign-in', '/terms', '/dmca', '/contact', '/auth/discord/callback'])( + 'keeps exempt route %s available while the global gate is active', + (pathname) => { + const settings = accessSettings({ comingSoonEnabled: true }); + + expect(getSiteAccessBlock(settings, pathname, false)).toBeNull(); + expect(getSiteAccessBlock(settings, pathname, true)).toBeNull(); + } + ); + + it('allows an enabled section when the global launch gate is off', () => { + const settings = accessSettings(); + + expect(getSiteAccessBlock(settings, '/news', false)).toBeNull(); + expect(getSiteAccessBlock(settings, '/news', true)).toBeNull(); + }); +}); + +describe('getSiteAccessSettings', () => { + beforeEach(() => { + databaseRow.value = undefined; + invalidateSiteAccessSettings(); + }); + + it('fails safely to the launch page while leaving registration and sections staged on a new database', async () => { + await expect(getSiteAccessSettings()).resolves.toEqual({ + comingSoonEnabled: true, + accountCreationEnabled: true, + sections: { + news: true, + database: true, + builds: true, + guides: true, + builder: true + }, + updatedAt: '2026-07-27T00:00:00.000Z' + }); + }); + + it('normalizes persisted integer flags into the public settings shape', async () => { + databaseRow.value = { + coming_soon_enabled: 0, + account_creation_enabled: 0, + news_enabled: 1, + database_enabled: 0, + builds_enabled: 1, + guides_enabled: 0, + builder_enabled: 1, + updated_at: '2026-08-01T12:30:00.000Z' + }; + + await expect(getSiteAccessSettings()).resolves.toEqual({ + comingSoonEnabled: false, + accountCreationEnabled: false, + sections: { + news: true, + database: false, + builds: true, + guides: false, + builder: true + }, + updatedAt: '2026-08-01T12:30:00.000Z' + }); + }); +}); diff --git a/src/lib/server/site-access.ts b/src/lib/server/site-access.ts new file mode 100644 index 0000000..ac0c79d --- /dev/null +++ b/src/lib/server/site-access.ts @@ -0,0 +1,85 @@ +import { getDatabase } from '$lib/server/database'; + +export const SITE_SECTION_KEYS = ['news', 'database', 'builds', 'guides', 'builder'] as const; +export type SiteSectionKey = (typeof SITE_SECTION_KEYS)[number]; +export type SiteAccessSettings = { + comingSoonEnabled: boolean; + accountCreationEnabled: boolean; + sections: Record; + updatedAt: string; +}; +export type SiteAccessBlock = + | { kind: 'launch' } + | { kind: 'section'; section: SiteSectionKey }; + +const DEFAULT_SETTINGS: SiteAccessSettings = { + comingSoonEnabled: true, + accountCreationEnabled: true, + sections: { news: true, database: true, builds: true, guides: true, builder: true }, + updatedAt: '2026-07-27T00:00:00.000Z' +}; + +let cached: { expiresAt: number; value: SiteAccessSettings } | null = null; + +function normalized(row: Record | undefined): SiteAccessSettings { + if (!row) return structuredClone(DEFAULT_SETTINGS); + return { + comingSoonEnabled: Boolean(row.coming_soon_enabled), + accountCreationEnabled: Boolean(row.account_creation_enabled), + sections: { + news: Boolean(row.news_enabled), + database: Boolean(row.database_enabled), + builds: Boolean(row.builds_enabled), + guides: Boolean(row.guides_enabled), + builder: Boolean(row.builder_enabled) + }, + updatedAt: String(row.updated_at ?? DEFAULT_SETTINGS.updatedAt) + }; +} + +export function invalidateSiteAccessSettings() { + cached = null; +} + +export async function getSiteAccessSettings() { + if (cached && cached.expiresAt > Date.now()) return cached.value; + const database = await getDatabase(); + const row = await (await database.prepare("SELECT * FROM site_launch_settings WHERE id='primary'")).get(); + const value = normalized(row); + cached = { value, expiresAt: Date.now() + 5_000 }; + return value; +} + +export function siteSectionForPath(pathname: string): SiteSectionKey | null { + for (const section of SITE_SECTION_KEYS) { + if (pathname === `/${section}` || pathname.startsWith(`/${section}/`)) return section; + } + return null; +} + +export function isLaunchGateExempt(pathname: string) { + return pathname === '/coming-soon' || + pathname === '/sign-in' || + pathname === '/terms' || + pathname === '/dmca' || + pathname === '/contact' || + pathname.startsWith('/auth/') || + pathname.startsWith('/api/health/') || + pathname.startsWith('/api/internal/') || + pathname.startsWith('/_app/') || + pathname === '/favicon.svg'; +} + +export function getSiteAccessBlock( + settings: SiteAccessSettings, + pathname: string, + authenticated: boolean +): SiteAccessBlock | null { + if (isLaunchGateExempt(pathname)) return null; + if (!authenticated && settings.comingSoonEnabled) return { kind: 'launch' }; + + const section = siteSectionForPath(pathname); + if (section && !settings.sections[section]) return { kind: 'section', section }; + + return null; +} diff --git a/src/routes/+layout.server.ts b/src/routes/+layout.server.ts index 09b289d..785a5f5 100644 --- a/src/routes/+layout.server.ts +++ b/src/routes/+layout.server.ts @@ -2,8 +2,14 @@ import { getSessionUser } from '$lib/server/auth/session'; import { hasPermission } from '$lib/server/auth/authorization'; import type { LayoutServerLoad } from './$types'; import { notificationSummary } from '$lib/server/notifications'; +import { getSiteAccessSettings } from '$lib/server/site-access'; export const load: LayoutServerLoad = async ({ cookies }) => { const user = await getSessionUser(cookies); - return { user, isacAccess: await hasPermission(user, 'isac.access'), notifications: user ? await notificationSummary(user.id) : { unread: 0 } }; + return { + user, + isacAccess: await hasPermission(user, 'isac.access'), + notifications: user ? await notificationSummary(user.id) : { unread: 0 }, + siteAccess: await getSiteAccessSettings() + }; }; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 613f537..3ed14aa 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -9,6 +9,7 @@ import '../app.css'; import AppShell from '$lib/components/AppShell.svelte'; import ToastViewport from '$lib/components/ToastViewport.svelte'; + import { page } from '$app/state'; let { data, children } = $props(); @@ -16,5 +17,9 @@ -{@render children()} +{#if page.url.pathname === '/coming-soon'} + {@render children()} +{:else} + {@render children()} +{/if} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 6e3d353..fd49fc6 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -5,10 +5,10 @@ { title: 'Status Protocol', author: 'SHD_Warden', mode: 'PVE', rating: 4.7, votes: 76, tags: ['Skill', 'Status', 'Support'], color: '#d36b5c' } ]; -SHD.build — The Division Resurgence Community +SHD.build — The Division Resurgence Data & Tools
-

THE DIVISION RESURGENCE COMMUNITY

CONNECT.
ADAPT. RISE.

Build stronger agents, learn from field-tested guides, explore the game database, follow Resurgence news, and share intelligence with the community.

BUILDLOADOUT LAB
LEARNFIELD GUIDES
TRACKDATA & NEWS
+

THE DIVISION RESURGENCE DATA & TOOLS

CONNECT.
ADAPT. RISE.

Build stronger agents, learn from field-tested guides, explore the game database, follow Resurgence news, and share intelligence with the community.

BUILDLOADOUT LAB
LEARNFIELD GUIDES
TRACKDATA & NEWS
COMMUNITY INTELLIGENCESHD // LIVE
SHD
{#each ['BUILDS','GUIDES','DATA','NEWS'] as label,i}{label}{['OPTIMIZE','LEARN','REFERENCE','UPDATES'][i]}{/each}
COMMUNITY // ONLINERESURGENCE INTELLIGENCE HUBBUILT FOR AGENTS
diff --git a/src/routes/auth/discord/callback/+server.ts b/src/routes/auth/discord/callback/+server.ts index 12510ef..7375e2d 100644 --- a/src/routes/auth/discord/callback/+server.ts +++ b/src/routes/auth/discord/callback/+server.ts @@ -7,6 +7,7 @@ import { redirect } from '@sveltejs/kit'; import { createHash, randomUUID, timingSafeEqual } from 'node:crypto'; import type { RequestHandler } from './$types'; import { triggerAutomatedSystemMessages } from '$lib/server/automated-messages'; +import { getSiteAccessSettings } from '$lib/server/site-access'; const STATE_COOKIE = 'shd_discord_oauth_state'; @@ -112,6 +113,9 @@ export const GET: RequestHandler = async ({ cookies, url, fetch, request, getCli let created = false; if (!user) { + if (!(await getSiteAccessSettings()).accountCreationEnabled) { + redirect(303, '/sign-in?oauth_error=registration_closed'); + } const username = await uniqueUsername(); const id = randomUUID(); const now = new Date().toISOString(); diff --git a/src/routes/coming-soon/+page.server.ts b/src/routes/coming-soon/+page.server.ts new file mode 100644 index 0000000..4a78f71 --- /dev/null +++ b/src/routes/coming-soon/+page.server.ts @@ -0,0 +1,17 @@ +import { getSessionUser } from '$lib/server/auth/session'; +import { getSiteAccessSettings, SITE_SECTION_KEYS } from '$lib/server/site-access'; +import { redirect } from '@sveltejs/kit'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ cookies, url }) => { + const user = await getSessionUser(cookies); + const settings = await getSiteAccessSettings(); + const unavailable = url.searchParams.get('unavailable'); + const unavailableSection = SITE_SECTION_KEYS.find((section) => section === unavailable) ?? null; + if (!user && !settings.comingSoonEnabled && !unavailableSection) redirect(303, '/'); + return { + settings, + authenticated: Boolean(user), + unavailable: unavailableSection + }; +}; diff --git a/src/routes/coming-soon/+page.svelte b/src/routes/coming-soon/+page.svelte new file mode 100644 index 0000000..fe03d09 --- /dev/null +++ b/src/routes/coming-soon/+page.svelte @@ -0,0 +1,78 @@ + + + + SHD.build — Network deployment in progress + + + + +
+ +
+ + + +
NETWORK STATUSDEPLOYMENT IN PROGRESS
+
+ +
+
+

THE DIVISION RESURGENCE DATA & TOOLS

+

INTELLIGENCE
IS COMING.

+

SHD.build is assembling a tactical home for Resurgence agents—loadout engineering, field guides, game data, community builds, and mission-ready intelligence in one network.

+ {#if data.unavailable} +

{data.unavailable.toUpperCase()} CHANNEL OFFLINEThis section is offline for all agents while deployment continues. Use an available channel or return later.

+ {/if} + +

{data.settings.accountCreationEnabled ? 'NEW AGENT REGISTRATION IS CURRENTLY OPEN.' : 'SIGN-IN IS LIMITED TO EXISTING AGENT IDENTITIES.'}

+
+ +
+
+
+
+
+
+
+ {#each channels.slice(0, 4) as channel, index} +
{channel.label}
+ {/each} +
+
ISAC NODE // NYC-01COMMUNITY UPLINK INITIALIZINGSECURE ACCESS AVAILABLE
+
+
+ +
+

DEPLOYMENT MANIFEST

WHAT’S ENTERING THE NETWORK

{channels.length.toString().padStart(2, '0')} CHANNELS
+
+ {#each channels as channel, index} +
+ {String(index + 1).padStart(2, '0')} // {channel.label} +

{channel.detail}

+ {data.settings.sections[channel.key] ? 'STAGED' : 'IN DEVELOPMENT'} +
+ {/each} +
+
+ + +
diff --git a/src/routes/dmca/+page.svelte b/src/routes/dmca/+page.svelte index c494a15..caca49b 100644 --- a/src/routes/dmca/+page.svelte +++ b/src/routes/dmca/+page.svelte @@ -1,21 +1,21 @@ - DMCA & Copyright Policy — SHD.build + DMCA & Copyright Policy | SHD.build
- +
diff --git a/src/routes/isac/+layout.svelte b/src/routes/isac/+layout.svelte index 311e11e..86dc0cd 100644 --- a/src/routes/isac/+layout.svelte +++ b/src/routes/isac/+layout.svelte @@ -40,6 +40,7 @@ ]; const visibleOversightSections = $derived(oversightSections.filter((section) => can(section.permission))); const systemSections = [ + { href: '/isac/site-controls', label: 'Site controls', permission: 'site.settings.manage' }, { href: '/isac/images', label: 'Image library', permission: 'images.manage' }, { href: '/isac/system-messages', label: 'Automated messages', permission: 'system.notifications.manage' }, { href: '/isac/metrics', label: 'System metrics', permission: 'metrics.view' } diff --git a/src/routes/isac/+page.server.ts b/src/routes/isac/+page.server.ts index ce21474..672f1eb 100644 --- a/src/routes/isac/+page.server.ts +++ b/src/routes/isac/+page.server.ts @@ -9,6 +9,7 @@ export const load: PageServerLoad = async ({ cookies }) => { if (permissions.includes('users.roles')) redirect(303, '/isac/roles'); if (permissions.includes('*') || ['data.view','data.manage','data.propose','data.approve'].some((permission) => permissions.includes(permission))) redirect(303, '/isac/configuration'); if (permissions.includes('audit.view')) redirect(303, '/isac/audit'); + if (permissions.includes('site.settings.manage')) redirect(303, '/isac/site-controls'); if (permissions.includes('images.manage')) redirect(303, '/isac/images'); if (permissions.includes('system.notifications.manage')) redirect(303, '/isac/system-messages'); if (permissions.includes('metrics.view')) redirect(303, '/isac/metrics'); diff --git a/src/routes/isac/roles/+page.server.ts b/src/routes/isac/roles/+page.server.ts index 90ca63d..21a6156 100644 --- a/src/routes/isac/roles/+page.server.ts +++ b/src/routes/isac/roles/+page.server.ts @@ -30,10 +30,15 @@ export const load: PageServerLoad = async ({ cookies, url }) => { } }, 'name'); const permissionPrefix = filter === 'isac' ? 'isac.%' : filter === 'data' ? 'data.%' : filter === 'users' ? 'users.%' : filter === 'audit' ? 'audit.%' : filter === 'system' ? 'system.%' : ''; + const relatedPermissionFilter = filter === 'data' + ? " OR p.name LIKE 'calculation.%'" + : filter === 'system' + ? " OR p.name LIKE 'site.%' OR p.name LIKE 'metrics.%' OR p.name LIKE 'images.%'" + : ''; const conditions = [ ...(permissionPrefix ? [`EXISTS ( SELECT 1 FROM role_permissions rp JOIN permissions p ON p.id=rp.permission_id - WHERE rp.role_id=roles.id AND (p.name LIKE ?${filter === 'data' ? " OR p.name LIKE 'calculation.%'" : ''}) + WHERE rp.role_id=roles.id AND (p.name LIKE ?${relatedPermissionFilter}) )`] : []), ...(search ? ["roles.name LIKE ? ESCAPE '\\' COLLATE NOCASE"] : []) ]; @@ -45,7 +50,7 @@ export const load: PageServerLoad = async ({ cookies, url }) => { SUM(CASE WHEN EXISTS (SELECT 1 FROM role_permissions rp JOIN permissions p ON p.id=rp.permission_id WHERE rp.role_id=roles.id AND (p.name LIKE 'data.%' OR p.name LIKE 'calculation.%')) THEN 1 ELSE 0 END) AS data, SUM(CASE WHEN EXISTS (SELECT 1 FROM role_permissions rp JOIN permissions p ON p.id=rp.permission_id WHERE rp.role_id=roles.id AND p.name LIKE 'users.%') THEN 1 ELSE 0 END) AS users, SUM(CASE WHEN EXISTS (SELECT 1 FROM role_permissions rp JOIN permissions p ON p.id=rp.permission_id WHERE rp.role_id=roles.id AND p.name LIKE 'audit.%') THEN 1 ELSE 0 END) AS audit - ,SUM(CASE WHEN EXISTS (SELECT 1 FROM role_permissions rp JOIN permissions p ON p.id=rp.permission_id WHERE rp.role_id=roles.id AND p.name LIKE 'system.%') THEN 1 ELSE 0 END) AS system + ,SUM(CASE WHEN EXISTS (SELECT 1 FROM role_permissions rp JOIN permissions p ON p.id=rp.permission_id WHERE rp.role_id=roles.id AND (p.name LIKE 'system.%' OR p.name LIKE 'site.%' OR p.name LIKE 'metrics.%' OR p.name LIKE 'images.%')) THEN 1 ELSE 0 END) AS system FROM roles`)).get(), (await database.prepare(`SELECT COUNT(*) AS total FROM roles ${where}`)).get(...filterArgs), (await database.prepare(`SELECT id,name,description FROM permissions diff --git a/src/routes/isac/site-controls/+page.server.ts b/src/routes/isac/site-controls/+page.server.ts new file mode 100644 index 0000000..793177a --- /dev/null +++ b/src/routes/isac/site-controls/+page.server.ts @@ -0,0 +1,83 @@ +import { randomUUID } from 'node:crypto'; +import { fail, error } from '@sveltejs/kit'; +import { requirePermission } from '$lib/server/auth/authorization'; +import { getSessionUser } from '$lib/server/auth/session'; +import { getDatabase } from '$lib/server/database'; +import { recordIsacAudit } from '$lib/server/audit'; +import { invalidateSiteAccessSettings } from '$lib/server/site-access'; +import type { Actions, PageServerLoad } from './$types'; + +const SETTINGS_ID = 'primary'; +const CONFIRMATION = 'apply-site-access-settings'; + +const settingSnapshot = async () => { + const database = await getDatabase(); + return await (await database.prepare( + 'SELECT * FROM site_launch_settings WHERE id=?' + )).get(SETTINGS_ID) ?? null; +}; + +const flagNames = [ + 'comingSoonEnabled', 'accountCreationEnabled', 'newsEnabled', 'databaseEnabled', + 'buildsEnabled', 'guidesEnabled', 'builderEnabled' +] as const; + +const enabled = (form: FormData, name: (typeof flagNames)[number]) => + String(form.get(name)) === '1' ? 1 : 0; + +export const load: PageServerLoad = async ({ cookies }) => { + await requirePermission(await getSessionUser(cookies), 'site.settings.manage'); + const database = await getDatabase(); + const settings = await (await database.prepare(`SELECT settings.*, + COALESCE(profile.display_name,user.username) AS updated_by_name + FROM site_launch_settings settings + LEFT JOIN users user ON user.id=settings.updated_by + LEFT JOIN user_profiles profile ON profile.user_id=user.id + WHERE settings.id=?`)).get(SETTINGS_ID); + if (!settings) error(500, 'Site launch settings are not initialized.'); + return { settings }; +}; + +export const actions: Actions = { + save: async ({ cookies, request }) => { + const operator = await requirePermission(await getSessionUser(cookies), 'site.settings.manage'); + const form = await request.formData(); + if (String(form.get('confirmation') ?? '') !== CONFIRMATION) { + return fail(400, { siteSettingsError: 'Review and confirm the complete site access profile before applying it.' }); + } + if (flagNames.some((name) => !['0', '1'].includes(String(form.get(name))))) { + return fail(400, { siteSettingsError: 'Every site access control must have an explicit enabled or disabled state.' }); + } + const before = await settingSnapshot(); + if (!before) return fail(404, { siteSettingsError: 'Site launch settings are not initialized.' }); + const next = { + comingSoonEnabled: enabled(form, 'comingSoonEnabled'), + accountCreationEnabled: enabled(form, 'accountCreationEnabled'), + newsEnabled: enabled(form, 'newsEnabled'), + databaseEnabled: enabled(form, 'databaseEnabled'), + buildsEnabled: enabled(form, 'buildsEnabled'), + guidesEnabled: enabled(form, 'guidesEnabled'), + builderEnabled: enabled(form, 'builderEnabled') + }; + const database = await getDatabase(); + const updatedAt = new Date().toISOString(); + await (await database.prepare(`UPDATE site_launch_settings SET + coming_soon_enabled=?,account_creation_enabled=?,news_enabled=?,database_enabled=?, + builds_enabled=?,guides_enabled=?,builder_enabled=?,updated_at=?,updated_by=? + WHERE id=?`)).run( + next.comingSoonEnabled, next.accountCreationEnabled, next.newsEnabled, next.databaseEnabled, + next.buildsEnabled, next.guidesEnabled, next.builderEnabled, updatedAt, operator.id, SETTINGS_ID + ); + invalidateSiteAccessSettings(); + const after = await settingSnapshot(); + await recordIsacAudit({ + actorId: operator.id, + category: 'system_configuration', + action: 'site_access.updated', + entityId: SETTINGS_ID, + before, + after + }); + return { siteSettingsSaved: true, resultToken: randomUUID() }; + } +}; diff --git a/src/routes/isac/site-controls/+page.svelte b/src/routes/isac/site-controls/+page.svelte new file mode 100644 index 0000000..04b56b8 --- /dev/null +++ b/src/routes/isac/site-controls/+page.svelte @@ -0,0 +1,163 @@ + + +Site controls — ISAC + +
+
+

SYSTEM CONFIGURATION / RELEASE CONTROL

+

SITE CONTROLS

+

Coordinate public launch state, account registration, and access to major SHD.build sections.

+
+
+ NETWORK STATE + {comingSoonEnabled === '1' ? 'COMING SOON' : 'PUBLIC'} + LAST UPDATED {date(data.settings.updated_at)} +
+
+ +
+
+
01 / LAUNCH GATE

PUBLIC NETWORK STATE

{comingSoonEnabled === '1' ? 'GATED' : 'LIVE'}
+

The Coming Soon gate takes priority over individual sections for signed-out visitors. Signed-in agents bypass the launch gate, but section availability still applies.

+ +
+ + + +
+
03 / PUBLIC SECTIONS

SECTION AVAILABILITY

{sectionDefinitions.filter((section) => sectionValues[section.key] === '1').length} / {sectionDefinitions.length} ONLINE
+

Section controls apply after the Launch Gate. Disabled sections disappear from navigation and reject direct access and mutations for every agent.

+
+ {#each sectionDefinitions as section} +
+
{section.label}{section.description}
+ +
+ {/each} +
+
+
+ +{#if form?.siteSettingsError}

{form.siteSettingsError}

{/if} +
+
CHANGE SET{changes.length ? `${changes.length} PENDING` : 'SYNCHRONIZED'}UPDATED BY {data.settings.updated_by_name ?? 'SYSTEM BOOTSTRAP'}
+
+ PREVIEW PAGE ↗ + +
+
+ +{#if reviewing} + +{/if} + + diff --git a/src/routes/sign-in/+page.server.ts b/src/routes/sign-in/+page.server.ts index eb56fe7..13b41c7 100644 --- a/src/routes/sign-in/+page.server.ts +++ b/src/routes/sign-in/+page.server.ts @@ -8,15 +8,23 @@ import { fail, redirect } from '@sveltejs/kit'; import { randomUUID } from 'node:crypto'; import type { Actions, PageServerLoad } from './$types'; import { triggerAutomatedSystemMessages } from '$lib/server/automated-messages'; +import { getSiteAccessSettings } from '$lib/server/site-access'; -export const load: PageServerLoad = async ({ url }) => ({ - emailDeliveryConfigured: emailDeliveryConfigured(), - magicLinkSent: url.searchParams.has('magic_sent'), - magicError: url.searchParams.get('magic_error') === 'unavailable' - ? 'This account is not permitted to sign in.' - : url.searchParams.has('magic_error') ? 'That sign-in link is invalid or expired.' : null, - oauthError: url.searchParams.has('oauth_error') ? 'Discord sign-in could not be completed.' : null -}); +export const load: PageServerLoad = async ({ url }) => { + const { accountCreationEnabled } = await getSiteAccessSettings(); + const oauthError = url.searchParams.get('oauth_error'); + return { + accountCreationEnabled, + emailDeliveryConfigured: emailDeliveryConfigured(), + magicLinkSent: url.searchParams.has('magic_sent'), + magicError: url.searchParams.get('magic_error') === 'unavailable' + ? 'This account is not permitted to sign in.' + : url.searchParams.has('magic_error') ? 'That sign-in link is invalid or expired.' : null, + oauthError: oauthError === 'registration_closed' + ? 'New account registration is currently closed. Existing Discord-linked agents can still sign in.' + : oauthError ? 'Discord sign-in could not be completed.' : null + }; +}; export const actions: Actions = { magicLink: async ({ request }) => { @@ -38,6 +46,12 @@ export const actions: Actions = { purpose = 'verify_email'; } if (!identity?.user_id) { + if (!(await getSiteAccessSettings()).accountCreationEnabled) { + return fail(403, { + magicLinkError: 'New account registration is currently closed. Enter an email already linked to an agent account.', + email + }); + } const id = randomUUID(), now = new Date().toISOString(); await (await database.prepare('INSERT INTO users(id,username,role,created_at) VALUES(?,?,?,?)')) .run(id, `agent_${id.replaceAll('-', '').slice(0, 16)}`, 'user', now); @@ -56,6 +70,13 @@ export const actions: Actions = { return { magicLinkSent: true }; }, register: async ({ request, cookies, getClientAddress }) => { + if (!(await getSiteAccessSettings()).accountCreationEnabled) { + return fail(403, { + registerError: 'New account registration is currently closed.', + registerDisplayName: '', + registerUsername: '' + }); + } const form = await request.formData(); const displayName = String(form.get('displayName') ?? '').normalize('NFKC').trim(); const username = String(form.get('username') ?? '').normalize('NFKC').trim(); diff --git a/src/routes/sign-in/+page.svelte b/src/routes/sign-in/+page.svelte index 72b68c0..9723be0 100644 --- a/src/routes/sign-in/+page.svelte +++ b/src/routes/sign-in/+page.svelte @@ -10,9 +10,12 @@ let passwordMode = $state<'signin' | 'create'>('signin'); let passwordPanelOpen = $state(false); $effect(() => { - if (form?.registerError) { + if (form?.registerError && data.accountCreationEnabled) { passwordMode = 'create'; passwordPanelOpen = true; + } else if (form?.registerError) { + passwordMode = 'signin'; + passwordPanelOpen = true; } else if (form?.loginError) { passwordMode = 'signin'; passwordPanelOpen = true; @@ -50,12 +53,13 @@ Sign in — SHD.build

SHD COMMUNITY IDENTITY

AGENT
ACCESS.

Authenticate to publish builds and guides, contribute game data, join discussions, and keep your SHD intelligence synchronized.

NETWORK ONLINENODE NYC-01
SECURE SIGN-INSHD // AUTH
-

Sign in to an existing account or create one with email, Discord, or local credentials.

+

{data.accountCreationEnabled ? 'Sign in to an existing account or create one with email, Discord, or local credentials.' : 'Sign in to an existing agent account with a configured authentication method.'}

+ {#if !data.accountCreationEnabled}{/if} {#if !passkeySupported}

This browser does not support passkeys.

{/if} {#if passkeyError}

{passkeyError}

{/if}
OR EMAIL A ONE-TIME LINK
- {#if form?.magicLinkError}

{form.magicLinkError}

{/if}{#if form?.magicLinkSent || data.magicLinkSent}

Your one-time access link is on its way.

{/if}{#if data.magicError}

{data.magicError}

{/if}A verified link signs you in, or creates your SHD.build account if this email is new.
+ {#if form?.magicLinkError}

{form.magicLinkError}

{/if}{#if form?.magicLinkSent || data.magicLinkSent}

Your one-time access link is on its way.

{/if}{#if data.magicError}

{data.magicError}

{/if}{data.accountCreationEnabled ? 'A verified link signs you in, or creates your SHD.build account if this email is new.' : 'Email access is available only to addresses already linked to an agent account.'}
OR CONTINUE WITH
diff --git a/static/brand/shd-build-discord-banner-1920x1080.png b/static/brand/shd-build-discord-banner-1920x1080.png new file mode 100644 index 0000000..1084148 Binary files /dev/null and b/static/brand/shd-build-discord-banner-1920x1080.png differ diff --git a/static/brand/shd-build-discord-banner-960x540.png b/static/brand/shd-build-discord-banner-960x540.png new file mode 100644 index 0000000..e698b82 Binary files /dev/null and b/static/brand/shd-build-discord-banner-960x540.png differ diff --git a/static/brand/shd-build-discord-icon.png b/static/brand/shd-build-discord-icon.png new file mode 100644 index 0000000..0fb6b2a Binary files /dev/null and b/static/brand/shd-build-discord-icon.png differ diff --git a/static/brand/shd-build-discord-invite-background-1920x1080.png b/static/brand/shd-build-discord-invite-background-1920x1080.png new file mode 100644 index 0000000..2837b34 Binary files /dev/null and b/static/brand/shd-build-discord-invite-background-1920x1080.png differ diff --git a/static/brand/shd-core-segments.png b/static/brand/shd-core-segments.png new file mode 100644 index 0000000..caa2317 Binary files /dev/null and b/static/brand/shd-core-segments.png differ diff --git a/static/brand/shd-core-segments.svg b/static/brand/shd-core-segments.svg new file mode 100644 index 0000000..88c071a --- /dev/null +++ b/static/brand/shd-core-segments.svg @@ -0,0 +1,10 @@ + + SHD.build Core Segments emblem + + + + + + + + diff --git a/static/favicon.svg b/static/favicon.svg index c766a62..94df0d8 100644 --- a/static/favicon.svg +++ b/static/favicon.svg @@ -1,9 +1,13 @@ - - - - - - - - SHD + + SHD.build + + + + + + + + + +