@font-face {
  font-family: "Halvar Mittel";
  src: url("/static/fonts/HalvarMittel-Rg.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Halvar Mittel";
  src: url("/static/fonts/HalvarMittel-Md.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0e0e0e;
  --surface: #1f1f1f;
  --surface-raised: #282828;
  --text: #fff;
  --muted: #a0a0a0;
  --muted-2: #898989;
  --green-a: #2b6d17;
  --green-b: #53d32d;
  --purple-a: #49258d;
  --purple-b: #7d40f3;
  --orange-a: #b66400;
  --orange-b: #ff9900;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.05em;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
}

body {
  min-width: 320px;
  color: var(--text);
  font-family: "Halvar Mittel", system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: 0.05em;
  overscroll-behavior-y: none;
}

button,
input,
textarea,
select {
  letter-spacing: 0.05em;
}

html { overflow-x: hidden; }

button,
a,
input {
  font: inherit;
}

button,
a {
  -webkit-user-select: none;
  user-select: none;
}

button {
  color: inherit;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  min-height: calc(88px + var(--safe-top));
  padding: calc(20px + var(--safe-top)) 24px 16px;
  background: linear-gradient(180deg, #0e0e0e 76%, rgb(14 14 14 / 0%));
}

.user-card {
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-b), var(--purple-a));
  font-size: 22px;
  font-weight: 500;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-name {
  margin: 0 0 4px;
  font-size: 24px;
  line-height: 1.15;
}

.user-id {
  margin: 0;
  color: var(--muted-2);
  font-size: 13px;
}

.screen {
  min-height: calc(100dvh - 88px);
  padding: 48px 24px calc(118px + var(--safe-bottom));
  animation: screen-in 180ms ease-out;
}

.screen--detail {
  padding-top: calc(36px + var(--safe-top));
}

.screen--home.has-subscription-link {
  padding-bottom: calc(212px + var(--safe-bottom));
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  * { scroll-behavior: auto !important; }
}

.page-title {
  margin: 0;
  font-size: clamp(26px, 6.67vw, 32px);
  font-weight: 500;
  line-height: 1.15;
}

.page-lead {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 3.33vw, 16px);
  line-height: 1.35;
}

/* Paragraph copy is justified; headings and compact labels keep their alignment. */
.page-lead,
.faq-item p,
.document-section p,
.list-row p,
.centered-card p,
.save-access-item p,
.setup-hero p,
.notice {
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}

.back-button {
  display: inline-flex;
  min-height: 44px;
  margin: 0 0 24px -10px;
  padding: 10px;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
}

.back-button::before {
  content: "";
  width: 10px;
  height: 10px;
  border-bottom: 2px solid currentcolor;
  border-left: 2px solid currentcolor;
  transform: rotate(45deg);
}

.back-spacer { height: 68px; }

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: calc(12px + var(--safe-bottom));
  left: 0;
  display: flex;
  width: 246px;
  height: 66px;
  margin: auto;
  padding: 3px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50px;
  background: rgb(31 31 31 / 96%);
  box-shadow: 0 18px 44px rgb(0 0 0 / 42%);
  backdrop-filter: blur(16px);
}

.nav-button {
  display: grid;
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.nav-button img {
  display: block;
  width: 60px;
  height: 60px;
}

.nav-button.is-active {
  background: linear-gradient(135deg, var(--purple-b), #5820bc);
}

.nav-button.is-active img {
  filter: brightness(0) invert(1);
}

.nav-button--home.is-active {
  background: transparent;
}

.nav-button--home.is-active img {
  filter: none;
}

.home-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.eyebrow,
.status-label,
.days-left {
  margin: 0;
  color: var(--muted-2);
  font-size: 17px;
  white-space: nowrap;
}

.plan-name {
  margin: 8px 0 14px;
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
}

.status-label.is-active {
  width: max-content;
  background: linear-gradient(90deg, var(--green-a), var(--green-b));
  background-clip: text;
  color: transparent;
}

.days-left {
  margin-top: 10px;
}

.primary-action,
.secondary-action,
.accent-action,
.purchase-action {
  min-height: 43px;
  padding: 10px 20px;
  border: 0;
  border-radius: 40px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: clamp(16px, 4.17vw, 20px);
  letter-spacing: 0.05em;
}

.primary-action:active,
.secondary-action:active,
.accent-action:active {
  transform: scale(0.98);
}

.accent-action {
  background: linear-gradient(90deg, var(--green-a), var(--green-b));
}

.accent-action--orange {
  background: linear-gradient(90deg, var(--orange-a), var(--orange-b));
}

.accent-action--purple {
  background: linear-gradient(90deg, var(--purple-a), var(--purple-b));
}

.purchase-action[disabled] {
  cursor: not-allowed;
  filter: saturate(0.25);
  opacity: 0.52;
}

.large-pill {
  display: inline-flex;
  min-height: 68px;
  margin-top: 52px;
  padding: 18px 30px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 48px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: clamp(20px, 5vw, 24px);
  text-align: center;
}

.section-stack {
  display: grid;
  gap: 20px;
  margin-top: 34px;
}

.list-row {
  display: grid;
  width: 100%;
  padding: 0;
  grid-template-columns: minmax(0, 1fr) 18px;
  gap: 16px;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.list-row h2,
.list-row h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.15;
}

.list-row p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.25;
}

.chevron {
  width: 10px;
  height: 20px;
}

.subscription-link {
  position: fixed;
  z-index: 25;
  bottom: calc(102px + var(--safe-bottom));
  left: 50%;
  display: flex;
  width: min(calc(100% - 48px), 472px);
  min-height: 72px;
  padding: 14px 20px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 70px;
  background: linear-gradient(105deg, #49258d, #7d40f3);
  color: #fff;
  cursor: pointer;
  text-align: left;
  transform: translateX(-50%);
  -webkit-tap-highlight-color: transparent;
}

.subscription-link:active { filter: brightness(1.12); }

.subscription-link-icon {
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.subscription-link-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.subscription-link-title {
  font-size: clamp(13px, 4vw, 17px);
  line-height: 1.12;
  white-space: nowrap;
}

.subscription-link-subtitle {
  font-size: clamp(10px, 3vw, 13px);
  line-height: 1.2;
  white-space: nowrap;
}

.device-grid {
  display: grid;
  gap: 12px;
  margin-top: 34px;
}

.device-card {
  display: flex;
  min-height: 78px;
  padding: 16px 20px;
  align-items: center;
  gap: 18px;
  border: 0;
  border-radius: 28px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.device-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  margin: 0;
}

.device-icon img {
  display: block;
  width: auto;
  height: auto;
  max-width: 42px;
  max-height: 42px;
  margin: 0;
  object-fit: contain;
}

.device-icon .device-support-icon {
  width: 42px;
  height: 42px;
  transform: scale(1.5);
}

.device-card strong {
  display: block;
  font-size: 20px;
  font-weight: 500;
}

.device-card > span:last-child > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.setup-hero {
  display: grid;
  min-height: 0;
  padding-top: clamp(70px, 9vh, 80px);
  align-content: start;
  justify-items: center;
  gap: 0;
  text-align: center;
}

.setup-hero img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 172px);
  max-height: 100px;
  margin-bottom: 20px;
}

.setup-hero h1 {
  margin: 0;
  font-size: clamp(26px, 6.67vw, 32px);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.setup-hero p {
  margin: 20px 0 50px;
  color: var(--muted);
  font-size: clamp(14px, 3.33vw, 16px);
}

.setup-actions {
  display: grid;
  gap: 20px;
  justify-items: center;
  max-width: 100%;
}

.setup-actions .accent-action {
  min-height: 46px;
  padding: 10px 20px;
  font-size: clamp(19px, 5vw, 24px);
  font-weight: 400;
  white-space: nowrap;
}

.setup-actions .secondary-action {
  min-height: 42px;
  padding: 10px 20px;
  font-size: clamp(15px, 4.17vw, 20px);
  font-weight: 500;
  white-space: nowrap;
}

.purchase-header {
  margin-bottom: 30px;
}

.selector-block + .selector-block {
  margin-top: 30px;
}

.selector-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.selector-heading h2 {
  margin: 0;
  font-size: 31px;
  font-weight: 500;
}

.selector-value {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 16px;
}

.segmented-slider {
  position: relative;
  width: min(100%, 410px);
  height: 30px;
  touch-action: none;
  cursor: grab;
  outline-offset: 4px;
}

.segmented-slider--plan { width: min(100%, 315px); }
.segmented-slider.is-dragging { cursor: grabbing; }

.slider-rail {
  position: absolute;
  z-index: 0;
  inset: 0;
  height: 30px;
  border-radius: 30px;
  background: var(--surface);
  overflow: hidden;
}

.slider-fill {
  width: var(--slider-fill);
  height: 100%;
  border-radius: 30px 0 0 30px;
  background: var(--purple-b);
  transition: width 220ms cubic-bezier(.2,.85,.2,1);
}

.slider-points {
  position: absolute;
  z-index: 1;
  inset: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.slider-tick {
  position: relative;
  z-index: 1;
  display: block;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #b0b0b0;
}

.slider-tick.is-selected { opacity: 0; }

.slider-thumb {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: var(--slider-progress);
  width: 30px;
  height: 30px;
  border: 5px solid var(--purple-b);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 25%);
  transform: translate(-50%, -50%);
  transition: left 220ms cubic-bezier(.2,.85,.2,1);
}

.segmented-slider.is-dragging .slider-thumb,
.segmented-slider.is-dragging .slider-fill { transition: none; }

.total-row {
  display: flex;
  margin-top: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.total-row strong {
  font-size: clamp(26px, 6.67vw, 32px);
  font-weight: 500;
  white-space: nowrap;
}

.total-row strong.is-long-price {
  font-size: clamp(18px, 5.2vw, 24px);
}

@media (max-width: 350px) {
  .total-row { gap: 8px; }
  .purchase-action { padding-inline: 14px; font-size: 16px; }
}

.comparison-scroll {
  display: grid;
  margin: 26px -24px 0 0;
  padding: 0 24px 16px 0;
  grid-auto-columns: 240px;
  grid-auto-flow: column;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline-start: 0;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.comparison-scroll::-webkit-scrollbar {
  display: none;
}

.plan-card {
  padding: 20px;
  border-radius: 25px;
  background: var(--surface);
  scroll-snap-align: start;
}

.plans-carousel-controls { display: none; }

.plans-carousel-controls button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.plans-carousel-controls button:disabled {
  cursor: default;
  opacity: .35;
}

@media (hover: hover) and (pointer: fine) {
  .plans-carousel-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
  }
}

.plan-card h2 {
  margin: 0 0 14px;
  font-size: 27px;
  font-weight: 500;
}

.plan-feature {
  margin-top: 12px;
}

.plan-feature strong,
.plan-feature span {
  display: block;
}

.plan-feature strong {
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 500;
}

.plan-feature span {
  color: var(--muted);
  font-size: 15px;
}

.history-head,
.support-head {
  margin-bottom: 30px;
}

.auto-renew-row {
  display: flex;
  margin: 34px 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.auto-renew-row h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
}

.transaction-list {
  display: grid;
  gap: 22px;
}

.transaction {
  padding-bottom: 20px;
  border-bottom: 1px solid rgb(255 255 255 / 8%);
}

.transaction-main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.transaction h3,
.transaction strong {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}

.transaction-amount--success { color: #2b6d17; }
.transaction-amount--pending { color: #ff9500; }
.transaction-amount--failure { color: #b44f64; }

.transaction p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.support-block + .support-block {
  margin-top: 30px;
}

.support-block h2 {
  margin: 0 0 16px;
  font-size: 25px;
  font-weight: 500;
}

.faq-list {
  display: grid;
  gap: 25px;
  margin-top: 34px;
}

.faq-item h2 {
  margin: 0 0 7px;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.18;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0.05em;
}

.documents {
  display: grid;
  gap: 34px;
  margin-top: 34px;
}

.document-links {
  display: grid;
  gap: 10px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 16px;
}

.save-access-list {
  display: grid;
  gap: clamp(40px, 10vw, 55px);
  margin-top: 36px;
}

.save-access-item { min-width: 0; }

.save-access-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: clamp(10px, 5vw, 24px);
  align-items: start;
}

.save-access-top h2 {
  min-width: 0;
  margin: 0;
  font-size: clamp(19px, 5vw, 24px);
  font-weight: 500;
  line-height: 1.18;
}

.save-access-top .accent-action {
  min-height: 43px;
  padding: 10px clamp(12px, 4.17vw, 20px);
  font-size: clamp(15px, 4.17vw, 20px);
  white-space: nowrap;
}

.save-access-item p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 3.33vw, 16px);
  line-height: 1.3;
}

.document-section h2 {
  margin: 0 0 10px;
  font-size: 23px;
  font-weight: 500;
}

.document-section p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.48;
  letter-spacing: 0.05em;
}

.centered-card {
  display: grid;
  min-height: 52dvh;
  align-content: center;
  gap: 20px;
}

.centered-card p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.4;
}

.notice {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.toast {
  position: fixed;
  z-index: 60;
  bottom: calc(92px + var(--safe-bottom));
  left: 50%;
  max-width: calc(100% - 40px);
  padding: 12px 18px;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 22px;
  background: #282828;
  box-shadow: 0 12px 36px rgb(0 0 0 / 45%);
  font-size: 14px;
  text-align: center;
  transform: translateX(-50%);
  animation: toast-in 160ms ease-out;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.boot-screen {
  display: grid;
  min-height: 100dvh;
  place-content: center;
  justify-items: center;
  gap: 16px;
}

.boot-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-b), var(--purple-a));
  font-size: 32px;
  font-weight: 500;
}

.boot-screen p {
  margin: 0;
  color: var(--muted);
}

@media (min-width: 700px) {
  body { background: #080808; }
  .app-shell { box-shadow: 0 0 80px rgb(0 0 0 / 55%); }
}
