:root {
  --brand: #4c97ff;
  --brand-dark: #3373cc;
  --accent: #ff8c1a;
  --bg: #f5f7fb;
  --text: #1a1a2e;
  --muted: #5c6370;
  --card: #fff;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid #e8ecf2;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

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

.nav .btn + .btn {
  margin-left: 0;
}

.nav a:not(.btn) {
  color: var(--text);
  font-weight: 500;
}

[data-blocksy-auth-nav] {
  display: contents;
}

.nav-user-email {
  align-self: center;
  max-width: 180px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav .blocksy-nav-logout {
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(76, 151, 255, 0.4);
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--brand);
  border: 2px solid var(--brand);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.hero {
  padding: 64px 0 48px;
  background: linear-gradient(135deg, #eef5ff 0%, #fff 50%, #fff8f0 100%);
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 680px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.section {
  padding: 56px 0;
}

.section h2 {
  font-size: 1.75rem;
  margin-bottom: 24px;
  text-align: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-bottom: 8px;
  color: var(--brand-dark);
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.seo-text {
  max-width: 800px;
  margin: 0 auto;
}

.seo-text p {
  margin-bottom: 16px;
  color: var(--muted);
}

.seo-text h2 {
  text-align: left;
  margin: 32px 0 16px;
  font-size: 1.4rem;
}

.steps {
  counter-reset: step;
  list-style: none;
  max-width: 600px;
  margin: 0 auto;
}

.steps li {
  counter-increment: step;
  padding: 16px 16px 16px 56px;
  position: relative;
  margin-bottom: 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.faq {
  max-width: 720px;
  margin: 0 auto;
}

.faq details {
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 10px;
  padding: 16px 20px;
  box-shadow: var(--shadow);
}

.faq summary {
  font-weight: 600;
  cursor: pointer;
}

.faq p {
  margin-top: 12px;
  color: var(--muted);
}

.breadcrumbs {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.breadcrumbs a {
  color: var(--muted);
}

.site-footer {
  background: #1a1a2e;
  color: #ccc;
  padding: 40px 0;
  margin-top: 40px;
}

.site-footer a {
  color: #aaa;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}

.footer-grid h4 {
  color: #fff;
  margin-bottom: 12px;
}

.footer-grid ul {
  list-style: none;
}

.footer-grid li {
  margin-bottom: 8px;
}

.form-card {
  max-width: 420px;
  margin: 40px auto;
  background: var(--card);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
}

.form-error {
  color: #d32f2f;
  font-size: 0.875rem;
  margin-top: 8px;
}

.form-success {
  color: #2e7d32;
  font-size: 0.875rem;
  margin-top: 8px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1a1a2e;
  color: #fff;
  padding: 14px 20px;
  border-radius: 8px;
  z-index: 9999;
  display: none;
}

.toast.show {
  display: block;
}

.dashboard-section {
  padding-top: 32px;
}

.dashboard-top {
  margin-bottom: 24px;
}

.dashboard-header-nav {
  gap: 8px;
}

.dashboard-header-nav .btn + .btn {
  margin-left: 0;
}

.dashboard-title {
  margin: 0 0 6px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}

.dashboard-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  word-break: break-all;
}

.dashboard-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.dashboard-upload {
  cursor: pointer;
}

.project-list {
  list-style: none;
}

.project-list li {
  background: var(--card);
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.project-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.project-info {
  min-width: 0;
  flex: 1 1 200px;
}

.project-title {
  display: block;
  margin-bottom: 4px;
}

.project-date {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

.project-list-empty,
.project-list-loading {
  display: block;
  text-align: center;
  color: var(--muted);
}

.project-list-empty p {
  margin: 0;
}

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

.btn-sm {
  padding: 8px 14px;
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .nav {
    gap: 12px;
    font-size: 0.9rem;
  }

  .project-list-item {
    flex-direction: column;
    align-items: stretch;
  }

  .project-actions {
    width: 100%;
  }

  .project-actions .btn {
    flex: 1 1 auto;
  }
}
