/* ==========================================================================
   آیدان — سیستم طراحی صفحات محتوایی (وبلاگ، درس‌ها، درباره ما)
   مستقل از اپ تک‌صفحه‌ای؛ سبک، خوانا و سریع (بدون CDN و بدون فریم‌ورک).
   ========================================================================== */

@import url('/static/fonts.css');

:root {
  --bg: #F8F6FF;
  --surface: #FFFFFF;
  --surface-2: #FBFAFF;
  --ink: #1E1933;
  --ink-2: #443C60;
  --muted: #6F6789;
  --line: #E9E4F7;
  --line-2: #F1EDFB;
  --grape: #7C5CE0;
  --grape-d: #5B3EC0;
  --grape-l: #EFEAFF;
  --grape-xl: #F6F3FF;
  --mint: #1FA98C;
  --mint-l: #E4F7F1;
  --rose: #DE5C81;
  --rose-l: #FDECF1;
  --amber: #C98A16;
  --amber-l: #FEF4E0;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow-1: 0 1px 2px rgba(38, 26, 80, .04), 0 8px 24px -18px rgba(38, 26, 80, .35);
  --shadow-2: 0 2px 4px rgba(38, 26, 80, .05), 0 22px 44px -26px rgba(60, 40, 130, .55);
  --wrap: 1080px;
  --measure: 68ch;
  --font: 'Vazirmatn', Tahoma, system-ui, sans-serif;
  --head: 'Lalezar', 'Vazirmatn', Tahoma, sans-serif;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

:root[data-theme="dark"] {
  --bg: #14101F;
  --surface: #1C1730;
  --surface-2: #221C39;
  --ink: #F2EFFA;
  --ink-2: #CFC7E4;
  --muted: #A79FC2;
  --line: #2E2748;
  --line-2: #262041;
  --grape: #A98CFF;
  --grape-d: #C4B0FF;
  --grape-l: #2A2148;
  --grape-xl: #221A38;
  --mint: #5FD8BC;
  --mint-l: #17362F;
  --rose: #FF8CA9;
  --rose-l: #3A1F2A;
  --amber: #F0BE62;
  --amber-l: #3A2D15;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -20px rgba(0, 0, 0, .8);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .35), 0 26px 48px -28px rgba(0, 0, 0, .9);
}

/* --------------------------------------------------------------- پایه */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.95;
  font-feature-settings: "ss02";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--grape-l); color: var(--grape-d); }

img, svg { max-width: 100%; }

a { color: var(--grape-d); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--grape); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* --------------------------------------------------------------- هدر */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.head-in { display: flex; align-items: center; gap: 16px; height: 66px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.25; }
.brand-txt b { font-family: var(--head); font-size: 22px; font-weight: 400; color: var(--grape-d); letter-spacing: .2px; }
.brand-txt i { font-style: normal; font-size: 11px; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 8px 12px; border-radius: 12px; color: var(--ink-2);
  font-size: .92rem; font-weight: 600; white-space: nowrap;
}
.nav a:hover { background: var(--grape-l); color: var(--grape-d); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--grape-d); background: var(--grape-l); }

/* --------------------------------------------------------------- دکمه‌ها */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  font-family: inherit; font-size: .95rem; font-weight: 800; line-height: 1.4;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--grape), var(--grape-d)); color: #fff; box-shadow: 0 12px 26px -14px rgba(91, 62, 192, .9); }
.btn-primary:hover { box-shadow: 0 16px 30px -14px rgba(91, 62, 192, .95); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); box-shadow: var(--shadow-1); }
.btn-ghost:hover { border-color: var(--grape); color: var(--grape-d); }
.head-cta { padding: 9px 18px; font-size: .9rem; }

/* --------------------------------------------------------------- نوار پیشرفت */
.read-bar { position: fixed; inset-block-start: 0; inset-inline-start: 0; height: 3px; width: 0; z-index: 60;
  background: linear-gradient(90deg, var(--grape), var(--mint)); transition: width .1s linear; }

/* --------------------------------------------------------------- مسیر راهنما */
.crumb { padding: 18px 0 0; font-size: .8rem; color: var(--muted); }
.crumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.crumb li + li::before { content: '›'; margin-inline-end: 6px; color: var(--line); }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--grape-d); }
.crumb [aria-current="page"] { color: var(--ink-2); font-weight: 600; }

/* --------------------------------------------------------------- هیرو */
.page-hero { padding: 34px 0 8px; }
.page-hero.is-center { text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--grape-l); color: var(--grape-d);
  font-size: .76rem; font-weight: 800; letter-spacing: .2px;
}
.page-hero h1, .post-head h1 {
  font-family: var(--head); font-weight: 400; line-height: 1.35;
  font-size: clamp(1.75rem, 4.2vw, 2.65rem);
  margin: 14px 0 10px; color: var(--ink); letter-spacing: .2px;
}
.lede { font-size: 1.04rem; color: var(--ink-2); margin: 0; max-width: var(--measure); }
.page-hero.is-center .lede { margin-inline: auto; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.page-hero.is-center .hero-actions { justify-content: center; }

/* --------------------------------------------------------------- چیپ‌ها */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 999px; font-size: .76rem; font-weight: 700;
  background: var(--grape-xl); color: var(--grape-d); border: 1px solid transparent;
}
.chip-mint { background: var(--mint-l); color: var(--mint); }
.chip-rose { background: var(--rose-l); color: var(--rose); }
.chip-amber { background: var(--amber-l); color: var(--amber); }
.chip-line { background: transparent; border-color: var(--line); color: var(--muted); }
.chip-btn { cursor: pointer; font-family: inherit; }
.chip-btn:hover { border-color: var(--grape); }
.chip-btn[aria-pressed="true"] { background: var(--grape); color: #fff; }

/* --------------------------------------------------------------- کارت‌ها */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin: 26px 0 10px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px; box-shadow: var(--shadow-1);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--grape) 30%, var(--line)); }
.card h2, .card h3 { margin: 10px 0 6px; font-size: 1.06rem; font-weight: 800; line-height: 1.6; }
.card h2 a, .card h3 a { color: var(--ink); }
.card h2 a::after, .card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); }
.card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.85; }
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); font-size: .78rem; color: var(--muted); }
.card-foot .more { margin-inline-start: auto; color: var(--grape-d); font-weight: 800; }
.card:hover .card-foot .more .arw { transform: translateX(-3px); }
.card-foot .arw { display: inline-block; transition: transform .2s var(--ease); }

/* کارت ویژه (مقاله شاخص) */
.card-feature {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1.35fr .65fr; gap: 26px; align-items: center;
  padding: 28px 30px; background:
    radial-gradient(120% 140% at 100% 0%, var(--grape-l) 0%, transparent 55%),
    var(--surface);
}
.card-feature h2 { font-family: var(--head); font-weight: 400; font-size: clamp(1.35rem, 2.6vw, 1.8rem); margin-top: 12px; }
.card-feature p { font-size: .96rem; }
.card-feature .feat-art {
  display: grid; place-items: center; height: 100%; min-height: 150px;
  border-radius: 18px; background: linear-gradient(140deg, var(--grape-l), var(--mint-l));
  font-size: 3.2rem; box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
/* عکس شاخص مقاله */
.card-feature .feat-art img { display: block; width: 100%; height: 100%; min-height: 180px; object-fit: cover; border-radius: 18px; }
.card-thumb { margin: -20px -20px 14px; overflow: hidden; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.card-thumb img { display: block; width: 100%; height: 132px; object-fit: cover; }
.post-cover {
  margin: 22px 0 0; overflow: hidden; border-radius: 18px;
  border: 1px solid var(--line); box-shadow: var(--shadow-1); background: var(--surface-2);
}
.post-cover img { display: block; width: 100%; height: auto; }

/* --------------------------------------------------------------- فیلتر و جست‌وجو */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px; }
.search {
  position: relative; flex: 1 1 260px; max-width: 360px;
}
.search input {
  width: 100%; font-family: inherit; font-size: .92rem; color: var(--ink);
  padding: 11px 42px 11px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-1); outline: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.search input:focus { border-color: var(--grape); box-shadow: 0 0 0 4px var(--grape-l); }
.search::before {
  content: '⌕'; position: absolute; inset-inline-end: 15px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 1.15rem; pointer-events: none;
}
.result-count { font-size: .8rem; color: var(--muted); margin-inline-start: auto; }
.tagbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.tagbar-label { font-size: .78rem; color: var(--muted); font-weight: 700; margin-inline-end: 2px; }

/* --------------------------------------------------------------- هیروی درس */
.subject-hero {
  margin-top: 22px; padding: 30px;
  background:
    radial-gradient(90% 120% at 0% 0%, var(--grape-l) 0%, transparent 60%),
    var(--surface);
  border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-1);
}
.subject-hero h1 { margin-top: 12px; }
.subject-hero .lede { max-width: 62ch; }

/* --------------------------------------------------------------- بخش‌ها */
.block { margin: 44px 0; }
.block > h2 {
  font-family: var(--head); font-weight: 400; font-size: 1.5rem; color: var(--ink);
  margin: 0 0 4px; display: flex; align-items: center; gap: 10px;
}
.block > h2 .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grape); flex: none; }
.block > .sub { color: var(--muted); font-size: .9rem; margin: 0 0 16px; }

.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.qcard {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 15px 16px;
  font-size: .93rem; color: var(--ink-2); line-height: 1.8;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.qcard:hover { border-color: var(--grape); transform: translateY(-2px); }
.qcard .qi {
  flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grape-l); color: var(--grape-d); font-weight: 900; font-size: .95rem;
}

/* ویژگی‌ها */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.fcard { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.fcard .fi {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.15rem; margin-bottom: 10px; background: var(--grape-l);
}
.fcard b { display: block; font-size: .95rem; margin-bottom: 4px; }
.fcard p { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.8; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 4px 18px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.faq details[open] { border-color: color-mix(in srgb, var(--grape) 35%, var(--line)); box-shadow: var(--shadow-1); }
.faq summary {
  list-style: none; cursor: pointer; padding: 14px 0;
  display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .95rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; margin-inline-start: auto; color: var(--grape-d);
  font-size: 1.25rem; font-weight: 400; transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 0 16px; margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.9; }

/* شبکه پیوندهای پایه/درس */
.pill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
.pill {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 15px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink-2); font-size: .88rem; font-weight: 600;
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.pill:hover { border-color: var(--grape); background: var(--grape-xl); color: var(--grape-d); text-decoration: none; transform: translateY(-1px); }
.pill span { color: var(--muted); font-size: .78rem; }

/* --------------------------------------------------------------- مقاله */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; margin-top: 8px; }
.post { min-width: 0; }
.post-head { padding-top: 10px; }
.post-head .lede { font-size: 1.06rem; color: var(--ink-2); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; font-size: .8rem; color: var(--muted); }
.meta .who { display: inline-flex; align-items: center; gap: 7px; }
.meta .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--grape-l); display: grid; place-items: center; font-size: .8rem; }

.post-body { margin-top: 26px; font-size: 1.04rem; line-height: 2.05; color: var(--ink-2); max-width: var(--measure); }
.post-body > :first-child { margin-top: 0; }
.post-body p { margin: 1.05em 0; }
.post-body h2 {
  position: relative; font-family: var(--head); font-weight: 400;
  font-size: clamp(1.28rem, 2.4vw, 1.5rem); color: var(--ink);
  margin: 2em 0 .55em; padding-inline-start: 16px;
}
.post-body h2::before {
  content: ''; position: absolute; inset-inline-start: 0; inset-block: .18em;
  width: 4px; border-radius: 4px; background: linear-gradient(180deg, var(--grape), var(--mint));
}
.post-body h3 { font-size: 1.08rem; font-weight: 800; color: var(--ink); margin: 1.7em 0 .4em; }
.post-body ul, .post-body ol { margin: .8em 0; padding-inline-start: 1.5em; }
.post-body li { margin: .35em 0; }
.post-body li::marker { color: var(--grape); }
.post-body a { color: var(--grape-d); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--grape) 35%, transparent); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.post-body a:hover { text-decoration-color: var(--grape); }
.post-body strong, .post-body b { color: var(--ink); font-weight: 800; }
.post-body blockquote {
  margin: 1.5em 0; padding: 16px 20px; border-radius: 16px;
  background: var(--grape-xl); border-inline-start: 4px solid var(--grape);
  color: var(--grape-d); font-size: 1rem; font-weight: 600;
}
.post-body blockquote p { margin: 0; }
.post-body hr { border: 0; border-top: 1px dashed var(--line); margin: 2em 0; }
.post-body code {
  background: var(--grape-xl); color: var(--grape-d); padding: .12em .42em;
  border-radius: 6px; font-size: .9em; font-family: ui-monospace, Consolas, monospace;
}
.post-body pre { overflow: auto; padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.table-wrap { overflow-x: auto; margin: 1.5em 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.post-body table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.post-body thead th { background: var(--grape-xl); color: var(--grape-d); font-weight: 800; text-align: start; }
.post-body th, .post-body td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.post-body tbody tr:last-child td { border-bottom: 0; }
.post-body tbody tr:nth-child(even) { background: color-mix(in srgb, var(--grape-xl) 45%, transparent); }

/* فهرست مطالب */
.toc { display: none; }
.toc-inner { position: sticky; top: 90px; }
.toc b { display: block; font-size: .78rem; letter-spacing: .4px; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--line); }
.toc a {
  display: block; padding: 6px 14px; font-size: .86rem; color: var(--muted);
  border-inline-start: 2px solid transparent; margin-inline-start: -2px; line-height: 1.7;
}
.toc a:hover { color: var(--grape-d); text-decoration: none; }
.toc a.is-active { color: var(--grape-d); font-weight: 700; border-inline-start-color: var(--grape); }

/* اشتراک */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.share span { font-size: .82rem; color: var(--muted); margin-inline-end: 4px; }
.share a, .share button {
  font-family: inherit; font-size: .8rem; font-weight: 700; cursor: pointer;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2);
}
.share a:hover, .share button:hover { border-color: var(--grape); color: var(--grape-d); text-decoration: none; }

/* جعبه فراخوان */
.cta-box {
  position: relative; overflow: hidden; margin: 40px 0 0;
  padding: 28px 30px; border-radius: 26px; color: #fff;
  background: linear-gradient(135deg, #7C5CE0 0%, #5B3EC0 55%, #4A32A8 100%);
  box-shadow: 0 24px 50px -28px rgba(74, 50, 168, .9);
}
.cta-box::after {
  content: ''; position: absolute; inset-block-start: -60px; inset-inline-start: -40px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 70%);
}
.cta-box h2 { font-family: var(--head); font-weight: 400; font-size: 1.45rem; margin: 0 0 6px; }
.cta-box p { margin: 0 0 18px; color: rgba(255, 255, 255, .85); font-size: .92rem; max-width: 48ch; }
.cta-box .btn { background: #fff; color: var(--grape-d); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .6); }
.cta-box .btn:hover { background: #F6F2FF; }

/* --------------------------------------------------------------- فوتر */
.site-foot { margin-top: 64px; background: var(--surface); border-top: 1px solid var(--line); }
.foot-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 30px;
  padding-top: 40px; padding-bottom: 26px;
}
.foot-brand { display: flex; flex-direction: column; gap: 10px; }
.foot-brand .brand img { width: 34px; height: 34px; }
.foot-brand p { margin: 0; font-size: .84rem; color: var(--muted); line-height: 1.9; max-width: 34ch; }
.foot-col b { display: block; font-size: .82rem; color: var(--ink); margin-bottom: 12px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.foot-col a, .foot-col li { font-size: .84rem; color: var(--muted); }
.foot-col a:hover { color: var(--grape-d); text-decoration: none; }
.foot-bottom {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding-top: 16px; padding-bottom: 24px; border-top: 1px solid var(--line-2);
  font-size: .78rem; color: var(--muted);
}
.foot-bottom .sep { color: var(--line); }
.foot-bottom .to-top { margin-inline-start: auto; color: var(--grape-d); font-weight: 700; }

/* --------------------------------------------------------------- خطا */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty b { display: block; font-size: 2rem; margin-bottom: 8px; }

/* --------------------------------------------------------------- واکنش‌گرا */
@media (max-width: 900px) {
  .subject-hero { grid-template-columns: 1fr; padding: 24px; }
  .card-feature { grid-template-columns: 1fr; }
  /* عکس شاخص مقاله ویژه در موبایل بالای متن می‌آید (نه پنهان می‌شود) */
  .card-feature .feat-art { order: -1; display: block; height: auto; min-height: 0; }
  .card-feature .feat-art img { height: auto; min-height: 0; width: 100%; border-radius: 14px; aspect-ratio: 3 / 2; object-fit: cover; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (min-width: 1040px) {
  .post-layout { grid-template-columns: minmax(0, 1fr) 230px; }
  .toc { display: block; }
  .post-body { max-width: none; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; line-height: 1.9; }
  .head-in { height: 60px; gap: 8px; }
  .brand-txt i { display: none; }
  .nav a { padding: 7px 9px; font-size: .86rem; }
  .head-cta { display: none; }
  .wrap { padding: 0 16px; }
  .page-hero { padding-top: 24px; }
  .card { padding: 17px; }
  .cards { grid-template-columns: 1fr; }
  .toolbar { gap: 8px; }
  .search { max-width: none; }
  .result-count { display: none; }
  .cta-box { padding: 22px; }
  .foot-grid { grid-template-columns: 1fr; }
  .post-body { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-head, .site-foot, .toc, .share, .cta-box, .read-bar { display: none !important; }
  body { background: #fff; }
  .post-body { max-width: none; }
}
