/* Pagetna design tokens. Source of truth: design-system/pagetna/MASTER.md.
   Scoped to .pg so customer-published websites never inherit them.
   Identity: midnight ink, Pagetna blue, a violet partner and one warm gold accent. */
@font-face { font-family: "Pagetna Display"; src: url("/assets/manrope-2b6d6e2e.woff2") format("woff2"), url("/assets/manrope-6f6d0ea0.ttf") format("truetype"); font-weight: 200 800; font-style: normal; font-display: swap; }
.pg {
  /* Brand */
  --pg-on-primary: #FFFFFF;
  --pg-brand: #245CFF; /* constant: glows and art stay blue on midnight surfaces, where --pg-primary lightens */
  --pg-violet: #6C4FF2;
  --pg-glow: #4060FF;
  --pg-halo: #AABEFF;
  --pg-gold: #F5B947;
  --pg-gold-ink: #8A5A00;
  --pg-cyan: #46D5F7;
  --pg-night: #070B1A;
  --pg-night-2: #0D1330;
  --pg-night-3: #141C44;
  --pg-night-line: rgb(170 185 255 / 0.14);
  --pg-night-line-strong: rgb(170 185 255 / 0.26);
  --pg-night-glass: rgb(13 19 48 / 0.72);
  --pg-band-bg: linear-gradient(var(--pg-night-line) 1px, transparent 1px) 0 0 / 100% 56px, linear-gradient(90deg, var(--pg-night-line) 1px, transparent 1px) 0 0 / 56px 100%, var(--pg-night);
  --pg-aurora: linear-gradient(110deg, #7FA2FF 0%, #A794FF 42%, #F5B947 100%);
  --pg-gradient: linear-gradient(135deg, #245CFF 0%, #4F56FF 48%, #6C4FF2 100%);
  --pg-gradient-start: linear-gradient(90deg, #245CFF 0%, #4F56FF 48%, #6C4FF2 100%); /* blue at the reading start */
  --pg-gradient-soft: radial-gradient(1200px 600px at 10% -10%, #E1E8FF 0%, transparent 60%), radial-gradient(900px 500px at 100% 0%, #EEE8FF 0%, transparent 55%);

  /* Status */
  --pg-success: #0F7A4D;
  --pg-success-soft: #E7F6EE;
  --pg-success-line: #B9E4CD;
  --pg-warning: #8A5300;
  --pg-warning-soft: #FFF4DB;
  --pg-warning-line: #F5D79A;
  --pg-danger: #C42121;
  --pg-danger-hover: #A31818;
  --pg-danger-soft: #FDECEC;
  --pg-danger-line: #F5C2C2;
  --pg-info: var(--pg-primary);
  --pg-info-soft: var(--pg-primary-soft);
  --pg-info-line: var(--pg-primary-line);

  /* Typography */
  --pg-font-display: "Pagetna Display", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --pg-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --pg-font-ar: Tajawal, "Noto Sans Arabic", Inter, Tahoma, Arial, sans-serif;
  --pg-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --pg-text-xs: 12px;
  --pg-text-sm: 13px;
  --pg-text-md: 14px;
  --pg-text-base: 16px;
  --pg-text-lg: 18px;
  --pg-text-xl: 20px;
  --pg-text-2xl: 24px;
  --pg-text-3xl: 30px;
  --pg-text-4xl: 36px;
  --pg-text-5xl: 48px;
  --pg-text-6xl: 60px;
  --pg-leading: 1.6;
  --pg-leading-tight: 1.2;
  --pg-leading-snug: 1.35;
  --pg-tracking-tight: -0.02em;
  --pg-tracking-display: -0.035em;
  --pg-weight-regular: 400;
  --pg-weight-medium: 500;
  --pg-weight-semibold: 600;
  --pg-weight-bold: 700;
  --pg-weight-extrabold: 800;

  /* Space (4px grid) */
  --pg-space-1: 4px;
  --pg-space-2: 8px;
  --pg-space-3: 12px;
  --pg-space-4: 16px;
  --pg-space-5: 20px;
  --pg-space-6: 24px;
  --pg-space-8: 32px;
  --pg-space-10: 40px;
  --pg-space-12: 48px;
  --pg-space-16: 64px;
  --pg-space-20: 80px;
  --pg-space-24: 96px;

  /* Radius */
  --pg-radius-xs: 6px;
  --pg-radius-sm: 10px;
  --pg-radius-md: 14px;
  --pg-radius-lg: 18px;
  --pg-radius-xl: 28px;
  --pg-radius-full: 999px;

  /* Elevation */
  --pg-shadow-xs: 0 1px 2px rgb(10 15 31 / 0.05);
  --pg-shadow-sm: 0 1px 2px rgb(10 15 31 / 0.04), 0 2px 8px rgb(10 15 31 / 0.05);
  --pg-shadow-md: 0 2px 4px rgb(10 15 31 / 0.04), 0 12px 32px rgb(18 32 84 / 0.10);
  --pg-shadow-lg: 0 4px 10px rgb(10 15 31 / 0.05), 0 32px 72px rgb(18 32 84 / 0.18);
  --pg-shadow-primary: 0 10px 28px rgb(36 92 255 / 0.34);
  --pg-shadow-glow: 0 0 0 1px rgb(36 92 255 / 0.10), 0 18px 48px rgb(36 92 255 / 0.16);
  --pg-ring: 0 0 0 4px rgb(36 92 255 / 0.18);
  --pg-ring-danger: 0 0 0 3px rgb(196 33 33 / 0.22);

  /* Motion */
  --pg-dur-fast: 140ms;
  --pg-dur: 220ms;
  --pg-dur-slow: 380ms;
  --pg-ease: cubic-bezier(.22, 1, .36, 1);
  --pg-ease-in: cubic-bezier(.4, 0, 1, 1);
  --pg-ease-out: cubic-bezier(.16, 1, .3, 1);
  --pg-ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --pg-dur-reveal: 800ms;

  /* Layout */
  --pg-container: 1200px;
  --pg-container-wide: 1240px;
  --pg-container-narrow: 720px;
  --pg-gutter: 24px;
  --pg-sidebar: 264px;
  --pg-topbar: 64px;
  --pg-site-header: 72px;
  --pg-control: 44px;
  --pg-control-sm: 36px;
  --pg-icon-sm: 16px;
  --pg-icon-md: 20px;
  --pg-icon-lg: 24px;

  /* Layers */
  --pg-z-sticky: 20;
  --pg-z-header: 30;
  --pg-z-dropdown: 40;
  --pg-z-toast: 60;
  --pg-z-dialog: 70;
}

/* Surface modes. The neutrals and the primary family live here so a midnight
   surface (.pg-night) can re-point them and a light island inside it (.pg-day,
   e.g. a product window) can restore them. Components keep their own rules. */
.pg, .pg .pg-day {
  --pg-primary: #245CFF;
  --pg-primary-hover: #1A47D1;
  --pg-primary-pressed: #153BB0;
  --pg-primary-soft: #EEF3FF;
  --pg-primary-soft-2: #DEE6FF;
  --pg-primary-line: #C4D2FF;

  /* Neutrals (slate) */
  --pg-ink: #0A0F1F;
  --pg-text: #1B2337;
  --pg-muted: #4A5571;
  --pg-subtle: #636E87;
  --pg-placeholder: #636E87;
  --pg-line: #E4E8F1;
  --pg-line-strong: #CBD3E3;
  --pg-bg: #F6F7FB;
  --pg-surface: #FFFFFF;
  --pg-surface-2: #F0F3F9;
  --pg-surface-3: #E7ECF5;
  --pg-inverse: #070B1A;
  --pg-on-inverse: #F5F7FF;
  --pg-on-inverse-muted: #AAB5D1;
  color-scheme: light;
}
.pg .pg-day { color: var(--pg-text); }
.pg .pg-night {
  --pg-primary: #9DB3FF;
  --pg-primary-hover: #C9D5FF;
  --pg-primary-pressed: #E3E9FF;
  --pg-primary-soft: rgb(94 124 255 / 0.18);
  --pg-primary-soft-2: rgb(94 124 255 / 0.28);
  --pg-primary-line: rgb(140 165 255 / 0.4);
  --pg-ink: #F5F7FF;
  --pg-text: #DDE3F6;
  --pg-muted: #B3BDD8;
  --pg-subtle: #8D99BC;
  --pg-placeholder: #8D99BC;
  --pg-line: var(--pg-night-line);
  --pg-line-strong: var(--pg-night-line-strong);
  --pg-bg: var(--pg-night);
  --pg-surface: rgb(255 255 255 / 0.05);
  --pg-surface-2: rgb(255 255 255 / 0.08);
  --pg-surface-3: rgb(255 255 255 / 0.12);
  color: var(--pg-text);
  color-scheme: dark;
}

@media (max-width: 767px) {
  .pg { --pg-gutter: 16px; }
}
html[dir=rtl] .pg { --pg-gradient-start: linear-gradient(270deg, #245CFF 0%, #4F56FF 48%, #6C4FF2 100%); --pg-aurora: linear-gradient(250deg, #7FA2FF 0%, #A794FF 42%, #F5B947 100%); --pg-font-display: var(--pg-font-ar); }
