/* Nest | 2026 refresh
   The dark, translucent cards and shrinking navbar deliberately echo Krummium.
   Nest keeps its own cyan accent, technical typefaces, and animated Info background.
*/
@font-face { font-family: NestStacker; src: url('../Fonts/Stacker.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: NestXirod; src: url('../Fonts/Xirod.otf') format('opentype'); font-display: swap; }
:root {
    color-scheme: dark;
    --bg: #121821;
    --panel: rgba(27, 32, 41, .9);
    --panel-deep: rgba(18, 24, 32, .86);
    --line: rgba(217, 237, 255, .16);
    --text: #f1f6fa;
    --muted: #b8c7d2;
    --accent: #9fdef4;
    --accent-strong: #6bc6e7;
    --radius: 22px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 280px;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    background: var(--bg);
    font: 1rem/1.7 system-ui, -apple-system, 'Segoe UI', sans-serif;
    cursor: url('../Images/Cursor.png'), auto;
}
.site-background {
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background:
        radial-gradient(ellipse at 76% 10%, rgba(40, 108, 137, .19), transparent 44%),
        radial-gradient(ellipse at 5% 70%, rgba(55, 64, 105, .2), transparent 45%),
        linear-gradient(150deg, #171e2a 0%, #111720 60%, #14191f 100%);
}
a { color: var(--accent); text-underline-offset: 3px; cursor: url('../Images/Pointer.png'), pointer; }
a:hover { color: #d4f2ff; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: url('../Images/Pointer.png'), pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3 { color: var(--text); line-height: 1.25; }
h1 { font-family: NestXirod, system-ui, sans-serif; font-size: clamp(2rem, 4.5vw, 4.4rem); font-weight: 400; letter-spacing: -.025em; }
h2 { font-size: clamp(1.4rem, 2.2vw, 2rem); margin: 0 0 .95rem; }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1.1rem; color: var(--muted); }
img { max-width: 100%; height: auto; }
.eyebrow { margin: 0 0 .8rem; color: var(--accent); font: 700 .78rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: uppercase; letter-spacing: .15em; }
/* Desktop: edge-to-edge at top, narrower and rounded after scrolling. */
.site-nav {
    position: fixed; z-index: 50; top: 0; left: 50%; transform: translateX(-50%);
    width: 100%; height: 82px;
    background: rgba(15, 20, 28, .24); border: 1px solid transparent;
    transition: width 500ms ease, top 500ms ease, border-radius 500ms ease, background 350ms ease, box-shadow 350ms ease;
}
.site-nav.is-scrolled {
    top: 12px; width: min(94vw, 1380px); border-radius: 20px;
    background: rgba(30, 35, 44, .94); border-color: var(--line);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .35); backdrop-filter: blur(14px);
}
.site-nav-inner { width: 100%; height: 100%; padding: 0 clamp(1rem, 3vw, 3.2rem); display: flex; justify-content: space-between; gap: 2rem; align-items: center; }
.site-brand { display: inline-flex; align-items: center; gap: .8rem; white-space: nowrap; color: #fff; text-decoration: none; }
.site-brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 8px; }
.site-brand span { font: clamp(1.55rem, 2.1vw, 2.1rem)/1 NestStacker, system-ui, sans-serif; letter-spacing: .045em; }
@keyframes nest-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.nest-ready .hero-inner { animation: nest-enter 550ms ease-out both; }
.site-menu { display: flex; justify-content: flex-end; align-items: center; gap: clamp(.25rem, 1.1vw, 1rem); }
.site-menu > a, .nav-logout button {
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid transparent; border-radius: 11px; padding: .64rem .94rem;
    color: #e2eaf0; background: transparent; text-decoration: none;
    font: 500 .93rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
    transition: background 180ms ease, color 180ms ease;
}
.site-menu > a:hover, .nav-logout button:hover, .site-menu > a[aria-current='page'] { color: #fff; background: rgba(255,255,255,.10); }
.site-menu > a.nav-login { border-color: rgba(159,222,244,.43); color: var(--accent); background: rgba(61,120,146,.16); }
.nav-logout { display: contents; }
.menu-toggle { display: none; }
.site-content { position: relative; z-index: 3; min-height: 100vh; display: flex; flex-direction: column; }
.page-main { width: min(95vw, 1600px); margin: 0 auto; padding: 125px 0 3rem; flex: 1; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1.5rem; width: min(95vw, 1600px); margin: auto auto 0; padding: 1.6rem .25rem 2.1rem; border-top: 1px solid var(--line); color: #99a9b6; font-size: .9rem; }
.site-footer a { text-decoration: none; }
/* Common project cards */
.panel { background: var(--panel); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.22); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2.5rem); backdrop-filter: blur(6px); }
.panel p:last-child { margin-bottom: 0; }
.hero { min-height: min(740px, 78vh); padding: 3rem clamp(1rem, 4vw, 4rem) 4rem; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(220px,.75fr); align-items: center; gap: 2rem; }
.hero-inner { max-width: 770px; }
.hero h1 { font-size: clamp(2.55rem, 5.3vw, 5.4rem); margin: .3rem 0 1.6rem; }
.hero h1 span { color: var(--accent); }
.hero-lead { font-size: clamp(1rem, 1.45vw, 1.22rem); max-width: 74ch; line-height: 1.85; }
.hero-visual { justify-self: center; display: grid; place-items: center; width: min(100%, 370px); aspect-ratio: 1; padding: 9%; border: 1px solid rgba(160,223,245,.20); border-radius: 35%; background: radial-gradient(circle, rgba(67,137,164,.16) 0%, rgba(21,29,39,.3) 68%, transparent 75%); box-shadow: 0 0 100px rgba(63,119,149,.13); }
.hero-visual img { width: 100%; filter: drop-shadow(0 12px 30px rgba(0,0,0,.4)); }
.actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-top: 1.7rem; }
.button, input[type=submit] { display: inline-flex; justify-content: center; align-items: center; gap: .4rem; min-height: 44px; padding: .76rem 1.15rem; border: 1px solid rgba(255,255,255,.28); border-radius: 12px; background: rgba(42, 51, 63, .85); color: #fff; text-decoration: none; font-size: .94rem; font-weight: 600; line-height: 1.35; cursor: pointer; transition: transform 170ms ease, background 170ms ease, border-color 170ms ease; }
.button:hover, input[type=submit]:hover { background: rgba(60, 78, 93, .94); color: #fff; transform: translateY(-1px); }
.button-primary, input[type=submit].button-primary { background: rgba(29, 94, 125, .81); border-color: rgba(160,223,245,.65); }
.button-secondary { background: rgba(32, 38, 48, .74); }
.button-danger { background: rgba(124,39,45,.55); border-color: rgba(255,132,132,.45); }
.button-small { font-size: .84rem; padding: .48rem .8rem; min-height: 38px; }
.text-link { color: var(--accent); text-decoration: none; font: 600 .93rem ui-monospace, SFMono-Regular, Consolas, monospace; }
.text-link:hover { text-decoration: underline; }
.panel-strip { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem; margin: 0 0 3rem; }
.intro-panel { min-height: 265px; display: flex; flex-direction: column; }
.intro-panel .text-link { margin-top: auto; }
.page-hero { padding: clamp(2rem, 5vw, 4rem) clamp(.25rem, 2vw, 2rem) 3.1rem; }
.page-hero-center { text-align: center; max-width: 950px; margin: 0 auto; }
.page-hero h1 { margin: 0 0 1.2rem; }
.page-hero-center .hero-lead { margin-inline: auto; }
.page-hero-compact { padding-block: 1.75rem; }
.page-main > .panel { margin-bottom: 1.5rem; }
.split-panel { display: grid; grid-template-columns: minmax(0,1fr) minmax(230px,.83fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.split-panel p { max-width: 74ch; }
.media-frame { margin: 0; padding: .8rem; background: rgba(8,14,21,.56); border: 1px solid var(--line); border-radius: 16px; text-align: center; }
.media-frame img { display: block; width: 100%; max-height: 380px; object-fit: contain; border-radius: 10px; }
.media-frame figcaption { color: #9dabb7; font-size: .85rem; margin-top: .6rem; }
.step-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; padding: 0; margin: 1.2rem 0 0; list-style: none; counter-reset: steps; }
.step-grid li { counter-increment: steps; padding: 1.2rem; background: var(--panel-deep); border: 1px solid var(--line); border-radius: 14px; }
.step-grid li::before { content: '0' counter(steps); display: block; color: var(--accent); font: 700 .8rem/1.5 ui-monospace, monospace; margin-bottom: .7rem; }
.step-grid strong, .step-grid span { display: block; }
.step-grid strong { margin-bottom: .45rem; color: var(--text); }
.step-grid span { font-size: .92rem; color: var(--muted); }
.section-intro { max-width: 80ch; }
.hardware-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.1rem; }
.hardware-card { min-width: 0; overflow: hidden; background: var(--panel-deep); border: 1px solid var(--line); border-radius: 15px; }
.hardware-image { background: rgba(14,20,29,.72); height: 225px; overflow: hidden; display: grid; place-items: center; padding: 1.2rem; }
.hardware-image img { width: 100%; height: 100%; object-fit: contain; }
.hardware-card > div:last-child { padding: 1.1rem 1.25rem 1.4rem; }
.hardware-card h3 { margin: 0 0 .7rem; }
.hardware-card p:last-child { margin-bottom: 0; font-size: .95rem; }
/* Let the star/smoke visual sit behind the page, without blocking navigation or links. */
.effect-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
#cursorSmoke { opacity: .44; }
#ambientStars { opacity: .66; }
body.nest-info .site-background { opacity: .83; }
body.nest-info .page-main { padding-top: 135px; }
/* Authentication + private tools */
.auth-wrap { display: grid; place-items: center; min-height: min(75vh, 760px); padding: 1rem 0 3rem; }
.auth-panel { width: min(100%, 480px); }
.auth-panel h1 { font-size: clamp(2rem, 3.5vw, 3rem); margin: 0 0 .5rem; }
.auth-intro { margin-bottom: 1.7rem; }
.stacked-form { display: grid; gap: 1.15rem; margin-bottom: 1.6rem; }
.form-field { display: grid; gap: .4rem; }
.form-field label { font-size: .92rem; font-weight: 600; }
.form-field input { width: 100%; min-width: 0; border-radius: 10px; border: 1px solid rgba(216,236,248,.26); color: #fff; background: rgba(9,14,21,.65); padding: .75rem .9rem; outline: none; }
.form-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(159,222,244,.1); }
.form-submit { width: 100%; margin-top: .2rem; }
.check-field { display: flex; align-items: center; gap: .7rem; color: var(--text); }
.check-field input { width: 19px; height: 19px; accent-color: var(--accent-strong); }
.form-error { color: #ffd5d5; }
.status-chip { display: inline-flex; padding: .3rem .7rem; color: #c8ecff; border: 1px solid rgba(154,220,246,.32); border-radius: 999px; background: rgba(40,95,125,.19); font-size: .82rem; }
.service-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.service-card { position: relative; display: grid; gap: .15rem; min-height: 160px; padding: 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-deep); color: var(--text); text-decoration: none; transition: background 180ms ease, transform 180ms ease; }
.service-card:hover { background: rgba(36,54,67,.9); color: #fff; transform: translateY(-2px); }
.service-card strong { font-size: 1.2rem; }
.service-card > span:not(.service-icon):not(.service-arrow) { color: var(--muted); }
.service-icon { font-size: 1.6rem; color: var(--accent); }
.service-arrow { position: absolute; right: 1.2rem; top: 1rem; color: var(--accent); }
/* Admin-only cluster node links: native details/summary, no JavaScript required. */
.node-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.node-dropdown { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-deep); }
.node-dropdown[open] { border-color: rgba(159,222,244,.42); }
.node-dropdown-toggle { display: flex; align-items: center; gap: .7rem; min-height: 76px; padding: 1.2rem; cursor: pointer; list-style: none; user-select: none; }
.node-dropdown-toggle::-webkit-details-marker { display: none; }
.node-dropdown-toggle:hover { background: rgba(36,54,67,.6); }
.node-dropdown-title { font-size: 1.13rem; font-weight: 700; color: var(--text); }
.node-dropdown-count { margin-left: auto; white-space: nowrap; color: var(--muted); font-size: .78rem; }
.node-dropdown-chevron { width: 9px; height: 9px; flex: none; margin: 0 .2rem 4px .2rem; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform 160ms ease; }
.node-dropdown[open] .node-dropdown-chevron { transform: rotate(225deg); margin-top: 5px; margin-bottom: 0; }
.node-dropdown-body { display: grid; gap: .5rem; padding: 0 1.2rem 1.2rem; }
.node-management-link { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 44px; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.035); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.node-management-link:hover { color: #fff; border-color: rgba(159,222,244,.42); background: rgba(56,86,104,.34); }
.node-management-link span:last-child { flex: none; color: var(--accent); }
.node-dropdown-empty { margin: 0; font-size: .88rem; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.table-scroll { overflow-x: auto; }
.user-table { width: 100%; border-collapse: collapse; }
.user-table th, .user-table td { padding: 1rem .8rem; border-bottom: 1px solid var(--line); text-align: left; }
.user-table th { color: var(--accent); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.table-actions { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.table-actions form { margin: 0; }
.error-layout { min-height: 65vh; display: grid; place-items: center; }
.error-panel { text-align: center; width: min(100%,700px); }
.error-panel h1 { font-size: clamp(3.5rem, 9vw, 7rem); margin: 0 0 1rem; }
.flash-region { position: fixed; z-index: 60; top: 96px; right: max(2.5vw, 1rem); max-width: min(90vw, 460px); border: 1px solid rgba(252,206,118,.52); background: #24252a; color: #ffe4ab; padding: .8rem 1.1rem; border-radius: 14px; box-shadow: 0 14px 30px rgba(0,0,0,.45); transition: opacity 2s ease; }
.flash-region p { color: inherit; margin: .2rem; }
@media(max-width: 1050px) { .step-grid, .node-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width: 820px) {
    .site-nav, .site-nav.is-scrolled { top: 0; width: 100%; height: 72px; border-radius: 0; background: rgba(24,30,40,.96); border: 0; box-shadow: 0 4px 24px rgba(0,0,0,.28); }
    .site-nav-inner { padding: 0 1rem; }
    .site-brand img { width: 39px; height: 39px; }
    .menu-toggle { display: flex; width: 44px; height: 44px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.06); }
    .menu-toggle span { width: 20px; height: 2px; background: #fff; border-radius: 2px; }
    .site-menu { display: none; position: absolute; top: 76px; right: 12px; width: min(300px, calc(100vw - 24px)); align-items: stretch; flex-direction: column; gap: .15rem; padding: .65rem; border-radius: 16px; border: 1px solid var(--line); background: rgba(32,39,50,.98); box-shadow: 0 18px 45px rgba(0,0,0,.5); }
    .site-menu.is-open { display: flex; }
    .site-menu > a, .nav-logout button { justify-content: flex-start; min-height: 44px; width: 100%; text-align: left; }
    .nav-logout { display: block; }
    .nav-logout button { display: block; }
    .page-main { padding-top: 96px; }
    .hero { min-height: auto; grid-template-columns: 1fr; padding: 2rem 1rem 3rem; gap: 2rem; }
    .hero-visual { grid-row: 1; width: min(52vw, 215px); }
    .hero-inner { text-align: center; margin-inline: auto; }
    .hero .actions { justify-content: center; }
    .panel-strip { grid-template-columns: 1fr; }
    .split-panel, .hardware-grid { grid-template-columns: 1fr; }
    .hardware-card { display: grid; grid-template-columns: minmax(140px, 35%) 1fr; }
    .hardware-image { height: 100%; min-height: 180px; }
    .page-hero { padding: 2rem .5rem; }
}
@media(max-width: 560px) {
    .page-main { width: 94vw; }
    .panel { border-radius: 17px; padding: 1.2rem; }
    .hero { padding: 1rem 0 2.5rem; }
    .hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
    .actions { flex-direction: column; align-items: stretch; }
    .actions > a { width: 100%; }
    .step-grid { grid-template-columns: 1fr; }
    .hardware-card { display: block; }
    .hardware-image { height: 210px; }
    .service-grid, .node-grid { grid-template-columns: 1fr; }
    .site-footer { justify-content: center; text-align: center; }
}
@media(prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
