:root {
  --bg: #eef2f7;
  --surface: #fff;
  --surface-muted: #f4f6f9;
  --glass: rgba(255,255,255,.1);
  --navy: #111a31;
  --navy-2: #050711;
  --purple: #7557ff;
  --purple-deep: #5c3fe0;
  --cyan: #65c9ee;
  --text: #121a29;
  --muted: #687586;
  --border: #dde3eb;
  --border-strong: #cbd5e1;
  --danger: #c04458;
  --success: #147559;
  --radius: 10px;
  --radius-small: 10px;
  --shadow: 0 22px 70px rgba(20,31,65,.1);
  --shadow-dark: 0 28px 90px rgba(0,0,0,.34);
}

* { box-sizing: border-box; }
html { min-height: 100%; color-scheme: light; background: var(--bg); }
body { min-height: 100vh; margin: 0; color: var(--text); background: var(--bg); font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
body::selection { color: #fff; background: var(--purple); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: -6rem; left: 1rem; z-index: 200; padding: .75rem 1rem; color: #fff; background: #050711; border-radius: 10px; }
.skip-link:focus { top: 1rem; }

/* Login: the same visual language as the public hero. */
.login-shell { position: relative; isolation: isolate; width: 100%; height: 100vh; min-height: 620px; display: grid; place-items: center; padding: clamp(28px,5vw,76px); overflow: hidden; color: #fff; background: #02030a; }
.login-shell::before { content: ""; position: absolute; inset: -28%; z-index: -3; background: radial-gradient(ellipse at 12% 17%, rgba(255,255,255,.96) 0 2%, rgba(139,181,255,.54) 8%, transparent 27%), radial-gradient(ellipse at 70% 18%, rgba(117,87,255,.9) 0 9%, rgba(55,31,132,.72) 25%, transparent 49%), radial-gradient(ellipse at 37% 83%, rgba(143,82,246,.84) 0 7%, rgba(57,29,126,.65) 28%, transparent 52%), radial-gradient(ellipse at 92% 76%, rgba(106,207,244,.58) 0 4%, rgba(47,72,148,.38) 22%, transparent 42%), #02030a; filter: saturate(1.1) contrast(1.08); }
.login-shell::after { display: none; }
.login-layout { position: relative; z-index: 1; width: min(1360px,100%); height: 100%; max-height: 820px; display: grid; grid-template-columns: minmax(0,1fr) minmax(480px,.82fr); align-items: center; gap: clamp(64px,10vw,170px); overflow: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.login-layout > * { min-width: 0; }
.login-context { position: relative; display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 0; overflow: visible; border: 0; }
.login-context::after { display: none; }
.login-brand { position: absolute; top: 0; left: 0; z-index: 1; display: block; width: 210px; aspect-ratio: 1495 / 346; padding: 0; overflow: hidden; border: 0; text-decoration: none; }
.login-brand picture { position: absolute; inset: 0; display: block; }
.login-brand img { position: absolute; display: block; width: 145.284%; max-width: none; height: auto; transform: translate(-16.252%,-31.768%); }
.login-context > div { position: relative; z-index: 1; max-width: 760px; }
.login-context h1 { max-width: 760px; margin: 0 0 26px; font-size: clamp(3rem,5.2vw,5.5rem); line-height: .91; letter-spacing: -.072em; }
.login-context h1 em, .login-card h2 em { font-family: Georgia,"Times New Roman",serif; font-weight: 400; font-style: italic; }
.login-context p:not(.eyebrow) { max-width: 580px; margin: 0; color: rgba(255,255,255,.62); font-size: clamp(.92rem,1.3vw,1.08rem); line-height: 1.7; }
.login-features { display: none; }
.login-card { align-self: center; justify-self: end; width: min(590px,100%); margin: 0; padding: 0; color: #fff; background: transparent; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.login-card h1, .login-card h2 { margin: 0 0 12px; color: #fff; font-size: clamp(2.5rem,4vw,4.2rem); line-height: .95; letter-spacing: -.06em; }
.login-card > p:not(.eyebrow):not(.form-error) { margin: 0 0 34px; color: rgba(255,255,255,.58); font-size: .96rem; }
.login-card label, .field { display: block; margin: 20px 0 8px; color: rgba(255,255,255,.58); font-size: .68rem; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.login-card small { display: block; margin-top: 18px; color: rgba(255,255,255,.4); font-size: .73rem; line-height: 1.5; }
.login-submit { position: relative; width: 100%; min-height: 58px; margin-top: 4px; padding: 0; overflow: hidden; isolation: isolate; }
.login-submit-label { display: block; margin-right: 28%; padding: 0 20px; transition: opacity .5s ease; }
.login-submit-action { position: absolute; z-index: 1; top: 4px; right: 4px; bottom: 4px; display: grid; width: 25%; place-items: center; overflow: hidden; color: #fff; background: rgba(255,255,255,.17); border: 1px solid rgba(255,255,255,.08); border-radius: 7px; font-style: normal; transition: width .5s cubic-bezier(.22,1,.36,1),transform .18s ease,background-color .18s ease; }
.login-submit-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s cubic-bezier(.22,1,.36,1); }
.login-submit:hover .login-submit-label, .login-submit:focus-visible .login-submit-label { opacity: 0; }
.login-submit:hover .login-submit-action, .login-submit:focus-visible .login-submit-action { width: calc(100% - 8px); background: rgba(255,255,255,.2); }
.login-submit:hover .login-submit-action svg, .login-submit:focus-visible .login-submit-action svg { transform: translateX(2px); }
.login-submit:active .login-submit-action { transform: scale(.98); }
.login-submit:disabled .login-submit-label { opacity: .72; }
.login-submit:disabled .login-submit-action { width: 25%; transform: none; }
@media (prefers-reduced-motion: reduce) { .login-submit-label, .login-submit-action, .login-submit-action svg { transition-duration: .01ms; } }
.eyebrow { margin: 0; color: var(--purple); font-size: .66rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.login-context .eyebrow { color: rgba(255,255,255,.5); }
.error-shell .login-card { justify-self: center; width: min(560px,100%); text-align: center; }
.login-card input { min-height: 58px; padding: .9rem 1.05rem; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.login-card input:hover { border-color: rgba(255,255,255,.38); }
.login-card input:focus { background: rgba(255,255,255,.15); border-color: rgba(171,151,255,.9); box-shadow: 0 0 0 4px rgba(117,87,255,.18); }
.password-field { position: relative; }
.password-field input { padding-right: 62px; }
.password-toggle { position: absolute; top: 50%; right: 8px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; color: rgba(255,255,255,.62); background: transparent; border: 0; border-radius: 50%; cursor: pointer; transform: translateY(-50%); transition: color .2s ease,background .2s ease; }
.password-toggle:hover { color: #fff; background: rgba(255,255,255,.1); }
.password-toggle:focus-visible { color: #fff; outline: 2px solid rgba(191,178,255,.9); outline-offset: -2px; }
.password-eye { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.password-eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .password-eye-open { display: none; }
.password-toggle[aria-pressed="true"] .password-eye-closed { display: block; }

@media (min-width: 801px) {
  .login-context, .login-card { height: min(540px,calc(100vh - 150px)); min-height: 470px; }
  .login-context > div { height: 100%; display: flex; flex-direction: column; padding-top: 54px; }
  .login-context > div > p:last-child { margin-top: auto; transform: translateY(-28px); }
  .login-card { display: flex; flex-direction: column; padding-top: 54px; transform: translateY(-28px); }
  .login-card label[for="login"] { margin-top: auto; }
  .login-submit { margin-top: auto; }
}

/* Fields and buttons. */
input, select, textarea { width: 100%; padding: .82rem .95rem; color: var(--text); background: rgba(255,255,255,.92); border: 1px solid var(--border-strong); border-radius: 10px; outline: 0; transition: background .2s ease,border-color .2s ease,box-shadow .2s ease; }
input:hover, select:hover, textarea:hover { border-color: #a9b6c7; }
input:focus, select:focus, textarea:focus { background: #fff; border-color: #8a72f3; box-shadow: 0 0 0 4px rgba(117,87,255,.11); }
textarea { min-height: 124px; resize: vertical; }
.button, .ghost { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .68rem 1rem; border-radius: 10px; font-weight: 650; cursor: pointer; text-decoration: none; transition: color .18s ease,background-color .18s ease,border-color .18s ease,box-shadow .18s ease; }
.button { color: #fff; background: #6352d6; border: 1px solid #5948c8; box-shadow: 0 1px 2px rgba(36,29,88,.18); }
.button:hover { color: #fff; background: #5746c5; border-color: #4f3fba; box-shadow: 0 3px 9px rgba(47,38,112,.18); }
.button:active { background: #4d3db5; border-color: #4637a8; box-shadow: inset 0 1px 2px rgba(26,20,70,.18); }
.button:disabled { opacity: .58; cursor: wait; box-shadow: none; }
.button.secondary { color: var(--text); background: #f1f3f8; border-color: var(--border); box-shadow: none; }
.button.secondary:hover { color: var(--purple-deep); background: #edeafd; border-color: #d7d0fa; }
.button.danger, .ghost.danger { color: #fff; background: #b83d54; border-color: #b83d54; box-shadow: none; }
.button.small, .ghost { min-height: 37px; padding: .48rem .72rem; border-radius: 10px; font-size: .8rem; }
.ghost { color: #566276; background: rgba(255,255,255,.82); border: 1px solid var(--border); box-shadow: none; }
.ghost:hover { color: var(--purple-deep); background: #f5f3ff; border-color: #cfc5fa; }
.form-error, .error-text { min-height: 1.45em; color: var(--danger); }

/* Application shell. */
.app { position: relative; isolation: isolate; min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0,1fr); background: #f4f6f9; transition: grid-template-columns .25s ease; }
.sidebar { position: sticky; top: 0; z-index: 20; isolation: isolate; height: 100vh; display: flex; flex-direction: column; padding: 12px; overflow: hidden; color: #fff; background: #02030a; border-right: 1px solid rgba(255,255,255,.1); }
.sidebar::before { content: ""; position: absolute; inset: -24%; z-index: 0; background: radial-gradient(ellipse at 18% 28%,rgba(255,255,255,.9) 0 3%,rgba(157,194,255,.62) 10%,transparent 30%),radial-gradient(ellipse at 72% 20%,rgba(116,80,255,.96) 0 9%,rgba(48,30,122,.72) 25%,transparent 48%),radial-gradient(ellipse at 48% 76%,rgba(139,92,246,.9) 0 8%,rgba(61,35,134,.68) 28%,transparent 50%),radial-gradient(ellipse at 92% 76%,rgba(244,244,255,.68) 0 4%,rgba(83,70,152,.44) 20%,transparent 40%),#02030a; filter: saturate(1.1) contrast(1.08); pointer-events: none; }
.sidebar::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg,rgba(0,0,0,.3),rgba(0,0,0,.56) 58%,rgba(0,0,0,.72)); pointer-events: none; }
.sidebar > * { position: relative; z-index: 1; }
.sidebar-brand { position: relative; display: block; width: 170px; min-height: 0; aspect-ratio: 1495 / 346; margin: 4px 0 23px 10px; padding: 0; overflow: hidden; color: #fff; text-decoration: none; white-space: nowrap; }
.sidebar-brand img { position: absolute; display: block; max-width: none; height: auto; }
.sidebar-brand-full { width: 145.284%; transform: translate(-16.252%,-31.768%); }
.sidebar-brand-mark { display: none !important; width: 200.962%; transform: translate(-26.555%,-30.781%); }
.sidebar-close { display: none; }
.site-context { z-index: 3; margin: 0 0 18px; }
.site-context-toggle { width: 100%; min-height: 58px; display: grid; grid-template-columns: 36px minmax(0,1fr) 14px; align-items: center; gap: 10px; padding: 9px 10px; color: #fff; background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; box-shadow: inset 0 1px rgba(255,255,255,.06); text-align: left; cursor: pointer; transition: background .18s ease,border-color .18s ease,transform .18s ease; }
.site-context-toggle:hover, .site-context-toggle.open { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.23); }
.site-context-toggle:active { transform: scale(.985); }
.site-context-avatar, .site-context-option-avatar { display: grid; place-items: center; overflow: hidden; color: #fff; background: linear-gradient(145deg,#7557ff,#4f88db); border: 1px solid rgba(255,255,255,.16); border-radius: 9px; font-size: .75rem; font-weight: 720; }
.site-context-avatar { width: 36px; height: 36px; }
.site-context-avatar img, .site-context-option-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.site-context-copy { min-width: 0; display: grid; gap: 4px; }
.site-context-copy strong, .site-context-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-context-copy strong { color: #fff; font-size: .73rem; font-weight: 660; line-height: 1.1; }
.site-context-copy small { color: rgba(255,255,255,.48); font-size: .59rem; line-height: 1.1; }
.site-context-chevron { width: 13px; height: 8px; fill: none; stroke: rgba(255,255,255,.58); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.site-context-toggle.open .site-context-chevron { transform: rotate(180deg); }
.site-context-popover { position: fixed; top: 62px; left: 246px; z-index: 90; width: min(390px,calc(100vw - 280px)); padding: 13px; color: #172033; background: rgba(255,255,255,.98); border: 1px solid #dfe4eb; border-radius: 15px; box-shadow: 0 24px 70px rgba(13,24,43,.2); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.sidebar.context-open { overflow: visible; }
.site-context-popover > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 2px 3px 11px; }
.site-context-popover > header strong { font-size: .82rem; font-weight: 690; }
.site-context-popover > header button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; color: #778294; background: #f3f5f8; border: 0; border-radius: 8px; font-size: 1.15rem; cursor: pointer; }
.site-context-search { min-height: 43px; display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 9px; margin-bottom: 10px; padding: 0 12px; background: #f5f7f9; border: 1px solid #e1e5eb; border-radius: 10px; }
.site-context-search:focus-within { background: #fff; border-color: #9b89f7; box-shadow: 0 0 0 3px rgba(117,87,255,.1); }
.site-context-search svg { width: 17px; height: 17px; fill: none; stroke: #8d98a7; stroke-width: 1.7; stroke-linecap: round; }
.site-context-search input { width: 100%; min-width: 0; height: 40px; padding: 0; appearance: none; -webkit-appearance: none; color: #263246; caret-color: #6352d6; background: transparent; border: 0; border-radius: 0; outline: 0; box-shadow: none; font-size: .72rem; }
.site-context-search input::-webkit-search-decoration,
.site-context-search input::-webkit-search-cancel-button,
.site-context-search input::-webkit-search-results-button,
.site-context-search input::-webkit-search-results-decoration { display: none; -webkit-appearance: none; appearance: none; }
.site-context-search input::-ms-clear,
.site-context-search input::-ms-reveal { display: none; width: 0; height: 0; }
.site-context-list { max-height: min(430px,calc(100dvh - 150px)); overflow-y: auto; padding-right: 3px; scrollbar-width: thin; scrollbar-color: #ccd3dc transparent; }
.site-context-group { display: grid; gap: 3px; padding: 5px 0; }
.site-context-group + .site-context-group { border-top: 1px solid #edf0f3; }
.site-context-group > p { margin: 4px 8px 6px; color: #929dac; font-size: .61rem; font-weight: 650; }
.site-context-option { width: 100%; min-height: 54px; display: grid; grid-template-columns: 34px minmax(0,1fr) 18px; align-items: center; gap: 10px; padding: 7px 9px; color: #263246; background: transparent; border: 0; border-radius: 10px; text-align: left; cursor: pointer; }
.site-context-option:hover { background: #f4f2ff; }
.site-context-option.selected { background: #efecff; }
.site-context-option-avatar { width: 34px; height: 34px; border-color: #e0e4ea; }
.site-context-option-copy { min-width: 0; display: grid; gap: 4px; }
.site-context-option-copy strong, .site-context-option-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-context-option-copy strong { font-size: .7rem; font-weight: 670; }
.site-context-option-copy small { color: #8a95a5; font-size: .58rem; }
.site-context-check { color: #6c50ef; font-size: .8rem; font-weight: 800; text-align: center; }
.sidebar nav { position: relative; flex: 1; display: flex; flex-direction: column; gap: 20px; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.sidebar nav::-webkit-scrollbar { display: none; }
.nav-group { display: grid; gap: 2px; }
.nav-heading { margin: 0 10px 4px; color: rgba(255,255,255,.38); font-size: .64rem; font-weight: 700; letter-spacing: .08em; line-height: 1.4; text-transform: uppercase; }
.sidebar nav a { display: grid; grid-template-columns: 16px minmax(0,1fr); align-items: center; column-gap: 10px; min-height: 36px; padding: 0 10px; color: rgba(255,255,255,.6); border: 0; border-radius: 10px; font-size: .8rem; font-weight: 520; letter-spacing: .01em; text-decoration: none; transition: color .16s ease,background .16s ease; }
.sidebar nav a svg, .sidebar > button[data-logout] svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sidebar nav a:hover { color: rgba(255,255,255,.92); background: rgba(255,255,255,.07); }
.sidebar nav a.active { color: #fff; background: rgba(255,255,255,.12); font-weight: 650; }
.sidebar nav a:focus-visible { color: #fff; outline: 2px solid rgba(207,196,255,.82); outline-offset: 1px; }
.sidebar-account { display: grid; grid-template-columns: 32px minmax(0,1fr); align-items: center; gap: 10px; margin-top: 12px; padding: 15px 8px 8px; border-top: 1px solid rgba(255,255,255,.14); }
.account-avatar { width: 32px; height: 32px; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); border-radius: 50%; font-size: .72rem; font-weight: 750; text-transform: uppercase; }
.account-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.account-copy strong, .account-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { color: #fff; font-size: .78rem; font-weight: 650; line-height: 1; }
.account-copy small { color: rgba(255,255,255,.48); font-size: .65rem; line-height: 1; }
.sidebar > button[data-logout] { display: grid; grid-template-columns: 16px minmax(0,1fr); align-items: center; column-gap: 10px; width: 100%; min-height: 36px; margin-top: 3px; padding: 0 10px; color: rgba(255,255,255,.55); background: transparent; border: 0; border-radius: 10px; box-shadow: none; font-size: .8rem; font-weight: 520; text-align: left; }
.sidebar > button[data-logout]:hover { color: #fff; background: rgba(255,255,255,.07); border-color: transparent; transform: none; }
.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 15; min-height: 56px; display: flex; align-items: center; gap: 16px; padding: 8px 18px; background: rgba(255,255,255,.9); border-bottom: 1px solid #e1e6ed; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.project-switcher { display: flex; align-items: center; gap: 10px; color: #8a94a5; font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.project-switcher select { width: min(360px,38vw); height: 38px; margin: 0; padding: 0 46px 0 12px; appearance: none; -webkit-appearance: none; color: #3f4a5c; background-color: #f7f8fa; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' stroke='%23657185' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px; border: 1px solid #e1e6ed; border-radius: 10px; font-size: .78rem; font-weight: 520; text-transform: none; cursor: pointer; }
.nav-toggle { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; color: #667085; background: transparent; border: 0; border-radius: 10px; cursor: pointer; }
.nav-toggle:hover { color: #18202f; background: rgba(15,23,42,.05); }
.nav-toggle svg, .sidebar-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.panel-open-icon { display: none; }
.main { width: min(100%,1600px); padding: clamp(24px,3.6vw,54px); }

@media (min-width: 1101px) {
  body.editor-route { height: 100dvh; min-height: 0; overflow: hidden; overscroll-behavior: none; }
  body.editor-route .app { height: 100dvh; min-height: 0; overflow: hidden; }
  .workspace { grid-column: 2; min-width: 0; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; height: 100dvh; }
  .sidebar-collapsed .sidebar { width: 64px; }
  .app.sidebar-collapsed { grid-template-columns: 64px minmax(0,1fr); }
  .sidebar-collapsed .sidebar { padding-inline: 10px; }
  .sidebar-collapsed .sidebar-brand { width: 38px; aspect-ratio: 624 / 538; margin: 7px auto 25px; padding: 0; }
  .sidebar-collapsed .sidebar-brand-full { display: none; }
  .sidebar-collapsed .sidebar-brand-mark { display: block !important; }
  .sidebar-collapsed .site-context-toggle { min-height: 44px; grid-template-columns: 32px; justify-content: center; padding: 5px; }
  .sidebar-collapsed .site-context-avatar { width: 32px; height: 32px; }
  .sidebar-collapsed .site-context-copy, .sidebar-collapsed .site-context-chevron { display: none; }
  .sidebar-collapsed .site-context-popover { left: 68px; }
  .sidebar-collapsed .nav-heading, .sidebar-collapsed .sidebar nav a span, .sidebar-collapsed .account-copy, .sidebar-collapsed .sidebar > button[data-logout] span { display: none; }
  .sidebar-collapsed .sidebar-account { grid-template-columns: 32px; justify-content: center; padding-inline: 0; }
  .sidebar-collapsed .sidebar nav { gap: 14px; }
  .sidebar-collapsed .sidebar nav a, .sidebar-collapsed .sidebar > button[data-logout] { grid-template-columns: 16px; justify-content: center; padding: 0; }
  .sidebar-collapsed .panel-close-icon { display: none; }
  .sidebar-collapsed .panel-open-icon { display: block; }
}

/* Content surfaces. */
.page-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.page-title h1 { margin: 0; color: var(--text); font-size: clamp(2.3rem,4.2vw,4.15rem); line-height: .96; letter-spacing: -.064em; }
.page-title h1::first-letter { font-family: Georgia,"Times New Roman",serif; font-style: italic; font-weight: 400; }
.page-title p { max-width: 720px; margin: .62rem 0 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 0 0 24px; }
.stat { position: relative; min-height: 146px; padding: 24px; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 38px rgba(24,37,73,.055); }
.stat::after { content: ""; position: absolute; right: -36px; bottom: -48px; width: 120px; height: 120px; background: radial-gradient(circle,rgba(117,87,255,.16),transparent 68%); }
.stat:nth-child(even)::after { background: radial-gradient(circle,rgba(101,185,238,.18),transparent 68%); }
.stat strong { display: block; color: var(--text); font-size: clamp(2.3rem,4vw,3.4rem); line-height: .9; letter-spacing: -.065em; }
.stat span { display: block; max-width: 160px; margin-top: 1rem; color: var(--muted); font-size: .8rem; }
.panel, .modal-card { background: rgba(255,255,255,.94); border: 1px solid var(--border); border-radius: 10px; }
.panel { margin: 0 0 22px; padding: clamp(20px,2.6vw,30px); overflow: hidden; box-shadow: 0 15px 50px rgba(24,37,73,.055); }
.panel h2 { margin: 0 0 20px; font-size: clamp(1.2rem,2vw,1.55rem); line-height: 1.1; letter-spacing: -.035em; }
.table-wrap { overflow: auto; margin: 0 -8px -8px; padding: 0 8px 8px; }
table { width: 100%; min-width: 780px; border-collapse: separate; border-spacing: 0; }
th, td { padding: .9rem .82rem; text-align: left; vertical-align: middle; border-bottom: 1px solid #e7ebf0; }
th { color: #778294; background: #f6f7fa; font-size: .65rem; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
th:first-child { border-radius: 10px 0 0 10px; }
th:last-child { border-radius: 0 10px 10px 0; }
tbody tr { height: 76px; transition: background .18s ease; }
tbody tr:hover { background: #f8f7ff; }
.actions { display: flex; flex-wrap: wrap; gap: .42rem; }
.badge { display: inline-block; padding: .3rem .55rem; color: #5f6879; background: #f0f2f5; border: 1px solid #e0e5eb; border-radius: 999px; font-size: .68rem; font-weight: 750; }
.badge.published, .badge.active, .badge.verified { color: #136248; background: #e8f6f0; border-color: #cdeadd; }
.badge.error, .badge.disabled { color: #9b3344; background: #fcedf0; border-color: #f0d2d8; }

/* Dashboard overview. */
.dashboard-page { width: 100%; max-width: 1480px; margin-top: -18px; }
.dashboard-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; margin-bottom: 34px; }
.dashboard-heading > p, .dashboard-section-head p { margin: 0 0 10px; color: #8a94a5; font-size: .64rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.dashboard-heading h1 { margin: 0; color: #141c2a; font-size: clamp(2.8rem,5vw,4.8rem); line-height: .92; letter-spacing: -.068em; }
.dashboard-heading h1 em { font-family: Georgia,"Times New Roman",serif; font-weight: 400; font-style: italic; }
.dashboard-heading > span { display: block; max-width: 620px; margin-top: 16px; color: #687586; font-size: .9rem; line-height: 1.6; }
.dashboard-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.dashboard-actions .ghost, .dashboard-actions .button { min-height: 42px; padding-inline: 14px; font-size: .78rem; letter-spacing: .005em; }
.dashboard-actions .button[data-action^="new-"]::before { content: "+"; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: -2px; font-size: 1.05rem; font-weight: 500; line-height: 1; }
.site-selection-prompt { display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 8px 14px 8px 9px; color: #354258; background: rgba(255,255,255,.7); border: 1px solid rgba(111,127,153,.18); border-radius: 10px; box-shadow: 0 10px 30px rgba(31,44,70,.06); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.site-selection-icon { display: grid; place-items: center; width: 34px; height: 34px; color: #526df0; background: rgba(82,109,240,.1); border: 1px solid rgba(82,109,240,.14); border-radius: 10px; }
.site-selection-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.site-selection-prompt > span:last-child { display: grid; gap: 2px; }
.site-selection-prompt strong { font-size: .76rem; font-weight: 720; line-height: 1.2; }
.site-selection-prompt small { color: #7b8799; font-size: .65rem; line-height: 1.2; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 24px; }
.metric-card { position: relative; min-height: 182px; display: flex; flex-direction: column; padding: 22px; overflow: hidden; color: #18202f; background: rgba(255,255,255,.94); border: 1px solid #dfe5ec; border-radius: 10px; box-shadow: 0 8px 26px rgba(24,37,73,.045); }
.metric-card-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #778294; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.metric-card-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.metric-card > strong { display: block; margin-top: auto; color: #151d2b; font-size: clamp(2.75rem,4vw,3.6rem); font-weight: 720; line-height: .9; letter-spacing: -.07em; }
.metric-card > strong small { color: #9aa3b2; font-size: .95rem; font-weight: 600; letter-spacing: -.02em; }
.metric-card > p { margin: 12px 0 0; color: #7a8596; font-size: .75rem; line-height: 1.45; }
.metric-primary { color: #fff; background: #111827; border-color: #111827; box-shadow: inset 0 3px #7557ff,0 12px 32px rgba(17,24,39,.12); }
.metric-primary .metric-card-top, .metric-primary > p { color: rgba(255,255,255,.58); }
.metric-primary > strong { color: #fff; }
.metric-progress { width: 100%; height: 4px; margin-top: 13px; overflow: hidden; appearance: none; background: #edf0f4; border: 0; border-radius: 99px; }
.metric-progress::-webkit-progress-bar { background: #edf0f4; border-radius: 99px; }
.metric-progress::-webkit-progress-value { background: #7557ff; border-radius: 99px; }
.metric-progress::-moz-progress-bar { background: #7557ff; border-radius: 99px; }
.metric-ready { box-shadow: inset 0 3px #42a77b,0 8px 26px rgba(24,37,73,.045); }
.metric-warning { box-shadow: inset 0 3px #5b8def,0 8px 26px rgba(24,37,73,.045); }
.dashboard-sites { overflow: hidden; background: rgba(255,255,255,.96); border: 1px solid #dfe5ec; border-radius: 10px; box-shadow: 0 10px 32px rgba(24,37,73,.045); }
.dashboard-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 24px 26px 20px; border-bottom: 1px solid #e7ebf0; }
.dashboard-section-head p { margin-bottom: 7px; }
.dashboard-section-head h2 { margin: 0; color: #18202f; font-size: 1.55rem; line-height: 1; letter-spacing: -.04em; }
.dashboard-section-head > span { color: #8a94a5; font-size: .72rem; }
.dashboard-section-head > span strong { color: #273142; font-size: 1rem; }
.dashboard-sites .table-wrap { margin: 0; padding: 0 14px 12px; }
.dashboard-sites th { background: transparent; border-radius: 0; }
.dashboard-sites tbody td { vertical-align: middle; }
.dashboard-sites th.status-column, .dashboard-sites td.status-cell { width: 142px; min-width: 142px; padding-inline: 14px; text-align: center !important; vertical-align: middle; }
.dashboard-sites .status-cell .badge { display: block; width: 100%; box-sizing: border-box; margin-inline: auto; padding-inline: 10px; text-align: center; white-space: nowrap; }
.dashboard-sites td.actions { width: 250px; min-width: 250px; display: table-cell; padding-block: 11px; vertical-align: middle; font-size: 0; }
.dashboard-sites .actions .ghost, .dashboard-sites .actions .button { width: 100%; height: 36px; min-height: 36px; padding: 0 10px; color: #566174; background: #f6f7f9; border: 1px solid #dfe4eb; border-radius: 10px; box-shadow: none; font-size: .72rem; font-weight: 650; }
.dashboard-sites td.actions > .ghost, .dashboard-sites td.actions > .button { display: inline-flex; align-items: center; justify-content: center; width: calc(50% - 6px); margin: 3px; vertical-align: middle; }
.dashboard-sites td.actions > :only-child { width: calc(100% - 6px); }
.dashboard-sites .actions .ghost:hover, .dashboard-sites .actions .button:hover { color: #273142; background: #eceff3; border-color: #cfd6df; box-shadow: none; transform: none; }
.dashboard-sites tbody tr:last-child td { border-bottom: 0; }
.domains-section td.actions .ghost:only-child { width: calc(100% - 6px); }
.pagination-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 22px; border-top: 1px solid #e7ebf0; }
.pagination-summary { margin: 0; color: #8792a3; font-size: .72rem; white-space: nowrap; }
.pagination-summary strong { color: #3d485a; font-weight: 720; }
.pagination-tools { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.pagination-size { display: flex; align-items: center; gap: 9px; color: #7d8899; font-size: .7rem; white-space: nowrap; }
.pagination-size select { width: 76px; min-height: 38px; margin: 0; padding: 0 38px 0 12px; appearance: none; -webkit-appearance: none; color: #3d485a; background-color: #f7f8fa; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' stroke='%23657185' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; background-size: 12px 8px; border-color: #dfe4eb; border-radius: 10px; font-size: .72rem; font-weight: 680; cursor: pointer; }
.pagination-size select:hover { background-color: #f1f3f6; border-color: #ccd3dd; }
.pagination-size select:focus { border-color: #9ca8b8; box-shadow: 0 0 0 3px rgba(101,113,133,.1); outline: none; }
.pagination-nav { display: flex; align-items: center; gap: 5px; }
.pagination-page, .pagination-arrow { width: 38px; height: 38px; min-height: 38px; display: grid; place-items: center; padding: 0; color: #657185; background: #fff; border: 1px solid #dfe4eb; border-radius: 10px; box-shadow: none; font-size: .72rem; font-weight: 700; cursor: pointer; transition: color .18s ease,background .18s ease,border-color .18s ease; }
.pagination-page:hover, .pagination-arrow:hover { color: #293446; background: #f2f4f7; border-color: #cdd4de; }
.pagination-page.active { color: #fff; background: #283245; border-color: #283245; }
.pagination-arrow:disabled { color: #b1b8c4; background: #f7f8fa; border-color: #e6e9ee; cursor: default; }
.pagination-ellipsis { width: 26px; color: #9aa4b3; font-size: .78rem; text-align: center; }
.history-feed { padding: 4px 26px 12px; }
.history-day { display: grid; grid-template-columns: 160px minmax(0,1fr); border-bottom: 1px solid #e7ebf0; }
.history-day:last-child { border-bottom: 0; }
.history-day > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 25px 24px 25px 0; border-right: 1px solid #e7ebf0; }
.history-day > header h3 { margin: 0; color: #3d485a; font-size: .72rem; font-weight: 720; line-height: 1.35; }
.history-day > header span { min-width: 24px; height: 24px; display: grid; place-items: center; color: #8c96a5; background: #f4f6f8; border-radius: 50%; font-size: .62rem; font-weight: 720; }
.history-day ol { margin: 0; padding: 0 0 0 24px; list-style: none; }
.history-entry { position: relative; min-height: 84px; display: grid; grid-template-columns: 54px 12px minmax(0,1fr) auto; align-items: center; gap: 15px; padding: 14px 0; border-bottom: 1px solid #edf0f3; }
.history-entry:last-child { border-bottom: 0; }
.history-entry time { color: #8c96a5; font-size: .66rem; font-variant-numeric: tabular-nums; }
.history-marker { position: relative; width: 8px; height: 8px; background: #7557ff; border: 3px solid #eeeafd; border-radius: 50%; box-sizing: content-box; }
.history-marker::before { content: ""; position: absolute; top: 14px; bottom: -47px; left: 3px; width: 1px; background: #e1dcfb; }
.history-entry:last-child .history-marker::before { display: none; }
.history-entry-copy { min-width: 0; display: grid; gap: 5px; }
.history-entry-copy > strong { overflow: hidden; color: #303b4d; font-size: .77rem; font-weight: 690; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.history-entry-copy > span { color: #8b95a4; font-size: .65rem; line-height: 1.35; }
.history-entry-copy code { margin-left: 5px; padding: 2px 5px; color: #737f91; background: #f4f6f8; border-radius: 4px; font: 600 .58rem/1.2 ui-monospace,SFMono-Regular,Menlo,monospace; }
.history-project { max-width: 220px; overflow: hidden; padding: 6px 9px; color: #667286; background: #f5f6f8; border: 1px solid #e4e8ed; border-radius: 10px; font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }
.history-empty { min-height: 260px; display: grid; place-content: center; gap: 6px; padding: 40px; text-align: center; }
.history-empty strong { color: #3b4658; font-size: .86rem; }
.history-empty span { color: #8a95a5; font-size: .7rem; }

@media (max-width: 1280px) {
  .dashboard-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .dashboard-header { align-items: stretch; flex-direction: column; gap: 24px; }
  .dashboard-actions { display: grid; grid-template-columns: 1fr; }
  .dashboard-actions > * { width: 100%; }
  .dashboard-metrics { grid-template-columns: 1fr; }
  .metric-card { min-height: 164px; }
  .dashboard-section-head { align-items: flex-start; padding: 20px; }
  .dashboard-sites .table-wrap { padding-inline: 8px; }
  .pagination-bar { align-items: stretch; flex-direction: column; gap: 14px; padding: 15px 14px; }
  .pagination-summary { text-align: center; }
  .pagination-tools { justify-content: space-between; gap: 10px; }
  .pagination-size { align-items: flex-start; flex-direction: column; gap: 5px; }
  .pagination-nav { max-width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .pagination-page, .pagination-arrow { width: 36px; height: 36px; min-height: 36px; flex: 0 0 auto; }
  .history-feed { padding: 0 18px 8px; }
  .history-day { grid-template-columns: 1fr; }
  .history-day > header { align-items: center; padding: 20px 0 10px; border-right: 0; }
  .history-day ol { padding-left: 0; }
  .history-entry { grid-template-columns: 44px 12px minmax(0,1fr); gap: 11px; }
  .history-project { max-width: none; grid-column: 3; justify-self: start; }
  .history-marker::before { bottom: -66px; }
}

.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.form-grid .wide { grid-column: 1/-1; }
.form-actions { display: flex; gap: .65rem; justify-content: flex-end; margin-top: 22px; }
.block-list { display: grid; gap: 12px; }
.block { padding: 18px; background: linear-gradient(135deg,#f5f4ff,#f8fbfd 72%); border: 1px solid #e0dff0; border-radius: 10px; }
.block-head { display: flex; align-items: center; gap: .55rem; margin-bottom: .9rem; }
.block-head strong { margin-right: auto; }
.block-grid { display: grid; grid-template-columns: 190px 1fr; gap: .8rem; }

/* Full-page article editor. */
.article-editor-page { width: 100%; max-width: 1480px; margin: -18px auto 0; }
.article-editor-toolbar { position: sticky; top: 68px; z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 72px; margin-bottom: 18px; padding: 12px 14px; background: rgba(255,255,255,.94); border: 1px solid #dfe5ec; border-radius: 10px; box-shadow: 0 12px 34px rgba(24,37,73,.08); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.article-editor-toolbar-copy { min-width: 0; display: flex; align-items: center; gap: 12px; }
.article-editor-toolbar-copy > div { min-width: 0; display: grid; gap: 3px; }
.article-editor-toolbar-copy span { color: #8893a4; font-size: .62rem; font-weight: 750; letter-spacing: .085em; text-transform: uppercase; }
.article-editor-toolbar-copy strong { max-width: min(46vw,640px); overflow: hidden; color: #1c2534; font-size: .9rem; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.editor-back { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; color: #4e5a6d; background: #f3f5f8; border: 1px solid #dfe4eb; border-radius: 10px; font-size: 1.15rem; cursor: pointer; transition: color .2s ease,background .2s ease,border-color .2s ease; }
.editor-back:hover { color: #202a3a; background: #e9edf2; border-color: #cfd6df; }
.article-editor-toolbar-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.article-editor-toolbar-actions .button, .article-editor-toolbar-actions .ghost { min-height: 42px; border-radius: 10px; }
.article-editor-form { position: relative; }
.editor-form-error:empty { display: none; }
.editor-form-error { position: sticky; top: 150px; z-index: 11; margin: 0 0 12px; padding: 12px 16px; color: #96384a; background: #fff0f3; border: 1px solid #efd0d7; border-radius: 10px; }
.article-editor-layout { display: grid; grid-template-columns: minmax(0,1fr) 350px; align-items: start; gap: 16px; }
.article-editor-main { min-width: 0; display: grid; gap: 16px; }
.article-editor-aside { position: sticky; top: 158px; display: grid; gap: 16px; }
@media (min-width: 1101px) {
  .split-scroll-layout { height: calc(100dvh - 198px); min-height: 420px; align-items: stretch; overflow: hidden; }
  .split-scroll-layout > .article-editor-main,
  .split-scroll-layout > .article-editor-aside {
    height: 100%; min-height: 0; padding-right: 7px; overflow-x: hidden; overflow-y: auto;
    overscroll-behavior-y: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #c8d0db transparent;
  }
  .split-scroll-layout > .article-editor-aside { position: static; top: auto; align-content: start; }
  .split-scroll-layout > .article-editor-main::-webkit-scrollbar,
  .split-scroll-layout > .article-editor-aside::-webkit-scrollbar { width: 7px; }
  .split-scroll-layout > .article-editor-main::-webkit-scrollbar-track,
  .split-scroll-layout > .article-editor-aside::-webkit-scrollbar-track { background: transparent; }
  .split-scroll-layout > .article-editor-main::-webkit-scrollbar-thumb,
  .split-scroll-layout > .article-editor-aside::-webkit-scrollbar-thumb { background: #c8d0db; border-radius: 99px; }
}
.editor-card { min-width: 0; padding: 25px; background: rgba(255,255,255,.96); border: 1px solid #dfe5ec; border-radius: 10px; box-shadow: 0 10px 32px rgba(24,37,73,.045); }
.editor-card-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid #e7ebf0; }
.editor-card-heading > div { min-width: 0; }
.editor-card-heading > div > span { display: block; margin-bottom: 7px; color: #8a94a5; font-size: .62rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.editor-card-heading h2 { margin: 0; color: #18202f; font-size: 1.35rem; line-height: 1; letter-spacing: -.04em; }
.editor-card-heading > small { color: #929cad; font-size: .68rem; }
.editor-field { display: grid; gap: 8px; margin-top: 18px; color: #647083; }
.editor-field:first-of-type { margin-top: 0; }
.editor-field > span { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: .7rem; font-weight: 680; }
.editor-field > span small { color: #9ca5b4; font-size: .64rem; font-weight: 560; }
.editor-field-help { margin: 10px 0 0; color: #8792a3; font-size: .7rem; line-height: 1.55; }
.link-editor-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 16px; }
.site-editor-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 16px; }
.domain-editor-layout { grid-template-columns: minmax(0,1fr) 360px; align-items: stretch; }
.domain-editor-layout > .article-editor-main, .domain-editor-layout > .article-editor-aside { height: 100%; }
.domain-editor-layout > .article-editor-main > .editor-card, .domain-editor-layout > .article-editor-aside > .editor-card:first-child { height: 100%; }
.domain-editor-layout > .article-editor-aside { position: static; grid-template-rows: minmax(0,1fr) auto; }
.domain-editor-page.is-new .article-editor-main, .domain-editor-page.is-new .article-editor-aside { display: flex; flex-direction: column; }
.domain-editor-page.is-new .article-editor-main > .editor-card, .domain-editor-page.is-new .article-editor-aside > .editor-card:first-child { height: auto; flex: 1 1 auto; }
.domain-editor-page .editor-field input, .domain-editor-page .editor-field select { box-sizing: border-box; height: 52px; min-height: 52px; }
.domain-editor-page .editor-title-field input { padding: 0 14px; font-size: .94rem; line-height: 1.2; }
.domain-editor-note { margin: 18px 0 0; color: #7d8899; font-size: .76rem; line-height: 1.65; }
.editor-check { display: flex; align-items: flex-start; gap: 11px; margin-top: 20px; padding: 14px; color: #596579; background: #f8f9fb; border: 1px solid #e1e6ec; border-radius: 10px; cursor: pointer; }
.editor-check input { width: 17px; height: 17px; flex: 0 0 auto; margin: 2px 0 0; accent-color: #7557ff; }
.editor-check > span { display: grid; gap: 4px; }
.editor-check strong { color: #384457; font-size: .74rem; font-weight: 680; }
.editor-check small { color: #8994a4; font-size: .66rem; line-height: 1.45; }
.domain-state-card { gap: 0; }
.domain-state-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 42px; color: #8490a1; font-size: .7rem; border-bottom: 1px solid #edf0f3; }
.domain-state-row:last-child { border-bottom: 0; }
.domain-state-row strong { color: #8d6b27; font-size: .7rem; font-weight: 680; text-align: right; }
.domain-state-row strong.is-ready { color: #24745a; }
.site-color-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.site-color-fields .editor-field { margin-top: 0; }
.site-color-fields input[type="color"] { height: 48px; padding: 5px; cursor: pointer; }
.branding-card { height: max-content !important; min-height: 0; align-self: start; overflow: hidden; }
.branding-mode { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.branding-mode label { position: relative; min-width: 0; cursor: pointer; }
.branding-mode input { position: absolute; opacity: 0; pointer-events: none; }
.branding-mode label > span { min-height: 92px; display: grid; grid-template-columns: auto 1fr; align-content: center; align-items: center; gap: 2px 9px; padding: 13px; color: #718093; background: #f7f9fb; border: 1px solid #dfe4eb; border-radius: 12px; transition: border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease; }
.branding-mode i { width: 26px; height: 26px; grid-row: 1 / span 2; display: grid; place-items: center; color: #929cac; background: #fff; border: 1px solid #e0e5eb; border-radius: 8px; font-size: .56rem; font-style: normal; font-weight: 760; }
.branding-mode strong { color: #344155; font-size: .75rem; line-height: 1.2; }
.branding-mode small { font-size: .61rem; line-height: 1.35; }
.branding-mode label:hover > span { border-color: #cbd2dc; transform: translateY(-1px); }
.branding-mode input:focus-visible + span { outline: 3px solid rgba(117,87,255,.35); outline-offset: 2px; }
.branding-mode input:checked + span { color: #6651d7; background: linear-gradient(145deg,#f7f4ff,#f1edff); border-color: #9a87f4; box-shadow: 0 8px 22px rgba(83,62,185,.11); }
.branding-mode input:checked + span i { color: #fff; background: #7557ff; border-color: #7557ff; }
.site-profile-card .editor-card-heading { margin-bottom: 18px; }
.site-profile-choice label > span { min-height: 112px; padding: 18px; }
.site-profile-choice strong { font-size: .86rem; }
.site-profile-choice small { max-width: 42ch; font-size: .68rem; line-height: 1.5; }
.site-profile-choice input:disabled + span { cursor: default; }
.site-profile-choice label:has(input:disabled) { cursor: default; }
.site-profile-choice label:has(input:disabled):hover > span { transform: none; }
.branding-custom-fields { display: grid; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid #e7ebf0; }
.branding-custom-fields[hidden] { display: none; }
.brand-upload { min-width: 0; display: grid; gap: 11px; padding: 14px; background: #fafbfc; border: 1px solid #e2e7ed; border-radius: 12px; }
.brand-upload-heading { min-width: 0; display: grid; gap: 3px; }
.brand-upload-heading strong { color: #344155; font-size: .74rem; font-weight: 700; }
.brand-upload-heading span { overflow: hidden; color: #8b96a6; font-size: .61rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.brand-upload-body { min-width: 0; display: grid; grid-template-columns: 104px minmax(0,1fr); align-items: stretch; gap: 12px; }
.brand-upload-preview { width: 104px; min-height: 84px; display: grid; place-items: center; padding: 10px; overflow: hidden; background: linear-gradient(145deg,#f2f5f8,#e8edf2); border: 1px solid #dbe2e9; border-radius: 10px; }
.brand-upload-preview.is-favicon { width: 104px; min-height: 84px; }
.brand-upload-preview img { display: block; width: 100%; height: 62px; object-fit: contain; }
.brand-upload-preview.is-favicon img { width: 58px; height: 58px; border-radius: 10px; }
.brand-upload-preview > div { display: grid; gap: 4px; color: #8994a4; text-align: center; }
.brand-upload-preview > div strong { color: #687487; font-size: .68rem; }
.brand-upload-preview > div small { font-size: .59rem; line-height: 1.35; }
.brand-upload-actions { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; flex-direction: column; gap: 9px; padding: 3px 0; }
.brand-upload-button { position: relative; width: 100%; min-height: 36px; display: flex; align-items: center; justify-content: center; margin: 0; padding-inline: 10px; overflow: hidden; cursor: pointer; }
.brand-upload-button input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.brand-upload-actions > small { max-width: 100%; color: #8b96a6; font-size: .6rem; line-height: 1.45; overflow-wrap: anywhere; }
.branding-note { display: grid; grid-template-columns: 22px minmax(0,1fr); align-items: start; gap: 9px; margin: 2px 0 0; padding: 11px; color: #7d889a; background: #f5f7fa; border-radius: 10px; font-size: .62rem; line-height: 1.5; }
.branding-note > span:first-child { width: 22px; height: 22px; display: grid; place-items: center; color: #6651d7; background: #ebe6ff; border-radius: 50%; font-size: .65rem; font-weight: 760; }
.link-url-field input { min-height: 58px; font-size: .94rem; font-weight: 560; }
.link-usage-card > strong { display: block; margin-top: 4px; color: #172033; font-size: 3rem; font-weight: 720; line-height: 1; letter-spacing: -.065em; }
.link-usage-card > p { margin: 10px 0 0; color: #7d8898; font-size: .74rem; line-height: 1.5; }
.link-usage-card ul { display: grid; gap: 8px; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid #e5e9ef; list-style: none; }
.link-usage-card li { overflow: hidden; color: #566174; font-size: .72rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.editor-field input, .editor-field select, .editor-field textarea { padding: 13px 14px; background: #f8f9fb; border-color: #dfe4eb; border-radius: 10px; font-size: .84rem; line-height: 1.5; }
.editor-field select { appearance: none; -webkit-appearance: none; padding-right: 46px; background-image: linear-gradient(45deg,transparent 50%,#778294 50%),linear-gradient(135deg,#778294 50%,transparent 50%); background-position: calc(100% - 19px) 50%,calc(100% - 14px) 50%; background-size: 5px 5px,5px 5px; background-repeat: no-repeat; }
.editor-field textarea { min-height: 0; }
.editor-title-field input { padding: 16px; color: #151d2b; background: #fff; font-size: clamp(1.15rem,2vw,1.45rem); font-weight: 680; line-height: 1.25; letter-spacing: -.025em; }
.editor-add-block { min-width: 210px; display: grid; gap: 6px; color: #7d8899; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.editor-add-block select { min-height: 40px; padding: 0 34px 0 11px; background: #f5f7f9; border-color: #dfe4eb; border-radius: 10px; font-size: .72rem; text-transform: none; }
.editor-slug { display: flex; align-items: center; overflow: hidden; background: #f8f9fb; border: 1px solid #dfe4eb; border-radius: 10px; transition: border-color .2s ease,box-shadow .2s ease; }
.editor-slug:focus-within { border-color: #8a72f3; box-shadow: 0 0 0 4px rgba(117,87,255,.11); }
.editor-slug > span { padding-left: 13px; color: #9aa3b2; font-size: .76rem; white-space: nowrap; }
.editor-slug input { min-width: 0; padding-left: 3px; background: transparent; border: 0; box-shadow: none; }
.editor-slug input:focus { box-shadow: none; }
.editor-side-card { padding: 21px; }
.editor-side-card .editor-card-heading { align-items: center; margin-bottom: 20px; padding-bottom: 16px; }
.editor-side-card .editor-card-heading h2 { font-size: 1.12rem; }
.editor-side-card .badge { flex: 0 0 auto; }
.article-block-list { gap: 10px; }
.editor-block { padding: 0; overflow: hidden; background: #fff; border: 1px solid #dfe4eb; border-radius: 10px; box-shadow: none; }
.editor-block .block-head { min-height: 54px; margin: 0; padding: 9px 11px; background: #f7f8fa; border-bottom: 1px solid #e4e8ed; }
.block-number { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; color: #758195; background: #fff; border: 1px solid #dfe4eb; border-radius: 10px; font-size: .62rem; font-weight: 750; }
.editor-block .block-head strong { color: #364154; font-size: .78rem; font-weight: 680; }
.block-controls { display: flex; align-items: center; gap: 5px; }
.block-controls .ghost { min-width: 32px; min-height: 32px; padding: 0 8px; background: #fff; border-radius: 10px; font-size: .7rem; }
.block-controls .danger { color: #a23d50; background: #fff; border-color: #ead6db; }
.editor-block .block-grid { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
.editor-block .editor-field { margin: 0; }
.editor-block .editor-field input, .editor-block .editor-field textarea { background: #fbfcfd; }
.rich-editor-field { position: relative; }
.rich-editor { min-height: 142px; padding: 16px 17px; overflow-wrap: anywhere; color: #273244; background: #fbfcfd; border: 1px solid #dfe4eb; border-radius: 10px; font-size: .9rem; line-height: 1.72; white-space: pre-wrap; transition: border-color .18s ease,box-shadow .18s ease,background .18s ease; }
.rich-editor.is-compact { min-height: 54px; padding-block: 13px; line-height: 1.55; }
.rich-editor:empty::before { content: attr(data-placeholder); color: #9aa5b4; pointer-events: none; }
.rich-editor:hover { background: #fff; border-color: #cfd6df; }
.rich-editor:focus { outline: 0; background: #fff; border-color: #8a72f3; box-shadow: 0 0 0 4px rgba(117,87,255,.11); }
.rich-editor strong { color: inherit; font-weight: 760; }
.rich-editor em { font-style: italic; }
.rich-editor a { color: #6651d7; text-decoration: underline; text-decoration-color: rgba(102,81,215,.34); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.rich-selection-toolbar { position: fixed; z-index: 180; display: flex; align-items: center; gap: 4px; padding: 5px; color: #fff; background: #202837; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; box-shadow: 0 14px 36px rgba(13,20,35,.28); }
.rich-selection-toolbar[hidden] { display: none; }
.rich-selection-toolbar > span { width: 1px; height: 24px; margin: 0 2px; background: rgba(255,255,255,.15); }
.rich-selection-toolbar button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; color: rgba(255,255,255,.8); background: transparent; border: 0; border-radius: 8px; font: inherit; cursor: pointer; }
.rich-selection-toolbar button:hover, .rich-selection-toolbar button.active { color: #fff; background: rgba(255,255,255,.14); }
.rich-selection-toolbar button strong { font-size: .86rem; }
.rich-selection-toolbar button em { font-family: Georgia,serif; font-size: 1rem; }
.rich-list-field { gap: 10px; }
.rich-list-items { display: grid; gap: 8px; }
.rich-list-row { display: grid; grid-template-columns: 30px minmax(0,1fr) 34px; align-items: start; gap: 8px; }
.rich-list-number { min-height: 54px; display: grid; place-items: center; color: #7d889b; background: #f3f5f8; border: 1px solid #e0e5eb; border-radius: 10px; font-size: .68rem; font-weight: 740; }
.rich-list-remove { width: 34px; height: 34px; display: grid; place-items: center; margin-top: 10px; padding: 0; color: #a23d50; background: #fff7f8; border: 1px solid #ead6db; border-radius: 9px; font-size: 1rem; cursor: pointer; }
.rich-list-add { justify-self: start; min-height: 36px; margin-top: 2px; }
.editor-empty { display: grid; gap: 7px; padding: 48px 24px; }
.editor-empty strong { color: #3c485b; font-size: .92rem; }
.editor-empty span { color: #8792a3; font-size: .76rem; }
.editor-mobile-save { display: none; }
.toast-region { position: fixed; top: 82px; right: 18px; z-index: 120; width: min(360px,calc(100vw - 36px)); display: grid; gap: 9px; pointer-events: none; }
.system-toast { --toast-tone: #637083; --toast-soft: rgba(99,112,131,.1); position: relative; width: 100%; min-height: 66px; display: grid; grid-template-columns: 34px minmax(0,1fr) 26px; align-items: center; gap: 11px; padding: 11px 10px 11px 12px; overflow: hidden; color: #1c2636; background: rgba(250,252,255,.8); border: 1px solid rgba(255,255,255,.82); border-radius: 10px; box-shadow: 0 16px 44px rgba(20,30,55,.16),inset 0 0 0 1px rgba(95,111,138,.08); pointer-events: auto; -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); }
.system-toast::before { content: ""; position: absolute; top: 10px; bottom: 10px; left: 0; width: 3px; background: var(--toast-tone); border-radius: 0 99px 99px 0; }
.system-toast.is-leaving { display: none; }
.toast-success { --toast-tone: #278664; --toast-soft: rgba(39,134,100,.11); }
.toast-error { --toast-tone: #c94e62; --toast-soft: rgba(201,78,98,.11); }
.toast-warning { --toast-tone: #c88728; --toast-soft: rgba(200,135,40,.12); }
.toast-info { --toast-tone: #4f79cf; --toast-soft: rgba(79,121,207,.11); }
.toast-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--toast-tone); background: var(--toast-soft); border: 1px solid color-mix(in srgb,var(--toast-tone) 18%,transparent); border-radius: 10px; }
.toast-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.toast-copy { min-width: 0; }
.toast-copy strong { display: block; color: #202a3a; font-size: .7rem; font-weight: 760; letter-spacing: .015em; }
.toast-copy p { margin: 3px 0 0; color: #667285; font-size: .69rem; line-height: 1.4; overflow-wrap: anywhere; }
.toast-close { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; color: #8993a2; background: transparent; border: 0; border-radius: 10px; cursor: pointer; transition: color .18s ease,background .18s ease; }
.toast-close:hover { color: #3b4657; background: rgba(35,45,65,.06); }
.toast-close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.empty { padding: 3rem 2rem; color: var(--muted); text-align: center; background: linear-gradient(135deg,#f7f7fa,#fff); border: 1px dashed #bec8d4; border-radius: 10px; }
dialog { width: min(980px,calc(100% - 28px)); max-height: 94vh; padding: 0; color: var(--text); background: transparent; border: 0; }
dialog::backdrop { background: rgba(2,3,10,.72); -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
.modal-card { max-height: 91vh; overflow: auto; padding: clamp(22px,3vw,34px); box-shadow: 0 28px 90px rgba(2,3,10,.32); }
.modal-close { position: sticky; top: 0; z-index: 2; float: right; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; color: #586477; background: #f2f3f7; border: 0; border-radius: 50%; font-size: 1.45rem; cursor: pointer; }
dialog.preview-dialog { width: calc(100% - 32px); max-width: none; max-height: calc(100dvh - 32px); }
.preview-dialog .modal-card { position: relative; width: 100%; height: calc(100dvh - 32px); max-height: none; padding: 14px; overflow: hidden; border-radius: 10px; }
.preview-dialog .modal-close { position: absolute; top: 20px; right: 20px; z-index: 4; float: none; color: #4f5b6d; background: #f1f3f6; border: 1px solid #dce2e9; border-radius: 10px; }
.preview-shell { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.preview-toolbar { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 5px 58px 13px 8px; }
.preview-toolbar > div:first-child span { display: block; margin-bottom: 4px; color: #8a94a5; font-size: .6rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.preview-toolbar h2 { margin: 0; color: #1c2534; font-size: 1.12rem; letter-spacing: -.035em; }
.preview-devices { display: flex; align-items: center; gap: 6px; }
.preview-devices .ghost { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: .7rem; }
.preview-devices .ghost.active { color: #fff; background: #283245; border-color: #283245; }
.preview-stage { flex: 1; min-height: 0; display: flex; justify-content: center; overflow: auto; padding: 14px; background: #e7ebf0; border: 1px solid #d8dee6; border-radius: 10px; }
.preview-frame { width: 100%; height: 100%; min-height: 620px; background: #fff; border: 0; border-radius: 10px; box-shadow: 0 12px 32px rgba(24,37,73,.12); transition: max-width .3s cubic-bezier(.22,.8,.25,1); }
.audit-list { margin: 0; padding: 0; list-style: none; }
.audit-list li { padding: .9rem 0; border-bottom: 1px solid #e7ebef; }
.muted { color: var(--muted); }
.critical { color: #aa3947; }
.warning { color: #956418; }
.ok { color: var(--success); }
:focus-visible { outline: 3px solid rgba(117,87,255,.5); outline-offset: 3px; }

@media (max-width: 1100px) {
  .login-layout { width: 100%; grid-template-columns: minmax(0,1fr) minmax(420px,.9fr); gap: 48px; }
  .login-context { min-height: 0; border: 0; }
  .login-context h1 { font-size: clamp(2.5rem,5vw,4rem); }
  .stats { grid-template-columns: repeat(2,1fr); }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: min(320px,90vw); height: 100dvh; padding: 12px; visibility: hidden; opacity: 0; box-shadow: 22px 0 55px rgba(15,23,42,.16); transform: translateX(-100%); transition: opacity .2s ease,transform .3s cubic-bezier(.22,.8,.25,1),visibility .3s; }
  .sidebar.open { visibility: visible; opacity: 1; transform: translateX(0); }
  .sidebar.context-open { overflow: visible; }
  .site-context-popover, .sidebar-collapsed .site-context-popover { top: 136px; left: 12px; width: min(390px,calc(100vw - 24px)); max-height: calc(100dvh - 150px); }
  .site-context-list { max-height: calc(100dvh - 256px); }
  .sidebar-close { position: absolute; top: 18px; right: 16px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; color: rgba(255,255,255,.72); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; cursor: pointer; }
  .sidebar-close:hover { color: #fff; background: rgba(255,255,255,.14); }
  .sidebar-brand { width: 46px; aspect-ratio: 624 / 538; margin: 4px 0 23px 10px; padding: 0; }
  .sidebar-brand-full { display: none; }
  .sidebar-brand-mark { display: block !important; }
  .sidebar nav { margin-top: 0; }
  .sidebar nav a { min-height: 40px; font-family: inherit; font-size: .84rem; font-style: normal; }
  .sidebar > button[data-logout] { width: 100%; }
  .nav-toggle { position: relative; z-index: 45; display: grid; }
  .nav-toggle .panel-close-icon { display: none; }
  .nav-toggle .panel-open-icon { display: block; }
  .topbar { padding: 12px 18px; }
  .article-editor-layout { grid-template-columns: 1fr; }
  .article-editor-aside { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .editor-mobile-save { display: none; }
}

@media (max-width: 800px) {
  .login-shell { height: auto; min-height: 100dvh; padding: 28px; overflow-y: auto; }
  .login-layout { width: min(650px,100%); height: auto; min-height: calc(100dvh - 56px); max-height: none; grid-template-columns: 1fr; align-content: center; gap: 34px; }
  .login-context { min-height: 300px; }
  .login-context h1 { font-size: clamp(2.5rem,7.2vw,3.8rem); }
  .login-card { justify-self: stretch; width: 100%; }
}

@media (max-width: 680px) {
  .login-brand { width: 56px; aspect-ratio: 624 / 538; }
  .login-brand img { width: 200.962%; transform: translate(-26.555%,-30.781%); }
  body { overflow-x: hidden; }
  .toast-region { top: 70px; right: 10px; width: calc(100vw - 20px); gap: 7px; }
  .system-toast { min-height: 62px; border-radius: 10px; }
  .login-shell { width: 100%; height: auto; min-height: 100dvh; padding: 22px; align-items: start; overflow-x: hidden; overflow-y: auto; }
  .login-layout { width: 100%; max-width: 100%; min-width: 0; min-height: calc(100dvh - 44px); gap: 26px; border: 0; border-radius: 0; box-shadow: none; }
  .login-context { width: 100%; max-width: 100%; min-width: 0; min-height: 280px; padding: 0; }
  .login-context > div { width: 100%; min-width: 0; overflow: hidden; }
  .login-context h1 { width: 100%; max-width: 100%; margin-top: 40px; font-size: clamp(2.2rem,9.5vw,2.7rem); line-height: .92; overflow-wrap: anywhere; }
  .login-context p:not(.eyebrow) { max-width: 100%; font-size: .86rem; overflow-wrap: anywhere; }
  .login-features { grid-template-columns: 1fr; gap: 10px; margin-top: 28px; }
  .login-features li { display: flex; gap: 10px; }
  .login-features span { margin: 3px 0 0; }
  .login-card { width: 100%; max-width: 100%; min-width: 0; margin: 0; padding: 0; }
  .stats, .form-grid { grid-template-columns: 1fr; }
  .stat { min-height: 120px; }
  .topbar { gap: 10px; }
  .topbar label { font-size: 0; }
  .topbar select { width: min(52vw,260px); font-size: .78rem; }
  .user-chip { display: none; }
  .main { padding: 28px 14px; }
  .article-editor-page { margin-top: -8px; }
  .article-editor-toolbar { position: static; align-items: stretch; flex-direction: column; gap: 14px; padding: 12px; }
  .article-editor-toolbar-copy strong { max-width: calc(100vw - 105px); }
  .article-editor-toolbar-actions { display: grid; grid-template-columns: 1fr; }
  .article-editor-toolbar-actions > * { width: 100%; }
  .article-editor-layout { gap: 12px; }
  .article-editor-aside { grid-template-columns: 1fr; gap: 12px; }
  .link-editor-fields { grid-template-columns: 1fr; }
  .site-editor-fields { grid-template-columns: 1fr; }
  .branding-mode { grid-template-columns: 1fr; }
  .editor-card { padding: 19px; border-radius: 10px; }
  .editor-card-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 20px; }
  .editor-add-block { width: 100%; min-width: 0; }
  .editor-block .block-head { align-items: flex-start; flex-wrap: wrap; }
  .block-controls { width: 100%; padding-left: 40px; }
  .block-controls .danger { margin-left: auto; }
  .editor-mobile-save { display: block; }
  .editor-mobile-save .button { width: 100%; }
  dialog.preview-dialog { width: calc(100% - 10px); max-height: calc(100dvh - 10px); }
  .preview-dialog .modal-card { height: calc(100dvh - 10px); padding: 7px; border-radius: 10px; }
  .preview-dialog .modal-close { top: 12px; right: 12px; }
  .preview-toolbar { min-height: 112px; align-items: flex-start; flex-direction: column; gap: 10px; padding: 8px 52px 10px 7px; }
  .preview-devices { width: calc(100vw - 80px); display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .preview-devices .ghost { width: 100%; padding-inline: 5px; }
  .preview-stage { padding: 6px; }
  .preview-frame { min-height: 560px; }
  .page-title { display: grid; gap: 18px; }
  .page-title h1 { font-size: clamp(2.4rem,13vw,3.5rem); }
  .page-title .button { width: 100%; }
  .panel { padding: 18px; }
  .block-grid { grid-template-columns: 1fr; }
  .form-actions { justify-content: stretch; flex-wrap: wrap; }
  .form-actions > * { flex: 1 1 100%; }
  dialog { width: calc(100% - 14px); }
  .modal-card { padding: 18px; border-radius: 10px; }
}

@media (min-width: 1600px) {
  html { font-size: clamp(16px,calc(.36vw + 10px),23px); }
  body { font-size: clamp(15px,calc(.3vw + 10px),20px); }
  .login-shell { padding: clamp(54px,5vw,130px); }
  .login-layout { width: min(82vw,2200px); max-height: min(84vh,1300px); grid-template-columns: minmax(0,1.08fr) minmax(620px,.92fr); gap: clamp(110px,9vw,260px); }
  .login-brand { width: clamp(240px,10vw,350px); }
  .login-context, .login-card { height: min(54vh,900px); min-height: 620px; }
  .login-context > div, .login-card { padding-top: clamp(70px,5vh,110px); }
  .login-context > div { max-width: 980px; }
  .login-context h1 { max-width: 980px; }
  .login-context p:not(.eyebrow) { max-width: 760px; }
  .login-card { width: min(820px,100%); }
  .login-card input { min-height: clamp(64px,4vw,86px); }
  .login-submit { min-height: clamp(62px,4vw,84px); }
  .app { grid-template-columns: clamp(280px,11vw,380px) minmax(0,1fr); }
  .app.sidebar-collapsed { grid-template-columns: clamp(72px,3vw,92px) minmax(0,1fr); }
  .sidebar { width: clamp(280px,11vw,380px); }
  .sidebar-collapsed .sidebar { width: clamp(72px,3vw,92px); }
  .sidebar { padding: clamp(14px,.8vw,24px); }
  .sidebar-brand { width: clamp(190px,8vw,270px); margin: clamp(6px,.5vw,14px) 0 clamp(26px,1.6vw,44px) 10px; }
  .sidebar-collapsed .sidebar-brand { width: clamp(42px,1.7vw,58px); }
  .sidebar nav { gap: clamp(20px,1.4vw,38px); }
  .nav-heading { margin-inline: clamp(10px,.7vw,20px); font-size: .66rem; }
  .sidebar nav a, .sidebar > button[data-logout] { grid-template-columns: clamp(17px,1vw,24px) minmax(0,1fr); column-gap: clamp(10px,.7vw,18px); min-height: clamp(40px,2.6vw,58px); padding-inline: clamp(10px,.7vw,20px); font-size: .82rem; }
  .sidebar nav a svg, .sidebar > button[data-logout] svg { width: clamp(17px,1vw,24px); height: clamp(17px,1vw,24px); }
  .sidebar-account { grid-template-columns: clamp(34px,2vw,46px) minmax(0,1fr); gap: clamp(10px,.7vw,18px); }
  .account-avatar { width: clamp(34px,2vw,46px); height: clamp(34px,2vw,46px); }
  .topbar { min-height: clamp(64px,3.8vw,88px); padding: clamp(10px,.8vw,18px) clamp(22px,1.4vw,40px); }
  .project-switcher select { width: min(28vw,560px); height: clamp(42px,2.7vw,60px); }
  .nav-toggle { width: clamp(38px,2.5vw,54px); height: clamp(38px,2.5vw,54px); }
  .main { width: min(100%,2400px); margin-inline: auto; padding: clamp(42px,3vw,84px); }
  .dashboard-page, .article-editor-page { width: 100%; max-width: none; margin-inline: auto; }
  .dashboard-header { gap: clamp(40px,4vw,100px); margin-bottom: clamp(36px,3vw,70px); }
  .dashboard-heading > span { max-width: 840px; }
  .dashboard-metrics { gap: clamp(14px,1vw,24px); margin-bottom: clamp(26px,2vw,46px); }
  .metric-card { min-height: clamp(190px,13vw,280px); padding: clamp(24px,1.6vw,42px); }
  .dashboard-section-head { padding: clamp(26px,1.7vw,44px); }
  .dashboard-sites .table-wrap { padding-inline: clamp(16px,1vw,28px); }
  th, td { padding: clamp(.9rem,1vw,1.35rem); }
  .history-feed { padding-inline: clamp(28px,1.7vw,44px); }
  .article-editor-toolbar { top: clamp(72px,4vw,96px); min-height: clamp(78px,5vw,108px); padding: clamp(14px,1vw,24px); }
  .article-editor-layout { grid-template-columns: minmax(0,1fr) clamp(400px,21vw,560px); gap: clamp(18px,1.2vw,32px); }
  .split-scroll-layout { height: calc(100dvh - clamp(220px,14vw,310px)); min-height: 560px; }
  .article-editor-main, .article-editor-aside { gap: clamp(18px,1.2vw,32px); }
  .editor-card { padding: clamp(28px,1.7vw,46px); }
  .editor-card-heading { margin-bottom: clamp(26px,1.6vw,42px); padding-bottom: clamp(20px,1.3vw,34px); }
  .editor-field { gap: 10px; margin-top: clamp(20px,1.3vw,34px); }
  .editor-field input, .editor-field select, .editor-field textarea { padding: clamp(14px,.9vw,22px); }
  .link-editor-fields, .site-editor-fields { gap-inline: clamp(18px,1.2vw,32px); }
  dialog { width: min(1280px,calc(100% - 60px)); }
  .toast-region { top: clamp(90px,5vw,120px); right: clamp(24px,1.5vw,44px); width: min(440px,calc(100vw - 48px)); }
}

@media (min-width: 3000px) {
  .login-layout { width: min(78vw,2800px); grid-template-columns: minmax(0,1.12fr) minmax(820px,.88fr); }
  .login-context, .login-card { height: min(52vh,1120px); min-height: 780px; }
  .login-card { width: min(980px,100%); }
  .app { grid-template-columns: 420px minmax(0,1fr); }
  .app.sidebar-collapsed { grid-template-columns: 92px minmax(0,1fr); }
  .sidebar { width: 420px; }
  .sidebar-collapsed .sidebar { width: 92px; }
  .main { max-width: 2900px; padding: 92px; }
  .article-editor-layout { grid-template-columns: minmax(0,1fr) 620px; }
  .dashboard-sites td.actions { width: 340px; min-width: 340px; }
}

@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.ghost.danger { color: #b42335; border-color: rgba(180,35,53,.2); background: rgba(180,35,53,.045); }
.ghost.danger:hover { color: #8f1727; border-color: rgba(180,35,53,.34); background: rgba(180,35,53,.09); }
.actions.actions-two { grid-template-columns: repeat(2,minmax(112px,1fr)); }
.domain-unassigned { display: inline-grid; gap: 2px; }
.domain-unassigned strong { color: #4f5f76; font-size: .78rem; font-weight: 700; }
.domain-unassigned small { color: #919cac; font-size: .66rem; }
.bulk-content-panel{display:grid;gap:14px;margin:0 0 22px;padding:20px;border:1px solid rgba(117,87,255,.28);border-radius: 10px;background:linear-gradient(145deg,rgba(117,87,255,.09),rgba(64,224,160,.04))}.bulk-content-panel>div:first-child{display:grid;gap:4px}.bulk-content-panel strong{font-size:16px}.bulk-content-panel span{color:var(--muted);font-size:13px}.bulk-content-panel textarea{min-height:220px;resize:vertical}.bulk-content-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}.editor-field input[type=file]{padding:10px;margin-top:8px;border:1px dashed rgba(255,255,255,.18);border-radius:10px}
.image-upload-field { display: grid; gap: 12px; }
.image-upload-field > span { color: #6f7b8d; font-size: .7rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.image-upload-field > span small { color: #a0a9b7; font-size: .62rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.image-upload-preview { position: relative; width: 100%; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg,#f4f6f9,#eaedf2); border: 1px solid #dfe4eb; border-radius: 10px; }
.image-upload-preview img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; background: #eef1f5; }
.image-upload-empty { display: grid; gap: 5px; padding: 20px; color: #8a95a5; text-align: center; }
.image-upload-empty strong { color: #687487; font-size: .78rem; }
.image-upload-empty span { font-size: .68rem; line-height: 1.45; }
.image-upload-actions { display: flex; align-items: center; gap: 8px; }
.image-upload-actions .ghost { min-height: 38px; margin: 0; padding: 0 14px; font-size: .7rem; }
.image-upload-button { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.image-upload-input { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }
.image-upload-status { color: #8b96a6; font-size: .66rem; line-height: 1.45; }
.image-alignment-field { gap: 7px; margin-top: 2px; }
.image-alignment-field > span { color: #6f7b8d; font-size: .7rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }

.analytics-page { --analytics-purple:#7557ff; --analytics-ink:#172033; --analytics-muted:#8290a3; --analytics-card-pad:22px; --analytics-mini-pad:12px; --analytics-section-gap:14px; }
.analytics-hero { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 22px; }
.analytics-hero .dashboard-heading { display: grid; gap: 9px; }
.analytics-hero .dashboard-heading h1 { margin: 0; font-size: clamp(2.25rem,4vw,4.2rem); line-height: .96; letter-spacing: -.065em; }
.analytics-hero .dashboard-heading p { max-width: 720px; margin: 0; color: #6f7b8e; font-family: Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size: .94rem; font-weight: 400; line-height: 1.58; letter-spacing: -.012em; text-transform: none; }
.analytics-eyebrow { color: var(--analytics-purple); font-size: .63rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.analytics-live { display: flex; align-items: center; gap: 9px; padding: 11px 15px; border: 1px solid #dfe9e4; border-radius: 999px; color: #397456; background: #f4faf6; font-size: .66rem; font-weight: 700; white-space: nowrap; }
.analytics-live i { width: 8px; height: 8px; border-radius: 50%; background: #45b876; box-shadow: 0 0 0 5px rgba(69,184,118,.12); }
.analytics-filterbar { min-height: 42px; display: flex; align-items: center; justify-content: flex-end; margin: -4px 0 18px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.analytics-project-filter { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px; }
.analytics-project-filter > span { color: #8a95a5; font-size: .64rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.analytics-project-filter select { width: 100%; max-width: 480px; min-height: 46px; padding: 0 48px 0 14px; border: 1px solid #e1e5eb; border-radius: 10px; appearance: none; color: #273246; background-color: #f8f9fb; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='m1 1 6 6 6-6' fill='none' stroke='%237b8696' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 17px center; background-size: 14px 8px; font: inherit; font-size: .73rem; font-weight: 680; }
.analytics-period { margin-left: auto; display: flex; padding: 4px; border: 1px solid #e2e6ec; border-radius: 11px; background: #f4f6f9; }
.analytics-period label { cursor: pointer; }
.analytics-period input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.analytics-period span { min-height: 36px; display: grid; place-items: center; padding: 0 13px; border-radius: 8px; color: #7d899a; font-size: .66rem; font-weight: 720; transition: .18s ease; }
.analytics-period input:checked + span { color: #fff; background: var(--analytics-purple); box-shadow: 0 6px 15px rgba(117,87,255,.24); }
.analytics-period input:focus-visible + span { outline: 2px solid var(--analytics-purple); outline-offset: 2px; }
.analytics-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--analytics-section-gap); margin-bottom: var(--analytics-section-gap); }
.analytics-kpi { min-height: 168px; display: grid; align-content: space-between; gap: 18px; padding: var(--analytics-card-pad); border: 1px solid #e2e6ec; border-radius: 14px; background: linear-gradient(145deg,#fff,#fbfcfd); box-shadow: 0 10px 32px rgba(25,38,58,.045); }
.analytics-kpi-head { display: flex; align-items: center; gap: 10px; color: #7d899a; font-size: .67rem; font-weight: 720; }
.analytics-kpi-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--analytics-purple); background: rgba(117,87,255,.09); font-size: .9rem; }
.analytics-kpi > strong { color: var(--analytics-ink); font-size: clamp(2rem,3.1vw,3.15rem); line-height: .95; letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
.analytics-kpi footer { min-width: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.analytics-kpi footer small { min-width: 0; max-width: 56%; color: #8f9aaa; font-size: .58rem; line-height: 1.38; text-align: right; overflow-wrap: break-word; white-space: normal; }
.analytics-delta { padding: 5px 7px; border-radius: 6px; font-size: .59rem; font-weight: 760; white-space: nowrap; }
.analytics-delta.up { color: #2f8b59; background: #eef9f2; }
.analytics-delta.down { color: #c34c5f; background: #fff0f2; }
.analytics-delta.neutral { color: #7f8a9a; background: #f1f3f6; }
.analytics-overview-grid { display: grid; grid-template-columns: minmax(0,1.9fr) minmax(300px,.8fr); align-items: stretch; gap: var(--analytics-section-gap); margin-bottom: var(--analytics-section-gap); }
.analytics-panel { overflow: hidden; border: 1px solid #e2e6ec; border-radius: 14px; background: #fff; box-shadow: 0 10px 34px rgba(25,38,58,.045); }
.analytics-traffic-panel, .analytics-conversion-panel { min-height: 318px; padding: var(--analytics-card-pad); }
.analytics-panel > header, .analytics-panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.analytics-panel header > div, .analytics-panel-heading > div { display: grid; gap: 5px; }
.analytics-panel header span, .analytics-panel-heading span { color: var(--analytics-purple); font-size: .58rem; font-weight: 780; letter-spacing: .1em; text-transform: uppercase; }
.analytics-panel header h2, .analytics-panel-heading h2 { margin: 0; color: var(--analytics-ink); font-size: 1.16rem; line-height: 1.15; letter-spacing: -.035em; }
.analytics-traffic-panel > header > strong { color: #354055; font-size: 1.25rem; letter-spacing: -.035em; }
.analytics-visual { margin-top: 12px; }
.analytics-chart-legend { display: flex; justify-content: flex-end; gap: 16px; margin-bottom: -7px; color: #8792a2; font-size: .59rem; }
.analytics-chart-legend span { display: flex; align-items: center; gap: 6px; }
.analytics-chart-legend i { width: 15px; height: 3px; display: block; border-radius: 4px; }
.legend-views { background: var(--analytics-purple); }
.legend-visitors { background: #59c1d9; }
.analytics-line-chart { width: 100%; height: auto; position: relative; top: 6px; display: block; overflow: visible; }
.analytics-line-chart line { stroke: #edf0f4; stroke-width: 1; }
.analytics-line-chart text { fill: #a1aab7; font-size: 11px; font-family: inherit; }
.analytics-area { fill: url(#traffic-area); opacity: 0; animation: analyticsAreaReveal .7s .24s ease-out forwards; }
.analytics-line { fill: none; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.analytics-line.views { stroke: var(--analytics-purple); }
.analytics-line.visitors { stroke: #59c1d9; stroke-width: 2.7; }
.analytics-point { fill: #fff; stroke: var(--analytics-purple); stroke-width: 2; opacity: 0; cursor: pointer; outline: none; transition: opacity .15s ease,stroke-width .15s ease; }
.analytics-point.visitors { stroke: #59c1d9; }
.analytics-line-chart:hover .analytics-point { opacity: 1; }
.analytics-point:hover, .analytics-point:focus-visible { opacity: 1; stroke-width: 3.5; }
.analytics-chart-tooltip { --analytics-tooltip-anchor:50%; width: 214px; position: fixed; z-index: 1200; display: grid; gap: 11px; padding: 15px 16px; border: 1px solid rgba(117,87,255,.16); border-radius: 12px; color: #172033; background: rgba(255,255,255,.98); box-shadow: 0 18px 48px rgba(23,32,51,.18),0 4px 12px rgba(23,32,51,.08); pointer-events: none; backdrop-filter: blur(14px); }
.analytics-chart-tooltip[hidden] { display: none; }
.analytics-chart-tooltip::after { width: 10px; height: 10px; position: absolute; left: var(--analytics-tooltip-anchor); bottom: -6px; border-right: 1px solid rgba(117,87,255,.16); border-bottom: 1px solid rgba(117,87,255,.16); background: #fff; content: ""; transform: translateX(-50%) rotate(45deg); }
.analytics-chart-tooltip.below::after { top: -6px; bottom: auto; border: 0; border-top: 1px solid rgba(117,87,255,.16); border-left: 1px solid rgba(117,87,255,.16); }
.analytics-tooltip-date { padding-bottom: 9px; border-bottom: 1px solid #edf0f4; color: #7d899a; font-size: .61rem; font-weight: 760; letter-spacing: .045em; text-transform: uppercase; }
.analytics-tooltip-row { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; }
.analytics-tooltip-row i { width: 7px; height: 7px; display: block; border-radius: 50%; background: var(--analytics-purple); box-shadow: 0 0 0 4px rgba(117,87,255,.1); }
.analytics-tooltip-row i.visitors { background: #59c1d9; box-shadow: 0 0 0 4px rgba(89,193,217,.12); }
.analytics-tooltip-row span { color: #7d899a; font-size: .66rem; font-weight: 650; }
.analytics-tooltip-row strong { color: #172033; font-size: .91rem; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.analytics-axis-date { fill: #6f7b8d !important; font-size: 15px !important; font-weight: 650; }
.analytics-conversion-panel { display: grid; grid-template-rows: auto 1fr auto auto; gap: 12px; background: linear-gradient(155deg,#fff 20%,#faf9ff); }
.analytics-ctr-large { display: none !important; }
.analytics-click-chart { height: 148px; display: flex; align-items: end; gap: 4px; padding-top: 14px; border-bottom: 1px solid #e8ebf0; }
.analytics-click-chart i { min-width: 3px; flex: 1; display: block; border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg,#9a85ff,#7557ff); opacity: .86; transform: scaleY(0); transform-origin: center bottom; animation: analyticsBarGrow .55s cubic-bezier(.2,.75,.25,1) forwards; transition: opacity .15s ease; }
.analytics-click-chart i:nth-child(3n+2) { animation-delay: .035s; }
.analytics-click-chart i:nth-child(3n) { animation-delay: .07s; }
.analytics-click-chart i:hover { opacity: 1; }
.analytics-conversion-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.analytics-conversion-numbers div { display: grid; align-content: center; gap: 5px; padding: var(--analytics-mini-pad); }
.analytics-conversion-numbers strong { color: var(--analytics-ink); font-size: 1.4rem; }
.analytics-conversion-numbers span { color: #929cab; font-size: .59rem; }
.analytics-conversion-panel > footer { padding-top: 10px; border-top: 1px solid #eceef2; color: #8b95a5; font-size: .62rem; }
.analytics-conversion-panel > footer strong { color: #3c4759; }
.analytics-status-pill { padding: 7px 10px; border-radius: 99px; color: #6550d5 !important; background: #f0edff; font-size: .61rem !important; font-weight: 760 !important; letter-spacing: 0 !important; text-transform: none !important; }
.analytics-conversion-panel.is-empty { min-height: 0; grid-template-rows: auto 1fr auto; }
.analytics-engagement-empty { min-height: 0; display: grid; align-content: center; padding: 14px 0; }
.analytics-engagement-empty div { display: grid; gap: 8px; }
.analytics-engagement-empty strong { color: #273246; font-size: 1rem; line-height: 1.3; }
.analytics-engagement-empty p { max-width: 410px; margin: 0; color: #8792a2; font-size: .7rem; line-height: 1.65; }
.analytics-insights { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; margin-bottom: 14px; overflow: hidden; border: 1px solid #e2e6ec; border-radius: 14px; background: #e8ebf0; }
.analytics-insights article { min-height: 116px; display: grid; align-content: center; gap: 7px; padding: 18px 21px; background: #fff; }
.analytics-insights span { color: #8e98a7; font-size: .61rem; font-weight: 690; }
.analytics-insights strong { color: var(--analytics-ink); font-size: 1.48rem; line-height: 1; letter-spacing: -.04em; }
.analytics-insights small { color: #a2abb8; font-size: .57rem; }
.analytics-insight-name { overflow: hidden; font-size: .79rem !important; line-height: 1.32 !important; text-overflow: ellipsis; white-space: nowrap; }
.analytics-section { margin-bottom: 14px; }
.analytics-panel-heading { padding: var(--analytics-card-pad); border-bottom: 1px solid #e9ecf1; }
.analytics-panel-heading small { color: #98a2b0; font-size: .59rem; }
.analytics-table table { min-width: 760px; }
.analytics-table th { color: #9aa4b2; font-size: .58rem; font-weight: 720; letter-spacing: .055em; text-transform: uppercase; }
.analytics-table td { color: #697588; font-size: .68rem; }
.analytics-table td > strong { color: #2f3a4d; font-variant-numeric: tabular-nums; }
.analytics-rank { width: 42px; color: #a1aab6 !important; font-variant-numeric: tabular-nums; }
.analytics-entity { min-width: 220px; display: grid; gap: 5px; }
.analytics-entity strong { overflow: hidden; max-width: 360px; color: #293448; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.analytics-entity span { overflow: hidden; max-width: 360px; color: #9aa3b0; font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.analytics-entity i { width: min(230px,100%); height: 3px; display: block; overflow: hidden; border-radius: 3px; background: #edf0f4; }
.analytics-entity i b { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#7557ff,#a08cff); }
.analytics-ctr { display: inline-flex; padding: 5px 8px; border-radius: 6px; color: #6350c5; background: #f1edff; font-weight: 740; }
.analytics-empty { min-height: 160px; display: grid; place-content: center; gap: 6px; padding: 30px; color: #9aa4b2; text-align: center; }
.analytics-empty strong { color: #596679; font-size: .79rem; }
.analytics-empty span { font-size: .64rem; }
.analytics-kpis-wide { grid-template-columns: repeat(3,minmax(0,1fr)); }
.analytics-kpis-wide .analytics-kpi { min-height: 178px; }
.analytics-kpis-wide .analytics-kpi-head { font-size: .74rem; }
.analytics-kpis-wide .analytics-kpi footer small { font-size: .66rem; }
.analytics-reading-score { min-height: 92px; display: grid; place-content: center; gap: 6px; border-radius: 14px; color: #fff; background: linear-gradient(145deg,#7557ff,#5f43df); text-align: center; box-shadow: 0 14px 28px rgba(117,87,255,.18); }
.analytics-reading-score strong { font-size: clamp(1.8rem,2.4vw,2.35rem); line-height: .95; letter-spacing: -.045em; }
.analytics-reading-score span { font-size: .64rem; font-weight: 680; line-height: 1.3; opacity: .78; }
.analytics-leaders { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--analytics-section-gap); margin-bottom: var(--analytics-section-gap); }
.analytics-leader { min-height: 224px; display: grid; grid-template-rows: auto 1fr auto; gap: 22px; padding: var(--analytics-card-pad); overflow: hidden; border: 1px solid #dfe4eb; border-radius: 14px; background: #fff; box-shadow: 0 12px 38px rgba(25,38,58,.05); }
.analytics-leader > header { display: flex; align-items: center; gap: 10px; }
.analytics-leader > header span { width: 28px; height: 28px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #6d50eb; background: #f0edff; font-size: .62rem; font-weight: 820; }
.analytics-leader > header strong { color: #697588; font-size: .7rem; font-weight: 760; }
.analytics-leader-title { display: -webkit-box; align-self: center; overflow: hidden; color: #202b3e; font-size: 1.08rem; font-weight: 720; line-height: 1.4; letter-spacing: -.025em; text-decoration: none; -webkit-box-orient: vertical; -webkit-line-clamp: 3; transition: color .18s ease; }
a.analytics-leader-title:hover { color: var(--analytics-purple); }
a.analytics-leader-title:focus-visible { border-radius: 4px; outline: 2px solid var(--analytics-purple); outline-offset: 4px; }
.analytics-leader footer { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; overflow: hidden; border: 1px solid #e8ebf0; border-radius: 10px; background: #e8ebf0; }
.analytics-leader footer div { min-width: 0; display: grid; align-content: center; gap: 5px; padding: var(--analytics-mini-pad); background: #f8f9fb; }
.analytics-leader footer b { overflow: hidden; color: #1e293b; font-size: .86rem; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.analytics-leader footer small { color: #919bab; font-size: .56rem; }
.analytics-leader.is-empty { background: linear-gradient(145deg,#fff,#fafbfc); }
.analytics-leader-empty { align-self: center; display: grid; gap: 7px; }
.analytics-leader-empty strong { color: #465267; font-size: 1rem; }
.analytics-leader-empty p { max-width: 260px; margin: 0; color: #919baa; font-size: .68rem; line-height: 1.55; }
.analytics-two-column { display: grid; grid-template-columns: minmax(320px,.72fr) minmax(0,1.28fr); gap: var(--analytics-section-gap); }
.analytics-placement-list { display: grid; gap: 0; padding: 4px var(--analytics-card-pad) var(--analytics-card-pad); }
.analytics-placement-list article { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px 18px; padding: 18px 0; border-bottom: 1px solid #eceff3; }
.analytics-placement-list article:last-child { border-bottom: 0; }
.analytics-placement-list div { display: grid; gap: 4px; }
.analytics-placement-list strong { color: #293448; font-size: .82rem; }
.analytics-placement-list div span,.analytics-placement-list small { color: #8d98a8; font-size: .68rem; }
.analytics-placement-list b { color: #172033; font-size: 1.28rem; }
.analytics-placement-list i { height: 5px; grid-column: 1/-1; overflow: hidden; border-radius: 99px; background: #edf0f4; }
.analytics-placement-list i span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#7557ff,#9d8aff); }
.analytics-placement-list small { grid-column: 1/-1; }
.analytics-placement-empty { min-height: 230px; display: grid; grid-template-columns: 46px minmax(0,1fr); align-content: center; gap: 16px; padding: var(--analytics-card-pad); }
.analytics-placement-empty > span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; color: #7557ff; background: #f0edff; font-size: 1.18rem; }
.analytics-placement-empty div { display: grid; gap: 7px; }
.analytics-placement-empty strong { color: #303b4d; font-size: .88rem; }
.analytics-placement-empty p { max-width: 390px; margin: 0; color: #8994a4; font-size: .68rem; line-height: 1.6; }
.analytics-link-list { display: grid; gap: 0; padding: 0 var(--analytics-card-pad) var(--analytics-card-pad); }
.analytics-link-list > article { min-width: 0; display: grid; grid-template-columns: 30px minmax(190px,1fr) minmax(250px,.8fr); align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid #e9edf2; }
.analytics-link-list > article:last-child { border-bottom: 0; }
.analytics-link-rank { color: #a0a9b6; font-size: .62rem; font-weight: 780; font-variant-numeric: tabular-nums; }
.analytics-link-main { min-width: 0; display: grid; gap: 5px; }
.analytics-link-main strong { overflow: hidden; color: #273246; font-size: .77rem; text-overflow: ellipsis; white-space: nowrap; }
.analytics-link-main a { overflow: hidden; color: #7557ff; font-size: .65rem; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.analytics-link-main a:hover { text-decoration: underline; }
.analytics-link-main span { color: #919baa; font-size: .61rem; }
.analytics-link-list dl { min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 0; }
.analytics-link-list dl div { min-width: 0; display: grid; align-content: center; gap: 5px; padding: var(--analytics-mini-pad); }
.analytics-link-list dt { color: #919baa; font-size: .56rem; }
.analytics-link-list dd { margin: 0; color: #283449; font-size: .79rem; font-weight: 760; font-variant-numeric: tabular-nums; }
.analytics-article-list { display: grid; gap: 10px; padding: 14px; }
.analytics-article-list > article { display: grid; grid-template-columns: minmax(280px,1.15fr) minmax(560px,1.85fr); align-items: center; gap: 22px; padding: 18px 20px; border: 1px solid #e5e8ed; border-radius: 12px; background: #fff; }
.analytics-article-main { min-width: 0; display: grid; grid-template-columns: 32px minmax(0,1fr); align-items: center; gap: 12px; }
.analytics-article-rank { color: #9aa4b2; font-size: .72rem; font-weight: 760; font-variant-numeric: tabular-nums; }
.analytics-article-list .analytics-entity { min-width: 0; }
.analytics-article-list .analytics-entity strong { max-width: 100%; font-size: .78rem; }
.analytics-article-list .analytics-entity span { max-width: 100%; font-size: .64rem; }
.analytics-article-list dl { min-width: 0; display: grid; grid-template-columns: repeat(8,minmax(58px,1fr)); gap: 10px; margin: 0; }
.analytics-article-list dl div { min-width: 0; display: grid; align-content: center; gap: 6px; padding: var(--analytics-mini-pad); }
.analytics-article-list dt { color: #929cab; font-size: .59rem; font-weight: 720; }
.analytics-article-list dd { margin: 0; color: #2c3749; font-size: .76rem; font-weight: 740; font-variant-numeric: tabular-nums; }
.analytics-filterbar { justify-content: flex-end; }
.analytics-coverage { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; margin: -4px 0 14px; overflow: hidden; border: 1px solid #e1e5eb; border-radius: 12px; background: #e8ebf0; }
.analytics-coverage div { display: grid; align-content: center; gap: 6px; padding: 16px var(--analytics-card-pad); background: #fff; }
.analytics-coverage strong { color: #394559; font-size: .69rem; }
.analytics-coverage span { color: #8792a2; font-size: .64rem; line-height: 1.45; }

@media (max-width: 1300px) {
  .analytics-article-list > article { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .analytics-coverage { grid-template-columns: 1fr; }
  .analytics-link-list > article { grid-template-columns: 28px minmax(0,1fr); }
  .analytics-link-list dl { grid-column: 2; }
  .analytics-article-list dl { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

@media (max-width: 520px) {
  .analytics-leaders { grid-template-columns: 1fr; }
  .analytics-leader { min-height: 210px; }
  .analytics-link-list { padding-inline: 16px; }
  .analytics-link-list > article { grid-template-columns: 1fr; }
  .analytics-link-rank { display: none; }
  .analytics-link-list dl { grid-column: 1; }
  .analytics-article-list { padding: 10px; }
  .analytics-article-list > article { gap: 18px; padding: 16px; }
  .analytics-article-list dl { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 10px; }
}

@keyframes analyticsAreaReveal { to { opacity: 1; } }
@keyframes analyticsBarGrow { to { transform: scaleY(1); } }

@media (max-width: 1100px) {
  .analytics-filterbar { grid-template-columns: minmax(260px,1fr) auto; }
  .analytics-period { grid-column: 2; }
  .analytics-kpis, .analytics-insights { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .analytics-overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .analytics-page { --analytics-card-pad:16px; --analytics-mini-pad:10px; --analytics-section-gap:10px; }
  .analytics-hero { align-items: start; flex-direction: column; gap: 18px; }
  .analytics-filterbar { grid-template-columns: 1fr; }
  .analytics-project-filter { grid-template-columns: 1fr; gap: 7px; }
  .analytics-project-filter select { max-width: none; }
  .analytics-period { width: 100%; grid-column: 1; justify-self: stretch; }
  .analytics-period label { flex: 1; }
  .analytics-period span { padding-inline: 5px; }
  .analytics-kpis { gap: var(--analytics-section-gap); }
  .analytics-kpi { min-height: 145px; padding: var(--analytics-card-pad); }
  .analytics-kpi footer small { display: none; }
  .analytics-traffic-panel, .analytics-conversion-panel { min-height: 0; padding: var(--analytics-card-pad); }
  .analytics-visual { overflow-x: auto; }
  .analytics-line-chart { min-width: 650px; }
  .analytics-insights { grid-template-columns: 1fr 1fr; }
}

/* Journal is intentionally quiet: only time, action, entity and project. */
.history-page-header { margin-bottom: 24px; }
.history-section-head { padding: 24px 26px 20px; border-bottom: 1px solid #e7ebf0; }
.history-section-head h2 { margin: 0; color: #18202f; font-size: 1.55rem; line-height: 1; letter-spacing: -.04em; }
.history-feed { padding: 0 26px 12px; }
.history-day { display: block; border-bottom: 1px solid #e7ebf0; }
.history-day:last-child { border-bottom: 0; }
.history-day > header { display: block; padding: 26px 0 10px; border-right: 0; }
.history-day > header h3 { margin: 0; color: #3d485a; font-size: .72rem; font-weight: 720; line-height: 1.35; }
.history-day ol { margin: 0; padding: 0; list-style: none; }
.history-entry { min-height: 72px; display: grid; grid-template-columns: 64px minmax(0,1fr) auto; align-items: center; gap: 18px; padding: 13px 0; border-bottom: 1px solid #edf0f3; }
.history-entry:last-child { border-bottom: 0; }
.history-entry time { color: #929cab; font-size: .66rem; font-variant-numeric: tabular-nums; }
.history-entry-copy { min-width: 0; display: grid; gap: 4px; }
.history-entry-copy > strong { overflow: hidden; color: #303b4d; font-size: .77rem; font-weight: 690; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.history-entry-copy > span { color: #909aa9; font-size: .64rem; line-height: 1.35; }
.history-project { max-width: 240px; overflow: hidden; padding: 0; color: #7c8798; background: transparent; border: 0; border-radius: 0; font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 760px) {
  .history-section-head { padding: 20px; }
  .history-feed { padding: 0 18px 8px; }
  .history-day > header { padding: 22px 0 8px; }
  .history-entry { grid-template-columns: 48px minmax(0,1fr); gap: 12px; }
  .history-project { max-width: none; grid-column: 2; }
}

@media (min-width: 1600px) {
  .history-feed { padding-inline: clamp(28px,1.7vw,44px); }
}

/* Keep the end of every admin page compact, including ultrawide screens. */
.main { padding-bottom: clamp(16px,1.5vw,28px); }
.main > [data-view]:not([hidden]) > :last-child,
.dashboard-page > :last-child,
.article-editor-page > :last-child { margin-bottom: 0; }

/* Compact CMS lists become labelled cards instead of horizontally scrolling tables. */
@media (max-width: 900px) {
  .table-wrap {
    margin: 0;
    padding: 0 14px 14px;
    overflow: visible;
  }
  .table-wrap table,
  .analytics-table table {
    width: 100%;
    min-width: 0;
    display: block;
    border-collapse: separate;
  }
  .table-wrap thead { display: none; }
  .table-wrap tbody {
    width: 100%;
    display: grid;
    gap: 12px;
  }
  .table-wrap tbody tr {
    width: 100%;
    height: auto;
    display: grid;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e1e6ec;
    border-radius: 12px;
    box-shadow: 0 7px 22px rgba(24,37,73,.045);
  }
  .table-wrap tbody tr:hover { background: #fff; }
  .table-wrap tbody td,
  .dashboard-sites .table-wrap tbody td {
    width: auto;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(108px,.42fr) minmax(0,1fr);
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    overflow-wrap: anywhere;
    border-bottom: 1px solid #edf0f3;
    font-size: .74rem;
    text-align: left !important;
  }
  .table-wrap tbody td:last-child { border-bottom: 0; }
  .table-wrap tbody td::before {
    min-width: 0;
    color: #8a95a5;
    content: attr(data-label);
    font-size: .58rem;
    font-weight: 780;
    letter-spacing: .055em;
    line-height: 1.35;
    text-transform: uppercase;
  }
  .dashboard-sites .status-cell .badge {
    width: max-content;
    max-width: 100%;
    margin: 0;
  }
  .dashboard-sites td.actions {
    width: auto;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    padding: 12px 14px;
    font-size: .74rem;
  }
  .dashboard-sites td.actions::before {
    grid-column: 1 / -1;
  }
  .dashboard-sites td.actions > .ghost,
  .dashboard-sites td.actions > .button,
  .dashboard-sites td.actions > :only-child {
    width: 100%;
    min-width: 0;
    margin: 3px 0;
  }
  .analytics-entity { min-width: 0; }
  .analytics-entity strong,
  .analytics-entity span { max-width: 100%; }
  .analytics-visual { overflow: visible; }
  .analytics-line-chart { min-width: 0; }
}

@media (max-width: 480px) {
  .table-wrap { padding-inline: 10px; }
  .table-wrap tbody td,
  .dashboard-sites .table-wrap tbody td,
  .dashboard-sites td.actions {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .dashboard-sites td.actions::before,
  .dashboard-sites td.actions > .ghost,
  .dashboard-sites td.actions > .button,
  .dashboard-sites td.actions > :only-child {
    grid-column: 1;
  }
}

/* Mobile CMS: compact login, one brand mark and touch-first controls. */
@media (max-width: 680px) {
  html,
  body { min-height: 100%; background: #02030a; }

  body:has(.app:not([hidden])) { background: #f4f6f9; }

  .login-shell {
    width: 100%;
    min-height: 100svh;
    height: auto;
    padding: max(20px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));
    place-items: start center;
    overflow: hidden;
  }

  .login-layout {
    width: min(100%,440px);
    min-height: 0;
    display: grid;
    align-content: start;
    gap: clamp(30px,8svh,58px);
    padding-top: clamp(8px,4svh,28px);
  }

  .login-context { min-height: 58px; display: block; }
  .login-brand {
    position: relative;
    top: auto;
    left: auto;
    width: 58px;
    height: 58px;
    aspect-ratio: 1;
  }
  .login-context > div { display: none; }
  .login-card { align-self: start; }
  .login-card h2 { margin-bottom: 10px; font-size: clamp(2.45rem,12vw,3.2rem); }
  .login-card > p:not(.eyebrow):not(.form-error) { margin-bottom: 28px; font-size: .88rem; }
  .login-card label { margin-top: 17px; }
  .login-card input { min-height: 56px; font-size: 16px; }
  .login-submit { min-height: 54px; margin-top: 8px; }
  .form-error { margin: 8px 0 0; }

  .app { min-height: 100dvh; background: #f4f6f9; }
  .sidebar {
    width: min(320px,calc(100vw - 20px));
    height: 100dvh;
    padding: max(14px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom));
    border-radius: 0 18px 18px 0;
    box-shadow: 24px 0 70px rgba(10,16,35,.3);
  }
  .sidebar-brand {
    width: 48px;
    height: 48px;
    aspect-ratio: 1;
    margin: 2px 0 20px 8px;
    overflow: hidden;
  }
  .sidebar-brand-full { display: none !important; }
  .sidebar-brand-mark { display: block !important; }
  .sidebar-close { top: max(16px,env(safe-area-inset-top)); right: 14px; width: 42px; height: 42px; }
  .site-context { margin-bottom: 16px; }
  .site-context-toggle { min-height: 56px; }
  .sidebar nav { gap: 16px; }
  .sidebar nav a { min-height: 42px; padding-inline: 11px; font-size: .86rem; }
  .sidebar-account { margin-top: 10px; padding-top: 12px; }

  .topbar {
    min-height: 60px;
    gap: 12px;
    padding: 8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));
  }
  .topbar::after {
    content: "MEVRICA CMS";
    color: #667085;
    font-size: .68rem;
    font-weight: 780;
    letter-spacing: .09em;
  }
  .nav-toggle { width: 44px; height: 44px; flex: 0 0 auto; background: #f4f6f9; border: 1px solid #e0e5ec; }
  .main { width: 100%; padding: 20px 12px max(20px,env(safe-area-inset-bottom)); }
  .dashboard-page,
  .article-editor-page { margin-top: 0; }
  .dashboard-header { gap: 18px; margin-bottom: 22px; }
  .dashboard-heading h1,
  .page-title h1 { font-size: clamp(2.15rem,10vw,2.8rem); line-height: .96; }
  .dashboard-heading > span { margin-top: 11px; font-size: .82rem; }
  .dashboard-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .metric-card { min-height: 132px; padding: 16px; }
  .panel { margin-bottom: 14px; padding: 15px; border-radius: 14px; }
  .page-title { gap: 14px; margin-bottom: 22px; }

  .article-editor-toolbar {
    position: sticky;
    top: 68px;
    z-index: 14;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 14px;
  }
  .article-editor-toolbar-copy { width: 100%; }
  .article-editor-toolbar-copy strong { max-width: calc(100vw - 96px); }
  .article-editor-toolbar-actions { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .article-editor-toolbar-actions .button,
  .article-editor-toolbar-actions .ghost { min-width: 0; min-height: 44px; padding-inline: 8px; font-size: .75rem; }
  .editor-card { padding: 16px; border-radius: 14px; }
  .editor-card-heading { gap: 10px; margin-bottom: 17px; padding-bottom: 14px; }
  .editor-field { margin-top: 15px; }
  .editor-field input,
  .editor-field select,
  .editor-field textarea { min-height: 50px; font-size: 16px; }
  .rich-editor { min-height: 128px; font-size: 16px; }
  .editor-block .block-grid { padding: 14px; }
  .block-controls { padding-left: 0; }
  .form-actions .button,
  .form-actions .ghost { min-height: 48px; }
}

@media (max-width: 360px) {
  .dashboard-metrics { grid-template-columns: 1fr; }
  .article-editor-toolbar-actions { grid-template-columns: 1fr; }
}

@media (max-width: 1180px) {
  .analytics-kpis-wide { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .analytics-leaders { grid-template-columns: 1fr; }
  .analytics-leader { min-height: 150px; }
  .analytics-two-column { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .analytics-kpis-wide { grid-template-columns: 1fr; }
  .analytics-kpis-wide .analytics-kpi { min-height: 150px; }
  .analytics-leader { min-height: 0; }
  .analytics-leader footer { align-items: start; flex-direction: column; }
  .analytics-leader footer small { text-align: left; }
  .analytics-placement-list { padding-inline: 16px; }
}

/* Adaptive analytics: keep interface labels and values on one line. */
.analytics-page,
.analytics-page > *,
.analytics-hero .dashboard-heading,
.analytics-panel > header > div,
.analytics-panel-heading > div,
.analytics-kpi-head > span:last-child,
.analytics-kpi footer small {
  min-width: 0;
}

.analytics-hero .dashboard-heading h1,
.analytics-period span,
.analytics-kpi-head > span:last-child,
.analytics-kpi > strong,
.analytics-delta,
.analytics-kpi footer small,
.analytics-chart-legend span,
.analytics-panel header h2,
.analytics-panel-heading h2,
.analytics-panel-heading small,
.analytics-traffic-panel > header > strong,
.analytics-conversion-numbers strong,
.analytics-conversion-numbers span,
.analytics-leader > header strong,
.analytics-leader footer b,
.analytics-leader footer small,
.analytics-placement-list strong,
.analytics-placement-list div span,
.analytics-placement-list b,
.analytics-placement-list small,
.analytics-link-list dt,
.analytics-link-list dd,
.analytics-article-list dt,
.analytics-article-list dd {
  white-space: nowrap;
}

.analytics-kpi-head > span:last-child,
.analytics-kpi footer small,
.analytics-panel header h2,
.analytics-panel-heading h2,
.analytics-panel-heading small,
.analytics-leader > header strong,
.analytics-leader footer b,
.analytics-leader footer small,
.analytics-placement-list strong,
.analytics-placement-list div span,
.analytics-placement-list small,
.analytics-link-list dt,
.analytics-link-list dd,
.analytics-article-list dt,
.analytics-article-list dd {
  overflow: hidden;
  text-overflow: ellipsis;
}

.analytics-kpi footer small {
  overflow-wrap: normal;
  white-space: nowrap;
}

.analytics-panel-heading > small {
  max-width: 46%;
}

.analytics-conversion-numbers {
  grid-template-columns: 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #e8ebf0;
  border-radius: 10px;
  background: #e8ebf0;
}

.analytics-conversion-numbers div {
  min-width: 0;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  overflow: hidden;
  background: #f8f9fb;
}

.analytics-conversion-numbers strong {
  grid-column: 2;
  grid-row: 1;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.analytics-conversion-numbers span {
  grid-column: 1;
  grid-row: 1;
  font-size: .62rem;
  font-weight: 680;
}

.analytics-traffic-panel {
  min-height: 0;
}

.analytics-traffic-panel .analytics-line-chart {
  top: 0;
}

.analytics-table th,
.analytics-table td:not(:nth-child(2)) {
  overflow-wrap: normal;
  white-space: nowrap;
}

.analytics-article-list dl {
  grid-template-columns: repeat(4,minmax(96px,1fr));
}

@media (max-width: 1300px) {
  .analytics-link-list > article {
    grid-template-columns: 28px minmax(0,1fr);
  }

  .analytics-link-list dl {
    grid-column: 2;
  }
}

@media (max-width: 520px) {
  .analytics-panel-heading > small {
    display: none;
  }

  .analytics-link-list > article {
    grid-template-columns: 1fr;
  }

  .analytics-link-rank {
    display: none;
  }

  .analytics-link-list dl {
    grid-column: 1;
  }

  .analytics-article-list dl {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .analytics-leader footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .analytics-hero .dashboard-heading h1 {
    font-size: clamp(1.55rem,7.2vw,2rem);
    letter-spacing: -.055em;
  }

  .analytics-traffic-panel > header {
    gap: 10px;
  }

  .analytics-traffic-panel > header h2 {
    font-size: .94rem;
  }

  .analytics-traffic-panel > header > strong {
    flex: 0 0 auto;
    font-size: 1rem;
  }
}
