/* Susume Tech. Palette and feel follow the CI/CD guide the team writes in. */
:root {
  --font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1100px;
  --read-width: 760px;
  --color-bg: #05071e;
  --color-text: #ffffff;
  --color-text-muted: #c8c6e3;
  --color-header-bg: #1b1933;
  --color-card-bg: #131428;
  --color-accent: #524dd3;
  --color-accent-hover: #4a45be;
  --color-accent-soft: #9f9bf2;
  --color-shadow: #524dd366;
  --color-code-bg: #0c0e2b;
  --color-border: #2a2c55;
  --color-footer-text: #9a98c0;
  --color-tint: linear-gradient(135deg, #05071e 0%, #14153f 100%);
  --radius-card: 16px;
}

html, body { font-family: var(--font-family); }

body {
  background-color: var(--color-bg);
  color: #e8e7f7;
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a, .btn-link { color: var(--color-accent-soft); text-decoration: none; transition: color .3s; }
a:hover { color: #ffffff; }

h1, h2, h3, h4 { color: #ffffff; font-weight: 700; }
p { color: var(--color-text-muted); }

.btn { border-radius: 50px; }
.btn-primary {
  color: #fff;
  font-weight: 600;
  background: var(--color-accent);
  border: none;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { color: #fff; background: var(--color-accent-hover); }
.btn-primary:disabled { color: #fff; background: var(--color-accent); }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem var(--color-bg), 0 0 0 0.25rem var(--color-accent);
}

.wrapper { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 560px; margin: 4rem auto; padding: 0 1.25rem; }
.empty { text-align: center; padding: 3rem 0; }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 1000; padding: 14px 1rem 0; }
.site-nav {
  max-width: var(--max-width); margin: 0 auto; padding: .45rem 1.5rem;
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.5rem;
  background: var(--color-header-bg); border-radius: 50px; box-shadow: 0 2px 15px rgba(0,0,0,.25);
}
.brand { font-weight: 700; font-size: 1.2rem; color: var(--color-text); text-decoration: none; }
.brand:hover { color: var(--color-text); }
.brand span { color: var(--color-accent-soft); }
.nav-links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.nav-links a, .nav-user a { color: #c8c6e3; text-decoration: none; font-weight: 500; transition: color .3s ease; }
.nav-links a:hover, .nav-links a.active, .nav-user a:hover { color: #fff; }
.nav-user { margin-left: auto; display: flex; align-items: center; gap: 1rem; font-size: .9rem; }
.nav-user form { margin: 0; }

/* ---- Sign-up form (hero, post, footer) ---- */
.subscribe-form { display: flex; gap: .5rem; max-width: 460px; margin: 1.5rem auto 0; }
.subscribe-form .form-control { flex: 1; min-width: 0; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.sub-status { text-align: center; padding: .7rem 1rem; font-weight: 500; }
.sub-ok { background: #14532d; color: #dcfce7; }
.sub-already { background: #1f2240; color: #e8e7f7; }
.sub-invalid { background: #7f1d1d; color: #fee2e2; }

/* ---- Home ---- */
.hero {
  text-align: center; padding: 5rem 1rem 4rem;
  background: linear-gradient(180deg, #05071e 0%, #16174a 100%);
}
.hero h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); font-weight: 700; margin-bottom: 1rem; }
.hero h1 span { color: var(--color-text); }
.hero p { font-size: 1.15rem; max-width: 600px; margin: 0 auto; }
.hero-fine { display: block; margin-top: .75rem; color: var(--color-footer-text); }

.posts { padding-top: 3rem; padding-bottom: 3rem; flex: 1; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 360px)); justify-content: center; gap: 1.5rem; }
.post-grid-wide { grid-column: 1 / -1; }
.post-grid-wide .ad-slot { margin: 0; }

.post-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--color-card-bg); border-radius: var(--radius-card); overflow: hidden;
  border: 1px solid transparent; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px var(--color-shadow); border-color: var(--color-accent); color: inherit; }
.post-card-thumb { width: 100%; height: 170px; object-fit: cover; }
.post-card-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.post-card h2 { font-size: 1.2rem; color: #fff; margin: .5rem 0; }
.post-card p { font-size: .92rem; margin: 0 0 1rem; }
.post-card-foot { margin-top: auto; justify-content: space-between; }

.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; color: var(--color-footer-text); font-size: .85rem; }
.badge-pill {
  border: 1px solid var(--color-accent); color: var(--color-accent-soft);
  border-radius: 999px; padding: 0 .6rem; font-size: .72rem; font-weight: 600;
}
.badge-draft { border-color: #f59e0b; color: #f59e0b; }

.pager { display: flex; justify-content: center; align-items: center; gap: 1.5rem; margin-top: 2.5rem; color: var(--color-footer-text); }

/* ---- Ads ---- */
.ad-slot {
  position: relative; border: 1px dashed var(--color-border); border-radius: var(--radius-card);
  padding: 1.6rem 1rem 1rem; margin: 2rem 0; background: rgba(148,163,184,.05);
}
.ad-slot-label {
  position: absolute; top: .35rem; left: .75rem; font-size: .65rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--color-footer-text);
}
.ad-house, .ad-partner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.ad-house strong { color: #fff; }
.ad-partner-badge { background: var(--color-accent); color: #fff; font-weight: 700; padding: .1rem .6rem; border-radius: 6px; }

/* ---- Post page ---- */
.post-hero {
  padding: 4rem 0 2.5rem;
  background: linear-gradient(180deg, #05071e 0%, #16174a 100%);
}
.post-hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); font-weight: 700; }
.post-hero .wrapper, .post-hero h1 { text-align: center; }
.post-hero .post-meta { justify-content: center; }
.post-hero .wrapper > *, .post-wrapper > * { max-width: var(--read-width); margin-left: auto; margin-right: auto; }
.post-wrapper { padding-top: 2rem; padding-bottom: 4rem; }
.post-cover { width: 100%; border-radius: var(--radius-card); margin-bottom: 2rem; }
.draft-banner { background: #78350f; color: #fef3c7; padding: .6rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.draft-banner a { color: #fde68a; }

.post-body { font-size: 1.05rem; }
.post-body h2 { margin: 2.5rem 0 1rem; font-size: 1.7rem; }
.post-body h3 { margin: 1.75rem 0 .75rem; font-size: 1.25rem; }
.post-body h4 { color: #fff; margin: 1.25rem 0 .5rem; }
.post-body p, .post-body li { color: var(--color-text-muted); }
.post-body p { margin: 0 0 1rem; }
.post-body ul, .post-body ol { margin: 0 0 1.25rem 1.5rem; }
.post-body img { max-width: 100%; border-radius: 8px; }
.post-body blockquote { border-left: 4px solid var(--color-border); padding-left: 1rem; color: var(--color-footer-text); }
.post-body :not(pre) > code { background: var(--color-code-bg); color: var(--color-accent-soft); padding: .1rem .4rem; border-radius: 4px; font-size: .9em; }
.post-body table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; font-size: .95rem; }
.post-body th, .post-body td { border: 1px solid var(--color-border); padding: .5rem .75rem; color: var(--color-text-muted); }
.post-body th { background: var(--color-card-bg); color: #fff; }

/* Code blocks, with the copy button that post.js adds */
.post-body pre, .format-help pre {
  position: relative; background: var(--color-code-bg); color: #e2e8f0; border-left: 4px solid var(--color-accent);
  border-radius: 8px; padding: 1.25rem 1.5rem; margin: 1.5rem 0; overflow-x: auto;
  font-family: 'Courier New', monospace; line-height: 1.5; font-size: .9rem;
}
.post-body pre code { color: inherit; background: none; padding: 0; }
.copy-btn {
  position: absolute; top: .5rem; right: .5rem; background: var(--color-code-bg);
  border: 1px solid var(--color-accent); color: var(--color-accent-soft); padding: .15rem .7rem;
  border-radius: 4px; font-size: .75rem; cursor: pointer; transition: all .2s ease;
}
.copy-btn:hover { background: var(--color-accent); color: #fff; }

/* Callout containers: ::: highlight | analogy | warning */
.post-body .highlight, .post-body .analogy, .post-body .warning {
  background: var(--color-card-bg); border-radius: 8px; padding: 1.25rem 1.5rem; margin: 1.5rem 0;
  border-left: 4px solid var(--color-accent);
}
.post-body .analogy { background: #1f2240; border-left-color: #8b5cf6; }
.post-body .warning { background: #3b2a10; border-left-color: #f59e0b; }
.post-body .highlight > :last-child, .post-body .analogy > :last-child, .post-body .warning > :last-child { margin-bottom: 0; }

/* ::: steps wraps an ordered list into numbered cards */
.post-body .steps ol { list-style: none; margin: 1rem 0; padding: 0; counter-reset: step; }
.post-body .steps li {
  counter-increment: step; position: relative; background: var(--color-card-bg);
  border-radius: 8px; padding: 1.1rem 1.25rem 1.1rem 4rem; margin-bottom: .75rem;
}
.post-body .steps li::before {
  content: counter(step); position: absolute; left: 1.1rem; top: 1rem; width: 30px; height: 30px;
  border-radius: 50%; background: var(--color-accent); color: #fff;
  text-align: center; line-height: 30px; font-weight: 700;
}

/* :::: tabs. Without JS every tab is simply shown one after the other. */
.post-body .tabs { margin: 1.5rem 0; }
.tab-list { display: flex; border-bottom: 1px solid var(--color-border); margin-bottom: 1rem; overflow-x: auto; }
.tab-btn {
  background: none; border: none; border-bottom: 3px solid transparent; color: var(--color-text-muted);
  padding: .75rem 1.5rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all .3s ease;
}
.tab-btn:hover { color: #fff; }
.tab-btn.active { color: #fff; border-bottom-color: var(--color-accent); }
.tabs.js-tabs > .tab { display: none; }
.tabs.js-tabs > .tab.active { display: block; }

.post-subscribe {
  margin-top: 3rem; padding: 2rem; border-radius: var(--radius-card); text-align: center;
  background: linear-gradient(180deg, #05071e 0%, #16174a 100%);
}
.post-subscribe h2 { font-size: 1.3rem; color: #fff; }

/* ---- Editor ---- */
.editor { padding-top: 2.5rem; padding-bottom: 3rem; max-width: 900px; }
.content-input { font-family: 'Courier New', monospace; font-size: .92rem; }
.preview-pane { border: 1px solid var(--color-border); border-radius: 8px; padding: 1.5rem; min-height: 200px; }
.cover-chooser { display: flex; align-items: center; gap: .75rem; border: 1px solid var(--color-border); border-radius: 8px; padding: .5rem .75rem; }
.cover-thumb { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; }

.editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; padding: .4rem; border: 1px solid var(--color-border); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--color-card-bg); }
.editor-toolbar + .content-input { border-radius: 0 0 8px 8px; }
.editor-toolbar > button, .toolbar-dropdown > button { min-width: 2rem; padding: .25rem .55rem; font-size: .85rem; color: var(--color-text-muted); background: transparent; border: 1px solid transparent; border-radius: 6px; }
.editor-toolbar > button:hover, .toolbar-dropdown > button:hover { color: #fff; background: var(--color-header-bg); border-color: var(--color-border); }
.editor-toolbar .sep { width: 1px; align-self: stretch; margin: .2rem .35rem; background: var(--color-border); }
.toolbar-dropdown { position: relative; }

.menu-overlay { position: fixed; inset: 0; z-index: 1040; }
.editor-menu { z-index: 1050; min-width: 200px; padding: .35rem; background: var(--color-header-bg); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 10px 30px #000a; }
.editor-menu button { display: block; width: 100%; padding: .35rem .65rem; text-align: left; font-size: .9rem; color: #e8e7f7; background: transparent; border: 0; border-radius: 6px; }
.editor-menu button:hover { background: var(--color-accent); }
.editor-menu hr { margin: .3rem 0; border-color: var(--color-border); opacity: 1; }
.editor-menu .menu-label { padding: .2rem .65rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--color-footer-text); }
.editor-menu .icon-row { display: flex; gap: .15rem; }
.editor-menu .icon-row button { text-align: center; padding: .35rem .45rem; }
.dropdown-list { position: absolute; top: 100%; left: 0; margin-top: .25rem; }
.context-menu { position: fixed; width: 240px; max-height: calc(100vh - 16px); overflow-y: auto; }

.picker-modal { background: #000a; overflow-y: auto; z-index: 1055; }
.modal-backdrop { z-index: 1050; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.picker-item { display: flex; flex-direction: column; gap: .35rem; padding: .35rem; text-align: left; color: var(--color-text-muted); background: var(--color-card-bg); border: 2px solid var(--color-border); border-radius: 10px; }
.picker-item:hover, .picker-item.selected { border-color: var(--color-accent-soft); }
.picker-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.picker-item span { font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.format-help summary { cursor: pointer; color: var(--color-accent-soft); }
.format-help pre { white-space: pre-wrap; }
.manage-table a { text-decoration: none; }

/* ---- Footer ---- */
.site-footer {
  margin-top: auto; background: var(--color-header-bg); padding: 2.5rem 0 1.25rem;
  color: var(--color-footer-text); border-top: 1px solid rgba(255,255,255,.05);
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 1.25rem 2rem;
}
.footer-inner h2 { font-size: 1.15rem; margin: 0; color: #fff; }
.footer-inner p { margin: .25rem 0 0; font-size: .9rem; }
.footer-inner .subscribe-form { margin: 0; flex: 1 1 320px; }
.footer-legal { display: block; text-align: center; margin-top: 2rem; }
/* The team sign-in: looks like the plain copyright sign, only the focus ring gives it away. */
.team-door, .team-door:hover { color: inherit; text-decoration: none; }
.team-door:focus-visible { outline: 2px solid var(--color-accent-soft); outline-offset: 2px; border-radius: 3px; }

#blazor-error-ui {
  color-scheme: light only; background: lightyellow; color: #222; bottom: 0;
  box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0;
  padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* Reconnect modal: Blazor sets components-reconnect-{show,retrying,failed,rejected} on the element. */
#components-reconnect-modal {
  display: none; position: fixed; inset: 0; z-index: 2000; align-items: center; justify-content: center;
  padding: 1.25rem; background: rgba(5,7,30,.8); backdrop-filter: blur(4px);
}
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected { display: flex; }
.reconnect-card {
  width: 100%; max-width: 400px; text-align: center; padding: 2rem 1.75rem; color: var(--color-text);
  background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: var(--radius-card);
  box-shadow: 0 10px 40px var(--color-shadow); font-family: var(--font-family);
}
.reconnect-card h2 { font-size: 1.25rem; font-weight: 700; margin: 1rem 0 .5rem; }
.reconnect-card p { margin: 0; color: var(--color-text-muted); font-size: .95rem; }
.reconnect-card button {
  margin-top: 1.5rem; padding: .6rem 1.5rem; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--color-accent); color: #fff; font: inherit; font-weight: 600;
}
.reconnect-card button:hover { background: var(--color-accent-hover); }
.reconnect-card button:focus-visible { outline: 2px solid var(--color-accent-soft); outline-offset: 2px; }
.reconnect-spinner {
  display: inline-block; width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--color-border); border-top-color: var(--color-accent-soft);
  animation: reconnect-spin .9s linear infinite;
}
@keyframes reconnect-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .reconnect-spinner { animation-duration: 3s; } }
/* Show only the copy that matches the current state. */
.rc-show, .rc-retrying, .rc-failed, .rc-rejected { display: none; }
.components-reconnect-show .rc-show, .components-reconnect-retrying .rc-retrying,
.components-reconnect-failed .rc-failed, .components-reconnect-rejected .rc-rejected { display: inline; }
.components-reconnect-failed button.rc-failed, .components-reconnect-rejected button.rc-rejected { display: inline-block; }
.components-reconnect-failed .reconnect-spinner, .components-reconnect-rejected .reconnect-spinner { display: none; }

h1:focus { outline: none; }
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* Bootstrap's dark theme, tuned to the susume.tech palette */
[data-bs-theme=dark] {
  --bs-body-bg: #05071e;
  --bs-body-color: #e8e7f7;
  --bs-border-color: #2a2c55;
  --bs-tertiary-bg: #131428;
  --bs-link-color: #9f9bf2;
}
.form-control, .form-select { background-color: #131428; border-color: #2a2c55; color: #fff; }
.form-control:focus, .form-select:focus { background-color: #131428; color: #fff; border-color: #524dd3; }
.form-control::placeholder { color: #7f7da8; }

.editor.editor-wide { max-width: 1500px; }
.split-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.split-preview { max-height: 41rem; overflow-y: auto; }
@media (max-width: 991px) { .split-view { grid-template-columns: minmax(0, 1fr); } }
.editor-toolbar > button:disabled { opacity: .35; pointer-events: none; }

.keyword-box { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .4rem .5rem; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-card-bg); }
.keyword-box:focus-within { border-color: var(--color-accent-soft); }
.keyword-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .2rem .1rem .6rem; font-size: .85rem; color: #fff; background: var(--color-accent); border-radius: 999px; }
.keyword-chip button { padding: 0 .4rem; color: #fff; background: transparent; border: 0; border-radius: 999px; line-height: 1.4; }
.keyword-chip button:hover { background: #0004; }
.keyword-input { flex: 1 1 10rem; min-width: 8rem; padding: .2rem; color: inherit; background: transparent; border: 0; outline: 0; }
.keyword-suggest { position: absolute; z-index: 1030; margin-top: .25rem; min-width: 240px; max-width: 90vw; }

/* ---- Admin dashboard ---- */
.dashboard { max-width: 1100px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .15rem; }
.stat span { color: var(--color-footer-text); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.stat strong { font-size: 1.9rem; color: #fff; line-height: 1.2; }
.stat small { color: var(--color-footer-text); }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.chart-card { background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 1rem 1.2rem .5rem; min-width: 0; }
.chart-card.wide { grid-column: 1 / -1; }
.chart-card h2 { font-size: 1rem; margin-bottom: .5rem; }
@media (max-width: 800px) { .chart-grid { grid-template-columns: minmax(0, 1fr); } }
