/* MlkoMal design tokens v2, light theme (UI phase, step 2.1).
   Source: canvas page «فاز ۲ · UI نهایی», boards UI2-Foundations and UI2-Icons.
   Doc: docs/ui/01-design-system.md. Replaces design/tokens.css (v1, still loaded by the stage 1-2 code) when phase 3 starts. */
:root {
  /* Surfaces */
  --color-bg: #F3F4F1;            /* every page, and the inside of fields */
  --color-surface: #FFFFFF;       /* cards, sheets, bottom nav */
  --color-scrim: rgba(23, 43, 38, .38);

  /* Text */
  --color-ink: #172B26;           /* main text, primary button, active chip (13.5:1 on bg) */
  --color-text-body: #3D4844;     /* long description text (8.6:1) */
  --color-text-muted: #5F6964;    /* secondary text and labels (5.2:1 on bg, 5.7:1 on white) */
  --color-placeholder: #66706B;   /* field hints (4.7:1 on bg) */
  --color-on-dark: #FFFFFF;

  /* Brand */
  --color-primary: #145A4A;       /* «ثبت آگهی», prices, icons, focused field (7.3:1 on bg) */
  --color-primary-hover: #0F4639;
  --color-primary-pressed: #0B372D;
  --color-primary-soft: #F1F6F3;  /* selected option, icon tile */
  --color-rent: #2A5C9A;          /* only the dot on the «رهن و اجاره» tag */

  /* Lines and focus */
  --color-border: #E3E6E1;
  --color-divider: #EEF0EC;
  --color-focus: #145A4A;

  /* States */
  --color-error: #B42318;
  --color-error-bg: #FDF1F0;
  --color-warning: #8A5C00;
  --color-warning-bg: #FFF6DB;
  --color-warning-text: #5C4A12;  /* system notes on warning-bg (8.0:1) */
  --color-success: #14724F;
  --color-success-bg: #E3F4EC;
  --color-neutral: #3D4844;
  --color-neutral-bg: #E9ECE7;

  /* Listing status */
  --status-pending-bg: var(--color-warning-bg);   --status-pending-text: var(--color-warning);
  --status-published-bg: var(--color-success-bg); --status-published-text: var(--color-success);
  --status-needs-edit-bg: var(--color-error-bg);  --status-needs-edit-text: var(--color-error);
  --status-deleted-bg: var(--color-neutral-bg);   --status-deleted-text: var(--color-neutral);

  /* Fallback image tints (listing without photos) */
  --fallback-green-bg: #E4ECE7; --fallback-green-ground: #D3DFD8; --fallback-green-fg: #145A4A;
  --fallback-sand-bg: #ECEAE2;  --fallback-sand-ground: #DEDBCF;  --fallback-sand-fg: #5C5338;
  --fallback-blue-bg: #E3E9EF;  --fallback-blue-ground: #D2DBE5;  --fallback-blue-fg: #2A4A6E;
  --fallback-clay-bg: #EDE6E1;  --fallback-clay-ground: #E0D5CD;  --fallback-clay-fg: #6A4636;

  /* Typography: Yekan Bakh FaNum has 400, 600, 700, 800 only (no 900) */
  --font-family-base: "Yekan Bakh", Tahoma, sans-serif;
  --text-display: 800 28px/42px var(--font-family-base);
  --text-title-1: 800 22px/34px var(--font-family-base);
  --text-title-2: 800 18px/28px var(--font-family-base);
  --text-title-3: 700 15px/24px var(--font-family-base);
  --text-price-lg: 800 22px/32px var(--font-family-base);
  --text-price: 800 17px/26px var(--font-family-base);
  --text-body: 400 14px/26px var(--font-family-base);
  --text-input: 600 16px/24px var(--font-family-base); /* 16px stops iOS zoom on focus */
  --text-label: 700 13px/20px var(--font-family-base);
  --text-chip: 700 12px/20px var(--font-family-base);
  --text-caption: 600 11px/18px var(--font-family-base); /* smallest size in the app */

  /* Spacing (4px base) */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px;
  --page-gutter: 20px;
  --card-gap: 14px;

  /* Radius */
  --radius-field: 18px;
  --radius-photo: 22px;
  --radius-card: 24px;
  --radius-section: 28px;
  --radius-sheet: 32px;
  --radius-icon-tile: 16px;
  --radius-full: 999px;

  /* Shadow */
  --shadow-card: 0 10px 26px rgba(23, 43, 38, .06);
  --shadow-float: 0 14px 36px rgba(23, 43, 38, .16);
  --shadow-float-dark: 0 14px 36px rgba(23, 43, 38, .25);

  /* Size */
  --touch-min: 44px;
  --icon-btn: 46px;
  --chip-h: 38px;
  --field-h: 52px;
  --button-h: 56px;
  --nav-h: 70px;
  --icon-sm: 16px; --icon-md: 20px; --icon-lg: 24px; --icon-tile: 34px;
  --icon-stroke: 1.8;

  /* Magazine look (approved 2026-11-24, step 2.1 addendum): photo-led cards, glass controls on photos */
  --text-hero: 800 30px/44px var(--font-family-base);       /* white title on the home photo */
  --text-page-xl: 800 28px/42px var(--font-family-base);    /* results title, tab titles */
  --text-hero-sm: 800 26px/38px var(--font-family-base);    /* title on small photo headers */
  --text-price-xl: 800 26px/36px var(--font-family-base);   /* price on the listing card */
  --text-num-xl: 800 23px/34px var(--font-family-base);     /* big numbers on the detail page */
  --color-on-photo-muted: #D5E6DF;                          /* secondary text on the dark photo scrim */
  --color-on-green-muted: #BFD9CE;                          /* labels on the green price bar */
  --color-primary-tint: #E3EEE9;                            /* price-per-metre chip, feature chips */
  --glass-bg: rgba(255, 255, 255, .18);
  --glass-border: rgba(255, 255, 255, .30);
  --glass-blur: blur(14px);
  --glass-fallback: rgba(23, 43, 38, .50);                  /* when backdrop-filter is not supported */
  --photo-scrim: linear-gradient(180deg, rgba(8,28,22,.28) 0%, rgba(8,28,22,0) 28%, rgba(8,28,22,0) 42%, rgba(8,28,22,.88) 100%);
  --hero-shade: linear-gradient(180deg, rgba(8,28,22,.55) 0%, rgba(8,28,22,.15) 38%, rgba(12,52,42,.84) 100%);
  --radius-card-lg: 32px;     /* listing card */
  --radius-photo-lg: 26px;    /* photo inside the listing card */
  --radius-hero: 40px;        /* bottom corners of photo headers */
  --radius-bar: 30px;         /* floating price bar */
  --shadow-card-lg: 0 14px 34px rgba(23, 43, 38, .09);
  --shadow-bar: 0 18px 40px rgba(20, 90, 74, .35);
  --hero-h: 390px; --hero-sm-h: 250px; --detail-photo-h: 540px;
  --card-photo-h: 236px; --card-photo-h-sm: 200px;

  /* Motion (respect prefers-reduced-motion) */
  --motion-sheet: 220ms ease-out;
  --motion-fade: 200ms ease-out;
}

/* Breakpoints (min-width): md 600px, lg 1024px, xl 1400px. App column max-width 430px. */
