:root {
  color-scheme: dark;
  --bg: #0b1220;
  --bg-2: #0f172a;
  --panel: #121a2b;
  --panel-2: #182235;
  --text: #e5eefc;
  --muted: #9fb1cc;
  --border: rgba(255, 255, 255, 0.08);
  --surface: rgba(255, 255, 255, 0.03);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.26);
  --shadow-hover: 0 18px 42px rgba(0, 0, 0, 0.34);
  --accent: #66d9ef;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(102, 217, 239, 0.14);
  --good: #22c55e;
  --warn: #f59e0b;
  --danger: #f97316;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
}

a {
  color: #8fdcff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

strong {
  color: #f8fbff;
}

.page,
.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.page.page-narrow {
  width: min(1040px, calc(100% - 32px));
}

.topbar,
.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.page-intro {
  display: grid;
  gap: 8px;
}

.badge,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #08111f;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card .badge,
.row .badge {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
}

h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

p,
li,
ol,
ul {
  line-height: 1.6;
}

p {
  margin: 0;
}

.meta,
.summary,
.muted,
.line,
.footer,
.detail,
.small,
.kind {
  color: var(--muted);
}

.meta,
.summary,
.line,
.footer,
.detail,
.small,
.kind {
  font-size: 14px;
}

.summary {
  margin: 0 0 18px;
}

.back,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.back:hover,
.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.grid-links {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid.grid-main {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.card,
.link-card,
.row,
.item {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.card,
.item {
  padding: 18px;
}

.card {
  margin: 14px 0;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.card.empty {
  border-style: dashed;
  background: rgba(18, 26, 43, 0.6);
  box-shadow: none;
}

.row {
  display: grid;
  grid-template-columns: 2fr 0.9fr 0.9fr 1.4fr;
  gap: 10px;
  align-items: center;
  padding: 14px;
  margin: 0;
  background: var(--surface);
  box-shadow: none;
}

.card > .row:first-child,
.card .table > .row {
  margin: 0;
}

.row.head {
  background: rgba(102, 217, 239, 0.08);
  color: #cdeefd;
  font-size: 13px;
  text-transform: uppercase;
}

.card p {
  margin-top: 12px;
  white-space: pre-wrap;
}

.line + .line {
  margin-top: 6px;
}

.footer {
  margin-top: 10px;
}

.link-card {
  display: block;
  padding: 18px;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: var(--shadow-hover);
  border-color: rgba(102, 217, 239, 0.28);
}

.name {
  font-size: 22px;
  font-weight: 700;
}

.table,
.list {
  display: grid;
  gap: 12px;
}

.title {
  font-weight: 700;
}

.price {
  font-size: 28px;
  font-weight: 800;
  color: #f8fbff;
}

.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.tag.good,
.good {
  background: rgba(34, 197, 94, 0.15);
  color: #9af0b5;
}

.tag.warn,
.warn {
  background: rgba(245, 158, 11, 0.14);
  color: #f8cb75;
}

.ok {
  color: #9af0b5;
  font-weight: 700;
}

.warn.inline,
.card .warn {
  font-weight: 700;
}

ul,
ol {
  margin: 10px 0 0 20px;
  padding: 0;
}

li + li {
  margin-top: 6px;
}

.section-stack {
  display: grid;
  gap: 16px;
}

.flow {
  display: grid;
  gap: 12px;
}

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

  .row {
    grid-template-columns: 1fr;
  }

  .row.head {
    display: none;
  }

  .page,
  .wrap,
  .page.page-narrow {
    width: min(100%, calc(100% - 24px));
  }
}
