/* ==========================================================================
   منصة كتابة الضبط — site styles (prefix gr-). RTL-first, logical properties.
   No inline styles anywhere (the CSP forbids them): every look lives here.
   ========================================================================== */

:root {
  --g-950: #062b26;
  --g-900: #083a33;
  --g-800: #0b4f46;
  --g-700: #0f5c52;
  --g-600: #127265;
  --g-500: #1a8a79;
  --mint: #2dd4bf;
  --mint-600: #14b8a6;
  --mint-50: #e6faf6;
  --gold: #c9a45c;
  --gold-600: #a9853f;
  --gold-50: #faf4e8;
  --navy: #0f172a;
  --navy-800: #16213a;
  --danger: #c2410c;
  --danger-50: #fff3ec;
  --warn: #b45309;
  --warn-50: #fff8e6;
  --info: #0e7490;
  --info-50: #e9f8fb;

  --bg: #f5f7f6;
  --surface: #ffffff;
  --surface-2: #f0f4f2;
  --surface-3: #e8eeeb;
  --text: #12201d;
  --text-2: #34443f;
  --muted: #5f706b;
  --border: #e1e8e5;
  --border-strong: #cfd9d5;
  --ring: rgba(45, 212, 191, .38);
  --link: #127265;
  --stripe: rgba(15, 92, 82, .045);

  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(10, 30, 26, .05);
  --shadow: 0 1px 2px rgba(10, 30, 26, .04), 0 10px 30px -12px rgba(10, 30, 26, .14);
  --shadow-lg: 0 30px 60px -24px rgba(6, 43, 38, .35);

  --font-ui: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --font-display: 'Aref Ruqaa', 'Tajawal', serif;
  --font-tfng: 'Noto Sans Tifinagh', 'Tajawal', sans-serif;

  --wrap: 1200px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --link: #2dd4bf;
  --bg: #08110f;
  --surface: #0e1a17;
  --surface-2: #12211d;
  --surface-3: #182b26;
  --text: #e8f0ed;
  --text-2: #c4d3ce;
  --muted: #93a8a2;
  --border: #1d302b;
  --border-strong: #284139;
  --stripe: rgba(45, 212, 191, .035);
  --mint-50: rgba(45, 212, 191, .12);
  --gold-50: rgba(201, 164, 92, .12);
  --danger-50: rgba(194, 65, 12, .14);
  --warn-50: rgba(180, 83, 9, .14);
  --info-50: rgba(14, 116, 144, .16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -12px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --link: #2dd4bf;
    --bg: #08110f;
    --surface: #0e1a17;
    --surface-2: #12211d;
    --surface-3: #182b26;
    --text: #e8f0ed;
    --text-2: #c4d3ce;
    --muted: #93a8a2;
    --border: #1d302b;
    --border-strong: #284139;
    --stripe: rgba(45, 212, 191, .035);
    --mint-50: rgba(45, 212, 191, .12);
    --gold-50: rgba(201, 164, 92, .12);
    --danger-50: rgba(194, 65, 12, .14);
    --warn-50: rgba(180, 83, 9, .14);
    --info-50: rgba(14, 116, 144, .16);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--g-800); }
:root[data-theme="dark"] a:not([class]):hover { color: #7ff0e0; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; color: var(--text); }
p { margin: 0 0 1em; }
.ic { flex: none; }
.gr-wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.gr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gr-skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--g-800); color: #fff; padding: 8px 14px; border-radius: 8px; }
.gr-skip:focus { top: 12px; color: #fff; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.gr-display { font-family: var(--font-display); font-weight: 700; letter-spacing: 0; }
.gr-tfng { font-family: var(--font-tfng); direction: ltr; unicode-bidi: isolate; }

/* ---------- buttons ---------- */
.gr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 22px;
  border-radius: 12px; border: 1.5px solid transparent;
  font: 700 15px/1.2 var(--font-ui); cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.gr-btn:hover { transform: translateY(-1px); }
.gr-btn:active { transform: translateY(0); }
.gr-btn--primary { background: var(--g-700); color: #fff; box-shadow: 0 8px 20px -10px rgba(15, 92, 82, .7); }
.gr-btn--primary:hover { background: var(--g-800); color: #fff; }
.gr-btn--mint { background: var(--mint); color: var(--g-950); box-shadow: 0 12px 28px -12px rgba(45, 212, 191, .8); }
.gr-btn--mint:hover { background: #5ee3d1; color: var(--g-950); }
.gr-btn--gold { background: var(--gold); color: #1d1606; }
.gr-btn--gold:hover { background: #d6b46f; color: #1d1606; }
.gr-btn--outline { background: transparent; border-color: var(--g-700); color: var(--g-700); }
.gr-btn--outline:hover { background: var(--g-700); color: #fff; }
.gr-btn--ghost-light { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .45); color: #fff; backdrop-filter: blur(6px); }
.gr-btn--ghost-light:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.gr-btn--soft { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.gr-btn--soft:hover { border-color: var(--border-strong); color: var(--text); }
.gr-btn--danger { background: var(--danger); color: #fff; }
.gr-btn--sm { min-height: 36px; padding: 6px 14px; font-size: 14px; border-radius: 10px; }
.gr-btn--block { width: 100%; }
:root[data-theme="dark"] .gr-btn--outline { border-color: var(--mint); color: var(--mint); }
:root[data-theme="dark"] .gr-btn--outline:hover { background: var(--mint); color: var(--g-950); }
.gr-iconbtn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.gr-iconbtn:hover { border-color: var(--g-600); color: var(--g-700); }
.gr-theme .ic-moon { display: none; }
:root[data-theme="dark"] .gr-theme .ic-moon { display: block; }
:root[data-theme="dark"] .gr-theme .ic-sun { display: none; }

/* ---------- header ---------- */
.gr-topbar { background: var(--g-900); color: #d8ece7; font-size: 14px; }
.gr-topbar .gr-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; }
.gr-topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.gr-topbar nav a { color: #d8ece7; padding: 5px 12px; border-radius: 8px; font-weight: 500; }
.gr-topbar nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.gr-topbar nav a[aria-current="page"] { background: #fff; color: var(--g-900); font-weight: 700; }
.gr-topbar__actions { display: flex; align-items: center; gap: 8px; }
.gr-topbar .gr-iconbtn { width: 34px; height: 34px; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #e6f3f0; }
.gr-chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 9px; font-weight: 700; font-size: 13px; border: 1px solid rgba(255, 255, 255, .3); color: #fff; background: transparent; cursor: pointer; font-family: var(--font-ui); }
.gr-chip-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.gr-chip-btn--gold { background: var(--gold); border-color: var(--gold); color: #1d1606; }
.gr-chip-btn--gold:hover { background: #d6b46f; color: #1d1606; }

.gr-header { background: var(--surface); border-bottom: 1px solid var(--border); position: relative; }
.gr-header::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--mint) 70%, transparent); opacity: .5; }
.gr-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; min-height: 96px; }
.gr-brand { display: flex; flex-direction: column; gap: 2px; color: var(--text); justify-self: start; }
.gr-brand:hover { color: var(--text); }
.gr-brand__name { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.2; color: var(--g-800); }
:root[data-theme="dark"] .gr-brand__name { color: #e9f6f2; }
.gr-brand__tagline { font-size: 14px; color: var(--muted); }
.gr-logo { justify-self: center; display: grid; place-items: center; }
.gr-logo img { width: 70px; height: 70px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(6, 43, 38, .25)); transition: transform .3s ease; }
.gr-logo:hover img { transform: translateY(-2px) scale(1.03); }
.gr-amazigh { justify-self: end; text-align: end; color: var(--g-800); }
.gr-amazigh__1 { font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.gr-amazigh__2 { font-size: 13px; color: var(--muted); }
:root[data-theme="dark"] .gr-amazigh { color: #d8ece7; }

.gr-nav { background: var(--surface); border-bottom: 1px solid var(--border); }
.gr-nav .gr-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.gr-nav__links { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.gr-nav__links a, .gr-nav__more > button {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px;
  color: var(--text-2); font-weight: 700; font-size: 15px; background: none; border: 0; cursor: pointer; font-family: var(--font-ui);
}
.gr-nav__links a:hover, .gr-nav__more > button:hover { background: var(--surface-2); color: var(--g-700); }
.gr-nav__links a[aria-current="page"] { color: var(--g-700); background: var(--mint-50); }
:root[data-theme="dark"] .gr-nav__links a[aria-current="page"] { color: var(--mint); }
.gr-nav__actions { display: flex; align-items: center; gap: 10px; }

/* members' main navigation: the green band */
.gr-mainnav { background: linear-gradient(180deg, var(--g-700), var(--g-800)); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .06); position: sticky; top: 0; z-index: 40; }
.gr-mainnav .gr-wrap { display: flex; align-items: center; justify-content: center; min-height: 58px; }
.gr-mainnav .gr-nav__links { justify-content: center; }
.gr-mainnav .gr-nav__links a, .gr-mainnav .gr-nav__more > button { color: #eaf7f3; padding: 9px 16px; }
.gr-mainnav .gr-nav__links a:hover, .gr-mainnav .gr-nav__more > button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.gr-mainnav .gr-nav__links a[aria-current="page"] { background: #fff; color: var(--g-800); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .45); }

.gr-nav__more { position: relative; }
.gr-nav__more > button .ic { transition: transform .2s; }
.gr-nav__more[data-open] > button .ic { transform: rotate(180deg); }
.gr-dropdown {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 220px; z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 8px; display: none;
}
.gr-nav__more[data-open] .gr-dropdown { display: block; animation: gr-pop .16s ease-out; }
.gr-dropdown a { display: flex !important; width: 100%; color: var(--text-2) !important; padding: 9px 12px !important; border-radius: 9px; font-weight: 500 !important; }
.gr-dropdown a:hover { background: var(--surface-2) !important; color: var(--g-700) !important; }
@keyframes gr-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.gr-burger { display: none; }

/* ---------- hero ---------- */
.gr-hero {
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(45, 212, 191, .22), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(201, 164, 92, .16), transparent 60%),
    linear-gradient(160deg, var(--g-700) 0%, var(--g-900) 55%, var(--g-950) 100%);
}
.gr-hero::before { content: ""; position: absolute; inset: 0; background: url('../img/pattern.svg') repeat; background-size: 96px; z-index: -1; mask-image: linear-gradient(180deg, #000 30%, transparent 100%); }
.gr-hero__inner { text-align: center; padding: 96px 20px 104px; max-width: 880px; margin-inline: auto; }
.gr-badge-glass {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); color: #d7fbf4; font-weight: 700; font-size: 14px;
  backdrop-filter: blur(8px);
}
.gr-badge-glass::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(45, 212, 191, .25); }
.gr-hero h1 { font-family: var(--font-display); font-size: clamp(36px, 6vw, 64px); color: #fff; margin: 22px 0 18px; font-weight: 700; text-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.gr-hero h1 em { font-style: normal; background: linear-gradient(180deg, #ecd39b, var(--gold) 60%, #a9853f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gr-hero p { font-size: clamp(16px, 2vw, 19px); color: #cfe7e1; max-width: 720px; margin: 0 auto 34px; line-height: 1.9; }
.gr-hero__cta { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.gr-hero__cta .gr-btn { min-width: 170px; min-height: 52px; font-size: 16px; }

.gr-pillars { background: linear-gradient(180deg, #0a2c2b, #0a1f24); color: #fff; border-top: 1px solid rgba(255, 255, 255, .06); }
.gr-pillars__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.gr-pillar { padding: 26px 22px; border-inline-start: 1px solid rgba(255, 255, 255, .08); text-align: center; transition: background .3s; }
.gr-pillar:first-child { border-inline-start: 0; }
.gr-pillar:hover { background: rgba(255, 255, 255, .03); }
.gr-pillar strong { display: block; font-family: var(--font-display); font-size: 26px; line-height: 1.4; margin-bottom: 4px; }
.gr-pillar span { font-size: 14px; color: #9fb9b3; }
.gr-pillar--mint strong { color: var(--mint); }
.gr-pillar--gold strong { color: var(--gold); }

/* ---------- sections ---------- */
.gr-section { padding: 88px 0; }
.gr-section--stripes { background-color: var(--bg); background-image: repeating-linear-gradient(135deg, var(--stripe) 0 14px, transparent 14px 28px); }
.gr-section--plain { background: var(--surface); border-block: 1px solid var(--border); }
.gr-section__head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.gr-section__head h2 { font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); color: var(--g-800); margin-bottom: 10px; }
:root[data-theme="dark"] .gr-section__head h2 { color: #e9f6f2; }
.gr-section__head p { color: var(--muted); font-size: 17px; margin: 0; }
.gr-eyebrow { display: inline-block; color: var(--gold-600); font-weight: 800; font-size: 13px; letter-spacing: .04em; margin-bottom: 8px; }

.gr-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gr-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px 28px;
  box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; position: relative; overflow: hidden;
}
.gr-card::after { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--mint), var(--gold)); transform: scaleX(0); transform-origin: right; transition: transform .35s ease; }
.gr-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.gr-card:hover::after { transform: scaleX(1); }
.gr-card h3 { font-family: var(--font-display); font-size: 22px; margin: 18px 0 8px; color: var(--text); }
.gr-card p { color: var(--muted); font-size: 15px; margin: 0; line-height: 1.85; }
.gr-chipicon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: var(--mint-50); color: var(--g-700); }
:root[data-theme="dark"] .gr-chipicon { color: var(--mint); }
.gr-chipicon--gold { background: var(--gold-50); color: var(--gold-600); }

.gr-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.gr-split h2 { font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); color: var(--g-800); }
:root[data-theme="dark"] .gr-split h2 { color: #e9f6f2; }
.gr-checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 16px; }
.gr-checks li { display: flex; gap: 14px; align-items: flex-start; color: var(--text-2); }
.gr-checks li .ic { color: var(--g-600); margin-top: 3px; background: var(--mint-50); border-radius: 50%; padding: 4px; width: 28px; height: 28px; }
.gr-checks b { color: var(--text); }
.gr-quote {
  position: relative; border-radius: var(--radius-lg); padding: 36px 32px; border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface), var(--surface-2)); box-shadow: var(--shadow);
}
.gr-quote > .ic { color: var(--gold); opacity: .55; margin-bottom: 10px; }
.gr-quote blockquote { margin: 0; font-family: var(--font-display); font-size: 24px; line-height: 1.75; color: var(--text); }
.gr-quote footer { margin-top: 16px; color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.gr-quote footer a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }

.gr-cta {
  border-radius: 28px; padding: 60px 32px; text-align: center; color: #fff; position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(600px 240px at 80% 0%, rgba(45, 212, 191, .25), transparent 70%), linear-gradient(135deg, var(--g-700), var(--g-900));
  box-shadow: var(--shadow-lg);
}
.gr-cta::before { content: ""; position: absolute; inset: 0; background: url('../img/pattern.svg'); background-size: 96px; z-index: -1; opacity: .9; }
.gr-cta h2 { font-family: var(--font-display); color: #fff; font-size: clamp(28px, 4vw, 40px); }
.gr-cta p { color: #cfe7e1; margin: 0 auto 26px; max-width: 620px; }

/* ---------- page shell ---------- */
.gr-pagehead {
  background: linear-gradient(135deg, var(--g-700), var(--g-900)); color: #fff; position: relative; overflow: hidden; isolation: isolate;
}
.gr-pagehead::before { content: ""; position: absolute; inset: 0; background: url('../img/pattern.svg'); background-size: 96px; z-index: -1; }
.gr-pagehead .gr-wrap { padding-block: 48px 52px; }
.gr-pagehead h1 { font-family: var(--font-display); color: #fff; font-size: clamp(30px, 4.5vw, 46px); margin: 6px 0 6px; }
.gr-pagehead p { color: #cfe7e1; margin: 0; max-width: 720px; }
.gr-crumbs { display: flex; gap: 8px; align-items: center; font-size: 14px; color: #a9cfc6; }
.gr-crumbs a { color: #d7fbf4; }
.gr-main { padding: 44px 0 84px; }
.gr-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 36px; }
.gr-prose { color: var(--text-2); font-size: 17px; line-height: 2; max-width: 820px; }
.gr-prose h2 { font-family: var(--font-display); color: var(--g-800); font-size: 28px; margin: 1.4em 0 .5em; }
.gr-prose h2:first-child { margin-top: 0; }
.gr-prose h3 { font-size: 21px; margin: 1.2em 0 .4em; }
.gr-prose ul, .gr-prose ol { padding-inline-start: 1.4em; }
.gr-prose li { margin-bottom: .35em; }
.gr-prose strong { color: var(--text); }
.gr-prose blockquote { border-inline-start: 4px solid var(--gold); margin: 1.2em 0; padding: .4em 1.2em; background: var(--gold-50); border-radius: 8px; }
:root[data-theme="dark"] .gr-prose h2 { color: #e9f6f2; }

.gr-empty { text-align: center; padding: 64px 24px; }
.gr-empty__icon { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 24px; background: var(--gold-50); color: var(--gold-600); box-shadow: 0 0 0 10px color-mix(in srgb, var(--gold-50) 50%, transparent); }
.gr-empty h2 { color: var(--g-800); font-size: 26px; font-weight: 800; }
:root[data-theme="dark"] .gr-empty h2 { color: #e9f6f2; }
.gr-empty p { color: var(--muted); max-width: 460px; margin: 0 auto 28px; }

.gr-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; margin-top: 32px; }
.gr-person { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 22px; text-align: center; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.gr-person:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.gr-person img, .gr-avatar-lg { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; border: 4px solid var(--surface); box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
.gr-avatar-lg { display: grid; place-items: center; background: linear-gradient(135deg, var(--g-600), var(--g-900)); color: #fff; font-size: 34px; font-weight: 800; }
.gr-person h3 { margin: 0 0 2px; font-size: 19px; }
.gr-person .gr-person__pos { color: var(--gold-600); font-weight: 700; font-size: 14px; }
.gr-person p { color: var(--muted); font-size: 14px; margin: 12px 0 0; }

/* ---------- footer ---------- */
.gr-footer { background: var(--navy); color: #b6c2d6; margin-top: auto; }
.gr-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-block: 56px 36px; }
.gr-footer h4 { color: var(--mint); font-family: var(--font-display); font-size: 21px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid rgba(201, 164, 92, .35); }
.gr-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gr-footer a { color: #dbe3ef; }
.gr-footer a:hover { color: var(--mint); }
.gr-footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.gr-footer__brand img { width: 46px; height: 46px; }
.gr-footer__brand strong { font-family: var(--font-display); color: #fff; font-size: 22px; }
.gr-footer__contact li { display: flex; gap: 8px; align-items: center; }
.gr-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding-block: 18px; text-align: center; font-size: 13px; color: #8090a8; }

/* ---------- forms ---------- */
.gr-field { display: grid; gap: 6px; margin-bottom: 18px; }
.gr-field label, .gr-label { font-weight: 700; font-size: 14px; color: var(--text-2); }
.gr-req { color: var(--danger); margin-inline-start: 2px; }
.gr-input, .gr-select, .gr-textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px;
  border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 500 15px/1.5 var(--font-ui); transition: border-color .2s, box-shadow .2s, background .2s;
}
.gr-textarea { min-height: 120px; resize: vertical; }
.gr-input:hover, .gr-select:hover, .gr-textarea:hover { border-color: var(--g-500); }
.gr-input:focus, .gr-select:focus, .gr-textarea:focus { outline: none; border-color: var(--g-600); box-shadow: 0 0 0 4px var(--ring); }
.gr-input[aria-invalid="true"] { border-color: var(--danger); }
.gr-input--ltr { direction: ltr; text-align: start; }
.gr-hint { color: var(--muted); font-size: 13px; }
.gr-error { color: var(--danger); font-size: 13px; font-weight: 700; }
.gr-inputwrap { position: relative; }
.gr-inputwrap .gr-input { padding-inline-end: 48px; }
.gr-inputwrap > button { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 9px; display: grid; place-items: center; }
.gr-inputwrap > button:hover { background: var(--surface-2); color: var(--text); }
.gr-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; }
.gr-check input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--g-600); }
.gr-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.gr-hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- alerts ---------- */
.gr-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid; margin-bottom: 18px; font-size: 15px; }
.gr-alert .ic { margin-top: 2px; }
.gr-alert--success { background: var(--mint-50); border-color: rgba(20, 184, 166, .35); color: var(--g-800); }
.gr-alert--warning { background: var(--warn-50); border-color: rgba(180, 83, 9, .3); color: var(--warn); }
.gr-alert--info { background: var(--info-50); border-color: rgba(14, 116, 144, .3); color: var(--info); }
.gr-alert--danger { background: var(--danger-50); border-color: rgba(194, 65, 12, .3); color: var(--danger); }
:root[data-theme="dark"] .gr-alert--success { color: var(--mint); }
.gr-alert__close { margin-inline-start: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; padding: 0; }
.gr-flash { position: fixed; inset-inline-start: 20px; bottom: 20px; z-index: 90; max-width: min(420px, calc(100vw - 40px)); box-shadow: var(--shadow-lg); animation: gr-pop .2s ease-out; }

/* ---------- auth ---------- */
.gr-auth { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; background-color: var(--bg); background-image: repeating-linear-gradient(135deg, var(--stripe) 0 14px, transparent 14px 28px); }
.gr-auth__card { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: 26px; box-shadow: var(--shadow-lg); overflow: hidden; }
.gr-auth__card--wide { max-width: 760px; }
.gr-auth__head { position: relative; isolation: isolate; text-align: center; padding: 30px 28px 26px; color: #fff; background: linear-gradient(135deg, var(--g-900), var(--g-600)); }
.gr-auth__head::before { content: ""; position: absolute; inset: 0; background: url('../img/pattern.svg'); background-size: 96px; z-index: -1; }
.gr-auth__head img { width: 58px; height: 58px; margin: 0 auto 10px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .3)); }
.gr-auth__head h1 { color: #fff; font-family: var(--font-display); font-size: 30px; margin: 0; }
.gr-auth__head p { color: #cfe7e1; margin: 4px 0 0; font-size: 14px; }
.gr-auth__head a { color: #d7fbf4; text-decoration: underline; text-underline-offset: 3px; }
.gr-auth__body { padding: 30px 32px 32px; }
.gr-auth__foot { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; display: grid; gap: 6px; }
.gr-auth__tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.gr-reqnote { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 20px; }
.gr-otp { text-align: center; letter-spacing: .5em; font-size: 24px !important; font-weight: 800 !important; direction: ltr; }

/* ---------- account ---------- */
.gr-welcome {
  border-radius: var(--radius-lg); padding: 34px 32px; color: #fff; position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(500px 220px at 15% 0%, rgba(201, 164, 92, .22), transparent 70%), linear-gradient(135deg, var(--g-700), var(--g-950));
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; box-shadow: var(--shadow-lg);
}
.gr-welcome::before { content: ""; position: absolute; inset: 0; background: url('../img/pattern.svg'); background-size: 96px; z-index: -1; }
.gr-welcome__date { color: var(--mint); font-weight: 700; font-size: 14px; }
.gr-welcome h1 { color: #fff; font-family: var(--font-display); font-size: clamp(26px, 4vw, 36px); margin: 2px 0 6px; }
.gr-welcome__meta { display: flex; gap: 10px; align-items: center; color: #cfe7e1; font-size: 14px; flex-wrap: wrap; }
.gr-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .12); color: #fff; }
.gr-me { display: flex; gap: 16px; align-items: center; }
.gr-me__avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255, 255, 255, .5); }
.gr-me__avatar--letters { display: grid; place-items: center; background: rgba(255, 255, 255, .12); font-weight: 800; font-size: 24px; color: #fff; }

.gr-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0; }
.gr-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 700; font-size: 14px; }
.gr-tabs a:hover { border-color: var(--g-500); color: var(--g-700); }
.gr-tabs a[aria-current="page"] { background: var(--mint-50); border-color: var(--g-500); color: var(--g-700); }
:root[data-theme="dark"] .gr-tabs a[aria-current="page"] { color: var(--mint); }

.gr-shortcuts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gr-shortcut { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; color: var(--text); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s; }
.gr-shortcut:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--g-500); color: var(--text); }
.gr-shortcut strong { display: block; font-size: 16px; }
.gr-shortcut small { color: var(--muted); font-size: 13px; display: block; line-height: 1.5; }
.gr-shortcut .gr-chipicon { width: 46px; height: 46px; border-radius: 13px; }
.gr-soon { display: inline-block; font-size: 11px; font-weight: 800; color: var(--gold-600); background: var(--gold-50); border-radius: 999px; padding: 1px 8px; margin-inline-start: 4px; }

.gr-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; direction: ltr; font: 700 15px/1.6 ui-monospace, 'Cascadia Mono', Menlo, monospace; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 12px; padding: 16px; }
.gr-qr { background: #fff; padding: 12px; border-radius: 16px; width: 244px; border: 1px solid var(--border); }
.gr-qr svg { width: 220px; height: 220px; }
.gr-secret { direction: ltr; font: 700 15px/1.6 ui-monospace, Menlo, monospace; background: var(--surface-2); padding: 8px 12px; border-radius: 10px; display: inline-block; word-break: break-all; }
.gr-steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.gr-steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.gr-steps li::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--g-700); color: #fff; font-weight: 800; font-size: 14px; }

/* ---------- pagination ---------- */
.gr-pager { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.gr-pager a, .gr-pager span { min-width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 700; }
.gr-pager a:hover { border-color: var(--g-500); }
.gr-pager [aria-current] { background: var(--g-700); color: #fff; border-color: var(--g-700); }
.gr-pager .is-disabled { opacity: .45; }

/* ---------- reveal on scroll (gr.js adds .is-in; nothing hides without JS) ---------- */
.js .gr-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .gr-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .gr-reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .gr-cards { grid-template-columns: 1fr 1fr; }
  .gr-shortcuts { grid-template-columns: 1fr 1fr; }
  .gr-footer__grid { grid-template-columns: 1fr 1fr; }
  .gr-pillars__grid { grid-template-columns: 1fr 1fr; }
  .gr-pillar:nth-child(3) { border-inline-start: 0; }
  .gr-pillar:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .08); }
  .gr-split { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 860px) {
  .gr-header__inner { grid-template-columns: 1fr auto; min-height: 76px; }
  .gr-logo { order: -1; justify-self: start; }
  .gr-logo img { width: 52px; height: 52px; }
  .gr-brand { justify-self: start; }
  .gr-header__inner { grid-template-columns: auto 1fr auto; }
  .gr-amazigh { display: none; }
  .gr-brand__name { font-size: 22px; }
  .gr-brand__tagline { font-size: 12px; }
  .gr-burger { display: inline-grid; }
  .gr-nav__links, .gr-mainnav { display: none; }
  .gr-nav .gr-wrap { min-height: 0; padding-block: 0; }
  body[data-menu-open] .gr-nav__links,
  body[data-menu-open] .gr-mainnav { display: flex; }
  body[data-menu-open] .gr-nav .gr-wrap { flex-direction: column; align-items: stretch; padding-block: 12px; }
  body[data-menu-open] .gr-nav__links { flex-direction: column; align-items: stretch; }
  .gr-mainnav { position: static; }
  body[data-menu-open] .gr-mainnav .gr-wrap { padding-block: 10px; }
  body[data-menu-open] .gr-mainnav .gr-nav__links { flex-direction: column; align-items: stretch; width: 100%; }
  .gr-dropdown { position: static; box-shadow: none; margin-top: 6px; }
  .gr-nav__actions { display: none; }
  body[data-menu-open] .gr-nav__actions { display: flex; flex-wrap: wrap; padding-bottom: 6px; }
  .gr-topbar nav { display: none; }
  .gr-topbar .gr-wrap { justify-content: flex-end; }
  .gr-hero__inner { padding: 64px 16px 72px; }
  .gr-section { padding: 60px 0; }
  .gr-panel { padding: 24px 20px; }
  .gr-auth__body { padding: 24px 20px; }
  .gr-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .gr-wrap { padding-inline: 16px; }
  .gr-cards, .gr-shortcuts, .gr-footer__grid { grid-template-columns: 1fr; }
  .gr-pillars__grid { grid-template-columns: 1fr; }
  .gr-pillar { border-inline-start: 0 !important; border-top: 1px solid rgba(255, 255, 255, .08); }
  .gr-pillar:first-child { border-top: 0; }
  .gr-hero__cta .gr-btn { width: 100%; }
  .gr-cta { padding: 44px 20px; border-radius: 22px; }
  .gr-welcome { padding: 26px 20px; }
  .gr-codes { grid-template-columns: 1fr; }
}

@media print {
  .gr-topbar, .gr-nav, .gr-mainnav, .gr-footer, .gr-flash { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   Phase 2 — posts, timeline, library, editor
   ========================================================================== */
.gr-sectionhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.gr-sectionhead h2 { margin: 0; font-size: 22px; font-weight: 800; }
.gr-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.gr-chips a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 700; font-size: 14px; }
.gr-chips a:hover { border-color: var(--g-500); color: var(--g-700); }
.gr-chips a[aria-current="page"] { background: var(--g-700); border-color: var(--g-700); color: #fff; }
.gr-chips em { font-style: normal; font-size: 12px; opacity: .7; margin-inline-start: 4px; }

.gr-posts { display: grid; gap: 22px; }
.gr-post {
  display: grid; grid-template-columns: 1fr 360px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  overflow: hidden; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s, border-color .25s; color: var(--text);
}
.gr-post:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); color: var(--text); }
.gr-post__body { padding: 28px 30px; display: flex; flex-direction: column; gap: 10px; }
.gr-post__body h3 { font-family: var(--font-display); font-size: 25px; margin: 0; line-height: 1.5; }
.gr-post__body p { color: var(--muted); margin: 0; }
.gr-post__more { margin-top: auto; color: var(--g-600); font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
:root[data-theme="dark"] .gr-post__more { color: var(--mint); }
.gr-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13px; }
.gr-meta span { display: inline-flex; align-items: center; gap: 5px; }
.gr-cover { position: relative; min-height: 220px; isolation: isolate; overflow: hidden; background: linear-gradient(160deg, var(--g-700), var(--g-950)); display: grid; place-items: center; color: #fff; text-align: center; padding: 24px; }
.gr-cover::before { content: ""; position: absolute; inset: 0; background: url('../img/pattern.svg'); background-size: 96px; z-index: -1; }
.gr-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.gr-cover__title { font-family: var(--font-display); font-size: 24px; line-height: 1.6; text-shadow: 0 6px 20px rgba(0, 0, 0, .35); max-width: 280px; }
.gr-cover__ic { position: absolute; inset-inline-start: 18px; bottom: 16px; opacity: .25; }
.gr-tag { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 1; padding: 3px 12px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--g-800); font-size: 12px; font-weight: 800; }
.gr-tag--gold { background: var(--gold); color: #1d1606; inset-inline-end: auto; inset-inline-start: 14px; }
.gr-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--mint-50); color: var(--g-700); }
.gr-badge--gold { background: var(--gold-50); color: var(--gold-600); }
.gr-badge--muted { background: var(--surface-3); color: var(--muted); }
:root[data-theme="dark"] .gr-badge { color: var(--mint); }

.gr-with-side { display: grid; grid-template-columns: 1fr 340px; gap: 26px; align-items: start; }
.gr-side { display: grid; gap: 18px; position: sticky; top: 80px; }
.gr-box { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-sm); }
.gr-box__head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); font-weight: 800; }
.gr-box__head .ic { color: var(--g-600); }
.gr-box__body { padding: 16px 18px; color: var(--text-2); font-size: 15px; }
.gr-box__list { list-style: none; margin: 0; padding: 6px 8px; }
.gr-box__list a { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: 10px; color: var(--text-2); }
.gr-box__list a:hover, .gr-box__list a[aria-current="page"] { background: var(--surface-2); color: var(--g-700); }
.gr-box__list em { font-style: normal; font-size: 12px; min-width: 24px; height: 22px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--surface-3); color: var(--muted); padding: 0 6px; }

.gr-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.gr-timeline::before { content: ""; position: absolute; inset-block: 6px; inset-inline-start: 7px; width: 2px; background: linear-gradient(var(--mint), var(--border)); }
.gr-timeline li { position: relative; padding-inline-start: 34px; padding-bottom: 26px; }
.gr-timeline li::before { content: ""; position: absolute; inset-inline-start: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--mint); }
.gr-timeline time { color: var(--muted); font-size: 13px; font-weight: 700; }
.gr-timeline h3 { font-family: var(--font-display); font-size: 21px; margin: 2px 0 4px; }
.gr-timeline h3 a { color: var(--text); }
.gr-timeline h3 a:hover { color: var(--g-700); }
.gr-timeline p { color: var(--muted); margin: 0 0 6px; font-size: 15px; }

.gr-article { max-width: 860px; margin-inline: auto; }
.gr-article__cover { border-radius: 22px; overflow: hidden; margin-bottom: 26px; box-shadow: var(--shadow); }
.gr-article__cover img { width: 100%; max-height: 460px; object-fit: cover; }
.gr-article .gr-prose { max-width: none; }
.gr-article__foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.gr-author { display: flex; align-items: center; gap: 12px; }
.gr-author__avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: linear-gradient(135deg, var(--g-600), var(--g-900)); color: #fff; font-weight: 800; }
.gr-author strong { display: block; color: var(--text); }
.gr-ribbon { background: var(--gold-50); color: var(--gold-600); border: 1px dashed var(--gold); border-radius: 12px; padding: 10px 14px; font-weight: 700; margin-bottom: 18px; display: flex; gap: 8px; align-items: center; }
.gr-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 14px; }
.gr-related a { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; color: var(--text); }
.gr-related a:hover { border-color: var(--g-500); }
.gr-related strong { font-family: var(--font-display); font-size: 18px; display: block; line-height: 1.6; }

/* library */
.gr-libhead { border-radius: 24px; padding: 34px 32px; color: #fff; position: relative; overflow: hidden; isolation: isolate; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; background: radial-gradient(600px 260px at 10% 0%, rgba(45, 212, 191, .22), transparent 70%), linear-gradient(135deg, var(--g-700), #062b2b 70%, #071a22); box-shadow: var(--shadow-lg); margin-bottom: 24px; }
.gr-libhead::before { content: ""; position: absolute; inset: 0; background: url('../img/pattern.svg'); background-size: 96px; z-index: -1; }
.gr-libhead h1 { color: #fff; font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); margin: 6px 0; }
.gr-libhead p { color: #cfe7e1; margin: 0; }
.gr-libstats { display: flex; gap: 12px; }
.gr-libstat { min-width: 96px; text-align: center; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(6px); }
.gr-libstat strong { display: block; font-size: 30px; line-height: 1; }
.gr-libstat:last-child strong { color: var(--gold); }
.gr-libstat span { font-size: 13px; color: #cfe7e1; }
.gr-files { display: grid; gap: 12px; }
.gr-file { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; transition: border-color .2s, box-shadow .2s; }
.gr-file:hover { border-color: var(--g-500); box-shadow: var(--shadow); }
.gr-file__kind { width: 54px; height: 62px; border-radius: 10px; display: grid; place-items: center; font: 800 12px/1 var(--font-ui); color: #fff; background: linear-gradient(160deg, #b42318, #7a1a12); direction: ltr; position: relative; }
.gr-file__kind::after { content: ""; position: absolute; top: 0; inset-inline-end: 0; border-width: 0 0 12px 12px; border-style: solid; border-color: transparent transparent rgba(255, 255, 255, .35) transparent; }
.gr-file__kind--Word { background: linear-gradient(160deg, #2b6cb0, #1a4480); }
.gr-file__kind--Excel { background: linear-gradient(160deg, #1d7a46, #11502c); }
.gr-file__kind--PowerPoint { background: linear-gradient(160deg, #c2552a, #8a3412); }
.gr-file__kind--TXT, .gr-file__kind--RTF { background: linear-gradient(160deg, #52616b, #2f3a40); }
.gr-file h3 { margin: 0 0 2px; font-size: 17px; }
.gr-file p { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.gr-file__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.gr-searchbar { display: flex; gap: 8px; }
.gr-searchbar .gr-input { min-height: 44px; }

/* editor */
.gr-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1.5px solid var(--border-strong); border-radius: 14px; overflow: hidden; background: var(--surface); }
.gr-editor .adm-mdbar { grid-column: 1 / -1; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; }
.gr-editor textarea { border: 0; border-radius: 0; min-height: 460px; box-shadow: none !important; border-inline-end: 1px solid var(--border); resize: vertical; font-size: 15px; line-height: 1.9; }
.gr-editor__preview { padding: 16px 20px; overflow: auto; max-height: 640px; background: var(--surface-2); }
.gr-editor__preview .gr-prose { font-size: 16px; }
.gr-editor__label { font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 8px; display: block; }
.adm-mdbar { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; background: var(--surface-2); }
.adm-mdbar button { min-width: 34px; height: 32px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; color: var(--text-2); font: 700 14px var(--font-ui); padding: 0 8px; }
.adm-mdbar button:hover { background: var(--surface); color: var(--g-700); }
.gr-formactions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.gr-note { background: var(--warn-50); border: 1px solid rgba(180, 83, 9, .3); color: var(--warn); border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; }
.gr-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.gr-table th { text-align: start; font-size: 12px; color: var(--muted); padding: 10px 14px; background: var(--surface-2); }
.gr-table td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: middle; }
.gr-tablewrap { overflow-x: auto; }

@media (max-width: 1020px) {
  .gr-with-side { grid-template-columns: 1fr; }
  .gr-side { position: static; }
  .gr-related { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .gr-post { grid-template-columns: 1fr; }
  .gr-cover { min-height: 160px; order: -1; }
  .gr-editor { grid-template-columns: 1fr; }
  .gr-editor textarea { border-inline-end: 0; min-height: 320px; }
  .gr-editor__preview { border-top: 1px solid var(--border); max-height: none; }
  .gr-file { grid-template-columns: auto 1fr; }
  .gr-file__actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.gr-meta--light { margin-top: 12px; gap: 8px; }
.gr-dash { margin-top: 24px; }
.gr-push { margin-inline-start: auto; font-size: 13px; font-weight: 700; }
.gr-article__foot > span { display: inline-flex; align-items: center; gap: 6px; }
