:root {
  --portal-bg: #080106;
  --portal-panel: #190510;
  --portal-panel-soft: rgba(32, 6, 19, 0.82);
  --portal-pink: #f50057;
  --portal-pink-soft: #ff88ae;
  --portal-gold: #e5b858;
  --portal-text: #fff7fa;
  --portal-muted: #b99aa7;
  --portal-line: rgba(229, 184, 88, 0.18);
  --portal-serif: "Playfair Display", Georgia, serif;
  --portal-sans: "Poppins", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }

.portal-page {
  min-height: 100vh;
  color: var(--portal-text);
  font: 400 15px/1.6 var(--portal-sans);
  background:
    radial-gradient(circle at 12% 18%, rgba(130, 9, 54, 0.3), transparent 28%),
    radial-gradient(circle at 90% 72%, rgba(82, 30, 49, 0.26), transparent 31%),
    linear-gradient(135deg, #070105 0%, #12030b 48%, #070105 100%);
}

.portal-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}

.portal-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px clamp(20px, 5vw, 74px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(8, 1, 6, 0.76);
  backdrop-filter: blur(20px);
}

.portal-logo {
  color: var(--portal-text);
  font: 700 1.65rem/1 var(--portal-serif);
  text-decoration: none;
}

.portal-logo span { color: #d57496; font-style: italic; }
.portal-header nav { display: flex; align-items: center; gap: 25px; }
.portal-header nav a { color: rgba(255, 247, 250, 0.73); font-size: 0.8rem; font-weight: 600; text-decoration: none; }
.portal-header nav a:hover { color: #fff; }
.portal-header .portal-nav-accent { padding: 9px 15px; border: 1px solid rgba(229, 184, 88, 0.34); border-radius: 999px; color: var(--portal-gold); }

.account-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(430px, 0.72fr);
  gap: clamp(44px, 7vw, 110px);
  align-items: center;
  width: min(1220px, calc(100% - 40px));
  min-height: calc(100vh - 126px);
  margin: 0 auto;
  padding: 54px 0;
}

.account-story { max-width: 610px; }
.portal-kicker { display: inline-flex; align-items: center; gap: 9px; color: var(--portal-pink-soft); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em; }
.account-story h1, .application-intro h1 { margin: 21px 0 22px; font: 800 clamp(3.2rem, 6.5vw, 6.6rem)/0.97 var(--portal-serif); letter-spacing: -0.035em; text-wrap: balance; }
.account-story h1 em, .application-intro h1 em { color: var(--portal-gold); font-weight: 600; }
.account-story > p, .application-intro > p { max-width: 590px; color: var(--portal-muted); font-size: 1rem; line-height: 1.85; }

.story-benefits { display: grid; gap: 15px; margin: 32px 0; padding: 0; list-style: none; }
.story-benefits li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; color: #d9c4cc; }
.story-benefits i { margin-top: 5px; color: var(--portal-gold); }
.story-benefits strong { display: block; margin-bottom: 2px; color: #fff; }
.story-note { font-size: 0.75rem !important; }
.story-note i { margin-right: 7px; color: var(--portal-pink-soft); }

.account-card, .application-card {
  position: relative;
  overflow: hidden;
  padding: clamp(27px, 4vw, 46px);
  border: 1px solid var(--portal-line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(41, 8, 25, 0.94), rgba(19, 3, 11, 0.95));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52), 0 0 42px rgba(245, 0, 87, 0.06);
}

.account-card::before, .application-card::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(245, 0, 87, 0.09);
  filter: blur(54px);
  pointer-events: none;
}

.card-heading { position: relative; text-align: center; }
.card-heading > span { color: var(--portal-pink-soft); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2em; }
.card-heading h2 { margin: 7px 0 8px; font: 800 2.35rem/1.1 var(--portal-serif); }
.card-heading p { margin: 0 auto; color: var(--portal-muted); font-size: 0.82rem; line-height: 1.65; }

.google-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  margin-top: 27px;
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: #2b2025;
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.google-button:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24); }
.google-button.is-disabled { opacity: 0.64; }

.form-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: #8e707c; font-size: 0.68rem; }
.form-divider::before, .form-divider::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.09); }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; border-radius: 12px; background: rgba(2, 0, 1, 0.42); }
.auth-tabs button { padding: 10px; border: 0; border-radius: 9px; background: transparent; color: var(--portal-muted); font-weight: 600; cursor: pointer; }
.auth-tabs button.active { background: rgba(245, 0, 87, 0.13); color: #fff; box-shadow: inset 0 0 0 1px rgba(245, 0, 87, 0.19); }

.portal-form { display: grid; gap: 15px; margin-top: 22px; }
.portal-form label, .application-form label { display: grid; gap: 7px; color: #d9c0ca; font-size: 0.76rem; font-weight: 600; }
.portal-form .form-row, .application-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.input-shell { display: grid; grid-template-columns: 38px 1fr; align-items: center; min-width: 0; border: 1px solid rgba(229, 184, 88, 0.18); border-radius: 11px; background: rgba(4, 0, 2, 0.46); }
.input-shell:focus-within { border-color: rgba(245, 0, 87, 0.74); box-shadow: 0 0 0 3px rgba(245, 0, 87, 0.08); }
.input-shell i { color: #a67889; text-align: center; }
.input-shell input { min-width: 0; width: 100%; padding: 12px 13px 12px 0; border: 0; outline: 0; background: transparent; color: #fff; }
.input-shell input::placeholder, .application-form input::placeholder, .application-form textarea::placeholder { color: #795d69; }

.portal-check { display: grid !important; grid-template-columns: 18px 1fr; gap: 10px !important; align-items: start; color: #aa8a97 !important; font-size: 0.7rem !important; font-weight: 400 !important; line-height: 1.55; cursor: pointer; }
.portal-check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--portal-pink); }

.portal-primary, .portal-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 49px;
  padding: 13px 20px;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.portal-primary { border: 1px solid rgba(255, 132, 171, 0.42); background: linear-gradient(105deg, #c90047, #f50057 54%, #b90040); box-shadow: 0 12px 32px rgba(226, 0, 78, 0.25); }
.portal-primary:hover { box-shadow: 0 16px 40px rgba(226, 0, 78, 0.38); transform: translateY(-1px); }
.portal-primary:disabled { opacity: 0.58; cursor: wait; transform: none; }
.portal-secondary { border: 1px solid rgba(229, 184, 88, 0.25); background: rgba(229, 184, 88, 0.06); color: var(--portal-gold); }
.portal-link-button { width: 100%; margin-top: 12px; }
.text-button { margin: 17px auto 0; padding: 6px; border: 0; background: transparent; color: #a98694; cursor: pointer; }

.portal-message { margin: 14px 0 0; padding: 10px 12px; border: 1px solid rgba(229, 184, 88, 0.25); border-radius: 10px; background: rgba(229, 184, 88, 0.07); color: #e9ca82; font-size: 0.75rem; text-align: center; }
.portal-message.error { border-color: rgba(245, 0, 87, 0.34); background: rgba(245, 0, 87, 0.08); color: #ffafc8; }

.member-view { position: relative; text-align: center; }
.member-avatar { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 17px; overflow: hidden; border: 1px solid rgba(229, 184, 88, 0.42); border-radius: 50%; background: rgba(229, 184, 88, 0.09); color: var(--portal-gold); font-size: 1.6rem; }
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-status { color: #81d7ad; font-size: 0.67rem; font-weight: 700; letter-spacing: 0.13em; }
.member-view h2 { margin: 10px 0 2px; font: 800 2.25rem var(--portal-serif); }
.member-email { margin: 0; color: var(--portal-muted); }
.member-access-card { margin: 25px 0 18px; padding: 20px; border: 1px solid rgba(229, 184, 88, 0.18); border-radius: 14px; background: rgba(4, 0, 2, 0.35); text-align: left; }
.member-access-card span { color: var(--portal-gold); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.16em; }
.member-access-card strong { display: block; margin-top: 5px; font: 700 1.3rem var(--portal-serif); }
.member-access-card p { margin: 5px 0 0; color: var(--portal-muted); font-size: 0.73rem; }

.portal-footer { position: relative; z-index: 1; display: grid; justify-items: center; gap: 9px; padding: 22px 20px 28px; color: #8d707d; font-size: 0.7rem; text-align: center; }
.portal-footer strong { color: #d8b65e; font-size: 0.74rem; letter-spacing: .12em; text-transform: uppercase; }
.portal-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
.portal-footer a { color: #caaeba; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
.portal-footer a:hover { color: #fff; }

/* Featured profile application */
.application-shell { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(320px, 0.62fr) minmax(580px, 1fr); gap: clamp(38px, 6vw, 90px); align-items: start; width: min(1360px, calc(100% - 42px)); margin: 0 auto; padding: 70px 0 90px; }
.application-intro { position: sticky; top: 34px; padding-top: 28px; }
.application-intro h1 { font-size: clamp(3rem, 5.2vw, 5.6rem); }
.application-promise { display: grid; gap: 12px; margin-top: 30px; }
.application-jump { display: inline-flex; align-items: center; gap: 8px; margin-top: 9px; padding: 10px 16px; border: 1px solid rgba(229,184,88,.32); border-radius: 999px; color: var(--portal-gold); font-size: .72rem; font-weight: 700; text-decoration: none; }
.application-promise article { display: grid; grid-template-columns: 42px 1fr; gap: 13px; align-items: center; padding: 14px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 13px; background: rgba(255, 255, 255, 0.025); }
.application-promise article > i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(229, 184, 88, 0.09); color: var(--portal-gold); }
.application-promise strong, .application-promise span { display: block; }
.application-promise strong { color: #f6edf0; font-size: 0.78rem; }
.application-promise span { color: var(--portal-muted); font-size: 0.68rem; line-height: 1.5; }
.application-warning { display: grid; grid-template-columns: 20px 1fr; gap: 10px; margin-top: 23px; padding: 15px; border-left: 2px solid var(--portal-pink); background: rgba(245, 0, 87, 0.055); color: #ac8c99; font-size: 0.7rem; }
.application-warning i { margin-top: 3px; color: var(--portal-pink-soft); }
.application-warning p { margin: 0; }

.application-card { padding: clamp(25px, 4vw, 50px); }
.application-heading { text-align: left; }
.application-heading p { margin-left: 0; }
.signed-in-note { margin-top: 22px; padding: 10px 13px; border: 1px solid rgba(68, 190, 131, 0.2); border-radius: 9px; background: rgba(68, 190, 131, 0.06); color: #8eddb7; font-size: 0.72rem; }
.signed-in-note i { margin-right: 6px; }
.application-form { display: grid; gap: 28px; margin-top: 28px; }
.application-form fieldset { display: grid; gap: 15px; min-width: 0; margin: 0; padding: 0 0 28px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.075); }
.application-form legend { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 17px; color: #fff; font: 700 1.18rem var(--portal-serif); }
.application-form legend span { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid rgba(229, 184, 88, 0.31); border-radius: 50%; color: var(--portal-gold); font: 700 0.62rem var(--portal-sans); }
.application-form label small { display: block; color: #826873; font-size: 0.61rem; font-weight: 400; }
.application-form input, .application-form select, .application-form textarea { width: 100%; min-width: 0; padding: 12px 13px; border: 1px solid rgba(229, 184, 88, 0.17); border-radius: 10px; outline: 0; background: rgba(4, 0, 2, 0.43); color: #fff; }
.application-form textarea { resize: vertical; line-height: 1.65; }
.application-form input:focus, .application-form select:focus, .application-form textarea:focus { border-color: rgba(245, 0, 87, 0.7); box-shadow: 0 0 0 3px rgba(245, 0, 87, 0.07); }
.field-hint { margin: -6px 0 0; color: #876b77; font-size: 0.68rem; }
.service-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.service-choices label { cursor: pointer; }
.service-choices input { position: absolute; opacity: 0; pointer-events: none; }
.service-choices span { display: flex; align-items: center; gap: 9px; min-height: 49px; padding: 12px; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 11px; background: rgba(255, 255, 255, 0.025); color: #bfa6b0; font-size: 0.7rem; }
.service-choices input:checked + span { border-color: rgba(229, 184, 88, 0.5); background: rgba(229, 184, 88, 0.09); color: #fff1ce; }
.service-choices i { color: var(--portal-gold); }
.application-confirmations { gap: 11px !important; }
.application-submit { width: 100%; }
.application-success { position: relative; padding: 48px 0; text-align: center; }
.success-seal { display: grid; place-items: center; width: 78px; height: 78px; margin: 0 auto 20px; border: 1px solid rgba(229, 184, 88, 0.55); border-radius: 50%; background: rgba(229, 184, 88, 0.08); color: var(--portal-gold); font-size: 1.8rem; }
.application-success > span { color: #86d9af; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em; }
.application-success h2 { margin: 12px auto; max-width: 530px; font: 800 2.6rem/1.15 var(--portal-serif); }
.application-success > p { max-width: 570px; margin: 0 auto; color: var(--portal-muted); }
.reference-card { display: inline-grid; gap: 3px; margin: 28px 0 16px; padding: 13px 24px; border: 1px solid var(--portal-line); border-radius: 11px; background: rgba(0, 0, 0, 0.22); }
.reference-card span { color: #8b6f7a; font-size: 0.6rem; letter-spacing: 0.15em; }
.reference-card strong { color: var(--portal-gold); }

@media (max-width: 980px) {
  .account-layout { grid-template-columns: 1fr; width: min(680px, calc(100% - 34px)); padding-top: 45px; }
  .account-story { max-width: none; text-align: center; }
  .account-story > p { margin-left: auto; margin-right: auto; }
  .story-benefits { max-width: 560px; margin-left: auto; margin-right: auto; text-align: left; }
  .application-shell { grid-template-columns: 1fr; width: min(760px, calc(100% - 34px)); padding-top: 42px; }
  .application-intro { position: static; padding-top: 0; }
}

@media (max-width: 620px) {
  .portal-header { min-height: 67px; padding: 11px 16px; }
  .portal-logo { font-size: 1.42rem; }
  .portal-header nav { gap: 11px; }
  .portal-header nav a { font-size: 0.67rem; }
  .portal-header nav a:first-child { display: none; }
  .account-layout, .application-shell { width: min(100% - 22px, 680px); padding: 30px 0 55px; }
  .account-card { order: -1; }
  .account-story { padding-top: 18px; }
  .account-story h1, .application-intro h1 { font-size: clamp(2.75rem, 15vw, 4.2rem); }
  .account-card, .application-card { padding: 25px 18px; border-radius: 18px; }
  .portal-form .form-row, .application-form .form-row, .service-choices { grid-template-columns: 1fr; }
  .card-heading h2 { font-size: 2rem; }
  .application-form { gap: 23px; }
  .application-form fieldset { padding-bottom: 23px; }
  .application-success h2 { font-size: 2rem; }
  .portal-footer { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}
