/* Design tokens from quran-indo.pen, Design Foundation v1.1. Names match the Pencil variables and Flutter 1:1.
   Theme follows the app's Tema setting. Line heights are unitless ratios. */
.app {
  /* ── Fonts ── */
  --fontFamilyDisplay: "Fraunces", Georgia, serif;
  --fontFamilyBody: "Manrope", system-ui, sans-serif;
  --fontFamilyArabic: "Amiri", "Geeza Pro", serif;
  --fontFamilyMono: "JetBrains Mono", ui-monospace, monospace;
  --fontFamilyStatus: "Inter", system-ui, sans-serif; /* iOS status bar + system dialogs only */

  --fontWeightRegular: 400;
  --fontWeightMedium: 500;
  --fontWeightSemiBold: 600;
  --fontWeightBold: 700;
  --fontWeightExtraBold: 800;

  /* ── Font sizes ── */
  --fontSizeDisplayLarge: 40px;
  --fontSizeDisplaySmall: 28px;
  --fontSizeHeadlineSmall: 22px;
  --fontSizeTitleLarge: 19px;
  --fontSizeTitleMedium: 17px;
  --fontSizeTitleSmall: 15px;
  --fontSizeBodyMedium: 14px;
  --fontSizeBodySmall: 13px;
  --fontSizeLabelMedium: 12px;
  --fontSizeLabelSmall: 11px;
  --fontSizeLabelExtraSmall: 10px;
  --fontSizeArabicLarge: 28px;      /* reader default, resizable */
  --fontSizeArabicBody: 23px;
  --fontSizeArabicSmall: 22px;
  --fontSizeAyahMarker: 16px;
  --fontSizeTranslation: 14px;      /* reader default, resizable */
  --fontSizeTransliteration: 14px;  /* reader default, resizable */

  /* ── Line heights ── */
  --lineHeightDisplayLarge: 1.1;
  --lineHeightDisplaySmall: 1;
  --lineHeightHeadlineSmall: 1.27;
  --lineHeightTitleLarge: 1.26;
  --lineHeightTitleMedium: 1.29;
  --lineHeightTitleSmall: 1.33;
  --lineHeightBodyMedium: 1.43;
  --lineHeightBodySmall: 1.54;
  --lineHeightLabelMedium: 1.33;
  --lineHeightLabelSmall: 1.45;
  --lineHeightLabelExtraSmall: 1.4;
  --lineHeightReading: 1.6;         /* translation + transliteration */
  --lineHeightArabic: 1.9;          /* ayah text: room for harakat & waqf marks */
  --lineHeightArabicTight: 1.5;     /* Arabic labels, lists */

  /* ── Letter spacing ── */
  --letterSpacingDisplayLarge: -1px;
  --letterSpacingHeadlineSmall: -0.4px;
  --letterSpacingTight: -0.5px;
  --letterSpacingOverline: 0.9px;

  /* ── Spacing ── */
  --space2: 2px; --space4: 4px; --space8: 8px; --space12: 12px; --space16: 16px;
  --space20: 20px; --space24: 24px; --space32: 32px; --space40: 40px; --space48: 48px;

  /* ── Corner radius ── */
  --radius4: 4px; --radius8: 8px; --radius12: 12px; --radius16: 16px;
  --radius20: 20px; --radius28: 28px; --radiusFull: 999px;

  /* ── Brand · fixed (same in light & dark) ── */
  --brandEmerald: #0F4C3A;
  --primaryDeep: #0A3529;
  --brandGradientMid: #145C47;
  --brandGradientLight: #17654E;
  --brandGold: #D9A85A;
  --brandGoldLight: #E4BE7C;
  --brandGoldMid: #B98B3E;
  --brandGoldDeep: #7A5418;
  --onBrand: #FFFFFF;
  --onBrandAccent: #F3E7CF;

  /* ── Colour roles · light ── */
  --surface: #F6F1E7;
  --surfaceContainerLowest: #FFFDF8;
  --surfaceContainerLow: #F2ECE0;
  --surfaceContainer: #EFE9DD;
  --surfaceContainerHigh: #EBE4D6;
  --surfaceContainerHighest: #E7DFCF;
  --onSurface: #1C2420;
  --onSurfaceVariant: #5C6560;
  --outline: #687069;
  --outlineVariant: #E7DFCF;
  --primary: #0F4C3A;
  --onPrimary: #FFFFFF;
  --primaryContainer: #E2EBE3;
  --onPrimaryContainer: #0A3529;
  --secondary: #4F6359;
  --onSecondary: #FFFFFF;
  --secondaryContainer: #E3E7DA;
  --onSecondaryContainer: #0C1F17;
  --tertiary: #A17834;
  --onTertiary: #1A1204;
  --tertiaryContainer: #F3E7CF;
  --onTertiaryContainer: #7F5C22;
  --error: #B3261E;
  --onError: #FFFFFF;
  --errorContainer: #F9DEDC;
  --onErrorContainer: #410E0B;
  --inverseSurface: #1C2420;
  --onInverseSurface: #F6F1E7;
  --inversePrimary: #86CDAE;
  --inverseTertiary: #E4BE7C;
  --onInverseTertiary: #1C2420;
  --inverseError: #F2A38F;
  --scrim: #1C2420;
  --shadow: #0A3529;
  --surahBand: #0A3529;
  --onSurahBand: #F3E7CF;
  --surfaceTranslucent: #FFFDF8B3;
  --surfaceFrost: #F6F1E7B0;
  --surfaceFade0: #F6F1E700;
  --surfaceFade60: #F6F1E7E6;

  /* ── Elevation (AppShadows.level1–4; level 0 is a flat fill or 1px outlineVariant) ── */
  --elevation1: 0 8px 24px color-mix(in srgb, var(--shadow) 12%, transparent);  /* glass tab bar */
  --elevation2: 0 8px 24px color-mix(in srgb, var(--shadow) 24%, transparent);  /* toast, menu */
  --elevation3: 0 10px 28px color-mix(in srgb, var(--shadow) 25%, transparent); /* play FAB, mini player */
  --elevation4: 0 -8px 32px color-mix(in srgb, var(--shadow) 18%, transparent); /* bottom sheets */

  /* modal backdrops: scrim at the strength each theme needs */
  --backdrop: color-mix(in srgb, var(--scrim) 50%, transparent);
  --backdropLight: color-mix(in srgb, var(--scrim) 20%, transparent); /* 07.1: page at 0.8 over the dark sheet wrap */
}

.app[data-theme="dark"] {
  --surface: #111714;
  --surfaceContainerLowest: #18201C;
  --surfaceContainerLow: #1A221E;
  --surfaceContainer: #1E2622;
  --surfaceContainerHigh: #28302C;
  --surfaceContainerHighest: #333B37;
  --onSurface: #E6EAE6;
  --onSurfaceVariant: #B4BDB7;
  --outline: #8F9993;
  --outlineVariant: #2F3833;
  --primary: #86CDAE;
  --onPrimary: #00382A;
  --primaryContainer: #1F4D3F;
  --onPrimaryContainer: #CFEFE0;
  --secondary: #B3CCBF;
  --onSecondary: #1F352C;
  --secondaryContainer: #354B42;
  --onSecondaryContainer: #CFE9DB;
  --tertiary: #D9A85A;
  --onTertiary: #3F2C08;
  --tertiaryContainer: #3D3018;
  --onTertiaryContainer: #E8C98E;
  --error: #F2B8B5;
  --onError: #601410;
  --errorContainer: #8C1D18;
  --onErrorContainer: #F9DEDC;
  --inverseSurface: #E6EAE6;
  --onInverseSurface: #1C2420;
  --inversePrimary: #0F4C3A;
  --inverseTertiary: #7F5C22;
  --onInverseTertiary: #F6F1E7;
  --inverseError: #B3412E;
  --scrim: #000000;
  --shadow: #000000;
  --surahBand: #1F4D3F;
  --onSurahBand: #F3E7CF;
  --surfaceTranslucent: #18201CB3;
  --surfaceFrost: #111714B0;
  --surfaceFade0: #11171400;
  --surfaceFade60: #111714E6;
  --backdrop: color-mix(in srgb, var(--scrim) 63%, transparent);
  --backdropLight: color-mix(in srgb, var(--scrim) 35%, transparent);
  color-scheme: dark;
}
