@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-muted: #eef4ff;
  --ink: #172033;
  --muted: #667085;
  --line: #dbe3ef;
  --blue: #2563eb;
  --blue-dark: #1746a2;
  --red: #dc2626;
  --green: #12805c;
  --amber: #b45309;
  --shadow: 0 18px 45px rgba(23, 32, 51, 0.08);
  --radius: 8px;
  --font-sans: "Outfit", "Inter", ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.blog-body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7f8fb 46%, #eef4ff 100%);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.blog-app {
  min-height: 100vh;
}

.blog-main {
  padding-top: 96px;
}

.home-site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  border-bottom: 1px solid #f3f4f6;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
}

.home-header-inner {
  display: flex;
  width: min(1280px, 100%);
  height: 80px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 0 32px;
}

.home-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.home-brand img,
.home-footer-brand img {
  display: block;
  object-fit: contain;
}

.home-brand img {
  width: 118px;
  height: 68px;
}

.home-nav-links,
.home-header-actions,
.home-phone,
.home-socials {
  display: flex;
  align-items: center;
}

.home-nav-links {
  gap: 32px;
}

.home-nav-links a {
  color: #4b5563;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 160ms ease;
}

.home-nav-links a:hover,
.home-nav-links a[aria-current="page"],
.home-phone a:hover {
  color: #2563eb;
}

.home-header-actions {
  gap: 24px;
}

.home-phone {
  gap: 8px;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.home-phone svg,
.home-contact-list svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.home-phone svg,
.home-contact-list svg {
  color: #2563eb;
}

.home-socials {
  gap: 12px;
  color: #9ca3af;
}

.home-socials span {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  color: currentColor;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.home-socials svg,
.share-row svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.home-header-actions .home-socials svg {
  width: 18px;
  height: 18px;
}

.home-footer-brand .home-socials svg {
  width: 20px;
  height: 20px;
}

.home-footer-brand .home-socials {
  gap: 16px;
}

.social-facebook:hover {
  color: #2563eb;
}

.social-instagram:hover {
  color: #db2777;
}

.social-twitter:hover {
  color: #38bdf8;
}

.social-linkedin:hover {
  color: #1d4ed8;
}

.home-touch-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #dc2626;
  box-shadow: 0 10px 15px -3px rgba(254, 202, 202, 0.8), 0 4px 6px -4px rgba(254, 202, 202, 0.8);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0 24px;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.home-touch-link:hover {
  background: #b91c1c;
  color: #fff;
}

.home-touch-link:active {
  transform: scale(0.95);
}

.home-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  background: transparent;
  color: #4b5563;
  padding: 0;
}

.home-menu-button span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.home-menu-button.is-open span:first-child {
  transform: translateY(7px) rotate(45deg);
}

.home-menu-button.is-open span:nth-child(2) {
  opacity: 0;
}

.home-menu-button.is-open span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

.home-mobile-menu {
  display: grid;
  gap: 16px;
  border-top: 1px solid #f3f4f6;
  background: #fff;
  padding: 24px 16px;
}

.home-mobile-menu a {
  color: #111827;
  font-size: 1.125rem;
  font-weight: 500;
}

.home-mobile-contact {
  display: grid;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

.home-mobile-contact .home-touch-link {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
}

.home-site-footer {
  background: #111827;
  color: #fff;
  padding: 80px 0 40px;
}

.home-footer-inner {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}

.home-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 48px;
  margin-bottom: 64px;
}

.home-footer-brand {
  display: grid;
  gap: 24px;
}

.home-footer-brand img {
  width: 132px;
  height: 76px;
}

.home-footer-brand p,
.home-site-footer ul {
  color: #9ca3af;
  line-height: 1.625;
}

.home-site-footer h2 {
  margin: 0 0 24px;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
}

.home-site-footer ul {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-site-footer a {
  color: inherit;
  transition: color 160ms ease;
}

.home-site-footer a:hover {
  color: #fff;
}

.home-contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-contact-list li:first-child {
  align-items: flex-start;
}

.home-footer-bottom {
  border-top: 1px solid #1f2937;
  padding-top: 32px;
  color: #6b7280;
  font-size: 0.875rem;
  text-align: center;
}

.home-footer-bottom p {
  margin: 0;
}

.site-header,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(220, 38, 38, 0.2);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  line-height: 1.1;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a,
.link-button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  color: #344054;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 14px;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.link-button {
  appearance: none;
}

.site-nav a:hover,
.link-button:hover {
  border-color: #b8c7dd;
  color: var(--blue);
}

.blog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  align-items: end;
  gap: 36px;
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 22px;
  padding: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(18, 128, 92, 0.08)),
    #fff;
  box-shadow: var(--shadow);
}

.blog-hero h1,
.login-panel h1,
.post-sidebar h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.4rem, 7vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.blog-hero p,
.login-panel p {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
}

.search-panel {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
}

.search-panel label,
.compact-label,
.post-form label span,
.upload-row label {
  display: block;
  color: #344054;
  font-size: 0.84rem;
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input,
select,
textarea,
.editor-canvas {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input,
select {
  min-height: 44px;
  padding: 0 13px;
}

textarea {
  padding: 12px 13px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.editor-canvas:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button {
  padding: 0 16px;
}

.button:active,
.icon-button:active {
  transform: translateY(1px);
}

.button.primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 12px 26px rgba(220, 38, 38, 0.2);
}

.button.primary:hover {
  background: #b91c1c;
}

.button.secondary {
  border-color: var(--line);
  background: #fff;
  color: #344054;
}

.button.secondary:hover {
  border-color: #b8c7dd;
}

.button.danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.filter-strip,
.content-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.filter-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 8px 0 24px;
}

.filter-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
}

.chip {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: #344054;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0 12px;
}

.chip.is-active {
  border-color: var(--blue);
  background: var(--surface-muted);
  color: var(--blue-dark);
}

.status-line {
  min-height: 28px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 6px 0 28px;
}

.post-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 34px rgba(23, 32, 51, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: #b8c7dd;
  box-shadow: 0 18px 42px rgba(23, 32, 51, 0.1);
}

.post-card-media,
.article-hero-media,
.fallback-media {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(220, 38, 38, 0.1)),
    #eef4ff;
  color: var(--blue-dark);
  font-weight: 800;
}

.post-card-media {
  aspect-ratio: 16 / 10;
}

.post-card-media img,
.article-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.post-card h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.post-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.post-card .read-link {
  margin-top: auto;
  color: var(--blue);
  font-weight: 800;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 4px 0 44px;
}

.article-view {
  width: min(880px, 100%);
  margin: 0 auto 54px;
}

.article-back {
  margin-bottom: 18px;
}

.article-header {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
}

.article-header h1 {
  margin: 0;
  font-size: clamp(2.1rem, 6vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.article-header p {
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.article-hero-media {
  overflow: hidden;
  aspect-ratio: 16 / 8;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.share-row,
.related-grid,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-row {
  margin: 8px 0 28px;
}

.share-row a,
.share-row button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: #344054;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0 12px;
  transition: border-color 160ms ease, color 160ms ease;
}

.share-row a:hover,
.share-row button:hover {
  border-color: #b8c7dd;
}

.share-row .social-facebook:hover {
  color: #2563eb;
}

.share-row .social-twitter:hover {
  color: #38bdf8;
}

.share-row .social-linkedin:hover {
  color: #1d4ed8;
}

.article-content {
  color: #263244;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.78;
}

.article-content > *:first-child {
  margin-top: 0;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 1.65em 0 0.55em;
  color: var(--ink);
  font-family: var(--font-sans);
  letter-spacing: 0;
  line-height: 1.16;
}

.article-content h2 {
  font-size: 1.9rem;
}

.article-content h3 {
  font-size: 1.45rem;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content pre,
.article-content table,
.article-content figure {
  margin: 0 0 1.2em;
}

.article-content ul,
.article-content ol {
  padding-left: 1.4em;
}

.article-content li {
  margin: 0.35em 0;
}

.article-content a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content blockquote {
  border-left: 4px solid var(--blue);
  background: #eef4ff;
  border-radius: var(--radius);
  padding: 18px 20px;
}

.article-content pre {
  overflow-x: auto;
  border-radius: var(--radius);
  background: #111827;
  color: #e5e7eb;
  padding: 18px;
}

.article-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.article-content :not(pre) > code {
  border-radius: 6px;
  background: #eef2f7;
  color: #344054;
  padding: 2px 6px;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius);
}

.article-content th,
.article-content td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.article-content th {
  background: #eef4ff;
}

.article-content img,
.article-content iframe {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
}

.article-content iframe {
  aspect-ratio: 16 / 9;
  height: auto;
}

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

.related-section h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.related-card {
  flex: 1 1 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
}

.related-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.25;
}

.related-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 34px 0 42px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: center;
  gap: 36px;
  width: min(980px, calc(100% - 32px));
  margin: 60px auto;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

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

.form-help {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  width: min(1320px, calc(100% - 32px));
  margin: 26px auto 54px;
}

.post-sidebar,
.editor-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 34px rgba(23, 32, 51, 0.06);
}

.post-sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
  padding: 18px;
}

.sidebar-head,
.editor-topbar,
.danger-row,
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.post-sidebar h1 {
  font-size: 1.55rem;
}

.post-sidebar p,
.danger-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.icon-button {
  width: 42px;
  padding: 0;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 1.35rem;
}

.compact-label {
  margin: 18px 0 8px;
}

.compact-input {
  margin-bottom: 14px;
}

.post-list-admin {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding-right: 4px;
}

.admin-post-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: inherit;
  padding: 12px;
  text-align: left;
}

.admin-post-item.is-active {
  border-color: var(--blue);
  background: #eef4ff;
}

.admin-post-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.94rem;
}

.admin-post-item span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.editor-panel {
  padding: 22px;
}

.editor-topbar {
  margin-bottom: 20px;
}

.editor-topbar h2 {
  margin: 8px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.1;
}

.status-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: var(--radius);
  background: #fff7ed;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0 10px;
}

.status-pill.is-published {
  background: #ecfdf3;
  color: var(--green);
}

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

.post-form label {
  display: grid;
  gap: 7px;
}

.span-2 {
  grid-column: span 2;
}

.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  align-items: end;
}

.upload-row label {
  margin-bottom: 7px;
}

.image-preview {
  display: grid;
  min-height: 118px;
  place-items: center;
  overflow: hidden;
  margin: 0;
  border: 1px dashed #b8c7dd;
  border-radius: var(--radius);
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.image-preview img {
  width: 100%;
  height: 118px;
  object-fit: cover;
}

.rich-editor {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.toolbar button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #344054;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0 10px;
}

.toolbar button:hover {
  border-color: #b8c7dd;
}

.editor-canvas {
  min-height: 420px;
  border: 0;
  border-radius: 0;
  padding: 24px;
}

.editor-canvas:empty::before {
  content: "Start writing the article...";
  color: #98a2b3;
}

.danger-row {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.55);
  padding: 20px;
}

.preview-modal {
  width: min(860px, 100%);
  max-height: min(820px, calc(100vh - 40px));
  overflow: auto;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 16px 18px;
}

.modal-head h2 {
  margin: 0;
}

#preview-content {
  padding: 28px;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100% - 36px));
}

.toast {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-weight: 700;
  padding: 13px 14px;
}

.toast.is-error {
  border-color: #fecaca;
  color: #b91c1c;
}

[hidden] {
  display: none !important;
}

@media (max-width: 920px) {
  .home-nav-links,
  .home-header-actions {
    display: none;
  }

  .home-menu-button {
    display: flex;
  }

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

  .blog-hero,
  .login-panel,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .blog-hero {
    padding: 34px;
  }

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

  .post-sidebar {
    position: static;
  }

  .post-list-admin {
    max-height: 280px;
  }
}

@media (max-width: 640px) {
  .blog-main {
    padding-top: 88px;
  }

  .home-header-inner {
    height: 80px;
    padding: 0 16px;
  }

  .home-footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .home-site-footer {
    padding-top: 64px;
  }

  .site-header,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .site-header,
  .site-footer,
  .editor-topbar,
  .danger-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .blog-hero,
  .filter-strip,
  .content-shell,
  .login-panel,
  .admin-shell {
    width: min(100% - 24px, 1180px);
  }

  .blog-hero,
  .login-panel,
  .editor-panel {
    padding: 22px;
  }

  .search-row,
  .filter-strip,
  .post-grid,
  .editor-grid,
  .upload-row {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .button-row,
  .button-row .button {
    width: 100%;
  }

  .article-hero-media {
    aspect-ratio: 16 / 11;
  }

  .editor-canvas {
    min-height: 340px;
    padding: 18px;
  }
}
