:root {
    --ink: #221d35;
    --muted: #625d72;
    --navy: #171426;
    --purple: #513783;
    --purple-dark: #3a245f;
    --lavender: #eee7f7;
    --gold: #dcc6a1;
    --paper: #fbf8f2;
    --white: #fff;
    --line: #e5dfea;
    --wash: #f6f3f9;
    --radius: 16px;
    --serif: "Palatino Linotype", Palatino, Georgia, serif;
    --sans: "Segoe UI", system-ui, sans-serif;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--purple-dark); text-underline-offset: 3px; }
a:hover { color: var(--purple); }
a:focus-visible, :is(button,input,select,textarea):focus-visible { outline: 3px solid #9872cd; outline-offset: 3px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.12; }
img { display: block; max-inline-size: 100%; }
small { color: var(--muted); }
.block { display: block; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 20; inset: 10px auto auto 10px; padding: 10px 14px; background: white; }
.button {
    display: inline-flex; gap: .65rem; align-items: center; justify-content: center;
    width: fit-content; min-height: 43px; border: 1px solid transparent; border-radius: 8px;
    padding: .65rem 1rem; background: var(--purple-dark); color: white;
    font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--purple); color: white; }
.button.secondary { color: var(--purple-dark); background: white; border-color: var(--line); }
.button.secondary:hover { background: var(--lavender); }
.button.danger { color: #8b253e; background: #fff1f3; border-color: #f0cbd5; }
.button.danger:hover { background: #f9dce4; }
.button.small { min-height: 34px; font-size: .84rem; padding: .35rem .65rem; }
.button:disabled { cursor: wait; opacity: .7; }
.button:disabled::after { content: ''; width: .9rem; height: .9rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rotate .7s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }
.wordmark { display: inline-flex; align-items: center; gap: .72rem; text-decoration: none; color: inherit; font-size: .93rem; font-weight: 775; letter-spacing: .2em; }
.emblem { position: relative; flex: 0 0 25px; width: 25px; height: 25px; border-radius: 100%; border: 1px solid currentColor; color: #8d6655; }
.emblem::before, .emblem::after { position: absolute; content: ''; background: currentColor; inset: 50% 16% auto; height: 1px; transform: rotate(45deg); }
.emblem::after { transform: rotate(-45deg); }
.site-wrap { width: min(1200px, calc(100% - 112px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid #ece2da; }
.site-nav { display: flex; justify-content: space-between; align-items: center; gap: 2rem; min-height: 79px; }
.site-nav nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.7rem); }
.site-nav nav a { color: var(--ink); text-decoration: none; font-size: .91rem; }
.site-nav nav a:hover { color: var(--purple); text-decoration: underline; }
.nav-toggle { display: none; border: 1px solid var(--line); background: white; border-radius: 6px; color: var(--ink); cursor: pointer; padding: .52rem .82rem; font: inherit; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 6vw, 100px); min-height: 630px; align-items: center; padding-block: clamp(35px, 5vw, 74px); }
.hero-copy { padding-block: 30px; min-width: 0; }
.eyebrow { color: #704f68; font-size: .73rem; letter-spacing: .17em; font-weight: 750; text-transform: uppercase; }
.hero h1, .article h1 { font: normal clamp(3rem, 6.8vw, 6.6rem)/.99 var(--serif); letter-spacing: -.057em; overflow-wrap: anywhere; }
.hero h1 { margin: 1.22rem 0 1.35rem; }
.hero-summary { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.22rem); max-width: 36ch; margin-bottom: 1.8rem; }
.hero .button { border-radius: 99px; padding-inline: 1.3rem; }
.hero-visual { overflow: hidden; aspect-ratio: 10 / 11; margin: 0; border-radius: 47% 47% 6px 6px / 35% 35% 6px 6px; background: #aa97ac; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.site-section { background: #eee8f3; padding-block: clamp(48px, 8vw, 105px); }
.site-section h2 { margin: .75rem 0; font: normal clamp(2.4rem, 5vw, 4.6rem)/1.04 var(--serif); letter-spacing: -.05em; }
.section-intro { max-width: 58ch; color: var(--muted); }
.offer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2.3rem; gap: 1rem; }
.offer { padding: 1.6rem; border: 1px solid #ded4e8; border-radius: 12px; background: #f9f5fb; display: grid; gap: .8rem; }
.offer h3 { font: normal 1.7rem/1.1 var(--serif); }
.offer p { color: var(--muted); }
.text-link { display: inline-flex; align-items: center; gap: .45rem; font-weight: 650; width: fit-content; }
.site-footer { padding-block: 36px; background: var(--navy); color: #f2e7f6; }
.site-footer .emblem { color: var(--gold); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.footer-inner a { color: inherit; }
.footer-inner span { font-size: .86rem; }
.article { padding-block: 65px 100px; max-width: 860px; }
.article h1 { margin-block: 1.3rem 2rem; font-size: clamp(2.8rem, 7vw, 5.6rem); }
.article-img { border-radius: 16px; margin-bottom: 1.5rem; max-height: 500px; object-fit: cover; }
.article-text { max-width: 65ch; font-size: 1.13rem; overflow-wrap: anywhere; }
.auth { min-height: 100svh; display: grid; place-items: center; padding: 1.25rem; background: radial-gradient(ellipse at 100% 0, #e5d7f1, transparent 65%), var(--wash); }
.panel { background: white; padding: clamp(16px, 2.5vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.panel h2 { font-size: 1.15rem; margin-bottom: 1.1rem; }
.panel p + p { margin-top: .6rem; }
.auth-card { width: min(100%, 440px); padding: clamp(25px, 5vw, 44px); }
.installer { width: min(100%, 730px); padding: clamp(20px, 4vw, 40px); }
.auth h1 { margin-block: 1.3rem .55rem; font: normal clamp(2.2rem, 5vw, 3rem)/1.05 var(--serif); letter-spacing: -.035em; }
.auth h1 + p { color: var(--muted); margin-bottom: 1.5rem; }
.auth form { margin-bottom: 1rem; }
.auth-card > a:last-child { font-size: .88rem; }
form :is(label,fieldset) + button, form > :is(button,fieldset) + fieldset { margin-top: 1rem; }
label { display: grid; gap: .32rem; color: var(--ink); font-weight: 620; font-size: .9rem; margin-bottom: .9rem; }
label small { font-weight: normal; }
input, select, textarea {
    min-width: 0; width: 100%; border: 1px solid #d8d0e3; border-radius: 7px; background: #fff; color: var(--ink);
    padding: .62rem .72rem; font: inherit; font-weight: 400;
}
input[type="file"] { padding: .45rem; }
textarea { resize: vertical; }
input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--purple); }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 .8rem; padding: .9rem; min-width: 0; }
legend { font-weight: 650; padding-inline: .35rem; }
.checkbox { display: flex; align-items: center; gap: .4rem; margin: 0 0 .5rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; margin-top: 1rem; }
.checks { list-style: none; margin: 1.3rem 0; padding: 0; display: grid; gap: .3rem; }
.checks li { display: flex; justify-content: space-between; gap: .8rem; padding: .45rem .7rem; background: var(--wash); border-radius: 6px; }
.checks .ok { color: #20714d; }
.checks .bad { color: #a13048; }
.notice { padding: .7rem .95rem; margin: 0 0 1rem; border: 1px solid; border-radius: 8px; overflow-wrap: anywhere; }
.notice.success { background: #eefaf2; border-color: #bdddc8; color: #1c603b; }
.notice.error { background: #fff1f3; border-color: #f0cbd5; color: #8b253e; }
.admin-site { background: var(--wash); }
.admin-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100svh; }
.sidebar { background: var(--navy); color: white; padding: 1.55rem .9rem; position: sticky; height: 100svh; top: 0; overflow-y: auto; }
.sidebar .wordmark { display: flex; padding: 0 .7rem 1.6rem; }
.sidebar .emblem { color: var(--gold); }
.sidebar nav { display: grid; gap: .18rem; }
.sidebar nav a, .sidebar-out { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; color: #e0d6ec; text-decoration: none; font-size: .86rem; border-radius: 6px; }
.sidebar nav a span { flex: 0 0 .5rem; width: .5rem; height: .5rem; border: 1px solid #aa91c7; border-radius: 3px; transform: rotate(45deg); }
.sidebar nav a:hover, .sidebar nav a[aria-current] { background: #3c2e54; color: white; }
.sidebar nav a[aria-current] span { background: #d9c1ef; }
.sidebar-out { margin-top: 1rem; border-top: 1px solid #3d334d; border-radius: 0; }
.admin-header { display: flex; justify-content: space-between; align-items: center; gap: .8rem; min-height: 73px; padding: .75rem clamp(14px, 3vw, 40px); background: white; border-bottom: 1px solid var(--line); }
.top-label { font-size: .88rem; font-weight: 670; color: var(--muted); }
.account { display: flex; gap: .7rem; align-items: center; font-size: .85rem; }
.account small { font-size: .72rem; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--lavender); color: var(--purple-dark); font-weight: 750; }
.avatar.large { width: 72px; height: 72px; margin-bottom: .5rem; }
.admin-main { width: min(100%, 1440px); margin-inline: auto; padding: clamp(16px, 3vw, 40px); display: grid; gap: 1rem; }
.admin-main > h1 { font-size: clamp(1.65rem, 3.4vw, 2.35rem); letter-spacing: -.046em; margin: .25rem 0 .55rem; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.metric { border-top: 3px solid #ac8cc8; }
.metric span { display: block; color: var(--muted); font-size: .9rem; }
.metric strong { color: var(--purple-dark); display: block; margin-top: .35rem; font: 650 clamp(2rem, 5vw, 3rem)/1 var(--serif); }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.details { margin: 0; display: grid; gap: .35rem; }
.details div { display: flex; justify-content: space-between; gap: .8rem; border-bottom: 1px solid var(--line); padding: .45rem 0; }
.details dd { text-align: right; margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.details dt { color: var(--muted); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.panel-heading h2 { margin: 0; }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .86rem; }
th, td { border-bottom: 1px solid var(--line); padding: .65rem .72rem; }
th { color: var(--muted); background: var(--wash); font-weight: 700; white-space: nowrap; }
td a { white-space: nowrap; }
.pill { display: inline-block; padding: .14rem .5rem; background: #f1edf4; border-radius: 99px; }
.pill.active { background: #eaf8ee; color: #216341; }
.filters { display: grid; grid-template-columns: 2fr repeat(3, 1fr) auto; align-items: end; gap: .65rem; margin-bottom: 1.2rem; }
.filters label { margin: 0; }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: .8rem; padding-top: .9rem; font-size: .85rem; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: .7rem; }
.thumb { width: 56px; height: 50px; border-radius: 7px; object-fit: cover; }
.media-preview { max-width: 300px; max-height: 240px; border-radius: 8px; }
.inline-form { display: inline-block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
dialog { border: 1px solid var(--line); border-radius: 14px; color: var(--ink); width: min(420px, calc(100% - 32px)); padding: 1.35rem; }
dialog h2 { font-size: 1.25rem; margin-bottom: .7rem; }
dialog::backdrop { background: #211a35a6; }
@media (max-width: 960px) {
    .site-wrap { width: calc(100% - 58px); }
    .hero { gap: 2rem; min-height: auto; }
    .admin-shell { grid-template-columns: 205px minmax(0, 1fr); }
    .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .site-wrap { width: calc(100% - 36px); }
    .site-nav { flex-wrap: wrap; min-height: 62px; gap: 0; padding-block: .6rem; }
    .nav-toggle { display: inline-flex; }
    .site-nav nav { display: none; width: 100%; flex-wrap: wrap; gap: .8rem; padding: .75rem 0 .3rem; }
    .site-nav nav.is-open { display: flex; }
    .hero { grid-template-columns: 1fr; gap: 1rem; }
    .hero-copy { padding-block: 10px; }
    .hero-visual { aspect-ratio: 4 / 4.1; }
    .offer-grid, .dashboard-grid { grid-template-columns: 1fr; }
    .admin-shell { display: block; }
    .sidebar { display: none; position: fixed; top: 65px; left: 0; bottom: 0; z-index: 3; width: min(258px, 85vw); height: auto; box-shadow: 8px 0 22px #211a354d; }
    .sidebar.is-open { display: block; }
    .admin-header { min-height: 65px; }
    .top-label { display: none; }
    .metric-grid { gap: .5rem; }
    .metric { padding: .65rem; }
    .metric span { font-size: .75rem; }
    .form-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; scroll-behavior: auto !important; }
}
