/* ===========================================================
   MX AI ACADEMY STUDENT GUIDE CENTER
   style.css — clean, modern, minimal. No animations.
   =========================================================== */

:root {
  --accent:        #ff6a00;   /* orange */
  --accent-dark:   #e85d00;
  --accent-soft:   #fff5ee;
  --bg:            #ffffff;
  --text:          #111111;
  --text-soft:     #666666;
  --border:        #ececec;
  --code-bg:       #111111;   /* black code background */
  --code-text:     #f5f5f5;   /* light code text */
  --code-border:   #2a2a2a;
  --radius:        14px;
  --maxw:          1180px;
  --font:          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                   Helvetica, Arial, sans-serif;
  --font-fa:       "Vazirmatn", Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

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

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid #222;
  padding: 16px 50px;
  background: #111;
  color: #fff;
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-logo {
  flex-shrink: 0;
  display: block;
  line-height: 0;
}
.header-logo img {
  height: 44px;
  width: auto;
  display: block;
}

.header-titles {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.site-header h1 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.4px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.title-fa {
  margin: 4px 0 0;
  font-family: var(--font-fa);
  font-size: 0.95rem;
  font-weight: 600;
  color: #ccc;
  direction: rtl;
}

.header-btn {
  flex-shrink: 0;
  display: inline-block;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-fa);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 10px;
  white-space: nowrap;
}
.header-btn:hover {
  background: var(--accent-dark);
}

/* ---------- Layout wrapper ---------- */
.wrap {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 50px;
}

/* ---------- Tabs (radio hack) — RIGHT-SIDE SIDEBAR ---------- */
.tabs {
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: 1fr 240px;   /* content | sidebar */
  gap: 32px;
  align-items: start;
}

/* hide the radio inputs */
.tabs > input[type="radio"] { display: none; }

/* sidebar nav on the right */
.tab-labels {
  order: 2;                  /* push to the right column */
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 20px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
}

/* content area on the left */
.panels { order: 1; min-width: 0; }

.tab-labels label {
  cursor: pointer;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-soft);
  background: transparent;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-direction: row;
  direction: rtl;                /* icon pinned to far right for all labels */
}
/* text fills the row and stays right-aligned next to the icon */
.tab-labels label span {
  flex: 1;
  text-align: right;
}

/* premium nav icons */
.nav-ic {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.85;
}
.tab-labels label span { line-height: 1.2; }

/* active tab — icon turns white to match filled pill */
#tab1:checked ~ .tab-labels label[for="tab1"] .nav-ic,
#tab2:checked ~ .tab-labels label[for="tab2"] .nav-ic,
#tab3:checked ~ .tab-labels label[for="tab3"] .nav-ic,
#tab4:checked ~ .tab-labels label[for="tab4"] .nav-ic,
#tab5:checked ~ .tab-labels label[for="tab5"] .nav-ic,
#tab6:checked ~ .tab-labels label[for="tab6"] .nav-ic,
#tab7:checked ~ .tab-labels label[for="tab7"] .nav-ic,
#tab8:checked ~ .tab-labels label[for="tab8"] .nav-ic,
#tab9:checked ~ .tab-labels label[for="tab9"] .nav-ic,
#tab10:checked ~ .tab-labels label[for="tab10"] .nav-ic,
#tab11:checked ~ .tab-labels label[for="tab11"] .nav-ic,
#tab12:checked ~ .tab-labels label[for="tab12"] .nav-ic,
#tab13:checked ~ .tab-labels label[for="tab13"] .nav-ic,
#tab14:checked ~ .tab-labels label[for="tab14"] .nav-ic,
#tab15:checked ~ .tab-labels label[for="tab15"] .nav-ic,
#tab16:checked ~ .tab-labels label[for="tab16"] .nav-ic,
#tab17:checked ~ .tab-labels label[for="tab17"] .nav-ic,
#tab18:checked ~ .tab-labels label[for="tab18"] .nav-ic,
#tab19:checked ~ .tab-labels label[for="tab19"] .nav-ic {
  color: #fff;
  opacity: 1;
}
.tab-labels label[for="tab5"],
.tab-labels label[for="tab6"],
.tab-labels label[for="tab7"],
.tab-labels label[for="tab8"],
.tab-labels label[for="tab9"],
.tab-labels label[for="tab10"],
.tab-labels label[for="tab11"],
.tab-labels label[for="tab12"],
.tab-labels label[for="tab13"],
.tab-labels label[for="tab14"],
.tab-labels label[for="tab15"],
.tab-labels label[for="tab16"],
.tab-labels label[for="tab17"],
.tab-labels label[for="tab18"],
.tab-labels label[for="tab19"] {
  font-family: var(--font-fa);
  direction: rtl;
}
.tab-labels label:hover {
  background: #fff;
  color: var(--accent);
}

@media (max-width: 820px) {
  .tabs { grid-template-columns: 1fr; }
  .tab-labels {
    order: 0;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    position: static;
    margin-bottom: 24px;
  }
  .tab-labels label { text-align: center; }
}

/* panels hidden by default */
.panel { display: none; }

/* show panel matching the checked radio */
#tab1:checked ~ .panels #panel1,
#tab2:checked ~ .panels #panel2,
#tab3:checked ~ .panels #panel3,
#tab4:checked ~ .panels #panel4,
#tab5:checked ~ .panels #panel5,
#tab6:checked ~ .panels #panel6,
#tab7:checked ~ .panels #panel7,
#tab8:checked ~ .panels #panel8,
#tab9:checked ~ .panels #panel9,
#tab10:checked ~ .panels #panel10,
#tab11:checked ~ .panels #panel11,
#tab12:checked ~ .panels #panel12,
#tab13:checked ~ .panels #panel13,
#tab14:checked ~ .panels #panel14,
#tab15:checked ~ .panels #panel15,
#tab16:checked ~ .panels #panel16,
#tab17:checked ~ .panels #panel17,
#tab18:checked ~ .panels #panel18,
#tab19:checked ~ .panels #panel19 { display: block; }

/* active label styling */
#tab1:checked ~ .tab-labels label[for="tab1"],
#tab2:checked ~ .tab-labels label[for="tab2"],
#tab3:checked ~ .tab-labels label[for="tab3"],
#tab4:checked ~ .tab-labels label[for="tab4"],
#tab5:checked ~ .tab-labels label[for="tab5"],
#tab6:checked ~ .tab-labels label[for="tab6"],
#tab7:checked ~ .tab-labels label[for="tab7"],
#tab8:checked ~ .tab-labels label[for="tab8"],
#tab9:checked ~ .tab-labels label[for="tab9"],
#tab10:checked ~ .tab-labels label[for="tab10"],
#tab11:checked ~ .tab-labels label[for="tab11"],
#tab12:checked ~ .tab-labels label[for="tab12"],
#tab13:checked ~ .tab-labels label[for="tab13"],
#tab14:checked ~ .tab-labels label[for="tab14"],
#tab15:checked ~ .tab-labels label[for="tab15"],
#tab16:checked ~ .tab-labels label[for="tab16"],
#tab17:checked ~ .tab-labels label[for="tab17"],
#tab18:checked ~ .tab-labels label[for="tab18"],
#tab19:checked ~ .tab-labels label[for="tab19"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 106, 0, 0.25);
}

/* ---------- Guide title ---------- */
.guide-title {
  text-align: center;
  font-size: 1.3rem;
  margin: 0 0 22px;
  font-weight: 700;
  color: var(--accent);
}
.guide-title.fa {
  font-family: var(--font-fa);
}

/* ---------- Responsive video embed ---------- */
.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Two-column layout ---------- */
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: start;
}

.col {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px 28px;
  background: #fff;
}

.col-head {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  margin: 0 0 16px;
}

/* Farsi (RTL) column */
.col.fa {
  direction: rtl;
  text-align: right;
  font-family: var(--font-fa);
}
.col.fa .col-head { direction: ltr; }

/* DNS table inside columns */
.dns-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 16px;
  font-size: 0.85rem;
  direction: ltr;
  text-align: left;
}
.dns-table th,
.dns-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  vertical-align: top;
}
.dns-table th {
  background: var(--accent-soft);
  font-weight: 700;
  color: var(--text);
}
.dns-table code {
  font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--accent-dark);
  word-break: break-all;
}

/* ---------- Typography inside columns ---------- */
.col h3 {
  font-size: 1.05rem;
  margin: 22px 0 8px;
  font-weight: 700;
}
.col h3:first-of-type { margin-top: 4px; }
.col p { margin: 0 0 10px; color: var(--text); }
.col ul, .col ol { margin: 0 0 12px; padding-inline-start: 22px; }
.col li { margin-bottom: 6px; }
.col a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  word-break: break-word;
}
.col a:hover { text-decoration: underline; }

.note {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  margin: 12px 0;
  color: var(--text-soft);
}
.col.fa .note { border-left: none; border-right: 4px solid var(--accent); }

/* ---------- Code blocks ---------- */
.code {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
  margin: 10px 0 16px;
  direction: ltr;       /* commands always LTR */
  text-align: left;
}
.code pre {
  margin: 0;
  padding: 16px 44px 16px 18px;   /* right padding clears the Copy button */
  color: var(--code-text);
  font-family: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.55;
}
/* wrap long commands instead of overflowing — keeps EN/FA columns aligned */
.code pre code {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #334155;
  color: #e2e8f0;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 4px 11px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}
.copy-btn:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- Essential links — RTL layout ---------- */
.links-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 0;
  align-items: stretch;
  min-height: 500px;
  border-radius: 24px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  direction: rtl;
}

/* hero panel — right side in RTL */
.links-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 48px 36px;
  background: #faf8f5;
  overflow: hidden;
  direction: rtl;
  text-align: right;
}

/* the big orange orb */
.links-orb {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #ffb347 0%, #ff6a00 45%, transparent 70%);
  opacity: 0.55;
  bottom: -80px;
  left: -80px;
  right: auto;
  filter: blur(30px);
  pointer-events: none;
}

.links-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #ff6a00;
  position: relative;
}

.links-heading {
  margin: 0;
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  color: #111;
  font-family: var(--font-fa);
  position: relative;
}

.links-sub {
  margin: 0;
  font-size: 0.92rem;
  color: #888;
  font-family: var(--font-fa);
  direction: rtl;
  position: relative;
}

/* cards grid — left side in RTL */
.links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 36px 32px;
  background: #fff;
  align-content: center;
  direction: rtl;
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 16px;
  padding: 18px 16px;
  text-decoration: none;
  background: #f7f7f8;
  border: 1px solid #ebebeb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  direction: rtl;
  text-align: right;
}

.link-card-head {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.link-card:hover {
  background: #fff5ee;
  border-color: #ffc89a;
  box-shadow: 0 4px 16px rgba(255, 106, 0, 0.1);
}

.link-name {
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  direction: ltr;
  text-align: left;
  flex-shrink: 0;
}

.link-desc {
  font-family: var(--font-fa);
  font-size: 0.82rem;
  color: #777;
  direction: rtl;
  text-align: right;
  flex: 1;
}

.link-url {
  direction: ltr;
  text-align: right;
  font-size: 0.74rem;
  font-weight: 600;
  color: #ff6a00;
  word-break: break-all;
  margin-top: 2px;
}

@media (max-width: 820px) {
  .links-layout { grid-template-columns: 1fr; min-height: auto; }
  .links-hero { padding: 32px 24px; }
  .links-heading { font-size: 2rem; }
  .links-grid { grid-template-columns: 1fr; padding: 24px 20px; }
}

/* ---------- SEO guide ---------- */
.seo-intro {
  background: var(--accent-soft);
  border: 1px solid #c7d9ff;
  border-radius: var(--radius);
  padding: 20px 26px 16px;
  margin-bottom: 26px;
  direction: rtl;
  text-align: right;
  font-family: var(--font-fa);
}
.seo-intro h3 { margin: 0 0 8px; font-size: 1rem; color: var(--accent); }
.seo-intro p  { margin: 0 0 10px; }
.seo-intro ul { margin: 0; padding-inline-start: 20px; }
.seo-intro li { margin-bottom: 4px; }

.seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

/* prompt & SEO cards: one per row, right to left */
#panel6 .seo-grid,
#panel8 .seo-grid {
  direction: rtl;
  grid-template-columns: 1fr;
}

.seo-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px 18px;
  background: #fff;
  direction: rtl;
  text-align: right;
  font-family: var(--font-fa);
  position: relative;
}
.seo-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  padding-right: 34px;   /* room for the number badge */
}
.seo-card p  { margin: 0 0 8px; font-size: 0.93rem; }
.seo-card ul { margin: 0 0 10px; padding-inline-start: 20px; }
.seo-card li { margin-bottom: 5px; font-size: 0.92rem; }

.seo-num {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-fa);
}

.seo-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 10px 0 4px;
  display: block;
  font-family: var(--font);
}
.seo-label.good { color: #16a34a; }
.seo-label.bad  { color: #dc2626; }

/* checklist */
.seo-checklist {
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 26px 20px;
  background: var(--accent-soft);
  direction: rtl;
  text-align: right;
  font-family: var(--font-fa);
  margin-bottom: 26px;
}
.seo-checklist h3 { margin: 0 0 10px; font-size: 1.05rem; color: var(--accent); }
.seo-checklist p  { margin: 0 0 12px; font-size: 0.93rem; }

ul.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
ul.checklist li {
  font-size: 0.92rem;
  margin: 0;
}

.check-box {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  border: 1px solid #f0d4c0;
  border-radius: 10px;
  padding: 10px 14px;
  background: #fff;
}
.check-box:hover {
  border-color: var(--accent);
  background: #fffaf6;
}

.check-box input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.check-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-fa);
}

.check-label {
  flex: 1;
  line-height: 1.4;
}

.check-tick {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: transparent;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.check-box input[type="checkbox"]:checked ~ .check-tick {
  border-color: #16a34a;
  background: #dcfce7;
  color: #16a34a;
}

.check-box input[type="checkbox"]:checked ~ .check-label {
  color: var(--text-soft);
}

@media (max-width: 700px) {
  .seo-grid { grid-template-columns: 1fr; }
}

/* ---------- Essential prompts ---------- */
.essential-intro {
  text-align: center;
  color: var(--text-soft);
  font-family: var(--font-fa);
  direction: rtl;
  margin: -8px 0 24px;
  font-size: 0.95rem;
}

.essential-prompts {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.essential-prompt {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px 18px;
  background: #fff;
  border-top: 4px solid var(--accent);
  direction: rtl;
  text-align: right;
  font-family: var(--font-fa);
}

.essential-prompt h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
}

.essential-prompt .code {
  margin-bottom: 0;
}

/* ---------- Challenge 1 ---------- */
.challenge-lead {
  text-align: center;
  font-family: var(--font-fa);
  direction: rtl;
  color: var(--text-soft);
  margin: -10px 0 24px;
  font-size: 0.95rem;
}

.challenge-columns {
  direction: rtl;
  align-items: start;
}

.challenge-col.en {
  direction: ltr;
  text-align: left;
}
.challenge-col.en .challenge-hero {
  direction: ltr;
  text-align: left;
}
.challenge-col.en .note {
  border-left: 4px solid var(--accent);
  border-right: none;
}
.challenge-col.fa .challenge-step {
  flex-direction: row;
  direction: rtl;
  text-align: right;
}
.challenge-col.fa .challenge-step > div {
  flex: 1;
}
.challenge-col.en .challenge-step {
  flex-direction: row;
  direction: ltr;
  text-align: left;
}

.challenge-col {
  border-top: 4px solid #0B1F33;
}

.challenge-col.fa {
  border-top-color: var(--accent);
}

.challenge-hero {
  background: linear-gradient(135deg, #0B1F33 0%, #1a3a5c 100%);
  color: #fff;
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 20px;
}
.challenge-hero.fa { direction: rtl; text-align: right; }
.challenge-hero h3 {
  margin: 10px 0 0;
  font-size: 1.15rem;
  line-height: 1.4;
  color: #fff;
}

.challenge-badge {
  display: inline-block;
  background: #7DE2C3;
  color: #0B1F33;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}

.challenge-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 22px 0;
}

.challenge-col h4 {
  margin: 14px 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.challenge-info {
  background: #F7FBFF;
  border: 1px solid #E5EAF0;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 0 12px;
}
.challenge-info li { margin-bottom: 8px; }

.challenge-tags {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.7;
}

.palette-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 14px;
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
}
.palette-swatch {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}
.palette-item code {
  display: block;
  font-size: 0.75rem;
  color: var(--text-soft);
  margin-top: 2px;
}

.challenge-steps-title {
  margin-top: 8px;
  color: #0B1F33 !important;
}
.challenge-col.fa .challenge-steps-title {
  direction: rtl;
  text-align: right;
}

.challenge-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}
.challenge-step:last-of-type { border-bottom: none; }

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-fa);
}
.step-num.en-num { font-family: var(--font); background: #0B1F33; }

.challenge-step h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
}
.challenge-step p { margin: 0; font-size: 0.9rem; }
.challenge-step .code { margin-top: 10px; }

.challenge-col code {
  background: #f3f4f6;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.85em;
}

@media (max-width: 700px) {
  .palette-grid { grid-template-columns: 1fr; }
}

/* ---------- GitHub glossary ---------- */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.glossary-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px 18px;
  background: #fff;
  border-top: 4px solid var(--accent);
}

.glossary-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
  line-height: 1;
}

.glossary-term {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font);
  direction: ltr;
}

.glossary-def {
  margin: 0 0 10px;
  font-size: 0.93rem;
  color: var(--text);
}

.glossary-def.fa,
.note.fa {
  font-family: var(--font-fa);
  direction: rtl;
  text-align: right;
}

@media (max-width: 700px) {
  .glossary-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 50px;
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.88rem;
}

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .wrap { padding: 0 20px; }
  .columns { grid-template-columns: 1fr; }
  .site-header { padding: 14px 20px; }
  .header-inner { flex-wrap: wrap; gap: 14px; }
  .header-titles { order: 3; flex-basis: 100%; }
  .site-header h1 { font-size: 0.95rem; }
  .title-fa { font-size: 0.85rem; }
  .header-logo img { height: 36px; }
  .header-btn { padding: 8px 16px; font-size: 0.85rem; }
  .tab-labels label { padding: 8px 14px; font-size: 0.85rem; }
}
