:root {
  --portal-bg: var(--bg);
  --portal-card: var(--panel);
  --portal-border: var(--border);
  --portal-shadow: var(--shadow-2);
}

body.portal-body {
  background: var(--portal-bg);
}

.portal-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 0 0;
  position: relative;
  overflow: hidden;
}

.portal-main{
  flex: 1;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding: 44px 16px 56px;
}

.portal-body .footer{
  margin-top: 0;
}

.portal-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.portal-bg::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -180px;
  width: 980px;
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(73, 96, 230, 0.18), rgba(73, 96, 230, 0) 70%);
}

.portal-bg::after {
  content: "";
  position: absolute;
  right: -260px;
  bottom: -260px;
  width: 620px;
  height: 620px;
  background: radial-gradient(closest-side, rgba(73, 96, 230, 0.10), rgba(73, 96, 230, 0) 70%);
  transform: rotate(12deg);
}

.portal-card {
  width: 100%;
  max-width: 720px;
  background: var(--portal-card);
  border: 1px solid var(--portal-border);
  border-radius: 22px;
  box-shadow: var(--portal-shadow);
  padding: 26px;
  position: relative;
}
.portal-content{
  width: 100%;
  max-width: 1040px;
  display:flex;
  flex-direction: column;
  gap: 104px;
}

.portal-card--hero{
  max-width: 820px;
  margin: 0 auto;
}
.portal-hint{
  margin-top: 12px;
  opacity: .72;
  font-size: 14px;
}

.portal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.portal-brand img {
  height: 34px;
  display: block;
}

.portal-lang{
  min-width: 150px;
}

.portal-head {
  text-align: left;
  margin-bottom: 16px;
}

.portal-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.portal-subtitle {
  margin: 8px 0 0;
  opacity: 0.72;
  max-width: 62ch;
}

.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.portal-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.portal-option:hover {
  transform: translateY(-1px);
  border-color: rgba(73, 96, 230, 0.45);
  box-shadow: 0 12px 24px rgba(73, 96, 230, 0.12);
}

.portal-option:focus-visible {
  outline: 3px solid rgba(73, 96, 230, 0.25);
  outline-offset: 2px;
}

.portal-option strong {
  font-weight: 700;
}

.portal-option-meta {
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.70;
}

.portal-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(17,24,39,.03);
  border: 1px solid rgba(17,24,39,.10);
  font-size: 13px;
  opacity: 0.85;
}

.portal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-actions .btn {
  border-radius: 999px;
}

@media (max-width: 740px) {
  .portal-card { padding: 18px; }
  .portal-grid { grid-template-columns: 1fr; }
  .portal-title { font-size: 22px; }
}

/* Sections */
.portal-section{
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}
.portal-h2{
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.2;
  text-align: center;
}
.portal-prose{
  max-width: 78ch;
  margin: 0 auto;
  text-align: center;
  opacity: .92;
}
.portal-prose p{
  margin: 0 0 12px;
  line-height: 1.9;
}
.portal-note{
  opacity: .72;
  font-size: 14px;
}

.portal-stats{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
@media (max-width: 900px){
  .portal-stats{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .portal-stats{ grid-template-columns: 1fr; }
}
.portal-stat{
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(17,24,39,.08);
  padding: 16px 14px 14px;
  text-align: center;
}
.portal-stat-number{
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.portal-stat-label{
  margin-top: 6px;
  opacity: .75;
  font-weight: 600;
}

.portal-steps{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
@media (max-width: 900px){
  .portal-steps{ grid-template-columns: 1fr; }
}
.portal-step{
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 18px;
  padding: 18px 16px 16px;
  text-align: center;
  box-shadow: 0 12px 28px rgba(17,24,39,.07);
}
.portal-step-icon{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(73,96,230,.10);
  color: rgba(73,96,230,.95);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin: 0 auto 10px;
  font-size: 18px;
}
.portal-step-title{
  font-weight: 800;
  margin: 0 0 6px;
}
.portal-step-text{
  opacity: .74;
  line-height: 1.7;
}

.portal-app{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  align-items: center;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(17,24,39,.08);
  padding: 22px;
}
@media (max-width: 900px){
  .portal-app{ grid-template-columns: 1fr; }
  .portal-app-media{ order: -1; }
}
.portal-app-copy{ text-align: left; }
.portal-app-copy .portal-h2,
.portal-app-copy .portal-prose{ text-align: left; margin-left: 0; margin-right: 0; }
.portal-app-media img{
  width: 100%;
  height: auto;
  display:block;
  border-radius: 18px;
  border: 1px solid rgba(17,24,39,.08);
  box-shadow: 0 16px 40px rgba(17,24,39,.10);
}
.portal-cta{
  margin-top: 14px;
  display:flex;
  justify-content:center;
}
