/* ==========================================================================
   Arma Tactical — main stylesheet
   ========================================================================== */

:root {
	--bg: #090b0e;
	--panel: #11141a;
	--panel-2: #151922;
	--line: #1e232d;
	--line-2: #2a3140;
	--head: #f8fafc;
	--text: #94a3b8;
	--muted: #64748b;
	--accent: #c8a96e;
	--accent-rgb: 200, 169, 110;
	--accent-soft: rgba(200, 169, 110, .12);
	--accent-line: rgba(200, 169, 110, .35);
	--live: #10b981;
	--live-soft: rgba(16, 185, 129, .12);
	--radius: 3px;
	--max: 1280px;
	--gutter: clamp(16px, 4vw, 32px);
	--logo-h: 44px;
	--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--header-h: 72px;
	/* Shared aliases consumed by the arma-milsim-core plugin */
	--bg-primary: var(--bg);
	--bg-card: var(--panel);
	--border-subtle: var(--line);
	--text-primary: var(--head);
	--text-muted: var(--text);
	--font-mono: var(--mono);
	--font-sans: var(--font);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--head); }
h1, h2, h3, h4, h5, h6 { color: var(--head); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.at-skip { position: absolute; left: -9999px; top: 8px; z-index: 1000; background: var(--accent); color: var(--bg); padding: 8px 14px; border-radius: var(--radius); font-weight: 600; }
.at-skip:focus { left: 8px; }
.at-main:focus { outline: none; }

.at-container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.at-mono { font-family: var(--mono); letter-spacing: .04em; }
.at-accent { color: var(--accent); }

/* ---------- Live dot / tags ---------- */
.at-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); animation: at-pulse 2.2s infinite; flex: none; }
@keyframes at-pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.55); } 70% { box-shadow: 0 0 0 7px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
@media (prefers-reduced-motion: reduce) { .at-live-dot { animation: none; } html { scroll-behavior: auto; } }

.at-tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .12em; padding: 4px 8px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); border-radius: var(--radius); white-space: nowrap; line-height: 1; }
.at-tag__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.at-tag--live { color: var(--live); border-color: rgba(16,185,129,.35); background: var(--live-soft); }
.at-tag--muted { color: var(--muted); border-color: var(--line-2); background: transparent; }

/* ---------- Buttons ---------- */
.at-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font); font-size: 14px; font-weight: 600; line-height: 1; padding: 11px 18px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s; white-space: nowrap; }
.at-btn--primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.at-btn--primary:hover { background: var(--head); border-color: var(--head); color: var(--bg); }
.at-btn--ghost { background: rgba(17,20,26,.6); color: var(--head); border-color: var(--line-2); }
.at-btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.at-btn--outline { background: transparent; color: var(--accent); border-color: var(--accent-line); }
.at-btn--outline:hover { background: var(--accent-soft); color: var(--head); border-color: var(--accent); }
.at-btn--discord { background: var(--panel); color: var(--head); border-color: var(--line-2); }
.at-btn--discord:hover { border-color: var(--accent); color: var(--accent); }
.at-btn--lg { padding: 15px 24px; font-size: 15px; }
.at-btn--block { width: 100%; }
.at-btn__icon { display: inline-flex; }

/* ---------- Cards & bracket accents ---------- */
.at-card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.at-bracket::before { content: ""; position: absolute; inset: -1px; pointer-events: none; z-index: 2; border-radius: var(--radius);
	background:
		linear-gradient(var(--accent), var(--accent)) top left / 14px 1px no-repeat,
		linear-gradient(var(--accent), var(--accent)) top left / 1px 14px no-repeat,
		linear-gradient(var(--accent), var(--accent)) top right / 14px 1px no-repeat,
		linear-gradient(var(--accent), var(--accent)) top right / 1px 14px no-repeat,
		linear-gradient(var(--accent), var(--accent)) bottom left / 14px 1px no-repeat,
		linear-gradient(var(--accent), var(--accent)) bottom left / 1px 14px no-repeat,
		linear-gradient(var(--accent), var(--accent)) bottom right / 14px 1px no-repeat,
		linear-gradient(var(--accent), var(--accent)) bottom right / 1px 14px no-repeat;
}

/* ---------- Kicker / section heads ---------- */
.at-kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
.at-kicker a { color: inherit; }
.at-kicker__idx { color: var(--bg); background: var(--accent); padding: 3px 6px; border-radius: 2px; letter-spacing: .06em; }
.at-section { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--line); }
.at-section--alt { background: linear-gradient(180deg, #0b0d11 0%, var(--bg) 100%); }
.at-section__head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.at-section__title { font-size: clamp(28px, 4vw, 44px); font-weight: 800; }
.at-section__intro { font-size: 17px; max-width: 640px; }

/* ---------- Telemetry bar ---------- */
.at-telemetry { background: #06080a; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--text); }
.at-telemetry__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.at-telemetry__status { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-telemetry__status .at-mono { overflow: hidden; text-overflow: ellipsis; }
.at-telemetry__right { display: flex; align-items: center; gap: 18px; }
.at-telemetry__clock { color: var(--muted); }
.at-telemetry__link { color: var(--accent); }

/* ---------- Header / nav ---------- */
/* v1.3.4: the frosted glass lives on ::before, NOT on .at-header itself. backdrop-filter on the header made it
   the containing block + clip box of the mobile drawer (position: fixed children are positioned/clipped by it in
   WebKit/Blink), which is why the drawer never appeared on phones. */
.at-header { position: sticky; top: 0; z-index: 100; overflow-x: clip; background: transparent; border-bottom: 1px solid var(--line); transition: box-shadow .3s ease, border-color .3s ease; }
.at-header::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: rgba(9, 11, 14, .72); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); transition: background .3s ease; }
.admin-bar .at-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .at-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .at-header { top: 0; } }
.at-header.is-scrolled { box-shadow: 0 10px 30px -12px rgba(0,0,0,.7); }
.at-header.is-scrolled::before { background: rgba(9, 11, 14, .92); }
.at-header__inner { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }

.at-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--head); flex: none; }
.at-brand:hover { color: var(--head); }
.at-brand__logo { max-height: var(--logo-h); width: auto; }
.at-brand__mark { color: var(--accent); width: calc(var(--logo-h) * .9); height: calc(var(--logo-h) * .9); display: inline-flex; }
.at-brand__mark svg { width: 100%; height: 100%; }
.at-brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.at-brand__name { font-weight: 800; font-size: 18px; letter-spacing: .02em; text-transform: uppercase; }
.at-brand__sub { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--muted); margin-top: 3px; }

.at-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex: 1; }
.at-menu, .at-menu ul { list-style: none; margin: 0; padding: 0; }
.at-menu { display: flex; align-items: center; gap: 2px; }
.at-menu > li { position: relative; display: flex; align-items: center; }
.at-menu a { display: block; color: var(--text); font-size: 14px; font-weight: 500; padding: 10px 12px; border-radius: var(--radius); }
.at-menu > li > a:hover, .at-menu > li:hover > a, .at-menu > .current-menu-item > a, .at-menu > .current-menu-ancestor > a { color: var(--head); }
.at-menu > .current-menu-item > a, .at-menu > .current-menu-ancestor > a { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.at-sub-toggle { background: none; border: 0; color: var(--muted); padding: 6px 4px; margin-left: -8px; cursor: pointer; display: inline-flex; }
.at-sub-toggle:hover { color: var(--accent); }
.at-menu .sub-menu { position: absolute; top: 100%; left: 0; min-width: 230px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 48px -16px rgba(0,0,0,.8); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 20; }
.at-menu .sub-menu::before { content: ""; position: absolute; top: -1px; left: 12px; width: 28px; height: 1px; background: var(--accent); }
.at-menu .sub-menu .sub-menu { top: -9px; left: 100%; }
.at-menu li:hover > .sub-menu, .at-menu li:focus-within > .sub-menu, .at-menu li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.at-menu .sub-menu a { padding: 9px 12px; font-size: 13.5px; }
.at-menu .sub-menu a:hover, .at-menu .sub-menu .current-menu-item > a { background: var(--accent-soft); color: var(--head); }

.at-nav__actions { display: flex; align-items: center; gap: 10px; }

/* Member badge */
.at-member { position: relative; }
.at-member__badge { display: inline-flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 5px 10px 5px 5px; color: var(--head); cursor: pointer; font: inherit; }
.at-member__badge:hover, .at-member.is-open .at-member__badge { border-color: var(--accent-line); }
.at-member__avatar { width: 28px; height: 28px; border-radius: 2px; object-fit: cover; }
.at-member__id { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.at-member__rank { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--accent); text-transform: uppercase; }
.at-member__callsign { font-size: 13px; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-caret { color: var(--muted); }
.at-member__menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; list-style: none; margin: 0; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 48px -16px rgba(0,0,0,.8); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 30; }
.at-member.is-open .at-member__menu, .at-member:focus-within .at-member__menu { opacity: 1; visibility: visible; transform: none; }
.at-member__menu a { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 13.5px; padding: 9px 10px; border-radius: var(--radius); }
.at-member__menu a:hover { background: var(--accent-soft); color: var(--head); }
.at-member__menu .at-mono { font-size: 10px; color: var(--accent); width: 28px; }
.at-member__sep { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }

/* Mobile toggle */
.at-nav-toggle { display: none; margin-left: auto; width: 44px; height: 40px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer; position: relative; }
.at-nav-toggle__bars, .at-nav-toggle__bars::before, .at-nav-toggle__bars::after { content: ""; position: absolute; left: 12px; right: 12px; height: 2px; background: var(--head); transition: transform .2s, opacity .2s; }
.at-nav-toggle__bars { top: 50%; margin-top: -1px; }
.at-nav-toggle__bars::before { left: 0; right: 0; top: -6px; }
.at-nav-toggle__bars::after { left: 0; right: 0; top: 6px; }
.at-nav-toggle[aria-expanded="true"] .at-nav-toggle__bars { background: transparent; }
.at-nav-toggle[aria-expanded="true"] .at-nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.at-nav-toggle[aria-expanded="true"] .at-nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1100px) {
	/* Mobile drawer (v1.3.4): fixed to the viewport, outside every clip/backdrop parent, under the header bar. */
	.at-header { overflow: visible; }
	body.at-nav-open .at-header { z-index: 99998; } /* lift the header's stacking context above all page content */
	.at-nav-toggle { display: block; position: relative; z-index: 2; touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
	.at-nav-toggle__bars { pointer-events: none; }
	.at-nav { position: fixed; inset: 0; top: var(--at-drawer-top, var(--header-h)); z-index: 99999; height: auto; background: var(--bg); flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 16px var(--gutter) calc(96px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; border-top: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translate3d(100%, 0, 0); transition: transform .32s cubic-bezier(.4, 0, .2, 1), opacity .24s ease, visibility 0s linear .32s; pointer-events: none; }
	.at-nav.is-open { opacity: 1; visibility: visible; transform: translateX(0); pointer-events: auto; transition: transform .32s cubic-bezier(.2, .8, .2, 1), opacity .2s ease, visibility 0s linear 0s; }
	.at-menu { flex-direction: column; align-items: stretch; }
	.at-menu > li { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
	.at-menu > li > a { flex: 1; padding: 14px 4px; font-size: 16px; }
	.at-sub-toggle { margin-left: 0; padding: 14px; }
	.at-menu .sub-menu, .at-menu .sub-menu .sub-menu { position: static; width: 100%; opacity: 1; visibility: visible; transform: none; display: none; box-shadow: none; border: 0; border-left: 1px solid var(--accent-line); border-radius: 0; margin: 0 0 12px 4px; padding: 0 0 0 8px; background: transparent; }
	.at-menu .sub-menu::before { display: none; }
	.at-menu li.is-open > .sub-menu { display: block; }
	.at-nav__actions { flex-direction: column; align-items: stretch; margin-top: 20px; }
	.at-nav__actions .at-btn { width: 100%; padding: 14px; }
	.at-member__badge { width: 100%; }
	.at-member__menu { position: static; opacity: 1; visibility: visible; transform: none; display: none; margin-top: 8px; box-shadow: none; }
	.at-member.is-open .at-member__menu { display: block; }
	html.at-nav-open, body.at-nav-open { overflow: hidden; } /* scroll lock while the drawer is open */
}
@media (max-width: 640px) {
	.at-telemetry__clock { display: none; }
	.at-telemetry__status .at-mono { font-size: 10.5px; }
}

/* ---------- Hero ---------- */
.at-hero { position: relative; overflow: hidden; background: radial-gradient(ellipse 80% 60% at 70% 10%, rgba(var(--accent-rgb), .08), transparent 60%), var(--bg); }
.at-hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: var(--banner-opacity, .28); filter: grayscale(.35) contrast(1.05); }
.at-hero.has-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9,11,14,.96) 0%, rgba(9,11,14,.78) 45%, rgba(9,11,14,.55) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 40%); pointer-events: none; }
.at-hero__grid { position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background-image: linear-gradient(rgba(148,163,184,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.07) 1px, transparent 1px), linear-gradient(rgba(148,163,184,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.035) 1px, transparent 1px);
	background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
	-webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 40%, transparent 100%); mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 40%, transparent 100%); }
.at-hero__inner { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .9fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding-top: clamp(56px, 9vw, 120px); padding-bottom: clamp(48px, 7vw, 88px); }
.at-hero__ident { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.at-hero__ident .at-kicker { margin: 0; }
.at-hero__crest { width: clamp(84px, 10vw, 120px); height: clamp(84px, 10vw, 120px); display: flex; align-items: center; justify-content: center; color: var(--accent); filter: drop-shadow(0 10px 30px rgba(0,0,0,.6)); }
.at-hero__crest img, .at-hero__crest svg { width: 100%; height: 100%; object-fit: contain; }
.at-hero__title { font-size: clamp(48px, 9vw, 104px); font-weight: 800; letter-spacing: -.04em; line-height: .92; text-transform: uppercase; margin-bottom: 18px; }
.at-hero__motto { font-family: var(--mono); font-size: clamp(13px, 1.5vw, 16px); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.at-hero__motto::before { content: "> "; color: var(--muted); }
.at-hero__lead { font-size: clamp(16px, 1.6vw, 19px); max-width: 600px; color: #b4c0d0; }
.at-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

/* Op card */
.at-opcard { padding: 26px; background: rgba(17, 20, 26, .86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.at-opcard__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px dashed var(--line-2); }
.at-opcard__label { font-size: 11px; color: var(--muted); letter-spacing: .14em; }
.at-opcard__title { font-size: 24px; margin-bottom: 16px; }
.at-opcard__meta { display: grid; gap: 10px; margin: 0 0 16px; }
.at-opcard__meta div { display: grid; grid-template-columns: 84px 1fr; gap: 10px; align-items: baseline; }
.at-opcard__meta dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; color: var(--muted); }
.at-opcard__meta dd { margin: 0; color: var(--head); font-size: 13.5px; }
.at-opcard__brief { font-size: 14.5px; margin-bottom: 20px; }

/* Readiness strip */
.at-readiness { position: relative; z-index: 3; border-top: 1px solid var(--line); background: rgba(9, 11, 14, .82); }
.at-readiness__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.at-readiness__item { display: flex; flex-direction: column; gap: 4px; padding: 22px 20px; border-left: 1px solid var(--line); }
.at-readiness__item:last-child { border-right: 1px solid var(--line); }
.at-readiness__value { font-size: clamp(20px, 2.4vw, 28px); font-weight: 800; color: var(--head); letter-spacing: -.02em; }
.at-readiness__label { font-size: 10.5px; letter-spacing: .16em; color: var(--muted); }

@media (max-width: 960px) {
	.at-hero__inner { grid-template-columns: 1fr; }
	.at-readiness__list { grid-template-columns: repeat(2, 1fr); }
	.at-readiness__item { border-bottom: 1px solid var(--line); }
	.at-readiness__item:last-child { border-right: 0; }
}
@media (max-width: 480px) { .at-readiness__item { padding: 16px 14px; } .at-readiness__item:last-child { grid-column: 1 / -1; } }

/* ---------- Overview ---------- */
.at-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.at-imgcard { margin: 0; padding: 10px; position: sticky; top: calc(var(--header-h) + 24px); }
.at-imgcard__frame { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; background: var(--panel-2); }
.at-imgcard__frame img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }
.at-imgcard__empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--line-2); background-image: linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px); background-size: 24px 24px; }
.at-imgcard__empty .at-mono { font-size: 11px; color: var(--muted); letter-spacing: .14em; text-align: center; padding: 0 16px; }
.at-imgcard__svg { width: 96px; height: 96px; color: var(--line-2); }
.at-imgcard__cap { display: flex; justify-content: space-between; gap: 12px; padding: 12px 6px 4px; font-size: 11px; color: var(--muted); letter-spacing: .12em; }
.at-imgcard__cap span:first-child { color: var(--accent); }

.at-pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 36px; }
.at-pillar { background: var(--panel); padding: 24px; }
.at-pillar__idx { font-size: 10.5px; color: var(--accent); letter-spacing: .16em; }
.at-pillar__title { font-size: 18px; margin: 10px 0 8px; }
.at-pillar p { font-size: 14.5px; margin: 0; }
@media (max-width: 960px) { .at-overview { grid-template-columns: 1fr; } .at-imgcard { position: static; } .at-imgcard__frame { aspect-ratio: 16 / 10; } }
@media (max-width: 560px) { .at-pillars { grid-template-columns: 1fr; } }

/* ---------- Standards ---------- */
.at-standards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.at-standard { padding: 28px; transition: border-color .2s, transform .2s; }
.at-standard:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.at-standard__num { display: block; font-size: 32px; font-weight: 700; color: transparent; -webkit-text-stroke: 1px var(--accent); letter-spacing: 0; margin-bottom: 18px; }
.at-standard__title { font-size: 19px; }
.at-standard p { font-size: 14.5px; margin: 0; }
@media (max-width: 960px) { .at-standards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .at-standards { grid-template-columns: 1fr; } }

/* ---------- Branches ---------- */
.at-branches { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.at-branch { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.at-branch__head { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; }
.at-branch__emblem { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--accent); padding: 6px; }
.at-branch__emblem img, .at-branch__svg { width: 100%; height: 100%; object-fit: contain; }
.at-branch__code { font-size: 10.5px; color: var(--accent); letter-spacing: .16em; }
.at-branch__name { font-size: 19px; margin: 2px 0 0; }
.at-branch__role { font-size: 14.5px; margin: 0; flex: 1; }
.at-branch__ranks { font-size: 11.5px; color: var(--text); margin: 0; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); }
.at-branch__ranks span { color: var(--muted); margin-right: 8px; letter-spacing: .16em; }
.at-branch__link { font-size: 12px; letter-spacing: .14em; align-self: flex-start; }
@media (max-width: 400px) { .at-branch__head { grid-template-columns: 48px 1fr; } .at-branch__head .at-tag { grid-column: 1 / -1; justify-self: start; } }

/* ---------- Pipeline ---------- */
.at-pipeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; position: relative; }
.at-pipeline::before { content: ""; position: absolute; top: 20px; left: 20px; right: 20px; height: 1px; background: linear-gradient(90deg, var(--accent), var(--line-2) 60%, var(--live)); }
.at-stage { position: relative; display: flex; flex-direction: column; gap: 18px; }
.at-stage__node { position: relative; z-index: 1; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--accent); color: var(--accent); border-radius: var(--radius); font-size: 13px; font-weight: 700; }
.at-stage:last-child .at-stage__node { border-color: var(--live); color: var(--live); }
.at-stage__card { padding: 20px; flex: 1; }
.at-stage__title { font-size: 17px; margin: 14px 0 6px; }
.at-stage__card p { font-size: 14px; margin: 0; }
@media (max-width: 1100px) {
	.at-pipeline { grid-template-columns: 1fr; gap: 12px; }
	.at-pipeline::before { top: 20px; bottom: 20px; left: 20px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, var(--accent), var(--line-2) 60%, var(--live)); }
	.at-stage { flex-direction: row; align-items: flex-start; }
}

/* ---------- Media ---------- */
.at-media__standby { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.at-media__tile { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); letter-spacing: .14em; background-image: linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px); background-size: 24px 24px; }
.at-admin-note { margin-top: 16px; font-size: 11.5px; color: var(--accent); padding: 10px 14px; border: 1px dashed var(--accent-line); border-radius: var(--radius); }
@media (max-width: 760px) { .at-media__standby { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.at-section--cta { padding-top: 0; border-top: 0; }
.at-cta { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.4fr auto; gap: 32px; align-items: center; padding: clamp(32px, 5vw, 60px); background: radial-gradient(ellipse 70% 120% at 100% 0%, rgba(var(--accent-rgb), .16), transparent 60%), var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.at-cta__bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: calc(var(--banner-opacity, .28) * .65); filter: grayscale(.4); }
.at-cta.has-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(17,20,26,.97) 30%, rgba(17,20,26,.7)); }
.at-cta__body, .at-cta__actions { position: relative; z-index: 1; }
.at-cta__title { font-size: clamp(28px, 4vw, 44px); font-weight: 800; }
.at-cta__text { font-size: 17px; max-width: 560px; margin: 0; }
.at-cta__actions { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 860px) { .at-cta { grid-template-columns: 1fr; } .at-cta__actions { flex-direction: row; flex-wrap: wrap; } }

/* ---------- Page header & content ---------- */
.at-pagehead { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse 60% 100% at 85% 0%, rgba(var(--accent-rgb), .08), transparent 60%), #0b0d11; }
.at-pagehead__bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: calc(var(--banner-opacity, .28) * .8); filter: grayscale(.4); }
.at-pagehead.has-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg), rgba(9,11,14,.6)); }
.at-pagehead__inner { position: relative; z-index: 3; padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(36px, 5vw, 64px); }
.at-pagehead__title { font-size: clamp(34px, 5.5vw, 60px); font-weight: 800; letter-spacing: -.03em; margin: 0; }
.at-pagehead__sub { font-size: 17px; max-width: 720px; margin: 14px 0 0; }
.at-page { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(56px, 8vw, 96px); }
.at-canvas { min-height: 50vh; }

.at-prose { color: #a9b6c8; font-size: 17px; }
.at-prose > * { max-width: 820px; }
.at-prose > .alignwide { max-width: 1100px; }
.at-prose > .alignfull, .at-prose > .wp-block-group.alignfull { max-width: none; }
.at-prose h2 { font-size: 30px; margin-top: 1.6em; }
.at-prose h3 { font-size: 22px; margin-top: 1.4em; }
.at-prose h2::before { content: "// "; color: var(--accent); font-family: var(--mono); font-weight: 500; font-size: .7em; }
.at-prose a { text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.at-prose a:hover { text-decoration-color: var(--head); }
.at-prose ul, .at-prose ol { padding-left: 1.3em; }
.at-prose li::marker { color: var(--accent); }
.at-prose blockquote { margin: 1.6em 0; padding: 18px 24px; border-left: 2px solid var(--accent); background: var(--panel); color: var(--head); border-radius: 0 var(--radius) var(--radius) 0; }
.at-prose code, .at-prose pre { font-family: var(--mono); font-size: .88em; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.at-prose code { padding: 2px 6px; }
.at-prose pre { padding: 16px; overflow-x: auto; }
.at-prose pre code { border: 0; padding: 0; }
.at-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.at-prose th, .at-prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.at-prose th { background: var(--panel); color: var(--head); font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.at-prose img { border-radius: var(--radius); }
.at-prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.at-prose .wp-block-button__link { background: var(--accent); color: var(--bg); border-radius: var(--radius); font-weight: 600; text-decoration: none; }
.at-prose figcaption { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.alignleft { float: left; margin: .4em 1.5em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }

/* Forms */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="password"], input[type="number"], input[type="tel"], input[type="date"], input[type="datetime-local"], select, textarea {
	width: 100%; background: var(--panel); color: var(--head); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 11px 14px; font: inherit; font-size: 15px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label { color: var(--head); font-size: 14px; font-weight: 500; }
button, input[type="submit"] { font: inherit; }
input[type="submit"]:not(.at-btn) { background: var(--accent); color: var(--bg); border: 0; padding: 11px 18px; border-radius: var(--radius); font-weight: 600; cursor: pointer; }
.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form label { flex: 1; }

/* Post grid */
.at-postgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.at-postcard { overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s; }
.at-postcard:hover { border-color: var(--accent-line); }
.at-postcard__media { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; background: var(--panel-2); color: var(--line-2); overflow: hidden; }
.at-postcard__media img { width: 100%; height: 100%; object-fit: cover; }
.at-postcard__svg { width: 64px; height: 64px; }
.at-postcard__body { padding: 20px 22px 24px; }
.at-postcard__meta { font-size: 11px; color: var(--accent); letter-spacing: .12em; margin-bottom: 8px; }
.at-postcard__title { font-size: 20px; }
.at-postcard__title a { color: var(--head); }
.at-postcard__title a:hover { color: var(--accent); }
.at-postcard__excerpt p { font-size: 14.5px; margin: 0; }
.at-pagination { margin-top: 40px; }
.at-pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.at-pagination .page-numbers { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); }
.at-pagination .page-numbers.current, .at-pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.at-postnav { display: flex; justify-content: space-between; gap: 16px; margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; }
.at-entry-foot { margin-top: 32px; font-size: 12px; color: var(--muted); }
.at-empty { padding: 40px; max-width: 720px; }
.at-empty .at-mono { color: var(--accent); letter-spacing: .14em; font-size: 12px; }

/* Comments */
.at-comments { margin-top: 64px; max-width: 820px; }
.at-comments__title { font-size: 13px; letter-spacing: .14em; color: var(--accent); }
.at-comment-list { list-style: none; padding: 0; }
.at-comment-list .comment-body { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; }
.at-comment-list .children { list-style: none; padding-left: 24px; }
.at-comment-list .avatar { float: left; margin-right: 12px; border-radius: 2px; }
.comment-metadata { font-family: var(--mono); font-size: 11px; }
.comment-respond { margin-top: 32px; }

/* ---------- Footer ---------- */
.at-footer { border-top: 1px solid var(--line); background: #06080a; padding-top: clamp(56px, 7vw, 88px); }
.at-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.at-footer__marks { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.at-footer__crest { width: 64px; height: 64px; object-fit: contain; }
.at-footer__motto { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.at-footer__title { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.at-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.at-footer__links a { color: var(--text); font-size: 14.5px; }
.at-footer__links a:hover { color: var(--head); }
.at-footer__telemetry { margin-top: 20px; font-size: 11px; color: var(--muted); }
.at-socials { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.at-socials a { display: inline-block; font-size: 11px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--text); }
.at-socials a:hover { border-color: var(--accent); color: var(--accent); }
.at-footer__bottom { border-top: 1px solid var(--line); padding: 28px 0 36px; display: grid; gap: 16px; }
.at-footer__disclaimer { font-size: 12.5px; color: var(--muted); max-width: 900px; margin: 0; }
.at-footer__meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.at-footer__legal { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; }
.at-footer__legal a, .at-footer__meta a { color: var(--muted); font-family: var(--mono); }
.at-footer__legal a:hover, .at-footer__meta a:hover { color: var(--head); }
@media (max-width: 960px) { .at-footer__grid { grid-template-columns: 1fr 1fr; } .at-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .at-footer__grid { grid-template-columns: 1fr; } }

/* WP core helpers */
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.sticky, .bypostauthor { position: relative; }

/* ---------- v1.1: media standby + plugin empty states ---------- */
.at-media__standby { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.at-media__tile { aspect-ratio: 16 / 10; display: grid; place-items: center; background-image: linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px); background-size: 24px 24px; }
.at-media__tile .at-mono { font-size: 11px; color: var(--muted); letter-spacing: .14em; }
.at-media__cta { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
@media (max-width: 640px) { .at-media__standby { grid-template-columns: 1fr; } }
.at-muted { color: var(--muted); }

/* ==========================================================================
   Motion layer (v1.3.1) — compositor-only (opacity + transform), 60fps.
   Everything below is off for visitors who prefer reduced motion.
   ========================================================================== */

/* ---------- Sticky navbar scroll state: no height change (that would shift the page while
   scrolling); the brand mark eases down instead and the glass panel deepens. ---------- */
.at-header .at-logo-wrap--nav { transform-origin: left center; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.at-header.is-scrolled { border-bottom-color: var(--line-2); }
.at-header.is-scrolled .at-logo-wrap--nav { transform: scale(.9); }

/* Dropdowns: a touch more glide. */
.at-menu .sub-menu, .at-member__menu { transition: opacity .18s ease, transform .22s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .22s; }
.at-menu li:hover > .sub-menu, .at-menu li:focus-within > .sub-menu, .at-menu li.is-open > .sub-menu,
.at-member.is-open .at-member__menu, .at-member:focus-within .at-member__menu { transition-delay: 0s; }
.at-sub-toggle svg { transition: transform .2s ease; }
.at-menu li.is-open > .at-sub-toggle svg, .at-sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Card / button hover lift. */
.at-btn:hover { transform: translateY(-1px); }
.at-btn:active { transform: translateY(0); }
.at-branch, .at-stage__card, .at-pillar, .at-postcard { transition: border-color .2s ease, transform .25s cubic-bezier(.2, .8, .2, 1), background-color .2s ease; }
.at-branch:hover, .at-stage__card:hover, .at-postcard:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.at-pillar:hover { background-color: var(--panel-2); }

/* Telemetry counters: fixed-width digits so the strip never jitters while counting. */
[data-at-count] { font-variant-numeric: tabular-nums; }

/* ---------- Scroll reveal (states are only applied to elements main.js marked at boot) ---------- */
html.at-rv-on [data-at-rv] { opacity: 0; transform: translate3d(0, 18px, 0); will-change: opacity, transform; }
html.at-rv-on [data-at-rv].is-in { opacity: 1; transform: none; transition: opacity .6s ease var(--at-rv-d, 0ms), transform .7s cubic-bezier(.2, .7, .2, 1) var(--at-rv-d, 0ms); }

/* ---------- Hero entrance (pure CSS: runs on first paint, ends fully visible) ---------- */
@keyframes at-rise { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }
@keyframes at-crest-in { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
/* No 'to' frame: ends on the element's own opacity (e.g. --banner-opacity on the hero image). */
@keyframes at-fade-in { from { opacity: 0; } }
@keyframes at-scan { from { transform: translate3d(0, -100%, 0); } to { transform: translate3d(0, 100%, 0); } }

/* Scanline sweep: its own unmasked layer (a moving child inside the masked grid would force re-masking every frame). */
:is(.at-hero, .at-pagehead)::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 100%; z-index: 1; opacity: 0; pointer-events: none; will-change: transform;
	background: linear-gradient(180deg, transparent 0%, transparent 44%, rgba(var(--accent-rgb), .05) 49%, rgba(var(--accent-rgb), .11) 50%, rgba(var(--accent-rgb), .05) 51%, transparent 56%, transparent 100%); }

@media (prefers-reduced-motion: no-preference) {
	.at-hero__crest { animation: at-crest-in .8s cubic-bezier(.2, .8, .2, 1) both; }
	.at-hero__ident .at-kicker { animation: at-rise .6s cubic-bezier(.2, .7, .2, 1) .12s both; }
	.at-hero__title { animation: at-rise .75s cubic-bezier(.2, .7, .2, 1) .2s both; }
	.at-hero__motto { animation: at-rise .6s cubic-bezier(.2, .7, .2, 1) .32s both; }
	.at-hero__lead { animation: at-rise .6s cubic-bezier(.2, .7, .2, 1) .4s both; }
	.at-hero__cta { animation: at-rise .6s cubic-bezier(.2, .7, .2, 1) .5s both; }
	.at-hero .at-opcard { animation: at-rise .8s cubic-bezier(.2, .7, .2, 1) .45s both; }
	.at-readiness__item { animation: at-rise .55s cubic-bezier(.2, .7, .2, 1) both; }
	.at-readiness__item:nth-child(1) { animation-delay: .6s; }
	.at-readiness__item:nth-child(2) { animation-delay: .68s; }
	.at-readiness__item:nth-child(3) { animation-delay: .76s; }
	.at-readiness__item:nth-child(4) { animation-delay: .84s; }
	.at-readiness__item:nth-child(n+5) { animation-delay: .92s; }
	.at-hero__grid { animation: at-fade-in 1.2s ease both; }
	.at-hero__bg { animation: at-fade-in 1.4s ease both; }
	.at-pagehead__inner > * { animation: at-rise .6s cubic-bezier(.2, .7, .2, 1) both; }
	.at-pagehead__inner > :nth-child(2) { animation-delay: .08s; }
	.at-pagehead__inner > :nth-child(3) { animation-delay: .16s; }
	/* Scanline sweep starts once the entrance has finished (main.js adds .is-entered). */
	:is(.at-hero, .at-pagehead).is-entered::before { opacity: .8; animation: at-scan 9s linear infinite; }
}

/* ---------- No motion / print: everything static and fully visible ---------- */
@media (prefers-reduced-motion: reduce) {
	html.at-rv-on [data-at-rv] { opacity: 1 !important; transform: none !important; transition: none !important; }
	.at-header .at-logo-wrap--nav, .at-btn, .at-branch, .at-stage__card, .at-postcard, .at-standard, .at-nav, .at-menu .sub-menu, .at-member__menu { transition: none !important; }
	.at-btn:hover, .at-branch:hover, .at-stage__card:hover, .at-postcard:hover, .at-standard:hover { transform: none; }
}
@media print {
	html.at-rv-on [data-at-rv] { opacity: 1 !important; transform: none !important; }
	:is(.at-hero, .at-pagehead)::before { display: none; }
}

/* ==========================================================================
   Wide tactical viewport (v1.3.2) — ORBAT / Chain of Command pages.
   page.php adds .at-container--wide when the page holds [milsim_orbat] (att_is_wide_page()).
   ========================================================================== */
.at-container--wide { max-width: 1440px; }
.at-page--wide .at-prose > .amc-orbat-wrap,
.at-prose > .amc-orbat-wrap { max-width: none; }
.at-page--wide .at-prose { font-size: 16px; }
/* Full Canvas template has no container: give the ORBAT the same wide frame with clean edge padding. */
.at-canvas > .amc-orbat-wrap { max-width: 1440px; margin-left: auto; margin-right: auto; padding: clamp(24px, 4vw, 56px) var(--gutter); box-sizing: border-box; }

/* Content tables never push the page sideways on phones. */
@media (max-width: 760px) { .at-prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; } }

/* ==========================================================================
   Tactical HUD Re-Calibration (v1.3.3) — 0.8s scanline curtain, compositor-only.
   .at-recal.is-in   first 400ms: veil fades up, scan sweeps to centre (then main.js reloads)
   html.at-recal-boot second 400ms on the new page: veil fades out, scan exits right (pure CSS)
   .at-recal.is-full  both halves in place (no reload)
   ========================================================================== */
@property --accent { syntax: "<color>"; inherits: true; initial-value: #c8a96e; }
@property --accent-glow { syntax: "<color>"; inherits: true; initial-value: #10b981; }
@property --hud-bracket { syntax: "<color>"; inherits: true; initial-value: #c8202a; }
:root { transition: --accent .45s ease, --accent-glow .45s ease, --hud-bracket .45s ease; }

.at-recal { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; overflow: hidden; contain: strict; }
.at-recal__veil { position: absolute; inset: 0; background: rgba(6, 8, 10, .84); opacity: 0; }
.at-recal__scan, html.at-recal-boot body::after { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transform: translate3d(-100%, 0, 0); will-change: transform;
	background:
		linear-gradient(90deg, transparent 0%, rgba(var(--accent-rgb), .05) 40%, rgba(var(--accent-rgb), .22) 48.5%, rgba(var(--accent-rgb), .75) 50%, rgba(var(--accent-rgb), .22) 51.5%, rgba(var(--accent-rgb), .05) 60%, transparent 100%),
		repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px); }
.at-recal__readout { position: absolute; left: 50%; top: 50%; margin: 0; transform: translate3d(-50%, -50%, 0); font: 500 12px/1 var(--mono); letter-spacing: .26em; white-space: nowrap; color: var(--accent); text-shadow: 0 0 14px rgba(var(--accent-rgb), .55); opacity: 0; }

@keyframes at-recal-veil-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes at-recal-veil-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes at-recal-scan-in { from { transform: translate3d(-100%, 0, 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes at-recal-scan-out { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(100%, 0, 0); } }
@keyframes at-recal-text { 0% { opacity: 0; } 35%, 70% { opacity: .95; } 100% { opacity: 0; } }
@keyframes at-recal-text-in { from { opacity: 0; } to { opacity: .95; } }
@keyframes at-recal-full-veil { 0% { opacity: 0; } 45%, 55% { opacity: 1; } 100% { opacity: 0; } }
@keyframes at-recal-full-scan { from { transform: translate3d(-100%, 0, 0); } to { transform: translate3d(100%, 0, 0); } }

.at-recal.is-in .at-recal__veil { animation: at-recal-veil-in 400ms cubic-bezier(.4, 0, .2, 1) both; }
.at-recal.is-in .at-recal__scan { animation: at-recal-scan-in 400ms cubic-bezier(.4, 0, .6, 1) both; }
.at-recal.is-in .at-recal__readout { animation: at-recal-text-in 260ms ease 140ms both; }
.at-recal.is-full .at-recal__veil { animation: at-recal-full-veil 800ms cubic-bezier(.4, 0, .2, 1) both; }
.at-recal.is-full .at-recal__scan { animation: at-recal-full-scan 800ms cubic-bezier(.45, 0, .55, 1) both; }
.at-recal.is-full .at-recal__readout { animation: at-recal-text 800ms ease both; }

/* Second half on the freshly loaded page — painted from the very first frame, no JS required. */
html.at-recal-boot body::before { content: "// RECALIBRATING VISUAL PROFILE..."; position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; display: flex; align-items: center; justify-content: center;
	background: rgba(6, 8, 10, .84); font: 500 12px/1 var(--mono); letter-spacing: .26em; white-space: nowrap; color: var(--accent); text-shadow: 0 0 14px rgba(var(--accent-rgb), .55);
	animation: at-recal-veil-out 420ms cubic-bezier(.4, 0, .2, 1) 60ms both; }
html.at-recal-boot body::after { content: ""; position: fixed; z-index: 2147483001; pointer-events: none; animation: at-recal-scan-out 420ms cubic-bezier(.4, 0, .6, 1) 60ms both; }
html.at-recal-boot { background: #06080a; }
/* New palette eases in from neutral steel while the curtain clears (registered custom properties). */
html.at-recal-boot { animation: at-recal-vars 450ms ease 120ms backwards; }
@keyframes at-recal-vars { from { --accent: #64748b; --accent-glow: #64748b; --hud-bracket: #334155; } }

/* Previous season's lights / particles / HUD frames fade out under the curtain. */
html.at-recal-active :is(.at-fx, .at-lights, .at-reticle, .at-season-sky, .at-logo-hud, .at-footdecor) { opacity: 0; transition: opacity 300ms ease; }

/* Ambient decorations + particle canvases materialise (450ms) on every load instead of popping in.
   'backwards' fill: before/while running only, so each element ends on its own opacity. */
@keyframes at-ambient-in { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
	.at-fx, .at-lights, .at-reticle, .at-season-sky, .at-logo-hud { animation: at-ambient-in 450ms ease 120ms backwards; }
}
@media (prefers-reduced-motion: reduce) {
	.at-recal { display: none; }
	html.at-recal-boot body::before, html.at-recal-boot body::after { display: none; }
	html.at-recal-boot { animation: none; }
	:root { transition: none; }
}
