/* ============================================================
   PCMS-HRG — editorial interface layer
   Atmospheric robotics UI + low-chrome, content-first layouts.
   ============================================================ */

:root {
    --page-progress: 0;
    --scroll-energy: 0;
    --charge-speed: 0.82s;
    --interface-cyan: #5cf5ff;
    --interface-violet: #a57bff;
    --interface-amber: #ffc84d;
    --interface-line: rgba(126, 228, 255, 0.18);
    --interface-line-strong: rgba(126, 228, 255, 0.36);
    --editorial-max: 1180px;
    --font-display: 'Spectral', 'Noto Serif TC', Georgia, 'Times New Roman', serif;
    --font-data: 'IBM Plex Mono', ui-monospace, monospace;
    --font-tech: var(--font-display);
}

html { background: #03050c; }

:root[data-lang="zh-Hant"] {
    --font-display: 'Noto Serif TC', 'Songti TC', 'PMingLiU', serif;
    --font-data: 'IBM Plex Mono', 'PingFang TC', 'Microsoft JhengHei', monospace;
}

body {
    position: relative;
    font-size: 1rem;
    line-height: 1.72;
    color: #dce7f4;
    background-color: #03050c;
    background-image:
        radial-gradient(circle at 50% -15%, rgba(63, 92, 190, 0.16), transparent 45%),
        linear-gradient(180deg, #050915 0%, #060a14 42%, #03050c 100%);
    background-attachment: fixed;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(92, 245, 255, 0.018) 1px, transparent 1px),
        linear-gradient(rgba(92, 245, 255, 0.014) 1px, transparent 1px);
    background-size: 96px 96px;
    mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 85%, transparent);
}

/* A transformed body becomes the containing block for fixed-position UI.
   Keep page fades, but leave the viewport coordinate system untouched so the
   atmosphere and telemetry rails truly remain at the screen edges. */
body.page-enter,
body.page-enter-active,
body.page-exit { transform: none !important; }

#page-main,
.site-footer { position: relative; z-index: 3; }

#particle-canvas {
    z-index: 2;
    opacity: 0.52;
    contain: strict;
}

/* ---------- Ambient robotic field ---------- */
.robot-atmosphere {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
}

.robot-atmosphere__grid,
.robot-atmosphere__aurora,
.robot-atmosphere__orbit,
.robot-atmosphere__scan { position: absolute; display: block; }

.robot-atmosphere__grid {
    left: -18vw;
    right: -18vw;
    bottom: -28vh;
    height: 92vh;
    opacity: 0.28;
    background-image:
        linear-gradient(rgba(92, 245, 255, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(92, 245, 255, 0.14) 1px, transparent 1px);
    background-size: 74px 74px;
    transform: perspective(680px) rotateX(61deg);
    transform-origin: center bottom;
    mask-image: linear-gradient(to top, #000 12%, transparent 78%);
    animation: interface-grid-drift 22s steps(74, end) infinite;
}

.robot-atmosphere__aurora {
    width: 58vw;
    height: 58vw;
    border-radius: 50%;
    opacity: 0.3;
    will-change: transform;
}

.robot-atmosphere__aurora--cyan {
    top: -25vw;
    right: -19vw;
    background: radial-gradient(circle, rgba(0, 225, 255, 0.56), rgba(0, 108, 255, 0.12) 42%, transparent 70%);
    animation: interface-aurora-cyan 17s ease-in-out infinite alternate;
}

.robot-atmosphere__aurora--violet {
    left: -30vw;
    bottom: -30vw;
    background: radial-gradient(circle, rgba(135, 72, 255, 0.48), rgba(41, 91, 255, 0.12) 48%, transparent 72%);
    animation: interface-aurora-violet 21s ease-in-out infinite alternate;
}

/* A real team robot briefly materialises as a chromatic hologram behind the
   content. JavaScript changes its model, position and travel path each time,
   preventing the effect from becoming a fixed piece of page furniture. */
.robot-ghost {
    --ghost-image: url('../img/brand/Booster-T1.png');
    --ghost-x: 80vw;
    --ghost-y: 56vh;
    --ghost-width: 230px;
    --ghost-duration: 2.2s;
    --ghost-direction: 1;
    --ghost-tilt: 0deg;
    --ghost-start-x: -36px;
    --ghost-end-x: 58px;
    --ghost-start-y: 16px;
    --ghost-end-y: -20px;
    position: fixed;
    z-index: 4;
    left: var(--ghost-x);
    top: var(--ghost-y);
    display: block;
    width: min(var(--ghost-width), 32vw);
    aspect-ratio: 255 / 578;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) translate(var(--ghost-start-x), var(--ghost-start-y)) rotate(var(--ghost-tilt)) scaleX(var(--ghost-direction));
    transform-origin: center bottom;
    mix-blend-mode: screen;
    will-change: opacity, transform;
}
.robot-ghost.is-k1 {
    --ghost-image: url('../img/brand/Booster-K1.png');
    aspect-ratio: 261 / 645;
}
.robot-ghost > i {
    position: absolute;
    inset: 0;
    display: block;
    pointer-events: none;
}
.robot-ghost__halo {
    inset: -18% -70% !important;
    border-radius: 50%;
    background:
        radial-gradient(ellipse, rgba(255, 255, 255, 0.16), rgba(50, 236, 255, 0.13) 18%, rgba(131, 71, 255, 0.1) 39%, rgba(255, 52, 194, 0.055) 57%, transparent 73%);
    filter: blur(18px) saturate(1.6);
    animation: robot-ghost-halo 0.34s steps(2, end) infinite;
    animation-play-state: paused;
}
.robot-ghost__core {
    background: var(--ghost-image) center / contain no-repeat;
    opacity: 0.13;
    filter: grayscale(1) brightness(2) contrast(1.3) drop-shadow(0 0 7px rgba(210, 253, 255, 0.86));
}
.robot-ghost__spectre,
.robot-ghost__scan {
    -webkit-mask: var(--ghost-image) center / contain no-repeat;
    mask: var(--ghost-image) center / contain no-repeat;
}
.robot-ghost__spectre {
    opacity: 0.74;
    background: linear-gradient(165deg, #20ffff 3%, #267cff 30%, #aa45ff 56%, #ff30c8 80%, #ffd13f 100%);
    filter: saturate(1.75) brightness(1.42) drop-shadow(0 0 8px currentColor) drop-shadow(0 0 24px currentColor);
}
.robot-ghost__spectre--cyan {
    color: #2cf5ff;
    transform: translateX(-5px);
    animation: robot-ghost-split-cyan 0.24s steps(2, end) infinite;
    animation-play-state: paused;
}
.robot-ghost__spectre--magenta {
    color: #ff46cf;
    opacity: 0.46;
    transform: translateX(6px);
    animation: robot-ghost-split-magenta 0.31s steps(2, end) infinite reverse;
    animation-play-state: paused;
}
.robot-ghost__scan {
    opacity: 0.68;
    background:
        repeating-linear-gradient(to bottom, transparent 0 5px, rgba(181, 250, 255, 0.36) 6px, transparent 7px),
        linear-gradient(to bottom, transparent 0 37%, #fff 45%, #52f6ff 49%, rgba(171, 81, 255, 0.82) 53%, transparent 62%);
    background-size: 100% 100%, 100% 220%;
    animation: robot-ghost-scan 0.82s linear infinite;
    animation-play-state: paused;
}
.robot-ghost.is-active .robot-ghost__halo,
.robot-ghost.is-active .robot-ghost__spectre,
.robot-ghost.is-active .robot-ghost__scan { animation-play-state: running; }
.robot-ghost::before,
.robot-ghost::after {
    content: '';
    position: absolute;
    z-index: 4;
    left: -42%;
    right: -42%;
    height: 1px;
    opacity: 0.8;
    background: linear-gradient(90deg, transparent, #42f8ff 24%, #fff 50%, #c158ff 73%, transparent);
    box-shadow: 0 0 8px #4cf5ff, 0 0 22px rgba(172, 75, 255, 0.76);
}
.robot-ghost::before { top: 31%; }
.robot-ghost::after { top: 68%; animation-delay: -0.18s; }
.robot-ghost.is-active { animation: robot-ghost-materialise var(--ghost-duration) steps(1, end) both; }

@keyframes robot-ghost-materialise {
    0%, 100% { opacity: 0; filter: blur(8px) brightness(0.7); transform: translate(-50%, -50%) translate(var(--ghost-start-x), var(--ghost-start-y)) rotate(var(--ghost-tilt)) scale(0.9) scaleX(var(--ghost-direction)); }
    7% { opacity: 0.12; }
    11% { opacity: 0.62; filter: blur(0) brightness(1.35); }
    15% { opacity: 0.14; }
    21% { opacity: 0.53; }
    27% { opacity: 0.22; }
    34% { opacity: 0.7; filter: blur(0.4px) brightness(1.58); }
    43% { opacity: 0.3; }
    57% { opacity: 0.54; }
    72% { opacity: 0.26; }
    88% { opacity: 0.12; filter: blur(2px) brightness(1.15); }
    99% { transform: translate(-50%, -50%) translate(var(--ghost-end-x), var(--ghost-end-y)) rotate(var(--ghost-tilt)) scale(1.04) scaleX(var(--ghost-direction)); }
}
@keyframes robot-ghost-split-cyan {
    0%, 100% { transform: translateX(-4px); }
    35% { transform: translate(-9px, 2px); }
    62% { transform: translate(-2px, -1px); }
}
@keyframes robot-ghost-split-magenta {
    0%, 100% { transform: translateX(5px); }
    31% { transform: translate(10px, -2px); }
    67% { transform: translate(3px, 2px); }
}
@keyframes robot-ghost-scan {
    from { background-position: 0 0, 0 -120%; }
    to { background-position: 0 0, 0 120%; }
}
@keyframes robot-ghost-halo {
    0%, 100% { opacity: 0.58; transform: scale(0.96); }
    50% { opacity: 1; transform: scale(1.04); }
}

.robot-atmosphere__orbit {
    width: min(78vw, 1120px);
    aspect-ratio: 1;
    top: 8vh;
    left: 50%;
    opacity: 0.22;
    transform: translateX(-50%);
    background:
        repeating-radial-gradient(circle, transparent 0 89px, rgba(92, 245, 255, 0.22) 90px, transparent 91px 138px),
        conic-gradient(from 15deg, transparent 0 14%, rgba(92, 245, 255, 0.35) 15%, transparent 16% 43%, rgba(165, 123, 255, 0.32) 44%, transparent 45% 74%, rgba(92, 245, 255, 0.25) 75%, transparent 76%);
    mask-image: radial-gradient(circle, transparent 0 18%, #000 24% 72%, transparent 76%);
    animation: interface-orbit 58s linear infinite;
}

.robot-atmosphere__scan {
    left: 0;
    right: 0;
    top: -12vh;
    height: 26vh;
    opacity: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(92, 245, 255, 0.025) 30%, rgba(92, 245, 255, 0.09) 62%, rgba(165, 123, 255, 0.035) 78%, transparent 100%);
    animation: interface-scan 11s linear infinite;
}

.scanline-overlay::before { display: none; }

@keyframes interface-grid-drift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 0 148px, 148px 0; }
}

@keyframes interface-aurora-cyan {
    from { transform: translate3d(0, 0, 0) scale(0.9); }
    to { transform: translate3d(-10vw, 12vh, 0) scale(1.12); }
}

@keyframes interface-aurora-violet {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(13vw, -9vh, 0) scale(0.88); }
}

@keyframes interface-orbit {
    from { transform: translateX(-50%) rotate(0deg); }
    to { transform: translateX(-50%) rotate(360deg); }
}

@keyframes interface-scan {
    0%, 8% { opacity: 0; transform: translateY(0); }
    12% { opacity: 0.7; }
    78% { opacity: 0.28; }
    82%, 100% { opacity: 0; transform: translateY(124vh); }
}

/* ---------- Full-viewport energy perimeter ---------- */
.edge-field {
    position: fixed;
    inset: 0;
    z-index: 1045;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.58;
    transition: opacity 0.34s ease;
}

.edge-field.is-charging {
    opacity: 1;
}

.edge-field::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(92, 245, 255, 0.2);
    box-shadow:
        inset 0 0 16px rgba(0, 239, 255, 0.08),
        inset 0 0 46px rgba(115, 68, 255, 0.055),
        inset 0 0 92px rgba(255, 38, 191, 0.025);
    transition: border-color 0.34s ease, box-shadow 0.34s ease;
}
.edge-field.is-charging::before {
    border-color: rgba(44, 241, 255, 0.72);
    box-shadow:
        inset 0 0 20px rgba(0, 239, 255, 0.29),
        inset 0 0 56px rgba(112, 70, 255, 0.22),
        inset 0 0 104px rgba(255, 42, 192, 0.12);
}

.edge-field::after {
    content: '';
    position: absolute;
    inset: 4px;
    padding: 1px;
    border: 1px solid rgba(92, 245, 255, 0.13);
    background: conic-gradient(from calc(var(--page-progress) * 1turn - 0.25turn), #25f4ff, #546cff 24%, #bd48ff 48%, #ff3ba7 71%, #ffb23e 86%, #25f4ff) border-box;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.24;
    transition: opacity 0.3s ease;
    animation: edge-frame-breathe 4.6s ease-in-out infinite;
}
.edge-field.is-charging::after {
    opacity: calc(0.55 + var(--scroll-energy) * 0.36);
}

.edge-field__side {
    position: absolute;
    display: block;
    overflow: hidden;
    filter: saturate(1.32);
    transition: filter 0.28s ease, opacity 0.28s ease;
}

.edge-field__side--left,
.edge-field__side--right {
    top: 0;
    bottom: 0;
    width: 12px;
    background:
        linear-gradient(to right, rgba(48, 239, 255, 0.3), transparent 34%) 0 0 / 100% 100%,
        linear-gradient(to bottom, #19f7ff, #496dff 22%, #bc45ff 46%, #ff3fb2 68%, #ffc94e 84%, #19f7ff) 0 0 / 1px 300%;
    background-repeat: no-repeat;
    animation: edge-spectrum-y 11s linear infinite;
}

.edge-field__side--left { left: 0; }
.edge-field__side--right { right: 0; transform: scaleX(-1); }

.edge-field__side--top,
.edge-field__side--bottom {
    left: 0;
    right: 0;
    height: 11px;
    background:
        linear-gradient(to bottom, rgba(48, 239, 255, 0.28), transparent 36%) 0 0 / 100% 100%,
        linear-gradient(to right, #19f7ff, #496dff 22%, #bc45ff 46%, #ff3fb2 68%, #ffc94e 84%, #19f7ff) 0 0 / 300% 1px;
    background-repeat: no-repeat;
    animation: edge-spectrum-x 12s linear infinite;
}

.edge-field__side--top { top: 0; }
.edge-field__side--bottom { bottom: 0; transform: scaleY(-1); }

.edge-field__side::before {
    content: '';
    position: absolute;
    opacity: 0.3;
    transition: opacity 0.22s ease;
}
.edge-field__side--left::before,
.edge-field__side--right::before {
    inset: 0 auto 0 1px;
    width: 6px;
    background:
        linear-gradient(to right, rgba(38, 241, 255, 0.9) 0 72%, transparent 72%) 0 0 / 5px 31px repeat-y,
        linear-gradient(to right, rgba(177, 77, 255, 0.72) 0 42%, transparent 42%) 0 13px / 4px 19px repeat-y,
        linear-gradient(to right, rgba(255, 64, 173, 0.48) 0 25%, transparent 25%) 0 6px / 3px 11px repeat-y;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
    animation: edge-circuit-y 5.8s linear infinite;
}
.edge-field__side--top::before,
.edge-field__side--bottom::before {
    inset: 1px 0 auto;
    height: 6px;
    background:
        linear-gradient(to bottom, rgba(38, 241, 255, 0.88) 0 72%, transparent 72%) 0 0 / 31px 5px repeat-x,
        linear-gradient(to bottom, rgba(177, 77, 255, 0.7) 0 42%, transparent 42%) 13px 0 / 19px 4px repeat-x,
        linear-gradient(to bottom, rgba(255, 64, 173, 0.46) 0 25%, transparent 25%) 6px 0 / 11px 3px repeat-x;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
    animation: edge-circuit-x 6.4s linear infinite;
}

.edge-field__side::after {
    content: '';
    position: absolute;
    z-index: 3;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #28f1ff 8%, #7369ff 46%, #f441bd 76%, #ffbd43);
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    box-shadow: 0 0 9px rgba(39, 241, 255, 0.84), 0 0 18px rgba(166, 69, 255, 0.52);
    filter: saturate(1.35);
    opacity: 0.36;
    transition: opacity 0.22s ease, filter 0.22s ease;
}
.edge-field__side--left::after,
.edge-field__side--right::after {
    top: -12px;
    left: 0;
    animation: edge-node-y 7.8s cubic-bezier(0.42, 0, 0.58, 1) infinite;
}
.edge-field__side--top::after,
.edge-field__side--bottom::after {
    top: 0;
    left: -12px;
    animation: edge-node-x 9.2s cubic-bezier(0.42, 0, 0.58, 1) infinite;
}
.edge-field__side--right::after { animation-delay: -3.9s; }
.edge-field__side--bottom::after { animation-delay: -4.6s; }

.edge-field__side i,
.edge-field__side b {
    position: absolute;
    display: block;
    border-radius: 999px;
}

.edge-field__side--left i,
.edge-field__side--right i {
    left: 1px;
    width: 4px;
    height: 28vh;
    top: -30vh;
    background: linear-gradient(to bottom, transparent 0%, rgba(32, 244, 255, 0.08) 16%, #20f4ff 57%, #686fff 72%, #d843e8 84%, #ff4e9d 91%, transparent 100%);
    box-shadow: 0 0 5px rgba(32, 244, 255, 0.68), 0 0 14px rgba(128, 76, 255, 0.42), 0 0 24px rgba(255, 67, 184, 0.2);
    filter: blur(0.15px) saturate(1.4);
    opacity: 0.44;
    animation: edge-packet-y 5.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.edge-field__side--left b,
.edge-field__side--right b {
    top: 0;
    left: 2px;
    width: 3px;
    height: max(5vh, calc(var(--page-progress) * 100%));
    background:
        repeating-linear-gradient(145deg, transparent 0 6px, rgba(4, 8, 20, 0.72) 6px 9px, transparent 9px 17px),
        linear-gradient(to bottom, #22f2ff 0%, #5571ff 37%, #c248ff 67%, #ff429f 86%, #ffc24e 100%);
    box-shadow: 0 0 6px rgba(36, 240, 255, 0.74), 0 0 16px rgba(113, 75, 255, 0.54), 0 0 27px rgba(255, 55, 180, 0.26);
    opacity: 0.64;
    transition: height 0.16s ease-out, opacity 0.25s ease, filter 0.25s ease;
}

.edge-field__side--top i,
.edge-field__side--bottom i {
    top: 1px;
    left: -33vw;
    width: 32vw;
    height: 4px;
    background: linear-gradient(to right, transparent 0%, rgba(32, 244, 255, 0.08) 16%, #20f4ff 57%, #686fff 72%, #d843e8 84%, #ff4e9d 91%, transparent 100%);
    box-shadow: 0 0 5px rgba(32, 244, 255, 0.64), 0 0 14px rgba(151, 70, 255, 0.38), 0 0 22px rgba(255, 67, 184, 0.18);
    filter: blur(0.15px) saturate(1.4);
    opacity: 0.4;
    animation: edge-packet-x 7.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.edge-field__side--top b,
.edge-field__side--bottom b {
    top: 2px;
    left: 0;
    width: max(6vw, calc(var(--page-progress) * 100%));
    height: 3px;
    background:
        repeating-linear-gradient(125deg, transparent 0 7px, rgba(4, 8, 20, 0.72) 7px 10px, transparent 10px 19px),
        linear-gradient(to right, #22f2ff 0%, #5571ff 37%, #c248ff 67%, #ff429f 86%, #ffc24e 100%);
    box-shadow: 0 0 6px rgba(36, 240, 255, 0.7), 0 0 16px rgba(113, 75, 255, 0.48), 0 0 25px rgba(255, 55, 180, 0.24);
    opacity: 0.6;
    transition: width 0.16s ease-out, opacity 0.25s ease, filter 0.25s ease;
}

.edge-field__side b::after {
    content: '';
    position: absolute;
    opacity: calc(0.34 + var(--scroll-energy) * 0.64);
    background: radial-gradient(ellipse at center, #24f2ff 0 9%, rgba(90, 105, 255, 0.92) 22%, rgba(206, 60, 255, 0.62) 43%, rgba(255, 51, 163, 0.28) 58%, transparent 73%);
    filter: drop-shadow(0 0 7px rgba(35, 241, 255, 0.78)) drop-shadow(0 0 15px rgba(172, 61, 255, 0.5));
    transition: opacity 0.25s ease;
}
.edge-field__side--left b::after,
.edge-field__side--right b::after {
    left: -6px;
    bottom: -12px;
    width: 15px;
    height: 25px;
}
.edge-field__side--top b::after,
.edge-field__side--bottom b::after {
    top: -6px;
    right: -12px;
    width: 25px;
    height: 15px;
}

.edge-field.is-charging .edge-field__side {
    filter: saturate(1.9) drop-shadow(0 0 4px rgba(38, 241, 255, 0.62)) drop-shadow(0 0 10px rgba(157, 69, 255, 0.4));
}
.edge-field.is-charging .edge-field__side::before {
    opacity: calc(0.48 + var(--scroll-energy) * 0.34);
    animation-duration: calc(var(--charge-speed) + 1.25s);
}
.edge-field.is-charging .edge-field__side::after {
    opacity: calc(0.72 + var(--scroll-energy) * 0.28);
    filter: saturate(1.75) drop-shadow(0 0 7px rgba(35, 241, 255, 0.82)) drop-shadow(0 0 15px rgba(179, 63, 255, 0.58));
    animation-duration: calc(var(--charge-speed) + 0.75s);
}
.edge-field.is-charging .edge-field__side i {
    opacity: calc(0.7 + var(--scroll-energy) * 0.28);
    animation-duration: 1.65s;
}
.edge-field.is-charging .edge-field__side b {
    opacity: calc(0.76 + var(--scroll-energy) * 0.24);
    filter: saturate(1.35) drop-shadow(0 0 5px #28efff) drop-shadow(0 0 13px rgba(155, 68, 255, 0.76)) drop-shadow(0 0 23px rgba(255, 57, 173, 0.44));
}
.edge-field.is-charging .edge-field__side b::after {
    animation: edge-charge-head 0.46s ease-in-out infinite alternate;
}
.edge-field.is-charging .edge-field__side--left b,
.edge-field.is-charging .edge-field__side--right b {
    animation: edge-fill-cells-y var(--charge-speed) linear infinite;
}
.edge-field.is-charging .edge-field__side--top b,
.edge-field.is-charging .edge-field__side--bottom b {
    animation: edge-fill-cells-x var(--charge-speed) linear infinite;
}
.edge-field.is-reversing .edge-field__side::before,
.edge-field.is-reversing .edge-field__side::after,
.edge-field.is-reversing .edge-field__side i,
.edge-field.is-reversing .edge-field__side b {
    animation-direction: reverse;
}

@keyframes edge-spectrum-y {
    to { background-position: 0 0, 0 300%; }
}
@keyframes edge-spectrum-x {
    to { background-position: 0 0, 300% 0; }
}
@keyframes edge-circuit-y {
    to { background-position: 0 62px, 0 51px, 0 39px; }
}
@keyframes edge-circuit-x {
    to { background-position: 62px 0, 51px 0, 39px 0; }
}
@keyframes edge-node-y {
    0% { transform: translateY(0) rotate(0deg) scale(0.68); opacity: 0; }
    12%, 82% { opacity: 0.55; }
    52% { transform: translateY(74vh) rotate(180deg) scale(1); }
    100% { transform: translateY(108vh) rotate(360deg) scale(0.68); opacity: 0; }
}
@keyframes edge-node-x {
    0% { transform: translateX(0) rotate(0deg) scale(0.68); opacity: 0; }
    12%, 82% { opacity: 0.52; }
    52% { transform: translateX(76vw) rotate(180deg) scale(1); }
    100% { transform: translateX(108vw) rotate(360deg) scale(0.68); opacity: 0; }
}
@keyframes edge-packet-y {
    0% { transform: translateY(0); opacity: 0; }
    12%, 82% { opacity: 0.54; }
    100% { transform: translateY(146vh); opacity: 0; }
}
@keyframes edge-packet-x {
    0% { transform: translateX(0); opacity: 0; }
    12%, 82% { opacity: 0.5; }
    100% { transform: translateX(151vw); opacity: 0; }
}
@keyframes edge-fill-cells-y {
    to { background-position: 0 34px, 0 0; }
}
@keyframes edge-fill-cells-x {
    to { background-position: 38px 0, 0 0; }
}
@keyframes edge-frame-breathe {
    0%, 100% { opacity: 0.16; }
    50% { opacity: 0.31; }
}
@keyframes edge-charge-head {
    from { opacity: 0.62; transform: scale(0.76); }
    to { opacity: 1; transform: scale(1.18); }
}

/* ---------- Navigation: compact instrument strip ---------- */
.top-bar {
    padding: 1.12rem 0 0.5rem;
    background: rgba(4, 8, 17, 0.82);
    border-bottom-color: rgba(126, 228, 255, 0.12);
    box-shadow: 0 10px 38px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px) saturate(1.2);
}

.brand-logo { height: 38px; }
.brand-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.008em;
    animation: none;
}
.brand-line,
.brand-line::before,
.brand-line::after { animation: none; }
.brand-line {
    color: #cceeff;
    background: none;
    -webkit-text-fill-color: currentColor;
}
.brand-line::before,
.brand-line::after { display: none; }

.social-link-named {
    gap: 0.5rem;
    padding: 0.24rem 0.2rem;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-family: var(--font-data);
    font-size: 0.66rem;
    letter-spacing: 0.09em;
    color: #b8efff;
}

.social-link-named:hover {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    color: #fff;
    text-shadow: 0 0 12px rgba(92, 245, 255, 0.62);
}

.tab-nav {
    top: 69px;
    background: rgba(5, 9, 18, 0.78);
    border-bottom-color: rgba(126, 228, 255, 0.1);
    backdrop-filter: blur(18px) saturate(1.15);
}

.tab-list { gap: clamp(0.15rem, 1vw, 0.8rem); }
.tab-btn {
    padding: 0.86rem 0.82rem 0.76rem;
    font-family: var(--font-data);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.tab-btn:hover,
.tab-btn.active { background: transparent; }
.tab-btn.active { border-bottom-color: var(--interface-cyan); }
.tab-btn-back { border-left: 0; background: transparent; }
.tab-btn-back:hover { background: transparent; }

/* ---------- Editorial rhythm and type ---------- */
.page-content { max-width: var(--editorial-max); padding-top: clamp(3rem, 6vw, 5.5rem); }
.section { margin-bottom: clamp(4rem, 8vw, 7rem); }
.section-divider {
    margin: clamp(4rem, 8vw, 7rem) 0;
    border: 0;
    height: 1px;
    opacity: 1;
    background: linear-gradient(90deg, rgba(92, 245, 255, 0.55), rgba(165, 123, 255, 0.18) 48%, transparent 90%);
}

p,
:root[data-lang="en"] p {
    font-size: clamp(1rem, 0.35vw + 0.9rem, 1.075rem);
    line-height: 1.74;
    color: #b2c2d2;
    text-align: left;
}

:root[data-lang="zh-Hant"] body { font-family: var(--font-display); }

h1, h2, h3, h4,
.hero-title,
.home-intro-title,
.section-title,
.subsection-title,
.activity-title,
.honour-rank,
.honour-event,
.line-name,
.tech-card-title,
.coach-name,
.connect-title {
    font-family: var(--font-display);
    font-weight: 400;
}

.hero-title {
    max-width: 760px;
    font-size: clamp(3rem, 5.8vw, 5.4rem);
    font-weight: 300;
    line-height: 0.96;
    letter-spacing: -0.035em;
    text-wrap: balance;
    -webkit-text-stroke: 0.25px rgba(214, 245, 255, 0.42);
    text-shadow: 0 0 30px rgba(67, 208, 255, 0.18);
}
.hero-title span {
    background-image: linear-gradient(100deg, #27eeff 0%, #5898ff 48%, #bd68ff 100%);
    filter: drop-shadow(0 0 18px rgba(79, 167, 255, 0.25));
}
.hero-kicker,
.section-eyebrow,
.line-focus,
.activity-date,
.pill,
.line-tag,
.member-joined,
.result-table th,
.honour-foot,
.vf-readout,
.vision-tag,
.btn-tab-link {
    font-family: var(--font-data);
}
.hero-kicker {
    padding: 0.24rem 0.65rem;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    background: transparent;
    border: 0;
    border-left: 2px solid var(--interface-cyan);
    border-radius: 0;
}
.hero-sub {
    max-width: 680px;
    font-size: clamp(1rem, 1.25vw, 1.16rem);
    line-height: 1.68;
    color: rgba(235, 244, 255, 0.83);
    text-align: left;
}
.home-intro-title {
    font-size: clamp(2rem, 3.8vw, 3.25rem);
    font-weight: 300;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: #ecf8ff;
}

.section-title,
h1.section-title {
    color: #eaf8ff;
    -webkit-text-fill-color: currentColor;
    background: none;
    text-shadow: 0 0 28px rgba(92, 245, 255, 0.16);
    font-weight: 300;
    letter-spacing: -0.024em;
    line-height: 1.1;
    -webkit-text-stroke: 0.2px rgba(207, 240, 255, 0.32);
}

h1.section-title { font-size: clamp(2.55rem, 4.8vw, 4.35rem); }
h2.section-title { font-size: clamp(2rem, 3.4vw, 2.95rem); }
.subsection-title { font-size: clamp(1.25rem, 2vw, 1.72rem); font-weight: 400; letter-spacing: -0.014em; }

.section-title::before {
    width: min(100%, 8rem);
    height: 1px;
    background: linear-gradient(90deg, var(--interface-cyan), var(--interface-violet), transparent);
}

.section-eyebrow {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--interface-cyan);
}

.section-intro {
    width: 100%;
    max-width: none;
    color: #a7b5ca;
}

/* Editorial copy follows the same measured alignment across every section. */
#page-main .hero-sub,
#page-main .page-content p:not(.text-center) {
    text-align: justify;
    text-align-last: start;
    text-justify: auto;
    text-wrap: pretty;
    hyphens: auto;
    -webkit-hyphens: auto;
}
#page-main .section-intro {
    text-align: justify;
    text-align-last: start;
    text-justify: auto;
    text-wrap: pretty;
    hyphens: auto;
    -webkit-hyphens: auto;
}
:root[data-lang="zh-Hant"] #page-main .hero-sub,
:root[data-lang="zh-Hant"] #page-main .page-content p:not(.text-center),
:root[data-lang="zh-Hant"] #page-main .section-intro { text-justify: inter-character; }
.lead { line-height: 1.72; }

:root[data-lang="zh-Hant"] .hero-title,
:root[data-lang="zh-Hant"] .home-intro-title,
:root[data-lang="zh-Hant"] .section-title,
:root[data-lang="zh-Hant"] .subsection-title,
:root[data-lang="zh-Hant"] .activity-title,
:root[data-lang="zh-Hant"] .honour-event {
    letter-spacing: 0.015em;
    line-height: 1.15;
}
:root[data-lang="zh-Hant"] .hero-kicker,
:root[data-lang="zh-Hant"] .section-eyebrow,
:root[data-lang="zh-Hant"] .filter-chip { letter-spacing: 0.1em; }

/* ---------- Continuous activity telemetry reel ---------- */
.activity-showcase {
    position: relative;
    isolation: isolate;
}

.activity-showcase__head {
    display: grid;
    grid-template-columns: minmax(270px, 0.8fr) minmax(320px, 1.2fr);
    gap: clamp(2rem, 7vw, 7rem);
    align-items: end;
    margin-bottom: 2.1rem;
}

.activity-showcase__head .section-title { margin-bottom: 0; }
.activity-showcase__head .section-intro { margin: 0 0 0.3rem; }

.activity-loop {
    --rank-accent: #5cf5ff;
    --rank-accent-2: #a57bff;
    position: relative;
    left: 50%;
    width: min(1440px, calc(100vw - 1.5rem));
    transform: translateX(-50%);
    padding: 2.7rem 0 2.2rem;
    border-top: 1px solid rgba(92, 245, 255, 0.34);
    border-bottom: 1px solid rgba(165, 123, 255, 0.25);
    background:
        linear-gradient(90deg, rgba(92, 245, 255, 0.055), transparent 18%, transparent 82%, rgba(165, 123, 255, 0.055)),
        linear-gradient(180deg, rgba(7, 14, 28, 0.7), rgba(3, 7, 15, 0.38));
    box-shadow:
        inset 0 1px rgba(255, 255, 255, 0.025),
        0 0 70px rgba(47, 114, 255, 0.07);
    overflow: hidden;
}

.activity-loop::before,
.activity-loop::after {
    content: '';
    position: absolute;
    z-index: 3;
    top: 0;
    bottom: 0;
    width: clamp(26px, 6vw, 92px);
    pointer-events: none;
}
.activity-loop::before { left: 0; background: linear-gradient(90deg, #050914, rgba(5, 9, 20, 0.82) 28%, transparent); }
.activity-loop::after { right: 0; background: linear-gradient(-90deg, #050914, rgba(5, 9, 20, 0.82) 28%, transparent); }

.activity-loop__status {
    position: absolute;
    z-index: 4;
    top: 0.58rem;
    left: clamp(1rem, 5vw, 5rem);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-data);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: rgba(185, 230, 244, 0.64);
}
.activity-loop__status i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #73ffcf;
    box-shadow: 0 0 9px #73ffcf;
    animation: activity-live-pulse 1.4s ease-in-out infinite;
}

.activity-loop__toggle {
    position: absolute;
    z-index: 5;
    top: 0.42rem;
    right: clamp(1rem, 5vw, 5rem);
    display: grid;
    place-items: center;
    width: 30px;
    height: 24px;
    padding: 0;
    color: var(--interface-cyan);
    background: rgba(6, 13, 25, 0.72);
    border: 1px solid rgba(92, 245, 255, 0.28);
    border-radius: 0;
    box-shadow: 0 0 12px rgba(92, 245, 255, 0.06);
}
.activity-loop__toggle:hover,
.activity-loop__toggle:focus-visible {
    color: #fff;
    border-color: rgba(92, 245, 255, 0.76);
    box-shadow: 0 0 16px rgba(92, 245, 255, 0.2);
    outline: 0;
}

.activity-loop__viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    touch-action: pan-x;
}
.activity-loop__viewport::-webkit-scrollbar { display: none; }

.activity-loop__track {
    --loop-gap: clamp(0.8rem, 1.4vw, 1.2rem);
    display: flex;
    width: max-content;
    will-change: transform;
    animation: activity-loop-scroll 86s linear infinite;
}

.activity-loop__group {
    display: flex;
    flex: none;
    gap: var(--loop-gap);
    padding-right: var(--loop-gap);
}

.activity-slide {
    --rank-accent: #5cf5ff;
    --rank-accent-2: #a57bff;
    position: relative;
    display: grid;
    grid-template-columns: minmax(190px, 0.82fr) minmax(0, 1.18fr);
    gap: 1.15rem;
    align-items: center;
    flex: none;
    width: clamp(480px, 39vw, 570px);
    min-height: 178px;
    padding: 1.15rem 2.5rem 1.15rem 1.05rem;
    color: inherit;
    text-decoration: none;
    background:
        linear-gradient(112deg, rgba(11, 23, 42, 0.9), rgba(6, 10, 22, 0.62)) padding-box,
        linear-gradient(125deg, color-mix(in srgb, var(--rank-accent) 58%, transparent), rgba(116, 169, 207, 0.1) 48%, color-mix(in srgb, var(--rank-accent-2) 36%, transparent)) border-box;
    border: 1px solid transparent;
    clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 13px 100%, 0 calc(100% - 13px));
    box-shadow: inset 0 0 34px rgba(92, 245, 255, 0.025);
    transition: transform 220ms ease, filter 220ms ease, background 220ms ease;
}

.activity-slide::before {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 58px;
    height: 58px;
    opacity: 0.58;
    background:
        linear-gradient(135deg, transparent 47%, color-mix(in srgb, var(--rank-accent) 70%, transparent) 48%, transparent 50%),
        linear-gradient(90deg, transparent 78%, color-mix(in srgb, var(--rank-accent-2) 48%, transparent) 79%);
}

.activity-slide:hover,
.activity-slide:focus-visible {
    color: inherit;
    transform: translateY(-5px);
    filter: drop-shadow(0 12px 28px color-mix(in srgb, var(--rank-accent) 17%, transparent));
    outline: 0;
}

.activity-slide.is-gold,
.honour-card.is-gold { --rank-accent: #ffe477; --rank-accent-2: #ff794d; }
.activity-slide.is-world,
.honour-card.is-world { --rank-accent: #62f7ff; --rank-accent-2: #826dff; }
.activity-slide.is-robocup,
.honour-card.is-robocup { --rank-accent: #55fbff; --rank-accent-2: #f054ff; }
.activity-slide.is-qualified,
.honour-card.is-qualified { --rank-accent: #75ffb4; --rank-accent-2: #4bc8ff; }
.activity-slide.is-outreach { --rank-accent: #ff6ee1; --rank-accent-2: #ff995a; }
.activity-slide.is-training { --rank-accent: #68c9ff; --rank-accent-2: #6f7cff; }

.activity-result-badge {
    width: 100%;
    min-height: 132px;
    font-size: clamp(1.9rem, 2.5vw, 2.55rem);
}
.activity-result-badge.is-status {
    font-size: clamp(1.2rem, 1.6vw, 1.5rem);
    letter-spacing: -0.012em;
}

.activity-slide__copy { min-width: 0; }
.activity-slide__date {
    display: block;
    margin-bottom: 0.55rem;
    font-family: var(--font-data);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--rank-accent) 84%, #d7e4ee);
}
.activity-slide__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.03rem, 1.35vw, 1.24rem);
    font-weight: 500;
    line-height: 1.28;
    letter-spacing: -0.012em;
    color: #eef8ff;
    text-wrap: balance;
}
.activity-slide__line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    margin-top: 0.9rem;
    font-family: var(--font-data);
    font-size: 0.55rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.activity-slide__line b { color: var(--rank-accent); font-weight: 600; }
.activity-slide__line em {
    padding-left: 0.55rem;
    color: #879bb0;
    border-left: 1px solid rgba(126, 228, 255, 0.2);
    font-style: normal;
}
.activity-slide__arrow {
    position: absolute;
    top: 0.8rem;
    right: 0.95rem;
    color: color-mix(in srgb, var(--rank-accent) 70%, #8194a8);
    font-size: 0.84rem;
    transition: transform 200ms ease, color 200ms ease;
}
.activity-slide:hover .activity-slide__arrow { color: #fff; transform: translate(2px, -2px); }

.activity-loop.is-paused .activity-loop__track,
.activity-loop.is-dragging .activity-loop__track,
.activity-loop:has(.activity-slide:hover) .activity-loop__track,
.activity-loop:has(.activity-slide:focus) .activity-loop__track { animation-play-state: paused; }

.activity-showcase__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 1rem;
}
.activity-showcase__foot > span {
    font-family: var(--font-data);
    font-size: 0.57rem;
    letter-spacing: 0.12em;
    color: rgba(147, 178, 198, 0.54);
}

@keyframes activity-loop-scroll {
    to { transform: translate3d(-50%, 0, 0); }
}

@keyframes activity-live-pulse {
    0%, 100% { opacity: 0.42; transform: scale(0.82); }
    50% { opacity: 1; transform: scale(1.22); }
}

/* ---------- Programme lines and technical columns ---------- */
.line-grid { gap: clamp(2rem, 5vw, 5rem); }
.line-card,
.line-card.is-k1 {
    padding: 1.8rem 0 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--accent-t1-dim);
    border-radius: 0;
    box-shadow: none;
    animation: none;
    overflow: visible;
}
.line-card.is-k1 { border-top-color: var(--accent-k1-dim); }
.line-card::before { top: -1px; width: 38%; height: 1px; }
.line-card:hover,
.line-card.is-k1:hover { transform: none; box-shadow: none; }
.line-card:hover .line-name { color: var(--accent-t1); }
.line-card.is-k1:hover .line-name { color: var(--accent-k1); }
.line-badge {
    width: auto;
    height: auto;
    padding: 0.4rem 0.55rem;
    border: 0;
    border-radius: 0;
    border-left: 2px solid currentColor;
    background: transparent;
}
.line-card.is-k1 .line-badge { background: transparent; }

.tech-card {
    padding: 1.6rem 0 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--interface-line);
    border-radius: 0;
    box-shadow: none;
}
.tech-card:hover { transform: none; border-color: rgba(92, 245, 255, 0.55); box-shadow: none; }
.tech-card-icon {
    width: auto;
    height: auto;
    justify-content: flex-start;
    margin-bottom: 1.2rem;
    border: 0;
    background: transparent;
    font-size: 1.7rem;
}

.fronts-grid {
    --bs-gutter-x: clamp(3rem, 6vw, 6.5rem);
    --bs-gutter-y: 3rem;
    margin-top: 0.35rem;
}
.fronts-grid > div { position: relative; }
.fronts-grid .tech-card {
    padding-top: 1.8rem;
    border-top-color: rgba(92, 245, 255, 0.3);
}
.fronts-grid .tech-card p {
    font-size: 1.03rem;
    line-height: 1.82;
}

@media (min-width: 768px) {
    .fronts-grid > div + div::before {
        content: '';
        position: absolute;
        top: 0.35rem;
        bottom: 0.25rem;
        left: 0;
        width: 1px;
        background: linear-gradient(to bottom, transparent, rgba(92, 245, 255, 0.24) 18%, rgba(165, 123, 255, 0.22) 82%, transparent);
    }
}

.software-stack,
.roster {
    padding: 1.5rem 0 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--interface-line);
    border-radius: 0;
}

.pill,
.line-tag,
.member-joined {
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.pill { padding: 0.24rem 0.1rem; border-width: 0 0 1px; }
.line-tag { border-width: 0 0 1px; padding: 0.12rem 0; }
.member-joined { border-width: 0; padding: 0.1rem 0; }

/* ---------- Robot and team visual stages ---------- */
.robot-showcase {
    padding: 1.25rem 0 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--interface-line);
    border-radius: 0;
    box-shadow: none;
}
.robot-showcase::before { display: none; }
.robot-stage::after { opacity: 0.6; }

.team-preview {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}
.team-preview-grid.is-drifting { border-radius: 0; border-bottom: 1px solid var(--interface-line); }

/* ---------- Roster: portraits with rules and breathing room ---------- */
.coach-card,
.member-card,
.contact-coach-card {
    padding: 1.5rem 0 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--interface-line);
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}
.coach-card::before,
.contact-coach-card::before { display: none; }
.coach-card:hover,
.member-card:hover,
.contact-coach-card:hover {
    transform: none !important;
    border-color: rgba(92, 245, 255, 0.46);
    box-shadow: none;
}
.coach-card:hover .coach-avatar,
.member-card:hover .member-avatar,
.contact-coach-card:hover .contact-coach-avatar { transform: none; }
.coach-avatar,
.member-avatar,
.contact-coach-avatar { animation: none; }
.coach-email {
    border-radius: 0;
    background: transparent;
    border-width: 0 0 1px;
    padding: 0.35rem 0;
}
.coach-email:hover { transform: none; box-shadow: none; }

.coach-name,
.contact-coach-name {
    font-size: clamp(1.6rem, 2.15vw, 1.9rem);
    font-weight: 700;
}

.coach-role,
.contact-coach-role {
    --role-color: #9cf8ff;
    --role-soft: rgba(53, 238, 255, 0.16);
    --role-edge: rgba(92, 245, 255, 0.72);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.52rem;
    width: fit-content;
    min-width: 9.8rem;
    margin: 0.45rem auto 0.7rem;
    padding: 0.42rem 0.88rem 0.38rem;
    color: var(--role-color);
    border-top: 1px solid color-mix(in srgb, var(--role-edge) 58%, transparent);
    border-bottom: 1px solid var(--role-edge);
    background: linear-gradient(90deg, transparent 0%, var(--role-soft) 23%, var(--role-soft) 77%, transparent 100%);
    font-family: var(--font-data);
    font-size: clamp(0.76rem, 1vw, 0.9rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    text-shadow: 0 0 10px color-mix(in srgb, var(--role-color) 66%, transparent);
    filter: drop-shadow(0 5px 12px var(--role-soft));
}
.coach-role::before,
.coach-role::after,
.contact-coach-role::before,
.contact-coach-role::after {
    content: '';
    display: block;
    flex: 0 0 auto;
    width: 0.34rem;
    height: 0.34rem;
    border: 1px solid currentColor;
    transform: rotate(45deg);
    box-shadow: 0 0 8px currentColor;
    opacity: 0.84;
}
.coach-role--head,
.contact-coach-role--head {
    --role-color: #ffe08a;
    --role-soft: rgba(255, 181, 62, 0.17);
    --role-edge: rgba(255, 207, 104, 0.78);
}
.coach-role--technical,
.contact-coach-role--technical {
    --role-color: #c4a8ff;
    --role-soft: rgba(133, 94, 255, 0.18);
    --role-edge: rgba(176, 132, 255, 0.8);
}
.member-name {
    font-size: clamp(1.2rem, 1.8vw, 1.45rem);
    font-weight: 750;
}
.member-cn {
    font-size: clamp(0.92rem, 1.2vw, 1.05rem);
    font-weight: 700;
}
.roster-names li {
    font-size: 0.98rem;
    font-weight: 650;
}
.roster-names li .rn-cn {
    font-size: 0.9rem;
    font-weight: 600;
}

/* ---------- Activities as a mission log ---------- */
.activity-block {
    padding: clamp(2rem, 4vw, 3.5rem) 0 0 clamp(1rem, 2.6vw, 2.25rem);
    margin-bottom: clamp(3.5rem, 7vw, 6rem);
    background: transparent;
    border: 0;
    border-top: 1px solid var(--interface-line-strong);
    border-left: 1px solid var(--interface-line);
    border-radius: 0;
    box-shadow: none;
}
.activity-block::before {
    top: -1px;
    left: -1px;
    width: clamp(90px, 18vw, 210px);
    height: 1px;
    background: linear-gradient(90deg, var(--interface-cyan), var(--interface-violet), transparent);
    border-radius: 0;
}
.activity-date {
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--interface-cyan);
    letter-spacing: 0.16em;
}
.activity-title { max-width: 850px; font-size: clamp(1.55rem, 3.2vw, 2.45rem); }
.activity-result {
    padding: 0.4rem 0 0.4rem 1rem;
    background: transparent;
    border: 0;
    border-left: 2px solid var(--interface-amber);
    border-radius: 0;
}

.filter-bar { background: transparent; border-radius: 0; border-bottom: 1px solid var(--interface-line); }
.filter-chip {
    font-family: var(--font-data);
    border-radius: 2px;
    background: rgba(12, 22, 39, 0.42);
    box-shadow: none;
}
.filter-chip[aria-pressed="true"] {
    background: linear-gradient(110deg, rgba(0, 240, 255, 0.13), rgba(165, 123, 255, 0.08));
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.09);
}

/* ---------- Media as an editorial gallery ---------- */
.gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 2.4rem) clamp(1rem, 2vw, 1.5rem);
    margin-top: 2rem;
    counter-reset: gallery-figure;
}
.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: auto;
    overflow: visible;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    counter-increment: gallery-figure;
}
.gallery-item:first-child:not(:only-child) { grid-column: 1 / -1; }
.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    padding: 0.45rem;
    object-fit: cover;
    object-position: center;
    background: rgba(5, 12, 23, 0.76);
    border: 1px solid var(--interface-line-strong);
    filter: brightness(0.94) saturate(0.94);
    transition: border-color 0.25s ease, filter 0.35s ease, transform 0.35s ease;
}
.gallery-item:first-child:not(:only-child) img { aspect-ratio: 16 / 9; }
.gallery-item.is-team-hero img { object-position: center 85%; }
.gallery-item.is-wide {
    grid-column: 1 / -1;
    aspect-ratio: auto !important;
}
.gallery-item.is-wide img {
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
}
.gallery-item.is-portrait {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 720px);
}
.gallery-item.is-portrait:first-child:not(:only-child) img,
.gallery-item.is-portrait img {
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
}
.gallery:has(> .gallery-item:only-child) > .gallery-item,
.gallery-item.is-feature {
    grid-column: 1 / -1;
    justify-self: start;
    width: min(100%, 760px);
}
.gallery-item::before,
.gallery-item::after {
    content: '';
    position: absolute;
    z-index: 2;
    width: 27px;
    height: 27px;
    pointer-events: none;
    transition: width 0.3s ease, height 0.3s ease, filter 0.3s ease;
}
.gallery-item::before {
    top: -5px;
    left: -5px;
    border-top: 1px solid var(--interface-cyan);
    border-left: 1px solid var(--interface-cyan);
}
.gallery-item::after {
    top: -5px;
    right: -5px;
    border-top: 1px solid var(--interface-violet);
    border-right: 1px solid var(--interface-violet);
}
.gallery-item:hover { transform: none; border-color: transparent; box-shadow: none; }
.gallery-item:hover img {
    transform: translateY(-2px);
    filter: brightness(1.03) saturate(1.06);
    border-color: rgba(92, 245, 255, 0.62);
}
.gallery-item:hover::before,
.gallery-item:hover::after { width: 42px; height: 42px; filter: drop-shadow(0 0 6px currentColor); }
.gallery-caption {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    display: block;
    min-height: 2.9rem;
    margin: 0;
    padding: 0.7rem 0 0 3.55rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.45;
    color: #aebfd0;
    background: transparent;
    opacity: 1;
    transform: none;
}
.gallery-caption::before {
    content: 'FIG. ' counter(gallery-figure, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0.82rem;
    font-family: var(--font-data);
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.07em;
    color: var(--interface-amber);
}
.gallery-item:hover .gallery-caption { opacity: 1; transform: none; }

/* Group photographs are mounted plates with notes in the margin, not a pair
   of equal thumbnails. The second plate reverses the reading direction. */
.group-photo-grid { display: block; }
.group-photo {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(250px, 0.65fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: end;
    padding: 2.25rem 0;
    border-top: 1px solid var(--interface-line);
}
.group-photo:nth-child(even) { grid-template-columns: minmax(250px, 0.65fr) minmax(0, 1.85fr); }
.group-photo:nth-child(even) .photo-feature { grid-column: 2; grid-row: 1; }
.group-photo:nth-child(even) figcaption { grid-column: 1; grid-row: 1; }
.group-photo .photo-feature {
    width: 100%;
    aspect-ratio: auto;
    padding: 0.5rem;
    background: rgba(5, 12, 23, 0.72);
    border: 1px solid var(--interface-line-strong);
    border-radius: 0;
    box-shadow: none;
}
.group-photo .photo-feature img {
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: contain;
    filter: brightness(0.96) saturate(0.94);
}
.group-photo .photo-feature:hover { border-color: rgba(92, 245, 255, 0.6); box-shadow: 0 0 26px rgba(92, 245, 255, 0.08); }
.group-photo .photo-feature:hover img { transform: none; filter: brightness(1.02) saturate(1.02); }
.group-photo figcaption {
    align-self: end;
    margin: 0;
    padding: 0 0 0.25rem;
    border-top: 0;
}

/* Narrow margin notes read better ragged-right than with stretched word gaps. */
#page-main .page-content .group-photo figcaption p {
    text-align: left;
    text-align-last: auto;
    text-wrap: pretty;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* ---------- Achievements as a ranked record ---------- */
.honour-grid {
    display: block;
    border-bottom: 1px solid var(--interface-line);
}

.honour-card {
    --rank-accent: #5cf5ff;
    --rank-accent-2: #a57bff;
}

.honour-card,
.honour-card.is-gold,
.honour-card.is-world,
.honour-card.is-robocup {
    display: grid;
    grid-template-columns: minmax(190px, 0.72fr) minmax(0, 2.3fr);
    column-gap: clamp(2rem, 5vw, 5rem);
    padding: clamp(2rem, 4vw, 3rem) 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--interface-line);
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}
.honour-card::before,
.honour-card.is-robocup::before {
    top: -1px;
    left: 0;
    width: clamp(70px, 13vw, 150px);
    height: 1px;
    background: linear-gradient(90deg, var(--interface-cyan), transparent);
}
.honour-card.is-gold::before { background: linear-gradient(90deg, var(--interface-amber), transparent); }
.honour-card.is-world::before { background: linear-gradient(90deg, var(--interface-cyan), var(--interface-violet), transparent); }
.honour-card:hover,
.honour-card.is-gold:hover,
.honour-card.is-robocup:hover { transform: none; border-color: rgba(92, 245, 255, 0.32); box-shadow: none; }

/* The same armoured result plate appears here and inside the Home reel. */
.honour-rank,
.activity-result-badge {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    padding: 1rem 0.85rem 1.72rem;
    overflow: hidden;
    color: #f7fdff;
    background:
        linear-gradient(145deg, rgba(10, 24, 42, 0.97), rgba(4, 7, 17, 0.96)) padding-box,
        linear-gradient(132deg, var(--rank-accent), rgba(255, 255, 255, 0.12) 35%, var(--rank-accent-2) 70%, var(--rank-accent)) border-box;
    border: 1px solid transparent;
    clip-path: polygon(11px 0, calc(100% - 15px) 0, 100% 15px, 100% calc(100% - 11px), calc(100% - 11px) 100%, 15px 100%, 0 calc(100% - 15px), 0 11px);
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.045em;
    text-align: center;
    text-transform: uppercase;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6),
        0 0 9px color-mix(in srgb, var(--rank-accent) 76%, transparent),
        0 0 26px color-mix(in srgb, var(--rank-accent-2) 40%, transparent);
    -webkit-text-stroke: 0.42px rgba(238, 253, 255, 0.9);
    box-shadow:
        inset 0 0 0 5px rgba(2, 6, 15, 0.76),
        inset 0 0 34px color-mix(in srgb, var(--rank-accent) 13%, transparent);
    filter:
        drop-shadow(0 0 8px color-mix(in srgb, var(--rank-accent) 24%, transparent))
        drop-shadow(0 10px 24px rgba(0, 0, 0, 0.42));
}

.honour-rank::before,
.activity-result-badge::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: -45% -100%;
    opacity: 0.7;
    background: linear-gradient(105deg, transparent 38%, color-mix(in srgb, var(--rank-accent) 62%, transparent) 48%, rgba(255, 255, 255, 0.78) 50%, color-mix(in srgb, var(--rank-accent-2) 55%, transparent) 52%, transparent 62%);
    transform: translateX(-34%) skewX(-12deg);
    animation: rank-energy-sweep 4.8s cubic-bezier(0.55, 0.02, 0.24, 1) infinite;
    animation-play-state: paused;
}

.honour-card.is-sweep-visible .honour-rank::before,
.activity-slide.is-sweep-visible .activity-result-badge::before { animation-play-state: running; }

.honour-rank::after,
.activity-result-badge::after {
    content: 'RESULT // VERIFIED';
    position: absolute;
    right: 0.58rem;
    bottom: 0.38rem;
    left: 0.58rem;
    padding-top: 0.34rem;
    border-top: 1px solid color-mix(in srgb, var(--rank-accent) 36%, transparent);
    font-family: var(--font-data);
    font-size: 0.42rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.13em;
    color: color-mix(in srgb, var(--rank-accent) 84%, #fff);
    text-align: left;
    text-shadow: none;
    -webkit-text-stroke: 0;
}

.honour-rank {
    grid-column: 1;
    grid-row: 1 / span 4;
    align-self: start;
    margin: 0;
    width: 100%;
    min-height: 132px;
    font-size: clamp(2rem, 3.3vw, 3.1rem);
}
.honour-card.is-robocup .honour-rank {
    width: 100%;
    color: #f7fdff;
    background:
        linear-gradient(145deg, rgba(10, 24, 42, 0.97), rgba(4, 7, 17, 0.96)) padding-box,
        linear-gradient(132deg, var(--rank-accent), rgba(255, 255, 255, 0.12) 35%, var(--rank-accent-2) 70%, var(--rank-accent)) border-box;
    background-clip: padding-box, border-box;
    -webkit-background-clip: padding-box, border-box;
    -webkit-text-fill-color: #f7fdff;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6),
        0 0 9px color-mix(in srgb, var(--rank-accent) 76%, transparent),
        0 0 26px color-mix(in srgb, var(--rank-accent-2) 40%, transparent);
}
.honour-card.is-status .honour-rank {
    font-size: clamp(1.35rem, 2.4vw, 2.05rem);
    letter-spacing: -0.025em;
}
.honour-card:hover .honour-rank {
    filter:
        drop-shadow(0 0 13px color-mix(in srgb, var(--rank-accent) 44%, transparent))
        drop-shadow(0 13px 30px rgba(0, 0, 0, 0.5));
}
.honour-card > .pill,
.honour-event,
.honour-detail,
.honour-foot { grid-column: 2; }
.honour-card > .pill { justify-self: start; }
.honour-event { font-size: clamp(1.08rem, 2vw, 1.35rem); }
.honour-detail { max-width: 780px; color: #a6b5c8; }
.honour-foot { border-top: 1px solid rgba(148, 163, 184, 0.1); }

@keyframes rank-energy-sweep {
    0%, 14% { transform: translateX(-38%) skewX(-12deg); opacity: 0; }
    25% { opacity: 0.76; }
    47%, 100% { transform: translateX(38%) skewX(-12deg); opacity: 0; }
}

.result-table-wrap {
    background: transparent;
    border: 0;
    border-top: 1px solid var(--interface-line-strong);
    border-bottom: 1px solid var(--interface-line);
    border-radius: 0;
    box-shadow: none;
}
.result-table thead { background: rgba(92, 245, 255, 0.025); }
.result-table th { font-size: 0.67rem; letter-spacing: 0.1em; color: #59edf8; }
.result-table td { font-size: 0.9rem; line-height: 1.55; color: #b8c5d5; }
.result-table tr:last-child td { border-bottom: 0; }

.callout,
.press-link {
    padding: 1.25rem 0 1.25rem clamp(1rem, 2vw, 1.5rem);
    background: transparent;
    border: 0;
    border-left: 1px solid var(--interface-line-strong);
    border-radius: 0;
    box-shadow: none;
}
.press-link:hover { transform: none; background: rgba(92, 245, 255, 0.025); border-color: var(--interface-cyan); }

/* ---------- Connect as a compact communications directory ---------- */
.connect-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 1rem;
    row-gap: 0;
    align-items: center;
    padding: 1.4rem 0;
    text-align: left;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--interface-line);
    border-radius: 0;
    box-shadow: none;
}
.connect-card:hover { transform: none !important; border-color: rgba(92, 245, 255, 0.48); box-shadow: none; }
.connect-icon {
    grid-column: 1;
    grid-row: 1;
    width: 42px;
    height: 42px;
    margin: 0;
    border-radius: 50%;
    font-size: 1.1rem;
    box-shadow: none;
}
.connect-card:hover .connect-icon { transform: none; }
.connect-title { grid-column: 2; grid-row: 1; margin: 0; }
.connect-desc {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    margin: 1rem 0 0;
    hyphens: none;
    overflow-wrap: normal;
    word-break: normal;
}
/* These descriptions sit in one-third-width columns. Full justification
   stretches the few words on each line too far apart, so keep a natural
   ragged edge while retaining balanced wrapping. */
#page-main .page-content .connect-card .connect-desc {
    text-align: left;
    text-align-last: auto;
    text-wrap: pretty;
    hyphens: none;
    -webkit-hyphens: none;
}
.connect-btn {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: start;
    max-width: 100%;
    margin-top: 1rem;
    padding: 0.25rem 0;
    border: 0;
    border-bottom: 1px solid rgba(92, 245, 255, 0.42);
    border-radius: 0;
    overflow-wrap: anywhere;
}
.connect-card:hover .connect-btn { background: transparent; color: #fff; box-shadow: none; }

.site-footer { background: rgba(3, 6, 13, 0.84); }

/* The mini-game keeps one bounded play surface; the surrounding site chrome
   still follows the editorial system. */
.game-screen { box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38); }
.glossary-table-wrap {
    padding: 1rem 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--interface-line);
    border-radius: 0;
}
.glossary-th { font-family: var(--font-data); }

@media (max-width: 991.98px) {
    .brand-name { font-size: 0.88rem; }
    .activity-showcase__head { grid-template-columns: minmax(240px, 0.7fr) minmax(300px, 1.3fr); gap: 2.5rem; }
}

@media (max-width: 767.98px) {
    .top-bar { padding: 0.98rem 0 0.45rem; }
    .tab-nav { top: 62px; }
    .page-content { padding-top: 2.7rem; }
    .section { margin-bottom: 4.2rem; }
    .activity-block { padding-left: 1rem; }
    .honour-card,
    .honour-card.is-gold,
    .honour-card.is-world,
    .honour-card.is-robocup { display: block; }
    .honour-rank,
    .honour-card.is-robocup .honour-rank { width: min(230px, 100%); margin-bottom: 1.35rem; }
    .activity-showcase__head { display: block; }
    .activity-showcase__head .section-intro { margin-top: 1.25rem; }
    .activity-loop { width: calc(100vw - 0.75rem); }
    .activity-slide {
        display: block;
        width: min(88vw, 390px);
        min-height: 0;
        padding: 1rem 2.15rem 1.15rem 0.9rem;
    }
    .activity-result-badge {
        width: min(230px, 100%);
        min-height: 104px;
        margin-bottom: 1.15rem;
        font-size: 1.9rem;
    }
    .activity-result-badge.is-status { font-size: 1.22rem; }
    .activity-showcase__foot { align-items: flex-end; }
    .connect-card { grid-template-columns: 42px minmax(0, 1fr); }
    .gallery { grid-template-columns: 1fr; }
    .gallery-item,
    .gallery-item:first-child:not(:only-child),
    .gallery-item.is-wide,
    .gallery-item.is-feature { grid-column: 1; width: 100%; }
    .gallery-item:first-child:not(:only-child) img { aspect-ratio: 4 / 3; }
    .group-photo,
    .group-photo:nth-child(even) {
        display: block;
        padding: 1.6rem 0 2.2rem;
    }
    .group-photo .photo-feature { margin-bottom: 1rem; }
    .group-photo:nth-child(even) .photo-feature,
    .group-photo:nth-child(even) figcaption { grid-column: auto; grid-row: auto; }
    .robot-ghost { width: min(var(--ghost-width), 42vw); }
    .robot-ghost__core { opacity: 0.08; }
    .robot-ghost__spectre { opacity: 0.5; }
    .robot-ghost__spectre--magenta { opacity: 0.32; }
    .robot-ghost__scan { opacity: 0.44; }
    .edge-field { opacity: 0.7; }
    .edge-field__side--left,
    .edge-field__side--right { width: 7px; }
    .edge-field__side--top,
    .edge-field__side--bottom { height: 7px; }
    .edge-field__side::after { width: 6px; height: 6px; }
}

@media (max-width: 575.98px) {
    .brand-name { display: none; }
    .social-link-named span { display: none; }
    .tab-btn { padding-inline: 0.72rem; font-size: 0.76rem; }
    .activity-loop { padding-top: 2.55rem; }
    .activity-loop::before,
    .activity-loop::after { width: 24px; }
    .activity-slide {
        width: min(88vw, 345px);
        padding: 0.85rem 1.8rem 1rem 0.75rem;
    }
    .activity-result-badge {
        width: min(210px, 100%);
        min-height: 92px;
        margin-bottom: 0.9rem;
        padding-inline: 0.7rem;
        font-size: 1.65rem;
    }
    .activity-result-badge.is-status { font-size: 1.08rem; }
    .activity-slide__title { font-size: 0.98rem; }
    .activity-showcase__foot { display: grid; justify-items: start; }
    .activity-showcase__foot .btn { justify-self: stretch; }
    .line-grid { gap: 3.5rem; }
    .activity-title { font-size: 1.45rem; }
    .hero-inner { padding-inline: 0.85rem; }
    .hero-title { font-size: clamp(2.5rem, 11.4vw, 2.9rem); line-height: 1; }
    .hero-sub { font-size: 0.94rem; line-height: 1.58; }
    .robot-atmosphere__grid { opacity: 0.14; }
}

@media (prefers-reduced-motion: reduce) {
    .robot-atmosphere__grid,
    .robot-atmosphere__aurora,
    .robot-atmosphere__orbit,
    .robot-atmosphere__scan,
    .edge-field,
    .edge-field::before,
    .edge-field::after,
    .edge-field__side,
    .edge-field__side::before,
    .edge-field__side::after,
    .edge-field__side i,
    .edge-field__side b,
    .edge-field__side b::after,
    .activity-loop__track,
    .activity-loop__status i,
    .honour-rank::before,
    .activity-result-badge::before { animation: none !important; }
    .robot-atmosphere__scan,
    .robot-ghost { display: none; }
    .activity-loop__toggle { display: none; }
}

@media print {
    .robot-atmosphere,
    .edge-field { display: none !important; }
}
