:root {
    --ink: #13211b;
    --muted: #6f7c75;
    --cream: #f5f2e9;
    --paper: #fffdf8;
    --line: #dce1da;
    --green: #174d35;
    --lime: #b9e769;
    --orange: #ff7b4a;
    --dark: #102119;
    --shadow: 0 24px 70px rgba(18, 39, 29, .12);
    --radius: 24px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--cream);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--cream); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.site-header {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1240px;
    margin: auto;
    padding: 0 28px;
}

.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.brand img { width: 116px; height: auto; }
.brand span { padding-left: 16px; border-left: 1px solid #bdc6be; color: var(--muted); font-size: 13px; }
.mode-pill {
    padding: 7px 11px;
    border: 1px solid #b8c1ba;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
}

.home-shell { overflow: hidden; }
.hero {
    min-height: 650px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 86px 28px 110px;
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 90px;
    align-items: center;
}

.eyebrow {
    color: var(--green);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .18em;
}

.hero h1 {
    max-width: 780px;
    margin: 19px 0 24px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(57px, 7vw, 96px);
    font-weight: 400;
    line-height: .93;
    letter-spacing: -.055em;
}

.hero h1 em { color: var(--green); font-weight: 400; }
.hero p { max-width: 650px; color: #53615a; font-size: 18px; line-height: 1.75; }
.hero-actions { display: flex; align-items: center; gap: 26px; margin-top: 38px; }
.primary-button, .secondary-button {
    border: 0;
    border-radius: 999px;
    padding: 15px 24px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 750;
    transition: transform .2s ease, background .2s ease;
}
.primary-button { background: var(--green); color: white; box-shadow: 0 10px 30px rgba(23, 77, 53, .2); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.secondary-button { background: var(--lime); color: var(--dark); }
.text-link { color: var(--green); font-weight: 750; text-decoration: none; }
.wide { width: 100%; text-align: center; }

.flow-card {
    position: relative;
    padding: 32px;
    border-radius: 32px;
    background: var(--dark);
    color: white;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}
.flow-card::before {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -60px;
    top: -60px;
    border-radius: 50%;
    background: var(--lime);
    opacity: .8;
    filter: blur(1px);
    z-index: -1;
}
.flow-node { display: grid; grid-template-columns: 26px 1fr; column-gap: 12px; align-items: center; color: #a8b4ad; font-size: 11px; }
.flow-node span { color: white; font-size: 17px; font-weight: 750; }
.flow-node small { grid-column: 2; color: #97a49d; margin-top: 3px; }
.flow-node.active { color: var(--lime); }
.flow-card i { display: block; height: 35px; width: 1px; margin: 7px 0 7px 12px; background: #496056; }

.trust-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 1240px;
    margin: 0 auto 105px;
    padding: 0 28px;
}
.trust-row div { padding: 28px 30px; border-top: 1px solid #cbd2cc; border-bottom: 1px solid #cbd2cc; }
.trust-row div + div { border-left: 1px solid #cbd2cc; }
.trust-row b, .trust-row span { display: block; }
.trust-row b { margin-bottom: 8px; font-size: 14px; }
.trust-row span { color: var(--muted); font-size: 13px; line-height: 1.55; }

.api-section { padding: 110px 28px 130px; background: #e7eadf; }
.section-heading { max-width: 730px; margin: 0 auto 58px; text-align: center; }
.section-heading h2, .label-explainer h2 {
    margin: 15px 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(37px, 5vw, 60px);
    font-weight: 400;
    letter-spacing: -.035em;
}
.section-heading p, .label-explainer p { color: var(--muted); line-height: 1.65; }
.api-grid { max-width: 1050px; margin: auto; display: grid; gap: 12px; }
.api-card { border: 1px solid #cbd2c8; border-radius: 18px; background: rgba(255,255,255,.63); overflow: hidden; }
.api-card[open] { background: var(--paper); box-shadow: 0 18px 50px rgba(20, 44, 32, .09); }
.api-card summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    grid-template-columns: 48px 1fr auto 28px;
    gap: 14px;
    align-items: center;
    padding: 21px 24px;
}
.api-card summary::-webkit-details-marker { display: none; }
.api-number { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 50%; background: var(--dark); color: var(--lime); font: 750 11px/1 monospace; }
.api-title { display: grid; gap: 4px; }
.api-title small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.api-title strong { font-size: 16px; }
.api-method { padding: 7px 9px; border-radius: 7px; background: #dfe7d8; color: var(--green); font: 800 10px/1 monospace; }
.chevron { color: var(--muted); font-size: 22px; transition: transform .2s ease; }
.api-card[open] .chevron { transform: rotate(180deg); }
.api-detail { padding: 0 24px 26px 86px; }
.api-detail > p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.endpoint { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 10px; background: #edf0e9; overflow: auto; }
.endpoint span { flex: none; color: var(--green); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.endpoint code { font-size: 12px; }
.json-block { margin-top: 17px; border-radius: 12px; overflow: hidden; background: #122019; color: #e8f2e8; }
.json-block > div { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid #314139; }
.json-block > div span { color: var(--lime); font: 700 10px/1 monospace; letter-spacing: .1em; }
.copy-json { border: 0; background: transparent; color: #a7b6ae; font-size: 11px; cursor: pointer; }
.json-block pre { max-height: 380px; margin: 0; padding: 18px; overflow: auto; font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; }
.json-block.response { background: #1c3026; }

.label-explainer {
    max-width: 1120px;
    margin: auto;
    padding: 125px 28px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 100px;
    align-items: center;
}
.label-explainer code { font-size: .85em; }
.mini-label { background: white; padding: 28px; min-height: 440px; box-shadow: var(--shadow); transform: rotate(3deg); border: 1px solid #ccd1cb; }
.mini-label > strong:first-child { display: block; padding: 13px; background: var(--dark); color: white; text-align: center; font-size: 25px; }
.fake-bars { height: 82px; margin: 28px 0 8px; background: repeating-linear-gradient(90deg,#111 0 3px,transparent 3px 6px,#111 6px 7px,transparent 7px 12px); }
.mini-label > b { display: block; text-align: center; font-family: monospace; }
.mini-label hr { border: 0; border-top: 2px solid #111; margin: 25px 0; }
.mini-label small { display: block; margin-bottom: 7px; }
.mini-label p { color: var(--ink); line-height: 1.5; }
.site-footer { padding: 28px; text-align: center; color: var(--muted); font-size: 12px; }

/* Hosted checkout */
.checkout-page { background: #eeefe8; }
.checkout-shell { max-width: 1130px; margin: 30px auto 90px; padding: 0 28px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px; align-items: start; }
.checkout-main, .order-summary, .ops-section, .ops-login {
    background: var(--paper);
    border: 1px solid #dce0d9;
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(20, 43, 32, .07);
}
.checkout-main { padding: 42px; }
.checkout-heading h1 { margin: 9px 0; font: 400 44px/1.05 Georgia, serif; letter-spacing: -.03em; }
.checkout-heading p { color: var(--muted); margin-bottom: 42px; }
fieldset { border: 0; border-top: 1px solid var(--line); padding: 32px 0 8px; margin: 0 0 25px; }
legend { padding: 0 16px 0 0; font-weight: 800; font-size: 15px; }
legend span { display: inline-grid; place-items: center; width: 27px; height: 27px; margin-right: 8px; border-radius: 50%; background: var(--green); color: white; font-size: 11px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-grid label:first-child { grid-column: 1 / -1; }
label { display: grid; gap: 8px; color: #3d4943; font-size: 12px; font-weight: 750; }
label span { color: var(--muted); font-weight: 400; }
input, textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #ccd3cc;
    border-radius: 10px;
    outline: 0;
    color: var(--ink);
    background: white;
    font-size: 14px;
}
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23, 77, 53, .1); }
textarea { min-height: 94px; resize: vertical; }
fieldset label + label, fieldset .area-results + input + input + input + label, fieldset label + button { margin-top: 16px; }
.area-results { display: none; margin-top: 6px; border: 1px solid #ccd3cc; border-radius: 10px; overflow: hidden; background: white; }
.area-results.visible { display: block; }
.area-option { display: block; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid #e4e8e3; background: white; text-align: left; cursor: pointer; }
.area-option:hover { background: #edf3e8; }
.area-option strong, .area-option small { display: block; }
.area-option small { color: var(--muted); margin-top: 3px; }
.shipping-options { display: grid; gap: 10px; }
.shipping-option { position: relative; display: grid; grid-template-columns: 22px 1fr auto; gap: 11px; align-items: center; padding: 16px; border: 1px solid #d4dad3; border-radius: 12px; cursor: pointer; }
.shipping-option:has(input:checked) { border-color: var(--green); background: #f1f7ed; }
.shipping-option input { width: auto; accent-color: var(--green); }
.shipping-option strong, .shipping-option small { display: block; }
.shipping-option small { color: var(--muted); margin-top: 3px; }
.shipping-price { text-align: right; }
.secure-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.order-summary { position: sticky; top: 22px; padding: 30px; }
.summary-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.summary-item strong { font-size: 14px; }
.summary-item span, .summary-item small { color: var(--muted); font-size: 11px; }
.summary-item small { grid-column: 1; }
.summary-item > span { grid-column: 2; grid-row: 1 / span 2; color: var(--ink); font-weight: 700; }
.summary-totals { padding-top: 19px; }
.summary-totals > div { display: flex; justify-content: space-between; margin: 12px 0; font-size: 13px; }
.summary-totals .grand-total { padding-top: 17px; border-top: 1px solid var(--line); font-size: 20px; }
.summary-totals > small { color: var(--green); }
.loading-lines { height: 220px; margin-top: 22px; background: linear-gradient(100deg,#ebeee9 20%,#f7f8f5 40%,#ebeee9 60%) 0 0/200% 100%; animation: shimmer 1.4s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.alert { margin: 18px 0; padding: 13px 15px; border-radius: 10px; background: #fff1ea; color: #8e3c1d; font-size: 13px; line-height: 1.5; }
.hidden { display: none !important; }
.button-loading { pointer-events: none; opacity: .68; }

/* Status */
.return-page { background: #e7eadf; }
.status-shell { max-width: 650px; margin: 100px auto; padding: 50px 28px; text-align: center; }
.status-shell h1 { margin: 15px 0; font: 400 50px/1.05 Georgia, serif; letter-spacing: -.035em; }
.status-shell p { color: var(--muted); line-height: 1.7; }
.status-orbit { width: 76px; height: 76px; margin: 0 auto 30px; position: relative; border: 1px solid #a8b5a9; border-radius: 50%; animation: spin 2s linear infinite; }
.status-orbit i { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--green); }
.status-orbit i:nth-child(1) { left: 31px; top: -6px; }
.status-orbit i:nth-child(2) { right: -2px; bottom: 12px; background: var(--lime); }
.status-orbit i:nth-child(3) { left: 1px; bottom: 8px; background: var(--orange); }
@keyframes spin { to { transform: rotate(360deg); } }
.status-shell.success .status-orbit { animation: none; background: var(--green); border-color: var(--green); }
.status-shell.success .status-orbit::after { content: "✓"; display: grid; place-items: center; height: 100%; color: white; font-size: 32px; }
.status-shell.success .status-orbit i { display: none; }
.status-details { margin: 28px 0; }
.status-details div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #ccd3cc; font-size: 13px; }

/* Ops */
.ops-page { background: #edf0ea; }
.ops-login { max-width: 450px; margin: 85px auto; padding: 42px; }
.ops-login h1 { margin: 12px 0; font: 400 40px Georgia, serif; }
.ops-login > p { color: var(--muted); line-height: 1.6; }
.ops-login form { display: grid; gap: 18px; margin-top: 30px; }
.ops-shell { max-width: 1320px; margin: 32px auto 100px; padding: 0 28px; }
.ops-heading { display: flex; justify-content: space-between; align-items: end; }
.ops-heading h1 { margin: 8px 0 0; font: 400 44px Georgia, serif; }
.ops-heading-actions { display: flex; align-items: center; gap: 14px; }
.text-button { border: 0; background: transparent; color: var(--green); font-weight: 750; cursor: pointer; }
.ops-panels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 30px 0; }
.ops-panels article { padding: 22px; border-radius: 15px; background: var(--dark); color: white; }
.ops-panels span, .ops-panels strong { display: block; }
.ops-panels span { color: #9baba2; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.ops-panels strong { margin-top: 10px; font: 400 26px Georgia, serif; }
.ops-section { padding: 25px; margin-top: 14px; }
.ops-section h2 { margin: 0 0 18px; font-size: 15px; }
.section-note { margin: -9px 0 18px; color: var(--muted); font-size: 10px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 11px; color: var(--muted); text-align: left; text-transform: uppercase; font-size: 9px; letter-spacing: .1em; }
td { min-width: 110px; padding: 14px 11px; border-top: 1px solid var(--line); vertical-align: top; }
td:first-child { min-width: 210px; }
td small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.status-tag { display: inline-block; padding: 5px 7px; border-radius: 6px; background: #e7eae5; font-size: 9px; font-weight: 800; }
.status-paid { background: #dff2d4; color: #276321; }
.status-payment_pending { background: #fff0c9; color: #805c00; }
.error-text { max-width: 260px; color: #a44221; }
.actions a, .actions button { display: block; border: 0; background: none; padding: 0; margin: 0 0 8px; color: var(--green); font-size: 11px; font-weight: 750; cursor: pointer; text-decoration: underline; }
.ops-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.metric-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); font-size: 12px; }
.metric-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.empty-state { color: var(--muted); padding: 25px; text-align: center; }

/* A5 print label */
.label-page { padding: 30px; background: #d9ddd8; }
.shipping-label { width: 148mm; min-height: 210mm; margin: auto; padding: 9mm; background: white; color: #111; font-family: Arial, sans-serif; box-shadow: 0 10px 40px rgba(0,0,0,.18); }
.label-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #111; padding-bottom: 5mm; }
.label-header img { width: 35mm; }
.label-header div { text-align: right; }
.label-header strong, .label-header span { display: block; }
.label-header strong { font-size: 22pt; }
.label-header span { margin-top: 2mm; font: 12pt monospace; }
.label-barcode { padding: 7mm 0 5mm; text-align: center; border-bottom: 2px solid #111; }
.barcode { width: 100%; height: 26mm; }
.label-barcode > strong { display: block; margin-top: 2mm; font: 15pt monospace; letter-spacing: .08em; }
.label-grid { display: grid; grid-template-columns: 1fr 1.35fr; border-bottom: 2px solid #111; }
.label-grid article { min-height: 59mm; padding: 5mm 5mm 5mm 0; }
.label-grid article + article { padding-left: 5mm; border-left: 2px solid #111; }
.label-grid span, .label-meta span { display: block; margin-bottom: 2mm; font-size: 8pt; font-weight: 700; letter-spacing: .12em; }
.label-grid strong { font-size: 14pt; }
.label-grid p { margin: 3mm 0 0; font-size: 10pt; line-height: 1.45; }
.label-meta { display: grid; grid-template-columns: .7fr .6fr 1.3fr 1.4fr; border-bottom: 2px solid #111; }
.label-meta div { padding: 4mm 3mm; border-right: 1px solid #111; overflow: hidden; }
.label-meta div:last-child { border: 0; }
.label-meta strong { font-size: 9pt; word-break: break-all; }
.label-note { min-height: 25mm; padding: 4mm 0; }
.label-note strong { font-size: 8pt; text-transform: uppercase; letter-spacing: .1em; }
.label-note p { font-size: 10pt; }
.shipping-label footer { border-top: 1px solid #111; padding-top: 3mm; font-size: 7pt; text-align: center; }
.print-button { display: block; margin: 24px auto; padding: 13px 20px; border: 0; border-radius: 999px; background: var(--green); color: white; cursor: pointer; }

@page { size: A5 portrait; margin: 0; }
@media print {
    .label-page { padding: 0; background: white; }
    .shipping-label { box-shadow: none; margin: 0; width: 148mm; min-height: 210mm; }
    .print-button { display: none; }
}

@media (max-width: 850px) {
    .hero { grid-template-columns: 1fr; gap: 50px; padding-top: 55px; }
    .flow-card { transform: none; }
    .trust-row { grid-template-columns: 1fr; }
    .trust-row div + div { border-left: 0; border-top: 0; }
    .label-explainer { grid-template-columns: 1fr; gap: 50px; }
    .mini-label { max-width: 340px; margin: auto; }
    .checkout-shell { grid-template-columns: 1fr; }
    .order-summary { position: static; grid-row: 1; }
    .ops-panels { grid-template-columns: 1fr 1fr; }
    .ops-columns { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .site-header { height: 66px; padding: 0 18px; }
    .brand img { width: 92px; }
    .brand span { display: none; }
    .hero { padding: 45px 20px 75px; }
    .hero h1 { font-size: 53px; }
    .hero-actions { align-items: flex-start; flex-direction: column; }
    .trust-row { padding: 0 20px; }
    .api-section { padding: 80px 14px; }
    .api-card summary { grid-template-columns: 39px 1fr auto; padding: 17px 13px; }
    .api-method { grid-column: 2; width: max-content; }
    .chevron { grid-column: 3; grid-row: 1 / span 2; }
    .api-detail { padding: 0 13px 18px; }
    .label-explainer { padding: 85px 20px; }
    .checkout-shell { margin-top: 10px; padding: 0 12px; }
    .checkout-main, .order-summary { padding: 25px 20px; }
    .field-grid { grid-template-columns: 1fr; }
    .field-grid label:first-child { grid-column: auto; }
    .shipping-option { grid-template-columns: 20px 1fr; }
    .shipping-price { grid-column: 2; text-align: left; }
    .ops-shell { padding: 0 12px; }
    .ops-heading { align-items: flex-start; gap: 20px; flex-direction: column; }
    .ops-heading-actions { width: 100%; justify-content: space-between; }
    .ops-panels { grid-template-columns: 1fr; }
}
