/* RF Unity portal - dark sci-fi / fantasy theme. No external fonts or assets (privacy: nothing loads from third parties). */
:root {
  --bg: #06090f; --bg-2: #0b101a; --bg-3: #101827;
  --panel: rgba(14, 20, 32, .86); --panel-solid: #0f1624;
  --line: #1c2638; --line-2: #2a3a56;
  --text: #dde5f2; --muted: #8e9ab2; --dim: #66728b;
  --gold: #e0b45e; --gold-2: #f4d491; --gold-soft: rgba(224, 180, 94, .12);
  --cyan: #5cc9e0; --cyan-soft: rgba(92, 201, 224, .12);
  --good: #59c98a; --good-soft: rgba(89, 201, 138, .12);
  --bad: #ec6a62; --bad-soft: rgba(236, 106, 98, .12);
  --warn: #e8a94f; --warn-soft: rgba(232, 169, 79, .12);
  --radius: 12px;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", "Noto Sans", Roboto, Arial, sans-serif;
  --display: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", system-ui, "Noto Sans", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(1200px 700px at 80% -10%, rgba(92, 201, 224, .07), transparent 60%),
                    radial-gradient(900px 600px at -10% 30%, rgba(224, 180, 94, .05), transparent 60%); background-attachment: fixed; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.container { width: min(1140px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- header */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(6, 9, 15, .78); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(42, 58, 86, .55); }
.site-head .container { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 600 19px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { color: var(--gold); font-weight: 700; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { color: var(--muted); font-size: 14.5px; padding: 6px 10px; border-radius: 8px; }
.nav a:hover, .nav a.active { color: var(--text); background: rgba(255, 255, 255, .04); text-decoration: none; }
.head-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { position: relative; }
.lang select { appearance: none; background: var(--bg-3); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 6px 30px 6px 11px; font: 600 13.5px var(--sans); cursor: pointer; }
.lang::after { content: ""; position: absolute; right: 11px; top: 50%; width: 7px; height: 7px; margin-top: -5px; border: solid var(--muted);
  border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
.menu-btn { display: none; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 8px; padding: 5px 10px; font-size: 18px; cursor: pointer; }

/* ---------------------------------------------------------------- buttons, forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 10px; font: 600 15px var(--sans);
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); color: var(--text); cursor: pointer; transition: .15s; text-decoration: none; }
.btn:hover { border-color: var(--gold); text-decoration: none; }
.btn.primary { background: linear-gradient(180deg, #f0cd83, #c99a43); color: #1a1205; border-color: #e2b866; box-shadow: 0 6px 24px rgba(224, 180, 94, .22); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.danger { color: var(--bad); border-color: rgba(236, 106, 98, .4); }
.btn:disabled { opacity: .5; cursor: default; filter: none; }

label { display: block; }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field > span, .field-label { font-size: 14px; font-weight: 600; color: var(--text); }
.field .hint { font-size: 13px; color: var(--dim); }
.field .err { font-size: 13px; color: var(--bad); min-height: 0; }
input[type=text], input[type=email], input[type=password], select.input, textarea {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 9px; padding: 11px 13px;
  font: 15px var(--sans); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
input.invalid { border-color: var(--bad); }
input.valid { border-color: rgba(89, 201, 138, .6); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--text); }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--gold); flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--bad); transition: width .2s, background .2s; }
.meter[data-s="2"] i { background: var(--warn); } .meter[data-s="3"] i { background: #b8c95a; } .meter[data-s="4"] i { background: var(--good); }
.hp { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; min-height: min(86vh, 820px); display: grid; align-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; background: url(../img/hero.webp) center 40% / cover no-repeat; transform: scale(1.03); }
.hero-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6, 9, 15, .96) 0%, rgba(6, 9, 15, .82) 38%, rgba(6, 9, 15, .35) 70%, rgba(6, 9, 15, .55) 100%),
              linear-gradient(0deg, var(--bg) 0%, transparent 35%); }
.hero .container { position: relative; padding: 90px 0 110px; }
.hero-inner { max-width: 640px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px; border-radius: 99px; font-size: 13px; font-weight: 600;
  letter-spacing: .04em; color: var(--gold-2); background: var(--gold-soft); border: 1px solid rgba(224, 180, 94, .35); }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(89, 201, 138, .18); }
.hero h1 { font: 700 clamp(46px, 8vw, 92px)/1 var(--display); letter-spacing: .08em; text-transform: uppercase; margin: 22px 0 18px;
  background: linear-gradient(180deg, #fff 10%, #f3d38f 55%, #b9883a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 30px rgba(224, 180, 94, .18)); }
.hero .lead { font-size: clamp(17px, 2vw, 20px); color: #c9d3e6; margin: 0 0 30px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .fine { margin-top: 26px; font-size: 13px; color: var(--dim); max-width: 560px; }

/* ---------------------------------------------------------------- sections */
.section { padding: 84px 0; }
.section + .section { border-top: 1px solid rgba(28, 38, 56, .6); }
.kicker { font: 600 13px var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; display: flex; align-items: center; gap: 12px; }
.kicker::before { content: ""; width: 26px; height: 1px; background: var(--gold); opacity: .7; }
.section h2 { font: 650 clamp(28px, 3.6vw, 40px)/1.15 var(--display); letter-spacing: .02em; margin: 0 0 14px; }
.section .intro { color: var(--muted); max-width: 720px; margin: 0 0 40px; font-size: 17px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { position: relative; padding: 26px 24px 24px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(20, 28, 44, .75), rgba(12, 17, 27, .75));
  border: 1px solid var(--line); overflow: hidden; }
.feature::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .55; }
.feature .ico { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); margin-bottom: 16px; border: 1px solid rgba(224, 180, 94, .25); }
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { margin: 0 0 8px; font: 650 18px var(--display); letter-spacing: .02em; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

.status-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card h3 { margin: 0 0 12px; font: 650 19px var(--display); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 22px 34px; }
.timeline li::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: -8px; width: 2px; background: var(--line-2); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 2px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-2); }
.timeline li.done::after { background: var(--good); border-color: var(--good); }
.timeline li.now::after { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 5px var(--gold-soft); }
.timeline b { display: block; font-size: 15.5px; }
.timeline span { color: var(--muted); font-size: 14.5px; }
ul.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
ul.ticks li { position: relative; padding-left: 28px; color: #c7d0e1; font-size: 15px; }
ul.ticks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border: solid var(--gold); border-width: 0 0 2px 2px; transform: rotate(-45deg); }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery button { all: unset; cursor: zoom-in; position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16/9; background: var(--bg-2); }
.gallery button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.gallery button:hover img { transform: scale(1.05); }
.gallery .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 9px; font-size: 13px; font-weight: 600; color: #e9eef8;
  background: linear-gradient(0deg, rgba(4, 6, 10, .85), transparent); }
.gallery button.wide { grid-column: span 2; grid-row: span 2; }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
dialog.lightbox::backdrop { background: rgba(3, 5, 9, .9); }
dialog.lightbox img { max-width: 94vw; max-height: 84vh; border-radius: 8px; margin: auto; image-rendering: auto; }
dialog.lightbox p { text-align: center; color: var(--text); margin: 10px 0 0; }
dialog.lightbox .x { position: fixed; top: 14px; right: 18px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line-2); color: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; cursor: pointer; }

table.req { width: 100%; border-collapse: collapse; font-size: 15px; }
table.req th, table.req td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.req thead th { color: var(--gold); font: 600 13px var(--display); letter-spacing: .14em; text-transform: uppercase; }
table.req tbody th { color: var(--muted); font-weight: 600; width: 22%; }
.req-wrap { overflow-x: auto; }

.faq details { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 48px 16px 20px; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 12px; font-size: 22px; color: var(--gold); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 18px; color: #c3cbdc; }

ol.rules { counter-reset: r; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
ol.rules li { counter-increment: r; position: relative; padding: 18px 18px 18px 64px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: #c7d0e1; font-size: 15px; }
ol.rules li::before { content: counter(r, decimal-leading-zero); position: absolute; left: 18px; top: 16px; font: 700 20px var(--display); color: var(--gold); opacity: .85; }
ol.rules b { color: var(--text); display: block; margin-bottom: 2px; }

.cta { text-align: center; padding: 70px 0 90px; }
.cta h2 { margin-bottom: 10px; }
.cta p { color: var(--muted); margin: 0 auto 26px; max-width: 560px; }

.site-foot { border-top: 1px solid var(--line); padding: 34px 0 40px; color: var(--dim); font-size: 13.5px; background: rgba(4, 6, 10, .6); }
.site-foot .container { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; }
.site-foot a { color: var(--muted); }
.site-foot .links { display: flex; gap: 18px; justify-content: flex-end; flex-wrap: wrap; align-items: start; }

/* ---------------------------------------------------------------- inner pages */
.page { padding: 56px 0 90px; }
.page-narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.page h1 { font: 650 clamp(30px, 4vw, 42px)/1.15 var(--display); margin: 0 0 10px; letter-spacing: .02em; }
.page .sub { color: var(--muted); margin: 0 0 30px; font-size: 16.5px; }
.form-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 30px; }
.form-card h2 { font: 650 16px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 6px 0 16px; }
.form-card hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0 22px; }
.or { text-align: center; color: var(--dim); font-size: 13px; margin: -6px 0 12px; }
.pow { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); margin: 6px 0 18px; }
.pow .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--gold); animation: spin .8s linear infinite; }
.pow.ok .spin { animation: none; border-color: var(--good); background: var(--good); }
@keyframes spin { to { transform: rotate(360deg); } }
.alert { border-radius: 10px; padding: 13px 16px; margin: 0 0 18px; font-size: 14.5px; border: 1px solid; }
.alert.bad { color: #ffc9c4; background: var(--bad-soft); border-color: rgba(236, 106, 98, .35); }
.alert.good { color: #c9f2da; background: var(--good-soft); border-color: rgba(89, 201, 138, .35); }
.alert.warn { color: #f7dcb0; background: var(--warn-soft); border-color: rgba(232, 169, 79, .35); }
.alert.info { color: #c6ecf5; background: var(--cyan-soft); border-color: rgba(92, 201, 224, .3); }
.linkbox { display: flex; gap: 8px; margin: 14px 0; }
.linkbox input { font-family: var(--mono); font-size: 13.5px; }
.state { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; font-weight: 700; font-size: 14px; letter-spacing: .03em; }
.state.pending { color: var(--warn); background: var(--warn-soft); }
.state.approved { color: var(--good); background: var(--good-soft); }
.state.rejected, .state.revoked { color: var(--bad); background: var(--bad-soft); }
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 10px 18px; margin: 18px 0 6px; font-size: 15px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps > li { counter-increment: s; position: relative; padding-left: 46px; color: #c7d0e1; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: #1a1205; background: var(--gold); }
.steps b { color: var(--text); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.tabs button { background: var(--bg-3); border: 1px solid var(--line-2); color: var(--muted); border-radius: 8px; padding: 6px 12px; font: 600 13.5px var(--sans); cursor: pointer; }
.tabs button.active { color: #1a1205; background: var(--gold); border-color: var(--gold); }
.prose h2 { font: 650 22px var(--display); margin: 34px 0 10px; }
.prose p, .prose li { color: #c7d0e1; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 10px 0; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; }
code, .code { font-family: var(--mono); font-size: .92em; background: var(--bg-3); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }

@media (max-width: 980px) {
  .features { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .status-grid, ol.rules { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg-2); padding: 10px 16px 16px; border-bottom: 1px solid var(--line); margin: 0; }
  .site-head.open .nav { display: flex; }
  .menu-btn { display: inline-block; }
  .head-right .btn { display: none; }
}
@media (max-width: 620px) {
  .features, .row2 { grid-template-columns: 1fr; }
  .gallery button.wide { grid-column: span 2; grid-row: span 1; }
  .site-foot .container { grid-template-columns: 1fr; } .site-foot .links { justify-content: flex-start; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 10px; }
  .form-card { padding: 22px 18px; }
  .section { padding: 60px 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
.mt { margin-top: 20px !important; }
.strong { color: var(--text); }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.notfound { text-align: center; padding: 120px 0; }
.notfound h1 { font: 700 72px var(--display); color: var(--gold); margin: 0; }

[hidden] { display: none !important; }
.srv { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.srv .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.srv.on .dot { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
@media (max-width: 720px) { .srv .txt { display: none; } }
