/* ==========================================================================
   مزبوط — Mazbout design system
   Plain CSS, no build step, no CDN. Self-hosted so the pages render on Syrian
   networks where CDNs are unreliable or blocked.

   ACCESSIBILITY CONTRACT — read before adding a rule:
   --mz-lime (#E2FB3D) is a very high-luminance colour. It scores 1.16:1
   against white. It is a BACKGROUND, never a foreground on a light surface,
   and the only text that goes on it is --mz-ink (13.81:1).
   Lime may be a foreground ONLY on --mz-ink (13.81:1).
   For a lime-flavoured label on a light surface use --mz-lime-ink (6.05:1).
   Never put white text on --mz-danger (3.58:1, fails AA body) — filled
   destructive controls use --mz-danger-strong (5.28:1 with white).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts — IBM Plex Sans Arabic (SIL Open Font License 1.1), self-hosted.
   -------------------------------------------------------------------------- */
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 400;
    font-display: optional;
    src: url('/fonts/ibm-plex-sans-arabic/ibm-arabic-400.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 400;
    font-display: optional;
    src: url('/fonts/ibm-plex-sans-arabic/ibm-latin-400.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 700;
    font-display: optional;
    src: url('/fonts/ibm-plex-sans-arabic/ibm-arabic-700.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 700;
    font-display: optional;
    src: url('/fonts/ibm-plex-sans-arabic/ibm-latin-700.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */
:root {
    /* brand */
    --mz-ink: #0C2528;
    --mz-ink-hover: #164046;
    --mz-lime: #E2FB3D;
    --mz-lime-hover: #D4ED2A;
    --mz-lime-ink: #5E6819;
    --mz-lime-tint: #FBFEE4;

    /* surfaces */
    --mz-cream: #EFEEE9;
    --mz-grey: #F5F5F5;
    --mz-surface: #FFFFFF;

    /* text */
    --mz-text: #151515;
    --mz-text-muted: #464646;
    --mz-text-on-ink: #EFEEE9;
    --mz-muted-on-ink: #A8B5B7;

    /* status */
    --mz-mint: #51E88B;
    --mz-mint-ink: #256B41;
    --mz-mint-tint: #E7FCEF;
    --mz-lilac: #D4ABF8;
    --mz-lilac-ink: #6B3FA0;
    --mz-lilac-tint: #F9F3FE;
    --mz-danger: #EF4D58;
    --mz-danger-strong: #C8323D;
    --mz-danger-ink: #B3323C;
    --mz-danger-tint: #FDE6E8;

    /* lines */
    --mz-border: #DCDBD4;
    --mz-border-strong: #C9C8C0;
    /* Deliberately darker than --mz-border-strong: this is for graphical elements
       that must stay perceivable (WCAG 1.4.11, 3:1), e.g. unselected rating stars.
       3.70:1 on white, 3.18:1 on cream, 3.39:1 on grey. */
    --mz-neutral-mid: #87857C;

    /* shape — flat surfaces, no heavy shadows */
    --mz-r-pill: 999px;
    --mz-r-card: 16px;
    --mz-r-control: 12px;
    --mz-r-sm: 8px;

    --mz-font: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, 'Noto Naskh Arabic', 'Noto Sans Arabic', sans-serif;
    --mz-font-mono: ui-monospace, SFMono-Regular, 'Cascadia Mono', Consolas, monospace;
}

/* --------------------------------------------------------------------------
   3. Reset + base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--mz-font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--mz-text);
    background: var(--mz-surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p, figure, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

img, svg { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--mz-ink); }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
    outline: 3px solid var(--mz-ink);
    outline-offset: 2px;
    border-radius: var(--mz-r-sm);
}

.mz-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.mz-wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
.mz-wrap--md { max-width: 880px; }
.mz-wrap--sm { max-width: 720px; }
.mz-wrap--xs { max-width: 560px; }
.mz-wrap--xxs { max-width: 420px; }

.mz-section { padding-block: 56px; }
.mz-section--sm { padding-block: 32px; }
.mz-section--lg { padding-block: 80px; }

.mz-row { display: flex; align-items: center; gap: 12px; }
.mz-row--between { justify-content: space-between; }
.mz-row--end { justify-content: flex-end; }
.mz-row--center { justify-content: center; }
.mz-row--top { align-items: flex-start; }
.mz-row--wrap { flex-wrap: wrap; }
.mz-col { display: flex; flex-direction: column; gap: 12px; }
.mz-col--end { align-items: flex-end; }

.mz-flex-1 { flex: 1 1 auto; min-width: 0; }
.mz-shrink-0 { flex-shrink: 0; }

.mz-grid { display: grid; gap: 16px; }
.mz-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mz-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mz-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) {
    .mz-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mz-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.mz-gap-1 { gap: 4px; }
.mz-gap-2 { gap: 8px; }
.mz-gap-3 { gap: 12px; }
.mz-gap-4 { gap: 16px; }
.mz-gap-6 { gap: 24px; }
.mz-gap-8 { gap: 32px; }

/* vertical rhythm */
.mz-stack > * + * { margin-top: 16px; }
.mz-stack--sm > * + * { margin-top: 8px; }
.mz-stack--md > * + * { margin-top: 12px; }
.mz-stack--lg > * + * { margin-top: 24px; }

.mz-mt-1 { margin-top: 4px; }
.mz-mt-2 { margin-top: 8px; }
.mz-mt-3 { margin-top: 12px; }
.mz-mt-4 { margin-top: 16px; }
.mz-mt-5 { margin-top: 20px; }
.mz-mt-6 { margin-top: 24px; }
.mz-mt-8 { margin-top: 32px; }
.mz-mt-10 { margin-top: 40px; }

.mz-hide-sm { display: none; }
@media (min-width: 640px) { .mz-hide-sm { display: inline; } }

/* --------------------------------------------------------------------------
   5. Typography
   -------------------------------------------------------------------------- */
.mz-h1 { font-size: 2rem; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; color: var(--mz-ink); }
.mz-h2 { font-size: 1.5rem; line-height: 1.3; font-weight: 700; color: var(--mz-ink); }
.mz-h3 { font-size: 1.125rem; line-height: 1.4; font-weight: 700; color: var(--mz-ink); }
.mz-h4 { font-size: 1rem; line-height: 1.5; font-weight: 700; color: var(--mz-ink); }
@media (min-width: 640px) {
    .mz-h1 { font-size: 2.75rem; }
    .mz-h1--hero { font-size: 3.25rem; }
    .mz-h2 { font-size: 1.75rem; }
}

.mz-lead { font-size: 1.125rem; line-height: 1.8; color: var(--mz-text-muted); }
.mz-text-xs { font-size: 0.75rem; }
.mz-text-sm { font-size: 0.875rem; }
.mz-text-lg { font-size: 1.125rem; }
.mz-text-xl { font-size: 1.25rem; }
.mz-text-2xl { font-size: 1.5rem; }
.mz-text-3xl { font-size: 1.875rem; }
.mz-text-4xl { font-size: 2.25rem; }

.mz-muted { color: var(--mz-text-muted); }
.mz-strong { font-weight: 700; }
.mz-semibold { font-weight: 700; }
.mz-medium { font-weight: 400; }
.mz-normal { font-weight: 400; }
.mz-center { text-align: center; }
.mz-start { text-align: start; }
.mz-end { text-align: end; }
.mz-ltr { direction: ltr; }
.mz-mono { font-family: var(--mz-font-mono); }
.mz-underline { text-decoration: underline; }
.mz-tracked { letter-spacing: 0.5em; }

/* semantic text colours — all verified against light surfaces */
.mz-t-ink { color: var(--mz-ink); }
.mz-t-lime { color: var(--mz-lime-ink); }   /* never raw lime on light */
.mz-t-mint { color: var(--mz-mint-ink); }
.mz-t-lilac { color: var(--mz-lilac-ink); }
.mz-t-danger { color: var(--mz-danger-ink); }

.mz-link { color: var(--mz-ink); text-decoration: underline; text-underline-offset: 3px; }
.mz-link:hover { color: var(--mz-lime-ink); }

/* quiet nav / inline links */
.mz-navlink { color: var(--mz-text-muted); }
.mz-navlink:hover { color: var(--mz-ink); }
.mz-navlink--active { color: var(--mz-ink); font-weight: 700; }

/* --------------------------------------------------------------------------
   6. Buttons — pill, flat
   -------------------------------------------------------------------------- */
.mz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: var(--mz-r-pill);
    padding: 12px 24px;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.25;
    cursor: pointer;
    text-align: center;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.mz-btn:disabled, .mz-btn[disabled] { opacity: .55; cursor: not-allowed; }

/* primary: lime surface, ink label — 13.81:1 */
.mz-btn--primary { background: var(--mz-lime); color: var(--mz-ink); }
.mz-btn--primary:hover { background: var(--mz-lime-hover); color: var(--mz-ink); }

/* ink surface, lime label — 13.81:1 */
.mz-btn--ink { background: var(--mz-ink); color: var(--mz-lime); }
.mz-btn--ink:hover { background: var(--mz-ink-hover); color: var(--mz-lime); }

.mz-btn--outline { background: transparent; color: var(--mz-ink); border-color: var(--mz-border-strong); }
.mz-btn--outline:hover { background: var(--mz-cream); color: var(--mz-ink); }

.mz-btn--ghost { background: transparent; color: var(--mz-text-muted); padding-inline: 8px; font-weight: 700; }
.mz-btn--ghost:hover { color: var(--mz-ink); }

/* destructive: --mz-danger-strong, never --mz-danger, so white passes AA */
.mz-btn--danger { background: var(--mz-danger-strong); color: #FFFFFF; }
.mz-btn--danger:hover { background: var(--mz-danger-ink); color: #FFFFFF; }

.mz-btn--quiet-danger { background: transparent; color: var(--mz-danger-ink); font-weight: 700; padding-inline: 0; }
.mz-btn--quiet-danger:hover { color: var(--mz-danger-strong); }

.mz-btn--lg { padding: 16px 32px; font-size: 1.125rem; }
.mz-btn--sm { padding: 8px 18px; font-size: 0.875rem; }
.mz-btn--block { display: flex; width: 100%; }

/* an unstyled <button> that should read as a link */
.mz-btn-bare { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }

/* --------------------------------------------------------------------------
   7. Surfaces
   -------------------------------------------------------------------------- */
.mz-card {
    background: var(--mz-surface);
    border: 1px solid var(--mz-border);
    border-radius: var(--mz-r-card);
    padding: 20px;
}
.mz-card--lg { padding: 24px; border-radius: 24px; }
@media (min-width: 640px) { .mz-card--lg { padding: 32px; } }
.mz-card--flush { padding: 0; }
.mz-card--link { display: block; transition: border-color .15s ease, background-color .15s ease; }
.mz-card--link:hover { border-color: var(--mz-ink); background: var(--mz-lime-tint); }
.mz-card--empty { border-style: dashed; border-color: var(--mz-border-strong); padding: 40px 20px; text-align: center; color: var(--mz-text-muted); }
.mz-card--selected { border-color: var(--mz-ink); border-width: 2px; background: var(--mz-lime-tint); }
.mz-card--accent { border-color: var(--mz-ink); background: var(--mz-cream); }

/* inset block on a card — cream/grey wash */
.mz-panel { background: var(--mz-cream); border-radius: var(--mz-r-control); padding: 12px 16px; }
.mz-panel--grey { background: var(--mz-grey); }

/* full-width dark band */
.mz-dark { background: var(--mz-ink); color: var(--mz-text-on-ink); }

/* Every ink-backed context re-points the light-surface text tokens at their
   on-ink equivalents. Without this, .mz-muted (#464646) lands on ink at 1.7:1.
   Keep .mz-footer and .mz-callout in this list — they are ink surfaces too. */
.mz-dark .mz-h1, .mz-dark .mz-h2, .mz-dark .mz-h3, .mz-dark .mz-h4,
.mz-footer .mz-h1, .mz-footer .mz-h2, .mz-footer .mz-h3, .mz-footer .mz-h4,
.mz-callout .mz-h1, .mz-callout .mz-h2, .mz-callout .mz-h3, .mz-callout .mz-h4,
.mz-dark .mz-t-ink, .mz-footer .mz-t-ink, .mz-callout .mz-t-ink {
    color: var(--mz-text-on-ink);
}
.mz-dark .mz-muted, .mz-dark .mz-lead,
.mz-footer .mz-muted, .mz-footer .mz-lead,
.mz-callout .mz-muted, .mz-callout .mz-lead {
    color: var(--mz-muted-on-ink);
}
.mz-dark a:hover, .mz-callout a:hover { color: var(--mz-lime); }

/* cream band */
.mz-cream { background: var(--mz-cream); }
.mz-hero { background: linear-gradient(180deg, var(--mz-cream) 0%, var(--mz-surface) 100%); }

.mz-callout {
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    background: var(--mz-ink);
    color: var(--mz-text-on-ink);
}
.mz-callout .mz-h2 { color: var(--mz-text-on-ink); }
.mz-callout .mz-lead { color: var(--mz-muted-on-ink); }

/* --------------------------------------------------------------------------
   8. Notes / banners — tinted background, dark label
   -------------------------------------------------------------------------- */
.mz-note {
    border-radius: var(--mz-r-control);
    padding: 14px 20px;
    font-size: 0.9375rem;
    line-height: 1.7;
}
.mz-note--lime { background: var(--mz-lime-tint); color: var(--mz-lime-ink); }
.mz-note--mint { background: var(--mz-mint-tint); color: var(--mz-mint-ink); }
.mz-note--lilac { background: var(--mz-lilac-tint); color: var(--mz-lilac-ink); }
.mz-note--danger { background: var(--mz-danger-tint); color: var(--mz-danger-ink); font-weight: 700; }
.mz-note--neutral { background: var(--mz-cream); color: var(--mz-text); }

/* --------------------------------------------------------------------------
   9. Chips
   -------------------------------------------------------------------------- */
.mz-chip {
    display: inline-flex;
    align-items: center;
    border-radius: var(--mz-r-pill);
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.5;
    border: 1px solid transparent;
    white-space: nowrap;
}
.mz-chip--neutral { background: var(--mz-cream); color: var(--mz-text-muted); border-color: var(--mz-border-strong); }
.mz-chip--ink { background: var(--mz-ink); color: var(--mz-lime); }
.mz-chip--lime { background: var(--mz-lime-tint); color: var(--mz-lime-ink); border-color: var(--mz-lime); }
.mz-chip--mint { background: var(--mz-mint-tint); color: var(--mz-mint-ink); border-color: var(--mz-mint); }
.mz-chip--lilac { background: var(--mz-lilac-tint); color: var(--mz-lilac-ink); border-color: var(--mz-lilac); }
.mz-chip--danger { background: var(--mz-danger-tint); color: var(--mz-danger-ink); border-color: var(--mz-danger); }

/* pill link used for interlinking (cities) */
.mz-pill-link {
    display: inline-block;
    border: 1px solid var(--mz-border-strong);
    border-radius: var(--mz-r-pill);
    padding: 6px 16px;
    font-size: 0.875rem;
    color: var(--mz-text-muted);
    background: var(--mz-surface);
}
.mz-pill-link:hover { border-color: var(--mz-ink); color: var(--mz-ink); background: var(--mz-lime-tint); }

/* --------------------------------------------------------------------------
   10. Forms
   -------------------------------------------------------------------------- */
.mz-label { display: block; font-weight: 700; font-size: 0.9375rem; color: var(--mz-ink); }
.mz-label--sm { font-size: 0.875rem; }

.mz-field {
    display: block;
    width: 100%;
    background: var(--mz-cream);
    border: 1px solid var(--mz-border);
    border-radius: var(--mz-r-control);
    padding: 12px 16px;
    color: var(--mz-text);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.mz-field::placeholder { color: var(--mz-text-muted); opacity: 1; }
.mz-field:focus {
    outline: none;
    border-color: var(--mz-ink);
    box-shadow: 0 0 0 3px rgba(12, 37, 40, .18);
    background: var(--mz-surface);
}
textarea.mz-field { resize: vertical; }
select.mz-field { appearance: none; background-image: none; }

.mz-check { width: 18px; height: 18px; accent-color: var(--mz-ink); flex-shrink: 0; }
.mz-range { width: 100%; accent-color: var(--mz-ink); }

/* clickable option row / tile */
.mz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--mz-border);
    border-radius: var(--mz-r-control);
    padding: 12px 16px;
    cursor: pointer;
    background: var(--mz-surface);
    transition: border-color .15s ease, background-color .15s ease;
}
.mz-option:hover { border-color: var(--mz-ink); background: var(--mz-lime-tint); }
.mz-option--tile { display: block; text-align: center; padding: 20px; border-radius: var(--mz-r-card); }
.mz-option--selected { border-color: var(--mz-ink); border-width: 2px; background: var(--mz-lime-tint); }

.mz-error { color: var(--mz-danger-ink); font-size: 0.875rem; font-weight: 400; }
.mz-req { color: var(--mz-danger-ink); }

/* --------------------------------------------------------------------------
   11. Chrome — header / footer / wordmark
   -------------------------------------------------------------------------- */
.mz-wordmark { font-size: 1.5rem; font-weight: 700; color: var(--mz-ink); letter-spacing: -0.01em; }
.mz-wordmark--sm { font-size: 1.25rem; }
/* on ink the wordmark goes lime — 13.81:1 */
.mz-dark .mz-wordmark, .mz-footer .mz-wordmark, .mz-callout .mz-wordmark { color: var(--mz-lime); }

.mz-header { border-bottom: 1px solid var(--mz-border); background: var(--mz-surface); }
.mz-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.mz-header__nav { display: flex; align-items: center; gap: 12px; font-size: 0.9375rem; }
@media (min-width: 640px) { .mz-header__nav { gap: 20px; } }

.mz-footer { margin-top: 80px; background: var(--mz-ink); color: var(--mz-text-on-ink); }
.mz-footer a { color: var(--mz-muted-on-ink); }
.mz-footer a:hover { color: var(--mz-lime); }
.mz-footer__cols { display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 640px) { .mz-footer__cols { flex-direction: row; justify-content: space-between; } }
.mz-footer__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; row-gap: 8px; font-size: 0.9375rem; }

/* --------------------------------------------------------------------------
   12. Bits
   -------------------------------------------------------------------------- */
.mz-icon-lg { font-size: 2.25rem; line-height: 1; }
.mz-icon-xl { font-size: 3rem; line-height: 1; }

/* numbered step marker — lime tile, ink numeral */
.mz-step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--mz-r-control);
    background: var(--mz-lime);
    color: var(--mz-ink);
    font-size: 1.25rem;
    font-weight: 700;
}

.mz-stars { color: var(--mz-lime-ink); }
.mz-stars--off { color: var(--mz-neutral-mid); }

.mz-divide > * + * { border-top: 1px solid var(--mz-border); }

.mz-scroll { max-height: 320px; overflow-y: auto; }

/* chat bubbles */
.mz-thread { background: var(--mz-cream); border-radius: var(--mz-r-control); padding: 12px; }
.mz-bubble {
    max-width: 80%;
    border-radius: var(--mz-r-card);
    padding: 8px 16px;
    font-size: 0.875rem;
    line-height: 1.6;
}
.mz-bubble--mine { background: var(--mz-ink); color: var(--mz-text-on-ink); }
.mz-bubble--mine .mz-bubble__time { color: var(--mz-muted-on-ink); }
.mz-bubble--theirs { background: var(--mz-surface); color: var(--mz-text); border: 1px solid var(--mz-border); }
.mz-bubble__time { font-size: 0.6875rem; margin-top: 2px; color: var(--mz-text-muted); }

/* pagination emitted by Laravel's default paginator */
.mz-pagination svg { width: 18px; height: 18px; display: inline-block; }
