:root {
  --ink: #102f2e;
  --ink-soft: #536c68;
  --forest: #104743;
  --forest-deep: #082f2d;
  --teal: #1d7771;
  --teal-soft: #dcefeb;
  --mint: #dcefeb;
  --cream: #f5f7f3;
  --paper: #ffffff;
  --white: #ffffff;
  --sun: #e99a1b;
  --sun-dark: #c97908;
  --coral: #1d7771;
  --green: #238765;
  --red: #bd493e;
  --line: rgba(16, 47, 46, .15);
  --line-light: rgba(255, 255, 255, .16);
  --shadow: 0 24px 70px rgba(10, 42, 43, .13);
  --shadow-small: 0 12px 35px rgba(10, 42, 43, .09);
  --radius: 24px;
  --shell: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  min-width: 320px;
  overflow-x: hidden;
}
::selection { background: var(--teal-soft); color: var(--ink); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

.shell { width: min(calc(100% - 44px), var(--shell)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; background: var(--sun); padding: 10px 16px; font-weight: 800; }
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky; top: 0; z-index: 50; height: 78px;
  background: rgba(245, 247, 243, .92); border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px); transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 28px rgba(16, 42, 43, .06); }
.nav-shell { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.site-brand img { width: 42px; height: 42px; border-radius: 13px; box-shadow: 0 7px 18px rgba(16, 42, 43, .17); }
.site-brand span { display: grid; line-height: 1.05; }
.site-brand strong { font-family: 'Outfit', sans-serif; font-size: 21px; letter-spacing: -.02em; }
.site-brand small { color: var(--ink-soft); font-size: 10px; font-weight: 700; letter-spacing: .08em; margin-top: 4px; text-transform: uppercase; }
.main-nav { display: flex; align-items: center; gap: 25px; }
.main-nav > a:not(.button) { position: relative; color: var(--ink-soft); font-size: 14px; font-weight: 700; }
.main-nav > a:not(.button)::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -8px; height: 2px; background: var(--coral); transition: right .2s ease; }
.main-nav > a:not(.button):hover::after { right: 0; }
.main-nav .nav-account { padding-left: 24px; border-left: 1px solid var(--line); }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 11px; border: 1px solid var(--line); background: transparent; border-radius: 50%; cursor: pointer; }
.nav-toggle > span:not(.sr-only) { display: block; height: 2px; margin: 4px 0; border-radius: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px;
  padding: 0 24px; border: 1px solid var(--forest); border-radius: 999px; background: var(--forest); color: white;
  font-weight: 800; line-height: 1; cursor: pointer; box-shadow: 0 10px 22px rgba(8, 47, 45, .16);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); background: var(--teal); border-color: var(--teal); box-shadow: 0 14px 28px rgba(8, 47, 45, .2); }
.button-small { min-height: 42px; padding: 0 18px; font-size: 13px; }
.button-large { min-height: 58px; padding: 0 29px; font-size: 16px; }
.button-dark { background: var(--forest-deep); border-color: var(--forest-deep); color: white; box-shadow: none; }
.button-dark:hover { background: var(--forest); box-shadow: 0 14px 25px rgba(8, 45, 46, .18); }
.button-outline { background: transparent; border-color: rgba(16, 47, 46, .28); color: var(--ink); box-shadow: none; }
.button-outline:hover { background: var(--white); border-color: var(--forest); color: var(--ink); box-shadow: none; }
.button-block { width: 100%; }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.text-link { color: var(--forest); font-weight: 800; text-decoration: underline; text-decoration-color: rgba(18, 63, 64, .28); text-underline-offset: 5px; }
.text-link:hover { text-decoration-color: var(--coral); }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 26px; height: 2px; background: currentColor; }

.page-main { min-height: 65vh; padding: 66px 0 96px; }
.page-shell { width: min(calc(100% - 44px), 980px); margin-inline: auto; }
.page-heading { max-width: 720px; margin-bottom: 38px; }
.page-heading.centered { margin-inline: auto; text-align: center; }
.page-heading.centered .eyebrow { justify-content: center; }
.page-heading h1 {
  font: 800 clamp(2.15rem, 5vw, 4rem)/1.02 'Outfit', sans-serif; letter-spacing: -.045em; margin: 14px 0 14px;
}
.page-heading p { margin: 0; color: var(--ink-soft); font-size: 18px; }

.surface { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-small); }
.surface-title { font: 700 22px/1.2 'Outfit', sans-serif; margin: 0 0 6px; }
.surface-subtitle { margin: 0 0 22px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.notice { margin-bottom: 20px; padding: 14px 16px; border-left: 4px solid var(--green); background: rgba(35, 135, 101, .09); color: #155a45; }
.notice-error { border-color: var(--red); background: rgba(189, 73, 62, .08); color: #86362f; }
.notice > div + div { margin-top: 4px; }
.fine-print { color: var(--ink-soft); font-size: 13px; }

.form-field { margin-top: 18px; }
label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 13px; font-weight: 800; }
input, select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid rgba(16, 42, 43, .23);
  border-radius: 12px; background: #fff; color: var(--ink); outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 4px rgba(18, 63, 64, .1); }
input::placeholder, textarea::placeholder { color: #8b9b9b; }
.field-help { display: block; margin-top: 7px; color: var(--ink-soft); font-size: 12px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.download-shell { width: min(calc(100% - 44px), 880px); margin-inline: auto; }
.download-panel { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.download-summary { display: flex; align-items: center; gap: 18px; padding: 26px clamp(22px, 5vw, 44px); border-bottom: 1px solid var(--line); }
.download-icon { display: grid; width: 54px; height: 54px; place-items: center; flex: 0 0 auto; border-radius: 16px; background: var(--forest); color: white; font-size: 25px; font-weight: 900; }
.download-summary div { min-width: 0; }
.download-summary span, .download-summary small { display: block; color: var(--ink-soft); font-size: 12px; }
.download-summary strong { display: block; margin: 2px 0; font: 700 clamp(17px, 3vw, 21px)/1.25 'Outfit', sans-serif; overflow-wrap: anywhere; }
.windows-notice { display: grid; grid-template-columns: auto 1fr; gap: 20px; padding: clamp(26px, 5vw, 46px); background: #f6faf8; }
.windows-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(16, 71, 67, .2); border-radius: 50%; color: var(--forest); font-weight: 900; }
.windows-notice h2 { margin: 0 0 10px; font: 700 clamp(22px, 4vw, 30px)/1.15 'Outfit', sans-serif; }
.windows-notice p { margin: 0; color: var(--ink-soft); }
.windows-notice ol { display: grid; gap: 8px; margin: 22px 0; padding-left: 22px; }
.windows-notice li { padding-left: 5px; }
.windows-notice .download-caution { padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink); }
.download-actions { display: flex; gap: 12px; flex-wrap: wrap; padding: 28px clamp(22px, 5vw, 44px) 18px; }
.signature-note { margin: 0; padding: 0 clamp(22px, 5vw, 44px) 32px; color: var(--ink-soft); font-size: 12px; }

.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(300px, .84fr); gap: 28px; align-items: start; }
.checkout-form { padding: clamp(25px, 4vw, 42px); }
.checkout-summary { position: sticky; top: 104px; padding: 8px 0 0 30px; border-left: 1px solid var(--line); }
.checkout-summary h2 { font: 700 18px/1.2 'Outfit', sans-serif; margin: 0 0 16px; }
.checkout-price { display: flex; align-items: flex-end; gap: 8px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.checkout-price strong { font: 800 clamp(2.4rem, 5vw, 3.5rem)/.9 'Outfit', sans-serif; letter-spacing: -.05em; }
.checkout-price span { padding-bottom: 4px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.clean-list { list-style: none; padding: 0; margin: 22px 0; }
.clean-list li { position: relative; padding: 10px 0 10px 31px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 14px; }
.clean-list li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 900; }
.checkout-note { padding: 16px 0 0; color: var(--ink-soft); font-size: 13px; }
.payment-trust { display: flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--ink-soft); font-size: 13px; }
.payment-trust::before { content: '✓'; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--mint); color: var(--green); font-weight: 900; flex: 0 0 auto; }

.account-shell { width: min(calc(100% - 44px), 920px); margin-inline: auto; }
.account-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 42px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.account-header h1 { font: 800 clamp(2rem, 4vw, 3.25rem)/1 'Outfit', sans-serif; letter-spacing: -.04em; margin: 12px 0 8px; }
.account-section { padding: 34px 0; border-bottom: 1px solid var(--line); }
.account-section:first-of-type { padding-top: 0; }
.section-heading-row { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; margin-bottom: 18px; }
.section-heading-row h2 { font: 700 24px/1.2 'Outfit', sans-serif; margin: 0; }
.license-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.license-code { color: var(--forest); font-size: clamp(17px, 3vw, 22px); font-weight: 800; letter-spacing: .08em; overflow-wrap: anywhere; }
.status { display: inline-flex; align-items: center; gap: 7px; align-self: start; padding: 6px 11px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-ready, .status-pending { background: rgba(243, 179, 61, .17); color: #956108; }
.status-active, .status-approved { background: rgba(35, 135, 101, .12); color: var(--green); }
.status-error, .status-declined, .status-voided { background: rgba(189, 73, 62, .1); color: var(--red); }
.license-meta { grid-column: 1 / -1; color: var(--ink-soft); font-size: 13px; }
.order-item { display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.empty-state { padding: 34px 0; text-align: center; color: var(--ink-soft); }

.result-shell { width: min(calc(100% - 44px), 680px); margin-inline: auto; text-align: center; }
.result-mark { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 22px; border-radius: 50%; font-size: 34px; font-weight: 900; }
.result-mark.success { background: var(--mint); color: var(--green); }
.result-mark.error { background: rgba(189, 73, 62, .1); color: var(--red); }
.result-mark.pending { background: rgba(243, 179, 61, .18); color: #956108; }
.result-shell h1 { font: 800 clamp(2rem, 6vw, 3.5rem)/1.05 'Outfit', sans-serif; letter-spacing: -.04em; margin: 0 0 14px; }
.result-shell > p { color: var(--ink-soft); font-size: 17px; }
.license-reveal { margin: 30px 0 14px; padding: 26px; border-block: 1px solid var(--line); }
.license-reveal small { display: block; margin-bottom: 8px; color: var(--ink-soft); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.license-reveal strong { display: block; color: var(--forest); font-size: clamp(20px, 5vw, 28px); letter-spacing: .1em; }
.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

.site-footer { background: var(--forest-deep); color: white; }
.footer-main { display: grid; grid-template-columns: 1.2fr .8fr; gap: 60px; padding-block: 68px 54px; }
.footer-brand small, .footer-intro p { color: rgba(255, 255, 255, .65); }
.footer-intro p { max-width: 480px; margin: 24px 0 18px; }
.footer-intro .text-link { color: var(--sun); }
.footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.footer-links h2 { margin: 0 0 18px; color: rgba(255, 255, 255, .5); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.footer-links a { display: block; margin: 11px 0; color: rgba(255, 255, 255, .84); font-size: 14px; }
.footer-links a:hover { color: var(--sun); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-block: 22px 30px; border-top: 1px solid var(--line-light); color: rgba(255, 255, 255, .5); font-size: 12px; }

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .nav-toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .main-nav {
    position: absolute; top: 70px; left: 22px; right: 22px; display: grid; gap: 0; padding: 12px;
    background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .2s ease;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .main-nav > a:not(.button) { padding: 12px 10px; }
  .main-nav > a:not(.button)::after { display: none; }
  .main-nav .nav-account { border-left: 0; padding-left: 10px; border-top: 1px solid var(--line); }
  .main-nav .button { margin-top: 7px; }
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-summary { position: static; padding: 26px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .footer-main { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .shell, .page-shell, .account-shell, .result-shell, .download-shell { width: min(calc(100% - 30px), var(--shell)); }
  .site-header { height: 68px; }
  .site-brand img { width: 38px; height: 38px; }
  .site-brand small { display: none; }
  .main-nav { top: 62px; left: 15px; right: 15px; }
  .page-main { padding: 44px 0 70px; }
  .page-heading { margin-bottom: 28px; }
  .page-heading p { font-size: 16px; }
  .surface { padding: 22px 18px; border-radius: 18px; }
  .checkout-form { padding: 24px 18px; }
  .account-header { align-items: flex-start; flex-direction: column; margin-bottom: 30px; }
  .license-item, .order-item { grid-template-columns: 1fr; }
  .status { justify-self: start; }
  .footer-main { gap: 40px; padding-block: 50px 42px; }
  .footer-bottom { flex-direction: column; }
  .result-actions .button { width: 100%; }
  .windows-notice { grid-template-columns: 1fr; }
  .download-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
