:root {
  color-scheme: light;
  --bg: #faf9f6;
  --bg-soft: #f4f3ef;
  --surface: #ffffff;
  --text: #1c1c1e;
  --muted: #6e6e73;
  --line: #e5e5ea;
  --accent: #5e5ce6;
  --accent-strong: #1c1c1e;
  --good: #34c759;
  --shadow: 0 8px 18px rgba(0, 0, 0, 0.035);
  --reader-font-size: 18px;
  --reader-font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-soft: #0c0c0e;
  --surface: #121214;
  --text: #f5f0ea;
  --muted: #8e8e93;
  --line: #2c2c2e;
  --accent: #a99bff;
  --accent-strong: #ffffff;
  --good: #30d158;
  --shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

:root[data-reader-font="serif"] {
  --reader-font-family: Georgia, "Times New Roman", serif;
}

:root[data-reader-font="mono"] {
  --reader-font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.page-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.site-header.scrolled {
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 20%);
  background: var(--bg);
}

body.has-hero .site-header {
  position: fixed;
  left: 0;
  right: 0;
  color: #ffffff;
}

body.has-hero .site-header.scrolled {
  color: var(--text);
}

body.has-hero .site-header:not(.scrolled) .brand,
body.has-hero .site-header:not(.scrolled) nav {
  color: #ffffff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.42);
}

body.has-hero .site-header:not(.scrolled) .theme-icon-toggle {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(0, 0, 0, 0.2);
  color: #ffffff;
}

.article-hero-cover {
  position: relative;
  width: 100%;
  min-height: clamp(280px, 46vw, 540px);
  overflow: hidden;
  background: var(--bg-soft);
}

.article-hero-cover img {
  width: 100%;
  height: clamp(280px, 46vw, 540px);
  object-fit: cover;
}

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.04) 42%, rgba(0, 0, 0, 0));
  pointer-events: none;
}

.brand,
.site-header nav,
.hero-actions,
.post-meta,
.tag-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  padding: 0;
}

.site-header nav {
  gap: 12px;
  color: var(--muted);
  font-size: 0.94rem;
}

.site-header nav a {
  display: none;
}

.theme-toggle,
.button,
.size-step {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  color: var(--text);
  background: var(--surface);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  font-weight: 750;
}

.button-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface), transparent 14%);
  padding: 2px;
  object-fit: contain;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.button.ghost {
  background: var(--surface);
}

.blog-masthead {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 54px 0 28px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(2.35rem, 8vw, 4.5rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.masthead-text,
.section-heading p {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.05rem;
}

.content-band {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 70px;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}

.main-column {
  min-width: 0;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading.compact {
  margin-bottom: 14px;
}

.latest-heading {
  margin-top: 34px;
}

.featured-post,
.post-list-item,
.sidebar-section {
  background: transparent;
  border-radius: 0;
}

.featured-post {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  box-shadow: none;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}

.featured-media {
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.post-thumb {
  display: grid;
  place-items: center;
  background: var(--bg-soft);
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.featured-body {
  padding: 20px 0 0 0;
}

.featured-body h3 {
  margin-bottom: 10px;
  font-size: clamp(1.65rem, 5vw, 2.7rem);
  line-height: 1.04;
}

.featured-body p,
.post-list-body p,
.sidebar-section p {
  color: var(--muted);
}

.post-meta {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.post-list {
  display: grid;
  gap: 0;
}

.post-list-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.post-thumb {
  align-self: start;
  aspect-ratio: 1;
  border-radius: 0;
  overflow: hidden;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.post-list-body h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
  line-height: 1.12;
}

.tag-row {
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  white-space: nowrap;
  border: 0;
  border-radius: 2px;
  background: var(--bg-soft);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.blog-sidebar {
  display: grid;
  gap: 12px;
}

.sidebar-section {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.sidebar-section h2 {
  font-size: 1rem;
  line-height: 1.2;
}

.about-blog img {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border: 0;
  background: transparent;
  padding: 0;
}

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-list a {
  border: 0;
  border-radius: 2px;
  background: var(--bg-soft);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  transition: background-color 150ms ease, color 150ms ease;
}

.topic-list a:hover {
  background: var(--line);
  color: var(--text);
}

.public-header {
  z-index: 2147483647;
}

.public-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.public-header-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 0;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
  transition: width 180ms ease, opacity 180ms ease;
}

.public-header-search-wrap.open {
  width: min(360px, 48vw);
  opacity: 1;
  pointer-events: auto;
}

.public-header-search {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  padding: 0 4px;
}

.public-header-search input {
  min-width: 0;
  width: 100%;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 0;
  outline: none;
}

.public-search-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 150ms ease;
}

.public-search-icon:hover {
  transform: scale(1.08);
}

.search-glyph {
  position: relative;
  display: block;
  width: 17px;
  height: 17px;
}

.search-glyph::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 11px;
  height: 11px;
  border: 2px solid var(--text);
  border-radius: 50%;
  content: "";
}

.search-glyph::after {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 8px;
  height: 2px;
  border-radius: 99px;
  background: var(--text);
  content: "";
  transform: rotate(45deg);
  transform-origin: right center;
}

.public-menu-button {
  display: grid;
  place-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.public-menu-button span {
  display: block;
  width: 24px;
  height: 2.5px;
  border-radius: 99px;
  background: var(--text);
}

:root[data-theme="dark"] .public-menu-button span {
  background: #ffffff;
}

.public-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: min(340px, 88vw);
  height: 100vh;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
  transform: translateX(104%);
  transition: transform 180ms ease;
}

.public-sidebar.open {
  transform: translateX(0);
}

.public-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  border: 0;
  background: rgba(0, 0, 0, 0.42);
}

.public-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.sidebar-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  padding: 0;
}

.sidebar-brand-group strong {
  font-size: 1.1rem;
  font-weight: 800;
}

.sidebar-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-icon-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  transition: transform 150ms ease, background-color 150ms ease;
}

.theme-icon-toggle:hover {
  transform: rotate(15deg) scale(1.05);
  background: var(--line);
}

.sidebar-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  transition: background-color 150ms ease, transform 150ms ease;
}

.sidebar-close-btn:hover {
  background: var(--bg-soft);
  transform: scale(1.05);
}

.close-btn-x::before {
  content: "×";
}

.public-sidebar-nav {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.public-sidebar-nav a {
  display: flex;
  align-items: center;
  min-height: 38px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  font-weight: 700;
  padding: 8px 0;
  transition: padding-left 150ms ease, color 150ms ease;
}

.public-sidebar-nav a:hover {
  padding-left: 6px;
  color: var(--accent);
}

.public-theme-toggle {
  width: 100%;
}

.public-hero {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 44px 0 22px;
  border-bottom: 1px solid var(--line);
}

.public-hero h1 {
  margin-bottom: 10px;
}

.public-search {
  display: grid;
  gap: 7px;
}

.public-search span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.public-search input {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 0 0 8px 0;
  outline: none;
  transition: border-color 150ms ease;
}

.public-search input:focus {
  border-color: var(--text);
}

.public-search.compact input {
  min-height: 34px;
}

.public-layout {
  padding-top: 24px;
}

.public-layout.search-layout {
  padding-top: 34px;
}

.public-carousel {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 10px;
}

.public-featured {
  position: relative;
  box-shadow: none;
  border: 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding-bottom: 18px;
}

.public-featured .featured-media {
  border-radius: 8px;
  overflow: hidden;
}

.public-featured .featured-media img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
}

.public-featured .featured-body {
  position: relative;
  padding-inline: 0;
}

.carousel-controls {
  display: flex;
  gap: 8px;
}

.carousel-controls button {
  width: 32px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: color-mix(in srgb, var(--muted), transparent 68%);
  cursor: pointer;
  padding: 0;
}

.carousel-controls button.active {
  background: var(--accent);
}

.article-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.top-picks-section {
  position: relative;
  z-index: 1;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.top-picks-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.top-picks-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.top-picks-images a {
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-soft);
}

.top-picks-images img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.top-pick-lead {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
}

.top-pick-lead h3 {
  margin-bottom: 8px;
  font-size: clamp(1.45rem, 4vw, 2.25rem);
  line-height: 1.05;
}

.top-pick-lead p {
  color: var(--muted);
}

.read-link {
  color: var(--accent);
  font-weight: 850;
}

.share-widget,
.article-share {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin: 2px 0 10px;
}

.article-share {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 18px;
}

.article-share-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.article-share-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.article-share-list a,
.article-share-list button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0 9px;
}

.article-share-list a:hover,
.article-share-list button:hover {
  background: var(--bg-soft);
}

.share-widget:has(.share-menu),
.public-carousel:has(.share-menu),
.public-featured:has(.share-menu),
.featured-body:has(.share-menu),
.top-pick-lead:has(.share-menu),
.article-row-body:has(.share-menu) {
  z-index: 80;
}

.share-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0 10px;
}

.share-toggle:hover {
  background: var(--bg-soft);
}

.share-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 120;
  display: grid;
  width: 168px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 6px;
}

.share-menu a,
.share-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  padding: 7px 8px;
  text-align: left;
}

.share-menu a:hover,
.share-menu button:hover {
  background: var(--bg-soft);
}

.share-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: currentColor;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1;
}

.share-icon-link {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.share-icon-link::before,
.share-icon-link::after {
  position: absolute;
  width: 5px;
  height: 5px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: var(--surface);
  content: "";
}

.share-icon-link::before {
  top: -3px;
  right: -3px;
}

.share-icon-link::after {
  bottom: -3px;
  left: -3px;
}

.share-icon-x::before {
  content: "X";
}

.share-icon-whatsapp {
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
}

.share-icon-whatsapp::before {
  content: "W";
}

.share-icon-facebook {
  border-radius: 50%;
  background: #1877f2;
  color: #ffffff;
}

.share-icon-facebook::before {
  content: "f";
  font-size: 1rem;
}

.share-icon-telegram {
  border-radius: 50%;
  background: #229ed9;
  color: #ffffff;
}

.share-icon-telegram::before {
  content: "T";
}

.share-icon-copy::before {
  width: 11px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 3px;
  content: "";
}

.share-icon-copy::after {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 10px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: var(--surface);
  content: "";
  transform: translate(-4px, 3px);
}

.article-stack {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.article-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.article-row-media {
  align-self: start;
  overflow: hidden;
  border-radius: 0;
  background: var(--bg-soft);
}

.article-row-media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.article-row-body h3 {
  margin-bottom: 6px;
  font-size: 1.16rem;
  line-height: 1.12;
}

.article-row-body p {
  margin-bottom: 10px;
  color: var(--muted);
}

.article-card {
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding-bottom: 16px;
}

.article-card-media {
  display: block;
  background: var(--bg-soft);
}

.article-card-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0;
}

.article-card-body {
  padding: 12px 0 0 0;
}

.article-card-body h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
  line-height: 1.14;
}

.article-card-body p {
  color: var(--muted);
}

.topic-list button {
  border: 0;
  border-radius: 2px;
  background: var(--bg-soft);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 10px;
  transition: background-color 150ms ease, color 150ms ease;
}

.topic-list button:hover {
  background: var(--line);
  color: var(--text);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 45;
  display: grid;
  width: min(360px, 82vw);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 6px;
}

.search-suggestions button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: left;
  padding: 7px 9px;
}

.search-suggestions button:hover {
  background: var(--bg-soft);
}

.browse-dropdown,
.sidebar-filter-stack {
  display: grid;
  gap: 8px;
}

.sidebar-section .browse-dropdown + .browse-dropdown {
  margin-top: 10px;
}

.browse-dropdown span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.browse-dropdown select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  padding: 0 10px;
}

.mini-post-list {
  display: grid;
  gap: 10px;
}

.mini-post {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.mini-post img {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  object-fit: cover;
}

.mini-post span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.admin-shell,
.article-shell {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.reader-shell {
  width: min(820px, calc(100% - 36px));
}

.reader-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.reader-control {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.reader-control select,
.reader-control input {
  accent-color: var(--accent);
}

.reader-control select {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 0 8px;
}

.size-control {
  flex: 0 1 auto;
  justify-content: flex-start;
}

.size-control strong {
  min-width: 36px;
  color: var(--text);
  font-size: 0.78rem;
  text-align: center;
}

.size-step {
  width: 30px;
  min-height: 30px;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1;
}

.article-excerpt {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
}

.article-body {
  color: var(--text);
  font-family: var(--reader-font-family);
  font-size: var(--reader-font-size);
  line-height: 1.48;
}

.article-body * {
  font-family: inherit;
}

.article-body p {
  margin: 0 0 0.58em;
}

.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body pre {
  margin-top: 0;
  margin-bottom: 0.85em;
}

.article-body p:has(> br:only-child) {
  min-height: 0;
  margin: 0.35em 0;
}

.article-body h2,
.article-body h3 {
  margin-top: 1.65em;
  margin-bottom: 0.55em;
}

.article-body img,
.article-body iframe {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.comments-section {
  margin-top: 42px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.reader-related-section {
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.reader-related-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 360px);
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: thin;
  padding: 2px 0 6px;
}

.reader-related-group {
  display: grid;
  gap: 10px;
  min-width: 0;
  scroll-snap-align: start;
}

.reader-related-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 8px;
}

.reader-related-card img {
  grid-row: 1 / span 2;
  width: 76px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-soft);
}

.reader-related-card span,
.reader-related-card strong {
  min-width: 0;
}

.reader-related-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.reader-related-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.22;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.comment-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.comment-item {
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--surface), transparent 20%);
  padding: 10px 0 10px 14px;
}

.comment-item strong {
  display: block;
  margin-bottom: 4px;
}

.comment-item p,
.empty-note,
.form-status {
  color: var(--muted);
}

.comment-form {
  display: grid;
  gap: 12px;
}

.comment-submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.directlink-button {
  min-width: 48px;
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
  font-size: 0.88rem;
  letter-spacing: 0;
}

.directlink-button:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.comment-form textarea {
  min-height: 120px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer strong {
  color: var(--text);
}

.site-footer p {
  max-width: 440px;
  margin-bottom: 0;
}

.site-footer a {
  color: var(--text);
  font-weight: 800;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.public-site-footer {
  margin-top: 40px;
}

.bottom-ad-stack {
  width: min(980px, calc(100% - 36px));
  margin: 18px auto 44px;
  display: grid;
  justify-items: center;
  gap: 12px;
  contain: layout paint;
}

.inline-ad-stack {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 18px 0 22px;
  contain: layout paint;
}

.home-carousel-ads {
  margin: 18px 0 26px;
}

.reader-top-ads {
  margin: 20px 0 22px;
}

.reader-bottom-ads {
  margin-top: 0;
}

.ad-unit {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.ad-unit-script {
  min-height: 1px;
}

.ad-unit-box {
  min-height: 250px;
  max-width: 320px;
}

.ad-unit-slim {
  min-height: 50px;
  max-width: 340px;
}

.ad-unit-native {
  min-height: 140px;
  max-width: 920px;
}

.ad-unit-native > div {
  width: 100%;
}

.info-page-shell {
  width: min(820px, calc(100% - 36px));
  margin: 0 auto;
  padding: 64px 0 74px;
}

.info-page-shell h1 {
  margin-bottom: 12px;
  font-size: clamp(2.4rem, 9vw, 5rem);
  line-height: 0.98;
}

.info-page-body {
  display: grid;
  gap: 14px;
  max-width: 700px;
  margin-top: 30px;
  color: var(--text);
  font-size: 1.06rem;
  line-height: 1.6;
}

.comment-admin-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.comment-admin-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.comment-admin-item p {
  color: var(--muted);
}

.comment-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.84rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.admin-section {
  margin-top: 34px;
}

.admin-stack {
  display: grid;
  gap: 10px;
}

.admin-token-field {
  display: none;
}

.studio-header {
  z-index: 30;
  min-height: 66px;
  padding-block: 10px;
  background: color-mix(in srgb, var(--surface), var(--bg) 18%);
}

.studio-brand {
  gap: 12px;
}

.studio-brand img {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent), transparent 88%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent), transparent 70%);
  padding: 4px;
}

.studio-brand span {
  display: grid;
  gap: 0;
  line-height: 1.05;
}

.studio-brand strong {
  font-size: 0.98rem;
}

.studio-brand small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.studio-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface), transparent 4%);
  color: var(--text);
  font-weight: 800;
  padding: 0 12px;
}

.studio-layout {
  min-height: calc(100vh - 66px);
}

.studio-sidebar {
  position: fixed;
  top: 66px;
  left: 0;
  z-index: 20;
  width: 280px;
  height: calc(100vh - 66px);
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 24px 16px;
  overflow-y: auto;
  box-shadow: none;
}

.studio-sidebar-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 18%);
  padding: 2px 4px 16px;
}

.studio-sidebar-head img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent), transparent 88%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent), transparent 72%);
  padding: 4px;
}

.studio-sidebar-head .eyebrow {
  margin-bottom: 3px;
  font-size: 0.68rem;
}

.studio-sidebar-head strong {
  display: block;
  font-size: 1.05rem;
}

.studio-menu {
  display: grid;
  gap: 6px;
}

.studio-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
  padding: 0 10px;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.studio-nav-icon {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.studio-nav-icon::before,
.studio-nav-icon::after {
  position: absolute;
  content: "";
}

.studio-nav-icon[data-icon="dashboard"]::before {
  inset: 7px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.studio-nav-icon[data-icon="write"]::before {
  left: 8px;
  top: 7px;
  width: 11px;
  height: 14px;
  border: 2px solid currentColor;
  border-top: 0;
  transform: skew(-8deg);
}

.studio-nav-icon[data-icon="posts"]::before {
  inset: 7px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.studio-nav-icon[data-icon="posts"]::after {
  left: 9px;
  top: 11px;
  width: 10px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
}

.studio-nav-icon[data-icon="media"]::before {
  inset: 7px 6px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.studio-nav-icon[data-icon="media"]::after {
  left: 9px;
  bottom: 8px;
  width: 9px;
  height: 7px;
  border-radius: 2px;
  background: currentColor;
  clip-path: polygon(0 100%, 42% 28%, 64% 60%, 80% 34%, 100% 100%);
}

.studio-nav-icon[data-icon="compress"]::before {
  left: 7px;
  top: 7px;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.studio-nav-icon[data-icon="compress"]::after {
  left: 12px;
  top: 5px;
  width: 4px;
  height: 18px;
  border-radius: 99px;
  background: currentColor;
}

.studio-nav-icon[data-icon="analytics"]::before {
  left: 7px;
  bottom: 7px;
  width: 3px;
  height: 8px;
  border-radius: 99px;
  background: currentColor;
  box-shadow: 6px -5px 0 currentColor, 12px -1px 0 currentColor;
}

.studio-nav-icon[data-icon="optimize"]::before {
  left: 7px;
  top: 12px;
  width: 14px;
  height: 4px;
  border-radius: 99px;
  background: currentColor;
}

.studio-nav-icon[data-icon="optimize"]::after {
  left: 12px;
  top: 7px;
  width: 4px;
  height: 14px;
  border-radius: 99px;
  background: currentColor;
}

.studio-nav-icon[data-icon="comments"]::before {
  inset: 7px 6px 9px;
  border: 2px solid currentColor;
  border-radius: 6px;
}

.studio-nav-icon[data-icon="comments"]::after {
  left: 11px;
  bottom: 6px;
  width: 7px;
  height: 7px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.studio-nav-icon[data-icon="settings"]::before {
  inset: 7px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.studio-nav-icon[data-icon="settings"]::after {
  left: 12px;
  top: 12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.studio-nav-item:hover,
.studio-nav-item.active {
  border-color: transparent;
  background: var(--bg-soft);
  color: var(--text);
}

.studio-main {
  min-width: 0;
  margin-left: 280px;
  padding: 28px clamp(18px, 4vw, 42px) 70px;
}

.studio-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 28%);
  padding-bottom: 18px;
}

.studio-topbar h1 {
  margin-bottom: 0;
  font-size: clamp(1.75rem, 4vw, 2.8rem);
}

.hamburger-button {
  display: none;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  align-items: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.hamburger-button:hover {
  border-color: var(--accent);
}

.hamburger-button span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Animate hamburger to X when menu is open */
body.studio-menu-open #menuToggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body.studio-menu-open #menuToggle span:nth-child(2) {
  opacity: 0;
}

body.studio-menu-open #menuToggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}


.studio-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  margin-left: auto;
  padding: 0 12px 0 7px;
}

.theme-toggle-icon {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, #f2c14e, var(--surface) 22%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line), transparent 30%);
}

.theme-toggle-icon::before {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fff7d6;
  content: "";
}

:root[data-theme="dark"] .theme-toggle-icon {
  background: color-mix(in srgb, var(--accent), #111118 20%);
}

:root[data-theme="dark"] .theme-toggle-icon::before {
  inset: 6px 5px 6px 9px;
  background: var(--surface);
  box-shadow: -4px 0 0 #f5f0ea;
}

.studio-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.42);
}

.studio-view {
  display: none;
}

.studio-view.active {
  display: block;
}

.dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(18px, 4vw, 28px);
}

.dashboard-hero h2 {
  max-width: 620px;
}

.dashboard-hero p {
  max-width: 620px;
  color: var(--muted);
}

.studio-card-grid,
.optimize-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.studio-card,
.media-dropzone,
.compressor-panel,
.post-admin-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.studio-card {
  cursor: pointer;
  padding: 18px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.studio-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.studio-card span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.studio-card h3 {
  margin: 8px 0;
}

.studio-card p,
.media-dropzone p,
.compressor-result,
.post-admin-item p,
.studio-checklist {
  color: var(--muted);
}

.studio-checklist {
  margin: 0;
  padding-left: 18px;
}

.studio-checklist li + li {
  margin-top: 8px;
}

.media-dropzone,
.compressor-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.compact-upload {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.compact-upload span {
  color: var(--muted);
  font-size: 0.88rem;
}

.media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.media-selected {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 10px;
}

.media-selected img {
  width: 70px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
}

.media-selected strong,
.media-selected span {
  display: block;
}

.media-selected strong {
  color: var(--text);
}

.media-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.media-card {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.media-thumb-button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.media-card img {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-soft);
}

.media-card.selected img {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent), transparent 62%);
}

.media-select-button {
  position: absolute;
  top: 6px;
  left: 6px;
  min-height: 28px;
  border: 1px solid color-mix(in srgb, var(--line), transparent 12%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface), transparent 4%);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0 8px;
}

.media-card div {
  padding: 6px 0 0;
}

.media-card strong,
.media-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-card strong {
  font-size: 0.76rem;
  line-height: 1.2;
}

.media-card span {
  color: var(--muted);
  font-size: 0.72rem;
}

.media-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}

.media-bulk-actions strong {
  margin-right: auto;
}

.button.danger {
  border-color: #d84b45;
  color: #d84b45;
}

.media-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 18px;
}

.media-modal[hidden] {
  display: none;
}

.media-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.62);
}

.media-modal-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(760px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.media-modal-panel img {
  width: 100%;
  max-height: 72vh;
  border-radius: 8px;
  object-fit: contain;
  background: var(--bg-soft);
}

.media-modal-panel strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-modal-close {
  justify-self: end;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0 12px;
}

.compressor-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.compressor-result strong,
.compressor-result span {
  display: block;
}

.compressor-result img {
  width: 96px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
}

.studio-analytics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.post-admin-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.post-admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
}

.post-admin-item p {
  margin-bottom: 4px;
}

.post-admin-item small {
  color: var(--muted);
}

.post-admin-item span {
  flex: 0 0 auto;
  min-width: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 850;
  text-align: center;
  padding: 8px;
}

.analytics-source {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.login-shell {
  width: min(460px, calc(100% - 36px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 34px 0;
}

.login-brand {
  width: fit-content;
}

.login-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(24px, 6vw, 40px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-panel:hover {
  border-color: color-mix(in srgb, var(--accent), transparent 60%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.login-panel h1 {
  font-size: clamp(2rem, 8vw, 3rem);
}

.form-status.error {
  color: #b42318;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  padding: 11px 12px;
}

.field textarea {
  min-height: 180px;
  resize: vertical;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.metric strong {
  display: block;
  font-size: 1.5rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 520px) {
  .post-list-item {
    grid-template-columns: 1fr;
  }

  .article-row {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
  }

  .article-row-body p {
    display: -webkit-box;
    overflow: hidden;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .post-thumb {
    aspect-ratio: 16 / 9;
  }

  .post-thumb img {
    width: min(160px, 52%);
    height: auto;
  }

  .reader-toolbar {
    gap: 10px;
  }

  .reader-related-track {
    grid-auto-columns: minmax(260px, 88vw);
  }

  .size-control input {
    width: 110px;
  }

  .dashboard-hero,
  .post-admin-item,
  .compressor-result {
    align-items: stretch;
    flex-direction: column;
  }

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

  .compact-upload {
    grid-template-columns: 1fr;
  }

  .media-selected {
    align-items: flex-start;
    flex-direction: column;
  }

  .media-preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .public-hero {
    padding-top: 30px;
  }

  .public-hero h1 {
    font-size: clamp(2.2rem, 12vw, 3.2rem);
  }

  .public-header {
    gap: 10px;
    padding-inline: 12px;
  }

  .public-header-actions {
    flex: 1;
    justify-content: flex-end;
  }

  .public-header .brand span {
    display: none;
  }

  .public-header-search-wrap {
    max-width: calc(100vw - 118px);
  }

  .public-header-search-wrap.open {
    flex: 1;
    width: auto;
  }

  .public-search-icon {
    flex: 0 0 auto;
  }
}

@media (min-width: 720px) {
  .site-header nav a {
    display: inline;
  }

  .featured-post {
    grid-template-columns: 0.92fr 1.08fr;
  }

  .top-picks-layout {
    grid-template-columns: 0.82fr 1.18fr;
    align-items: center;
  }

  .top-picks-images {
    grid-template-columns: 1fr;
  }

  .top-picks-images img {
    aspect-ratio: 16 / 9;
  }

  .admin-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }

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

@media (max-width: 860px) {
  .studio-layout {
    display: block;
  }

  .hamburger-button {
    display: flex;
  }

  .studio-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: min(300px, 86vw);
    height: 100vh;
    padding: 18px 14px;
    transform: translateX(-104%);
    transition: transform 180ms ease;
    box-shadow: var(--shadow);
  }

  body.studio-menu-open .studio-sidebar {
    transform: translateX(0);
  }

  .studio-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.42);
  }

  .studio-main {
    margin-left: 0;
    padding-top: 24px;
  }

  .studio-card-grid,
  .optimize-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1060px) {
  .blog-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .article-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ==========================================================================
   GUTENBERG EDITOR & BLOOMBERG MINIMALIST ADMIN STYLE ADDITIONS
   ========================================================================== */

/* Distraction-free typography & input */
.editor-title {
  width: 100%;
  font-size: 2.3rem;
  font-weight: 800;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 0 0 10px 0 !important;
  margin-bottom: 12px;
  color: var(--text);
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: inherit;
}

.editor-title:focus {
  border-bottom-color: var(--accent) !important;
}

/* Quill Custom Theming overrides to match OnlyPage Studio Theme */
.ql-toolbar.ql-snow,
.ql-container.ql-snow {
  border: 1px solid var(--line) !important;
  font-family: inherit !important;
}

.ql-toolbar.ql-snow {
  background: var(--surface) !important;
  border-bottom: none !important;
  border-radius: 6px 6px 0 0 !important;
  position: sticky;
  top: 66px;
  z-index: 20;
  background: var(--surface) !important;
}

.ql-container.ql-snow {
  background: var(--bg) !important;
  border-radius: 0 0 6px 6px !important;
  min-height: 480px;
  font-size: 1.12rem;
  line-height: 1.7;
}

.ql-editor {
  min-height: 480px;
  color: var(--text) !important;
  font-family: inherit !important;
  font-size: 1.12rem !important;
  line-height: 1.7 !important;
}

/* Style Quill formatting buttons and dropdowns to match light/dark mode */
.ql-snow .ql-stroke {
  stroke: var(--text) !important;
}
.ql-snow .ql-fill {
  fill: var(--text) !important;
}
.ql-snow .ql-picker {
  color: var(--text) !important;
}
.ql-snow .ql-picker-options {
  background-color: var(--surface) !important;
  border-color: var(--line) !important;
  box-shadow: var(--shadow) !important;
}
.ql-snow .ql-picker-item {
  color: var(--text) !important;
}
.ql-snow .ql-picker-item:hover,
.ql-snow .ql-picker-item.ql-selected {
  color: var(--accent) !important;
  background-color: var(--bg-soft) !important;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-label {
  border-color: var(--line) !important;
}
.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke {
  stroke: var(--accent) !important;
}
.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill {
  fill: var(--accent) !important;
}
.ql-snow.ql-toolbar button:hover,
.ql-snow.ql-toolbar button.ql-active,
.ql-snow.ql-toolbar .ql-picker-label:hover,
.ql-snow.ql-toolbar .ql-picker-label.ql-active {
  color: var(--accent) !important;
}

/* Placeholder */
.ql-editor.ql-blank::before {
  color: var(--muted) !important;
  font-style: normal !important;
  left: 15px !important;
}

/* Image styles inside editor */
.ql-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 16px auto;
  display: block;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* Bloomberg layout for admin grid and cards */
.admin-grid.gutenberg-layout {
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 900px) {
  .admin-grid.gutenberg-layout {
    grid-template-columns: 1fr 340px;
    gap: 30px;
  }
}

.sidebar-card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 20px;
  margin-bottom: 16px;
  border-radius: 6px;
}

.sidebar-card h3 {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

/* Precise high-contrast Monospace metrics (Bloomberg-style) */
.metric {
  border: 1px solid var(--line) !important;
  background: transparent !important;
  border-radius: 4px !important;
  padding: 12px 14px !important;
}

.metric strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  font-size: 1.7rem !important;
}

.metric span {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem !important;
  letter-spacing: 0.05em;
}

/* Media Dialog Modal */
.editor-media-dialog {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.editor-media-dialog:not([hidden]) {
  display: flex;
}

.editor-media-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  border: none;
  width: 100%;
  height: 100%;
}

.editor-media-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  width: min(650px, 100%);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  z-index: 10;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.editor-media-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.editor-media-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.editor-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  padding: 18px;
  overflow-y: auto;
  flex-grow: 1;
  max-height: 50vh;
}

.editor-media-thumb {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
  transition: border-color 0.15s ease, transform 0.15s ease;
  padding: 0;
}

.editor-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editor-media-thumb:hover {
  border-color: var(--accent);
  transform: scale(1.02);
}

.editor-media-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.editor-media-upload {
  position: relative;
  display: inline-block;
}

.editor-media-upload input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Distraction-free clean forms */
.compact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.compact-field label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.compact-field input,
.compact-field select,
.compact-field textarea {
  border: 1px solid var(--line) !important;
  background: var(--bg) !important;
  border-radius: 4px !important;
  font-size: 0.88rem !important;
  padding: 8px 10px !important;
}

.compact-field input:focus,
.compact-field select:focus,
.compact-field textarea:focus {
  border-color: var(--accent) !important;
  outline: none;
}

.compact-field textarea {
  min-height: 100px;
  resize: vertical;
}

/* Remove verbose warning/info messages */
.info-desc, .form-status, .analytics-source, .hero-text {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.4;
}

/* Post Media Selected Cover image preview */
#postMediaSelected img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  margin-bottom: 8px;
  display: block;
}

/* Floating editor image controls */
.editor-image-tooltip {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 4px;
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  pointer-events: auto;
}

.editor-image-tooltip button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.editor-image-tooltip button:hover {
  opacity: 0.9;
}

.editor-image-tooltip span {
  font-size: 0.68rem;
  color: var(--muted);
}

/* Manage Posts View CSS */
.posts-table {
  display: flex;
  flex-direction: column;
}

.post-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.2s;
  gap: 16px;
}

.post-row:last-child {
  border-bottom: none;
}

.post-row:hover {
  background-color: color-mix(in srgb, var(--line), transparent 85%);
}

.post-row-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.post-row-title-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.post-row-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.post-row-status {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.status-published {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-draft {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.post-row-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--muted);
}

.post-row-meta span {
  display: inline-flex;
  align-items: center;
}

.post-row-meta strong {
  color: var(--text);
  margin-left: 3px;
}

.post-row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-post-action {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-post-action:hover {
  background: var(--line);
  border-color: var(--muted);
}

.btn-post-edit:hover {
  color: var(--accent);
}

.btn-post-delete {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-post-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

/* Front-end Article Thumbnail styles */
.article-thumbnail {
  width: 100%;
  margin-bottom: 24px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.article-thumbnail img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .post-row {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
  }
  .post-row-actions {
    margin-top: 8px;
    justify-content: flex-end;
  }
}
