/*
 * Aktienallianz member pages (/beitreten, /willkommen, /portal). Standalone: these pages no
 * longer load premium.css. Same brand rules and tokens as css/depots.css: solid colors only,
 * navy base, mint for active and positive states, serif only for headline figures and the
 * wordmark. Dark is the default; html[data-theme="light"] is the second theme.
 */

:root {
  --bg: #012041;
  --raise: #062b52;
  --raise-2: #0c3662;
  --line: #18416d;
  --fg: #f3f6fa;
  --muted: #9db0c7;
  --faint: #6f88a6;
  --accent: #3ddc97;
  --accent-soft: #0d4553;
  --neg: #ff8a80;
  --neg-soft: #3d2a47;
  --warn: #f0c15c;
  --warn-soft: #3a3a36;
  --on-accent: #012041;
  --nav-bg: #012041;
  --nav-fg: #ffffff;
  --nav-muted: #9db0c7;
  --nav-line: #18416d;
  --shadow: 0 0 0 0 transparent;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-card: 20px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --card-border: #dfe5ee;
  --bg: #f4f6f9;
  --raise: #ffffff;
  --raise-2: #edf1f6;
  --line: #dfe5ee;
  --fg: #012041;
  --muted: #4f6480;
  --faint: #8193aa;
  --accent: #0f9d6a;
  --accent-soft: #e1f4ea;
  --neg: #cf3f3f;
  --neg-soft: #fbe8e8;
  --warn: #9a5b06;
  --warn-soft: #fdf3df;
  --on-accent: #ffffff;
  --nav-line: #012041;
  --shadow: 0 1px 2px #0120410d, 0 8px 24px #0120410a;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.015em;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-line);
  color: var(--nav-fg);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--nav-fg);
  text-decoration: none;
  flex: none;
}

.brand img {
  width: 38px;
  height: auto;
  display: block;
}

.brand-name {
  font: 600 18px/1 var(--serif);
  letter-spacing: 0.01em;
}

.header-nav,
.m-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--raise);
  color: var(--fg);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--raise-2);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent);
}

.btn-ghost {
  background: transparent;
}

.btn-large {
  min-height: 48px;
  font-size: 15px;
  padding: 0 20px;
}

.btn-header {
  min-height: 36px;
  background: transparent;
  border-color: #18416d;
  color: #ffffff;
}

.btn-header:hover {
  background: #0c3662;
}

/* A header button that should be found at once (welcome page: the way into the member area). */
.btn-header--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.btn-header--accent:hover {
  background: var(--accent);
  filter: brightness(1.06);
}

.btn-danger-ghost {
  background: transparent;
  color: var(--neg);
}

.btn-danger-ghost:hover {
  background: var(--neg-soft);
}

.btn-danger {
  background: var(--neg);
  border-color: var(--neg);
  color: var(--on-accent);
  font-weight: 600;
}

.btn-danger:hover {
  background: var(--neg);
}

/* -------------------------------------------------------------------- page */

.member-main {
  padding: 40px 0 56px;
  min-height: calc(100vh - 140px);
}

.member-narrow {
  width: min(100% - 32px, 640px);
  margin-inline: auto;
}

.member-wide {
  width: min(100% - 32px, 1088px);
  margin-inline: auto;
}

.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.member-title {
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.member-lead {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 28px;
  max-width: 62ch;
}

/* ------------------------------------------------------------------- cards */

.m-card {
  background: var(--raise);
  border: 1px solid var(--card-border, transparent);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 24px;
  min-width: 0;
}

.m-card + .m-card {
  margin-top: 20px;
}

.m-card h2,
.m-card h3 {
  font-size: 16px;
  line-height: 1.3;
  margin: 0 0 6px;
}

.m-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.m-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.m-card-head p {
  margin: 0;
}

.m-grid {
  display: grid;
  gap: 20px;
}

.m-grid .m-card + .m-card {
  margin-top: 0;
}

@media (min-width: 900px) {
  .m-grid-2 {
    grid-template-columns: 1fr 1fr;
  }

  .m-grid-checkout {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: start;
  }
}

/* ------------------------------------------------------------------- forms */

.m-field {
  display: block;
  margin-bottom: 16px;
}

.m-field-row {
  display: grid;
  gap: 0 16px;
}

@media (min-width: 560px) {
  .m-field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.m-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--fg);
}

.m-optional {
  font-weight: 400;
  color: var(--faint);
}

.m-input,
.m-select {
  width: 100%;
  font-size: 16px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--raise-2);
  color: var(--fg);
}

.m-input::placeholder {
  color: var(--faint);
}

.m-input:focus,
.m-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.m-input[aria-invalid="true"] {
  border-color: var(--neg);
}

.m-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 14px;
  cursor: pointer;
}

.m-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.m-check a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.m-form-error {
  color: var(--neg);
  font-size: 14px;
  margin: 8px 0 0;
  min-height: 1.4em;
}

.m-card .m-form-error {
  color: var(--neg);
  margin: 8px 0 0;
}

.m-submit {
  width: 100%;
  margin-top: 8px;
}

.m-fineprint {
  font-size: 12.5px;
  color: var(--faint);
  text-align: center;
  margin: 16px 0 0;
}

.m-card .m-fineprint {
  color: var(--faint);
  margin: 16px 0 0;
}

.m-join {
  text-align: left;
  max-width: 34rem;
  margin-inline: auto;
}

/* Plan picker */
.m-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 24px;
  border: 0;
  padding: 0;
}

.m-plan {
  position: relative;
  display: block;
  cursor: pointer;
}

.m-plan input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.m-plan-box {
  display: grid;
  gap: 4px;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--raise);
}

.m-plan:hover .m-plan-box {
  background: var(--raise-2);
}

.m-plan input:checked + .m-plan-box {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: var(--raise-2);
}

.m-plan input:focus-visible + .m-plan-box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.m-plan-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.m-plan-price {
  font: 600 30px/1.1 var(--serif);
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--fg);
}

.m-plan-price small {
  font: 400 13px var(--sans);
  color: var(--faint);
}

.m-plan-hint {
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 600;
  min-height: 1.2em;
}

/* ------------------------------------------------------------------- steps */

.m-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}

.m-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
}

.m-step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 14px;
  background: var(--raise-2);
  color: var(--muted);
  border: 1px solid var(--line);
}

.m-step.is-active .m-step-dot {
  border-color: var(--accent);
  color: var(--accent);
}

.m-step.is-done .m-step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.m-step-title,
.m-card .m-step-title {
  font-weight: 600;
  color: var(--fg);
  margin: 6px 0 4px;
}

.m-step-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.m-step.is-done .m-step-body .m-step-actions {
  display: none;
}

.m-step-done-note,
.m-card .m-step-done-note {
  display: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  margin: 0;
}

.m-step.is-done .m-step-done-note,
.m-card .m-step.is-done .m-step-done-note {
  display: block;
}

.m-card-steps .m-step + .m-step,
.welcome-steps .m-step + .m-step {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

/* ----------------------------------------------------------------- helpers */

.m-muted,
.m-card .m-muted {
  color: var(--faint);
  font-size: 13px;
}

.m-link {
  color: var(--fg);
  font: inherit;
  font-weight: 500;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.m-link:hover {
  color: var(--accent);
}

.m-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.m-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--raise-2);
  color: var(--muted);
}

.m-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.m-badge:empty {
  display: none;
}

.m-badge.is-ok {
  background: var(--accent-soft);
  color: var(--accent);
}

.m-badge.is-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.m-badge.is-danger {
  background: var(--neg-soft);
  color: var(--neg);
}

.m-alert {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  background: var(--raise-2);
  color: var(--fg);
}

.m-alert p {
  margin: 0;
}

.m-alert.is-ok {
  background: var(--accent-soft);
  border-color: transparent;
}

.m-alert.is-warn {
  background: var(--warn-soft);
  border-color: transparent;
}

.m-alert.is-danger {
  background: var(--neg-soft);
  border-color: transparent;
}

.m-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
  margin: 0 0 20px;
  font-size: 14px;
}

.m-dl dt {
  color: var(--muted);
}

.m-dl dd {
  margin: 0;
  font-weight: 600;
  color: var(--fg);
  text-align: right;
}

.m-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  border: 0;
  padding: 0;
}

.m-chip {
  position: relative;
  cursor: pointer;
}

.m-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.m-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--raise);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.m-chip:hover span {
  color: var(--fg);
}

.m-chip input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.m-chip input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.m-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.m-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.m-list li:last-child {
  border-bottom: 0;
}

.m-center {
  text-align: center;
  padding: 32px 0;
}

.m-card.m-center {
  padding: 40px 24px;
}

.m-center .member-title {
  font-size: 24px !important;
}

.m-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid var(--raise-2);
  border-top-color: var(--accent);
  animation: m-spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

.btn .m-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
  margin: 0;
  border-color: transparent;
  border-top-color: currentColor;
  border-right-color: currentColor;
}

@keyframes m-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .m-spinner {
    animation-duration: 2.4s;
  }
}

.m-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  font-size: 22px;
  background: var(--accent-soft);
  color: var(--accent);
}

.m-icon-circle.is-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.m-dialog {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 24px;
  width: min(100% - 32px, 440px);
  background: var(--raise);
  color: var(--fg);
}

.m-dialog::backdrop {
  background: #010f20b3;
}

.m-dialog h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.m-dialog p {
  color: var(--muted);
  margin: 0 0 24px;
}

.m-dialog .m-actions {
  justify-content: flex-end;
}

.m-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  background: var(--fg);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
  max-width: calc(100% - 32px);
}

.m-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.m-summary-features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.m-summary-features li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.m-summary-features li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 600;
}

.m-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  padding: 0 0 40px;
  font-size: 12px;
  color: var(--faint);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a:hover {
  color: var(--fg);
}

/* Legal links at the end of the account page (it has no site footer). */
.portal-legal {
  margin: 32px 0 0;
  font-size: 12px;
  color: var(--faint);
  text-align: center;
}

.portal-legal a:hover {
  color: var(--fg);
}

@media (max-width: 640px) {
  .brand-name {
    display: none;
  }

  .member-main {
    padding: 28px 0 40px;
  }

  .m-card {
    padding: 16px;
  }

  .m-plan-box {
    padding: 12px;
  }

  .m-plan-price {
    font-size: 24px;
  }
}

/* ------------------------------------------------------------------- icons */
/* Phosphor duotone icons from the local sprite /img/icons.svg. Icons take the text color; mint is
   reserved for gains and active states, so resting icons stay muted. */

.ic {
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}

.ic-tile {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--raise-2);
  color: var(--muted);
}

.with-ic {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow .ic {
  width: 16px;
  height: 16px;
}
.eyebrow {
  color: var(--accent);
}

.m-card h2.with-ic,
.m-card h3.with-ic {
  margin-bottom: 8px;
}

.btn .ic {
  width: 18px;
  height: 18px;
}

.m-summary-features li::before {
  content: none;
}

.m-summary-features .ic {
  margin-top: 3px;
  color: var(--accent);
}

.m-step-title.with-ic {
  gap: 8px;
}

.m-step-title .ic {
  color: var(--muted);
}

.m-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--faint);
}

.m-trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.m-trust .ic {
  width: 17px;
  height: 17px;
}

.m-icon-circle .ic {
  width: 22px;
  height: 22px;
}

/* --------------------------------------------------------------- app shell */
/* The portal uses the same shell as /depots (css/depots.css): sidebar on desktop, top bar
   and tab bar on phones. Before login only the top bar shows. */

.app {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 16px 20px;
  background: #011a36;
  color: #ffffff;
}

:root[data-theme="light"] .side {
  background: #012041;
}

.app .brand {
  gap: 11px;
  padding: 0 10px;
}

.app .brand span {
  font: 600 19px/1 var(--serif);
  letter-spacing: 0.005em;
}

.menu {
  display: grid;
  gap: 2px;
  margin-top: 36px;
}

.menu-label {
  margin: 22px 10px 8px;
  font-size: 12px;
  font-weight: 500;
  color: #6f88a6;
}

.menu a,
.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #9db0c7;
  font-weight: 500;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.menu a:hover,
.side-link:hover {
  color: #ffffff;
  background: #ffffff0d;
}

.side-link[aria-current="page"] {
  color: #ffffff;
  background: #ffffff14;
}

.side-link[aria-current="page"] .ic {
  color: #3ddc97;
}

.side-foot {
  margin-top: auto;
  display: grid;
  gap: 2px;
  padding-top: 16px;
  border-top: 1px solid #ffffff14;
}

.main {
  min-width: 0;
}

.topbar,
.tabbar {
  display: none;
}

.content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 40px 64px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-title {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-sub {
  margin: 4px 0 0;
  color: var(--muted);
}

/* Logged out or still loading: no navigation, just the logo bar and a centered column. */
.app:has(#view-dashboard[hidden]) {
  display: block;
}

.app:has(#view-dashboard[hidden]) .side,
.app:has(#view-dashboard[hidden]) .tabbar {
  display: none;
}

.app:has(#view-dashboard[hidden]) .topbar {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 24px;
  background: #012041;
  border-bottom: 1px solid #ffffff14;
}

.app:has(#view-dashboard[hidden]) .content {
  padding-top: 56px;
}

.m-login .member-title {
  font-size: clamp(26px, 4vw, 32px);
}

/* Dashboard pieces */
.m-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.m-banner:hover {
  transform: translateY(-2px);
}

.m-banner-icon {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}

.m-banner-icon .ic {
  width: 22px;
  height: 22px;
}

.m-banner-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.m-banner-text strong {
  font-size: 16px;
  font-weight: 600;
}

.m-banner-text span {
  color: var(--muted);
}

.m-banner-go {
  margin-left: auto;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--raise-2);
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.m-banner:hover .m-banner-go {
  background: var(--accent);
  color: var(--on-accent);
}

.m-banner-go .ic {
  width: 16px;
  height: 16px;
}

.m-dash .m-card h2 {
  font-size: 15px;
}

@media (prefers-reduced-motion: no-preference) {
  .m-dash > * {
    animation: m-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .m-dash > :nth-child(n + 3) {
    animation-delay: 0.08s;
  }

  @keyframes m-rise {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
  }
}

@media (max-width: 960px) {
  .app {
    display: block;
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }

  .app:has(#view-dashboard[hidden]) {
    padding-bottom: 0;
  }

  .side {
    display: none;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 16px;
    background: #012041;
    border-bottom: 1px solid #ffffff14;
  }

  .tabbar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 6;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: #011a36;
    border-top: 1px solid #ffffff14;
  }

  .tabbar a {
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 7px 0 5px;
    border-radius: 12px;
    color: #9db0c7;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
  }

  .tabbar .ic {
    width: 22px;
    height: 22px;
  }

  .tabbar a[aria-current="page"] {
    color: #ffffff;
  }

  .tabbar a[aria-current="page"] .ic {
    color: #3ddc97;
  }

  .content {
    padding: 28px 20px 40px;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 22px 14px 32px;
  }

  .app .brand span {
    display: inline;
  }

  .page-title {
    font-size: 22px;
  }
}

/* ----------------------------------------------------------- community tag */

@media (min-width: 900px) {
  .m-span-2 {
    grid-column: 1 / -1;
  }
}

.m-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  border: 0;
  padding: 0;
}

.m-tag {
  position: relative;
  cursor: pointer;
}

.m-tag input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.m-tag span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--raise);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.m-tag i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.m-tag:hover span {
  color: var(--fg);
  background: var(--raise-2);
}

.m-tag input:checked + span {
  background: var(--raise-2);
  border-color: var(--fg);
  color: var(--fg);
  font-weight: 600;
}

.m-tag input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.m-tag-preview {
  flex: none;
  padding: 3px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* ------------------------------------------------------------ sign-in screen */
/* Signed out, the portal is one full-height screen: the form on the left, a quiet look at
   the product on the right (desktop only). No navigation, no top bar. */

.app:has(#view-dashboard[hidden]) .topbar {
  display: none;
}

.app:has(#view-dashboard[hidden]) .content {
  max-width: none;
  padding: 0;
}

.app:has(#view-dashboard:not([hidden])) .auth {
  display: none;
}

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.auth-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 48px 24px;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  margin-bottom: 48px;
  color: var(--fg);
  text-decoration: none;
}

.auth-brand span {
  font: 600 21px/1 var(--serif);
  letter-spacing: 0.005em;
}

.auth-logo {
  display: block;
  height: auto;
}

.auth-logo--light,
:root[data-theme="light"] .auth-logo--dark {
  display: none;
}

:root[data-theme="light"] .auth-logo--light {
  display: block;
}

.auth-box h1 {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.auth-lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.auth-lead strong {
  color: var(--fg);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.auth-box .m-input {
  min-height: 50px;
}

.auth-box .m-submit {
  min-height: 50px;
  margin-top: 4px;
}

.auth-hint {
  margin: 0;
  color: var(--faint);
  font-size: 14px;
}

.auth-foot {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.auth-sent-icon {
  margin: 0 0 24px;
}

.auth-loading {
  display: grid;
  justify-items: center;
  gap: 18px;
  color: var(--muted);
  text-align: center;
  min-height: 220px;
  place-content: center;
}

.auth-loading p {
  margin: 0;
}

/* Animated wordmark is the brand during boot — hide the static mark above it. */
.auth-main:has(#view-loading:not([hidden])) > .auth-brand {
  visibility: hidden;
}

/* Animated wordmark with a transparent background: white in the dark design, navy in the light one. */
.aa-loader-mark {
  display: block;
  width: min(320px, 78vw);
  aspect-ratio: 800 / 489;
  margin: 0 auto;
  background: url("/img/aktienallianz-loader-white.webp") center / contain no-repeat;
}

:root[data-theme="light"] .aa-loader-mark {
  background-image: url("/img/aktienallianz-loader-navy.webp");
}

@media (prefers-reduced-motion: reduce) {
  .aa-loader-mark {
    /* The wordmark still plays; keep the mark, drop busy motion elsewhere. */
    animation: none;
  }
}

.auth-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 36px;
  padding: 48px;
  background: var(--raise);
  border-left: 1px solid var(--line);
}

.auth-art {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.auth-art-card {
  display: grid;
  gap: 18px;
  padding: 26px 26px 22px;
  border-radius: 22px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.auth-art-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-art-chip {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--accent-soft);
}

.auth-art-line {
  display: block;
  flex: 1;
  height: 8px;
  border-radius: 8px;
  background: var(--raise-2);
}

.auth-art-line--mid {
  max-width: 62%;
}

.auth-art-line--short {
  max-width: 38%;
}

.auth-art-value {
  width: 58%;
  height: 30px;
  border-radius: 10px;
  background: var(--raise-2);
}

.auth-art-chart {
  display: block;
  width: 100%;
  height: 110px;
}

.auth-art-area {
  fill: var(--accent);
  opacity: 0.1;
}

.auth-art-stroke {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.auth-art-rows {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.auth-art-rows div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-art-tile {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  background: var(--raise-2);
}

.auth-art-pill {
  width: 46px;
  height: 18px;
  flex: none;
  margin-left: auto;
  border-radius: 999px;
  background: var(--accent-soft);
}

.auth-points {
  list-style: none;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 14px;
  color: var(--muted);
  font-size: 15px;
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-points .ic {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

@media (max-width: 900px) {
  .auth {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-side {
    display: none;
  }

  .auth-main {
    justify-content: flex-start;
    width: min(100%, 440px);
    padding: 32px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px));
  }

  .auth-brand {
    margin-bottom: 32px;
  }

  .auth-box h1 {
    font-size: clamp(24px, 7vw, 30px);
  }

  .aa-loader-mark {
    width: min(280px, 86vw);
  }
}

@media (max-width: 480px) {
  .btn-large,
  .auth-box .m-submit,
  .auth-box .m-input {
    min-height: 48px;
  }

  .m-card {
    padding: 20px 16px;
  }
}

/* Quiet text actions (new invite link, cancel membership) and the contact form. */
.btn-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0.35rem 0;
  font: inherit;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 3px;
  cursor: pointer;
}

.btn-link:hover,
.btn-link:focus-visible {
  color: var(--fg);
}

.m-quiet-actions {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.m-quiet-actions:empty {
  display: none;
}

.m-textarea {
  width: 100%;
  min-height: 6.5rem;
  resize: vertical;
  line-height: 1.5;
}

#contact-form {
  display: grid;
  gap: 0.9rem;
  justify-items: start;
}

#contact-form .m-field {
  width: 100%;
}

/* ------------------------------------------------------ join + welcome pages */
/* Extra air and quieter chrome so checkout/onboarding feel calm, not stacked. */

.join-page,
.welcome-page {
  background:
    radial-gradient(ellipse 70% 42% at 50% -8%, #0a3a66 0%, transparent 62%),
    var(--bg);
}

:root[data-theme="light"] .join-page,
:root[data-theme="light"] .welcome-page {
  background:
    radial-gradient(ellipse 70% 40% at 50% -10%, #d9e7f5 0%, transparent 60%),
    var(--bg);
}

.join-page .member-main,
.welcome-page .member-main {
  padding: 64px 0 88px;
}

.join-layout,
.welcome-layout {
  width: min(100% - 40px, 600px);
}

.join-intro,
.welcome-intro {
  margin-bottom: 36px;
}

.join-intro .member-title,
.welcome-intro .member-title,
.welcome-status .member-title {
  margin-bottom: 14px;
}

.join-intro .member-lead,
.welcome-intro .member-lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  max-width: 36ch;
}

.join-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: calc(var(--r-card) + 4px);
  background: color-mix(in srgb, var(--raise) 88%, transparent);
}

:root[data-theme="light"] .join-panel {
  background: var(--raise);
  box-shadow: var(--shadow);
  border-color: var(--card-border, var(--line));
}

.join-page .m-plans {
  gap: 14px;
  margin-bottom: 28px;
}

.join-page .m-plan-box {
  gap: 8px;
  padding: 18px 18px 16px;
  background: transparent;
}

.join-page .m-plan input:checked + .m-plan-box {
  background: var(--accent-soft);
}

.join-page .m-join {
  max-width: none;
  margin: 0;
}

.join-page .m-field {
  margin-bottom: 20px;
}

.join-page .m-check {
  margin-bottom: 20px;
  gap: 14px;
  line-height: 1.55;
}

.join-page .m-submit {
  margin-top: 4px;
}

.join-page .m-fineprint {
  margin-top: 18px;
  line-height: 1.5;
}

.join-page .m-trust {
  margin-top: 28px;
  gap: 12px 28px;
  font-size: 13px;
}

.join-perks {
  list-style: none;
  margin: 40px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 18px;
}

.join-perks li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 14px;
  align-items: start;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.join-perks .ic {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--accent);
}

.welcome-status {
  text-align: center;
  padding: 48px 28px;
  border: 1px solid var(--line);
  border-radius: calc(var(--r-card) + 4px);
  background: color-mix(in srgb, var(--raise) 88%, transparent);
  display: grid;
  justify-items: center;
  gap: 16px;
}

:root[data-theme="light"] .welcome-status {
  background: var(--raise);
  box-shadow: var(--shadow);
  border-color: var(--card-border, var(--line));
}

.welcome-status .member-title {
  font-size: clamp(1.45rem, 3.5vw, 1.85rem);
}

.welcome-status > p {
  margin: 0;
  color: var(--muted);
  max-width: 36ch;
}

.welcome-status .m-actions {
  justify-content: center;
  margin-top: 8px;
}

.welcome-steps {
  gap: 0;
  margin-top: 8px;
}

.welcome-steps .m-step {
  gap: 18px;
  padding-bottom: 8px;
}

/* Every step can be used right away and in any order; the number of the next one is highlighted. */

.welcome-steps .m-step-body p {
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 16px;
}

.welcome-steps .m-step.is-active .m-step-body {
  padding-bottom: 8px;
}

.welcome-steps .m-chips {
  margin: 4px 0 20px;
  gap: 10px;
}

.welcome-experience {
  max-width: 18rem;
  margin-bottom: 20px;
}

.welcome-hint {
  margin-top: 14px !important;
}

/* "The link is in your email too": only where someone sits at a computer (mouse, no touch). */
.welcome-hint--desktop {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .welcome-hint--desktop {
    display: block;
  }
}

.welcome-mailnote {
  text-align: center;
  margin: 40px 0 0;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .join-page .member-main,
  .welcome-page .member-main {
    padding: 40px 0 64px;
  }

  .join-layout,
  .welcome-layout {
    width: min(100% - 28px, 560px);
  }

  .join-panel,
  .welcome-status {
    padding: 22px 18px;
  }

  .join-page .m-plans {
    grid-template-columns: 1fr;
  }

  .join-intro,
  .welcome-intro {
    margin-bottom: 28px;
  }

  .join-perks {
    margin-top: 32px;
    padding-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .join-page,
  .welcome-page {
    background: var(--bg);
  }
}

/* Welcome page: invite as a QR code, at a computer only (see .welcome-hint--desktop). */
.welcome-qr {
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

@media (hover: hover) and (pointer: fine) {
  .welcome-qr:not([hidden]) {
    display: flex;
  }
}

.welcome-qr-code {
  flex: none;
  width: 132px;
  height: 132px;
  padding: 6px;
  border-radius: 10px;
  background: #ffffff;
}

.welcome-qr-code svg {
  display: block;
  width: 100%;
  height: 100%;
}

.welcome-steps .welcome-qr p {
  margin: 0;
  font-size: 14px;
}

/* Account page: invoices folded away at the bottom. */
.m-fold > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.m-fold > summary::-webkit-details-marker {
  display: none;
}

.m-fold > summary::after {
  content: "+";
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.m-fold[open] > summary {
  margin-bottom: 14px;
}

.m-fold[open] > summary::after {
  content: "\2212";
}

.m-fold > summary h2 {
  margin: 0;
}

.m-cancel-link {
  margin-top: 14px;
}

.m-grid > .m-fold {
  align-self: start;
}
