
:root {
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'DM Sans', sans-serif;
}
a { color: inherit; text-decoration: none; }
.page-shell { display: flex; flex-direction: column; min-height: 100vh; }
header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--background) / 0.95);
  backdrop-filter: blur(12px);
}
.header-inner {
  position: relative;
  max-width: 1280px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
nav { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; }
nav a {
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}
nav a:hover,
nav a[aria-current="page"] { background: hsl(var(--primary) / 0.1); color: hsl(var(--primary)); }
.menu-toggle { display: none !important; }
main {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
.hero {
  margin: 0 -1.5rem 2rem;
  padding: 4rem 1.5rem;
  background: linear-gradient(180deg, hsl(var(--primary) / 0.07), hsl(var(--background) / 0.35));
  text-align: center;
}
.hero h1 {
  margin: 0 0 0.75rem;
  color: hsl(var(--primary));
  font: 700 clamp(2rem, 4vw, 2.8rem)/1.15 'Lora', Georgia, serif;
}
.hero p { max-width: 720px; margin: 0 auto; color: hsl(var(--muted-foreground)); line-height: 1.75; }
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.button,
.button-secondary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.65rem 1rem;
  font: 600 0.95rem/1.2 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.button { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.button:hover { background: hsl(var(--primary) / 0.9); }
.button-secondary { border-color: hsl(var(--border)); background: hsl(var(--card)); color: hsl(var(--foreground)); }
.button-secondary:hover { background: hsl(var(--muted)); }
.button.danger { background: #a83e36; color: #fff; }
.button:focus-visible,
.button-secondary:focus-visible,
.menu-toggle:focus-visible,
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible { outline: 3px solid hsl(var(--ring)); outline-offset: 2px; }
.posts { display: grid; gap: 1rem; }
.post-card {
  padding: 1.5rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
}
.post-card h2 {
  margin: 0 0 0.6rem;
  color: hsl(var(--primary));
  font: 700 1.35rem/1.3 'Lora', Georgia, serif;
}
.post-card p { margin: 0 0 1rem; color: hsl(var(--muted-foreground)); line-height: 1.8; }
.post-card .meta { margin-bottom: 1rem; color: hsl(var(--muted-foreground)); font-size: 0.9rem; }
.post-media { display: flex; justify-content: center; margin-bottom: 1rem; }
.post-media.small img,
.post-media.small video,
.post-media.small audio { max-width: min(360px, 100%); }
.post-media.medium img,
.post-media.medium video,
.post-media.medium audio { max-width: min(640px, 100%); }
.post-media.large img,
.post-media.large video,
.post-media.large audio { max-width: 100%; }
.post-media img,
.post-media video { display: block; width: 100%; border-radius: 8px; }
.post-media audio { width: 100%; }
.post-media a { color: hsl(var(--primary)); font-weight: 700; }
.post-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.hidden { display: none !important; }
.editor-panel {
  margin-bottom: 1.25rem;
  padding: 1.5rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
}
.editor-panel h2 { margin: 0 0 1.25rem; color: hsl(var(--primary)); font: 700 1.4rem/1.3 'Lora', Georgia, serif; }
.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: 0.4rem; color: hsl(var(--foreground)); font-weight: 600; }
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  padding: 0.8rem 0.9rem;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  font: 1rem/1.4 'DM Sans', sans-serif;
}
.field [aria-invalid="true"] { border-color: #a83e36; background: #fff8f7; }
.field textarea { min-height: 160px; resize: vertical; }
.field small { display: block; margin-top: 0.4rem; color: hsl(var(--muted-foreground)); }
.status {
  display: none;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 600;
}
.status.visible { display: block; }
.status.success { border-color: #b8ddac; background: #e7f5e7; color: #1f5d22; }
.status.error { border-color: #f1c0c0; background: #ffe7e7; color: #8b1a1a; }
.site-footer { border-top: 1px solid hsl(var(--border)); background: hsl(var(--muted) / 0.3); }
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
}
.footer-grid { display: grid; grid-template-columns: 1.3fr 0.8fr 1fr; gap: 2rem; }
.footer-brand { color: hsl(var(--primary)); font: 700 1.4rem/1.2 'Lora', Georgia, serif; }
.footer-heading { display: block; margin-bottom: 0.75rem; color: hsl(var(--foreground)); font-weight: 700; }
.footer-grid p { max-width: 42ch; color: hsl(var(--muted-foreground)); line-height: 1.7; }
.footer-links { display: grid; gap: 0.55rem; }
.footer-links a,
.footer-contact a { color: hsl(var(--muted-foreground)); }
.footer-links a:hover,
.footer-contact a:hover { color: hsl(var(--primary)); }
.footer-contact { display: grid; gap: 0.55rem; color: hsl(var(--muted-foreground)); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  font-size: 0.88rem;
}
.footer-legal { display: flex; gap: 1rem; }
.footer-legal a:hover { color: hsl(var(--primary)); }
@media (max-width: 767px) {
  .header-inner { min-height: 60px; padding: 0.65rem 1rem; }
  .menu-toggle {
    width: 42px;
    height: 42px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid hsl(var(--border));
    border-radius: 6px;
    background: hsl(var(--card));
    color: hsl(var(--foreground));
  }
  .menu-toggle svg { width: 20px; height: 20px; }
  main { padding: 1.25rem 1rem 3rem; }
  .hero { margin: 0 -1rem 1.5rem; padding: 3rem 1rem; }
  .toolbar { align-items: stretch; }
  .footer-inner { padding: 2.5rem 1rem 1rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .hero { padding: 2.5rem 1rem; }
  .hero h1 { font-size: 2rem; }
  .toolbar { flex-direction: column; }
  .toolbar > div:last-child { display: flex; justify-content: flex-start; }
  .post-card,
  .editor-panel { padding: 1rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > :first-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .footer-legal { flex-wrap: wrap; }
}
