/* Checkout theme. Brick tokens remain hex colors and pixel dimensions. */
:root {
  color-scheme: light;

  --bg: #f4f7f6;
  --bg-glow: transparent;
  --surface: #ffffff;         /* (brick) form background */
  --surface-2: #f4f7f6;        /* (brick) input background */
  --border: #dce5e1;           /* (brick) */
  --border-strong: #81958b;    /* (brick) */
  --text: #172522;             /* (brick) */
  --text-muted: #53665f;       /* (brick) */
  --accent: #087c70;           /* (brick) buttons, focus */
  --accent-hover: #06675d;     /* (brick) */
  --accent-contrast: #ffffff;  /* (brick) button text */
  --success: #087c70;          /* (brick) */
  --danger: #ad2537;           /* (brick) */
  --warning: #785018;

  --radius-sm: 8px;            /* (brick) */
  --radius: 10px;              /* (brick) */
  --radius-lg: 16px;           /* (brick) */
  --shadow: 0 1px 2px rgba(23, 37, 34, 0.04), 0 12px 32px rgba(23, 37, 34, 0.05);

  /* Page-only tokens (not passed to the Brick) */
  --header-bg: #ffffff;
  --brand-ink: #091421;
  --accent-active: #05584f;
  --accent-soft: #edf6f4;
  --success-ink: #06675d;
  --danger-soft: #fbeef0;
  --warning-soft: #fbf3e5;
  --accent-line: #b6d9d4;
  --success-line: #a4cfca;
  --danger-line: #e2aeb5;
  --warning-line: #e3d2b4;
  --radius-card: 20px;
  --radius-pill: 980px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* Icons (24px grid, 2.2 stroke, round caps), drawn with mask + currentColor */
  --i-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.25'/%3E%3Cpath d='M12 7.5v5.25M12 16.4h.01'/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.25'/%3E%3Cpath d='m8.25 12.25 2.5 2.5 5-5.25'/%3E%3C/svg%3E");
  --i-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.25'/%3E%3Cpath d='M12 11v5.25M12 7.6h.01'/%3E%3C/svg%3E");
  --i-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.25'/%3E%3Cpath d='M12 7.25V12l3.25 2'/%3E%3C/svg%3E");
  --i-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7.25 10.5 12 15.25l4.75-4.75M5 19.5h14'/%3E%3C/svg%3E");
  --i-file: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.5 3.5H7.25A1.75 1.75 0 0 0 5.5 5.25v13.5c0 .97.78 1.75 1.75 1.75h9.5c.97 0 1.75-.78 1.75-1.75V8.5z'/%3E%3Cpath d='M13.5 3.5v5h5'/%3E%3C/svg%3E");
  --i-back: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 5.5 8 12l6.5 6.5'/%3E%3C/svg%3E");
  --i-help: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.25'/%3E%3Cpath d='M9.6 9.4a2.5 2.5 0 0 1 4.85.85c0 1.65-2.45 2.2-2.45 3.5M12 16.6h.01'/%3E%3C/svg%3E");
  --i-retry: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19.25 12a7.25 7.25 0 1 1-2.12-5.13'/%3E%3Cpath d='M19.5 4.5v4.75h-4.75'/%3E%3C/svg%3E");

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 1040px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
main:focus, main:focus-visible { outline: none; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.035em; }
[hidden] { display: none !important; }

/* header / footer */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 12px max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; border-radius: 8px; color: var(--brand-ink); text-decoration: none; font-weight: 700; letter-spacing: -0.025em; font-size: 1.125rem; line-height: 1.2; }
.brand:hover { color: var(--brand-ink); }
.brand__logo { width: 32px; height: 32px; object-fit: contain; flex: 0 0 32px; }
.brand img { border-radius: 50%; }
.secure-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 10px; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text-muted); font-size: 0.8125rem; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.secure-badge svg { width: 16px; height: 16px; flex: 0 0 16px; }
.site-footer {
  margin-top: 64px;
  padding: 24px max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter))) 36px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
  text-align: center;
}
.site-footer p { margin: 0 0 6px; }
.site-footer a { color: var(--accent); }
.site-footer #support { display: block; margin-top: 6px; overflow-wrap: anywhere; }
.site-footer p #support { display: inline; margin: 0; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 16px; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; column-gap: 24px; row-gap: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* layout */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 640px; }
main.container { flex: 1 0 auto; }
.page-intro { padding: 48px 0 28px; }
.page-intro .eyebrow { margin-bottom: 10px; color: var(--accent); font-size: 0.9375rem; }
.page-intro .page-lead { max-width: 620px; margin-bottom: 0; }
.page-intro + noscript .notice { margin-bottom: 20px; }
.checkout-guidance { display: none; max-width: 740px; margin-top: 20px; background: var(--surface); }
.container:has(> #fatal:not([hidden])) .checkout-guidance,
.container:has(> .checkout[data-stage="closed"]) .checkout-guidance { display: grid; gap: 14px; }
.checkout-guidance .eyebrow { margin: 0; }
.checkout-guidance .panel__title { margin: 0; font-size: 1.375rem; line-height: 1.25; }
.checkout-guidance .page-lead { margin: 0; font-size: 1rem; }
.checkout-guidance .help-text { padding-top: 16px; border-top: 1px solid var(--border); }
.action-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 4px; }
.action-row .btn { flex: 1 1 220px; }
.help-text { margin: 0; color: var(--text-muted); font-size: 0.875rem; line-height: 1.65; }
.help-text--outside { margin: 24px 0 8px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; border-radius: 6px; font-size: 0.9375rem; font-weight: 600; text-decoration: none; }
.back-link::before { content: ""; flex: 0 0 18px; width: 18px; height: 18px; margin-left: -3px; background-color: currentColor; -webkit-mask: var(--i-back) center / contain no-repeat; mask: var(--i-back) center / contain no-repeat; }
.back-link:hover { text-decoration: underline; }
.skip-link { position: absolute; z-index: 10; top: 8px; left: 16px; padding: 12px 18px; background: var(--brand-ink); color: #ffffff; border-radius: var(--radius-pill); font-weight: 600; text-decoration: none; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.checkout { display: grid; gap: 20px; align-items: start; }
@media (min-width: 880px) {
  .checkout { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 32px; }
  .checkout__summary { position: sticky; top: 24px; }
  /* Closed product: summary and next step side by side */
  .container:has(> .checkout[data-stage="closed"]:not([hidden])) { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 24px; align-items: start; }
  .container:has(> .checkout[data-stage="closed"]:not([hidden])) > .page-intro { grid-column: 1 / -1; }
  .container:has(> .checkout[data-stage="closed"]:not([hidden])) > .checkout-guidance { margin-top: 0; position: sticky; top: 24px; }
}
.checkout__flow { display: grid; gap: 20px; }
.checkout[data-stage="closed"] { grid-template-columns: minmax(0, 1fr); max-width: 740px; }
.checkout[data-stage="closed"] .checkout__summary { position: static; }
.checkout[data-stage="closed"] .product__image { width: 168px; margin: 24px 24px 0; border-radius: 12px; }
.checkout[data-stage="closed"] .product__image:not([hidden]) + .product__body { padding-top: 20px; }
.page--checkout main > .notice, .page--checkout main > noscript > .notice { max-width: 740px; }
/* On phones, shrink the summary once the buyer is on the Pix / result screen. */
@media (max-width: 879px) {
  .checkout:is([data-stage="pix"], [data-stage="result"]) :is(.product__image, .product__description, .product__perks) { display: none; }
}

/* cards */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow);
}
@media (min-width: 560px) { .panel { padding: 28px; } }
.panel__title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 18px; font-size: 1.1875rem; line-height: 1.3; letter-spacing: -0.02em; text-wrap: balance; }
.panel__title .field__hint { font-weight: 500; letter-spacing: 0; }
.step-num {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--accent); color: var(--accent-contrast);
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0;
}

/* product summary */
.product { overflow: hidden; padding: 0; }
.product__image { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-2); }
.product__body { padding: 24px; }
@media (min-width: 560px) {
  .product__body { padding: 28px; }
  .checkout[data-stage="closed"] .product__image { margin: 28px 28px 0; }
}
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 0.8125rem; font-weight: 600; line-height: 1.4; letter-spacing: 0; }
.eyebrow--ok { display: inline-flex; align-items: center; gap: 6px; color: var(--success-ink); }
.eyebrow--ok::before { content: ""; flex: 0 0 16px; width: 16px; height: 16px; background-color: currentColor; -webkit-mask: var(--i-check) center / contain no-repeat; mask: var(--i-check) center / contain no-repeat; }
.product__title { margin: 0 0 14px; font-size: 1.625rem; line-height: 1.15; letter-spacing: -0.03em; text-wrap: balance; }
.product__description { margin: 0 0 20px; color: var(--text-muted); text-wrap: pretty; }
.product__status { display: flex; align-items: flex-start; gap: 8px; width: fit-content; max-width: 100%; margin: 0 0 18px; padding: 7px 12px 7px 10px; border-radius: 12px; color: var(--warning); background: var(--warning-soft); box-shadow: inset 0 0 0 1px var(--warning-line); font-size: 0.875rem; font-weight: 600; line-height: 1.4; }
.product__status::before { content: ""; flex: 0 0 16px; width: 16px; height: 16px; margin-top: 2px; background-color: currentColor; -webkit-mask: var(--i-clock) center / contain no-repeat; mask: var(--i-clock) center / contain no-repeat; }
.product__availability { margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--border); color: var(--text-muted); text-wrap: pretty; }
.access-guide { display: grid; gap: 10px; margin: 0; padding-left: 24px; color: var(--text-muted); }
.access-guide li { padding-left: 4px; }
.access-guide li::marker { color: var(--accent); font-weight: 700; }
.access-guide strong { color: var(--text); }
.access-guide + .help-text { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.product__price { margin: 0; display: grid; gap: 4px; }
.product__price strong { font-size: 2rem; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.product__price small { color: var(--text-muted); font-size: 0.875rem; }
.product__perks { list-style: none; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--border); display: grid; gap: 10px; color: var(--text-muted); font-size: 0.9375rem; }
.product__perks li { display: flex; align-items: flex-start; gap: 10px; }
.product__perks li::before { content: ""; flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; background-color: var(--success); -webkit-mask: var(--i-check) center / contain no-repeat; mask: var(--i-check) center / contain no-repeat; }

/* forms */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field__label { font-size: 0.9375rem; font-weight: 600; }
.field__label em { font-style: normal; font-weight: 400; color: var(--text-muted); }
.field__hint { color: var(--text-muted); font-size: 0.8125rem; line-height: 1.45; }
.input, .textarea {
  width: 100%;
  min-height: 48px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-muted); opacity: 1; }
.input:hover, .textarea:hover { border-color: var(--text-muted); }
.input:focus, .textarea:focus { border-color: var(--accent); background: var(--surface); outline: 2px solid var(--accent); outline-offset: 2px; }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.input[aria-invalid="true"]:focus { outline-color: var(--danger); }
.textarea { min-height: 0; font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.5; resize: none; word-break: break-all; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  padding: 12px 22px;
  font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.012em;
  text-align: center; text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-contrast); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-contrast); }
.btn--primary:active { background: var(--accent-active); }
.btn--ghost, .btn--secondary { background: var(--surface); color: var(--accent); border-color: var(--accent); }
.btn--ghost:hover, .btn--secondary:hover { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-hover); }
.btn--ghost:active, .btn--secondary:active { background: #dcefeb; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; }
.link-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 2px; background: none; border: 0; border-radius: 6px; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.link-btn:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

.buyer-summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 12px; padding: 6px 8px 6px 16px; border-radius: 12px; background: var(--surface-2); color: var(--text-muted); font-size: 0.9375rem; }
.buyer-summary > span { flex: 1 1 14rem; min-width: 0; padding-block: 6px; overflow-wrap: anywhere; }
.buyer-summary > .link-btn { margin-left: auto; }

/* notices */
.notice { position: relative; margin: 0; padding: 12px 16px 12px 44px; border-radius: 12px; font-size: 0.9375rem; line-height: 1.5; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); overflow-wrap: break-word; text-wrap: pretty; }
.notice::before { content: ""; position: absolute; left: 14px; top: 13px; width: 20px; height: 20px; background-color: currentColor; -webkit-mask: var(--i-info) center / contain no-repeat; mask: var(--i-info) center / contain no-repeat; }
.notice--error { border-color: var(--danger-line); background: var(--danger-soft); color: var(--danger); }
.notice--error::before { -webkit-mask-image: var(--i-alert); mask-image: var(--i-alert); }
.notice--success { border-color: var(--success-line); background: var(--accent-soft); color: var(--success-ink); }
.notice--success::before { -webkit-mask-image: var(--i-check); mask-image: var(--i-check); }
#recover-done.notice--success::before { -webkit-mask-image: var(--i-info); mask-image: var(--i-info); }
.page--pay main:has(> #mensagem.notice--error) #ir-pagamento { display: none !important; }
/* Recovery sent: confirmation shown without the card frame */
.panel:has(> #recover-form[hidden]) { padding: 0; border: 0; background: none; box-shadow: none; }
.panel:has(> #recover-form[hidden]) > .notice { padding: 16px 18px 16px 48px; border-radius: var(--radius-card); }
.panel:has(> #recover-form[hidden]) > .notice::before { left: 17px; top: 17px; }
.notice--info { border-color: var(--accent-line); background: var(--accent-soft); }
.notice--info::before { background-color: var(--accent); }
.notice--info a { color: inherit; font-weight: 600; }
.notice--error a, .notice--success a { color: inherit; font-weight: 600; }

/* pix */
.pix { display: grid; gap: 16px; justify-items: center; text-align: center; }
.pix__steps { display: grid; gap: 6px; margin: 0; padding-left: 22px; color: var(--text-muted); text-align: left; justify-self: stretch; font-size: 0.9375rem; }
.pix__steps li::marker { color: var(--accent); font-weight: 700; }
.pix__steps strong { color: var(--text); }
.pix__qr { width: 232px; height: 232px; padding: 12px; background: #fff; border: 1px solid var(--border); border-radius: 16px; image-rendering: pixelated; }
.pix .field { justify-self: stretch; text-align: left; }
.pix .textarea { field-sizing: content; max-height: 12em; }
@media (max-width: 560px) { .pix .textarea { min-height: 8.6em; } }
.pix__amount { margin: 0; font-size: 1.75rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.pix__status { display: inline-flex; align-items: center; gap: 10px; margin: 0; color: var(--text-muted); font-weight: 500; }
.pix__timer { margin: 0; color: var(--text-muted); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.pix__timer strong { color: var(--text); }

.spinner {
  width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%;
  border: 2px solid var(--border-strong); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
#recover-submit:disabled, #recover-submit[aria-busy="true"] { opacity: 1; cursor: progress; }
#recover-submit:disabled::before, #recover-submit[aria-busy="true"]::before { content: ""; flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #ffffff; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner, #recover-submit:disabled::before, #recover-submit[aria-busy="true"]::before { animation: none; } *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

/* result / status screens */
.result { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 12px 0 4px; }
.result__icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 1.625rem; font-weight: 700; line-height: 1; background: var(--surface-2); }
.result__icon--ok { color: var(--success-ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--success-line); }
.result__icon--wait { color: var(--warning); background: var(--warning-soft); box-shadow: inset 0 0 0 1px var(--warning-line); }
.result__icon--error { color: var(--danger); background: var(--danger-soft); box-shadow: inset 0 0 0 1px var(--danger-line); }
#error .result:has(#error-retry:not([hidden])) .result__icon--error { color: var(--warning); background: var(--warning-soft); box-shadow: inset 0 0 0 1px var(--warning-line); }
.result h2 { margin: 0; font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.02em; text-wrap: balance; }
.result .page-title { margin: 0; font-size: clamp(1.5rem, 3.4vw, 1.875rem); line-height: 1.15; }
.result p { margin: 0; max-width: 46ch; color: var(--text-muted); overflow-wrap: break-word; text-wrap: pretty; }
.result .btn { max-width: 360px; }

/* access page */
.downloads { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.download {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 12px 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.download__label { display: flex; align-items: center; gap: 12px; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.download__label::before { content: ""; flex: 0 0 20px; width: 20px; height: 20px; background-color: var(--accent); -webkit-mask: var(--i-file) center / contain no-repeat; mask: var(--i-file) center / contain no-repeat; }
.download .btn { width: auto; min-height: 44px; padding: 10px 18px; font-size: 0.9375rem; flex-shrink: 0; }
.download .btn::before { content: ""; flex: 0 0 18px; width: 18px; height: 18px; background-color: currentColor; -webkit-mask: var(--i-download) center / contain no-repeat; mask: var(--i-download) center / contain no-repeat; }
.save-box { display: grid; gap: 12px; }
.save-box .panel__title { margin-bottom: 0; }
.save-box .page-lead { margin: 0; font-size: 1rem; }
.save-box .input { font-family: var(--font-mono); font-size: 0.8125rem; }

.page-title { margin: 8px 0 12px; font-size: clamp(1.85rem, 4vw, 2.5rem); line-height: 1.1; letter-spacing: -0.03em; text-wrap: balance; }
.page-lead { margin: 0 0 20px; color: var(--text-muted); font-size: 1.0625rem; text-wrap: pretty; }
.stack { display: grid; gap: 20px; }
.stack > div:first-child .page-title { margin-top: 4px; }

/* storefront list */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card-link { color: inherit; text-decoration: none; display: block; }
.card-link:hover .panel { border-color: var(--border-strong); }

#paymentBrick_container { min-height: 120px; }

/* Payment options loaded on demand: loading notice, retry and focus target */
#step-payment > * + * { margin-top: 14px; }
#payment-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 104px; padding: 16px; border: 1px dashed var(--border-strong); border-radius: 14px; background: var(--surface-2); color: var(--text-muted); font-size: 0.9375rem; line-height: 1.5; text-align: center; }
#payment-loading::before { content: ""; flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
#paymentBrick_container[aria-busy="true"]:empty, #paymentBrick_container:empty:not([aria-busy="true"]) { min-height: 0; }
#payment-load-retry { display: flex; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 12px 22px; border: 1px solid var(--accent); border-radius: var(--radius-pill); background: var(--surface); color: var(--accent); text-decoration: none; text-align: center; transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease); }
#payment-load-retry::before { content: ""; flex: 0 0 18px; width: 18px; height: 18px; background-color: currentColor; -webkit-mask: var(--i-retry) center / contain no-repeat; mask: var(--i-retry) center / contain no-repeat; }
#payment-load-retry:hover { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-hover); }
#payment-load-retry[aria-disabled="true"] { opacity: 0.55; cursor: progress; }
.panel__title[tabindex="-1"] { border-radius: 8px; }
.panel__title[tabindex="-1"]:focus:not(:focus-visible), .notice[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }

/* Purchase and access page (pagar.html) */
.site-header > a:not(.brand) { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); color: var(--accent); font-size: 0.875rem; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease); }
.site-header > a:not(.brand)::before { content: ""; flex: 0 0 16px; width: 16px; height: 16px; background-color: currentColor; -webkit-mask: var(--i-help) center / contain no-repeat; mask: var(--i-help) center / contain no-repeat; }
.site-header > a:not(.brand):hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-hover); }
.page--pay main.container { display: grid; gap: 20px; align-content: start; }
.page--pay .page-intro { padding-bottom: 0; }
.page--pay main > .page-lead:last-child { margin: 4px 0 0; font-size: 0.9375rem; }
.page--pay .panel { display: grid; gap: 14px; }
.page--pay .panel > p, .page--pay .panel__title { margin: 0; }
.page--pay .panel > p:not([class]) { color: var(--text-muted); }
.page--pay #produto .form { margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--border); }
.page--pay #produto .form > .field__hint { margin: -8px 0 0; }
.page--pay #andamento .input[readonly] { font-family: var(--font-mono); font-size: 0.8125rem; text-overflow: ellipsis; }
.page--pay #andamento > p:last-child { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.page--pay #andamento > p:last-child > .btn { flex: 1 1 200px; width: auto; }
.page--pay :is(#continuar, #consultar):disabled { opacity: 1; cursor: progress; }
.page--pay :is(#continuar, #consultar):disabled::before { content: ""; flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #ffffff; animation: spin 0.9s linear infinite; }
.page--pay #consultar:disabled::before { border-color: var(--accent-line); border-top-color: var(--accent); }
.page--pay #downloads { gap: 16px; overflow-wrap: anywhere; }
.page--pay #downloads > [id^="orientacao-"] { padding: 18px 20px 20px; border: 1px solid var(--accent-line); border-radius: 14px; background: var(--accent-soft); }
.page--pay #downloads h3 { margin: 0 0 12px; font-size: 1.0625rem; line-height: 1.35; letter-spacing: -0.015em; text-wrap: balance; }
.page--pay #downloads ol { display: grid; gap: 8px; margin: 0; padding-left: 22px; }
.page--pay #downloads ol li { padding-left: 4px; }
.page--pay #downloads ol li::marker { color: var(--accent); font-weight: 700; }
.page--pay #downloads [id^="orientacao-"] .help-text { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--accent-line); }
.page--pay #downloads > p { font-size: 0.9375rem; }
.page--pay #arquivos { gap: 8px; }
.page--pay #arquivos > .btn { overflow-wrap: anywhere; }
.page--pay #arquivos > .btn::before { content: ""; flex: 0 0 18px; width: 18px; height: 18px; background-color: currentColor; -webkit-mask: var(--i-download) center / contain no-repeat; mask: var(--i-download) center / contain no-repeat; }
.page--pay #arquivos > .btn--primary { margin-bottom: 6px; border-radius: 24px; }
.page--pay #arquivos > .btn--secondary { justify-content: flex-start; gap: 12px; min-height: 52px; padding: 12px 16px; border-color: var(--border); border-radius: 14px; background: var(--surface-2); color: var(--text); font-weight: 500; text-align: left; }
.page--pay #arquivos > .btn--secondary::before { background-color: var(--accent); -webkit-mask-image: var(--i-file); mask-image: var(--i-file); }
.page--pay #arquivos > .btn--secondary::after { content: ""; flex: 0 0 18px; width: 18px; height: 18px; margin-left: auto; background-color: var(--accent); -webkit-mask: var(--i-download) center / contain no-repeat; mask: var(--i-download) center / contain no-repeat; }
.page--pay #arquivos > .btn--secondary:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.page--pay #arquivos > .btn--secondary:only-child { justify-content: center; border-color: var(--accent); border-radius: 24px; background: var(--accent); color: var(--accent-contrast); font-weight: 600; text-align: center; }
.page--pay #arquivos > .btn--secondary:only-child::before { background-color: currentColor; -webkit-mask-image: var(--i-download); mask-image: var(--i-download); }
.page--pay #arquivos > .btn--secondary:only-child::after { content: none; }
.page--pay #arquivos > .btn--secondary:only-child:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-contrast); }
@media (prefers-reduced-motion: reduce) { #payment-loading::before, .page--pay :is(#continuar, #consultar):disabled::before { animation: none; } }

/* Without JavaScript: hide controls that only work with it; the <noscript> notice explains. */
@media (scripting: none) {
  #loading, .panel:has(> #recover-form), .page--pay #mensagem { display: none; }
  .page--checkout .checkout-guidance { display: grid; gap: 14px; }
}

@media (max-width: 560px) {
  .site-header { min-height: 64px; padding-block: 10px; gap: 8px 12px; flex-wrap: wrap; }
  .brand { font-size: 1.0625rem; }
  .secure-badge { font-size: 0.75rem; padding: 5px 10px 5px 8px; }
  .page-intro { padding: 32px 0 20px; }
  .page-lead { font-size: 1rem; }
  .checkout-guidance { padding: 22px; }
  .btn { padding-inline: 16px; font-size: 0.9375rem; }
  .site-footer { margin-top: 48px; }
  .download { flex-wrap: wrap; }
  .download .btn { width: 100%; }
}
@media (max-width: 380px) {
  :root { --gutter: 16px; }
  .brand { gap: 8px; font-size: 1rem; }
  .brand__logo { width: 28px; height: 28px; flex-basis: 28px; }
  .secure-badge svg { display: none; }
  .site-header > a:not(.brand) { padding-inline: 12px; font-size: 0.8125rem; }
  .site-header > a:not(.brand)::before { display: none; }
  .page--pay #downloads > [id^="orientacao-"] { padding: 16px; }
  .panel:not(.product) { padding: 20px 18px; }
  .product__body { padding: 20px 18px; }
  .checkout[data-stage="closed"] .product__image { margin: 20px 18px 0; }
}
@media (max-width: 340px) {
  .site-header { column-gap: 8px; }
  .brand { gap: 6px; }
  .site-header > a:not(.brand) { padding-inline: 9px; }
}

/* Refinos locais: nao alteram as configuracoes de pagamento. */
.page--pay .page-intro{margin-bottom:0;padding-bottom:16px}
.page--pay #descricao{font-size:16px;line-height:1.55}
.page--pay #mensagem{margin-block:0 12px}
.page--pay .field__hint a,.page--pay main>p a,.page--access main>p a{display:inline-block;min-height:24px;line-height:1.7;text-underline-offset:3px}
.page--pay .field__hint{line-height:1.6}
@media(max-width:640px){.page--pay .page-intro{padding-top:24px}.page--pay #produto{padding:22px}}

