/* FlorendaHost on Florenda Graphite (brand/fds.css holds all colours); panel.css adds panel components. */
:root {
    --bg: var(--fd-bg); --bg-2: var(--fd-bg-2); --card: var(--fd-surface); --card-2: var(--fd-raised);
    --line: var(--fd-line); --line-2: var(--fd-line-2); --text: var(--fd-text); --muted: var(--fd-muted);
    --accent: var(--fd-accent); --accent-2: var(--fd-accent-ink); --deep: var(--fd-accent); --grad: var(--fd-accent);
    --ok: var(--fd-ok); --danger: var(--fd-danger); --shadow: var(--fd-shadow); --r: var(--fd-r);
    --font: var(--fd-font); --mono: var(--fd-mono);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
code { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: min(1160px, 100%); margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right)); }
a.skip { position: absolute; left: -999px; top: 10px; z-index: 50; }
a.skip:focus { left: 16px; }

/* buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 18px; border-radius: 12px;
    font: 600 15px/1.2 var(--font); color: var(--text);
    border: 1px solid transparent; background: none; cursor: pointer;
    transition: scale .1s ease, box-shadow .16s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
    white-space: nowrap; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn:active:not(:disabled) { scale: .985; }
.btn-fill { background: var(--fd-accent); color: var(--fd-on-accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .22), 0 8px 20px -10px var(--fd-accent); }
.btn-fill:hover:not(:disabled) { background: var(--fd-accent-hover); }
.btn-fill::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .2) 50%, transparent 70%); transform: translateX(-110%); }
.btn-fill:hover:not(:disabled)::after { transform: translateX(110%); transition: transform .7s ease; }
.btn-ghost { border-color: var(--line-2); background: var(--card-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--fd-muted); background: var(--fd-hover); }
.btn-danger { border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.btn-lg { min-height: 52px; padding: 12px 24px; font-size: 16px; border-radius: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* FlorendaID mark */
.fid { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 7px; background: rgba(255, 255, 255, 0.2); color: #fff; font: 800 10.5px/1 var(--font); letter-spacing: .02em; }
.btn-ghost .fid, .acct .fid { background: var(--fd-text); color: var(--fd-bg); }

/* header */
.top {
    position: sticky; top: 0; z-index: 30;
    backdrop-filter: saturate(150%) blur(14px); -webkit-backdrop-filter: saturate(150%) blur(14px);
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; letter-spacing: -.01em; min-height: 44px; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; line-height: 1.1; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-weight: 550; font-size: 15px; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--text); background: var(--card); }
.acct { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; max-width: 22ch; }
.acct span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ecosystem switcher */
.apps { position: relative; }
.apps-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; }
.apps-btn:hover, .apps-btn[aria-expanded="true"] { color: var(--text); border-color: var(--line-2); }
.apps-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 290px; padding: 10px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--card); box-shadow: var(--shadow); z-index: 40; }
.apps-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 4px 8px 8px; }
.apps-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; }
.apps-item:hover { background: var(--card-2); }
.apps-item.is-here { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.apps-ico { width: 34px; height: 34px; flex: none; color: var(--text); }
.apps-ico svg { width: 100%; height: 100%; }
.theme-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; }
.theme-btn:hover { color: var(--text); border-color: var(--line-2); }
.apps-item strong { display: block; font-size: 14.5px; }
.apps-item small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.3; }

/* sections */
main { display: block; padding-bottom: 40px; }
.sec { padding: 56px 0 0; scroll-margin-top: 76px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; margin-bottom: 22px; }
.sec-head h2 { font-size: clamp(24px, 3.2vw, 32px); line-height: 1.15; letter-spacing: -.02em; }
.sec-head p { color: var(--muted); max-width: 52ch; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.muted { color: var(--muted); }
.note { color: var(--muted); font-size: 14px; margin-top: 16px; }

/* hero: the dark space stage from brand/fds.css, edge to edge */
html { overflow-x: clip; }
.hero-stage {
    width: 100vw; margin-left: calc(50% - 50vw);
    /* the aliases are resolved on :root, so inside the dark stage they must be re-resolved */
    --bg: var(--fd-bg); --bg-2: var(--fd-bg-2); --card: var(--fd-surface); --card-2: var(--fd-raised);
    --line: var(--fd-line); --line-2: var(--fd-line-2); --text: var(--fd-text); --muted: var(--fd-muted);
    --accent: var(--fd-accent); --accent-2: var(--fd-accent-ink); --ok: var(--fd-ok); --danger: var(--fd-danger); --shadow: var(--fd-shadow);
}
.hero-stage .hero { width: min(1160px, 100%); margin: 0 auto; padding: 72px 16px 72px; }
.flag { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.flag-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flag-label { color: var(--muted); font: 500 12.5px var(--mono); }
.flag-state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 650; }
.flag-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.flag[data-online="1"] .flag-state { color: var(--ok); }
.flag-name { margin: 10px 0 8px; font-size: 21px; font-weight: 680; letter-spacing: -.02em; }
.flag-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.flag-row b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 620; }
.flag-addr { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.flag-addr code { font: 600 14.5px var(--mono); }
.flag-addr .btn { min-height: 38px; padding: 0 12px; font-size: 13.5px; }
/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; padding: 64px 0 8px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--fd-accent-ink); }
.hero .lead { font-size: clamp(16px, 1.7vw, 18.5px); color: var(--muted); margin-top: 18px; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; color: var(--muted); font-size: 14px; list-style: none; }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.alert { margin-top: 18px; padding: 12px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); font-size: 14px; }

/* live node card */
.node { border-radius: var(--fd-r-lg); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.node-in { padding: 20px; }
.node-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.node-top b { font-size: 15px; }
.dot { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 650; color: var(--ok); }
.dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent); }
.dot.off { color: var(--muted); }
.node-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { padding: 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.stat b { display: block; font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.term { margin: 0; padding: 14px; border-radius: 14px; background: var(--bg-2); color: var(--fd-text-2); border: 1px solid var(--line); font: 12.5px/1.65 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.term .p { color: var(--fd-accent-ink); }
.term .g { color: var(--ok); }
.term .c { color: var(--text); }

/* games */
.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.game { position: relative; display: flex; flex-direction: column; border-radius: 22px; padding: 26px; background: var(--card); border: 1px solid var(--line); overflow: hidden; scroll-margin-top: 80px; }
.game-tag { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.game h3 { font-size: 28px; letter-spacing: -.02em; margin: 6px 0 2px; }
.game-engine { color: var(--muted); font-size: 14px; }
.price { display: flex; align-items: baseline; gap: 8px; margin: 20px 0 6px; }
.price b { font-size: 44px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.price span { color: var(--muted); font-size: 15px; }
.price-from { color: var(--muted); font-size: 14px; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 4px; list-style: none; }
.slots li { padding: 6px 10px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; }
.slots li b { font-weight: 700; }
.perks { list-style: none; display: grid; gap: 8px; margin: 18px 0 22px; font-size: 14.5px; }
.perks li { display: flex; gap: 10px; align-items: flex-start; }
.perks li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 6px; background: color-mix(in srgb, var(--ok) 18%, transparent) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233fb97a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 12.5 10 17 19 7'/%3E%3C/svg%3E") center / 12px no-repeat; }
.game .btn { margin-top: auto; width: 100%; }
.soon { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.soon-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 16px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 14px; }
.soon-item b { color: var(--text); font-size: 15px; display: block; }
.pill { flex: none; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); }

/* calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: stretch; border-radius: 22px; padding: 26px; background: var(--card); border: 1px solid var(--line); }
.calc-ctl { display: grid; gap: 16px; align-content: start; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); width: 100%; }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 9px; font-weight: 650; font-size: 14.5px; color: var(--muted); cursor: pointer; }
.seg input:checked + span { background: var(--card); color: var(--text); box-shadow: 0 2px 10px rgba(0, 0, 0, .25), inset 0 0 0 1px var(--line-2); }
.seg input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 650; color: var(--muted); }
.field input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 32px; }
.calc-out { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 22px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--line); }
.calc-out small { color: var(--muted); font-size: 14px; }
.calc-out b { font-size: clamp(36px, 5vw, 48px); line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.calc-out .btn { margin-top: 12px; align-self: flex-start; }

/* steps and id */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s; list-style: none; }
.step { padding: 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); counter-increment: s; }
.step::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); color: var(--text); font-weight: 750; margin-bottom: 14px; }
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14.5px; }
.idcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 26px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); }
.idcard .big { width: 64px; height: 64px; color: var(--text); }
.idcard .big svg { width: 100%; height: 100%; }
.idcard h2 { font-size: 22px; margin-bottom: 4px; }
.idcard p { color: var(--muted); font-size: 15px; }
.idcard ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin-top: 10px; }
.idcard li { padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--bg-2); border: 1px solid var(--line); }

/* faq */
.faq { display: grid; gap: 10px; }
.faq details { border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.faq details[open] { border-color: var(--line-2); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 14px 18px; font-weight: 650; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 18px 18px; color: var(--muted); font-size: 15px; }

/* panel hero (signed in) */
.dash { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; padding: 40px 0 6px; }
.dash h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; line-height: 1.1; }
.dash-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-stats .stat { min-width: 120px; background: var(--card); }

/* page shell for server.php / admin.php */
.page { padding-top: 28px; }
.page .hero-lite h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; line-height: 1.1; }
.page .hero-lite p { color: var(--muted); margin-top: 8px; }
.page .hero-lite { margin-bottom: 20px; }
h2.sec-title { font-size: 20px; margin: 28px 0 12px; }

/* footer */
.foot { margin-top: 64px; padding: 28px 0 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; color: var(--muted); font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a:hover { color: var(--text); }

@media (max-width: 960px) {
    .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px; }
    .calc { grid-template-columns: minmax(0, 1fr); }
    .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .games, .soon { grid-template-columns: minmax(0, 1fr); }
    .nav .nav-link.wide, .acct.wide { display: none; }
    .idcard { grid-template-columns: minmax(0, 1fr); }
    .game { padding: 22px; }
    .price b { font-size: 38px; }
}
@media (max-width: 480px) {
    .brand small { display: none; }
    .top-in { gap: 8px; }
    .nav { gap: 6px; }
    .nav .btn { padding: 10px 12px; }
    .node-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stat b { font-size: 20px; }
    .hero-actions .btn { flex: 1 1 100%; }
}
