* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { min-width: 0; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.ui-icon { width: 20px; height: 20px; flex: 0 0 20px; vertical-align: middle; }
nav a { gap: 10px; }
.page-intro > .ui-icon { color: var(--blue); margin-bottom: 12px; width: 26px; height: 26px; }
.empty > .ui-icon { color: var(--blue); width: 32px; height: 32px; margin-bottom: 12px; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; border-radius: 8px; }
::selection { background: #0335fc22; }

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--top);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f8faffe6;
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(14px);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font: 800 15.5px/1 var(--display); letter-spacing: -.03em; text-decoration: none; }
.brand img { border-radius: 24%; }
.brand-copy small { display: block; margin-top: 4px; color: var(--faint); font: 500 10.5px/1.1 var(--sans); letter-spacing: .02em; }
.help { padding: 7px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--muted); box-shadow: var(--sh-hair); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.help:hover { color: var(--blue); border-color: #c3ccdd; }

.shell { min-height: calc(100dvh - var(--top)); display: grid; grid-template-columns: 190px minmax(0, 1fr); }
.shell:has(nav:empty) { grid-template-columns: minmax(0, 1fr); }
body:has(nav:empty) footer { margin-left: 0; }
.security-challenge { display: flex; justify-content: center; margin: 18px 0 10px; }
.security-status { text-align: center; margin-bottom: 18px; }
.panel.payment-confirmation { border-color: #c7d6fb; background: var(--tint); }
.payment-confirmation p { max-width: 64ch; }
.offer small { color: var(--muted); font-size: 11px; }
.purchase-card .small { overflow-wrap: anywhere; }
nav {
  position: sticky;
  top: var(--top);
  align-self: start;
  height: calc(100dvh - var(--top));
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
nav:empty { display: none; }
nav a { display: flex; align-items: center; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 13.5px; font-weight: 500; text-decoration: none; transition: background .14s, color .14s; }
nav a:hover { background: #eef2fa; color: var(--ink); }
nav a[aria-current="page"] { background: var(--tint); color: var(--blue); font-weight: 600; box-shadow: inset 0 0 0 1px #dbe5fb; }

main { min-width: 0; width: 100%; max-width: 1180px; padding: 26px clamp(16px, 2.4vw, 32px) 72px; }
main:focus { outline: none; }
.page-intro { margin-bottom: 20px; }
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--display); font-weight: 800; letter-spacing: -.025em; }
h1 { font-size: clamp(24px, 2.4vw, 30px); }
h2 { font-size: 20px; }
h3 { font-size: 15px; }
p { margin: 0 0 14px; }
.intro { max-width: 64ch; margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.eyebrow { margin-bottom: 8px; color: var(--faint); font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.muted, .small { color: var(--muted); }
.small { font-size: 12.5px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.panel {
  min-width: 0;
  margin: 0 0 14px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
}
.panel > h2 { margin-bottom: 10px; }
.app-license, .purchase-card, .support-card, .account-card, .gift-card, .incoming-gift { background: var(--card); }
.welcome { background: var(--tint); }

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--sh-hair);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  transition: transform .16s, box-shadow .2s, background .2s, border-color .15s;
}
button:hover, .button:hover { border-color: #c3ccdd; }
button:active, .button:active { transform: translateY(1px); transition-duration: .05s; }
.primary { background: var(--cta); border-color: var(--cta); color: #fff; box-shadow: 0 6px 16px -6px #0335fc80; }
.primary:hover { background: var(--blue-2); border-color: var(--blue-2); color: #fff; }
.quiet { min-height: 32px; padding: 6px 12px; font-size: 12.5px; }
.danger { color: var(--bad); border-color: #f0cfcc; }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.badge { display: inline-flex; align-items: center; width: fit-content; padding: 2px 9px; border: 1px solid #c9e9d9; border-radius: 99px; background: var(--ok-bg); color: var(--ok); font-size: 11.5px; font-weight: 600; white-space: normal; }
.badge.pending { border-color: #f0e0bf; background: var(--warn-bg); color: var(--warn); }

.empty { margin: 0 0 14px; padding: 42px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--sh-card); text-align: center; }
.empty h2 { font-size: 18px; }
.empty p { margin: 8px auto 0; max-width: 58ch; font-size: 13.5px; }

label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .01em; }
input, textarea, select { display: block; width: 100%; min-height: 43px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 14px; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--cta); box-shadow: 0 0 0 3px #0335fc1f; }
textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
select { appearance: none; padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M1 1.5 5 5.5 9 1.5' fill='none' stroke='%23595967' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 13px center; }
.field { margin-bottom: 14px; }
.form-small { max-width: 480px; }

.view-signin { max-width: 760px; margin-inline: auto; padding-top: 54px; }
.view-signin .page-intro { text-align: center; }
.view-signin .intro { margin-inline: auto; }
.signin { max-width: 420px; margin: 24px auto; padding: 34px 30px 30px; box-shadow: var(--sh-float); }
.signin::before { content: "Verified email · one-time code"; display: block; margin-bottom: 14px; color: var(--faint); font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.signin > form > button { width: 100%; margin-top: 4px; padding-block: 11px; }

.offer-desk { padding: 24px; }
.offer-desk > .muted { max-width: 68ch; }
.offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.offer { min-height: 92px; padding: 14px 15px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 8px; border-radius: 16px; font-weight: 400; text-align: left; white-space: normal; }
.offer strong { font: 800 26px/1 var(--display); letter-spacing: -.035em; }
.offer span { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.offer[aria-pressed="true"] { background: var(--tint); border-color: #9bb4f7; color: var(--blue); box-shadow: inset 0 0 0 1px #9bb4f7; }
.offer[aria-pressed="true"] span { color: var(--blue); }
.quote { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 3px 20px; margin: 18px 0; padding: 18px 20px; background: var(--tint); border: 1px solid #dbe5fb; border-radius: 16px; }
.quote > * { margin-bottom: 0; }
.quote .price { grid-row: span 3; }
.price { color: var(--ink); font: 800 30px/1 var(--display); letter-spacing: -.035em; }

.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0 0; }
.details > div { padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.details dt { color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.details dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.key { display: block; margin-top: 18px; padding: 14px 16px; background: var(--ink); border-radius: 16px; color: #fff; font: 14px/1.5 var(--mono); letter-spacing: .03em; overflow-wrap: anywhere; }

.incoming-gift { border-color: #c7d6fb; background: var(--tint); }
.gift-card .badge, .purchase-card .badge, .support-card .badge { margin-bottom: 10px; }
.gift-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.message { max-width: 70ch; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: #fafcff; white-space: pre-wrap; overflow-wrap: anywhere; }
.error { padding: 14px 16px; border: 1px solid #f4d3d0; border-radius: 14px; background: var(--bad-bg); color: var(--bad); }

footer { margin-left: 190px; padding: 24px clamp(16px, 2.4vw, 32px) 38px; display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11.5px; }
footer span:first-child { color: var(--muted); font-weight: 600; }
#notice:not(:empty) { position: fixed; z-index: 90; right: 18px; bottom: 18px; width: min(calc(100% - 36px), 440px); margin: 0; padding: 12px 16px; background: var(--ink); color: #fff; border-radius: 14px; box-shadow: var(--sh-float); font-size: 13px; overflow-wrap: anywhere; }
.skip { position: absolute; left: 12px; top: -70px; z-index: 100; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.skip:focus { top: 8px; }
[hidden] { display: none !important; }
.loading { color: var(--muted); }
button, .button, nav a { touch-action: manipulation; }
nav a { transition: background 120ms ease, color 120ms ease; }
button[aria-busy="true"] { cursor: progress; }
main:not([aria-busy="true"]) > .page-intro { animation: screen-in 120ms ease-out; }
@keyframes screen-in { from { opacity: .65; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 820px) {
  .shell { grid-template-columns: 150px minmax(0, 1fr); }
  footer { margin-left: 150px; }
  .offers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  input, textarea, select { font-size: 16px; }
  button, .button { min-height: 44px; }
  nav a { min-height: 44px; }
  .masthead { padding-inline: 12px; }
  .masthead { backdrop-filter: none; background: var(--bg); }
  .brand-copy small { display: none; }
  .help { padding-inline: 10px; font-size: 12px; }
  .shell { display: block; min-height: auto; }
  nav { position: fixed; top: auto; bottom: 0; left: 0; z-index: 50; width: 100%; height: auto; padding: 7px max(6px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; overflow: visible; border: 0; border-top: 1px solid var(--line); background: var(--bg); }
  nav a { min-width: 0; min-height: 52px; padding: 5px 1px; justify-content: center; flex-direction: column; gap: 4px; font-size: 10px; line-height: 1.3; text-align: center; }
  nav a[aria-current="page"] { box-shadow: none; }
  body:has(nav:not(:empty)) footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  body:has(nav:not(:empty)) #notice:not(:empty) { bottom: calc(82px + env(safe-area-inset-bottom)); }
  .page-intro > .ui-icon { display: none; }
  main { padding: 22px 14px 48px; }
  .page-intro { margin-bottom: 16px; }
  h1 { font-size: 26px; }
  h2 { font-size: 19px; }
  .panel { padding: 19px 17px; border-radius: 20px; }
  .signin { margin-top: 18px; padding: 26px 20px; }
  .view-signin { padding-top: 34px; }
  .offers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .offer { min-height: 88px; padding: 12px; }
  .offer strong { font-size: 24px; }
  .quote { grid-template-columns: 1fr; gap: 7px; padding: 16px; }
  .quote .price { grid-row: auto; }
  .details { grid-template-columns: 1fr; }
  .actions { align-items: stretch; }
  .actions > * { flex: 1 1 150px; }
  footer { margin-left: 0; padding: 22px 14px 32px; display: grid; }
}

@media (max-width: 350px) {
  main { padding-inline: 12px; }
  .panel { padding-inline: 15px; }
  .offers { gap: 6px; }
  .offer { padding: 10px; }
  .offer span { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
.checkout-disclosure { display:flex; align-items:flex-start; gap:12px; font-size:14px; line-height:1.5; margin:20px 0; cursor:pointer; }
.checkout-disclosure input[type="checkbox"] { flex:0 0 20px; width:20px; min-width:20px; height:20px; min-height:20px; padding:0; margin:1px 0 0; accent-color:var(--cta); }
