:root {
  --color-bg: #ffffff;
  --color-surface: #f8f9fc;
  --color-surface-alt: #eef1fd;
  --color-border: #a0a0a0;
  --color-text: #14161f;
  --color-text-muted: #656a7d;
  --color-primary: #4f46e5;
  --color-primary-dark: #4338ca;
  --color-primary-light: #eef2ff;
  --color-accent: #f59e0b;
  --color-danger: #dc2626;
  --color-apa-itu: #4f46e5;
  --color-cara: #059669;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 45, 0.06);
  --shadow-md: 0 10px 24px rgba(20, 22, 45, 0.08);
  --shadow-lg: 0 24px 48px rgba(20, 22, 45, 0.16);
  --max-width: 1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 2.5rem 0; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; margin-top: 0; font-weight: 700; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #14161f;
  padding: 0.45rem 1rem;
  border-radius: 999px;
}
.logo-img { height: 46px; width: auto; display: block; }
.main-nav { display: flex; gap: 1.5rem; }
.main-nav a {
  color: var(--color-text); font-weight: 600; font-size: 0.92rem;
  position: relative; padding: 0.25rem 0;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  background: var(--color-primary); transition: right 0.2s ease;
}
.main-nav a:hover { text-decoration: none; color: var(--color-primary); }
.main-nav a:hover::after { right: 0; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--color-text); }

@media (max-width: 720px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 0.5rem 1.25rem 1rem;
    gap: 0.75rem;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--color-surface-alt) 0%, var(--color-bg) 100%);
  padding: 4rem 0 3.5rem;
  text-align: center;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 999px; filter: blur(60px); z-index: 0;
}
.hero::before {
  width: 320px; height: 320px; top: -140px; left: -80px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.18), transparent 70%);
}
.hero::after {
  width: 360px; height: 360px; top: -100px; right: -120px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.16), transparent 70%);
}
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: #fff; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm);
  padding: 0.35rem 0.9rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  color: var(--color-primary); margin-bottom: 1.25rem;
}
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 0.65rem; }
.hero-sub { color: var(--color-text-muted); margin-bottom: 2rem; font-size: 1.05rem; }
.hero-buttons { display: flex; gap: 0.75rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.hero-stats {
  display: flex; justify-content: center; gap: 2rem; margin-top: 2.5rem; flex-wrap: wrap;
  color: var(--color-text-muted); font-size: 0.85rem;
}
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--color-text); }

/* Search */
.search-box { display: flex; gap: 0.5rem; max-width: 560px; margin: 0 auto; position: relative; }
.search-box input {
  flex: 1;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-box input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.search-box button {
  padding: 0.7rem 1.25rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.search-box button:hover { background: var(--color-primary-dark); transform: translateY(-1px); }
.search-box-lg { max-width: 640px; }
.search-box-lg input {
  padding: 1.05rem 1.3rem; font-size: 1.05rem; border-radius: 999px 0 0 999px; box-shadow: var(--shadow-md);
}
.search-box-lg button { padding: 1.05rem 1.75rem; border-radius: 0 999px 999px 0; box-shadow: var(--shadow-md); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff; box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline { background: #fff; color: var(--color-text); border-color: var(--color-border); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-cara {
  background: linear-gradient(135deg, var(--color-cara), #047857);
  color: #fff; box-shadow: var(--shadow-sm);
}
.btn-cara:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-block { width: 100%; justify-content: center; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.1rem;
}
.article-card {
  display: block;
  background: #fff;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-apa-itu);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0.1rem;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.article-card[href^="/cara/"] { border-top-color: var(--color-cara); }
.article-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); text-decoration: none; }
.article-card-image { width: 100%; height: 140px; object-fit: cover; display: block; }
.article-card-body { padding: 1.25rem; }
.article-card h3 { font-family: var(--font-display); margin: 0.7rem 0 0.4rem; font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; }
.article-card p { color: var(--color-text-muted); font-size: 0.9rem; margin: 0; }
.card-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  /* border-radius: 10px; */
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-apa_itu { background: var(--color-apa-itu); }
.badge-cara { background: var(--color-cara); }
.badge-category {
  background: var(--color-surface); color: var(--color-text-muted);
  border: 1px solid var(--color-border); text-transform: none; letter-spacing: normal; font-weight: 600;
}

/* Categories */
.category-grid { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.category-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.category-chip .icon { font-size: 1.05rem; }
.category-chip .count {
  color: var(--color-text-muted); font-size: 0.78rem; font-weight: 600;
  background: var(--color-surface); border-radius: 999px; padding: 0.1rem 0.5rem;
}
.category-chip:hover { border-color: var(--color-primary); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Breadcrumbs */
.breadcrumbs { margin: 1.25rem 0; font-size: 0.85rem; color: var(--color-text-muted); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; padding: 0; margin: 0; gap: 0.4rem; }
.breadcrumbs li { display: flex; align-items: center; gap: 0.4rem; }
.crumb-sep { color: var(--color-border); }

/* Article page */
.article-page { padding: 1.5rem 1.25rem 3.5rem; max-width: 780px; }
.article-header { margin-bottom: 1rem; }
.article-header h1 { margin: 0.6rem 0; font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
.article-meta { color: var(--color-text-muted); font-size: 0.9rem; }
.article-featured-image {
  width: 100%; max-height: 380px; object-fit: cover; border-radius: var(--radius-lg);
  margin: 1.25rem 0; box-shadow: var(--shadow-sm);
}
.short-answer {
  position: relative;
  background: var(--color-surface-alt);
  border-left: 4px solid var(--color-primary);
  padding: 1.1rem 1.25rem 1.1rem 1.5rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  font-size: 1.08rem;
  font-weight: 500;
}
article section { margin: 1.9rem 0; }
article section h2 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.prose { color: var(--color-text); }
.steps { list-style: none; padding-left: 0; counter-reset: step; }
.steps li {
  position: relative; padding-left: 2.6rem; margin-bottom: 1.1rem; counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 1.9rem; height: 1.9rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff; font-weight: 700; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
}
.steps p { color: var(--color-text-muted); margin: 0.3rem 0 0; }

.faq details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.6rem;
  background: #fff;
  transition: border-color 0.15s ease;
}
.faq details[open] { border-color: var(--color-primary-light); }
.faq summary {
  cursor: pointer; font-weight: 600; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "\2304"; font-size: 1.1rem; color: var(--color-text-muted);
  transition: transform 0.2s ease; flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(180deg); color: var(--color-primary); }
.faq p { margin: 0.7rem 0 0; color: var(--color-text-muted); }

.related { margin-top: 3rem; border-top: 1px solid var(--color-border); padding-top: 1.75rem; }
.related-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.related-link {
  display: flex; align-items: center; gap: 0.85rem;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 0.9rem 1.1rem; color: var(--color-text);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.related-link:hover { border-color: var(--color-primary); box-shadow: var(--shadow-sm); transform: translateX(4px); text-decoration: none; }
.related-title { flex: 1; font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; letter-spacing: -0.01em; }
.related-arrow { color: var(--color-text-muted); font-size: 1.1rem; transition: transform 0.15s ease, color 0.15s ease; }
.related-link:hover .related-arrow { color: var(--color-primary); transform: translateX(3px); }

.empty-note, .result-count { color: var(--color-text-muted); }

/* Footer */
.site-footer { background: #14161f; color: #a3a7bd; margin-top: 3rem; }
.footer-inner { padding: 2.5rem 1.25rem; font-size: 0.85rem; }
.footer-main {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-brand { color: #fff; font-family: var(--font-display); font-weight: 700; }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a { color: #a3a7bd; font-weight: 500; }
.footer-links a:hover { color: #fff; }
.footer-legal {
  display: flex; gap: 1.1rem; flex-wrap: wrap; margin-top: 1.25rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.8rem;
}
.footer-legal a { color: #787d94; }
.footer-legal a:hover { color: #fff; }

/* Static content pages (about / terms / privacy / disclaimer) */
.static-page { max-width: 780px; }
.static-page h2 { font-size: 1.2rem; margin-top: 2rem; margin-bottom: 0.5rem; }
.static-page p { margin: 0 0 1rem; }
.static-page p:first-of-type { margin-top: 0.5rem; }

/* ---- Admin ---- */
.admin-body { background: var(--color-surface); }
.admin-header { background: #111827; color: #fff; }
.admin-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.admin-header .logo { color: #fff; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.logo-icon { height: 24px; width: 24px; display: block; }
.admin-nav { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.admin-nav a { color: #d1d5db; }
.admin-nav a:hover { color: #fff; }
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.3rem; height: 1.3rem; padding: 0 0.3rem; border-radius: 999px;
  background: var(--color-danger); color: #fff; font-size: 0.7rem; font-weight: 700;
}

.message-list { display: flex; flex-direction: column; gap: 0.85rem; }
.message-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.message-card-unread { border-left: 3px solid var(--color-primary); }
.message-card-header {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 0.5rem;
}
.message-subject { font-weight: 600; margin: 0.3rem 0; }
.message-body { color: var(--color-text-muted); white-space: pre-wrap; margin: 0.3rem 0 0.75rem; }

.contact-form { max-width: 560px; }
.password-form { max-width: 420px; }
.inline-form { display: inline; }
.link-btn {
  background: none; border: none; color: var(--color-primary);
  cursor: pointer; font: inherit; padding: 0; text-decoration: underline;
}
.link-btn-danger { color: var(--color-danger); }
.admin-nav .link-btn { color: #d1d5db; text-decoration: none; }
.admin-nav .link-btn:hover { color: #fff; }

.admin-main { max-width: 1000px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }
.admin-main-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.75rem; margin: 1.25rem 0; }
.stat-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 1rem; text-align: center;
}
.stat-num { display: block; font-size: 1.6rem; font-weight: 700; }
.stat-label { font-size: 0.8rem; color: var(--color-text-muted); }

.quick-actions { display: flex; gap: 0.75rem; margin: 1.25rem 0 2rem; flex-wrap: wrap; }

.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
.admin-table th, .admin-table td {
  text-align: left; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--color-border); font-size: 0.9rem;
}
.admin-table th { background: var(--color-surface); }
.row-actions { display: flex; gap: 0.75rem; }
.table-total { color: var(--color-text-muted); font-size: 0.85rem; margin-top: 0.75rem; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.75rem; }
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.2rem; height: 2.2rem; padding: 0 0.6rem;
  border: 1px solid var(--color-border); border-radius: var(--radius);
  background: #fff; color: var(--color-text); font-size: 0.85rem; font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.page-btn:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }
.page-btn-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.page-btn-active:hover { color: #fff; }
.page-btn-disabled { color: var(--color-text-muted); background: var(--color-surface); cursor: default; }
.page-btn-disabled:hover { border-color: var(--color-border); color: var(--color-text-muted); }
.page-ellipsis { color: var(--color-text-muted); padding: 0 0.2rem; }

.status { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.status-draft { background: #fef3c7; color: #92400e; }
.status-published { background: #dcfce7; color: #166534; }

.filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.filter-bar input, .filter-bar select {
  padding: 0.5rem 0.7rem; border: 1px solid var(--color-border); border-radius: var(--radius);
  flex: 1 1 140px;
}

.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--color-surface); }
.login-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 2rem; width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 1rem;
}
.login-card label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; }
.login-card input { padding: 0.6rem 0.7rem; border: 1px solid var(--color-border); border-radius: var(--radius); }
.form-error { color: var(--color-danger); font-size: 0.9rem; }

.article-form, .ai-generate-form { display: flex; flex-direction: column; gap: 1.1rem; background: #fff; padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--color-border); }
.article-form label, .ai-generate-form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; font-weight: 600; }
.article-form input[type="text"], .article-form input[type="email"], .article-form input[type="number"],
.article-form select, .article-form textarea,
.ai-generate-form input, .ai-generate-form select {
  padding: 0.6rem 0.7rem; border: 1px solid var(--color-border); border-radius: var(--radius); font: inherit; font-weight: normal;
}
.form-row { display: flex; gap: 1rem; }
.form-row label { flex: 1; }
fieldset { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem; }
legend { font-weight: 700; padding: 0 0.4rem; }
.content-fields { display: flex; flex-direction: column; gap: 0.9rem; }

.repeat-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 0.5rem; margin-bottom: 0.5rem; align-items: start; }
.repeat-row input, .repeat-row textarea {
  padding: 0.5rem 0.6rem; border: 1px solid var(--color-border); border-radius: var(--radius); font: inherit;
}
.remove-row-btn {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  cursor: pointer; font-size: 1.1rem; padding: 0.3rem 0.6rem;
}
.add-row-btn {
  align-self: flex-start; background: none; border: 1px dashed var(--color-border); border-radius: var(--radius);
  padding: 0.4rem 0.8rem; cursor: pointer; color: var(--color-primary); font-weight: 600;
}
.related-select { padding: 0.5rem; }
.current-image-preview { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.6rem; }
.current-image-preview img { max-width: 160px; max-height: 100px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--color-border); }
.field-hint { font-size: 0.8rem; color: var(--color-text-muted); margin: 0.2rem 0 0; }

.form-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.warning-box, .warning-note, .preview-notice {
  border-radius: var(--radius); padding: 1rem; margin-bottom: 1.25rem; font-size: 0.9rem;
}
.warning-box, .warning-note { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; }
.preview-notice { background: #dbeafe; border: 1px solid #93c5fd; color: #1e3a8a; }

.richtext-merge-box { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }
.richtext-editor-wrap { width: 100%; display: flex; flex-direction: column; gap: 0.5rem; }
.richtext-toolbar { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.richtext-toolbar button {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 0.35rem 0.6rem; cursor: pointer; font: inherit; font-size: 0.85rem; min-width: 2.1rem;
}
.richtext-toolbar button:hover { border-color: var(--color-primary); color: var(--color-primary); }
.richtext-editor {
  min-height: 260px; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 0.9rem 1rem; background: #fff; overflow-y: auto;
}
.richtext-editor:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.richtext-editor h2 { font-size: 1.15rem; margin: 0.8rem 0 0.4rem; }
.richtext-editor h3 { font-size: 1rem; margin: 0.7rem 0 0.3rem; }
.richtext-editor p { margin: 0 0 0.6rem; }
.richtext-editor ul, .richtext-editor ol { padding-left: 1.25rem; margin: 0 0 0.6rem; }

.inline-settings-form { display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap; margin-top: 0.75rem; }
.inline-settings-form label { display: flex; flex-direction: column; font-size: 0.85rem; gap: 0.3rem; }
.category-manage-list { list-style: none; padding: 0; margin: 0 0 0.5rem; }
.category-manage-list li { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--color-border); }
.suggested-topics { margin: 0; padding-left: 1.25rem; color: var(--color-text-muted); }

/* ---- Mobile ---- */
@media (max-width: 640px) {
  .container { padding: 0 1rem; }
  .section { padding: 1.75rem 0.5rem; }

  .hero { padding: 2.75rem 0 2.25rem; }
  .hero-eyebrow { font-size: 0.72rem; padding: 0.3rem 0.75rem; }
  .hero-sub { margin-bottom: 1.5rem; font-size: 0.95rem; }
  .hero-buttons { gap: 0.6rem; }
  .hero-buttons .btn { flex: 1 1 auto; justify-content: center; }
  .hero-stats { gap: 1.1rem; margin-top: 1.75rem; }
  .hero-stats strong { font-size: 1.1rem; }

  .search-box-lg input { padding: 0.85rem 1.1rem; font-size: 1rem; }
  .search-box-lg button { padding: 0.85rem 1.1rem; }

  .card-grid { grid-template-columns: 1fr; }

  .article-page { padding: 1.25rem 1rem 2.5rem; }
  .short-answer { padding: 1rem 1rem 1rem 1.2rem; font-size: 1rem; }
  .steps li { padding-left: 2.3rem; }
  .steps li::before { width: 1.7rem; height: 1.7rem; font-size: 0.8rem; }

  .footer-inner { padding: 2rem 1rem; }
  .footer-main { flex-direction: column; text-align: center; }
  .footer-links, .footer-legal { justify-content: center; }

  /* Admin */
  .admin-main { padding: 1.25rem 1rem 2.5rem; }
  .admin-main-header { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .admin-main-header .btn { text-align: center; justify-content: center; }
  .admin-header-inner { justify-content: center; text-align: center; }
  .admin-nav { justify-content: center; }

  .admin-table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }

  .form-row { flex-direction: column; gap: 0.75rem; }
  .repeat-row { grid-template-columns: 1fr; }
  .remove-row-btn { justify-self: end; }

  .article-form, .ai-generate-form { padding: 1.1rem; }
  .login-card { padding: 1.5rem; max-width: 100%; }
}
