:root {
    --ink: #17202a;
    --muted: #65717d;
    --paper: #fffdf9;
    --canvas: #f5f2eb;
    --brand: #714b9b;
    --brand-dark: #51336f;
    --cyan: #28a9d4;
    --peach: #ff9d68;
    --line: #ded9cf;
    --shadow: 0 22px 60px rgba(41, 33, 24, .11);
}

html { font-size: 16px; min-height: 100%; }
body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    flex-direction: column;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
.site-main { flex: 1; }
.container { max-width: 1180px; }

.site-header {
    background: rgba(255, 253, 249, .94);
    border-bottom: 1px solid rgba(113, 75, 155, .12);
    position: relative;
    z-index: 10;
}
.site-header .navbar { min-height: 82px; }
.navbar-brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--ink); line-height: 1.05; }
.navbar-brand:hover { color: var(--ink); }
.brand-mark {
    width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
    background: white; box-shadow: 0 5px 18px rgba(40, 169, 212, .18);
}
.brand-mark img { width: 30px; height: 30px; }
.navbar-brand strong { display: block; font-size: 1.05rem; letter-spacing: -.02em; }
.navbar-brand small { display: block; margin-top: .18rem; color: var(--muted); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.navbar .nav-link { color: #3e4650; font-weight: 650; padding: .75rem 1rem !important; }
.navbar .nav-link:hover { color: var(--brand); }
.account-menu { display: flex; align-items: center; gap: .75rem; margin-left: .5rem; }
.account-name { max-width: 150px; color: var(--muted); font-size: .83rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn { border-radius: 10px; padding: .68rem 1.05rem; font-weight: 700; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-brand { color: white; background: var(--brand); border-color: var(--brand); box-shadow: 0 8px 20px rgba(113, 75, 155, .2); }
.btn-brand:hover, .btn-brand:focus { color: white; background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-outline-brand { color: var(--brand); background: transparent; border-color: rgba(113, 75, 155, .38); }
.btn-outline-brand:hover { color: white; background: var(--brand); border-color: var(--brand); }
.btn-link-brand { color: var(--brand); text-decoration: none; box-shadow: none; }
.btn-link-brand:hover { color: var(--brand-dark); }
.btn:focus-visible, .form-control:focus { box-shadow: 0 0 0 .25rem rgba(40, 169, 212, .2); }

.eyebrow { display: block; margin-bottom: .65rem; color: var(--brand); font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.landing-hero { overflow: hidden; background: var(--paper); }
.hero-grid { min-height: 650px; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 5rem; padding: 5rem 0; }
.hero-grid h1 { max-width: 720px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem, 6vw, 5.6rem); line-height: .98; letter-spacing: -.055em; }
.hero-copy { max-width: 640px; margin: 1.5rem 0 1.75rem; color: var(--muted); font-size: 1.18rem; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.hero-preview { min-height: 470px; position: relative; display: grid; place-items: center; }
.hero-preview::before {
    content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(40, 169, 212, .2), rgba(255, 157, 104, .2));
}
.preview-card { width: min(100%, 390px); padding: 2.2rem; background: #18222b; color: white; border-radius: 24px; box-shadow: 0 30px 70px rgba(24, 34, 43, .25); position: relative; z-index: 2; transform: rotate(2deg); }
.preview-card-back { position: absolute; height: 390px; z-index: 1; background: var(--peach); transform: rotate(-7deg) translate(-14px, 8px); }
.preview-card h2 { margin: 1.2rem 0 1.7rem; font-family: Georgia, serif; font-size: 2.2rem; }
.preview-chip { padding: .42rem .7rem; color: #17202a; background: #ffd29f; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.preview-special { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.15); }
.preview-special strong, .preview-special small { display: block; }
.preview-special small { margin-top: .3rem; color: #aeb9c2; font-size: .75rem; }
.preview-special > span { color: #74d5ef; font-size: 1.1rem; font-weight: 800; }
.feature-strip { background: #17202a; color: white; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.feature-grid > div { min-height: 190px; padding: 2.5rem; border-right: 1px solid rgba(255,255,255,.12); }
.feature-grid > div:last-child { border-right: 0; }
.feature-grid span { color: #74d5ef; font-size: .75rem; font-weight: 800; letter-spacing: .14em; }
.feature-grid strong { display: block; margin: .75rem 0 .45rem; font-family: Georgia, serif; font-size: 1.45rem; }
.feature-grid p { margin: 0; color: #adb8c0; line-height: 1.6; }

.public-page-shell { min-height: calc(100vh - 150px); padding: clamp(1rem, 4vw, 4rem); background: radial-gradient(circle at top left, rgba(40,169,212,.2), transparent 34%), radial-gradient(circle at bottom right, rgba(255,157,104,.22), transparent 34%), #ede9e2; }
.specials-card { max-width: 880px; margin: 0 auto; overflow: hidden; background: var(--paper); border: 1px solid rgba(36,40,44,.08); border-radius: 28px; box-shadow: var(--shadow); }
.specials-header { padding: clamp(2rem, 6vw, 4.5rem) clamp(1.5rem, 7vw, 5rem) 2rem; text-align: center; }
.specials-logo { display: block; max-width: min(100%, 260px); max-height: 150px; margin: 0 auto 1.75rem; object-fit: contain; }
.specials-header h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.4rem, 8vw, 4.8rem); line-height: 1; letter-spacing: -.045em; }
.title-accent { width: 70px; height: 5px; margin: 1.5rem auto 0; background: linear-gradient(90deg, var(--cyan), var(--peach)); border-radius: 99px; }
.specials-content { padding: 1.5rem clamp(1.5rem, 7vw, 5rem) 3.5rem; font-size: 1.05rem; line-height: 1.75; }
.specials-content h1, .specials-content h2, .specials-content h3 { margin-top: 1.7em; font-family: Georgia, serif; }
.specials-content img { max-width: 100%; height: auto; }
.social-panel { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem clamp(1.5rem, 7vw, 5rem); background: #f0ece4; border-top: 1px solid var(--line); }
.social-panel .eyebrow { margin-bottom: .2rem; }
.social-links { display: flex; gap: .75rem; }
.social-links a { width: 46px; height: 46px; display: grid; place-items: center; background: white; border-radius: 50%; box-shadow: 0 5px 14px rgba(0,0,0,.08); }
.social-links img { width: 25px; height: 25px; object-fit: contain; }

.page-section { padding-top: 4rem; padding-bottom: 5rem; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.page-heading.compact { align-items: start; }
.page-heading h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -.04em; }
.page-heading p { max-width: 650px; margin: .7rem 0 0; color: var(--muted); font-size: 1.05rem; }
.page-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.page-card, .surface-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 35px rgba(31,35,38,.06); }
.page-card { padding: 1.6rem; }
.page-card-top { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .76rem; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.status-dot { width: 8px; height: 8px; background: #2eaa68; border-radius: 50%; box-shadow: 0 0 0 4px rgba(46,170,104,.12); }
.page-card h2 { margin: 1.3rem 0 .25rem; font-family: Georgia, serif; font-size: 1.7rem; }
.page-card > p { min-height: 1.5rem; color: var(--muted); }
.page-card-primary-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.5rem 0; }
.page-card-links { display: flex; flex-wrap: wrap; gap: .75rem 1rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.page-card-links a { font-size: .88rem; font-weight: 700; text-decoration: none; }
.danger-link { color: #b33d3d !important; }
.empty-state { padding: 5rem 2rem; text-align: center; background: var(--paper); border: 1px dashed #cfc6b8; border-radius: 18px; }
.empty-icon { width: 52px; height: 52px; margin: 0 auto 1rem; display: grid; place-items: center; color: white; background: var(--brand); border-radius: 50%; font-size: 1.8rem; }
.empty-state h2 { font-family: Georgia, serif; }
.empty-state p { color: var(--muted); }

.form-page { max-width: 980px; }
.narrow-page { max-width: 720px; }
.surface-card { padding: clamp(1.4rem, 4vw, 2.4rem); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.full-width { grid-column: 1 / -1; }
.form-group { margin-bottom: 1.25rem; }
.control-label { margin-bottom: .45rem; font-weight: 750; }
.form-control { min-height: 48px; padding: .75rem .9rem; background: white; border-color: #cfc9be; border-radius: 9px; }
textarea.form-control { min-height: auto; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-top: 1.5rem; }
.form-note { display: block; min-height: 1.5rem; margin-top: .75rem; color: var(--muted); font-size: .86rem; }
.k-editor { border-color: #cfc9be !important; border-radius: 9px !important; overflow: hidden; }

.ai-grid { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(380px, 1.25fr); gap: 1.25rem; align-items: start; }
.step-label { color: var(--brand); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.draft-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.draft-badge { padding: .35rem .6rem; color: #875f25; background: #fff1cf; border-radius: 999px; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.draft-preview { min-height: 360px; max-height: 600px; overflow: auto; padding: 1.5rem; background: white; border: 1px solid var(--line); border-radius: 10px; line-height: 1.65; }
.danger-card { text-align: center; }
.danger-card h1 { margin-top: .2rem; font-family: Georgia, serif; font-size: 2.5rem; }
.danger-card p { max-width: 500px; margin: 1rem auto; color: var(--muted); }
.danger-card .form-actions { justify-content: center; }
.danger-icon { width: 54px; height: 54px; margin: 0 auto 1.25rem; display: grid; place-items: center; color: #9e2e2e; background: #fde4e4; border-radius: 50%; font-size: 1.5rem; font-weight: 900; }

.site-footer { padding: 1.6rem 0; color: #7a858e; background: #17202a; font-size: .85rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 1rem; }
.site-footer a { color: #d9c9ea; text-decoration: none; }

.qr-print-page { display: block; background: white; }
.print-banner { padding: 1rem; color: white; background: var(--brand); text-align: center; font-weight: 700; }
.qr-sheet { width: 8.5in; min-height: 11in; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; }
.qr-label { min-height: 5.5in; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .4in; text-align: center; border: 1px dashed #bbb; }
.qr-label img { width: 3.2in; max-width: 100%; }
.qr-label strong { margin-top: .18in; font-family: Georgia, serif; font-size: 20pt; }
.qr-label span { margin-top: .06in; color: #555; font-size: 10pt; }

@media (max-width: 767px) {
    .site-header .navbar { min-height: 70px; }
    .navbar-collapse { padding: 1rem 0; }
    .account-menu { align-items: flex-start; flex-direction: column; margin: .5rem 0 0; }
    .account-name { max-width: 100%; padding-left: 1rem; }
    .hero-grid { min-height: auto; grid-template-columns: 1fr; gap: 2rem; padding: 3.5rem 0; }
    .hero-grid h1 { font-size: clamp(2.8rem, 14vw, 4.4rem); }
    .hero-preview { min-height: 420px; }
    .hero-preview::before { width: 380px; height: 380px; }
    .feature-grid, .form-grid, .ai-grid { grid-template-columns: 1fr; }
    .feature-grid > div { min-height: auto; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
    .page-heading { align-items: start; flex-direction: column; }
    .page-section { padding-top: 2.5rem; padding-bottom: 3rem; }
    .social-panel { align-items: flex-start; flex-direction: column; }
    .site-footer .container { flex-direction: column; }
}

@media print {
    @page { size: letter; margin: 0; }
    .no-print, .no-print * { display: none !important; }
    .qr-sheet { margin: 0; }
}