[x-cloak] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header__logo {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
}
.site-header__logo:hover { color: #4f46e5; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 150ms, color 150ms, border-color 150ms;
}
.btn--primary {
  background: #4f46e5;
  color: #ffffff;
}
.btn--primary:hover {
  background: #4338ca;
}
.btn--primary:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}
.btn--secondary {
  background: #ffffff;
  color: #0f172a;
  border-color: #e2e8f0;
}
.btn--secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.card code {
  font-size: 14px;
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 4px;
}

.hero {
  padding: 48px 0 32px;
}
.hero__title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  color: #0f172a;
  margin: 0 0 16px;
}
.hero__body {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #475569;
  margin: 0 0 24px;
  max-width: 36rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__title--editable,
.hero__body--editable {
  cursor: text;
}
.hero__title--editable:focus-visible,
.hero__body--editable:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
  border-radius: 4px;
}

.error-page {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 64px 0;
}
.error-page__code {
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
}
.error-page__title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  color: #0f172a;
  margin: 0 0 16px;
}
.error-page__message {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #475569;
  margin: 0 0 32px;
  word-break: break-word;
}

.editor-badge {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  background: #4f46e5;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 9999px;
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
}
.editor-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #22c55e;
  position: relative;
  flex-shrink: 0;
}
.editor-badge__dot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 9999px;
  background: #22c55e;
  opacity: 0.5;
  animation: editor-dot-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes editor-dot-ping {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.8); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .editor-badge__dot::after {
    animation: none;
  }
}
.editor-badge__link {
  color: #c7d2fe;
  text-decoration: underline;
}
.editor-badge__link:hover {
  color: #ffffff;
}

.editor-save-error {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  max-width: 36rem;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.mobile-nav {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 24px 16px;
}
.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
}
.mobile-nav a:hover { color: #4f46e5; }
