/* ORACULUM — тёмная «обсерваторская» тема: почти чёрный фон, золото, антиква. */

:root {
  --bg:        #080a12;
  --bg-2:      #0d111c;
  --surface:   #11162456;
  --surface-2: #141a2b;
  --line:      #262d45;
  --line-gold: rgba(201, 162, 39, .22);
  --gold:      #c9a227;
  --gold-hi:   #e6c358;
  --text:      #e9ecf6;
  --text-2:    #b6bdd4;
  --muted:     #838ba8;
  --green:     #57ad83;
  --red:       #cb6060;
  --blue:      #6d8fd0;

  --serif: Georgia, "Times New Roman", "Droid Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --r: 12px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }

img, svg { max-width: 100%; height: auto; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Звёздное поле: три слоя радиальных точек, без картинок и скриптов. */
.stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(1px 1px at 20% 15%, #fff, transparent),
    radial-gradient(1px 1px at 68% 8%,  #cdd6ff, transparent),
    radial-gradient(1px 1px at 84% 42%, #fff, transparent),
    radial-gradient(1px 1px at 12% 68%, #e8d9a8, transparent),
    radial-gradient(1px 1px at 45% 88%, #fff, transparent),
    radial-gradient(1px 1px at 92% 78%, #cdd6ff, transparent),
    radial-gradient(1px 1px at 33% 34%, #fff, transparent),
    radial-gradient(circle 620px at 50% -8%, rgba(60, 74, 130, .30), transparent 70%);
  background-repeat: no-repeat;
}

main, .topbar, .footer { position: relative; z-index: 1; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mono { font-family: var(--mono); font-size: .92em; }
.nowrap { white-space: nowrap; }

a { color: var(--gold-hi); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 5vw, 48px); letter-spacing: -.01em; }
h2 { font-size: clamp(23px, 3vw, 30px); }
h3 { font-size: 19px; }

/* ------------------------------------------------------------------ шапка */

.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 18, .82);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 40;
}
.topbar__in { display: flex; align-items: center; gap: 24px; height: 66px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--gold);
  box-shadow: inset 0 0 0 4px rgba(201, 162, 39, .18), 0 0 14px rgba(201, 162, 39, .35);
}
.brand__name { font-family: var(--serif); font-size: 19px; letter-spacing: .22em; color: var(--gold); }

.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--text-2); font-size: 15px; }
.nav a:hover { color: var(--gold-hi); text-decoration: none; }

/* ------------------------------------------------------------------ кнопки */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text);
  font: 500 15px/1 var(--sans); cursor: pointer; text-decoration: none;
  transition: border-color .15s, background .15s, color .15s, transform .1s;
}
.btn:hover { border-color: var(--line-gold); background: #1a2136; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--gold {
  background: linear-gradient(180deg, #d3ab2c, #b18f1d);
  border-color: #e0bc4a; color: #16120a; font-weight: 600;
}
.btn--gold:hover { background: linear-gradient(180deg, #e0b93b, #c09c22); border-color: #f0d071; }
.btn--sm { padding: 8px 15px; font-size: 14px; }
.btn--lg { padding: 15px 30px; font-size: 17px; }
.btn--ghost { background: transparent; }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ------------------------------------------------------------------ карточки */

.card {
  background: linear-gradient(180deg, rgba(20, 26, 43, .9), rgba(14, 18, 31, .9));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
}
.card--gold { border-color: var(--line-gold); }
.card__title { font-family: var(--serif); font-size: 18px; margin: 0 0 14px; }

.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.section { padding: 54px 0; }
.section__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 22px; }
.section__head h2 { margin: 0; }
.section__head a { margin-left: auto; font-size: 14px; }

/* ------------------------------------------------------------------ герой */

.hero { padding: 76px 0 46px; text-align: center; }
.hero__eyebrow {
  font-family: var(--serif); letter-spacing: .38em; font-size: 12px;
  color: var(--gold); text-transform: uppercase; margin-bottom: 20px;
}
.hero h1 { max-width: 17ch; margin-inline: auto; }
.hero__lead {
  max-width: 60ch; margin: 20px auto 30px; color: var(--text-2); font-size: 18px;
}
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.statbar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; margin-top: 46px;
}
.stat { background: var(--bg-2); padding: 20px 14px; text-align: center; }
.stat__v { font-family: var(--serif); font-size: 30px; color: var(--gold); line-height: 1.1; }
.stat__k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-top: 6px; }

/* ------------------------------------------------------------------ пророчество-карточка */

.pcard {
  display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(180deg, rgba(20, 26, 43, .92), rgba(13, 17, 29, .92));
  border: 1px solid var(--line); border-radius: var(--r); padding: 20px;
  transition: border-color .16s, transform .16s;
}
.pcard:hover { border-color: var(--line-gold); transform: translateY(-2px); }
.pcard__top { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.pcard__cat { color: var(--gold); letter-spacing: .1em; text-transform: uppercase; }
.pcard__text {
  font-family: var(--serif); font-size: 19px; line-height: 1.45; color: var(--text);
  margin: 0; text-decoration: none;
}
a.pcard__text:hover { color: var(--gold-hi); text-decoration: none; }
.pcard__foot {
  display: flex; align-items: center; gap: 12px; margin-top: auto;
  padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.pcard__date { color: var(--text-2); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; line-height: 1.5;
  border: 1px solid var(--line); color: var(--text-2); background: rgba(255,255,255,.02);
  white-space: nowrap;
}
.badge--correct { color: var(--green); border-color: rgba(87, 173, 131, .4); background: rgba(87, 173, 131, .1); }
.badge--wrong   { color: var(--red);   border-color: rgba(203, 96, 96, .4);  background: rgba(203, 96, 96, .1); }
.badge--unclear { color: var(--blue);  border-color: rgba(109, 143, 208, .4); background: rgba(109, 143, 208, .1); }
.badge--trial   { color: var(--gold-hi); border-color: var(--line-gold); background: rgba(201, 162, 39, .1); }
.badge--gold    { color: var(--gold-hi); border-color: var(--line-gold); }

/* ------------------------------------------------------------------ формы */

.field { margin-bottom: 20px; }
.field > label { display: block; margin-bottom: 7px; font-size: 14px; color: var(--text-2); }
.field__hint { font-size: 13px; color: var(--muted); margin-top: 6px; }

input[type=text], input[type=date], input[type=password], input[type=url], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 9px;
  border: 1px solid var(--line); background: #0c1120; color: var(--text);
  font: 15px/1.5 var(--sans); transition: border-color .15s;
}
textarea { font-family: var(--serif); font-size: 18px; line-height: 1.5; resize: vertical; min-height: 132px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); }
input::placeholder, textarea::placeholder { color: #59617e; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.counter { float: right; font-size: 12px; color: var(--muted); }
.counter--over { color: var(--red); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text-2); font-size: 14px; cursor: pointer;
}
.chip:hover { border-color: var(--line-gold); text-decoration: none; color: var(--text); }
.chip--on { border-color: var(--gold); color: var(--gold-hi); background: rgba(201, 162, 39, .1); }

.flashes { margin-top: 18px; display: grid; gap: 8px; }
.flash { padding: 11px 15px; border-radius: 9px; border: 1px solid var(--line); font-size: 14px; }
.flash--error { border-color: rgba(203, 96, 96, .45); background: rgba(203, 96, 96, .1); color: #f0b6b6; }
.flash--ok { border-color: rgba(87, 173, 131, .45); background: rgba(87, 173, 131, .1); color: #a9e3c6; }

/* ------------------------------------------------------------------ страница пророчества */

.proph { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 38px; align-items: start; }
.proph__art { position: sticky; top: 90px; }
.proph__art img { width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--r); border: 1px solid var(--line-gold); display: block; }
.proph__text { font-family: var(--serif); font-size: clamp(24px, 3.4vw, 33px); line-height: 1.38; margin: 0 0 22px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }

.paybox { border: 1px solid var(--line-gold); border-radius: var(--r); padding: 24px; background: rgba(201, 162, 39, .04); }
.paybox__amount { font-family: var(--serif); font-size: 34px; color: var(--gold); line-height: 1.1; }
.paybox__grid { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: start; margin: 20px 0; }
.qr { background: #fff; padding: 9px; border-radius: 9px; width: 150px; height: 150px; display: block; }
.qr svg { width: 100%; height: 100%; display: block; }

.copy {
  display: flex; gap: 8px; align-items: stretch; margin-top: 8px;
}
.copy input {
  font-family: var(--mono); font-size: 13px; padding: 10px 12px;
}
.copy button { flex: 0 0 auto; }

.split { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.split:last-child { border-bottom: 0; }
.split b { font-family: var(--mono); }
.split--total { border-top: 1px solid var(--line-gold); border-bottom: 0; margin-top: 6px; padding-top: 12px; font-size: 16px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 11px 14px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; }
.steps li:first-child { border-radius: 9px 9px 0 0; }
.steps li:last-child { border-radius: 0 0 9px 9px; }
.steps .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: 0 0 auto; }
.steps .done .dot { background: var(--green); }
.steps .now .dot { background: var(--gold); animation: pulse 1.6s infinite; }
.steps .done { color: var(--text-2); }
.steps .now { color: var(--gold-hi); border-color: var(--line-gold); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.verdict { border-radius: var(--r); padding: 20px; border: 1px solid var(--line); }
.verdict--correct { border-color: rgba(87, 173, 131, .4); background: rgba(87, 173, 131, .07); }
.verdict--wrong   { border-color: rgba(203, 96, 96, .4);  background: rgba(203, 96, 96, .07); }
.verdict--unclear { border-color: rgba(109, 143, 208, .4); background: rgba(109, 143, 208, .07); }
.verdict__h { font-family: var(--serif); font-size: 22px; margin: 0 0 8px; }

.votebar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line); margin: 12px 0 8px; }
.votebar i { display: block; height: 100%; }
.votebar .y { background: var(--green); }
.votebar .n { background: var(--red); }
.voteform { display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ таблицы */

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
.table tbody tr:hover { background: rgba(255, 255, 255, .02); }
.table td.num, .table th.num { text-align: right; font-family: var(--mono); }
.rank { font-family: var(--serif); font-size: 19px; color: var(--muted); width: 46px; }
.rank--1 { color: var(--gold); } .rank--2 { color: #c3ccdd; } .rank--3 { color: #c08b52; }
.table-scroll { overflow-x: auto; }

/* ------------------------------------------------------------------ подвал */

.footer { border-top: 1px solid var(--line); margin-top: 70px; padding: 34px 0 46px; }
.footer__in { display: flex; gap: 30px; flex-wrap: wrap; justify-content: space-between; }
.footer__brand { font-family: var(--serif); letter-spacing: .22em; color: var(--gold); margin-bottom: 8px; }
.footer__nav { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.footer__nav a { color: var(--muted); font-size: 14px; }

.prose { max-width: 72ch; }
.prose p, .prose li { color: var(--text-2); }
.prose h2 { margin-top: 40px; }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 2px 6px; border-radius: 5px; color: var(--gold-hi); }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); }

.pager { display: flex; gap: 12px; justify-content: center; margin-top: 34px; }

@media (max-width: 860px) {
  .proph { grid-template-columns: 1fr; }
  .proph__art { position: static; max-width: 420px; }
  .row { grid-template-columns: 1fr; }
  .paybox__grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }

  /* Разделы уезжают во вторую строку и прокручиваются вбок — прятать их нельзя,
     иначе с телефона до ленты и рейтинга просто не добраться. */
  .topbar__in { height: auto; flex-wrap: wrap; gap: 12px; padding-top: 12px; }
  .nav {
    order: 3; width: 100%; margin: 0; gap: 20px; padding: 11px 0;
    overflow-x: auto; border-top: 1px solid var(--line);
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; font-size: 14px; }
  .topbar .btn { margin-left: auto; }
  .hide-sm { display: none; }

  .hero { padding: 48px 0 30px; }
  .section { padding: 38px 0; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 10px; }
  .paybox, .card { padding: 18px; }
  .paybox__amount { font-size: 28px; }
}

/* ---------------------------------------------- запечатанное пророчество */

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode {
  display: block; padding: 12px 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); transition: border-color .15s, background .15s;
}
.mode:hover { border-color: var(--line-gold); }
.mode:has(input:checked) { border-color: var(--gold); background: var(--surface-2); }
.mode input { margin-right: 8px; accent-color: var(--gold); }
.mode__title { font-weight: 600; }
.mode__hint { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }

.sealed {
  margin: 22px 0 26px; padding: 18px 20px;
  border: 1px solid var(--line-gold); border-radius: var(--r);
  background: linear-gradient(180deg, #14192b, #0d111c);
}
.sealed__label {
  font-size: 12px; letter-spacing: 3px; color: var(--gold);
  font-family: var(--serif);
}
.sealed--open { border-color: rgba(87, 173, 131, .35); }
.sealed--open .sealed__label { color: var(--green); }

@media (max-width: 560px) { .modes { grid-template-columns: 1fr; } }

.badge--sealed { color: var(--gold); border-color: var(--line-gold); }
.pcard__answer {
  margin: 10px 0 0; padding-left: 12px; font-size: 14px; color: var(--text-2);
  border-left: 2px solid rgba(87, 173, 131, .45);
}

.kvtable td.ok  { color: var(--green); }
.kvtable td.bad { color: var(--red); }

/* Переключатель языка */
.langs { display: flex; gap: 2px; align-items: center; margin-left: auto; margin-right: 14px; }
.langs a, .langs__on {
  padding: 4px 7px; font-size: 12px; letter-spacing: .5px; border-radius: 6px;
  text-decoration: none;
}
.langs a { color: var(--muted); }
.langs a:hover { color: var(--text); background: var(--surface); }
.langs__on { color: var(--gold); background: var(--surface-2); cursor: default; }
@media (max-width: 720px) { .langs { margin-right: 8px; } }
