:root {
    --orange: #fe5f02;
    --orange-dark: #c43d00;
    --orange-soft: #fff0e7;
    --orange-pale: #fff8f3;
    --ink: #090c0e;
    --ink-2: #20272c;
    --muted: #6d7479;
    --line: #e7e4e1;
    --surface: #ffffff;
    --surface-2: #f8f8f7;
    --success: #197447;
    --success-bg: #e8f7ef;
    --warning: #9a5b00;
    --warning-bg: #fff4d9;
    --danger: #9e2b2b;
    --danger-bg: #ffeded;
    --info: #2a5d86;
    --info-bg: #eaf4fc;
    --shadow: 0 16px 45px rgba(9, 12, 14, .08);
    --radius: 18px;
    --radius-sm: 12px;
    --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: #fff;
    line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.container { width: min(calc(100% - 36px), var(--container)); margin: 0 auto; }
.narrow { width: min(calc(100% - 36px), 760px); margin: 0 auto; }
.muted { color: var(--muted); }
.text-orange { color: var(--orange-dark); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(231,228,225,.9);
}
.nav-wrap { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand img { display: block; width: 238px; max-height: 64px; object-fit: contain; object-position: left center; }
.main-nav { display: flex; align-items: center; gap: 24px; font-weight: 700; font-size: .96rem; }
.main-nav a { transition: color .2s ease; }
.main-nav a:hover { color: var(--orange-dark); }
.cart-link { background: var(--ink); color: #fff !important; padding: 10px 14px; border-radius: 999px; }
.cart-link span { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 4px; border-radius: 50%; background: var(--orange); font-size: .8rem; }
.nav-toggle, .admin-menu-toggle { display: none; background: var(--ink); color: #fff; border: 0; border-radius: 10px; padding: 9px 13px; font-weight: 800; }

.hero { background: linear-gradient(145deg, #fff 10%, var(--orange-pale) 70%, #fff3ea 100%); overflow: hidden; }
.hero-grid { min-height: 610px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 64px; padding: 72px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--orange-dark); font-weight: 900; text-transform: uppercase; letter-spacing: .09em; font-size: .78rem; }
.eyebrow::before { content: ""; width: 26px; height: 3px; background: var(--orange); border-radius: 999px; }
h1, h2, h3 { line-height: 1.1; margin-top: 0; }
h1 { font-size: clamp(2.75rem, 6vw, 5.8rem); letter-spacing: -.055em; margin-bottom: 24px; }
h2 { font-size: clamp(2rem, 4vw, 3.35rem); letter-spacing: -.04em; margin-bottom: 18px; }
h3 { font-size: 1.25rem; letter-spacing: -.02em; }
.hero-copy > p:not(.eyebrow) { font-size: 1.18rem; color: var(--ink-2); max-width: 650px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; padding: 12px 18px; font-weight: 850; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 10px 24px rgba(254,95,2,.22); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 8px 12px; border-radius: 9px; font-size: .88rem; }
.hero-notes { display: flex; flex-wrap: wrap; gap: 12px 20px; color: var(--muted); font-weight: 700; font-size: .92rem; }
.hero-notes span::before { content: "✓"; color: var(--orange-dark); font-weight: 1000; margin-right: 7px; }
.hero-card { position: relative; background: rgba(255,255,255,.9); border: 1px solid #ffe0ce; border-radius: 30px; box-shadow: var(--shadow); padding: 38px; }
.hero-card::before { content: ""; position: absolute; width: 190px; height: 190px; background: var(--orange-soft); border-radius: 50%; top: -85px; right: -55px; z-index: -1; }
.transfer-sheet { min-height: 330px; border-radius: 22px; background: linear-gradient(145deg, #fff 0 68%, #fafafa 68%); border: 1px solid var(--line); padding: 26px; position: relative; overflow: hidden; }
.transfer-sheet .sheet-mark { font-size: clamp(3rem, 7vw, 5rem); font-weight: 1000; font-style: italic; letter-spacing: -.07em; }
.transfer-sheet .sheet-mark span { color: var(--orange); }
.transfer-sheet .sheet-grid { position: absolute; inset: auto 26px 26px 26px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.transfer-sheet .sheet-grid span { height: 72px; background: var(--orange-soft); border-radius: 10px; border: 1px dashed #ffb889; }
.hero-card-caption { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-top: 18px; }
.hero-card-caption strong { font-size: 1.1rem; }
.hero-card-caption small { color: var(--muted); }

.section { padding: 92px 0; }
.section-soft { background: var(--surface-2); }
.section-orange { background: var(--orange-pale); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 40px; }
.section-head p { max-width: 600px; color: var(--muted); margin: 0; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card, .panel, .product-card, .step-card, .stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.feature-card { padding: 26px; }
.feature-number { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--orange-soft); color: var(--orange-dark); font-weight: 950; margin-bottom: 28px; }
.feature-card p { color: var(--muted); margin-bottom: 0; }

.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.product-card { overflow: hidden; display: flex; flex-direction: column; }
.product-visual { min-height: 210px; display: grid; place-items: center; background: linear-gradient(150deg, var(--orange-pale), #fff); border-bottom: 1px solid var(--line); }
.product-badge-visual { width: 138px; aspect-ratio: 1.25; display: grid; place-items: center; transform: rotate(-4deg); background: #fff; border: 2px solid var(--orange); box-shadow: 0 18px 25px rgba(9,12,14,.1); border-radius: 14px; font-size: 2rem; font-weight: 1000; letter-spacing: -.04em; }
.product-content { padding: 24px; display: flex; flex: 1; flex-direction: column; }
.product-content p { color: var(--muted); }
.product-card .price { margin-top: auto; font-size: 1.45rem; font-weight: 950; }
.product-card .price small { font-size: .85rem; font-weight: 650; color: var(--muted); }
.product-actions { display: flex; gap: 10px; margin-top: 18px; }
.product-actions .btn { flex: 1; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-card { padding: 30px; }
.step-index { color: var(--orange); font-size: 2.8rem; font-weight: 1000; letter-spacing: -.08em; line-height: 1; margin-bottom: 24px; }
.step-card p { color: var(--muted); margin-bottom: 0; }

.faq { display: grid; gap: 12px; }
details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
summary { cursor: pointer; font-weight: 850; }
details p { color: var(--muted); margin-bottom: 0; }

.cta-panel { display: grid; grid-template-columns: 1.3fr .7fr; gap: 30px; align-items: center; background: var(--ink); color: #fff; border-radius: 28px; padding: 44px; }
.cta-panel p { color: #cbd0d3; margin-bottom: 0; }
.cta-panel .hero-actions { justify-content: flex-end; margin: 0; }

.page-hero { padding: 72px 0 48px; background: linear-gradient(150deg, #fff, var(--orange-pale)); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.5rem, 5vw, 4.6rem); margin-bottom: 12px; }
.page-hero p { max-width: 720px; color: var(--muted); font-size: 1.1rem; }
.breadcrumbs { display: flex; gap: 8px; color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.breadcrumbs a:hover { color: var(--orange-dark); }

.panel { padding: 28px; }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 1.75rem; }
.panel h3 { margin-bottom: 10px; }

.shop-layout { display: grid; grid-template-columns: 1fr 320px; gap: 30px; align-items: start; }
.sticky { position: sticky; top: 106px; }
.info-list { display: grid; gap: 14px; }
.info-list div { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.info-list div:last-child { border: 0; padding-bottom: 0; }
.info-list strong { display: block; }
.info-list span { color: var(--muted); font-size: .92rem; }

.product-detail { display: grid; grid-template-columns: .9fr 1.1fr; gap: 46px; align-items: start; }
.product-detail .product-visual { min-height: 460px; border: 1px solid var(--line); border-radius: 24px; }
.product-detail .product-badge-visual { width: 220px; font-size: 3.2rem; }
.product-detail h1 { font-size: clamp(2.4rem, 5vw, 4.5rem); }
.product-detail .lead { color: var(--muted); font-size: 1.1rem; }
.product-detail .price { font-size: 2rem; font-weight: 950; margin: 24px 0; }
.inline-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.qty-field { width: 105px; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 800; font-size: .92rem; }
.field small { color: var(--muted); }
input, textarea, select {
    width: 100%;
    border: 1px solid #d8d5d2;
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    padding: 11px 13px;
    outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(254,95,2,.10); }
textarea { min-height: 120px; resize: vertical; }
.checkbox { display: flex; align-items: flex-start; gap: 9px; }
.checkbox input { width: auto; margin-top: 5px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.error-list { margin: 0 0 20px; padding: 14px 16px 14px 38px; border: 1px solid #ffd1d1; background: var(--danger-bg); color: var(--danger); border-radius: 12px; }

.flash-stack { padding-top: 14px; }
.flash { padding: 13px 16px; border-radius: 11px; border: 1px solid var(--line); font-weight: 700; margin-bottom: 10px; }
.flash.success { color: var(--success); background: var(--success-bg); border-color: #bfe8d2; }
.flash.warning { color: var(--warning); background: var(--warning-bg); border-color: #f0dba4; }
.flash.danger, .flash.error { color: var(--danger); background: var(--danger-bg); border-color: #ffd1d1; }
.flash.info { color: var(--info); background: var(--info-bg); border-color: #cae5f8; }

.cart-list { display: grid; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 84px 1fr 110px 120px auto; gap: 18px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.cart-thumb { height: 72px; display: grid; place-items: center; border-radius: 12px; background: var(--orange-soft); font-weight: 950; }
.cart-item h3 { margin: 0 0 4px; font-size: 1rem; }
.cart-item p { margin: 0; color: var(--muted); font-size: .88rem; }
.cart-item .line-price { text-align: right; font-weight: 900; }
.icon-button { border: 0; background: transparent; color: var(--danger); font-weight: 800; padding: 8px; }
.order-summary { display: grid; gap: 10px; }
.order-summary-row { display: flex; justify-content: space-between; gap: 20px; }
.order-summary-row.total { font-size: 1.25rem; font-weight: 950; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }

.auth-wrap { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 56px 18px; background: var(--orange-pale); }
.auth-card { width: min(100%, 520px); background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 34px; box-shadow: var(--shadow); }
.auth-card .brand img { width: 220px; margin-bottom: 26px; }
.auth-card h1 { font-size: 2.2rem; }
.auth-card .form-grid { grid-template-columns: 1fr; }
.auth-links { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; color: var(--muted); font-size: .92rem; }

.account-shell { display: grid; grid-template-columns: 245px 1fr; gap: 30px; align-items: start; }
.account-nav { border: 1px solid var(--line); border-radius: 16px; padding: 12px; position: sticky; top: 106px; }
.account-nav a { display: block; padding: 10px 12px; border-radius: 9px; font-weight: 750; }
.account-nav a:hover { background: var(--orange-soft); color: var(--orange-dark); }
.account-content h1 { font-size: 2.3rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 650px; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #faf9f8; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; border-radius: 999px; padding: 5px 9px; font-size: .78rem; font-weight: 850; }
.status.success { background: var(--success-bg); color: var(--success); }
.status.warning { background: var(--warning-bg); color: var(--warning); }
.status.danger { background: var(--danger-bg); color: var(--danger); }
.status.info { background: var(--info-bg); color: var(--info); }
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }

.order-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.meta-box { background: var(--surface-2); border-radius: 12px; padding: 14px; }
.meta-box small { display: block; color: var(--muted); margin-bottom: 3px; }
.upload-box { border: 2px dashed #efc2a7; background: var(--orange-pale); border-radius: 14px; padding: 20px; }
.file-list { display: grid; gap: 8px; margin-top: 16px; }
.file-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }

.legal { padding: 70px 0; }
.legal article { background: #fff; }
.legal h1 { font-size: 3rem; }
.legal h2 { font-size: 1.5rem; margin-top: 34px; }
.legal p, .legal li { color: var(--ink-2); }
.legal .notice { background: var(--warning-bg); border: 1px solid #f0dba4; color: var(--warning); padding: 14px 16px; border-radius: 12px; }

.site-footer { background: #0c1012; color: #fff; padding: 58px 0 22px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr .75fr .75fr; gap: 50px; }
.footer-logo { width: 250px; background: #fff; padding: 8px 10px; border-radius: 12px; margin-bottom: 18px; }
.footer-grid p { color: #aeb6bb; max-width: 420px; }
.footer-grid h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; color: #fff; }
.footer-grid a { display: block; color: #cbd1d4; margin: 7px 0; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 26px; margin-top: 34px; border-top: 1px solid #252b2e; color: #858e93; font-size: .85rem; }

.admin-body { background: #f5f5f4; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; background: var(--ink); color: #fff; padding: 22px 18px; display: flex; flex-direction: column; }
.admin-brand img { width: 190px; display: block; background: #fff; padding: 7px 9px; border-radius: 10px; margin-bottom: 10px; }
.admin-brand span { color: #8e989e; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.admin-sidebar nav { display: grid; gap: 5px; margin-top: 34px; }
.admin-sidebar nav a { padding: 10px 12px; border-radius: 9px; color: #c9cfd2; font-weight: 750; }
.admin-sidebar nav a:hover { background: #171c1f; color: #fff; }
.admin-user { margin-top: auto; border-top: 1px solid #252b2e; padding-top: 16px; display: grid; gap: 3px; }
.admin-user small { color: #9aa2a7; overflow: hidden; text-overflow: ellipsis; }
.admin-user a { color: #ff9d63; font-size: .9rem; margin-top: 8px; }
.admin-main { min-width: 0; }
.admin-topbar { min-height: 68px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 28px; position: sticky; top: 0; z-index: 20; }
.admin-content { padding: 28px; }
.admin-content > .flash-stack { padding-top: 0; }
.admin-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 24px; }
.admin-head h1 { margin: 0; font-size: 2rem; }
.admin-head p { margin: 5px 0 0; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { padding: 20px; }
.stat-card small { color: var(--muted); display: block; margin-bottom: 8px; }
.stat-card strong { font-size: 1.75rem; letter-spacing: -.04em; }
.admin-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
.admin-panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.admin-panel h2 { font-size: 1.35rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.install-page { min-height: 100vh; background: linear-gradient(145deg, #fff, var(--orange-pale)); padding: 50px 18px; }
.install-wrap { width: min(100%, 900px); margin: 0 auto; }
.install-logo { width: 280px; margin-bottom: 30px; }
.install-card { background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 34px; }
.install-card h1 { font-size: 2.4rem; }
.install-steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.install-steps span { background: var(--orange-soft); color: var(--orange-dark); border-radius: 999px; padding: 6px 10px; font-size: .8rem; font-weight: 850; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #f5f5f4; padding: 2px 6px; border-radius: 6px; }

@media (max-width: 1000px) {
    .hero-grid, .product-detail, .cta-panel { grid-template-columns: 1fr; }
    .hero-grid { gap: 34px; }
    .features-grid, .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .shop-layout, .account-shell { grid-template-columns: 1fr; }
    .sticky, .account-nav { position: static; }
    .account-nav { display: flex; flex-wrap: wrap; }
    .cta-panel .hero-actions { justify-content: flex-start; }
    .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .nav-toggle { display: inline-flex; }
    .main-nav { display: none; position: absolute; top: 78px; left: 18px; right: 18px; flex-direction: column; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 14px; }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 8px 10px; }
    .cart-link { text-align: center; }
    .steps { grid-template-columns: 1fr; }
    .order-meta { grid-template-columns: repeat(2, 1fr); }
    .admin-shell { display: block; }
    .admin-sidebar { position: fixed; left: -280px; z-index: 80; width: 260px; transition: left .2s ease; box-shadow: var(--shadow); }
    .admin-nav-open .admin-sidebar { left: 0; }
    .admin-menu-toggle { display: inline-flex; margin-right: 14px; }
}

@media (max-width: 640px) {
    .brand img { width: 190px; }
    .section { padding: 64px 0; }
    .hero-grid { min-height: auto; padding: 52px 0; }
    h1 { font-size: 3rem; }
    .features-grid, .product-grid, .stats-grid, .form-grid, .footer-grid { grid-template-columns: 1fr; }
    .section-head, .footer-bottom { align-items: flex-start; flex-direction: column; }
    .cart-item { grid-template-columns: 60px 1fr; }
    .cart-item > :nth-child(3), .cart-item > :nth-child(4), .cart-item > :nth-child(5) { grid-column: 2; }
    .cart-item .line-price { text-align: left; }
    .hero-card, .cta-panel, .panel, .auth-card, .install-card { padding: 24px; }
    .order-meta { grid-template-columns: 1fr; }
    .admin-content { padding: 18px; }
    .admin-head { align-items: flex-start; flex-direction: column; }
    .footer-bottom { display: flex; }
}

/* Checkout, integrations and admin settings */
.choice-grid { display: grid; gap: 12px; }
.choice-card { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.choice-card:hover { border-color: #ffc39f; box-shadow: 0 8px 24px rgba(9,12,14,.05); }
.choice-card:has(input:checked) { border-color: var(--orange); background: var(--orange-pale); box-shadow: 0 0 0 2px rgba(254,95,2,.08); }
.choice-card input { width: 18px; height: 18px; accent-color: var(--orange); }
.choice-card span { display: grid; gap: 3px; }
.choice-card span small { color: var(--muted); font-weight: 600; }
.choice-card b { white-space: nowrap; color: var(--ink); }

.settings-panel + .settings-panel { margin-top: 20px; }
.settings-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.settings-title h2 { margin-bottom: 5px; }
.settings-title p { margin: 0; }
.settings-divider { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.template-editor { padding: 18px 0; border-top: 1px solid var(--line); }
.template-editor:first-of-type { border-top: 0; padding-top: 0; }
.template-editor h3 { margin-bottom: 12px; }
.template-editor .field + .field { margin-top: 12px; }
.admin-savebar { position: sticky; bottom: 16px; z-index: 12; display: flex; justify-content: flex-end; margin-top: 20px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.compact-log { display: grid; gap: 12px; }
.compact-log > div { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.compact-log > div:last-child { border-bottom: 0; padding-bottom: 0; }
.compact-log small { grid-column: 2; color: var(--muted); overflow-wrap: anywhere; }
.inline-form { margin: 0; }
.admin-panel .actions { align-items: center; }

@media (max-width: 640px) {
    .choice-card { grid-template-columns: auto 1fr; }
    .choice-card > b { grid-column: 2; }
    .settings-title { flex-direction: column; }
    .admin-savebar { bottom: 8px; }
}

.textarea-tall { min-height: 260px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }

/* Admin setup overview */
.setup-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.setup-card { display: flex; flex-direction: column; gap: 7px; min-height: 122px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.setup-card:hover { border-color: rgba(254,95,2,.36); transform: translateY(-1px); box-shadow: 0 10px 28px rgba(20,20,20,.055); }
.setup-card .status { align-self: flex-start; }
.setup-card strong { margin-top: 3px; }
.setup-card small { color: var(--muted); line-height: 1.4; }
@media (max-width: 980px) { .setup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .setup-grid { grid-template-columns: 1fr; } }

/* Accessibility and legal compliance helpers */
.skip-link { position: fixed; left: 16px; top: 10px; z-index: 9999; transform: translateY(-160%); background: #fff; color: var(--ink); border: 2px solid var(--orange-dark); border-radius: 8px; padding: 10px 14px; font-weight: 800; box-shadow: var(--shadow); }
.skip-link:focus { transform: translateY(0); }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid #111; outline-offset: 3px; }
.btn-primary { background: var(--orange-dark); }
.btn-primary:hover { filter: brightness(.9); }
.btn:disabled, button:disabled { opacity: .58; cursor: not-allowed; }
.withdrawal-link { font-weight: 850; text-decoration: underline; text-underline-offset: 3px; }
.legal-template { border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 18px; }
.legal-action { margin: 28px 0; }
.legal-form { margin-top: 24px; }
.honeypot { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.compliance-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.compliance-check { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 5px; }
.compliance-check.ok { background: #f4fbf6; border-color: #b9dfc2; }
.compliance-check.warn { background: #fffaf0; border-color: #ead8aa; }
.compliance-check.bad { background: #fff5f4; border-color: #e8b3ae; }
.compliance-check small { color: var(--muted); }
.compliance-summary { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.admin-note { border-left: 4px solid var(--orange-dark); padding: 10px 14px; background: var(--orange-pale); border-radius: 0 10px 10px 0; }
@media (max-width: 720px) { .compliance-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; } }

/* v5: responsive layout, SEO/Analytics admin and consent */
:root { --container: 1280px; }
body { overflow-wrap: anywhere; }
main { min-height: 45vh; }
.footer-link-button { display:block; border:0; background:transparent; padding:0; margin:7px 0; color:#cbd1d4; font:inherit; cursor:pointer; text-align:left; }
.footer-link-button:hover { color:#fff; }
.seo-divider { border-top:1px solid var(--line); margin-top:10px; padding-top:22px; }
.check-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.check-grid > div { padding:12px 14px; border:1px solid var(--line); background:var(--surface-2); border-radius:10px; }
.range-tabs { display:flex; gap:6px; flex-wrap:wrap; }
.metric-row { display:grid; grid-template-columns:90px minmax(80px,1fr) 44px; align-items:center; gap:10px; margin:12px 0; }
.metric-row.simple { grid-template-columns:1fr auto; }
.metric-bar { height:8px; border-radius:999px; background:var(--surface-2); overflow:hidden; }
.metric-bar i { display:block; height:100%; background:var(--orange-dark); border-radius:inherit; }

.consent-backdrop { position:fixed; inset:0; z-index:9990; background:rgba(9,12,14,.48); backdrop-filter:blur(2px); }
.consent-panel { position:fixed; inset:0; z-index:9991; display:grid; place-items:end center; padding:24px; pointer-events:none; }
.consent-panel[hidden], .consent-backdrop[hidden] { display:none !important; }
.consent-card { position:relative; width:min(100%,820px); max-height:min(88vh,760px); overflow:auto; pointer-events:auto; background:#fff; color:var(--ink); border:1px solid var(--line); border-radius:22px; box-shadow:0 30px 80px rgba(0,0,0,.24); padding:28px; }
.consent-card h2 { font-size:clamp(1.6rem,4vw,2.3rem); margin-bottom:10px; }
.consent-card > p:not(.eyebrow) { color:var(--muted); }
.consent-close { position:absolute; right:18px; top:16px; border:0; background:var(--surface-2); border-radius:50%; width:40px; height:40px; font-size:1.5rem; line-height:1; }
.consent-options { display:grid; gap:10px; margin:20px 0; }
.consent-option { display:grid; grid-template-columns:1fr auto; gap:18px; align-items:center; border:1px solid var(--line); border-radius:14px; padding:15px 16px; background:#fff; }
.consent-option strong,.consent-option small { display:block; }
.consent-option small { color:var(--muted); margin-top:3px; }
.consent-option input { width:22px; height:22px; accent-color:var(--orange-dark); }
.consent-actions { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; }
.consent-links { margin:14px 0 0 !important; font-size:.9rem; }
.consent-links a { text-decoration:underline; text-underline-offset:2px; }
body.consent-open { overflow:hidden; }

/* better touch/mobile behavior */
@media (max-width: 820px) {
  .nav-wrap { min-height:72px; }
  .main-nav { max-height:calc(100vh - 94px); overflow:auto; }
  .main-nav a { min-height:44px; display:flex; align-items:center; }
  .admin-topbar { min-height:62px; padding:0 16px; }
  .admin-sidebar { overflow-y:auto; }
  .admin-sidebar nav a { min-height:44px; display:flex; align-items:center; }
  .admin-content { padding:20px; }
  .table-wrap { -webkit-overflow-scrolling:touch; }
  .consent-panel { place-items:end stretch; padding:12px; }
  .consent-card { width:100%; border-radius:18px; padding:22px; }
  .consent-actions { grid-template-columns:1fr; }
}
@media (max-width: 640px) {
  .container,.narrow { width:min(calc(100% - 28px),var(--container)); }
  .brand img { width:170px; }
  .nav-toggle,.admin-menu-toggle { min-height:44px; min-width:48px; }
  h1 { font-size:clamp(2.25rem,12vw,3.4rem); }
  .page-hero h1,.product-detail h1,.legal h1 { font-size:clamp(2rem,10vw,3rem); }
  .hero-grid { padding:42px 0; }
  .section { padding:54px 0; }
  .btn { min-height:44px; width:auto; }
  .form-actions .btn { flex:1 1 170px; }
  input,textarea,select { font-size:16px; min-height:44px; }
  .admin-content { padding:14px; }
  .admin-panel { padding:17px; border-radius:14px; }
  .stats-grid { grid-template-columns:1fr 1fr; gap:10px; }
  .stat-card strong { font-size:1.35rem; }
  .check-grid { grid-template-columns:1fr; }
  .metric-row { grid-template-columns:76px 1fr 36px; }
}
@media (max-width: 420px) {
  .stats-grid { grid-template-columns:1fr; }
  .brand img { width:150px; }
  .container,.narrow { width:min(calc(100% - 22px),var(--container)); }
}
.funnel-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:14px 0; }
.funnel-grid > div { border:1px solid var(--line); border-radius:12px; padding:16px; background:var(--surface-2); }
.funnel-grid small { display:block; color:var(--muted); }
.funnel-grid strong { display:block; font-size:1.6rem; margin-top:4px; }
@media (max-width:640px){.funnel-grid{grid-template-columns:1fr;}}

/* v5.1: centered consent dialog and wider legal/content pages */
.legal > .narrow {
  width: min(calc(100% - 36px), var(--container));
}
.legal > .narrow > article {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.consent-panel {
  place-items: center;
  padding: 24px;
}
.consent-card {
  width: min(calc(100vw - 48px), 820px);
  max-height: min(86vh, 760px);
  margin: auto;
}

@media (max-width: 820px) {
  .consent-panel { place-items: center; padding: 16px; }
  .consent-card {
    width: min(calc(100vw - 32px), 720px);
    max-height: calc(100vh - 32px);
    border-radius: 18px;
    padding: 22px;
  }
}

@media (max-width: 640px) {
  .legal > .narrow { width: min(calc(100% - 28px), var(--container)); }
  .consent-panel { padding: 12px; }
  .consent-card {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 20px;
  }
  .consent-close { right: 12px; top: 12px; }
}

/* v6 production workflow */
.production-board{display:grid;grid-template-columns:repeat(6,minmax(240px,1fr));gap:16px;overflow-x:auto;padding-bottom:14px;align-items:start}.production-column{background:#f6f7f8;border:1px solid #e3e6e8;border-radius:16px;padding:14px;min-height:260px}.production-column h2{font-size:1rem;margin:0 0 12px;display:flex;justify-content:space-between;gap:8px}.production-card{background:#fff;border:1px solid #e2e5e7;border-radius:12px;padding:14px;margin-bottom:10px;box-shadow:0 3px 12px rgba(0,0,0,.04)}.production-card>a{color:var(--ink);text-decoration:none}.production-card small{display:block;margin:5px 0 12px;color:#667078}.production-card form{display:grid;gap:8px}.production-card select{width:100%}.preflight-list{margin:8px 0 0;padding-left:18px;font-size:.83rem;color:#667078}.preflight-list li{margin:3px 0}.proof-panel{border-left:4px solid var(--orange)}
@media(max-width:900px){.production-board{grid-template-columns:repeat(6,82vw)}.file-row{align-items:flex-start}.file-row .actions{flex-wrap:wrap}.admin-grid{grid-template-columns:1fr}}
