/* Min side. styles.css forces black text and transparent backgrounds on
 * `body *` with !important, so fills and accent colours here must be
 * declared with !important too. */

.account {
  width: min(760px, 100%);
  margin: clamp(24px, 5vw, 56px) auto;
}

.account h1 {
  margin: 6px 0 8px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.account h2 { margin: 0 0 10px; font-size: 22px; }

.account-lead { margin: 0 0 20px; color: #4d5a57 !important; -webkit-text-fill-color: #4d5a57 !important; }

.account-auth { width: min(440px, 100%); margin: 0 auto; }

.account-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 999px;
}

.account-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

body.account-page .account-tabs button[aria-pressed="true"] {
  background: #0b1f2e !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.account-form { display: grid; gap: 14px; }

.account-form--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.account-form--grid > button,
.account-form--grid > [data-form-status] { grid-column: 1 / -1; justify-self: start; }

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

.account-field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }

.account-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 14px;
  font: inherit;
  font-weight: 500;
}

body.account-page .account-field input { background: #ffffff !important; }

.account-field input:focus-visible {
  outline: 2px solid #2f6d64;
  outline-offset: 1px;
  border-color: #2f6d64;
}

.account-field__input { position: relative; }
.account-field__input input { padding-right: 48px; }

.account-field__toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #4d5a57;
  cursor: pointer;
}

.account-field__toggle:hover { color: #2f6d64; }

.account-field__toggle:focus-visible {
  outline: 2px solid #2f6d64;
  outline-offset: 1px;
}

.account-field small { font-weight: 500; color: #5d6b68 !important; -webkit-text-fill-color: #5d6b68 !important; }

.account-link {
  justify-self: start;
  padding: 4px 0;
  border: 0;
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.account-notice {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}

body.account-page .account-notice--info { background: #e8f3ef !important; }
body.account-page .account-notice--warn { background: #fdf3dc !important; }
body.account-page .account-notice--error { background: #fbe3e1 !important; }
.account-notice .account-link { margin-left: 6px; }
.account-note { margin: 14px 0 0; }

.account:has(.account-shell) { width: min(1120px, 100%); }

.account-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.account-sidebar {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 20px;
}

body.account-page .account-sidebar { background: #ffffff !important; }

.account-kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
body.account-page .account-kicker { color: #2f6d64 !important; -webkit-text-fill-color: #2f6d64 !important; }
.account-sidebar-head h1 { margin: 4px 0 6px; font-size: 26px; }
/* One line; the full address is in the tooltip and on Profil. */
.account-sidebar-head .account-email { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }

.account-menu { display: grid; gap: 2px; }

.account-menu-button,
.account-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

body.account-page .account-menu-button:hover,
body.account-page .account-menu-button:focus-visible {
  background: #f2f6f4 !important;
}

/* Icon strokes use currentColor: let them follow their <svg>, not the
   global black text rule. */
body.account-page .account svg * { color: inherit !important; -webkit-text-fill-color: inherit !important; }

/* Plain list items: undo the global boxed-button look. */
body.account-page .account-menu-button,
body.account-page .account-logout { border-color: transparent !important; background: transparent !important; }
.account-menu-button svg,
.account-logout svg { flex: none; opacity: 0.7; }

/* Active item: soft tint plus an accent bar, not a heavy filled button. */
body.account-page .account-menu-button.is-active {
  background: #e8f3ef !important;
  box-shadow: inset 3px 0 0 #2f6d64 !important;
  color: #0b1f2e !important;
  -webkit-text-fill-color: #0b1f2e !important;
}
body.account-page .account-menu-button.is-active svg { opacity: 1; color: #2f6d64 !important; }

.account-logout {
  width: 100%;
  margin-top: -6px;
  padding-top: 14px;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0;
  font-size: 14px;
}
body.account-page .account-logout { border-top-color: rgba(0, 0, 0, 0.1) !important; color: #5d6b68 !important; -webkit-text-fill-color: #5d6b68 !important; }
body.account-page .account-logout:hover { color: #a8322b !important; -webkit-text-fill-color: #a8322b !important; }
.account-logout:focus-visible,
.account-menu-button:focus-visible,
.account-stat:focus-visible { outline: 2px solid #2f6d64; outline-offset: 2px; }

.account-workspace { min-width: 0; display: grid; gap: 0; }
.account-panel[hidden] { display: none; }
/* Each panel wraps exactly one .account-section, shown on its own —
   the divider the shared rule below draws between *stacked* sections
   would otherwise leave a stray top rule with nothing above it. */
.account-panel > .account-section { padding-top: 0; border-top: 0; }

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

  /* min-width: 0 overrides the grid item's default min-width: auto — without
     it, the menu row's intrinsic (max-content) width refuses to shrink and
     pushes this whole sidebar, and the page along with it, wider than the
     viewport instead of scrolling internally. */
  .account-sidebar { position: static; min-width: 0; }

  .account-menu {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  body.account-page .account-menu-button { flex: 0 0 auto; border-color: rgba(0, 0, 0, 0.12) !important; border-radius: 999px; }
  body.account-page .account-menu-button.is-active { box-shadow: none !important; border-color: #2f6d64 !important; }
  .account-logout { width: auto; margin-top: 0; padding: 0; border-top: 0; min-height: 36px; }
}

/* At-a-glance cards above the orders. */
.account-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
/* Phones keep the three side by side so the orders stay close to the top. */
@media (max-width: 640px) {
  .account-stats { gap: 8px; margin-bottom: 16px; }
  .account-stat { padding: 12px; border-radius: 14px; }
  .account-stat__label { font-size: 12px; gap: 5px; }
  .account-stat__label svg { width: 14px; height: 14px; }
  .account-stat strong { font-size: 17px; }
  .account-stat small { font-size: 11.5px; }
}
.account-stat {
  display: grid; align-content: start; gap: 4px; min-width: 0;
  padding: 16px 18px; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 16px;
  font: inherit; text-align: left;
}
button.account-stat { cursor: pointer; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
body.account-page button.account-stat:hover { border-color: #2f6d64 !important; transform: translateY(-2px); }
body.account-page .account-stat { background: #ffffff !important; }
.account-stat__label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
body.account-page .account-stat__label,
body.account-page .account-stat small { color: #5d6b68 !important; -webkit-text-fill-color: #5d6b68 !important; }
.account-stat strong { font-size: 22px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.account-stat small { font-size: 13px; line-height: 1.4; }
body.account-page .account-stat[data-tier="member"] { box-shadow: inset 0 3px 0 #2f6d64 !important; }
body.account-page .account-stat[data-tier="nordic"] { box-shadow: inset 0 3px 0 #b87a4b !important; }
body.account-page .account-stat[data-tier="aurora"] { box-shadow: inset 0 3px 0 #b9c1c9 !important; }
body.account-page .account-stat[data-tier="polar"] { box-shadow: inset 0 3px 0 #c9982c !important; }
body.account-page .account-stat[data-tier="platinum"] { box-shadow: inset 0 3px 0 #aeb7bf !important; }

.account-section {
  padding: 26px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.account-orders { display: grid; gap: 10px; }

.account-order {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 16px;
}

.account-order summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

.account-order summary::-webkit-details-marker { display: none; }

.account-order__main { display: grid; gap: 2px; min-width: 0; }
.account-order__main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #5d6b68 !important; -webkit-text-fill-color: #5d6b68 !important; }

.account-order__status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Status colour: grey = created, amber = waiting for payment, blue = being
   packed, green = on its way or delivered, red = cancelled. */
body.account-page .account-order__status { background: #eef1f0 !important; }
body.account-page .account-order__status:is([data-status="paid"], [data-status="processing"]) { background: #e3edf8 !important; color: #1d4f86 !important; -webkit-text-fill-color: #1d4f86 !important; }
body.account-page .account-order__status:is([data-status="shipped"], [data-status="completed"], [data-status="received"]) { background: #dcefe8 !important; color: #1f5a50 !important; -webkit-text-fill-color: #1f5a50 !important; }
body.account-page .account-order__status[data-status="awaiting_payment"] { background: #fdf3dc !important; color: #8a5a00 !important; -webkit-text-fill-color: #8a5a00 !important; }
body.account-page .account-order__status[data-status="cancelled"] { background: #fbe3e1 !important; color: #a8322b !important; -webkit-text-fill-color: #a8322b !important; }

/* Chevron shows the order can be opened. */
.account-order summary { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.account-order summary::after {
  content: ""; width: 7px; height: 7px; margin: 0 4px 4px 0;
  border: solid #5d6b68; border-width: 0 2px 2px 0; transform: rotate(45deg);
  transition: transform 0.2s;
}
.account-order[open] summary::after { margin: 4px 4px 0 0; transform: rotate(-135deg); }

/* Bestilt, Betalt, Sendt, Levert inside an opened order. */
.account-progress {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 2px 0 14px; padding: 0 18px; list-style: none; font-size: 12px; text-align: center;
}
.account-progress li { position: relative; display: grid; justify-items: center; gap: 6px; }
.account-progress li + li::before {
  content: ""; position: absolute; top: 6px; right: 50%; width: 100%; height: 2px;
}
body.account-page .account-progress li + li::before { background: #dfe5e4 !important; }
body.account-page .account-progress li:is(.is-done, .is-current) + li:is(.is-done, .is-current)::before { background: #2f6d64 !important; }
.account-progress__dot { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; box-sizing: border-box; border: 2px solid #cfd8d6; }
body.account-page .account-progress__dot { background: #ffffff !important; }
body.account-page .account-progress li.is-done .account-progress__dot { background: #2f6d64 !important; border-color: #2f6d64; }
body.account-page .account-progress li.is-current .account-progress__dot { border-color: #2f6d64; box-shadow: 0 0 0 4px rgba(47, 109, 100, 0.18); }
body.account-page .account-progress li:not(.is-done, .is-current) span:last-child { color: #687472 !important; -webkit-text-fill-color: #687472 !important; }
.account-progress li.is-current span:last-child { font-weight: 700; }

.account-order__items {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0 18px 12px;
  list-style: none;
  font-size: 14px;
}

.account-order__items li { display: flex; justify-content: space-between; gap: 12px; }
.account-order__meta { margin: 0; padding: 0 18px 12px; font-size: 14px; }

.account-order__actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 16px; }
.account-section > .account-order__actions { padding: 0; }
.account-order [data-order-status] { padding: 0 18px; }
.account-order [data-order-status] .button { margin-bottom: 16px; }

/* Alle / Ubetalte / Betalte above the order list. */
.account-order-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 22px;
}
.account-order-filter button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
body.account-page .account-order-filter button[aria-pressed="true"] {
  background: #0b1f2e !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* An unpaid order: its reservation countdown, pay and cancel. */
.account-order__reservation { margin: 0 18px 12px; padding: 10px 12px; border-radius: 12px; font-weight: 700; }
body.account-page .account-order__reservation { background: #fdf3dc !important; }
.account-order .account-unfinished__confirm { margin: 0 18px 16px; }

/* Unpaid order notice: pay or cancel, with an inline confirmation step. */
.account-unfinished p { margin: 4px 0 0; }
.account-unfinished .account-order__actions { padding: 0; margin-top: 12px; }
.account-unfinished__confirm { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(33, 25, 21, 0.14); }
.account-unfinished__confirm[hidden] { display: none; }
.account-unfinished [data-cancel-status] .account-notice { margin: 12px 0 0; }

@media (max-width: 480px) {
  .account-order summary { grid-template-columns: minmax(0, 1fr) auto auto; }
  .account-order__status { grid-column: 1; justify-self: start; }
}

/* Printing a receipt shows only the receipt. */
.account-receipt table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.account-receipt td,
.account-receipt th { padding: 6px 0; border-bottom: 1px solid #ccc; text-align: left; }
.account-receipt td:last-child { text-align: right; }

@media print {
  body.is-printing-receipt > *:not(main),
  body.is-printing-receipt main > *:not(.account),
  body.is-printing-receipt .account > *:not(.account-receipt) { display: none !important; }
  body.is-printing-receipt .account-receipt { display: block !important; }
}

body.account-page .account .button-primary {
  border-color: #0b1f2e !important;
  background: #0b1f2e !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
body.account-page .account .button-primary:hover { background: #17404c !important; }
body.account-page .account .button-danger {
  border-color: #a8322b !important;
  color: #a8322b !important;
  -webkit-text-fill-color: #a8322b !important;
}

/* Tiers: Nordic bronze, Aurora silver, Polar gold, Platinum shimmering silver. */
.account-tier { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.account-tier h2 { margin: 0; }
.account-tier p { margin: 4px 0 0; }
.account-tier__badge {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 96px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 13px;
}
body.account-page .account-tier[data-tier="none"] .account-tier__badge { background: #eef1f0 !important; }
body.account-page .account-tier[data-tier="member"] .account-tier__badge {
  background: linear-gradient(135deg, #e3f1ec, #bfded4 55%, #d8ece5) !important;
  color: #1f5a50 !important; -webkit-text-fill-color: #1f5a50 !important;
}
body.account-page .account-tier[data-tier="nordic"] .account-tier__badge {
  background: linear-gradient(135deg, #e7b98e, #a8683c 55%, #d49a6a) !important;
  color: #2b1608 !important; -webkit-text-fill-color: #2b1608 !important;
}
body.account-page .account-tier[data-tier="aurora"] .account-tier__badge {
  background: linear-gradient(135deg, #f4f6f8, #b9c1c9 55%, #e3e8ec) !important;
}
body.account-page .account-tier[data-tier="polar"] .account-tier__badge {
  background: linear-gradient(135deg, #fbe7a6, #c9982c 55%, #f1d27a) !important;
  color: #2e2000 !important; -webkit-text-fill-color: #2e2000 !important;
}
body.account-page .account-tier[data-tier="platinum"] .account-tier__badge {
  background: linear-gradient(110deg, #d9dee3 0%, #f9fbfc 25%, #aeb7bf 45%, #ffffff 55%, #c3cad1 75%, #eef1f4 100%) !important;
  background-size: 250% 100% !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 6px 18px rgba(120, 135, 150, 0.35);
  animation: tier-shimmer 3.2s linear infinite;
}
@keyframes tier-shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) {
  body.account-page .account-tier[data-tier="platinum"] .account-tier__badge { animation: none; }
}

/* Tier track: one equal-width segment per tier, with the milestone dot at
   the right end of each segment and its label right-aligned beneath it. */
/* The right padding lets the last dot hang centred on the track end. */
.account-tier-track { margin: 10px 0 14px; padding-right: 11px; }
.account-tier-track__bar { height: 10px; margin-top: 6px; border-radius: 999px; overflow: hidden; }
body.account-page .account-tier-track__bar { background: #e6ebea !important; }
body.account-page .account-tier-track__bar span {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #2f6d64, #0b1f2e) !important;
}
.account-tier-track__steps {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: -16px 0 0; padding: 0; list-style: none;
}
.account-tier-track__step {
  display: flex; flex-direction: column; align-items: flex-end; min-width: 0;
  text-align: right; font-size: 12px; line-height: 1.35;
}
.account-tier-track__step strong { margin-top: 6px; font-size: 13px; }
.account-tier-track__step span { overflow-wrap: anywhere; }
body.account-page .account-tier-track__step span:not(.account-tier-track__dot) { color: #5d6b68 !important; -webkit-text-fill-color: #5d6b68 !important; }
.account-tier-track__dot {
  width: 22px; height: 22px; margin-right: -11px; border-radius: 50%; box-sizing: border-box;
  border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(11, 31, 46, 0.14);
}
body.account-page .account-tier-track__dot { background: #d7dedd !important; }
body.account-page .account-tier-track__step.is-reached .account-tier-track__dot,
body.account-page .account-tier-track__step.is-current .account-tier-track__dot { background: #2f6d64 !important; }
body.account-page .account-tier-track__step.is-current .account-tier-track__dot {
  box-shadow: 0 0 0 1px rgba(11, 31, 46, 0.14), 0 0 0 5px rgba(47, 109, 100, 0.22);
}
body.account-page .account-tier-track__step[data-tier="nordic"].is-current .account-tier-track__dot { background: linear-gradient(135deg, #e7b98e, #a8683c 55%, #d49a6a) !important; }
body.account-page .account-tier-track__step[data-tier="aurora"].is-current .account-tier-track__dot { background: linear-gradient(135deg, #f4f6f8, #b9c1c9 55%, #e3e8ec) !important; }
body.account-page .account-tier-track__step[data-tier="polar"].is-current .account-tier-track__dot { background: linear-gradient(135deg, #fbe7a6, #c9982c 55%, #f1d27a) !important; }
body.account-page .account-tier-track__step[data-tier="platinum"].is-current .account-tier-track__dot { background: linear-gradient(135deg, #f9fbfc, #aeb7bf 55%, #eef1f4) !important; }

.account-small { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.account-muted { color: #5d6b68 !important; -webkit-text-fill-color: #5d6b68 !important; }

.account-reward-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
@media (max-width: 560px) { .account-reward-grid { grid-template-columns: 1fr; } }
.account-reward-card { display: grid; align-content: start; gap: 6px; padding: 16px 18px; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 16px; }
.account-reward-card .button { justify-self: start; }
.account-reward-value { font-size: 28px; letter-spacing: -0.02em; }
.account-code { letter-spacing: 0.08em; }
.account-credit-history summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.account-credit-history ul { display: grid; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; }
.account-credit-history li { display: flex; justify-content: space-between; gap: 10px; }

.account-reward-card .eyebrow { justify-self: start; }

.account-subtitle { margin: 18px 0 8px; font-size: 16px; }
.account-saved { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.account-saved li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 12px; }
.account-saved li > a { flex: 1; min-width: 0; font-weight: 600; }
body.account-page .account-saved li > svg { color: #c2413a !important; }
body.account-page .account-saved--alerts li > svg { color: #b45309 !important; }
.account-review { padding: 14px 0 16px; }
.account-stars { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; border: 0; }
.account-stars legend { margin-bottom: 6px; font-size: 14px; font-weight: 600; }
body.account-page .account-stars label { color: #b8860b !important; -webkit-text-fill-color: #b8860b !important; cursor: pointer; }
.account-stars input { accent-color: #0b1f2e; color-scheme: light; }
.account-review textarea { width: 100%; padding: 12px 16px; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 14px; font: inherit; resize: vertical; }
body.account-page .account-review textarea { background: #ffffff !important; }
.account-order__items .account-link { margin-left: 6px; font-size: 13px; }

/* Nivå comes alive each time its panel opens (showing a hidden panel
   restarts CSS animations): the badge pops in with a passing sheen, the bar
   fills, reached dots light up one by one and the current dot pulses. */
@media (prefers-reduced-motion: no-preference) {
  .account-tier__badge { position: relative; overflow: hidden; animation: tier-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .account-tier__badge::after {
    content: ""; position: absolute; inset: 0; transform: translateX(-120%);
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.75) 50%, transparent 70%) !important;
    animation: tier-sheen 1.1s 0.35s ease-out both;
  }
  body.account-page .account-tier[data-tier="platinum"] .account-tier__badge { animation: tier-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1) both, tier-shimmer 3.2s 0.5s linear infinite; }
  body.account-page .account-tier-track__bar span { animation: tier-fill 1.1s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .account-tier-track__dot { position: relative; }
  .account-tier-track__step:is(.is-reached, .is-current) .account-tier-track__dot { animation: tier-dot 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
  .account-tier-track__step:nth-child(1) .account-tier-track__dot { animation-delay: 0.3s; }
  .account-tier-track__step:nth-child(2) .account-tier-track__dot { animation-delay: 0.5s; }
  .account-tier-track__step:nth-child(3) .account-tier-track__dot { animation-delay: 0.7s; }
  .account-tier-track__step:nth-child(4) .account-tier-track__dot { animation-delay: 0.9s; }
  .account-tier-track__step.is-current .account-tier-track__dot::after {
    content: ""; position: absolute; inset: -3px; border-radius: 50%;
    border: 2px solid rgba(47, 109, 100, 0.5); animation: tier-pulse 2s 1.3s ease-out infinite both;
  }
  .account-stat { animation: stat-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .account-stat:nth-child(2) { animation-delay: 0.06s; }
  .account-stat:nth-child(3) { animation-delay: 0.12s; }
}
@keyframes tier-pop { from { opacity: 0; transform: scale(0.8); } }
@keyframes tier-sheen { to { transform: translateX(120%); } }
@keyframes tier-fill { from { width: 0; } }
@keyframes tier-dot { from { transform: scale(0); } }
@keyframes tier-pulse { from { transform: scale(1); opacity: 1; } to { transform: scale(2); opacity: 0; } }
@keyframes stat-in { from { opacity: 0; transform: translateY(8px); } }

/* Five levels on a narrow phone: short amounts ("4k", "1. kjøp") so the
   labels under the track don't run into each other. */
.account-tier-track__short { display: none; }
@media (max-width: 480px) {
  .account-tier-track__step { font-size: 11px; }
  .account-tier-track__step strong { font-size: 11.5px; }
  .account-tier-track__long { display: none; }
  .account-tier-track__short { display: inline; }
}

/* Signed-out loyalty programme: the levels as a row of cards joined by a
   line that fills left to right, each card rising in turn with a sheen
   across its badge. */
.account:has(.loyalty) { width: min(1040px, 100%); }
.loyalty { margin-top: clamp(40px, 7vw, 72px); }
.loyalty h2 { margin: 6px 0 10px; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.1; letter-spacing: -0.02em; }
.loyalty__kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
body.account-page .loyalty__kicker { color: #2f6d64 !important; -webkit-text-fill-color: #2f6d64 !important; }
.loyalty__lead { max-width: 62ch; margin: 0 0 26px; line-height: 1.55; }
body.account-page .loyalty__lead,
body.account-page .loyalty__level span,
body.account-page .loyalty__level small,
body.account-page .loyalty__benefits dd,
body.account-page .loyalty__note { color: #5d6b68 !important; -webkit-text-fill-color: #5d6b68 !important; }

.loyalty__levels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 18px 0 0;
  list-style: none;
}
/* The line the levels sit on. */
.loyalty__levels::before,
.loyalty__levels::after {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 3px;
  border-radius: 999px;
}
body.account-page .loyalty__levels::before { background: #e3e9e7 !important; }
body.account-page .loyalty__levels::after {
  background: linear-gradient(90deg, #2f6d64, #b87a4b 30%, #b9c1c9 50%, #c9982c 72%, #0b1f2e) !important;
  transform-origin: left center;
}
.loyalty__level {
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
}
body.account-page .loyalty__level { background: #ffffff !important; }
/* Each card hangs from the line by a small dot. */
.loyalty__level::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(11, 31, 46, 0.14);
}
body.account-page .loyalty__level::before { background: var(--level, #2f6d64) !important; }
.loyalty__level[data-tier="member"] { --level: #2f6d64; }
.loyalty__level[data-tier="nordic"] { --level: #b87a4b; }
.loyalty__level[data-tier="aurora"] { --level: #9aa4ad; }
.loyalty__level[data-tier="polar"] { --level: #c9982c; }
.loyalty__level[data-tier="platinum"] { --level: #0b1f2e; }
.loyalty__badge {
  position: relative;
  justify-self: start;
  overflow: hidden;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
body.account-page .loyalty__level[data-tier="member"] .loyalty__badge { background: linear-gradient(135deg, #e3f1ec, #bfded4 55%, #d8ece5) !important; color: #1f5a50 !important; -webkit-text-fill-color: #1f5a50 !important; }
body.account-page .loyalty__level[data-tier="nordic"] .loyalty__badge { background: linear-gradient(135deg, #e7b98e, #a8683c 55%, #d49a6a) !important; color: #2b1608 !important; -webkit-text-fill-color: #2b1608 !important; }
body.account-page .loyalty__level[data-tier="aurora"] .loyalty__badge { background: linear-gradient(135deg, #f4f6f8, #b9c1c9 55%, #e3e8ec) !important; }
body.account-page .loyalty__level[data-tier="polar"] .loyalty__badge { background: linear-gradient(135deg, #fbe7a6, #c9982c 55%, #f1d27a) !important; color: #2e2000 !important; -webkit-text-fill-color: #2e2000 !important; }
body.account-page .loyalty__level[data-tier="platinum"] .loyalty__badge { background: linear-gradient(110deg, #d9dee3 0%, #f9fbfc 25%, #aeb7bf 45%, #ffffff 55%, #c3cad1 75%, #eef1f4 100%) !important; background-size: 250% 100% !important; }
.loyalty__level strong { margin-top: 10px; font-size: 20px; letter-spacing: -0.01em; }
.loyalty__level span { font-size: 13.5px; }
.loyalty__level small { font-size: 12.5px; line-height: 1.4; }

.loyalty__benefits {
  margin-top: clamp(32px, 5vw, 48px);
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 20px;
}
body.account-page .loyalty__benefits { background: #f4f8f6 !important; }
.loyalty__benefits dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; margin: 14px 0 0; }
.loyalty__benefits dt { font-weight: 700; }
.loyalty__benefits dd { margin: 4px 0 0; font-size: 14px; line-height: 1.5; }
.loyalty__note { margin: 18px 0 0; font-size: 13px; }

@media (max-width: 760px) {
  .loyalty__levels { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 0; }
  .loyalty__levels > :first-child { grid-column: 1 / -1; }
  .loyalty__levels::before, .loyalty__levels::after, .loyalty__level::before { display: none; }
  .loyalty__benefits dl { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  body.account-page .loyalty__levels::after { animation: loyalty-fill 1.6s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .loyalty__level { animation: loyalty-rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(0.15s + var(--i) * 0.12s); }
  .loyalty__level::before { animation: loyalty-dot 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both; animation-delay: calc(0.35s + var(--i) * 0.28s); }
  .loyalty__badge::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-120%);
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.8) 50%, transparent 70%) !important;
    animation: loyalty-sheen 1.1s ease-out both;
    animation-delay: calc(0.6s + var(--i) * 0.28s);
  }
  body.account-page .loyalty__level[data-tier="platinum"] .loyalty__badge { animation: tier-shimmer 3.2s 2s linear infinite; }
  .loyalty__level:hover { transform: translateY(-3px); transition: transform 0.2s ease; }
}
@keyframes loyalty-fill { from { transform: scaleX(0); } }
@keyframes loyalty-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes loyalty-dot { from { transform: scale(0); } }
@keyframes loyalty-sheen { to { transform: translateX(120%); } }

/* "Passordet er endret" confirmation. */
.account-done { display: grid; justify-items: start; gap: 10px; }
.account-done h2, .account-done p { margin: 0; }
/* A sign-in on an unconfirmed account: the way forward has to stand out. */
.account-unverified { padding: 18px 20px; border-radius: 16px; }
body.account-page .account-unverified { background: #fdf3dc !important; }
body.account-page .account-unverified .account-link { background: transparent !important; }
.account-done .button { margin-top: 8px; min-width: 200px; }
.account-done__icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; font-size: 22px; font-weight: 800;
}
body.account-page .account-done__icon { background: #e3f1ec !important; color: #1f5a50 !important; -webkit-text-fill-color: #1f5a50 !important; }
