/* Advertising Agency — consumer checkout. Brand and font tokens live here. */
:root {
  --brand: #008f7d;
  --brand-hover: #007968;
  --brand-ink: #006a5d;
  --brand-light: #dff5ed;
  --navy: #102e38;
  --ink: #122e38;
  --muted: #53666d;
  --line: #e0e9e6;
  --line-strong: #b8c9c4;
  --surface: #fff;
  --canvas: #f1f6f4;
  --soft: #edf8f3;
  --yellow: #ffd936;
  --warning: #73531b;
  --warning-bg: #fff8df;
  --danger: #b42318;
  --danger-bg: #fff6f5;
  --font: "Inter", "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: var(--font); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
/* Retain visible keyboard focus from the existing accessible checkout. */
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
button:disabled { cursor: not-allowed; opacity: .6; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.site-header { background: var(--surface); border-top: 4px solid var(--brand); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1248px; margin: auto; padding: 0 32px; height: 84px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; }
.brand img { display: block; width: 76px; height: 76px; object-fit: contain; }
.header-divider { width: 1px; height: 28px; background: var(--line); }
.header-label { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.header-label .icon { color: var(--brand-ink); width: 18px; height: 18px; }
.support-link { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--brand-ink); min-height: 44px; padding: 8px 16px; background: var(--soft); border-radius: var(--radius); font-size: 14px; font-weight: 600; }
.support-link:hover { background: var(--brand-light); }
.page { max-width: 1248px; padding: 0 32px; margin: auto; }
.page-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0 16px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); min-height: 40px; font-size: 14px; }
.back-link:hover { color: var(--brand-ink); }
.back-link .icon { width: 18px; height: 18px; }
.checkout-progress { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; }
.checkout-progress > span:not(.progress-line) { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.checkout-progress > [aria-current] { color: var(--brand-ink); }
.checkout-progress .icon { width: 24px; height: 24px; color: var(--brand-ink); background: var(--brand-light); padding: 4px; border-radius: 50%; }
.step-dot { height: 26px; width: 26px; display: grid; place-items: center; background: var(--brand-hover); color: var(--surface); border-radius: 50%; font-size: 12px; }
.progress-line { width: 32px; height: 1px; background: var(--line-strong); }
.progress-complete, .progress-upcoming { color: var(--muted); }
.progress-upcoming .step-dot { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); }
.page-heading { padding: 8px 0 28px; }
h1 { font-size: 36px; line-height: 1.25; letter-spacing: -1px; font-weight: 700; }
.page-heading p { color: var(--muted); margin-top: 8px; font-size: 15px; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 432px; gap: 24px; align-items: start; }
.form-column, .order-column { min-width: 0; }
.form-column { display: flex; flex-direction: column; gap: 20px; }
.form-section { padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.section-heading { display: flex; align-items: center; gap: 12px; }
.section-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-light); color: var(--brand-ink); flex-shrink: 0; }
h2 { font-size: 18px; line-height: 1.5; font-weight: 650; letter-spacing: -.25px; }
.section-description { color: var(--muted); font-size: 14px; margin-top: 12px; }
.fields-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.contact-fields { margin-top: 24px; }
.span-all { grid-column: 1 / -1; }
.field { min-width: 0; }
.field > label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.required { color: var(--danger); }
.optional { color: var(--muted); font-weight: 400; }
input:not([type="checkbox"]), textarea { width: 100%; min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 12px 14px; outline: none; transition: border-color 140ms, background 140ms; }
input:not([type="checkbox"]) { height: 48px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; font-size: 14px; }
textarea { display: block; resize: vertical; min-height: 88px; }
input:not([type="checkbox"]):hover, textarea:hover { border-color: #839e96; }
input:not([type="checkbox"]):focus, textarea:focus { border-color: var(--brand); outline: 3px solid var(--brand-light); outline-offset: 1px; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-bg); }
.field-error { font-size: 13px; color: var(--danger); margin-top: 6px; }
.invoice-section { border-color: #e6d69c; }
.invoice-section .section-icon { background: var(--warning-bg); color: var(--warning); }
.required-label { margin-left: auto; color: var(--warning); font-size: 12px; line-height: 20px; font-weight: 650; padding: 4px 10px; background: var(--warning-bg); border-radius: 6px; white-space: nowrap; }
.required-label.is-confirmed { color: var(--brand-ink); background: var(--brand-light); }
.invoice-empty { margin-top: 20px; padding: 24px; background: var(--warning-bg); border-radius: var(--radius); }
.invoice-intro { display: flex; align-items: flex-start; gap: 16px; }
.invoice-document { width: 48px; height: 56px; background: var(--yellow); color: var(--navy); border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.invoice-document .icon { width: 28px; height: 28px; }
.invoice-empty h3 { font-size: 16px; font-weight: 650; }
.invoice-empty p:not(.field-error) { color: #6b602f; font-size: 14px; margin-top: 6px; }
.invoice-empty .button { margin-top: 20px; width: 100%; background: var(--surface); border-color: #d5bd64; color: var(--ink); justify-content: flex-start; }
.invoice-empty .button:hover { background: #fffdf5; }
.button-arrow { margin-left: auto; }
.button { min-height: 48px; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 16px; font-weight: 600; border: 1px solid transparent; font-size: 14px; line-height: 1.5; transition: background 140ms; }
.button .icon { width: 18px; height: 18px; }
.button-secondary { background: var(--surface); border-color: var(--line-strong); }
.button-secondary:hover { background: var(--soft); }
.invoice-expander { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows 220ms ease, visibility 220ms; }
.invoice-expander.is-open { grid-template-rows: 1fr; visibility: visible; }
.invoice-expander-inner { min-height: 0; overflow: hidden; }
.invoice-fields { padding-top: 24px; }
.confirmation-field { margin-top: 24px; padding: 16px; background: var(--soft); border-radius: var(--radius); }
.checkbox-label { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; cursor: pointer; }
input[type="checkbox"] { appearance: none; width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); display: grid; place-items: center; cursor: pointer; }
input[type="checkbox"]:checked { background: var(--brand-ink); border-color: var(--brand-ink); }
input[type="checkbox"]:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid white; border-bottom: 2px solid white; transform: rotate(-45deg); }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
input[type="checkbox"][aria-invalid="true"] { border-color: var(--danger); }
.invoice-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.invoice-actions .button { border-color: var(--brand); color: var(--brand-ink); }
.invoice-actions > span { font-size: 12px; color: var(--muted); }
.invoice-saved { margin-top: 20px; padding: 20px; background: var(--soft); border-radius: var(--radius); }
.saved-heading { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 12px; }
.saved-heading > span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--brand-ink); }
.saved-heading .icon { width: 16px; height: 16px; }
.text-button { border: 0; background: transparent; color: var(--brand-ink); padding: 8px 0; min-height: 40px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.text-button:hover { text-decoration: underline; }
.invoice-saved h3 { font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.invoice-saved dl { margin-top: 12px; font-size: 14px; }
.invoice-saved dl > div { display: grid; grid-template-columns: 104px minmax(0,1fr); gap: 12px; margin-top: 8px; }
.invoice-saved dt { color: var(--muted); }
.invoice-saved dd { overflow-wrap: anywhere; }
.note-section { padding: 16px 28px; }
summary { list-style: none; font-size: 14px; font-weight: 550; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-height: 40px; }
summary::-webkit-details-marker { display: none; }
summary .icon { margin-left: auto; }
details[open] summary .icon { transform: rotate(180deg); }
details > .field { margin-top: 16px; }
.fulfillment-section { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.fulfillment-section h2 { font-size: 17px; }
.fulfillment-flow { list-style: none; margin: 24px 0; padding: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.fulfillment-flow li { min-width: 0; position: relative; }
.fulfillment-flow li:not(:last-child)::after { content: ""; position: absolute; top: 20px; left: 52px; width: calc(100% - 40px); border-top: 2px dashed var(--line-strong); pointer-events: none; }
.flow-number { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-light); color: var(--brand-ink); margin-bottom: 16px; }
.fulfillment-flow li:nth-child(2) .flow-number { background: #fff0b5; color: var(--warning); }
.fulfillment-flow li:nth-child(3) .flow-number { background: #dfebf4; color: #315b7b; }
.flow-number .icon { width: 20px; height: 20px; }
.flow-step-label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.fulfillment-flow h3 { font-size: 14px; font-weight: 650; text-wrap: pretty; }
.fulfillment-flow p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.fulfillment-note { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--brand-ink); padding: 12px 16px; background: var(--soft); border-radius: 10px; }
.fulfillment-note .icon { width: 16px; height: 16px; margin-top: 2px; }
.order-column { position: sticky; top: 24px; }
.order-panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.order-overview { padding: 28px; background: var(--navy); color: white; }
.order-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.order-heading h2 { font-size: 18px; }
.order-heading > span { color: #cbdfdf; font-size: 12px; white-space: nowrap; }
.order-product { display: flex; gap: 20px; padding: 24px 0; align-items: center; }
.order-product > img { width: 104px; height: 147px; object-fit: contain; border-radius: 8px; flex-shrink: 0; background: #2aa78f; }
.product-description { min-width: 0; }
.product-type { display: inline-block; color: #a9efd6; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.product-description h3 { font-size: 17px; font-weight: 600; line-height: 1.5; text-wrap: pretty; }
.product-description p { font-size: 13px; color: #cbdfdf; margin-top: 8px; }
.product-description strong { font-size: 16px; display: block; margin-top: 8px; font-weight: 600; font-variant-numeric: tabular-nums; }
.price-breakdown { padding: 16px 0; border-top: 1px solid #37515a; font-size: 14px; }
.price-breakdown > div { display: flex; justify-content: space-between; gap: 20px; }
.price-breakdown dt { color: #cbdfdf; }
.price-breakdown dd { font-variant-numeric: tabular-nums; }
.order-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; border-top: 1px solid #37515a; }
.order-total > div > span { display: block; font-size: 14px; font-weight: 600; }
.order-total small { display: block; color: #cbdfdf; margin-top: 4px; font-size: 12px; }
.order-total > strong { color: #a9efd6; font-size: 32px; font-weight: 650; line-height: 1.2; letter-spacing: -.8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-total > strong > span { font-size: 22px; }
.payment-body { padding: 24px 28px; }
.payment-section > h3 { font-size: 14px; font-weight: 600; }
.gateway { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 16px; background: var(--soft); border: 1px solid var(--brand); border-radius: var(--radius); }
.qr-icon { display: grid; place-items: center; width: 44px; height: 44px; background: var(--brand-ink); color: white; border-radius: 10px; flex-shrink: 0; }
.qr-icon .icon { width: 26px; height: 26px; }
.gateway > div { min-width: 0; }
.sepay-logo { display: block; width: 112px; height: 32px; object-fit: contain; object-position: left center; max-width: 100%; }
.gateway strong { display: block; font-size: 20px; letter-spacing: -.4px; font-weight: 700; color: var(--brand-ink); }
.gateway > div > span { color: var(--muted); display: block; font-size: 12px; margin-top: 2px; }
.gateway-check { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-ink); color: white; margin-left: auto; flex-shrink: 0; }
.gateway-check .icon { width: 14px; height: 14px; }
.payment-section > p { margin-top: 12px; color: var(--muted); font-size: 13px; }
.button-primary { color: white; background: var(--brand-hover); width: 100%; margin-top: 24px; min-height: 52px; font-size: 15px; justify-content: space-between; }
.button-primary:hover { background: var(--brand-ink); }
.approval-note { font-size: 12px; color: var(--muted); text-align: center; margin: 12px 4px 0; }
.secure-note { color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.secure-note .icon { width: 14px; height: 14px; color: var(--brand-ink); }
.preview-disclaimer { color: var(--muted); font-size: 12px; text-align: center; margin: 16px 8px 0; line-height: 1.7; }
.preview-result { margin-top: 16px; padding: 16px; border-radius: var(--radius); font-size: 14px; color: var(--brand-ink); background: var(--soft); }
.page-footer { margin-top: 32px; padding: 24px 0; border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; gap: 20px; font-size: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1100px) {
  .checkout-layout { grid-template-columns: minmax(0,1fr) 392px; }
  .form-section, .order-overview, .payment-body { padding: 24px; }
  .note-section { padding: 12px 24px; }
  .fields-grid { grid-template-columns: minmax(0,1fr); }
  .invoice-empty { padding: 20px; }
  .invoice-intro { gap: 12px; }
  .invoice-document { display: none; }
  .section-heading { gap: 10px; flex-wrap: wrap; }
  .required-label { margin-left: 50px; }
  .invoice-section .section-heading h2 { flex: 1; }
  .fulfillment-flow { grid-template-columns: minmax(0,1fr); }
  .fulfillment-flow li { display: flex; gap: 16px; align-items: flex-start; }
  .fulfillment-flow li:not(:last-child)::after { top: 52px; left: 19px; width: 0; height: calc(100% - 40px); border-top: 0; border-left: 2px dashed var(--line-strong); }
  .flow-number { margin-bottom: 0; flex-shrink: 0; }
}
@media (max-width: 900px) {
  .header-inner, .page { padding-left: 24px; padding-right: 24px; }
  .checkout-layout { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .order-column { position: static; }
  .fields-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .required-label { margin-left: auto; }
  .invoice-document { display: grid; }
  .fulfillment-flow { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .fulfillment-flow li { display: block; }
  .fulfillment-flow li:not(:last-child)::after { top: 20px; left: 52px; width: calc(100% - 40px); height: 0; border-left: 0; border-top: 2px dashed var(--line-strong); }
  .flow-number { margin-bottom: 16px; }
  .order-product > img { width: 104px; height: 147px; }
  .product-description h3 { font-size: 18px; }
  .checkout-progress { gap: 8px; }
  .progress-line { width: 16px; }
}
@media (max-width: 560px) {
  .header-inner { height: 76px; gap: 12px; padding: 0 16px; }
  .brand img { width: 64px; height: 64px; }
  .header-label { font-size: 13px; }
  .header-label .icon, .header-divider { display: none; }
  .support-link { font-size: 12px; gap: 6px; padding: 8px 10px; }
  .support-link .icon { width: 17px; height: 17px; }
  .page { padding: 0 16px; }
  .page-top { padding: 16px 0 8px; display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .back-link { font-size: 13px; min-height: 32px; }
  .checkout-progress { justify-content: space-between; font-size: 12px; gap: 8px; }
  .progress-line { flex: 1; max-width: 32px; min-width: 8px; }
  .checkout-progress > span:not(.progress-line) { gap: 6px; }
  .step-dot { width: 24px; height: 24px; }
  .page-heading { padding: 20px 0 24px; }
  h1 { font-size: 28px; letter-spacing: -.7px; }
  .page-heading p { font-size: 14px; line-height: 1.7; max-width: 35ch; }
  .form-column { gap: 16px; }
  .form-section, .order-overview, .payment-body { padding: 20px; }
  .form-section, .order-panel { border-radius: 16px; }
  h2 { font-size: 17px; }
  .section-icon { width: 36px; height: 36px; border-radius: 10px; }
  .section-icon .icon { width: 18px; height: 18px; }
  .section-heading { gap: 10px; }
  .section-description { font-size: 13px; }
  .fields-grid { grid-template-columns: minmax(0,1fr); gap: 20px; }
  input:not([type="checkbox"]), textarea { font-size: 16px; }
  .invoice-section .section-heading h2 { flex: auto; }
  .required-label { margin-left: 46px; padding: 2px 8px; }
  .invoice-empty { padding: 16px; }
  .invoice-document { display: none; }
  .invoice-empty h3 { font-size: 15px; }
  .invoice-empty p:not(.field-error) { font-size: 13px; }
  .invoice-empty .button { padding: 12px; font-size: 13px; }
  .invoice-empty .button .icon { width: 16px; height: 16px; }
  .invoice-empty .button-arrow { display: none; }
  .invoice-actions .button { width: 100%; }
  .invoice-actions > span { width: 100%; text-align: center; }
  .invoice-saved { padding: 16px; }
  .saved-heading { gap: 8px; align-items: flex-start; }
  .saved-heading > span { font-size: 12px; }
  .invoice-saved dl > div { grid-template-columns: 84px minmax(0,1fr); gap: 8px; font-size: 13px; }
  .note-section { padding: 12px 20px; }
  summary { font-size: 13px; }
  summary .optional { font-size: 12px; }
  .fulfillment-section { padding: 20px; }
  .fulfillment-flow { grid-template-columns: minmax(0,1fr); gap: 24px; margin: 20px 0; }
  .fulfillment-flow li { display: flex; gap: 16px; }
  .fulfillment-flow li:not(:last-child)::after { top: 52px; left: 19px; width: 0; height: calc(100% - 40px); border-top: 0; border-left: 2px dashed var(--line-strong); }
  .flow-number { margin-bottom: 0; }
  .fulfillment-flow h3 { font-size: 14px; }
  .order-heading h2 { font-size: 17px; }
  .order-product { gap: 16px; }
  .order-product > img { width: 88px; height: 124px; }
  .product-description h3 { font-size: 16px; }
  .order-total { gap: 8px; }
  .order-total > strong { font-size: 30px; }
  .gateway { padding: 12px; gap: 10px; }
  .qr-icon { width: 40px; height: 40px; }
  .gateway > div > span { font-size: 12px; }
  .page-footer { margin-top: 28px; display: block; padding: 20px 0 28px; }
  .page-footer > span { display: block; }
  .page-footer > span + span { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
