:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --text: #101828;
  --muted: #667085;
  --soft: #eaecf0;
  --accent: #7f56d9;
  --accent-dark: #6941c6;
  --accent-soft: #f4ebff;
  --green-soft: #ecfdf3;
  --radius: 22px;
  --shadow: 0 18px 55px rgba(16, 24, 40, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.site-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--accent); color: white;
  display: inline-flex; align-items: center; justify-content: center;
}
nav { display: flex; align-items: center; gap: 20px; color: var(--muted); font-weight: 600; }
nav a:hover { color: var(--accent); }
.inline-form { display: inline; margin: 0; }
.link-button { border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }

main { max-width: 1180px; margin: 0 auto; padding: 0 22px 80px; }
.hero { padding: 64px 0 44px; text-align: center; max-width: 850px; margin: 0 auto; }
.eyebrow, .category { color: var(--accent-dark); font-weight: 700; font-size: 14px; }
.hero h1 { font-size: clamp(42px, 6vw, 72px); line-height: 1.02; margin: 14px 0 22px; letter-spacing: -0.055em; }
.hero-text { color: var(--muted); font-size: 20px; line-height: 1.55; margin: 0 auto; max-width: 660px; }

.featured-grid { margin-top: 18px; }
.featured-card {
  background: var(--panel); border: 1px solid var(--soft); border-radius: 30px;
  box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-columns: 1.1fr .9fr;
}
.featured-image {
  min-height: 420px;
  background: linear-gradient(135deg, #f4ebff, #ecfdf3);
}

.article-image {
  background: transparent;
  border-radius: 30px;
  overflow: visible;
  box-shadow: none;
  min-height: 0;
}
.featured-image img,
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-image img {
  width: 100%;
  max-width: 820px;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 24px;
  display: block;
  margin: 2rem auto;
  box-shadow: var(--shadow);
}
.featured-content { padding: 46px; align-self: center; }
.featured-content h2 { font-size: 40px; line-height: 1.1; letter-spacing: -0.035em; margin: 12px 0; }
.featured-content p, .card-content p, .section-heading p { color: var(--muted); line-height: 1.6; }
.read-more { color: var(--accent-dark); font-weight: 700; }

.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 58px 0 24px; }
.section-heading h2 { font-size: 30px; margin: 0; letter-spacing: -0.025em; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { background: var(--panel); border: 1px solid var(--soft); border-radius: var(--radius); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-image { height: 220px; background: linear-gradient(135deg, #f4ebff, #f9f5ff); }
.card-content { padding: 24px; }
.card-content h3 { font-size: 23px; line-height: 1.22; margin: 10px 0; letter-spacing: -0.025em; }

.image-placeholder { min-height: 100%; display: flex; align-items: center; justify-content: center; font-size: 58px; font-weight: 800; color: var(--accent); background: radial-gradient(circle at top left, #f4ebff, #ffffff 65%); }
.image-placeholder.small { font-size: 34px; }

.article { max-width: 920px; margin: 34px auto 0; }
.article-header { text-align: center; margin-bottom: 34px; }
.article-header h1 { font-size: clamp(38px, 5vw, 64px); line-height: 1.05; margin: 14px 0 16px; letter-spacing: -0.05em; }
.article-header p { color: var(--muted); font-size: 20px; line-height: 1.55; }
.article-image { border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); }
.article-body { background: var(--panel); border: 1px solid var(--soft); border-radius: 26px; padding: 44px; margin-top: 34px; font-size: 18px; line-height: 1.75; }
.article-body p { margin: 0 0 22px; }
.source-link a { color: var(--accent-dark); font-weight: 700; }

.form-shell, .admin-header, .admin-list { max-width: 900px; margin: 34px auto; }
.form-shell.narrow { max-width: 460px; }
.form-shell h1, .admin-header h1 { font-size: 42px; letter-spacing: -0.04em; margin: 10px 0 24px; }
.form-card { background: var(--panel); border: 1px solid var(--soft); border-radius: 26px; padding: 30px; box-shadow: var(--shadow); display: grid; gap: 18px; }
label { display: grid; gap: 8px; font-weight: 700; color: #344054; }
input, textarea { width: 100%; border: 1px solid #d0d5dd; border-radius: 14px; padding: 13px 15px; font: inherit; color: var(--text); background: #fff; }
textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.checkbox { display: flex; align-items: center; flex-direction: row; gap: 10px; }
.checkbox input { width: auto; }
.primary-button { display: inline-flex; justify-content: center; align-items: center; border: 0; background: var(--accent); color: white; border-radius: 14px; padding: 12px 18px; font-weight: 800; cursor: pointer; }
.primary-button:hover { background: var(--accent-dark); }
.error { color: #b42318; background: #fef3f2; border: 1px solid #fecdca; border-radius: 12px; padding: 12px; }
.help-text { color: var(--muted); font-size: 14px; }

.admin-header { display: flex; justify-content: space-between; align-items: center; }
.admin-row { background: var(--panel); border: 1px solid var(--soft); border-radius: 20px; padding: 20px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.admin-row h3 { margin: 0 0 6px; }
.admin-row p { margin: 0; color: var(--muted); }
.admin-actions { display: flex; align-items: center; gap: 14px; }
.admin-actions a { color: var(--accent-dark); font-weight: 700; }
.danger-button { border: 0; background: #fef3f2; color: #b42318; border-radius: 12px; padding: 9px 12px; cursor: pointer; font-weight: 700; }
.empty-state { background: var(--panel); border: 1px solid var(--soft); border-radius: 20px; padding: 30px; color: var(--muted); }
.site-footer { max-width: 1180px; margin: 0 auto; padding: 28px 22px 44px; display: flex; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--soft); }

@media (max-width: 860px) {
  .featured-card { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .featured-content { padding: 28px; }
  .form-grid { grid-template-columns: 1fr; }
  .site-header, .site-footer, .admin-header, .admin-row { flex-direction: column; gap: 18px; align-items: flex-start; }
  nav { flex-wrap: wrap; }
}
.article-body a {
  color: #6941c6;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.article-body a:hover {
  color: #53389e;
}
