@font-face {
  font-family: "DocDisplay";
  src: url("../fonts/Cairo-Regular.ttf") format("truetype");
  font-weight: 400;
}
@font-face {
  font-family: "DocDisplay";
  src: url("../fonts/Cairo-Bold.ttf") format("truetype");
  font-weight: 700;
}
@font-face {
  font-family: "DocArabic";
  src: url("../fonts/NotoSansArabic-Regular.ttf") format("truetype");
  font-weight: 400;
}
@font-face {
  font-family: "DocArabic";
  src: url("../fonts/NotoSansArabic-Bold.ttf") format("truetype");
  font-weight: 700;
}

:root {
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e7e0d6;
  --paper: #f3eee6;
  --brand: #1e3a5f;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "DocArabic", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
a { color: var(--brand); }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header, .site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
}
.brand-link {
  font-family: "DocDisplay", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
}
.plan-pill, .usage {
  color: var(--muted);
  font-size: 0.92rem;
}
.hero h1, .editor-head h1, .group h2, .card h2 {
  font-family: "DocDisplay", sans-serif;
  line-height: 1.35;
  margin: 0 0 8px;
}
.hero { padding: 12px 0 28px; }
.lede { max-width: 42rem; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.card, .panel, .message {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.card p, .note { color: var(--muted); }
.tag {
  display: inline-block;
  font-size: 0.78rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 8px;
}
.layout { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 18px; align-items: start; padding-bottom: 40px; }
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 0.95rem; }
input, textarea {
  width: 100%;
  border: 1px solid #d6d3d1;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: white;
}
textarea { min-height: 120px; resize: vertical; }
.color-row { display: flex; gap: 8px; align-items: center; }
input[type="color"] { width: 48px; height: 42px; padding: 4px; }
.check { grid-template-columns: auto 1fr; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
button, .button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
  background: var(--brand);
  color: white;
  text-decoration: none;
}
.secondary { background: white; color: var(--ink); border: 1px solid #d6d3d1; }
.row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 8px;
}
.alert, .banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 10px 12px;
}
.alert { color: #9a3412; }
.preview-frame {
  width: 100%;
  height: 78vh;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #efeae2;
}
.site-footer { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 860px) {
  .layout, .site-header, .site-footer { display: block; }
  .row, .education-row { grid-template-columns: 1fr; }
  .preview-frame { height: 70vh; min-height: 420px; }
}
