/* Shop pages, forms and account area. Uses the same tokens and type system as landing.css. */

.page {
  max-width: 1440px;
  margin: auto;
  padding: 70px 6% 90px;
}

.page-narrow {
  max-width: 560px;
}

.page h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(50px, 6vw, 78px);
  letter-spacing: -1px;
  line-height: .98;
  margin: 18px 0 26px;
}

.page h1 em {
  letter-spacing: -1.5px;
}

.page .lede {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 560px;
}

.page h2.section-title {
  font-family: var(--font-display);
  font-size: 36px;
  margin: 0 0 18px;
  line-height: 1;
}

.muted {
  color: var(--muted);
}

/* Authentication: one calm card, clear field hierarchy and native Google artwork. */
.auth-page {
  width: min(100%, 540px);
  margin: 0 auto;
  padding: 44px 24px 56px;
}

.auth-card {
  padding: 32px 36px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 10px 36px #00000080, 0 1px 3px #00000060;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
}

.auth-tab {
  padding: 10px 8px;
  border-radius: 5px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.auth-tab[aria-current="page"] {
  color: var(--paper);
  background: var(--surface-2);
  box-shadow: 0 1px 4px #00000060;
}

.auth-heading { margin-bottom: 26px; }
.auth-eyebrow { margin: 0 0 10px; color: var(--red); font-size: 10px; font-weight: 700; letter-spacing: 1.6px; }
.auth-heading h1 { margin: 0 0 12px; font-size: clamp(32px, 6vw, 40px); line-height: 1.05; letter-spacing: -.6px; }
.auth-description { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.auth-google { display: flex; justify-content: center; }
.google-sign-in { display: block; padding: 0; border: 0; border-radius: 4px; background: transparent; }
.google-sign-in img { display: block; width: 180px; height: 40px; }
.google-sign-in:hover { box-shadow: 0 0 0 3px #ffffff1a; }
.google-sign-in:active { opacity: .85; }
.google-sign-in:focus-visible { outline: 3px solid #4285f4; outline-offset: 3px; }

.auth-divider { display: flex; align-items: center; gap: 14px; margin: 24px 0; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-divider span { white-space: nowrap; }
.auth-form.form { margin: 0; gap: 18px; }
.auth-card .field label { margin-bottom: 7px; font-size: 13px; font-weight: 600; letter-spacing: 0; }
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth-label-row .auth-link { font-size: 12px; }
.auth-card .field input[type="email"],
.auth-card .field input[type="password"],
.auth-card .field input[type="text"] {
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  line-height: 1.4;
}
.auth-card .field input::placeholder { color: var(--muted); opacity: 1; }
.auth-card .field input:hover { border-color: #4e564a; }
.auth-card .field input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 90, 31, .18); }
.auth-card .field .hint { margin: 7px 0 0; font-size: 12px; }
.auth-card .field_with_errors { width: 100%; }
.auth-card .field_with_errors input { border-color: var(--red); }
.auth-password { position: relative; }
.auth-card .auth-password input { padding-right: 66px; }
.auth-password-toggle { position: absolute; right: 5px; top: 5px; bottom: 5px; padding: 0 10px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 600; }
.auth-password-toggle[hidden] { display: none; }
.auth-password-toggle:hover { color: var(--paper); background: var(--surface-2); }
.auth-card .auth-remember { grid-template-columns: 17px 1fr; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.auth-remember input { width: 17px; height: 17px; margin: 0; }
.auth-card .auth-submit { display: block; width: 100%; margin: 4px 0 0; padding: 14px 18px; border-radius: 7px; text-align: center; font-size: 14px; font-weight: 700; line-height: 1.4; }
.auth-link { color: var(--red); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.auth-link:hover { color: #ff8a52; }
.auth-footnote { margin: 24px 0 0; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; line-height: 1.8; }
.auth-legal { display: flex; justify-content: center; gap: 12px; margin: 16px 0 0; color: var(--muted); font-size: 11px; }
.auth-legal a:hover { text-decoration: underline; }
.auth-return { margin: 22px 0 0; text-align: center; font-size: 13px; }
.auth-back { display: flex; justify-content: center; gap: 8px; margin-top: 24px; color: var(--muted); font-size: 12px; }
.auth-back:hover { color: var(--paper); }
.auth-message { font-size: 14px; line-height: 1.75; }
.auth-message p { margin: 0 0 18px; }
.auth-card .form-error-summary { border-radius: 7px; }
.auth-card .form-error-summary ul { margin: 8px 0 0; padding-left: 18px; }
.auth-card :is(a, button, input[type="submit"]):focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.auth-card .google-sign-in:focus-visible { outline-color: #4285f4; }

@media (max-width: 520px) {
  .page { padding-left: 20px; padding-right: 20px; }
  .auth-page { padding: 24px 16px 40px; }
  .auth-card { padding: 24px 22px; border-radius: 12px; }
  .auth-tabs { margin-bottom: 24px; }
}

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes auth-settle {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 404 page: centered, a little playful, same rise-in as the auth pages. */
.error-page {
  text-align: center;
  padding-top: 90px;
  padding-bottom: 100px;
}

.error-logo {
  width: 110px;
  height: auto;
  display: block;
  margin: 0 auto 36px;
  animation: auth-settle .55s cubic-bezier(.16, .8, .3, 1) both;
}

.error-page .eyebrow,
.error-page h1,
.error-page .lede,
.error-page .button {
  animation: auth-rise .6s cubic-bezier(.16, .8, .3, 1) both;
}

.error-page .eyebrow { animation-delay: .1s; }
.error-page h1 { animation-delay: .16s; }
.error-page .lede { animation-delay: .24s; margin-left: auto; margin-right: auto; }
.error-page .button { animation-delay: .34s; }

/* Flash messages */
@keyframes flash-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.flash {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 16px 20px;
  margin: 0 6% 0;
  max-width: 1440px;
  margin-inline: auto;
  font-size: 14px;
  line-height: 1.6;
  animation: flash-in .35s ease both;
}

.flash-alert {
  border-color: var(--red);
  color: #ffb199;
}

.flash-wrap {
  padding-top: 24px;
}

/* Buttons */
.button-ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line-strong);
  display: inline-block;
  padding: 15px 25px;
  font-size: 14px;
  font-weight: 700;
  transition: background .2s, color .2s, border-color .2s, transform .15s ease;
}

.button-ghost:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

button.button,
input[type="submit"].button {
  font: inherit;
}

/* A small press on click, everywhere a button already exists on the site. */
.button,
.button-ghost,
.button-link {
  transition: background .2s, border-color .2s, color .2s, transform .15s ease;
}

.button:active,
.button-ghost:active,
.button-link:active {
  transform: scale(.97);
}

.button[disabled],
button[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

.button-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--red);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 28px;
}

/* Forms */
.form {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.field label,
.field .label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .4px;
  margin-bottom: 8px;
}

.field input[type="email"],
.field input[type="password"],
.field input[type="text"],
.field input[type="number"],
.field input[type="url"],
.field input[type="search"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--paper);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 13px 14px;
  transition: border-color .2s, box-shadow .2s;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 90, 31, .18);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.6;
}

.field .hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}

.field .errors {
  display: block;
  font-size: 13px;
  color: var(--red);
  margin-top: 6px;
  font-weight: 700;
}

.field-error input,
.field-error select,
.field-error textarea {
  border-color: var(--red);
}

.checkbox {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper);
}

.checkbox input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--red);
}

.checkbox small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.form-error-summary {
  border: 1px solid var(--red);
  background: rgba(255, 90, 31, .1);
  color: #ffb199;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  animation: flash-in .35s ease both;
}

/* Panels and product page */
.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 28px;
}

.product-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 60px;
  align-items: start;
  margin-top: 40px;
}

.product-gallery {
  display: grid;
  gap: 20px;
}

.product-gallery img {
  width: 100%;
  height: auto;
  display: block;
  background: #070907;
  border: 1px solid var(--line);
}

.product-gallery figure {
  margin: 0;
}

.product-gallery figcaption {
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin-top: 10px;
}

.product-buy {
  position: sticky;
  top: 24px;
  background: var(--surface);
  color: var(--paper);
  padding: 34px 32px;
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--red);
  box-shadow: 0 30px 60px -20px #00000080;
}

.product-buy .eyebrow {
  color: var(--muted);
}

.product-buy h2 {
  font-family: var(--font-display);
  font-size: 50px;
  line-height: .95;
  margin: 14px 0 10px;
}

.product-buy .price {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  margin: 18px 0 6px;
  color: var(--red);
}

.product-buy .price-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.product-buy .trust-line {
  font-size: 11px;
  color: var(--muted);
  margin: 16px 0 0;
  line-height: 1.7;
}

.product-buy .trust-line a {
  color: var(--paper);
  text-decoration: underline;
}

.product-buy .trust-line a:hover {
  color: var(--red);
}

/* Sticky mobile buy bar: a compact restatement of the main CTA, so a visitor scrolled
   past the buy box on a phone is never more than a thumb's reach from checkout. */
.sticky-buy {
  display: none;
}

@media (max-width: 760px) {
  .sticky-buy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15;
    background: var(--surface);
    color: var(--paper);
    border-top: 1px solid var(--line-strong);
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px #00000080;
  }

  .sticky-buy-price {
    font-family: var(--font-display);
    font-size: 24px;
    flex-shrink: 0;
  }

  .sticky-buy form {
    flex: 1;
  }

  .sticky-buy .button {
    width: 100%;
    text-align: center;
    padding: 13px 16px;
    font-size: 13px;
  }

  /* .sticky-buy renders inside .product-buy's enclosing .page, fixed to the viewport -
     it overlays whatever is scrolled to the bottom, so the footer that follows .page
     needs clearance or it would end up hidden behind the bar at the true end of the page. */
  body:has(.sticky-buy) footer {
    padding-bottom: 90px;
  }
}

.platform-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 0;
  font-size: 14px;
}

.platform-table th,
.platform-table td {
  text-align: left;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-weight: 400;
}

.platform-table tr:last-child th,
.platform-table tr:last-child td {
  border-bottom: 1px solid var(--line);
}

.platform-table td {
  text-align: right;
}

.platform-icon {
  display: inline-block;
  vertical-align: -3px;
  margin-right: 6px;
  flex-shrink: 0;
}

.tags .platform-icon {
  margin-right: 4px;
  vertical-align: -1px;
}

.product-buy .button {
  width: 100%;
  text-align: center;
  margin-top: 26px;
}

.product-buy .button-ghost {
  width: 100%;
  text-align: center;
  color: var(--paper);
  border-color: var(--line-strong);
  margin-top: 14px;
}

.product-buy .button-ghost:hover {
  background: var(--paper);
  color: var(--ink);
}

.product-buy .status-line {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin: 20px 0 0;
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.spec-list li {
  border-top: 1px solid var(--line);
  padding: 14px 0;
  line-height: 1.7;
  font-size: 15px;
}

.spec-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.feature-list {
  padding-left: 21px;
  line-height: 1.9;
  font-size: 15px;
}

.product-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 70px;
}

.product-faq {
  margin-top: 70px;
  max-width: 720px;
}

.product-faq details {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.product-faq details:last-of-type {
  border-bottom: 1px solid var(--line);
}

.product-faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  list-style: none;
}

.product-faq summary::-webkit-details-marker {
  display: none;
}

.product-faq summary::after {
  content: "+";
  float: right;
  color: var(--red);
  font-weight: 700;
}

.product-faq details[open] summary::after {
  content: "–";
}

.product-faq details p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.tag-row li {
  border: 1px solid var(--line);
  padding: 5px 8px;
  font-size: 10px;
  letter-spacing: .6px;
  font-weight: 700;
}

/* Status badges: coming soon, pending, paid, failed */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  padding: 6px 10px;
  border: 1px solid currentColor;
  text-transform: uppercase;
}

.badge-soon { color: var(--muted); }
.badge-pending { color: #ffb63d; }
.badge-paid { color: var(--accent-2); }
.badge-failed { color: var(--red); }

.badge-sale {
  background: var(--red);
  border-color: var(--red);
  color: var(--ink);
  vertical-align: middle;
  margin-left: 8px;
}

.product-buy .price-was {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
  margin-right: 6px;
}

/* Account area */
.account-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 50px;
  margin-top: 40px;
  align-items: start;
}

.account-nav {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-strong);
}

.account-nav a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 15px;
}

.account-nav a[aria-current="page"],
.account-nav a:hover {
  color: var(--red);
}

.plugin-list {
  display: grid;
  gap: 22px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.plugin-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 24px 26px;
}

.plugin-card h3 {
  font-family: var(--font-display);
  font-size: 32px;
  margin: 0 0 6px;
  line-height: 1;
}

.plugin-card .release-meta {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

.download-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.license-block {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 4px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 22px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table th {
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}

.table-scroll {
  overflow-x: auto;
}

.beta-grant-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.beta-grant-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
}

.beta-grant-list li:not(:last-child) {
  border-bottom: 1px solid var(--line);
}

.beta-grant-list li.revoked {
  color: var(--muted);
}

.badge-revoked {
  margin-left: 6px;
  font-size: 10px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
}

/* Newsletter module: discreet, under the closing section */
.promo {
  max-width: 1440px;
  margin: auto;
  padding: 50px 6%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  border-top: 1px solid var(--line);
}

.promo h2 {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
  margin: 12px 0 0;
}

.promo form {
  display: grid;
  gap: 16px;
}

.promo .inline {
  display: flex;
  gap: 10px;
}

.promo .inline input[type="email"] {
  flex: 1;
  font: inherit;
  font-size: 15px;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--paper);
  border-radius: 0;
  min-width: 0;
}

.promo .inline .button {
  white-space: nowrap;
}

.promo .checkbox {
  font-size: 13px;
}

/* Legal pages */
.legal {
  max-width: 760px;
  line-height: 1.8;
  font-size: 16px;
}

.legal h2 {
  font-family: var(--font-display);
  font-size: 30px;
  margin: 44px 0 10px;
  line-height: 1;
}

.legal .draft-banner {
  border: 1px dashed var(--red);
  color: #ffb199;
  padding: 14px 18px;
  font-size: 14px;
  margin-bottom: 30px;
}

.inline-form {
  display: inline;
}

/* Responsive */
@media (max-width: 1000px) {
  .product-layout,
  .product-sections {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .product-buy {
    position: static;
  }

  .promo {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page {
    padding: 44px 16px 70px;
  }

  .flash-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .flash {
    margin-inline: 16px;
  }

  .account-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .account-nav {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 16px;
  }

  .plugin-card {
    grid-template-columns: 1fr;
  }

  .promo {
    padding: 40px 16px;
  }

  .promo .inline {
    flex-direction: column;
  }

  .product-buy {
    padding: 26px 22px;
  }

  .product-buy h2 {
    font-size: 42px;
  }
}

/* Share row on plugin pages */
.share {
  margin-top: 60px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.share-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--muted);
  margin: 0 0 12px;
  text-transform: uppercase;
}

.share-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.share-link {
  display: inline-block;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 10px 14px;
  cursor: pointer;
}

.share-link:hover,
.share-link:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.share-status {
  font-size: 13px;
  color: var(--muted);
  min-height: 1.4em;
  margin: 10px 0 0;
}

/* Utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Honeypot field: present for bots, invisible for people. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Mobile fit: the header carries four links, and the hero columns must not push the page wider than the screen. */
@media (max-width: 760px) {
  header {
    padding: 0 16px;
  }

  nav {
    gap: 12px;
  }

  nav a {
    font-size: 11px;
    white-space: nowrap;
  }

  .cart-toggle {
    font-size: 11px;
  }

  .hero,
  .hero > * {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

@media (max-width: 520px) {
  /* "Our approach" stays one scroll away on small phones, so the header keeps the plugins and login links. */
  .nav-optional {
    display: none;
  }
}

@media (max-width: 400px) {
  .hero h1 {
    font-size: 56px;
  }
}

/* Newsletter: the form and the confirmation share one fixed-height area, so the layout never jumps. */
.newsletter-frame {
  min-height: 176px;
  display: block;
}

.newsletter-form {
  display: grid;
  gap: 16px;
}

.newsletter-sent {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 22px 24px;
  min-height: 152px;
  box-sizing: border-box;
}

.newsletter-sent .newsletter-message {
  font-size: 16px;
  line-height: 1.6;
  margin: 8px 0 10px;
}

.newsletter-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.newsletter-error {
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

/* Newsletter pop-up */
.newsletter-dialog {
  background: var(--surface);
  color: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 36px 36px 28px;
  width: calc(100% - 32px);
  max-width: 480px;
}

.newsletter-dialog h2 {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  margin: 12px 0 14px;
}

.newsletter-dialog-body {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 22px;
}

.newsletter-dialog .newsletter-frame {
  min-height: 150px;
}

.newsletter-dismiss {
  margin: 18px 0 0;
  text-align: center;
}

@media (max-width: 760px) {
  .newsletter-dialog {
    padding: 28px 22px 22px;
  }
}

/* Newsletter form: the same look in the homepage section and in the pop-up. */
.newsletter-form input[type="email"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font: inherit;
  font-size: 16px;
  color: var(--paper);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 14px 16px;
}

.newsletter-form .inline {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.newsletter-form .inline input {
  flex: 1;
}

.newsletter-form .inline .button {
  white-space: nowrap;
  padding-left: 22px;
  padding-right: 22px;
}

.newsletter-form .checkbox {
  font-size: 13px;
}

/* Inside the pop-up the field and the button stack, so each one is easy to tap. */
.newsletter-dialog .newsletter-form .inline {
  flex-direction: column;
}

.newsletter-dialog .newsletter-form .inline .button {
  width: 100%;
  text-align: center;
  padding-top: 16px;
  padding-bottom: 16px;
}

@media (max-width: 520px) {
  .newsletter-form .inline {
    flex-direction: column;
  }

  .newsletter-form .inline .button {
    width: 100%;
    text-align: center;
  }
}

.demo {
  margin-top: 32px;
}

.demo-audio {
  display: block;
  width: 100%;
  max-width: 560px;
  margin-top: 12px;
}

.video-tutorials {
  margin-top: 32px;
}

.video-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-top: 12px;
}

.video-item {
  margin: 0;
}

.tutorial-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #070907;
  border: 1px solid var(--line);
}

.video-item figcaption {
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin-top: 10px;
}

.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 6%;
  background: var(--surface);
  border-top: 1px solid var(--line-strong);
}

/* Same specificity as the class rule above, so source order alone would leave the browser's
   default [hidden] { display: none } losing to our display: flex. Make hidden win explicitly. */
.cookie-consent[hidden] {
  display: none;
}

.cookie-consent p {
  margin: 0;
  max-width: 640px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--paper);
}

.cookie-consent-actions {
  display: flex;
  flex-shrink: 0;
  gap: 10px;
}

.cookie-consent .button-ghost {
  border-color: var(--line-strong);
  color: var(--paper);
}

.cookie-consent .button-ghost:hover {
  background: var(--paper);
  color: var(--ink);
}

@media (max-width: 760px) {
  .cookie-consent {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .cookie-consent-actions {
    justify-content: center;
  }
}

.direct-upload {
  margin-top: 10px;
}

.direct-upload-progress {
  height: 6px;
  margin-top: 10px;
  background: var(--line);
  overflow: hidden;
}

.direct-upload-bar {
  height: 100%;
  width: 0;
  background: var(--red);
  transition: width .2s linear;
}

.direct-upload-status {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.direct-upload-status.direct-upload-error {
  color: var(--red);
}

/* Hero typewriter: reserves two lines of height so a shorter phrase never collapses the
   layout, and gives the typed line a blinking caret in the brand accent. */
.hero-headline {
  font-size: clamp(42px, 4.8vw, 72px);
  min-height: 1.96em;
}

.hero-headline [data-typewriter-target] {
  display: inline-block;
  border-right: 3px solid var(--red);
  padding-right: 4px;
  animation: hero-caret-blink 1s steps(1) infinite;
}

@keyframes hero-caret-blink {
  50% {
    border-right-color: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-headline [data-typewriter-target] {
    animation: none;
    border-right: 0;
  }
}

/* Promo banner: admin-editable bar, sticky above the header so the offer stays visible
   while scrolling a long page instead of disappearing after the first scroll. */
.promo-banner {
  background: var(--red);
  color: var(--ink);
  text-align: center;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 0 #00000060;
}

.promo-banner p {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .4px;
}

.promo-banner-link {
  display: inline-block;
  margin-left: 10px;
  padding: 4px 11px;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background .2s, color .2s;
}

.promo-banner-link:hover {
  background: var(--ink);
  color: var(--red);
}

/* Cart: header badge + drawer. */
.cart-widget {
  display: flex;
  align-items: center;
}

.cart-toggle {
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
}

.cart-toggle:hover {
  color: var(--red);
}

.nav-admin {
  color: var(--red);
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--red);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  margin: 0;
  height: 100vh;
  max-height: 100vh;
  width: min(380px, 100vw);
  max-width: none;
  border: 0;
  border-left: 1px solid var(--line-strong);
  padding: 32px 28px;
  box-sizing: border-box;
  overflow-y: auto;
}

.cart-drawer::backdrop {
  background: #000000cc;
  backdrop-filter: blur(4px);
}

.cart-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.cart-line:first-child {
  border-top: 0;
}

.cart-item-name {
  flex: 1;
  font-weight: 600;
}

.cart-item-price {
  color: var(--muted);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
  margin: 6px 0 20px;
}

.cart-empty {
  padding: 20px 0;
}

.cart-error {
  background: rgba(255, 90, 31, .1);
  border: 1px solid var(--red);
  color: #ffb199;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

@media (max-width: 760px) {
  .cart-drawer {
    width: 100vw;
    padding: 26px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page .eyebrow,
  .auth-page h1,
  .auth-page .lede,
  .auth-page > p.muted,
  .auth-page .panel,
  .auth-page .eyebrow span,
  .flash,
  .form-error-summary,
  .error-page .eyebrow,
  .error-page h1,
  .error-page .lede,
  .error-page .button,
  .error-logo {
    animation: none;
  }

  .button,
  .button-ghost,
  .button-link,
  .field input,
  .field select,
  .field textarea {
    transition: none;
  }
}
