/* Dana Smythe admin. Brand-tinted neutrals, olive as the one action colour, 4/8 spacing, no italics. */
:root {
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --bg: #F7F4EE; --surface: #FFFEFC; --surface-2: #FBF9F4; --sunken: #F1EDE4;
  --border: #E6DFD2; --border-strong: #D2C9B8; --border-control: #8E8776;
  --text: #23241F; --text-2: #55524A; --text-3: #6E6A5F; --text-inv: #FBF8F1;
  --primary: #3B4031; --primary-hover: #2E3227; --primary-active: #23261D; --primary-subtle: #ECEEE4; --primary-text: #3B4031;
  --sage: #8C9677; --gold: #B08F5C;
  --ok-text: #2B6A45; --ok-bg: #E8F2EA; --warn-text: #8A5208; --warn-bg: #FAEFDB; --err: #B3351F; --err-text: #9F2C18; --err-bg: #FBEBE7; --info-text: #2A587C; --info-bg: #E7F0F6;
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px;
  --sh-xs: 0 1px 2px rgb(46 42 30 / .06);
  --sh-md: 0 6px 16px -4px rgb(46 42 30 / .12), 0 2px 4px -2px rgb(46 42 30 / .06);
  --sh-xl: 0 24px 48px -12px rgb(46 42 30 / .24), 0 8px 16px -8px rgb(46 42 30 / .1);
  --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in: cubic-bezier(.4, 0, 1, 1);
  --side: 248px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
em, i, cite { font-style: normal; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--primary); color: var(--text-inv); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.row { display: flex; align-items: center; gap: 8px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 16px; }
.grow { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 16px; height: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--r-md); background: none; font-size: 14px; font-weight: 600; line-height: 20px; white-space: nowrap; text-decoration: none; transition: background-color .12s var(--ease-out), border-color .12s var(--ease-out), color .12s var(--ease-out), transform .08s; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: var(--text-inv); }
.btn--primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn--primary:active:not(:disabled) { background: var(--primary-active); }
.btn--secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn--secondary:hover:not(:disabled) { background: var(--sunken); border-color: var(--border-control); }
.btn--ghost { color: var(--text-2); }
.btn--ghost:hover:not(:disabled) { background: var(--sunken); color: var(--text); }
.btn--danger { background: var(--err); color: #fff; }
.btn--danger:hover:not(:disabled) { background: var(--err-text); }
.btn--danger-ghost { color: var(--err-text); }
.btn--danger-ghost:hover:not(:disabled) { background: var(--err-bg); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn--lg { height: 48px; padding: 0 20px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--icon { width: 40px; padding: 0; }
.btn--icon.btn--sm { width: 32px; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--text-inv); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn--secondary.is-loading::after, .btn--ghost.is-loading::after { border-color: var(--text-2); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--primary-text); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; background: none; border: 0; padding: 0; }
.link:hover { text-decoration-thickness: 2px; }

/* Fields */
.field { display: grid; gap: 8px; }
.field > label, .label { font-size: 14px; font-weight: 600; color: var(--text); }
.field .opt { font-weight: 400; color: var(--text-3); }
.help { font-size: 13px; color: var(--text-3); }
.error { font-size: 13px; color: var(--err-text); display: flex; gap: 8px; align-items: flex-start; }
.input, .select, .textarea { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border-control); border-radius: var(--r-md); background: var(--surface); font-size: 14px; color: var(--text); transition: border-color .12s, box-shadow .12s; }
.textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2355524A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-2); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgb(59 64 49 / .18); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--err); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgb(179 53 31 / .18); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--sunken); color: var(--text-3); cursor: not-allowed; }
.input-wrap { position: relative; }
.input-wrap .icon { position: absolute; left: 12px; top: 10px; color: var(--text-3); pointer-events: none; }
.input-wrap .input { padding-left: 40px; }
.input-wrap .reveal { position: absolute; right: 4px; top: 4px; }
.counter { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.counter.is-over { color: var(--warn-text); font-weight: 600; }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 0; }
.card__title { font-size: 16px; font-weight: 600; line-height: 24px; }
.card__body { padding: 20px 24px 24px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 16px; white-space: nowrap; background: var(--sunken); color: var(--text-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--plain::before { display: none; }
.badge--new { background: var(--warn-bg); color: var(--warn-text); }
.badge--replied { background: var(--info-bg); color: var(--info-text); }
.badge--booked, .badge--published { background: var(--ok-bg); color: var(--ok-text); }
.badge--closed, .badge--draft { background: var(--sunken); color: var(--text-2); }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-md); font-size: 14px; background: var(--info-bg); color: var(--info-text); }
.banner--error { background: var(--err-bg); color: var(--err-text); }
.banner--warn { background: var(--warn-bg); color: var(--warn-text); }
.banner .icon { margin-top: 1px; }

/* App shell */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--primary); color: #E9E6DA; padding: 20px 12px 12px; overflow-y: auto; }
.side__brand { display: grid; gap: 2px; padding: 4px 12px 20px; text-decoration: none; }
.side__brand strong { font-family: var(--display); font-weight: 500; font-size: 24px; line-height: 28px; letter-spacing: .01em; color: #FBF8F1; }
.side__brand span { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #B9BCA6; }
.side__group { margin-top: 16px; }
.side__label { padding: 0 12px 8px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #A5A892; }
.side__link { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--r-md); color: #DAD8C9; font-size: 14px; font-weight: 500; text-decoration: none; transition: background-color .12s, color .12s; }
.side__link:hover { background: rgb(255 255 255 / .07); color: #FBF8F1; }
.side__link[aria-current="page"] { background: rgb(255 255 255 / .13); color: #FBF8F1; font-weight: 600; }
.side__link .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #E3C48E; color: #2E3227; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.side :focus-visible { outline-color: #FBF8F1; }
.side__foot { margin-top: auto; padding-top: 16px; display: grid; gap: 4px; }
.side__user { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-top: 1px solid rgb(255 255 255 / .12); margin-top: 8px; padding-top: 16px; }
.avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #E3C48E; color: #2E3227; font-size: 13px; font-weight: 700; }
.avatar--lg { width: 40px; height: 40px; font-size: 15px; }
.avatar--tint { background: var(--primary-subtle); color: var(--primary-text); }
.side__user b { display: block; font-size: 13px; font-weight: 600; color: #FBF8F1; }
.side__user small { display: block; font-size: 12px; color: #B9BCA6; }
.main { min-width: 0; }
.page { max-width: 1240px; margin: 0 auto; padding: 32px 32px 64px; }
.page--narrow { max-width: 760px; }
.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.page__title { font-family: var(--display); font-weight: 500; font-size: 36px; line-height: 40px; letter-spacing: -.005em; text-wrap: balance; }
.page__sub { margin-top: 4px; font-size: 15px; color: var(--text-2); max-width: 64ch; }
.topbar { display: none; }
.scrim { display: none; }

/* Dashboard */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 20px 24px; display: grid; gap: 4px; text-decoration: none; transition: border-color .12s, box-shadow .12s; }
a.kpi:hover { border-color: var(--border-strong); box-shadow: var(--sh-xs); }
.kpi__label { font-size: 13px; font-weight: 500; color: var(--text-3); }
.kpi__value { font-size: 32px; font-weight: 600; line-height: 40px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi__meta { font-size: 13px; color: var(--text-3); display: flex; gap: 8px; align-items: center; min-height: 20px; }
.delta { font-weight: 600; font-variant-numeric: tabular-nums; }
.delta--up { color: var(--ok-text); } .delta--down { color: var(--err-text); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.grid-2--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg { display: inline-flex; padding: 4px; border-radius: var(--r-md); background: var(--sunken); gap: 2px; }
.seg button { height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: none; font-size: 13px; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 8px; transition: background-color .12s, color .12s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-xs); }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart__tip { position: absolute; top: 0; padding: 8px 12px; border-radius: var(--r-md); background: var(--text); color: var(--text-inv); font-size: 12px; line-height: 16px; white-space: nowrap; pointer-events: none; transform: translate(-50%, -100%); box-shadow: var(--sh-md); }
.chart__tip b { display: block; font-size: 13px; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 4px; border-radius: 2px; background: var(--primary); }
.bars { display: grid; gap: 16px; }
.bars__row { display: grid; gap: 8px; }
.bars__top { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.bars__top b { font-weight: 600; font-variant-numeric: tabular-nums; }
.bars__track { height: 8px; border-radius: 4px; background: var(--sunken); overflow: hidden; }
.bars__fill { height: 100%; border-radius: 4px; background: var(--primary); transform-origin: left; animation: grow .5s var(--ease-out) both; }
.bars__row:nth-child(2) .bars__fill { background: var(--sage); }
.bars__row:nth-child(3) .bars__fill { background: var(--gold); }
.bars__row:nth-child(n+4) .bars__fill { background: var(--border-control); }
@keyframes grow { from { transform: scaleX(0); } }
.list { display: grid; }
.list__row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; border-top: 1px solid var(--border); text-decoration: none; }
.list__row:first-child { border-top: 0; }
a.list__row:hover b { text-decoration: underline; text-underline-offset: 3px; }
.list__row b { font-weight: 600; display: block; }
.list__row small { font-size: 13px; color: var(--text-3); display: block; }
.time { font-size: 13px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Tables */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input-wrap { width: 320px; max-width: 100%; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { height: 40px; padding: 0 16px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.table th:first-child { border-top-left-radius: var(--r-lg); } .table th:last-child { border-top-right-radius: var(--r-lg); }
.table td { height: 56px; padding: 8px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .12s; }
.table tbody tr.is-click { cursor: pointer; }
.table tbody tr.is-click:hover { background: var(--surface-2); }
.table tbody tr:focus-visible { outline-offset: -2px; }
.table .cell-main b { display: block; font-weight: 600; }
.table .cell-main small { display: block; font-size: 13px; color: var(--text-3); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.is-unread .cell-main b::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--gold); vertical-align: 1px; }

/* States */
.empty { display: grid; justify-items: center; gap: 8px; padding: 56px 24px; text-align: center; }
.empty__icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-subtle); color: var(--primary-text); margin-bottom: 8px; }
.empty h3 { font-size: 16px; font-weight: 600; }
.empty p { max-width: 44ch; color: var(--text-2); }
.empty .btn { margin-top: 12px; }
.skel { border-radius: var(--r-sm); background: linear-gradient(90deg, var(--sunken) 25%, #F7F3EA 37%, var(--sunken) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }

/* Overlays */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgb(35 36 31 / .48); animation: fade .2s var(--ease-out); }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(100%, 480px); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-xl); animation: pop .25s var(--ease-out); }
.modal--wide { width: min(100%, 880px); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 0; }
.modal__title { font-size: 20px; font-weight: 600; line-height: 28px; }
.modal__body { padding: 16px 24px 24px; overflow-y: auto; display: grid; gap: 16px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--border); }
.panel { position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: min(100%, 480px); display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--sh-xl); animation: slide .28s var(--ease-out); }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.panel__body { flex: 1; overflow-y: auto; padding: 24px; display: grid; gap: 24px; align-content: start; }
.panel__foot { display: flex; justify-content: space-between; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--border); }
.facts { display: grid; gap: 12px; }
.facts div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; font-size: 14px; }
.facts dt { color: var(--text-3); }
.facts dd { min-width: 0; overflow-wrap: anywhere; }
.quote { padding: 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; }
.toasts { position: fixed; z-index: 80; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-md); background: var(--text); color: var(--text-inv); font-size: 14px; font-weight: 500; box-shadow: var(--sh-xl); animation: pop .25s var(--ease-out); pointer-events: auto; max-width: min(92vw, 480px); }
.toast--error { background: var(--err-text); }
.menu { position: absolute; z-index: 30; min-width: 200px; padding: 4px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--sh-md); animation: pop .15s var(--ease-out); }
.menu button, .menu a { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: none; font-size: 14px; text-align: left; text-decoration: none; color: var(--text); }
.menu button:hover, .menu a:hover { background: var(--sunken); }
.menu .is-danger { color: var(--err-text); }

/* Sign in */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--surface); }
.auth__art { position: relative; background: var(--primary) url(/img/lock-studio-1290.webp) center / cover; }
.auth__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(46 50 39 / .25), rgb(46 50 39 / .82)); }
.auth__art div { position: absolute; z-index: 1; left: 48px; right: 48px; bottom: 48px; color: #FBF8F1; }
.auth__art strong { display: block; font-family: var(--display); font-weight: 500; font-size: 48px; line-height: 52px; letter-spacing: -.01em; }
.auth__art p { margin-top: 12px; font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #E3DFD0; }
.auth__form { display: grid; place-items: center; padding: 48px 24px; }
.auth__box { width: min(100%, 384px); display: grid; gap: 24px; }
.auth__box h1 { font-family: var(--display); font-weight: 500; font-size: 40px; line-height: 44px; }
.auth__box > p { color: var(--text-2); font-size: 15px; margin-top: -16px; }
.auth__box form { display: grid; gap: 16px; }

/* Pages + media grids */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.tile { display: grid; grid-template-rows: auto 1fr; overflow: hidden; text-decoration: none; transition: border-color .12s, box-shadow .15s, transform .15s var(--ease-out); }
.tile:hover { border-color: var(--border-strong); box-shadow: var(--sh-md); transform: translateY(-2px); }
.tile__img { aspect-ratio: 16 / 10; background: var(--sunken); overflow: hidden; }
.tile__img img { width: 100%; height: 100%; object-fit: cover; }
.tile__body { padding: 16px 20px 20px; display: grid; gap: 4px; align-content: start; }
.tile__body b { font-size: 16px; font-weight: 600; }
.tile__body p { font-size: 13px; color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile__meta { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.media { position: relative; aspect-ratio: 1; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--sunken); padding: 0; transition: border-color .12s, box-shadow .12s; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media:hover { border-color: var(--border-control); }
.media[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(59 64 49 / .22); }
.media__check { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--text-inv); }
.drop { display: grid; justify-items: center; gap: 8px; padding: 32px 24px; border: 1.5px dashed var(--border-control); border-radius: var(--r-lg); background: var(--surface-2); text-align: center; color: var(--text-2); transition: background-color .12s, border-color .12s; }
.drop.is-over { background: var(--primary-subtle); border-color: var(--primary); }
.drop b { color: var(--text); }
.progress { height: 4px; border-radius: 2px; background: var(--sunken); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--primary); transition: width .2s; }

/* Visual editor */
.editor { position: fixed; inset: 0; z-index: 20; display: grid; grid-template-rows: 56px minmax(0, 1fr); grid-template-columns: minmax(0, 1fr) 344px; background: var(--sunken); }
.editor__bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 12px 0 8px; background: var(--surface); border-bottom: 1px solid var(--border); }
.editor__bar .select { width: auto; min-width: 200px; height: 36px; font-weight: 600; }
.editor__bar .spacer { flex: 1; }
.editor__canvas { position: relative; overflow: auto; display: grid; justify-items: center; padding: 16px; }
.editor__frame { width: 100%; height: 100%; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: #fff; box-shadow: var(--sh-md); transition: width .25s var(--ease-out); }
.editor__frame[data-device="tablet"] { width: 820px; } .editor__frame[data-device="phone"] { width: 390px; }
.editor__loading { position: absolute; inset: 16px; display: grid; place-items: center; background: var(--surface); border-radius: var(--r-md); color: var(--text-3); gap: 12px; align-content: center; }
.editor__side { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-left: 1px solid var(--border); }
.tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--border); }
.tabs button { position: relative; height: 48px; padding: 0 12px; border: 0; background: none; font-size: 14px; font-weight: 600; color: var(--text-3); }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--primary); }
.editor__pane { flex: 1; overflow-y: auto; padding: 20px; display: grid; gap: 20px; align-content: start; }
.editor__pane h3 { font-size: 15px; font-weight: 600; }
.hint { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; color: var(--text-2); }
.hint li { display: flex; gap: 12px; align-items: flex-start; }
.hint .icon { color: var(--primary-text); margin-top: 1px; }
.thumb { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--sunken); border: 1px solid var(--border); }
.thumb img { width: 100%; max-height: 240px; object-fit: contain; }
.focus { cursor: crosshair; }
.focus img { width: 100%; max-height: none; object-fit: cover; aspect-ratio: 4 / 3; }
.focus__dot { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border: 2px solid #fff; border-radius: 50%; background: rgb(59 64 49 / .7); box-shadow: 0 0 0 1px rgb(0 0 0 / .4); pointer-events: none; }
.img-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.img-list button { aspect-ratio: 1; padding: 0; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--sunken); position: relative; }
.img-list button:hover { border-color: var(--border-control); }
.img-list button[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 2px rgb(59 64 49 / .22); }
.img-list img { width: 100%; height: 100%; object-fit: cover; }
.img-list .dot { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); border: 2px solid #fff; }
.change { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); }
.change small { display: block; font-size: 12px; color: var(--text-3); }
.change b { display: block; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp { padding: 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: #fff; display: grid; gap: 4px; }
.serp small { font-size: 12px; color: #4D5156; }
.serp b { font: 400 18px/24px Arial, sans-serif; color: #1A0DAB; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp p { font: 400 13px/20px Arial, sans-serif; color: #4D5156; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rev { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--border); }
.rev:first-child { border-top: 0; padding-top: 0; }

/* Journal editor */
.post { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.post__title { width: 100%; border: 0; background: none; padding: 0; font-family: var(--display); font-weight: 500; font-size: 40px; line-height: 44px; color: var(--text); resize: none; overflow: hidden; }
.post__title:focus { outline: none; }
.post__title::placeholder { color: var(--text-3); }
.rt { border: 1px solid var(--border-control); border-radius: var(--r-lg); background: var(--surface); }
.rt:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(59 64 49 / .14); }
.rt__bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.rt__bar button { height: 32px; min-width: 32px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; font-size: 13px; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.rt__bar button:hover { background: var(--sunken); color: var(--text); }
.rt__bar button[aria-pressed="true"] { background: var(--primary-subtle); color: var(--primary-text); }
.rt__bar i { width: 1px; margin: 4px; background: var(--border); }
.rt__body { min-height: 420px; padding: 24px 32px 32px; font-size: 17px; line-height: 1.75; outline: none; }
.rt__body:empty::before { content: attr(data-placeholder); color: var(--text-3); }
.rt__body > * + * { margin-top: 20px; }
.rt__body h2 { font-family: var(--display); font-weight: 500; font-size: 32px; line-height: 36px; margin-top: 40px; }
.rt__body h3 { font-size: 19px; font-weight: 600; line-height: 28px; margin-top: 32px; }
.rt__body ul { list-style: disc; padding-left: 24px; } .rt__body ol { list-style: decimal; padding-left: 24px; }
.rt__body li + li { margin-top: 8px; }
.rt__body blockquote { margin-left: 0; padding-left: 20px; border-left: 2px solid var(--sage); font-family: var(--display); font-size: 26px; line-height: 32px; }
.rt__body a { color: var(--primary-text); text-decoration: underline; text-underline-offset: 3px; }
.rt__body figure { margin-inline: 0; }
.rt__body figure img { width: 100%; border-radius: var(--r-md); }
.rt__body figcaption { margin-top: 8px; font-size: 13px; color: var(--text-3); }
.rt__body hr { border: 0; border-top: 1px solid var(--border-strong); margin-block: 32px; }
.cover { position: relative; aspect-ratio: 16 / 10; border: 1.5px dashed var(--border-control); border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; width: 100%; padding: 0; color: var(--text-2); }
.cover.has-img { border-style: solid; border-color: var(--border); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover span { display: grid; justify-items: center; gap: 8px; font-size: 14px; font-weight: 600; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-2--even, .post { grid-template-columns: minmax(0, 1fr); }
  .editor { grid-template-columns: minmax(0, 1fr) 304px; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .seg { max-width: 100%; overflow-x: auto; }
  .seg button { flex: none; }
  .toolbar .input-wrap { width: 100%; }
  .page__head .row { flex-wrap: wrap; }
  .topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 12px; background: var(--primary); color: #FBF8F1; }
  .topbar strong { font-family: var(--display); font-weight: 500; font-size: 22px; }
  .topbar .btn { color: #FBF8F1; }
  .topbar .btn:hover { background: rgb(255 255 255 / .1); color: #FBF8F1; }
  .side { position: fixed; z-index: 45; left: 0; width: min(86vw, 304px); transform: translateX(-100%); transition: transform .28s var(--ease-out); }
  .shell.is-open .side { transform: none; }
  .shell.is-open .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgb(35 36 31 / .48); border: 0; }
  .page { padding: 24px 16px 56px; }
  .page__title { font-size: 32px; line-height: 36px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__art { display: none; }
  .input, .select, .textarea { font-size: 16px; height: 44px; }
  .btn:not(.btn--sm) { height: 44px; }
  .panel { width: 100%; }
  .editor { grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr) 44vh; }
  .editor__side { border-left: 0; border-top: 1px solid var(--border); }
  .editor__bar .hide-sm { display: none; }
  .rt__body { padding: 16px; }
  .modal__foot { flex-direction: column-reverse; } .modal__foot .btn { width: 100%; }
}
@media (max-width: 520px) { .kpis { grid-template-columns: minmax(0, 1fr); } .facts div { grid-template-columns: 1fr; gap: 2px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
