@import url("/styles.css?v=20260921-16");

.portal-page { background: var(--page); }

.portal-boot { display: grid; min-height: 100vh; place-items: center; }
.portal-boot[hidden] { display: none; }
.portal-boot img { width: 48px; height: 48px; animation: northstar-boot-pulse .8s ease-in-out infinite alternate; }

@keyframes northstar-boot-pulse {
  from { opacity: .45; transform: scale(.94); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .portal-boot img { animation: none; }
}

.account-header { background: rgba(238, 243, 246, .96); }
.account-header-inner,
.account-main,
.auth-main,
.portal-footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.account-header-inner { display: grid; grid-template-columns: 220px minmax(0, 1fr) 250px; align-items: center; min-height: 82px; }
.account-nav { display: flex; justify-self: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 8px 22px var(--shadow); }
.account-nav a { display: inline-flex; min-width: 88px; min-height: 39px; align-items: center; justify-content: center; padding: 7px 13px; border-radius: 6px; color: var(--muted); font-size: 13px; font-weight: 800; text-decoration: none; }
.account-nav a:hover,
.account-nav a:focus-visible { color: var(--teal-dark); outline: 2px solid rgba(0, 113, 122, .14); }
.account-nav a[aria-current="page"] { background: var(--teal-soft); color: var(--teal-dark); }

.account-actions { display: flex; align-items: center; justify-self: end; gap: 10px; }
.account-menu { position: relative; }
.account-menu > button { position: relative; display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #8fb6c4; border-radius: 50%; background: var(--surface); color: var(--teal-dark); box-shadow: 0 5px 14px var(--shadow); }
.account-menu > button svg { width: 21px; height: 21px; stroke-width: 2.2; }
.account-online { position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border: 2px solid var(--surface); border-radius: 50%; background: var(--green); }
.account-menu > button:hover,
.account-menu > button:focus-visible { border-color: var(--teal); outline: 3px solid rgba(0, 113, 122, .12); }
.account-popover { position: absolute; z-index: 15; top: 50px; right: 0; width: 250px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 16px 34px var(--shadow); }
.account-popover-heading { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 10px; }
.account-popover-heading > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); }
.account-popover-heading svg { width: 20px; height: 20px; }
.account-popover strong,
.account-popover small { display: block; overflow-wrap: anywhere; }
.account-popover small { margin-top: 2px; color: var(--muted); }
.account-popover button { display: inline-flex; width: 100%; min-height: 38px; align-items: center; justify-content: center; gap: 7px; margin-top: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-muted); color: var(--ink); font-weight: 800; }
.account-popover button svg { width: 16px; height: 16px; }

.auth-main { padding: 34px 0 70px; }
.auth-banner { position: relative; min-height: 330px; overflow: hidden; border: 1px solid #c7d6de; border-radius: 8px; background: #1d5f85 url("/assets/northstar-observatory-v3.png?v=20260921-16") center 44% / cover no-repeat; background-image: image-set(url("/assets/northstar-observatory-v3.webp?v=20260921-16") type("image/webp"), url("/assets/northstar-observatory-v3.png?v=20260921-16") type("image/png")); }
.auth-banner::after,
.member-banner::after { position: absolute; inset: 0; background: rgba(7, 27, 43, .42); content: ""; }
.auth-banner-copy { position: absolute; z-index: 1; left: 38px; bottom: 34px; max-width: 520px; color: #fff; }
.auth-banner-brand { position: absolute; z-index: 1; top: 24px; left: 32px; display: flex; align-items: center; gap: 10px; color: #fff; }
.auth-banner-brand img { display: block; width: 38px; height: 38px; }
.auth-banner-brand strong,
.auth-banner-brand small { display: block; }
.auth-banner-brand strong { font-size: 14px; }
.auth-banner-brand small { margin-top: 1px; color: #e8f4f7; font-size: 10px; }
.auth-preferences { position: absolute; z-index: 3; top: 22px; right: 24px; }
.auth-preferences .preference-control { border-color: rgba(255, 255, 255, .68); background: rgba(10, 31, 47, .58); color: #fff; box-shadow: 0 7px 20px rgba(7, 27, 43, .25); }
.auth-preferences .preference-control:hover,
.auth-preferences .preference-control:focus-visible { border-color: #fff; color: #fff; outline-color: rgba(255, 255, 255, .25); }
.auth-banner-copy p { margin: 0 0 5px; font-size: 11px; font-weight: 900; }
.auth-banner-copy h1 { font-size: 34px; text-shadow: 0 2px 12px rgba(0, 0, 0, .3); }
.auth-banner-copy span { display: block; margin-top: 8px; color: #e8f4f7; }

.auth-card { width: min(520px, calc(100% - 32px)); margin: -22px auto 0; position: relative; z-index: 2; padding: 26px 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 16px 34px var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: 11px; }
.auth-brand strong,
.auth-brand small { display: block; }
.auth-brand small { color: var(--muted); font-size: 11px; }
.auth-switch { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-top: 22px; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-muted); }
.auth-switch button { min-height: 39px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-weight: 800; }
.auth-switch button[aria-selected="true"] { background: var(--surface); color: var(--teal-dark); box-shadow: 0 1px 4px var(--shadow); }
.auth-heading { margin-top: 22px; }
.embedded-browser-warning { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 9px; margin-top: 16px; padding: 10px 12px; border: 1px solid #e3b84b; border-radius: 6px; background: #fff8df; color: #6d4d00; font-size: 12px; line-height: 1.45; }
.embedded-browser-warning[hidden] { display: none; }
.embedded-browser-warning svg { width: 18px; height: 18px; }
.embedded-browser-warning button { min-height: 32px; padding: 0 10px; border: 1px solid #c89b2f; border-radius: 5px; background: transparent; color: inherit; font-weight: 800; }
:root[data-theme="dark"] .embedded-browser-warning { border-color: #856d32; background: #302817; color: #f1d889; }
.auth-heading h2 { font-size: 22px; }
.auth-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.auth-form { margin-top: 20px; }
.auth-form > label { display: block; margin: 12px 0 6px; font-size: 13px; font-weight: 800; }
.auth-label-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 0 6px; }
.auth-label-row label { font-size: 13px; font-weight: 800; }
.auth-label-row button,
.auth-back-button { border: 0; background: transparent; color: var(--teal); font-size: 12px; font-weight: 800; }
.auth-label-row button:hover,
.auth-label-row button:focus-visible,
.auth-back-button:hover,
.auth-back-button:focus-visible { color: var(--teal-dark); outline: 2px solid rgba(0, 113, 122, .14); outline-offset: 3px; }
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #afbec8; border-radius: 6px; background: var(--field); color: var(--ink); }
.auth-form input:focus { border-color: var(--teal); outline: 3px solid rgba(0, 113, 122, .12); }
.auth-form > .password-visibility { display: inline-flex; align-items: center; gap: 8px; width: max-content; margin: 10px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.password-visibility input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.password-switch { position: relative; width: 32px; height: 18px; border: 1px solid #9cabb4; border-radius: 9px; background: #dce3e7; transition: background .16s ease, border-color .16s ease; }
.password-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16, 37, 58, .28); transition: transform .16s ease; }
.password-visibility input:checked + .password-switch { border-color: var(--teal); background: var(--teal); }
.password-visibility input:checked + .password-switch::after { transform: translateX(14px); }
.password-visibility input:focus-visible + .password-switch { outline: 3px solid rgba(0, 113, 122, .16); outline-offset: 2px; }
.auth-form > .primary-command { width: 100%; margin-top: 17px; }
.turnstile-slot { min-height: 65px; margin-top: 16px; overflow: hidden; }
.turnstile-slot.compact { min-height: 140px; }
.turnstile-slot > div { margin: 0 auto; }
.auth-back-button { display: block; width: 100%; min-height: 38px; margin-top: 8px; }
.auth-status { min-height: 18px; margin: 12px 0 0; color: var(--green); font-size: 12px; line-height: 1.55; text-align: center; }
.auth-help { margin: 12px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.invite-recognized { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #a9d6c1; background: var(--green-soft); color: #285d43; font-size: 12px; }
.invite-recognized strong,
.invite-recognized span { display: block; }

.account-main { padding: 22px 0 68px; }
.member-banner { position: relative; min-height: 220px; overflow: hidden; border: 1px solid #c7d6de; border-radius: 8px; background: #1d5f85 url("/assets/northstar-observatory-v3.png?v=20260921-16") center 43% / cover no-repeat; background-image: image-set(url("/assets/northstar-observatory-v3.webp?v=20260921-16") type("image/webp"), url("/assets/northstar-observatory-v3.png?v=20260921-16") type("image/png")); color: #fff; }
.member-banner > div { position: absolute; z-index: 1; left: 28px; bottom: 24px; max-width: 590px; }
.member-banner p { margin: 0 0 5px; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.member-banner h1 { font-size: 29px; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.member-banner span { display: block; margin-top: 5px; color: #eaf5f7; font-size: 13px; }
.member-banner-action { position: absolute; z-index: 1; right: 20px; bottom: 20px; padding: 7px 11px; border: 1px solid rgba(255,255,255,.7); border-radius: 6px; background: rgba(7, 27, 43, .46); color: #fff; font-size: 12px; font-weight: 800; }
.member-banner-action:hover,
.member-banner-action:focus-visible { background: rgba(7, 27, 43, .7); outline: 2px solid rgba(255,255,255,.38); }

.app-section { margin-top: 22px; }
.welcome-strip,
.subscription-panel,
.client-section,
.page-heading,
.support-panel,
.payment-recovery-panel { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.welcome-strip { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 22px; }
.welcome-strip h2 { font-size: 18px; }
.welcome-strip p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.service-badge { padding: 5px 10px; border: 1px solid #9fcfba; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 800; }
.service-badge.inactive { border-color: #dfc596; background: var(--amber-soft); color: var(--amber); }

.subscription-panel { margin-top: 18px; padding: 24px; }
.subscription-heading { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.subscription-heading h2 { font-size: 22px; }
.subscription-heading p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.days-display { display: flex; align-items: baseline; gap: 8px; flex: 0 0 auto; }
.days-display strong { color: var(--teal-dark); font-size: 42px; line-height: 1; }
.days-display span { color: var(--muted); font-size: 12px; }
.subscription-detail { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.subscription-detail span { color: var(--muted); font-size: 12px; }
.subscription-detail strong { font-size: 13px; }
.subscription-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.icon-command {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
  vertical-align: middle;
}

.payment-redirect {
  width: min(92vw, 560px);
  margin: 18vh auto 0;
  padding: 32px;
  text-align: center;
}

.payment-redirect h1 {
  margin: 0 0 12px;
  font-size: 28px;
}

.payment-redirect p {
  margin: 10px 0 20px;
}

.payment-checkout-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px 18px;
  background: #eef3f5;
}

.payment-checkout,
.payment-result {
  width: min(100%, 520px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #cbd9df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(16, 37, 58, .14);
}

.payment-checkout-brand {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 11px;
  padding: 15px 22px;
  border-bottom: 1px solid #dce5e9;
  background: #f8fafb;
}

.payment-checkout-brand > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 7px;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
}

.payment-checkout-brand strong,
.payment-checkout-brand small { display: block; }
.payment-checkout-brand strong { line-height: 1.25; }
.payment-checkout-brand small { color: var(--muted); font-size: 11px; }
.payment-checkout-body { padding: 28px 32px 30px; text-align: center; }
.payment-checkout-body .eyebrow,
.payment-result .eyebrow { color: var(--teal); font-size: 12px; font-weight: 900; }
.payment-checkout-body h1,
.payment-result h1 { margin-top: 4px; font-size: 25px; }
.payment-checkout-copy { margin: 7px auto 0; color: var(--muted); font-size: 13px; }
.payment-checkout-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-top: 22px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; }
.payment-checkout-summary span { min-width: 0; color: #425769; font-size: 13px; }
.payment-checkout-summary strong { flex: 0 0 auto; color: var(--ink); font-size: 24px; }
.payment-checkout-timer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 16px; margin-top: 14px; padding: 11px 13px; border: 1px solid #cfe0e5; border-radius: 6px; background: #f5f9fa; text-align: left; }
.payment-checkout-timer > span { color: #425769; font-size: 12px; font-weight: 800; }
.payment-checkout-timer > strong { grid-column: 2; grid-row: 1 / 3; min-width: 74px; color: var(--teal-dark); font-family: Consolas, "Courier New", monospace; font-size: 24px; text-align: right; }
.payment-checkout-timer > small { color: var(--muted); font-size: 10px; }
.payment-checkout-timer.expired { border-color: #efc4c4; background: var(--red-soft); }
.payment-checkout-timer.expired > strong { color: var(--red); }
.payment-checkout-qr { width: min(100%, 330px); margin: 16px auto 0; }
.payment-checkout-qr img { display: block; width: min(100%, 288px); height: auto; aspect-ratio: 1; margin: 0 auto; border: 1px solid #d8e2e7; }
.payment-checkout-qr small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.payment-launch { display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: center; margin-top: 20px; text-decoration: none; }
.payment-launch[aria-disabled="true"] { border-color: #cfd8dc; background: #edf1f3; color: #7c8b95; cursor: not-allowed; box-shadow: none; }
.payment-checkout-provider { display: inline-block; margin-top: 12px; color: var(--teal-dark); font-size: 12px; font-weight: 800; text-decoration: none; }
.payment-checkout-provider:hover,
.payment-checkout-provider:focus-visible { text-decoration: underline; outline: none; }
.payment-checkout-state { display: flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; padding: 9px 12px; border: 1px solid #d9e4e8; border-radius: 6px; background: #f7fafb; color: #496072; font-size: 12px; }
.payment-checkout-state > span { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #d08a1e; box-shadow: 0 0 0 4px rgba(208, 138, 30, .12); }
.payment-checkout-state.paid { border-color: #b9dfca; background: var(--green-soft); color: var(--green); }
.payment-checkout-state.paid > span { background: var(--green); box-shadow: 0 0 0 4px rgba(19, 122, 69, .12); }
.payment-checkout-state.failed { border-color: #efc4c4; background: var(--red-soft); color: var(--red); }
.payment-checkout-state.attempted { color: var(--teal-dark); }
.payment-checkout-retry { width: 100%; margin-top: 10px; }
.payment-cancel-button { min-height: 38px; margin-top: 10px; border: 0; background: transparent; color: var(--red); font-size: 12px; font-weight: 800; }
.payment-cancel-button:hover,
.payment-cancel-button:focus-visible { background: var(--red-soft); outline: 1px solid #efc4c4; }
.payment-cancel-button:disabled { opacity: .62; cursor: wait; }
.payment-checkout .payment-cancel-button { width: 100%; }
.payment-manual-reference { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-muted); text-align: left; }
.payment-manual-reference span { color: var(--muted); font-size: 12px; }
.payment-manual-reference strong { min-width: 0; font-family: Consolas, "Courier New", monospace; font-size: 12px; overflow-wrap: anywhere; text-align: right; }
.payment-manual-submit { width: 100%; min-height: 48px; margin-top: 12px; }
.payment-checkout.payment-manual { width: min(100%, 920px); }
.payment-manual .payment-checkout-brand { padding-inline: 30px; }
.payment-manual .payment-checkout-body { padding: 30px 38px 36px; }
.payment-manual-intro { padding-bottom: 22px; border-bottom: 1px solid var(--line); text-align: left; }
.payment-manual-intro .payment-checkout-copy { margin-inline: 0; }
.payment-manual-layout { display: grid; grid-template-areas: "code meta" "code actions"; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 16px 38px; align-items: start; margin-top: 24px; }
.payment-manual-code { grid-area: code; }
.payment-manual-meta { grid-area: meta; }
.payment-manual-actions { grid-area: actions; }
.payment-manual .payment-checkout-summary { margin-top: 0; padding-top: 4px; border-top: 0; }
.payment-manual .payment-checkout-qr { width: 100%; margin-top: 0; }
.payment-manual .payment-checkout-qr img { width: min(100%, 330px); height: auto; aspect-ratio: auto; border: 0; border-radius: 6px; }
.payment-manual .payment-checkout-qr small { margin-top: 10px; }
.payment-manual .payment-manual-reference,
.payment-manual .payment-checkout-state { margin-top: 0; }
.payment-manual .payment-checkout-state { margin-top: 12px; }
.payment-manual .payment-checkout-back { display: block; }
.payment-checkout-order { margin: 14px 0 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.payment-checkout-order strong { font-family: Consolas, "Courier New", monospace; }
.payment-checkout-back { display: inline-block; margin-top: 11px; color: var(--teal-dark); font-size: 12px; font-weight: 800; text-decoration: none; }
.payment-checkout-back:hover,
.payment-checkout-back:focus-visible { text-decoration: underline; outline: none; }
.payment-fallback form { margin-top: 20px; }
.payment-fallback .payment-launch { margin-top: 0; border: 0; }
.payment-fallback-note { margin: 13px auto 0; color: var(--muted); font-size: 11px; line-height: 1.7; }

.payment-result { padding: 38px 34px 32px; text-align: center; }
.payment-result-mark { display: grid; width: 52px; height: 52px; place-items: center; margin: 0 auto 16px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 26px; font-weight: 900; }
.payment-result > p:not(.eyebrow) { margin: 8px auto 0; color: var(--muted); font-size: 13px; }
.payment-result > .primary-command { display: flex; min-height: 46px; align-items: center; justify-content: center; margin-top: 20px; text-decoration: none; }

@media (max-width: 760px) {
  .payment-checkout.payment-manual { width: min(100%, 520px); }
  .payment-manual .payment-checkout-brand { padding-inline: 22px; }
  .payment-manual .payment-checkout-body { padding: 24px 24px 30px; }
  .payment-manual-intro { padding-bottom: 18px; text-align: center; }
  .payment-manual-intro .payment-checkout-copy { margin-inline: auto; }
  .payment-manual-layout { grid-template-areas: "meta" "code" "actions"; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 18px; }
  .payment-manual .payment-checkout-qr img { width: min(76vw, 300px); }
}

@media (max-width: 540px) {
  .payment-checkout-page { align-items: start; padding: 0; background: #fff; }
  .payment-checkout,
  .payment-result { width: 100%; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .payment-checkout-body { padding: 24px 20px 28px; }
  .payment-manual .payment-checkout-body { padding: 22px 20px 28px; }
  .payment-checkout-body h1,
  .payment-result h1 { font-size: 23px; }
  .payment-checkout-qr img { width: min(72vw, 280px); }
  .payment-result { display: flex; flex-direction: column; justify-content: center; padding: 32px 22px; }
}
.icon-command svg { display: block; width: 17px; height: 17px; flex: 0 0 auto; stroke-width: 2; }
.icon-command span { display: block; line-height: 1.35; }
.outline-link { display: inline-flex; min-height: 42px; align-items: center; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-weight: 800; text-decoration: none; }
.outline-link:hover,
.outline-link:focus-visible { border-color: var(--teal); color: var(--teal); outline: none; }
.import-help { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid var(--teal); background: var(--teal-soft); color: #315f65; font-size: 12px; }

.client-section { margin-top: 18px; padding: 22px; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-title h2 { font-size: 19px; }
.section-title a { color: var(--teal); font-size: 12px; font-weight: 800; text-decoration: none; }
.client-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.client-grid > a { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 92px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); text-decoration: none; }
.client-grid > a:hover,
.client-grid > a:focus-visible { border-color: #8db9bd; box-shadow: 0 8px 20px rgba(16, 37, 58, .08); outline: none; transform: translateY(-1px); }
.client-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 7px; background: #edf3fb; color: #1769aa; font-weight: 900; }
.client-icon img { display: block; width: 25px; height: 25px; object-fit: contain; }
.android-client { background: var(--green-soft); color: var(--green); }
.macos-client { background: #eef0f3; color: #3e4852; }
.ios-client { background: #edf3fb; color: #46515d; }
.client-grid strong,
.client-grid small { display: block; }
.client-grid small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.client-grid b { align-self: start; padding: 3px 7px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-size: 10px; }

.page-heading { padding: 24px; }
.page-heading h1 { font-size: 28px; }
.page-heading p:last-child { max-width: 720px; margin: 7px 0 0; color: var(--muted); }
.product-card { width: min(470px, 100%); margin: 28px auto 0; padding: 24px; border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 8px; background: #fff; box-shadow: 0 12px 28px rgba(16, 37, 58, .08); }
.product-card > header { display: flex; align-items: center; justify-content: space-between; }
.product-card > header span { color: var(--teal); font-size: 11px; font-weight: 900; }
.product-card > header b { padding: 4px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 10px; }
.product-card h2 { margin-top: 16px; }
.product-price { display: flex; align-items: baseline; margin-top: 20px; }
.product-price > small { font-size: 18px; font-weight: 800; }
.product-price > strong { margin-left: 3px; font-size: 46px; line-height: 1; }
.product-price > span { margin-left: 7px; color: var(--muted); }
.product-service-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 18px; margin-top: 22px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.product-service-summary span { color: var(--muted); font-size: 12px; }
.product-service-summary strong { color: var(--teal-dark); font-size: 14px; }
.product-service-summary small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.product-card ul { display: grid; gap: 8px; margin: 24px 0; padding: 18px 0 18px 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #3f5363; }
.product-card > .primary-command { width: 100%; }
.product-card > p { margin: 10px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.product-card .product-open-button { width: 100%; margin-top: 18px; }
.product-card .product-cancel-button { width: 100%; }
.product-details-button { display: flex; min-height: 38px; align-items: center; justify-content: center; gap: 7px; width: 100%; margin-top: 5px; border: 0; background: transparent; color: var(--teal-dark); font-size: 12px; font-weight: 800; }
.product-details-button svg { width: 15px; height: 15px; }
.product-details-button:hover,
.product-details-button:focus-visible { background: var(--teal-soft); outline: none; }

.plan-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 37, 58, .58);
}

.plan-dialog {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(16, 37, 58, .3);
}

.plan-dialog h2 { margin: 6px 44px 0 0; font-size: 24px; }
.plan-detail-price { display: flex; align-items: baseline; gap: 5px; margin-top: 18px; color: var(--teal-dark); }
.plan-detail-price small { font-size: 17px; font-weight: 800; }
.plan-detail-price strong { font-size: 38px; line-height: 1; }
.plan-detail-price span { color: var(--muted); font-size: 13px; }
.plan-detail-list { margin: 24px 0; border-top: 1px solid var(--line); }
.plan-detail-list div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.plan-detail-list dt { color: var(--muted); font-size: 13px; }
.plan-detail-list dd { margin: 0; font-size: 13px; font-weight: 700; }
.plan-dialog > .primary-command { width: 100%; }
.plan-dialog-note { margin: 10px 0 0; color: var(--muted); font-size: 11px; text-align: center; }

.support-panel { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-top: 20px; padding: 24px; }
.support-mark { display: grid; width: 68px; height: 68px; place-items: center; border-radius: 8px; background: #edf3fb; color: #275c9a; font-weight: 900; }
.support-panel h2 { font-size: 19px; }
.support-panel p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.support-panel strong { display: block; margin-top: 8px; font-family: Consolas, monospace; }
.payment-recovery-panel { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-top: 20px; padding: 24px; }
.payment-recovery-mark { display: grid; width: 68px; height: 68px; place-items: center; border-radius: 8px; background: var(--amber-soft); color: var(--amber); }
.payment-recovery-mark svg { width: 28px; height: 28px; }
.payment-recovery-panel h2 { margin-top: 3px; font-size: 19px; }
.payment-recovery-panel > div > p:not(.eyebrow) { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.payment-recovery-order { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 11px; font-size: 11px; }
.payment-recovery-order span { color: var(--muted); }
.payment-recovery-order strong { font-family: Consolas, "Courier New", monospace; overflow-wrap: anywhere; }
.payment-recovery-status { min-height: 18px; }

.portal-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 0 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.portal-page .payment-dialog { grid-template-rows: auto auto auto auto auto auto 1fr; }
.portal-page .payment-dialog > .payment-reference { grid-row: 5; }
.portal-page .payment-dialog > .payment-submit-button { grid-row: 6; }
.portal-page .payment-dialog > .payment-dialog-footnote { grid-row: 7; align-self: end; text-align: left; }
.portal-page .payment-order-status { color: var(--amber); }
.notice-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 24, 36, .68);
}

.notice-dialog {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border: 1px solid #b9c9d2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(7, 27, 43, .34);
}

.notice-dialog-art {
  position: relative;
  min-height: 170px;
  padding: 90px 62px 20px 22px;
  overflow: hidden;
  background: #1d5f85 url("/assets/northstar-observatory-v3.png?v=20260921-16") center 43% / cover no-repeat;
  background-image: image-set(url("/assets/northstar-observatory-v3.webp?v=20260921-16") type("image/webp"), url("/assets/northstar-observatory-v3.png?v=20260921-16") type("image/png"));
  color: #fff;
}

.notice-dialog-art::after { position: absolute; inset: 0; background: rgba(7, 27, 43, .36); content: ""; }
.notice-dialog-art > p,
.notice-dialog-art > h2 { position: relative; z-index: 1; }
.notice-dialog-art p { margin: 0 0 4px; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.notice-dialog-art h2 { font-size: 24px; text-shadow: 0 2px 12px rgba(0,0,0,.34); }
.notice-dialog-art .modal-close { position: absolute; z-index: 2; color: #fff; border-color: rgba(255,255,255,.65); background: rgba(7,27,43,.42); }
.notice-dialog-body { padding: 25px 28px 28px; }
.notice-date { color: var(--teal); font-size: 11px; font-weight: 800; }
.notice-dialog-body h3 { margin-top: 14px; font-size: 20px; }
.notice-dialog-body > p { margin: 8px 0 0; color: var(--muted); line-height: 1.75; }
.notice-contact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 14px; align-items: center; margin-top: 22px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.notice-contact span { color: var(--muted); font-size: 12px; }
.notice-contact strong { grid-column: 1; font-family: Consolas, "Courier New", monospace; font-size: 18px; }
.notice-contact button { grid-column: 2; grid-row: 1 / 3; }
.notice-done { width: 100%; margin-top: 20px; }

.import-modal {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 24, 36, .68);
}

.import-dialog {
  position: relative;
  width: min(540px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 25px 26px 27px;
  border: 1px solid #b9c9d2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(7, 27, 43, .34);
}

.import-dialog > h2 { margin-top: 3px; font-size: 25px; }
.import-dialog-copy { margin: 6px 44px 0 0; color: var(--muted); font-size: 13px; }
.import-device-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 21px; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: #edf1f3; }
.import-device-tabs button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 6px; padding: 7px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; }
.import-device-tabs svg { width: 16px; height: 16px; flex: 0 0 auto; }
.import-device-tabs button[aria-selected="true"] { background: #fff; color: var(--teal-dark); box-shadow: 0 1px 4px rgba(16, 37, 58, .12); }
.import-device-tabs button:focus-visible { outline: 2px solid rgba(0, 113, 122, .28); }
.import-device-panel { margin-top: 19px; padding-top: 18px; border-top: 1px solid var(--line); }
.import-client-heading { display: flex; align-items: center; gap: 12px; }
.import-client-heading h3 { font-size: 18px; }
.import-client-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.import-platform-icon,
.import-platform-pair { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: #edf3fb; }
.import-platform-icon img { width: 25px; height: 25px; }
.import-platform-pair { grid-template-columns: repeat(2, 1fr); width: 58px; padding: 8px; gap: 4px; }
.import-platform-pair img { width: 18px; height: 18px; }
.import-section-label { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 17px 0 9px; color: #7c8b97; font-size: 11px; }
.import-section-label::before,
.import-section-label::after { height: 1px; background: var(--line); content: ""; }
.import-action-list { display: grid; gap: 8px; }
.import-action {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 58px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
}
.import-action > svg:first-child { width: 22px; height: 22px; color: var(--teal); stroke-width: 2; }
.import-action > svg:last-child { width: 17px; height: 17px; color: #8a9ba8; }
.import-action strong,
.import-action small { display: block; }
.import-action strong { font-size: 13px; }
.import-action small { margin-top: 1px; color: var(--muted); font-size: 10px; font-weight: 500; }
.import-action:hover,
.import-action:focus-visible { border-color: #7db3b7; background: var(--teal-soft); outline: none; }
.import-action.primary { border-color: var(--teal); background: var(--teal); color: #fff; box-shadow: 0 6px 14px rgba(0, 113, 122, .16); }
.import-action.primary > svg,
.import-action.primary small { color: #fff; }
.import-action.primary small { opacity: .82; }
.import-action.primary:hover,
.import-action.primary:focus-visible { background: var(--teal-dark); }
.import-action:disabled { border-color: #d5dde1; background: #f2f4f5; color: #7d8992; cursor: not-allowed; box-shadow: none; }
.import-action-list.compact .import-action { min-height: 53px; }
.import-guide-links { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 15px; }
.import-guide-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--teal); font-size: 12px; font-weight: 800; text-decoration: none; }
.import-guide-links svg { width: 15px; height: 15px; }
.import-guide-links a:hover,
.import-guide-links a:focus-visible { text-decoration: underline; outline: none; }
.import-qr-result { display: grid; grid-template-columns: 176px minmax(0, 1fr); align-items: center; gap: 18px; margin-top: 20px; padding: 14px; border: 1px solid #a9d6c1; background: var(--green-soft); }
.import-qr-result img { display: block; width: 176px; height: 176px; background: #fff; }
.import-qr-result strong { font-size: 15px; }
.import-qr-result p { margin: 5px 0 0; color: #285d43; font-size: 12px; }
.import-status { min-height: 20px; margin: 10px 0 0; color: var(--green); font-size: 12px; }

:root[data-theme="dark"] .portal-page { background: var(--page); }
:root[data-theme="dark"] .account-header { background: rgba(15, 23, 31, .96); border-bottom: 1px solid var(--line); }
:root[data-theme="dark"] .account-nav,
:root[data-theme="dark"] .auth-card,
:root[data-theme="dark"] .welcome-strip,
:root[data-theme="dark"] .subscription-panel,
:root[data-theme="dark"] .client-section,
:root[data-theme="dark"] .page-heading,
:root[data-theme="dark"] .support-panel,
:root[data-theme="dark"] .payment-recovery-panel,
:root[data-theme="dark"] .product-card,
:root[data-theme="dark"] .plan-dialog,
:root[data-theme="dark"] .notice-dialog,
:root[data-theme="dark"] .import-dialog { background: var(--surface); }
:root[data-theme="dark"] .auth-switch,
:root[data-theme="dark"] .import-device-tabs { background: var(--surface-muted); }
:root[data-theme="dark"] .auth-switch button[aria-selected="true"],
:root[data-theme="dark"] .import-device-tabs button[aria-selected="true"] { background: #263743; }
:root[data-theme="dark"] .auth-form input[type="email"],
:root[data-theme="dark"] .auth-form input[type="password"],
:root[data-theme="dark"] .auth-form input[type="text"] { border-color: #516671; background: var(--field); color: var(--ink); }
:root[data-theme="dark"] .client-grid > a,
:root[data-theme="dark"] .outline-link,
:root[data-theme="dark"] .import-action { background: var(--surface); }
:root[data-theme="dark"] .client-icon,
:root[data-theme="dark"] .macos-client,
:root[data-theme="dark"] .ios-client,
:root[data-theme="dark"] .support-mark,
:root[data-theme="dark"] .payment-recovery-mark,
:root[data-theme="dark"] .import-platform-icon,
:root[data-theme="dark"] .import-platform-pair { background: #223440; color: #b9d9ef; }
:root[data-theme="dark"] .product-card ul { color: var(--ink); }
:root[data-theme="dark"] .import-help,
:root[data-theme="dark"] .import-qr-result p,
:root[data-theme="dark"] .invite-recognized { color: var(--ink); }
:root[data-theme="dark"] .import-action:disabled { border-color: var(--line); background: #1c2831; color: #7f909b; }
:root[data-theme="dark"] .auth-banner::after,
:root[data-theme="dark"] .member-banner::after { background: rgba(5, 15, 24, .55); }
:root[data-theme="dark"] .portal-footer { border-top-color: var(--line); }

@media (max-width: 820px) {
  .account-header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; }
  .account-nav { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .account-nav a { min-width: 0; flex: 1 1 0; }
  .account-actions { grid-column: 2; grid-row: 1; }
  .client-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .account-header-inner,
  .account-main,
  .auth-main,
  .portal-footer { width: min(100% - 24px, 1180px); }
  .account-nav { overflow-x: auto; }
  .account-nav a { padding-inline: 8px; font-size: 12px; }
  .auth-main { padding-top: 12px; }
  .auth-banner { min-height: 260px; background-position: 61% 44%; }
  .auth-banner-brand { top: 16px; left: 18px; }
  .auth-preferences { top: 14px; right: 16px; }
  .auth-banner-copy { left: 20px; right: 20px; bottom: 24px; }
  .auth-banner-copy h1 { font-size: 27px; }
  .auth-card { width: calc(100% - 16px); padding: 22px 18px; }
  .embedded-browser-warning { grid-template-columns: 20px 1fr; }
  .embedded-browser-warning button { grid-column: 2; justify-self: start; }
  .invite-recognized { align-items: flex-start; flex-direction: column; }
  .member-banner { min-height: 210px; background-position: 62% 43%; }
  .member-banner > div { left: 18px; right: 18px; bottom: 54px; }
  .member-banner h1 { font-size: 25px; }
  .member-banner-action { right: 18px; bottom: 14px; }
  .welcome-strip,
  .subscription-heading { align-items: flex-start; flex-direction: column; }
  .subscription-panel { padding: 20px 18px; }
  .days-display strong { font-size: 38px; }
  .subscription-actions { display: grid; grid-template-columns: 1fr; }
  .subscription-actions > * { justify-content: center; width: 100%; }
  .client-section { padding: 20px 18px; }
  .section-title { align-items: flex-start; }
  .client-grid > a { grid-template-columns: 46px minmax(0, 1fr) auto; }
  .client-icon { width: 44px; height: 44px; }
  .page-heading { padding: 20px 18px; }
  .product-card { padding: 22px 18px; }
  .plan-dialog { padding: 24px 18px; }
  .plan-detail-list div { grid-template-columns: 78px minmax(0, 1fr); gap: 12px; }
  .support-panel,
  .payment-recovery-panel { grid-template-columns: 58px minmax(0, 1fr); padding: 20px 18px; }
  .support-mark,
  .payment-recovery-mark { width: 56px; height: 56px; }
  .support-panel .outline-command,
  .payment-recovery-panel .outline-command { grid-column: 2; justify-self: start; }
  .notice-modal { padding: 12px; }
  .notice-dialog { max-height: calc(100vh - 24px); }
  .notice-dialog-art { min-height: 148px; padding: 74px 56px 17px 18px; background-position: 59% 43%; }
  .notice-dialog-art h2 { font-size: 21px; }
  .notice-dialog-body { padding: 21px 18px 22px; }
  .notice-contact { grid-template-columns: minmax(0, 1fr); }
  .notice-contact button { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 6px; }
  .import-modal { padding: 12px; }
  .import-dialog { max-height: calc(100vh - 24px); padding: 22px 18px; }
  .import-device-tabs button { padding-inline: 4px; font-size: 11px; }
  .import-action { min-height: 56px; padding-inline: 11px; }
  .import-qr-result { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .portal-footer { display: block; }
.portal-footer span { display: block; }
  }

@media (max-width: 420px) {
  .account-header .identity > span:last-child { display: none; }
  .account-actions { gap: 7px; }
  .account-actions .preference-controls { gap: 5px; }
  .account-actions .preference-control.language { width: 48px; }
  .auth-preferences .preference-control { width: 38px; height: 38px; }
  .auth-preferences .preference-control.language { width: 48px; }
}
