:root {
  --page: #f7f8fa;
  --surface: #fff;
  --ink: #172033;
  --brand: #1e40af;
  --teal: #0f766e;
  --border: #e2e8f0;
  --muted: #657185;
  --bs-primary: #1e40af;
  --bs-primary-rgb: 30, 64, 175;
  --radius: 8px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 110px;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  font-size: 15px;
  line-height: 1.65;
}
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
textarea,
select {
  font: inherit;
}
button:disabled {
  opacity: 0.35;
}
img {
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3 {
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.035em;
}
h1 {
  font-size: clamp(1.9rem, 3vw, 2.7rem);
}
h2 {
  font-size: 1.5rem;
}
h3 {
  font-size: 1.12rem;
}
p {
  margin-bottom: 1rem;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #0f766e;
  outline-offset: 4px;
  box-shadow: none !important;
}
.container {
  max-width: 1240px;
  padding-left: 24px;
  padding-right: 24px;
}
.btn {
  border-radius: 5px;
  padding: 0.55rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 600;
}
.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: #16358f;
  --bs-btn-hover-border-color: #16358f;
}
.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: #b8c5e4;
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
}
.form-control,
.form-select {
  border-color: #ccd5df;
  padding: 0.65rem 0.8rem;
  border-radius: 5px;
  color: var(--ink);
}
label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.form-check-label {
  font-weight: 400;
}
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 100px;
}
.brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.desktop-logo {
  width: 275px;
  height: auto;
}
#main-nav {
  display: flex;
  gap: 22px;
  align-items: center;
}
#main-nav a {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
  padding: 12px 0;
  position: relative;
}
#main-nav a.active {
  color: var(--brand);
}
#main-nav a.active:after {
  content: '';
  height: 2px;
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  background: var(--brand);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.icon-button {
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 40px;
}
.menu-toggle {
  display: none;
}
.login-link {
  white-space: nowrap;
  font-size: 0.75rem;
  padding: 0.45rem 0.7rem;
}
.public-main {
  padding-top: 28px;
  padding-bottom: 48px;
  min-height: 55vh;
}
.home-kicker {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: var(--muted);
}
.home-kicker span:last-child {
  color: var(--teal);
  letter-spacing: 0;
}
.featured-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 26px;
}
.post-card {
  min-width: 0;
}
.image-link {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: #e3e8e5;
}
.post-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.post-info {
  padding-top: 10px;
}
.eyebrow {
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 5px;
}
.post-card h3 {
  margin: 0 0 7px;
}
.post-card h3 a {
  color: var(--ink);
}
.post-card p {
  font-size: 0.87rem;
  line-height: 1.5;
  margin-bottom: 9px;
  color: #404c60;
}
.meta {
  font-size: 0.72rem;
  line-height: 1.5;
  color: #526077;
}
.meta span {
  margin: 0 5px;
}
.featured-main h3 {
  font-size: 1.65rem;
}
.featured-main p {
  font-size: 0.95rem;
}
.featured-side {
  display: grid;
  gap: 24px;
  align-content: start;
}
.compact {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 19px;
}
.compact .image-link {
  align-self: start;
}
.compact img {
  aspect-ratio: 1.34;
}
.compact .post-info {
  padding: 0;
}
.compact h3 {
  font-size: 1.15rem;
}
.compact p {
  font-size: 0.81rem;
}
.home-section {
  border-top: 1px solid var(--border);
  margin-top: 28px;
  padding-top: 22px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 17px;
}
.section-title h2 {
  margin: 0;
}
.section-title > a {
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
}
.section-title > a i {
  margin-left: 5px;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
}
.post-grid .post-card img {
  aspect-ratio: 2.25;
}
.category-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 27px 0;
}
.category-strip > a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 650;
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
}
.category-strip > a > i:first-child {
  color: var(--teal);
  font-size: 1.1rem;
}
.category-strip > a > i:last-child {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--muted);
}
.home-bottom {
  display: grid;
  grid-template-columns: 1.8fr 0.95fr 0.75fr;
  gap: 20px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
}
.home-bottom h2 {
  font-size: 1.2rem;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.video-thumb {
  position: relative;
  border-radius: 7px;
  overflow: hidden;
}
.video-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 45px;
  height: 45px;
  border: 2px solid white;
  background: #17203377;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-size: 27px;
}
.duration {
  position: absolute;
  bottom: 7px;
  right: 7px;
  background: #172033dc;
  color: white;
  padding: 0 5px;
  font-size: 0.7rem;
  border-radius: 3px;
}
.video-card h3 {
  color: var(--ink);
  font-size: 0.88rem;
  margin: 9px 0 5px;
}
.today-box {
  background: #eaf5f3;
  padding: 18px;
  border-radius: 7px;
}
.today-box h2 {
  color: var(--teal);
}
.today-box > a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #d6e9e5;
  font-size: 0.74rem;
  line-height: 1.45;
}
.today-box > a:last-child {
  border: 0;
  padding-bottom: 0;
}
.today-box i {
  font-size: 1rem;
}
.today-box small {
  display: block;
  color: var(--muted);
  font-size: 0.65rem;
  margin-top: 3px;
}
.author-box {
  background: #eef1f5;
  padding: 18px;
  border-radius: 7px;
}
.avatar {
  width: 61px;
  height: 61px;
  background: #dce8e4;
  color: var(--teal);
  border: 1px solid #c9ddd6;
  border-radius: 50%;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  font-weight: 750;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}
.author-box h2 {
  font-size: 1rem;
  margin: 13px 0 8px;
}
.author-box p {
  font-size: 0.8rem;
  line-height: 1.55;
}
.author-box > a {
  font-size: 0.75rem;
  font-weight: 600;
}
.site-footer {
  background: #f0f3f7;
  border-top: 1px solid #d7deea;
  padding: 35px 0 24px;
}
.site-footer .footer-intro > a {
  display: inline-block;
  max-width: 100%;
}
.site-footer .footer-intro img {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
}
.site-footer .footer-intro p {
  color: #526077;
  font-size: 0.95rem;
  margin: 8px 0 14px;
}
.site-footer .footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #c9d3e2;
  border-bottom: 1px solid #c9d3e2;
  padding: 18px 0;
  margin-bottom: 20px;
  gap: 25px;
}
.footer-columns h2 {
  font-size: 1.1rem;
  color: var(--teal);
  margin-bottom: 13px;
}
.footer-columns ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-columns li {
  margin-bottom: 7px;
  font-size: 0.88rem;
}
.footer-columns a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-bottom p {
  margin-bottom: 4px;
  font-size: 0.9rem;
}
.footer-bottom small {
  font-size: 0.75rem;
  color: #526077;
}
.page-heading {
  padding: 18px 0 24px;
  max-width: 800px;
}
.page-heading h1 {
  margin-bottom: 12px;
}
.page-heading p {
  color: #59667a;
}
.search-form {
  max-width: 700px;
  margin-bottom: 26px;
}
.listing-grid {
  row-gap: 32px;
}
.pagination-wrap {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}
.page-number {
  min-width: 36px;
  min-height: 38px;
  display: grid;
  place-items: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: 5px;
}
.page-number.selected {
  background: var(--brand);
  color: white;
}
.empty-state {
  text-align: center;
  padding: 50px 20px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  margin: 20px 0;
  background: white;
}
.empty-state > i {
  font-size: 2rem;
  color: var(--teal);
}
.empty-state h2 {
  font-size: 1.4rem;
  margin: 15px 0;
}
.reading-width {
  max-width: 780px;
  margin: 0 auto;
}
.breadcrumb-line {
  display: flex;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 8px 0 27px;
  flex-wrap: wrap;
}
.article h1 {
  margin: 5px 0 16px;
}
.lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #536076;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  font-size: 0.84rem;
}
.small-avatar {
  width: 38px;
  height: 38px;
  font-size: 0.78rem;
}
.article-meta small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 2px;
}
figure img {
  width: 100%;
  border-radius: 7px;
  display: block;
}
figcaption {
  font-size: 0.73rem;
  color: var(--muted);
  margin-top: 9px;
}
.article-content {
  font-size: 1.065rem;
  line-height: 1.9;
}
.article-content h2 {
  margin-top: 32px;
  margin-bottom: 15px;
  font-size: 1.65rem;
}
.article-content h3 {
  margin-top: 27px;
  font-size: 1.25rem;
}
.article-content p {
  margin-bottom: 20px;
}
.article-content li {
  padding-left: 5px;
  margin: 6px 0;
}
blockquote {
  border-left: 3px solid var(--teal);
  padding: 15px 21px;
  background: #edf5f3;
  color: #34564f;
  font-size: 1.08rem;
}
.toc {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 21px 25px;
  margin: 25px 0;
}
.toc b {
  font-size: 0.9rem;
  display: block;
  margin-bottom: 8px;
}
.toc a {
  display: block;
  font-size: 0.9rem;
  padding: 3px 0;
}
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.table-scroll table {
  min-width: 540px;
}
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ink);
  --bs-table-border-color: var(--border);
  font-size: 0.9rem;
}
.table > :not(caption) > * > * {
  padding: 13px 12px;
}
.code-block {
  background: #182d3e;
  color: #deebe8;
  border-radius: 7px;
  overflow: hidden;
  margin: 22px 0;
  max-width: 100%;
}
.code-block > div {
  padding: 9px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  background: #233c4f;
  gap: 10px;
}
.copy-button {
  color: white;
  background: none;
  border: 1px solid #66818c;
  border-radius: 4px;
  font-size: 0.7rem;
  padding: 3px 8px;
  white-space: nowrap;
}
.code-block pre {
  overflow-x: auto;
  margin: 0;
  padding: 22px;
  font-size: 0.82rem;
  line-height: 1.9;
}
.copy-status {
  font-size: 0.75rem;
  display: block;
  padding: 0 12px;
}
.report-link {
  font-size: 0.8rem;
  display: inline-block;
  margin: 18px 0;
}
.article-author {
  display: flex;
  gap: 22px;
  background: #eef3f5;
  border-radius: 7px;
  padding: 25px;
  margin: 28px 0;
}
.article-author h2 {
  font-size: 1.2rem;
}
.article-author p {
  font-size: 0.92rem;
  margin-bottom: 5px;
}
.article-author a {
  font-size: 0.8rem;
}
.comments-section {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  margin-top: 35px;
}
.comment {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.comment p {
  margin: 9px 0;
}
.comment-reply {
  background: white;
  border-left: 2px solid #b7d5cc;
  padding: 15px 18px;
  margin: 15px 0 3px;
  font-size: 0.85rem;
}
.comment-signin {
  padding: 25px;
  background: white;
  text-align: center;
  margin-top: 22px;
  border-radius: 6px;
}
.comments-section form {
  margin-top: 25px;
}
.notice {
  border: 1px solid #cde0dc;
  border-left: 3px solid var(--teal);
  background: #edf6f3;
  padding: 14px 18px;
  border-radius: 5px;
  margin-bottom: 22px;
  color: #345950;
  font-size: 0.87rem;
}
.notice p {
  margin: 6px 0 0;
}
.info-page {
  padding: 20px 0 35px;
  min-height: 40vh;
}
.info-page h1 {
  margin-bottom: 25px;
}
.info-page .lead {
  font-size: 1.1rem;
}
.contact-form {
  background: white;
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: 7px;
}
.submission-preview {
  background: #edf6f3;
  padding: 25px;
  margin-top: 25px;
  border-radius: 7px;
}
.submission-preview h2 {
  font-size: 1.3rem;
}
.preserve-lines {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.auth-card {
  max-width: 460px;
  margin: 25px auto 40px;
  padding: 32px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.auth-card h1 {
  font-size: 1.8rem;
  margin: 12px 0;
}
.auth-card > p {
  font-size: 0.9rem;
}
.auth-card .eyebrow {
  margin-top: 15px;
}
.auth-icon {
  display: inline-grid;
  place-items: center;
  width: 55px;
  height: 55px;
  border-radius: 12px;
  background: #edf3f9;
  color: var(--brand);
  font-size: 1.5rem;
}
.preview-link {
  display: block;
  margin-top: 24px;
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.otp-input {
  letter-spacing: 0.4em;
  font-size: 1.25rem;
}
.demo-result {
  color: var(--teal);
  font-size: 0.82rem;
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}
.demo-result:empty {
  display: none;
}
.preview-state {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  font-size: 0.9rem;
}
.collection-box {
  padding: 25px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--ink);
}
.collection-box > i {
  font-size: 1.7rem;
  color: var(--teal);
}
.collection-box h3 {
  margin: 15px 0 10px;
}
.collection-box p {
  font-size: 0.9rem;
  color: var(--muted);
}
.collection-box small {
  color: var(--brand);
}
.video-player {
  position: relative;
  background: #162b3b;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  margin: 25px 0 15px;
  display: grid;
  place-items: center;
}
.video-player > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.27;
}
.video-player > button {
  position: relative;
  z-index: 1;
}
.video-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.player-placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: white;
  padding: 20px;
  text-align: center;
}
.player-placeholder i {
  font-size: 2.8rem;
}
.player-placeholder span {
  font-size: 0.8rem;
}
.error-page {
  text-align: center;
  padding: 55px 20px;
}
.error-page p {
  max-width: 480px;
  margin: 20px auto;
}
.error-code {
  color: #b7c7d9;
  font-size: 6rem;
  line-height: 1.5;
  font-weight: 800;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 15px;
  background: var(--brand);
  color: white;
  z-index: 100;
  padding: 10px 18px;
}
.skip-link:focus {
  top: 10px;
}
.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  min-width: 0;
}
.panel h2 {
  font-size: 1.12rem;
}
.panel h3 {
  font-size: 1rem;
}
.admin-shell {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 254px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: white;
  padding: 28px 17px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-logo {
  display: block;
  margin: 0 7px 28px;
}
.admin-logo img {
  width: 218px;
  height: auto;
}
.sidebar-caption {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: #8290a4;
  margin: 0 12px 10px;
}
.admin-sidebar nav > a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  margin: 2px 0;
  font-size: 0.82rem;
  font-weight: 550;
  color: #5d6a7d;
  border-radius: 6px;
}
.admin-sidebar nav > a i {
  font-size: 1rem;
}
.admin-sidebar nav > a.active {
  background: #edf2fc;
  color: var(--brand);
}
.sidebar-bottom {
  margin-top: auto;
  padding: 25px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 0.72rem;
}
.sidebar-bottom small {
  color: var(--muted);
}
.admin-workspace {
  flex: 1;
  min-width: 0;
}
.admin-topbar {
  height: 76px;
  border-bottom: 1px solid var(--border);
  background: white;
  padding: 0 34px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.8rem;
}
.admin-topbar > a {
  margin-left: auto;
  font-size: 0.75rem;
}
.admin-topbar > span:first-of-type {
  color: #748194;
}
.admin-topbar b {
  color: #3c4c62;
  font-weight: 500;
}
.admin-menu {
  display: none;
}
.admin-main {
  padding: 30px 34px;
  max-width: 1500px;
  margin: auto;
}
.admin-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 21px;
  gap: 15px;
}
.admin-title .eyebrow {
  font-size: 0.6rem;
}
.admin-title h1 {
  font-size: 1.8rem;
  margin: 2px 0 0;
}
.preview-badge {
  color: #7a6130;
  background: #f7efd9;
  border: 1px solid #eee0be;
  border-radius: 20px;
  font-size: 0.66rem;
  font-weight: 650;
  padding: 5px 10px;
  white-space: nowrap;
}
.preview-badge i {
  font-size: 0.38rem;
  margin-right: 5px;
}
.admin-notice {
  display: flex;
  gap: 12px;
  font-size: 0.76rem;
  padding: 12px 15px;
}
.dashboard-welcome {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 27px 0;
}
.dashboard-welcome h2 {
  font-size: 1.2rem;
}
.dashboard-welcome p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 26px;
}
.stat-card {
  border: 1px solid var(--border);
  background: white;
  border-radius: 7px;
  padding: 20px;
  position: relative;
}
.stat-card > span {
  font-size: 0.75rem;
  color: var(--muted);
}
.stat-card > i {
  position: absolute;
  right: 18px;
  top: 18px;
  color: var(--teal);
}
.stat-card > b {
  font-size: 2rem;
  display: block;
  margin-top: 9px;
  line-height: 1.6;
}
.stat-card > small {
  font-size: 0.65rem;
  color: var(--muted);
}
.admin-two-col {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 24px;
}
.admin-recent {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}
.admin-recent:last-child {
  border: 0;
}
.admin-recent img {
  width: 80px;
  height: 52px;
  object-fit: cover;
  border-radius: 4px;
}
.admin-recent b {
  font-size: 0.82rem;
  font-weight: 600;
}
.admin-recent small {
  font-size: 0.67rem;
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.admin-recent > i {
  margin-left: auto;
  font-size: 0.65rem;
}
.admin-footnote {
  font-size: 0.68rem;
  color: #8994a6;
  margin: 30px 0 0;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}
.toolbar p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}
.admin-filter {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 15px;
  align-items: end;
  margin-bottom: 22px;
}
.admin-filter label {
  font-size: 0.72rem;
}
.admin-filter input,
.admin-filter select {
  font-size: 0.8rem;
}
.admin-table {
  font-size: 0.78rem;
}
.admin-table thead {
  background: #f7f9fc;
  color: var(--muted);
  font-size: 0.69rem;
}
.admin-table td {
  vertical-align: middle;
}
.admin-table td:first-child {
  min-width: 230px;
}
.admin-table a {
  color: var(--ink);
}
.status-pill {
  display: inline-block;
  background: #f0f2f5;
  color: #657185;
  padding: 4px 9px;
  border-radius: 20px;
  font-size: 0.65rem;
  white-space: nowrap;
}
.status-pill.published,
.status-pill.approved {
  color: var(--teal);
  background: #eaf5ef;
}
.status-pill.pending {
  color: #916b27;
  background: #fcf3df;
}
.status-pill.spam {
  color: #9e4351;
  background: #fbeef0;
}
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 23px;
}
.editor-form label {
  font-size: 0.8rem;
}
.editor-form .form-control,
.editor-form .form-select {
  font-size: 0.85rem;
}
.editor-form #post-title {
  font-size: 1.1rem;
}
.ql-container {
  font-family: inherit;
  font-size: 1rem;
  min-height: 340px;
}
.ql-editor {
  min-height: 340px;
  line-height: 1.8;
}
.ql-toolbar.ql-snow {
  border-radius: 5px 5px 0 0;
}
.ql-container.ql-snow {
  border-radius: 0 0 5px 5px;
  margin-bottom: 13px;
}
.ql-tooltip {
  left: 0 !important;
  max-width: 100%;
}
.cover-preview {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 18px;
}
.editor-form small {
  font-size: 0.68rem;
}
.settings-form {
  max-width: 700px;
}
.settings-logo {
  display: block;
  margin: 13px 0 22px;
  max-width: 100%;
  height: auto;
}
.section-row {
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--border);
  padding: 17px 0;
  font-size: 0.82rem;
}
.section-position {
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: 5px;
  background: #eff3f9;
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
}
.section-count {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  margin-left: auto;
  white-space: nowrap;
}
.section-count input {
  width: 65px;
  font-size: 0.8rem;
  padding: 5px;
}
.section-row .form-check {
  margin-bottom: 0;
  white-space: nowrap;
  font-size: 0.75rem;
}
.section-row .form-check label {
  display: inline;
  font-size: 0.75rem;
}
.move-buttons {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.move-buttons .btn {
  font-size: 0.8rem;
  padding: 5px 9px;
  min-height: 32px;
}
.manage-item {
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
}
.manage-item summary {
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
}
.manage-item summary > span {
  float: right;
  font-size: 0.65rem;
  font-weight: 400;
}
.manage-item form {
  padding: 10px 0;
}
.manage-item label {
  font-size: 0.75rem;
}
.manage-item .form-control {
  font-size: 0.85rem;
}
.collection-items .section-row {
  font-size: 0.72rem;
}
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.filter-tabs .btn {
  font-size: 0.75rem;
}
.filter-tabs [aria-pressed='true'] {
  background: var(--brand);
  color: white;
}
.moderation-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.moderation-item[hidden] {
  display: none;
}
.moderation-item label {
  font-size: 0.75rem;
}
.action-toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  max-width: 450px;
  padding: 17px 22px;
  border: 1px solid #a7c4ba;
  background: #edf6f3;
  color: #315b4e;
  border-radius: 7px;
  font-size: 0.85rem;
  box-shadow: 0 5px 25px #17203315;
  z-index: 100;
}
.action-toast[hidden] {
  display: none;
}
@media (min-width: 1400px) {
  .header-inner {
    gap: 30px;
  }
  #main-nav {
    gap: 25px;
  }
}
@media (max-width: 1199px) {
  .desktop-logo {
    width: 230px;
  }
  .header-inner {
    gap: 18px;
  }
  #main-nav {
    gap: 14px;
  }
  #main-nav a {
    font-size: 0.74rem;
  }
  .home-bottom {
    grid-template-columns: 1.7fr 1fr;
  }
  .author-box {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 60px 1fr auto;
    column-gap: 20px;
    align-items: center;
  }
  .author-box .avatar {
    grid-row: 1/3;
  }
  .author-box h2 {
    margin: 0;
  }
  .author-box p {
    grid-column: 2;
    margin: 4px 0 0;
  }
  .author-box > a {
    grid-column: 3;
    grid-row: 1/3;
  }
  .compact {
    gap: 14px;
  }
  .compact p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .admin-sidebar {
    width: 225px;
  }
  .admin-main {
    padding: 25px;
  }
  .admin-topbar {
    padding: 0 25px;
  }
  .admin-two-col {
    grid-template-columns: 1.35fr 1fr;
  }
  .stat-grid {
    gap: 12px;
  }
  .stat-card {
    padding: 15px;
  }
  .stat-card > i {
    display: none;
  }
  .admin-filter {
    grid-template-columns: 1fr 1fr;
  }
  .editor-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
}
@media (max-width: 991px) {
  .header-inner {
    min-height: 80px;
    flex-wrap: wrap;
    position: relative;
    row-gap: 0;
  }
  .site-header .brand,
  .site-header .header-actions {
    min-height: 80px;
  }
  .desktop-logo {
    width: 280px;
  }
  #main-nav {
    display: none;
    order: 3;
    flex-basis: 100%;
    padding-bottom: 18px;
  }
  #main-nav.is-open {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
  }
  #main-nav a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
  }
  #main-nav a.active {
    background: #edf2f7;
  }
  #main-nav a.active:after {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .featured-grid {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
  .compact {
    grid-template-columns: 1fr;
  }
  .compact .image-link {
    display: none;
  }
  .compact h3 {
    font-size: 1.2rem;
  }
  .compact p {
    display: block;
  }
  .featured-side {
    align-content: space-between;
  }
  .featured-main h3 {
    font-size: 1.5rem;
  }
  .home-bottom {
    grid-template-columns: 1.5fr 1fr;
  }
  .category-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-sidebar {
    position: fixed;
    z-index: 30;
    left: 0;
    top: 76px;
    height: calc(100vh - 76px);
    transform: translateX(-100%);
    box-shadow: 10px 0 20px #17203310;
  }
  .admin-sidebar.is-open {
    transform: translateX(0);
  }
  .admin-menu {
    display: flex;
  }
  .admin-two-col {
    grid-template-columns: 1.5fr 1fr;
  }
  .editor-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
  .section-row {
    flex-wrap: wrap;
  }
  .section-count {
    margin-left: auto;
  }
  .section-count input {
    width: 55px;
  }
}
@media (max-width: 767px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .public-main {
    padding-top: 20px;
    padding-bottom: 32px;
  }
  .featured-grid {
    grid-template-columns: 1fr;
  }
  .featured-main h3 {
    font-size: 1.55rem;
  }
  .featured-main p {
    font-size: 0.92rem;
  }
  .featured-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--border);
    padding-top: 20px;
  }
  .compact {
    display: block;
  }
  .compact .image-link {
    display: block;
  }
  .compact img {
    aspect-ratio: 16/9;
  }
  .compact .post-info {
    padding-top: 9px;
  }
  .compact h3 {
    font-size: 1rem;
  }
  .compact p {
    display: none;
  }
  .compact .meta {
    font-size: 0.65rem;
  }
  .home-kicker {
    font-size: 0.55rem;
    letter-spacing: 0.05em;
  }
  .post-grid {
    grid-template-columns: 1fr;
    gap: 19px;
  }
  .home-section {
    margin-top: 23px;
    padding-top: 20px;
  }
  .section-title h2 {
    font-size: 1.25rem;
  }
  .section-title > a {
    font-size: 0.7rem;
  }
  .home-section .post-grid .post-card {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 13px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
  }
  .home-section .post-grid .post-card img {
    aspect-ratio: 1.5;
  }
  .home-section .post-grid .post-info {
    padding: 0;
  }
  .home-section .post-grid .post-card p {
    display: none;
  }
  .home-section .post-grid .post-card h3 {
    font-size: 1rem;
  }
  .home-section .post-grid .post-card .eyebrow {
    font-size: 0.58rem;
  }
  .home-section .post-grid .post-card .meta {
    font-size: 0.65rem;
  }
  .home-bottom {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .home-bottom .section-title h2 {
    font-size: 1.25rem;
  }
  .author-box {
    grid-template-columns: 61px 1fr;
    grid-column: auto;
  }
  .author-box > a {
    grid-row: auto;
    grid-column: 2;
    margin-top: 8px;
  }
  .today-box > a {
    font-size: 0.85rem;
  }
  .today-box small {
    font-size: 0.72rem;
  }
  .site-footer .footer-intro img {
    max-width: 160px;
  }
  .site-footer {
    padding: 28px 0 22px;
  }
  .site-footer .footer-intro p {
    font-size: 0.88rem;
    max-width: 380px;
  }
  .site-footer .footer-columns {
    grid-template-columns: 1fr 1fr;
    gap: 25px 16px;
    padding: 16px 0;
  }
  .footer-columns section:last-child {
    grid-column: 1/-1;
    border-top: 1px solid #d6deea;
    padding-top: 20px;
  }
  .footer-columns h2 {
    font-size: 1rem;
  }
  .footer-columns li {
    font-size: 0.8rem;
  }
  .footer-bottom p {
    font-size: 0.82rem;
  }
  .footer-bottom small {
    font-size: 0.7rem;
    display: block;
  }
  .listing-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px 18px;
  }
  .listing-grid .post-card img {
    aspect-ratio: 1.65;
  }
  .listing-grid .post-card p {
    font-size: 0.8rem;
  }
  .listing-grid .post-card h3 {
    font-size: 1rem;
  }
  .page-heading {
    padding: 12px 0 20px;
  }
  .page-heading p {
    font-size: 0.92rem;
  }
  .page-heading small {
    font-size: 0.75rem;
  }
  .reading-width {
    width: 100%;
  }
  .article-content {
    font-size: 1rem;
    line-height: 1.85;
  }
  .lead {
    font-size: 1rem;
  }
  .article h1 {
    font-size: 1.9rem;
  }
  .article-content h2 {
    font-size: 1.4rem;
  }
  .article-author {
    padding: 20px;
    gap: 15px;
  }
  .article-author h2 {
    font-size: 1rem;
  }
  .article-author p {
    font-size: 0.85rem;
  }
  .contact-form {
    padding: 20px;
  }
  .auth-card {
    padding: 25px;
    margin: 10px auto 20px;
  }
  .video-player .player-placeholder i {
    font-size: 2rem;
  }
  .player-placeholder strong {
    font-size: 0.85rem;
  }
  .player-placeholder span {
    font-size: 0.7rem;
  }
  .admin-main {
    padding: 22px 18px;
  }
  .admin-title h1 {
    font-size: 1.5rem;
  }
  .admin-title .eyebrow {
    font-size: 0.54rem;
  }
  .admin-topbar {
    padding: 0 18px;
    gap: 10px;
    font-size: 0.7rem;
  }
  .admin-topbar > a {
    font-size: 0.65rem;
  }
  .admin-topbar .avatar {
    display: none;
  }
  .dashboard-welcome {
    align-items: flex-start;
    flex-direction: column;
  }
  .dashboard-welcome h2 {
    font-size: 1.12rem;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .stat-card > b {
    font-size: 1.8rem;
  }
  .admin-two-col {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 19px;
  }
  .admin-recent {
    gap: 12px;
  }
  .admin-recent b {
    font-size: 0.75rem;
  }
  .admin-recent img {
    width: 65px;
    height: 47px;
  }
  .admin-notice {
    font-size: 0.7rem;
  }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .section-row {
    gap: 12px;
  }
  .section-row > div:nth-child(2) {
    flex: 1;
  }
  .section-count {
    width: 100%;
    margin-left: 40px;
  }
  .section-row > .form-check {
    margin-left: 40px;
  }
  .section-row .move-buttons {
    margin-left: auto;
  }
  .collection-items .section-row {
    flex-wrap: nowrap;
  }
  .collection-items .move-buttons {
    white-space: nowrap;
  }
  .manage-item summary > span {
    display: none;
  }
  .filter-tabs {
    gap: 5px;
  }
  .filter-tabs .btn {
    font-size: 0.7rem;
    padding: 7px 10px;
  }
  .action-toast {
    left: 15px;
    right: 15px;
    bottom: 15px;
    font-size: 0.8rem;
  }
  .toolbar {
    align-items: flex-start;
  }
  .toolbar .btn {
    font-size: 0.73rem;
  }
  .preview-badge {
    font-size: 0.6rem;
  }
  .admin-filter {
    gap: 12px;
  }
  .admin-filter > div:first-child {
    grid-column: 1/-1;
  }
  .admin-filter > .btn {
    align-self: end;
  }
  .video-grid {
    gap: 15px;
  }
  .collection-box {
    padding: 20px;
  }
  .preview-state {
    font-size: 0.8rem;
  }
}
@media (max-width: 575px) {
  .site-header .brand {
    flex: 1;
    min-width: 0;
    max-width: 270px;
  }
  .site-header .brand,
  .site-header .header-actions {
    min-height: 72px;
  }
  .site-header .desktop-logo {
    display: block;
    width: 100%;
  }
  .site-header .header-inner {
    min-height: 72px;
    gap: 8px;
    row-gap: 0;
    padding-left: 12px;
    padding-right: 12px;
  }
  .header-actions {
    gap: 3px;
  }
  .login-link {
    display: none;
  }
  .icon-button {
    min-width: 32px;
  }
  .home-kicker span:first-child {
    max-width: 210px;
  }
  .featured-side {
    gap: 18px;
  }
  .category-strip {
    gap: 10px;
    margin: 22px 0;
  }
  .category-strip > a {
    padding: 11px 10px;
    gap: 8px;
    font-size: 0.7rem;
  }
  .category-strip > a > i:first-child {
    font-size: 0.9rem;
  }
  .category-strip > a > i:last-child {
    display: none;
  }
  .video-card h3 {
    font-size: 0.82rem;
  }
  .featured-main .meta {
    font-size: 0.7rem;
  }
  .featured-main .post-info {
    padding-top: 12px;
  }
  .featured-side .meta {
    font-size: 0.6rem;
  }
  .listing-grid {
    grid-template-columns: 1fr;
  }
  .listing-grid .post-card {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
  }
  .listing-grid .post-card img {
    aspect-ratio: 16/9;
  }
  .listing-grid .post-card h3 {
    font-size: 1.25rem;
  }
  .listing-grid .post-card p {
    font-size: 0.9rem;
  }
  .site-footer .footer-intro img {
    width: 100%;
  }
  .site-footer .footer-intro p {
    font-size: 0.9rem;
  }
  .auth-card {
    border: 0;
    background: transparent;
    padding: 18px 0;
  }
  .article-author .avatar {
    width: 45px;
    height: 45px;
    font-size: 0.95rem;
  }
  .comment {
    gap: 12px;
  }
  .comment .small-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.65rem;
  }
  .comment-reply {
    padding: 12px;
  }
  .table > :not(caption) > * > * {
    padding: 11px 9px;
  }
  .code-block pre {
    padding: 17px;
    font-size: 0.72rem;
  }
  .error-code {
    font-size: 4.8rem;
  }
  .home-section .post-grid .post-card {
    grid-template-columns: 100px 1fr;
  }
  .home-section .post-grid .post-card h3 {
    font-size: 0.95rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
.lead {
  font-weight: 400;
}
.mobile-login-nav {
  display: none;
}
@media (max-width: 991px) {
  .admin-sidebar {
    visibility: hidden;
  }
  .admin-sidebar.is-open {
    visibility: visible;
  }
}
@media (max-width: 575px) {
  #main-nav .mobile-login-nav {
    display: block;
  }
}
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
  content: 'Đoạn văn';
}
.ql-snow .ql-picker.ql-header [data-value='2']::before {
  content: 'Tiêu đề 2';
}
.ql-snow .ql-picker.ql-header [data-value='3']::before {
  content: 'Tiêu đề 3';
}
.ql-snow .ql-tooltip::before {
  content: 'Liên kết:';
}
.ql-snow .ql-tooltip[data-mode='link']::before {
  content: 'Nhập liên kết:';
}
.ql-snow .ql-tooltip a.ql-action::after {
  content: 'Chỉnh sửa';
}
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
  content: 'Áp dụng';
}
.ql-snow .ql-tooltip a.ql-remove::before {
  content: 'Xóa';
}
/* Editor: intrinsic height; never percentage height against an auto-height panel. */
#editor {
  height: auto;
  min-height: 420px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 0 0 6px 6px;
  padding: 18px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.tiptap {
  min-height: 380px;
  outline: none;
}
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border);
  border-bottom: 0;
  background: #f7f8fa;
}
.tiptap table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}
.tiptap td,
.tiptap th {
  border: 1px solid #bbb;
  padding: 8px;
  min-width: 40px;
}
.tiptap img {
  max-width: 100%;
  height: auto;
  display: block;
}
.tiptap img[data-align='left'] {
  margin-right: auto;
}
.tiptap img[data-align='center'] {
  margin: auto;
}
.tiptap img[data-align='right'] {
  margin-left: auto;
}
.tiptap .selectedCell {
  background: #e0e9fa;
}
dialog {
  max-width: min(800px, 95vw);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}
.live-home-sections {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.live-home-sections .live-full {
  grid-column: 1/-1;
}
.live-home-sections .live-videos {
  grid-column: span 2;
}
.live-home-sections .home-section,
.live-home-sections .category-strip {
  margin: 0;
}
.resource-form {
  max-width: 900px;
}
.resource-form:has(#editor) {
  max-width: none;
}
.article-content figure[data-type='image'] {
  max-width: 100%;
  height: auto;
  margin: 24px auto;
}
.article-content figure[data-align='left'],
.tiptap figure[data-align='left'] {
  margin-left: 0;
  margin-right: auto;
}
.article-content figure[data-align='right'],
.tiptap figure[data-align='right'] {
  margin-left: auto;
  margin-right: 0;
}
.article-content figure img,
.tiptap figure img {
  width: 100%;
  height: auto;
  display: block;
}
.tiptap figure {
  max-width: 100%;
  margin: 24px auto;
}
.tiptap figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.tiptap pre {
  background: #182d3e;
  color: #e8f4ef;
  padding: 20px;
  border-radius: 5px;
  overflow: auto;
}
.tiptap .tableWrapper {
  overflow-x: auto;
}
.upload-state {
  font-size: 0.85rem;
  white-space: pre-wrap;
}
.image-properties {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  background: #f2f6f8;
  border: 1px solid var(--border);
}
.image-properties label {
  flex: 1 1 150px;
}
.editor-toolbar button[aria-pressed='true'] {
  background: #dce8fc;
}
.editor-form aside .btn {
  margin: 8px 0;
}
.logout-form {
  display: inline;
}
.logout-form button {
  background: none;
  border: none;
  color: var(--brand);
  font-size: 0.8rem;
}
@media (max-width: 767px) {
  .live-home-sections {
    grid-template-columns: 1fr;
  }
  .live-home-sections > * {
    grid-column: 1 !important;
  }
  .live-home-sections .author-box {
    display: block;
  }
  .live-home-sections .featured-side {
    grid-template-columns: 1fr 1fr;
  }
  .image-properties {
    display: block;
  }
}
.article-content pre {
  max-width: 100%;
  overflow-x: auto;
  background: #182d3e;
  color: #e8f4ef;
  padding: 20px;
  border-radius: 6px;
  font-size: 0.85rem;
}
.article-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 24px 0;
}
.article-content th,
.article-content td {
  min-width: 120px;
  border: 1px solid var(--border);
  padding: 12px;
  font-size: 0.9rem;
}
.article-content th {
  background: #edf2f7;
}
.editor-toolbar .btn,
.editor-advanced .btn {
  font-size: 0.74rem;
  padding: 5px 7px;
  min-height: 32px;
}
.editor-advanced {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
}
#editor figure img.ProseMirror-selectednode {
  outline: 3px solid var(--teal);
}
.image-properties[hidden] {
  display: none;
}
.editor-toolbar + details {
  border: 1px solid var(--border);
  padding: 8px;
  font-size: 0.8rem;
}
.copy-code-public {
  display: block;
  margin-left: auto;
  margin-bottom: 7px;
  color: var(--brand);
  background: #edf2f7;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.75rem;
  padding: 3px 8px;
}

/* Compact Tiptap controls; menus are clamped to the viewport when opened. */
.editor-toolbar {
  align-items: center;
  gap: 6px;
}
.editor-tool-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  min-width: 0;
  padding-right: 6px;
  border-right: 1px solid var(--border);
}
.editor-tool-group:last-child {
  border-right: 0;
  padding-right: 0;
}
.editor-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 32px;
  min-height: 34px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.3;
}
.editor-tool .bi {
  font-size: 1.05rem;
  pointer-events: none;
}
.editor-tool:hover:not(:disabled) {
  background: #edf2f7;
  border-color: var(--border);
}
.editor-tool[aria-pressed='true'] {
  color: var(--brand);
  background: #dce8fc;
  border-color: #b4c9f4;
}
.editor-tool:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.editor-tool:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}
.editor-menu {
  position: relative;
  max-width: 100%;
}
.editor-menu-trigger {
  border-color: var(--border);
  background: white;
}
.editor-menu-panel {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  display: flex;
  flex-direction: column;
  min-width: 160px;
  width: max-content;
  max-width: min(240px, calc(100vw - 24px));
  padding: 5px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 16px #17203315;
  z-index: 20;
}
.editor-menu-panel[hidden] {
  display: none;
}
.editor-menu-panel .editor-tool {
  justify-content: flex-start;
}
@media (max-width: 575px) {
  .editor-toolbar {
    gap: 5px;
    padding: 6px;
  }
  .editor-tool-group {
    padding-right: 4px;
  }
  .editor-tool {
    min-width: 30px;
    padding: 5px 6px;
  }
}
