/* ALROTEC house palette — same tokens as the AIOT campus surfaces so a visitor
   moving between them recognises one system, not two websites. */
:root {
    --hg-navy: #0a2f72;
    --hg-blue: #1559ba;
    --hg-blue-2: #2676e3;
    --hg-ink: #111c32;
    --hg-mute: #4a5c78;
    --hg-line: #d8e4f5;
    --hg-gold: #f8c541;
    --hg-good: #16794f;
    --hg-good-soft: #e7f6ee;
    --hg-warn: #a45a05;
    --hg-warn-soft: #fff4e2;
    --hg-bad: #c62828;
    --hg-bad-soft: #fff1f1;
    --hg-page: #f7faff;
    --hg-card: #ffffff;
    --hg-radius: 8px;
    --hg-shadow: 0 18px 40px -28px rgba(8, 39, 91, .55);
    --hg-j-percent: 0%;
    --hg-j-state: var(--hg-line);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* The house type stack belongs to every skin, not only the light shell. The
   projection, live-slide and console pages carry their own body class, and
   without this they fell back to the browser's serif default on a wall. */
body {
    margin: 0;
    font: 400 16px/1.62 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

body.hg-shell {
    background: var(--hg-page);
    color: var(--hg-ink);
}

a { color: var(--hg-blue); }

.hg-skip {
    position: absolute; left: -9999px; top: 0; z-index: 60;
    background: var(--hg-gold); color: var(--hg-ink); font-weight: 800;
    padding: .7rem 1.1rem; border-radius: 0 0 var(--hg-radius) 0; text-decoration: none;
}
.hg-skip:focus { left: 0; }

/* ---------- header ---------- */
.hg-topbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem;
    padding: .85rem clamp(1rem, 4vw, 2.4rem);
    background: var(--hg-navy); color: #eaf2ff;
    border-bottom: 3px solid var(--hg-gold);
}
.hg-brand { display: flex; align-items: center; gap: .7rem; margin-right: auto; text-decoration: none; color: inherit; }
.hg-brand-mark {
    width: 42px; height: 42px; flex: none; border-radius: 10px;
    background: linear-gradient(140deg, var(--hg-gold), #ffe08a);
    color: var(--hg-navy); font-weight: 900; font-size: 1.05rem;
    display: grid; place-items: center; letter-spacing: -.04em;
}
.hg-brand strong { display: block; font-size: 1.02rem; line-height: 1.15; font-weight: 850; }
.hg-brand span { display: block; font-size: .74rem; color: #a9c6f2; letter-spacing: .02em; }
.hg-nav { display: flex; flex-wrap: wrap; gap: .15rem 1.1rem; font-weight: 700; font-size: .93rem; }
.hg-nav a { color: #dbeaff; text-decoration: none; padding: .35rem .1rem; border-bottom: 2px solid transparent; }
.hg-nav a:hover, .hg-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--hg-gold); }

/* ---------- connection chip ---------- */
.hg-net {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .4rem .8rem; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .09);
    font-size: .8rem; font-weight: 750; letter-spacing: .01em; white-space: nowrap;
}
.hg-net i { width: 9px; height: 9px; border-radius: 50%; background: #7fe0a8; flex: none; box-shadow: 0 0 0 3px rgba(127, 224, 168, .22); }
.hg-net[data-state="offline"] { border-color: rgba(248, 197, 65, .6); background: rgba(248, 197, 65, .16); color: #ffe9ad; }
.hg-net[data-state="offline"] i { background: var(--hg-gold); box-shadow: 0 0 0 3px rgba(248, 197, 65, .26); }

/* ---------- hero ---------- */
.hg-hero {
    background: linear-gradient(115deg, #0a2f72 0%, #1559ba 58%, #2676e3 100%);
    color: #fff; padding: clamp(2.1rem, 5vw, 3.6rem) clamp(1rem, 4vw, 2.4rem) clamp(2.4rem, 5vw, 3.8rem);
}
.hg-hero-inner { max-width: 1080px; margin: 0 auto; }
.hg-kicker {
    display: inline-block; font-size: .76rem; font-weight: 850; letter-spacing: .13em;
    text-transform: uppercase; color: var(--hg-gold); margin-bottom: .85rem;
}
.hg-hero h1 { margin: 0 0 .8rem; font-size: clamp(1.9rem, 4.3vw, 3.15rem); line-height: 1.07; font-weight: 880; max-width: 21ch; }
.hg-hero h1 span { color: var(--hg-gold); }
.hg-hero p { margin: 0 0 1.3rem; max-width: 66ch; color: #dcebff; font-size: clamp(1rem, 1.5vw, 1.12rem); }
.hg-hero-meta { display: flex; flex-wrap: wrap; gap: .5rem; }
.hg-chip {
    border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1);
    color: #eaf3ff; border-radius: 999px; padding: .34rem .8rem; font-size: .79rem; font-weight: 700;
}

/* ---------- layout ---------- */
.hg-main { max-width: 1080px; margin: 0 auto; padding: clamp(1.4rem, 3vw, 2.6rem) clamp(1rem, 4vw, 2.4rem) 3rem; }
.hg-section { margin-bottom: 2.1rem; }
.hg-section > h2 { margin: 0 0 .55rem; font-size: clamp(1.25rem, 2.4vw, 1.65rem); color: var(--hg-navy); }
.hg-section > p { margin: 0 0 1rem; color: var(--hg-mute); max-width: 74ch; }
.hg-lede { font-size: 1.06rem; color: var(--hg-ink); max-width: 74ch; }

.hg-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.hg-card {
    background: var(--hg-card); border: 1px solid var(--hg-line); border-radius: var(--hg-radius);
    padding: 1.15rem 1.25rem; box-shadow: var(--hg-shadow);
}
.hg-card h3 { margin: 0 0 .4rem; font-size: 1.02rem; color: var(--hg-navy); }
.hg-card p { margin: 0; font-size: .93rem; color: var(--hg-mute); }

/* ---------- persona chooser ---------- */
.hg-persona { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-bottom: 1.2rem; }
.hg-persona label {
    display: flex; gap: .7rem; align-items: flex-start; cursor: pointer;
    background: var(--hg-card); border: 1.5px solid var(--hg-line); border-radius: var(--hg-radius);
    padding: .9rem 1rem; transition: border-color .16s ease, background .16s ease;
}
.hg-persona label:hover { border-color: var(--hg-blue-2); }
.hg-persona input { margin-top: .28rem; accent-color: var(--hg-blue); width: 17px; height: 17px; flex: none; }
.hg-persona input:checked + span { color: var(--hg-navy); }
.hg-persona label:has(input:checked) { border-color: var(--hg-blue); background: #eef5ff; }
.hg-persona b { display: block; font-size: .95rem; }
.hg-persona small { display: block; color: var(--hg-mute); font-size: .82rem; line-height: 1.45; }

/* ---------- journey shell ---------- */
.hg-journey {
    background: var(--hg-card); border: 1px solid var(--hg-line); border-radius: 12px;
    box-shadow: var(--hg-shadow); overflow: hidden;
}
.hg-j-progress { position: relative; height: 9px; background: #e8eefb; }
.hg-j-progress i {
    position: absolute; inset: 0 auto 0 0; width: var(--hg-j-percent);
    background: linear-gradient(90deg, var(--hg-navy), var(--hg-blue) 55%, var(--hg-gold));
    border-radius: 0 6px 6px 0; transition: width .34s cubic-bezier(.4, 0, .2, 1);
}
.hg-j-body { padding: clamp(1.05rem, 2.6vw, 1.7rem); }

.hg-j-steps { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.15rem; list-style: none; padding: 0; }
.hg-j-steps li {
    display: flex; align-items: center; gap: .45rem; font-size: .84rem; font-weight: 750;
    color: var(--hg-mute); background: #f1f5fc; border: 1px solid var(--hg-line);
    border-radius: 999px; padding: .34rem .8rem .34rem .45rem;
}
.hg-j-steps li b {
    width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center;
    background: #cfdcef; color: var(--hg-ink); font-size: .76rem;
}
.hg-j-steps li[data-state="current"] { color: var(--hg-navy); background: #e6f0ff; border-color: var(--hg-blue-2); }
.hg-j-steps li[data-state="current"] b { background: var(--hg-blue); color: #fff; }
.hg-j-steps li[data-state="done"] { color: var(--hg-good); background: var(--hg-good-soft); border-color: #b7e2ca; }
.hg-j-steps li[data-state="done"] b { background: var(--hg-good); color: #fff; }
.hg-j-steps li[data-state="bad"] { color: var(--hg-warn); background: var(--hg-warn-soft); border-color: #f0cf9a; }
.hg-j-steps li[data-state="bad"] b { background: var(--hg-warn); color: #fff; }

.hg-j-where { margin: 0 0 1.15rem; font-size: .9rem; color: var(--hg-mute); }
.hg-j-where b { color: var(--hg-navy); }

.hg-j-panel[hidden] { display: none; }
.hg-j-panel h2 { margin: 0 0 .3rem; font-size: clamp(1.2rem, 2.6vw, 1.55rem); color: var(--hg-navy); outline: none; }
.hg-j-panel h2:focus-visible { outline: 3px solid rgba(39, 121, 232, .32); outline-offset: 3px; border-radius: 4px; }
.hg-j-panel h2::after { content: ""; display: block; width: 54px; height: 3px; margin-top: .45rem; background: var(--hg-j-state); border-radius: 2px; }
.hg-j-panel > p.hg-j-hint { margin: .6rem 0 1.2rem; color: var(--hg-mute); font-size: .95rem; max-width: 68ch; }

.hg-j-grid { display: grid; gap: 1rem 1.15rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.hg-j-field { display: block; }
.hg-j-field.wide { grid-column: 1 / -1; }
.hg-j-field > span:not(.hg-j-msg), .hg-j-label { display: block; font-size: .87rem; font-weight: 800; color: var(--hg-navy); margin-bottom: .34rem; }
.hg-j-field > span:not(.hg-j-msg) small, .hg-j-label small { display: block; font-weight: 600; color: var(--hg-mute); font-size: .78rem; }
.hg-j-control { position: relative; display: block; }
.hg-j-control input, .hg-j-control select, .hg-j-control textarea {
    width: 100%; padding: .78rem .85rem; padding-right: 2.4rem;
    border: 1.5px solid #b9c9df; border-radius: 7px; background: #fff; color: var(--hg-ink);
    font: inherit; font-size: .96rem;
}
.hg-j-control textarea { min-height: 108px; resize: vertical; padding-right: .85rem; }
.hg-j-control input:focus-visible, .hg-j-control select:focus-visible, .hg-j-control textarea:focus-visible {
    outline: none; border-color: var(--hg-blue-2); box-shadow: 0 0 0 3px rgba(39, 121, 232, .18);
}
.hg-j-tick {
    position: absolute; right: .6rem; top: 50%; transform: translateY(-50%) scale(.6);
    width: 22px; height: 22px; border-radius: 50%; background: var(--hg-good); color: #fff;
    display: grid; place-items: center; font-size: .78rem; font-weight: 900; opacity: 0;
    transition: opacity .18s ease, transform .18s cubic-bezier(.34, 1.56, .64, 1);
}
.hg-j-field[data-state="ok"] .hg-j-tick { opacity: 1; transform: translateY(-50%) scale(1); }
/* The persona and lens groups have no single input to sit a pin on, so their tick rides
   inline with the heading instead of floating in a control that is not there. */
.hg-j-tick.inline { position: static; display: inline-grid; opacity: 0; transform: none; vertical-align: middle; margin-left: .45rem; }
.hg-j-field[data-state="ok"] .hg-j-tick.inline { opacity: 1; transform: none; }
.hg-j-field[data-state="bad"] .hg-persona label,
.hg-j-field[data-state="bad"] .hg-j-check { border-color: #e8b0b0; background: #fffafa; }
.hg-j-field[data-state="ok"] .hg-j-control input,
.hg-j-field[data-state="ok"] .hg-j-control select { border-color: var(--hg-good); background: #fbfffd; }
.hg-j-field[data-state="bad"] .hg-j-control input,
.hg-j-field[data-state="bad"] .hg-j-control select,
.hg-j-field[data-state="bad"] .hg-j-control textarea { border-color: var(--hg-bad); background: var(--hg-bad-soft); }
.hg-j-msg { display: block; margin-top: .32rem; min-height: 1.1rem; font-size: .8rem; font-weight: 700; color: var(--hg-bad); }
.hg-j-field[data-state="ok"] .hg-j-msg { color: var(--hg-good); }

/* ---------- checklist ---------- */
.hg-j-checks { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.hg-j-check {
    display: flex; gap: .7rem; align-items: flex-start; cursor: pointer;
    border: 1.5px solid var(--hg-line); border-radius: var(--hg-radius); padding: .8rem .9rem; background: #fff;
    transition: border-color .16s ease, background .16s ease;
}
.hg-j-check:hover { border-color: var(--hg-blue-2); }
.hg-j-check:has(input:checked) { border-color: var(--hg-good); background: var(--hg-good-soft); }
.hg-j-check input { margin-top: .22rem; width: 18px; height: 18px; flex: none; accent-color: var(--hg-good); }
.hg-j-check b { display: block; font-size: .92rem; color: var(--hg-navy); }
.hg-j-check small { display: block; font-size: .82rem; color: var(--hg-mute); line-height: 1.45; }

/* ---------- actions ---------- */
.hg-j-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--hg-line); }
.hg-j-count { margin-left: auto; font-size: .84rem; color: var(--hg-mute); font-weight: 700; }
.hg-btn {
    appearance: none; border: 0; cursor: pointer; min-height: 44px; padding: .68rem 1.4rem;
    border-radius: var(--hg-radius); font: inherit; font-weight: 850; font-size: .95rem;
    background: var(--hg-blue); color: #fff; transition: transform .12s ease, box-shadow .16s ease, background .16s ease;
}
.hg-btn:hover { background: var(--hg-navy); box-shadow: 0 10px 22px -14px rgba(10, 47, 114, .8); }
.hg-btn:active { transform: translateY(1px); }
.hg-btn.ghost { background: #eaf1fb; color: var(--hg-navy); }
.hg-btn.ghost:hover { background: #dbe8f8; }
.hg-btn.gold { background: var(--hg-gold); color: var(--hg-ink); }
.hg-btn.gold:hover { background: #ffdb6d; }
.hg-btn:disabled { opacity: .55; cursor: progress; }
.hg-btn-link { background: none; border: 0; color: var(--hg-blue); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; padding: .3rem .1rem; }

/* ---------- review ---------- */
.hg-j-review { border: 1px solid var(--hg-line); border-radius: var(--hg-radius); overflow: hidden; }
.hg-j-review h3 { margin: 0; padding: .7rem 1rem; background: #f1f6fd; color: var(--hg-navy); font-size: .92rem; border-bottom: 1px solid var(--hg-line); }
.hg-j-review dl { margin: 0; padding: .25rem 1rem .8rem; }
.hg-j-review dt { margin-top: .7rem; font-size: .78rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; color: var(--hg-mute); }
.hg-j-review dd { margin: .12rem 0 0; font-size: .95rem; color: var(--hg-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.hg-j-review dd.emptied { color: var(--hg-warn); font-weight: 700; }

/* ---------- toasts ---------- */
.hg-j-toasts { position: fixed; z-index: 70; right: clamp(.7rem, 2vw, 1.4rem); bottom: clamp(.7rem, 2vw, 1.4rem); width: min(400px, calc(100vw - 1.4rem)); display: grid; gap: .55rem; }
.hg-j-toast {
    background: var(--hg-card); border: 1px solid var(--hg-line); border-left: 5px solid var(--hg-blue);
    border-radius: var(--hg-radius); box-shadow: 0 20px 40px -24px rgba(8, 39, 91, .6);
    padding: .85rem .95rem; animation: hg-toast-in .24s cubic-bezier(.34, 1.4, .64, 1) both;
}
.hg-j-toast[data-kind="error"] { border-left-color: var(--hg-bad); }
.hg-j-toast[data-kind="good"] { border-left-color: var(--hg-good); }
.hg-j-toast[data-kind="warn"] { border-left-color: var(--hg-warn); }
.hg-j-toast b { display: block; font-size: .92rem; color: var(--hg-navy); margin-bottom: .18rem; }
.hg-j-toast p { margin: 0; font-size: .87rem; color: var(--hg-mute); }
.hg-j-toast ul { margin: .45rem 0 0; padding: 0; list-style: none; display: grid; gap: .28rem; }
.hg-j-toast li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; font-size: .85rem; color: var(--hg-ink); }
.hg-j-toast footer { display: flex; justify-content: flex-end; margin-top: .55rem; }
@keyframes hg-toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- offline notice + queue ---------- */
.hg-offline-bar {
    display: none; gap: .8rem; align-items: center; flex-wrap: wrap;
    background: var(--hg-warn-soft); border: 1px solid #f0cf9a; border-left: 5px solid var(--hg-warn);
    border-radius: var(--hg-radius); padding: .85rem 1rem; margin-bottom: 1.1rem;
}
.hg-offline-bar[data-show="1"] { display: flex; }
.hg-offline-bar b { color: var(--hg-warn); font-size: .95rem; }
.hg-offline-bar p { margin: 0; font-size: .88rem; color: #6f4304; flex: 1 1 260px; }
.hg-queue { margin: 1.1rem 0 0; padding: .9rem 1rem; border: 1px dashed #c9a25e; border-radius: var(--hg-radius); background: #fffaf0; display: none; }
.hg-queue[data-show="1"] { display: block; }
.hg-queue h3 { margin: 0 0 .4rem; font-size: .92rem; color: var(--hg-warn); }
.hg-queue ol { margin: 0; padding-left: 1.15rem; font-size: .88rem; color: #6f4304; }

/* ---------- receipt ---------- */
.hg-receipt { display: none; border: 1.5px solid var(--hg-good); border-radius: 12px; background: var(--hg-good-soft); padding: clamp(1.1rem, 3vw, 1.7rem); }
.hg-receipt[data-show="1"] { display: block; }
.hg-receipt h2 { margin: 0 0 .4rem; color: var(--hg-good); font-size: 1.35rem; }
.hg-receipt p { margin: 0 0 .8rem; color: #134d34; max-width: 68ch; }
.hg-ref { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.2rem; font-weight: 800; letter-spacing: .06em; color: var(--hg-navy); background: #fff; border: 1px dashed var(--hg-good); border-radius: 6px; padding: .35rem .7rem; display: inline-block; }

/* ---------- ecosystem rail ---------- */
.hg-eco { background: var(--hg-navy); color: #dbeaff; padding: clamp(1.6rem, 4vw, 2.6rem) 0; margin-top: 2.4rem; }
.hg-eco-inner { max-width: 1080px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.4rem); }
.hg-eco h2 { margin: 0 0 .4rem; color: #fff; font-size: 1.2rem; }
.hg-eco p { margin: 0 0 1.2rem; color: #a9c6f2; font-size: .95rem; max-width: 70ch; }
.hg-marquee { position: relative; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.hg-marquee-track { display: flex; gap: .8rem; width: max-content; animation: hg-scroll 38s linear infinite; }
.hg-marquee:hover .hg-marquee-track, .hg-marquee:focus-within .hg-marquee-track { animation-play-state: paused; }
.hg-marquee a {
    display: flex; align-items: center; gap: .6rem; flex: none;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px; padding: .5rem .95rem .5rem .55rem; text-decoration: none; color: #eaf3ff;
    font-size: .88rem; font-weight: 750; white-space: nowrap;
}
.hg-marquee a:hover { background: rgba(255, 255, 255, .16); border-color: var(--hg-gold); }
.hg-marquee img { width: 26px; height: 26px; border-radius: 6px; object-fit: contain; background: #fff; padding: 2px; flex: none; }
@keyframes hg-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.hg-footer { background: #071f4c; color: #9fbfe8; padding: 1.5rem clamp(1rem, 4vw, 2.4rem); font-size: .87rem; }
.hg-footer a { color: #dbeaff; }
.hg-footer p { margin: 0; max-width: 80ch; }

.hg-note { font-size: .84rem; color: var(--hg-mute); border-left: 4px solid var(--hg-gold); background: #fffdf5; border-radius: 0 var(--hg-radius) var(--hg-radius) 0; padding: .7rem .9rem; margin: 1.1rem 0 0; }

@media (prefers-reduced-motion: reduce) {
    .hg-marquee-track { animation: none; flex-wrap: wrap; width: auto; }
    .hg-marquee { mask-image: none; -webkit-mask-image: none; }
    .hg-j-progress i, .hg-j-tick, .hg-j-toast, .hg-btn { transition: none; animation: none; }
    * { scroll-behavior: auto !important; }
}

@media (max-width: 620px) {
    .hg-j-count { margin-left: 0; width: 100%; order: -1; }
    .hg-j-toasts { left: clamp(.7rem, 2vw, 1.4rem); }
}
