/* Al Akram Import Export — public site styles
   Brand palette:
   --navy: #1C2E4A (60–70%)
   --teal: #129996 (10–15%)
   --offwhite: #F7F8FA
   --lightgray: #E8E9EB
   --midgray: #9AA0A6
   --darkgray: #4A4A4A
   --charcoal: #2D2D2D
   --gold: #C9A84C (3–5%)

   Typography:
   Headings: Fraunces (editorial serif, distinctive, professional)
   Body:     Inter Tight (geometric sans, mirrors Montserrat)
   Arabic:   Cairo
*/

:root {
  --navy: #1C2E4A;
  --navy-700: #243a5e;
  --navy-900: #122036;
  --teal: #129996;
  --teal-600: #0e7c79;
  --teal-200: #b3dcdb;
  --teal-50: #e6f3f3;
  --offwhite: #F7F8FA;
  --lightgray: #E8E9EB;
  --midgray: #9AA0A6;
  --darkgray: #4A4A4A;
  --charcoal: #2D2D2D;
  --gold: #C9A84C;

  --bg: #F7F8FA;
  --bg-elevated: #ffffff;
  --text: #14202e;
  --text-muted: #5a6678;
  --text-faint: #8a93a3;
  --border: #e2e6ec;
  --border-strong: #cfd4dc;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(20, 32, 46, 0.06), 0 1px 3px rgba(20, 32, 46, 0.04);
  --shadow: 0 4px 16px rgba(20, 32, 46, 0.08), 0 2px 6px rgba(20, 32, 46, 0.04);
  --shadow-lg: 0 18px 40px rgba(20, 32, 46, 0.12);

  --container: 1240px;
  --space-section: clamp(64px, 8vw, 112px);
  --space-content: clamp(28px, 4vw, 56px);

  --font-sans: "Inter Tight", "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-ar: "Cairo", "Tajawal", var(--font-sans);

  /* Admin-controlled typography — overridden by JS via :root inline style.
     These are the values i18n.js sets when settings change. */
  --ak-body-font: var(--font-sans);
  --ak-heading-font: var(--font-display);
  --ak-body-size: 17px;
  --ak-link-color: #129996;
  --ak-accent-color: #C9A84C;

  --transition: 180ms cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--ak-body-font);
  font-size: var(--ak-body-size);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[lang="ar"] body {
  font-family: var(--font-ar);
}

a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal-600); }

img { max-width: 100%; display: block; }

button { font: inherit; cursor: pointer; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: var(--space-section) 0; }
.section-tight { padding: calc(var(--space-section) * 0.6) 0; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

h1, h2, h3, h4 { font-family: var(--ak-heading-font); font-weight: 600; color: inherit; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.05; letter-spacing: -0.02em; font-weight: 500; }
h2 { font-size: clamp(1.85rem, 3.2vw, 2.8rem); line-height: 1.1; font-weight: 500; }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; }

html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 { font-family: var(--font-ar); font-weight: 700; }

.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.55;
}

p { margin: 0 0 1em; }

/* ---- Header / Nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Override these from admin → branding. Defaults match the footer. */
  background: var(--ak-header-bg, #0d1a30);
  color: var(--ak-header-text, #F7F8FA);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.brand-mark {
  width: var(--ak-logo-size, 44px);
  height: var(--ak-logo-size, 44px);
  flex: 0 0 var(--ak-logo-size, 44px);
  border-radius: calc(var(--ak-logo-size, 44px) * 0.22);
  background: var(--navy);
  color: var(--offwhite);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.brand-mark svg { width: 28px; height: 28px; }
.brand-mark.has-image { background: #fff; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; padding: 4px; box-sizing: border-box; }
.brand-mark::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: var(--teal);
}
.brand-mark.has-image::after { display: none; }
.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-family: var(--font-sans);
}
.brand-name .b-top { font-weight: 700; letter-spacing: 0.18em; font-size: 14px; color: inherit; }
.brand-name .b-bottom { font-size: 9px; letter-spacing: 0.32em; color: rgba(247,248,250,.55); font-weight: 500; margin-top: 3px; }

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav a {
  display: inline-block;
  padding: 8px 14px;
  font-weight: 500;
  font-size: 15px;
  color: rgba(247,248,250,.78);
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.is-active { color: var(--teal-200); }

.header-actions { display: inline-flex; align-items: center; gap: 10px; }
.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lang-switch button {
  background: transparent;
  border: 0;
  padding: 6px 12px;
  color: rgba(247,248,250,.6);
  transition: background var(--transition), color var(--transition);
}
.lang-switch button.is-active {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.18);
  background: transparent;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  color: #fff;
}

@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: var(--ak-header-bg, #0d1a30); flex-direction: column; align-items: stretch; padding: 16px 24px 24px; border-bottom: 1px solid rgba(255,255,255,.12); box-shadow: 0 14px 24px rgba(0,0,0,.18); }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 12px; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,.10); color: rgba(247,248,250,.92); }
  .nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
  .nav a.is-active { color: var(--teal-200); background: rgba(255,255,255,.04); }
  .nav a:last-child { border-bottom: 0; }
  .nav-toggle { display: inline-flex; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-600); color: #fff; }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--offwhite); }
.btn-ghost-light { background: transparent; color: var(--offwhite); border-color: rgba(247,248,250,.4); }
.btn-ghost-light:hover { background: rgba(247,248,250,.1); color: var(--offwhite); }
.btn-sm { padding: 9px 14px; font-size: 13px; }
.btn-arrow::after { content: "→"; transition: transform var(--transition); }
.btn-arrow:hover::after { transform: translateX(3px); }
html[lang="ar"] .btn-arrow::after { content: "←"; }
html[lang="ar"] .btn-arrow:hover::after { transform: translateX(-3px); }

/* ---- Hero ---- */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--offwhite);
  overflow: hidden;
  padding: clamp(80px, 10vw, 140px) 0 clamp(80px, 10vw, 120px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 50% at 75% 30%, rgba(18,153,150,.22), transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(201,168,76,.10), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(247,248,250,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247,248,250,.045) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 {
  color: var(--offwhite);
  margin-top: 22px;
  font-weight: 400;
}
.hero h1 strong { font-weight: 600; color: #fff; font-style: italic; font-family: var(--font-display); }
.hero p.lead { color: rgba(247,248,250,.78); margin: 26px 0 36px; max-width: 56ch; }

.hero-ctas { display: inline-flex; gap: 12px; flex-wrap: wrap; }

.hero-meta {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(247,248,250,.12);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
@media (max-width: 720px) { .hero-meta { grid-template-columns: repeat(2, 1fr); } }
.hero-meta .label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(247,248,250,.55); margin-bottom: 8px; }
.hero-meta .value { font-family: var(--font-display); font-size: 1.4rem; color: #fff; font-weight: 500; }

.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,.35);
  background: linear-gradient(135deg, #1a3057 0%, #0c1a32 100%);
}
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(18,153,150,.32), transparent 55%),
    radial-gradient(circle at 75% 70%, rgba(201,168,76,.18), transparent 60%);
}
.hero-visual .badge {
  position: absolute;
  z-index: 2;
  bottom: 22px;
  left: 22px;
  right: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(247,248,250,.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(247,248,250,.18);
}
.hero-visual .badge .label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(247,248,250,.7); }
.hero-visual .badge .value { font-family: var(--font-display); font-size: 1.05rem; color: #fff; }

/* Hero showcase image — fills the right-side hero panel. Sits behind the
   floating badge (badge has its own position: absolute rules). */
.hero-visual .hero-showcase {
  position: absolute;
  inset: 0;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  z-index: 1;
  border-radius: var(--radius-lg);
}
.hero-visual .hero-showcase::after {
  /* subtle darkening so the badge text remains legible even on bright photos */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12,26,50,0) 30%, rgba(12,26,50,.55) 100%),
    radial-gradient(ellipse 60% 40% at 50% 50%, transparent 50%, rgba(12,26,50,.25) 100%);
  border-radius: var(--radius-lg);
  pointer-events: none;
}
.hero-visual > .badge { z-index: 2; }

/* ---- Section heading ---- */
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 { margin: 12px 0 0; }
.section-head .lead { margin: 0; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; gap: 16px; } }

/* ---- Pillars ---- */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pillar { background: var(--bg-elevated); padding: 36px 28px; }
.pillar .num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.pillar .num::after { content: ""; width: 28px; height: 1px; background: var(--teal); }
.pillar h3 { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 600; color: var(--navy); margin-bottom: 12px; }
.pillar p { color: var(--text-muted); font-size: 0.96rem; margin: 0; line-height: 1.55; }
@media (max-width: 920px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .pillars { grid-template-columns: 1fr; } }

/* ---- Product grid ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 920px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .product-grid { grid-template-columns: 1fr; } }

.product-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.product-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.product-card .image {
  aspect-ratio: 4/3;
  background-color: var(--bg-elevated);
  background-image: linear-gradient(135deg, var(--navy) 0%, var(--navy-900) 100%);
  position: relative;
  overflow: hidden;
}
/* When an image is present, render it cleanly (no overlays, no initial letter).
   The JS sets an inline background-image style on the element when hero_image
   exists. The "[style*=background-image]" attribute selector picks it up. */
.product-card .image[style*="background-image"] {
  background-image: none;
  background-color: var(--bg-elevated);
}
.product-card .image::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 35%, rgba(18,153,150,.5), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(201,168,76,.25), transparent 50%);
}
.product-card .image[style*="background-image"]::before { display: none; }
.product-card .image::after {
  content: attr(data-initial);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(247,248,250,.92);
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  font-style: italic;
}
.product-card .image[style*="background-image"]::after { display: none; }
.product-card .body { padding: 24px 24px 26px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.product-card .category {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
}
.product-card h3 {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}
.product-card p { color: var(--text-muted); font-size: 0.96rem; line-height: 1.55; margin: 0; flex: 1; }
.product-card .card-cta { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; color: var(--teal); font-weight: 600; font-size: 14px; }
.product-card .card-cta::after { content: "→"; transition: transform var(--transition); }
.product-card:hover .card-cta::after { transform: translateX(3px); }
html[lang="ar"] .product-card .card-cta::after { content: "←"; }

/* ---- CTA banner ---- */
.cta-banner {
  position: relative;
  background: var(--navy);
  color: var(--offwhite);
  padding: clamp(56px, 7vw, 96px) 0;
  overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 70% at 80% 50%, rgba(18,153,150,.22), transparent 60%);
}
.cta-banner .container { position: relative; z-index: 1; }
.cta-banner-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px) { .cta-banner-inner { grid-template-columns: 1fr; gap: 28px; } }
.cta-banner h2 { color: #fff; margin: 0 0 14px; }
.cta-banner p { color: rgba(247,248,250,.78); margin: 0; font-size: 1.05rem; max-width: 50ch; }

/* ---- Footer ---- */
.site-footer {
  background: var(--ak-footer-bg, #0d1a30);
  color: var(--ak-footer-text, rgba(247,248,250,0.7));
  padding: 64px 0 28px;
}
.site-footer .grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 860px) { .site-footer .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .site-footer .grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; letter-spacing: 0.02em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: rgba(247,248,250,.7); font-size: 0.95rem; }
.site-footer a:hover { color: var(--teal-200); }
.site-footer .brand { color: #fff; }
.site-footer .brand .b-bottom { color: rgba(247,248,250,.5); }
.site-footer .legal {
  border-top: 1px solid rgba(247,248,250,.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}

/* Social / contact links — a row of pill-shaped chips with brand-correct
   icons. The icons are inline SVGs from lib/social-platforms.js, sized
   to 20px so they sit visually balanced with the surrounding text. */
.footer-social h4 { margin-top: 0; }
.social-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(247, 248, 250, 0.16);
  border-radius: 999px;
  background: rgba(247, 248, 250, 0.04);
  color: rgba(247, 248, 250, 0.86);
  text-decoration: none;
  font-size: 13px;
  line-height: 1;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.social-link:hover,
.social-link:focus-visible {
  background: rgba(247, 248, 250, 0.12);
  border-color: rgba(247, 248, 250, 0.32);
  color: #ffffff;
  transform: translateY(-1px);
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: currentColor;
}
.social-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}
/* Hide the label on small screens to keep the footer tidy — the title
   attribute is still present for tooltips + a11y. */
@media (max-width: 720px) {
  .social-name { display: none; }
  .social-link { padding: 8px; }
}

/* ---- Page header (inner pages) ---- */
/* Admin-editable background — per-page overrides come from CSS vars set
   by i18n.js from page_content rows. Defaults fall back to the project
   design tokens (navy bg, no image, no overlay, offwhite text). Image
   and overlay are layered so the grid mask stays on top for texture. */
.page-header {
  --ph-bg: var(--ak-page-header-bg, var(--navy));
  --ph-bg-image: var(--ak-page-header-bg-image, none);
  --ph-overlay: var(--ak-page-header-overlay, 0);
  --ph-text: var(--ak-page-header-text, var(--offwhite));
  background-color: var(--ph-bg);
  background-image: var(--ph-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--ph-text);
  padding: clamp(80px, 10vw, 120px) 0 clamp(56px, 7vw, 80px);
  position: relative;
  overflow: hidden;
}
/* Dark overlay when a background image is set, so text stays readable. The
   overlay opacity is admin-controlled via --ph-overlay (0 = none, 1 = fully
   opaque dark tint). */
.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--navy);
  opacity: var(--ph-overlay);
  pointer-events: none;
  z-index: 0;
}
/* Editorial grid mask — always on for visual texture. */
.page-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(247,248,250,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247,248,250,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}
.page-header .container { position: relative; z-index: 1; }
.page-header h1 { color: var(--ph-text); font-weight: 400; max-width: 22ch; }
.page-header p { color: color-mix(in srgb, var(--ph-text) 78%, transparent); max-width: 60ch; margin-top: 20px; font-size: 1.1rem; }
.page-header .eyebrow { color: var(--ak-accent-color, #C9A84C); }

/* ---- Product detail ---- */
.product-detail { padding: 0 0 var(--space-section); }
.product-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
  padding-top: clamp(48px, 6vw, 80px);
}
@media (max-width: 920px) { .product-hero { grid-template-columns: 1fr; } }

.product-gallery {
  display: grid;
  gap: 14px;
}
.product-gallery .hero-img {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--navy-900);
  background-image: linear-gradient(135deg, var(--navy) 0%, var(--navy-900) 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}
.product-gallery .hero-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 35%, rgba(18,153,150,.42), transparent 55%),
              radial-gradient(circle at 75% 70%, rgba(201,168,76,.22), transparent 50%);
  pointer-events: none;
}
.product-gallery .hero-img[style*="background-image"]::before { display: none; }
.product-gallery .hero-img .label {
  position: absolute;
  bottom: 22px;
  left: 22px;
  font-family: var(--font-display);
  font-style: italic;
  color: rgba(247,248,250,.85);
  font-size: 1.6rem;
}
.product-gallery .thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.product-gallery .thumb {
  aspect-ratio: 1;
  background-color: var(--bg-elevated);
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.product-gallery .thumb:hover {
  border-color: var(--teal-200);
  transform: translateY(-2px);
}
.product-gallery .thumb.is-active {
  border-color: var(--teal);
  box-shadow: 0 4px 14px rgba(18, 153, 150, 0.18);
}
.product-gallery .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,32,46,0) 60%, rgba(20,32,46,.35));
  opacity: 0;
  transition: opacity var(--transition);
}
.product-gallery .thumb:hover::after { opacity: 1; }
.product-gallery .thumb.is-active::after { opacity: 0; }

/* ---- Hero slider (homepage rotating banner) ---- */
.hero-slider {
  position: relative;
  min-height: clamp(540px, 80vh, 760px);
  padding: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide.is-active > .container { position: relative; z-index: 1; }
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(12,26,50,.85) 0%, rgba(12,26,50,.55) 50%, rgba(12,26,50,.30) 100%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(201,168,76,.10), transparent 70%);
  pointer-events: none;
}
.hero-slide .container { width: 100%; }
.hero-slide .hero-grid { position: relative; z-index: 1; }

/* Slide-in animation when becoming active */
.hero-slide.is-active .fade-in { animation: fadeUp .8s cubic-bezier(.2,.7,.2,1) both; }
.hero-slide.is-active .fade-in.d2 { animation-delay: .15s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Slider controls */
.hero-slider-controls {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 10px;
  z-index: 3;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(247,248,250,.35);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.hero-dot:hover { background: rgba(247,248,250,.6); transform: scale(1.15); }
.hero-dot.is-active { background: var(--teal); transform: scale(1.25); }

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(12,26,50,.55);
  border: 1px solid rgba(247,248,250,.22);
  color: rgba(247,248,250,.92);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background var(--transition), transform var(--transition);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.hero-arrow:hover { background: rgba(18,153,150,.85); transform: translateY(-50%) scale(1.06); }
.hero-arrow-prev { left: 24px; }
.hero-arrow-next { right: 24px; }
html[lang="ar"] .hero-arrow-prev { left: auto; right: 24px; }
html[lang="ar"] .hero-arrow-next { right: auto; left: 24px; }

@media (max-width: 720px) {
  .hero-slider { min-height: 560px; }
  .hero-arrow { width: 36px; height: 36px; font-size: 22px; }
  .hero-arrow-prev { left: 12px; }
  .hero-arrow-next { right: 12px; }
  html[lang="ar"] .hero-arrow-prev { right: 12px; }
  html[lang="ar"] .hero-arrow-next { left: 12px; }
}

.product-body .breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; display: flex; gap: 8px; }
.product-body .breadcrumb a { color: var(--text-muted); }
.product-body .breadcrumb a:hover { color: var(--teal); }
.product-body h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 18px; font-weight: 500; }
.product-body .short { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 24px; }
.product-body .quick-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 24px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); margin: 28px 0; }
.product-body .quick-specs .qs { display: flex; flex-direction: column; gap: 4px; }
.product-body .quick-specs .qs .label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; }
.product-body .quick-specs .qs .value { font-size: 0.98rem; color: var(--navy); font-weight: 500; }

.specs-block { margin-top: clamp(56px, 7vw, 96px); }
.specs-block h2 { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.specs-block h2::before { content: ""; width: 28px; height: 2px; background: var(--teal); }

/* ---- FAQ section (rendered on every public page above the footer) ---- */
.ak-faqs { background: var(--bg); border-top: 1px solid var(--border); }
.ak-faqs .ak-faqs-head { max-width: 720px; margin: 0 auto clamp(28px, 4vw, 56px); text-align: center; }
.ak-faqs .ak-faqs-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 12px 0 16px; }
.ak-faqs .ak-faqs-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ak-faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.ak-faq-item:hover { border-color: var(--teal-200); }
.ak-faq-item[open] { border-color: var(--teal); box-shadow: 0 6px 20px rgba(18, 153, 150, 0.06); }
.ak-faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-weight: 500;
  font-size: 1rem;
  color: var(--navy);
}
.ak-faq-item > summary::-webkit-details-marker { display: none; }
.ak-faq-item > summary::marker { content: ''; }
.ak-faq-item .ak-faq-q { flex: 1; line-height: 1.4; }
.ak-faq-item .ak-faq-toggle {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--teal-50);
  display: inline-flex;
  align-items: center; justify-content: center;
  flex: 0 0 auto;
  position: relative;
  transition: background var(--transition), transform var(--transition);
}
.ak-faq-item .ak-faq-toggle::before,
.ak-faq-item .ak-faq-toggle::after {
  content: "";
  position: absolute;
  background: var(--teal);
  border-radius: 1px;
}
.ak-faq-item .ak-faq-toggle::before { width: 12px; height: 2px; }
.ak-faq-item .ak-faq-toggle::after { width: 2px; height: 12px; transition: transform var(--transition); }
.ak-faq-item[open] .ak-faq-toggle::after { transform: rotate(90deg); }
.ak-faq-item .ak-faq-a {
  padding: 0 22px 20px;
  color: var(--text);
  font-size: 0.97rem;
  line-height: 1.65;
  white-space: pre-wrap;
}
@media (max-width: 600px) {
  .ak-faq-item > summary { padding: 14px 16px; font-size: 0.95rem; }
  .ak-faq-item .ak-faq-a { padding: 0 16px 16px; font-size: 0.92rem; }
}
.specs-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
}
.specs-table .row { display: grid; grid-template-columns: 220px 1fr; border-bottom: 1px solid var(--border); }
.specs-table .row:last-child { border-bottom: 0; }
.specs-table .row > div { padding: 18px 24px; }
.specs-table .row .k { background: var(--offwhite); font-weight: 600; color: var(--navy); font-size: 0.95rem; }
.specs-table .row .v { color: var(--text); font-size: 0.98rem; line-height: 1.55; }
@media (max-width: 640px) {
  .specs-table .row { grid-template-columns: 1fr; }
  .specs-table .row > div { padding: 14px 20px; }
  .specs-table .row .k { padding-bottom: 6px; }
}

.routing-block { margin-top: clamp(48px, 5vw, 72px); }
.routing-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.routing-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--teal-50);
  color: var(--teal);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.routing-card h3 { font-family: var(--font-sans); color: var(--navy); margin-bottom: 8px; font-weight: 600; }
.routing-card p { margin: 0; color: var(--text-muted); line-height: 1.55; }

.video-block { margin-top: clamp(48px, 5vw, 72px); }
.video-frame {
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  position: relative;
}
.video-frame video, .video-frame iframe { display: block; }

/* ---- Forms ---- */
.form-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(32px, 5vw, 56px);
  box-shadow: var(--shadow-sm);
}
.form-card h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: 8px; }
.form-card .lead { margin-bottom: 32px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: var(--navy); letter-spacing: 0.01em; }
.field input, .field select, .field textarea {
  font: inherit;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--offwhite);
  color: var(--text);
  transition: border-color var(--transition), background var(--transition);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px var(--teal-50);
}
.field textarea { min-height: 130px; resize: vertical; }

.form-actions { margin-top: 28px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-status { font-size: 14px; padding: 10px 14px; border-radius: 8px; }
.form-status.ok { background: var(--teal-50); color: var(--teal-600); }
.form-status.err { background: #fde8e8; color: #b03030; }

/* ---- Contact split ---- */
.contact-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
@media (max-width: 920px) { .contact-split { grid-template-columns: 1fr; } }
.contact-info-card {
  background: var(--navy);
  color: var(--offwhite);
  border-radius: var(--radius);
  padding: clamp(32px, 4vw, 48px);
  position: relative;
  overflow: hidden;
}
.contact-info-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(18,153,150,.22), transparent 50%);
  pointer-events: none;
}
.contact-info-card > * { position: relative; z-index: 1; }
.contact-info-card h2 { color: #fff; }
.contact-info-card .row { display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid rgba(247,248,250,.1); }
.contact-info-card .row:last-of-type { border-bottom: 1px solid rgba(247,248,250,.1); }
.contact-info-card .row .k { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(247,248,250,.6); width: 38%; }
.contact-info-card .row .v { font-size: 1rem; color: #fff; flex: 1; }
.contact-info-card a { color: var(--teal-200); }

/* ---- About ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.about-values { display: grid; gap: 16px; margin-top: 24px; }
.about-values .v-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 18px;
  padding: 18px 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: center;
}
.about-values .v-row .num {
  font-family: var(--font-mono);
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.about-values .v-row h4 { font-family: var(--font-sans); margin: 0 0 4px; }
.about-values .v-row p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(247,248,250,.12);
  border: 1px solid rgba(247,248,250,.12);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 36px;
}
.stats-row .stat { background: var(--navy); padding: 28px 22px; text-align: left; }
.stats-row .stat .v { font-family: var(--font-display); font-size: 2.2rem; color: var(--teal-200); font-weight: 500; }
.stats-row .stat .l { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(247,248,250,.65); margin-top: 8px; }
@media (max-width: 720px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

/* ---- Certificates section (About page) ---- */
/* Editorial wall: a horizontal row on desktop, stacking to a single column on
   mobile. Each card holds the uploaded certificate image inside a thin gold
   border + soft shadow, with name / issuer / dates below. The frame is
   intentionally tall enough (4:3 aspect) to accommodate both landscape and
   portrait certificates with object-fit: contain so nothing is cropped. */
.cert-section {
  margin-top: clamp(56px, 7vw, 88px);
  padding-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--border);
}
.cert-section-head {
  max-width: 720px;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 36px);
}
@media (max-width: 880px) {
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cert-grid { grid-template-columns: 1fr; }
}
.cert-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease;
}
.cert-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(13, 26, 48, 0.10);
}
.cert-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(180deg, #f7f8fa 0%, #eef0f4 100%);
  display: grid;
  place-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}
.cert-frame img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
/* PDF certificates — multi-page documents render in a scrollable iframe.
   The browser's native PDF viewer keeps its own scrollbar inside the
   frame, so a 10-page certificate just gets a tall scrollable surface
   inside the same 4:3 card the image certs use. The white inner background
   keeps the visual parity with the gradient on `.cert-frame`. */
.cert-frame.is-pdf {
  padding: 0;
  background: #ffffff;
}
.cert-pdf-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #ffffff;
}
/* Smaller PDF glyph shown in the admin list thumbnail — keeps the row
   visually distinct from image certificates without trying to render an
   unreadable iframe at 80×56 px. */
.cert-thumb-pdf {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}
.cert-thumb-pdf-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.cert-frame.cert-failed::after {
  content: 'Image unavailable';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(247,248,250,0.85);
}
.cert-meta {
  padding: 16px 18px 18px;
  text-align: left;
}
.cert-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--navy);
  line-height: 1.35;
}
.cert-issuer {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.cert-dates {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}
[dir="rtl"] .cert-meta { text-align: right; }

/* ---- Utilities ---- */
.center { text-align: center; }
.mt-8 { margin-top: 64px; }
.divider { height: 1px; background: var(--border); margin: 32px 0; }

/* ---- Fade-in animation ---- */
.fade-in { animation: fadeUp .6s ease-out both; }
.fade-in.d2 { animation-delay: .2s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Toast / banner for forms ---- */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--navy);
  color: #fff;
  padding: 16px 22px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-width: 360px;
  animation: toastIn .3s ease-out both;
}
.toast.ok { border-left: 4px solid var(--teal); }
.toast.err { border-left: 4px solid #c14545; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   Mobile hardening
   ---------------------------------------------------------------------
   The layout above already collapses its grids at 860/720/600/560px.
   This block adds the cross-cutting guarantees that keep the public site
   usable on real phones:

     1. No sideways scrolling of the page itself. Wide children scroll
        inside their own container instead.
     2. Correct dynamic-viewport height (iOS Safari's collapsing URL bar
        makes `100vh` taller than the visible area).
     3. Comfortable tap targets and no iOS zoom-on-focus (inputs under
        16px make Safari zoom the whole viewport on focus).
     4. Honour the OS "reduce motion" accessibility setting.

   Placed last so these rules win over the earlier breakpoint blocks
   without needing to edit each one.
   ===================================================================== */

/* 1 — Global overflow guard. `overflow-x: clip` (not `hidden`) avoids
   creating a scroll container, which would break `position: sticky`
   on the header. `hidden` is kept as a fallback for older engines. */
html { overflow-x: hidden; }
@supports (overflow-x: clip) { html { overflow-x: clip; } }
body { max-width: 100%; overflow-x: hidden; }

/* Media must never exceed its column. `max-width:100%` + `height:auto`
   keeps aspect ratio on every image and embedded video. */
img, video, iframe, svg, canvas { max-width: 100%; }
img, video { height: auto; }

/* 2 — Dynamic viewport height for full-bleed sections. */
@media (max-width: 860px) {
  .site-header .inner { height: 64px; }
  /* The dropdown nav is positioned against the 76px header constant above;
     keep them in sync or the menu overlaps the brand row. */
  .nav { top: 64px; }

  /* The header CTA is dropped here on purpose. Brand + language switch +
     CTA + hamburger together exceed a phone's width, and because the page
     clips horizontal overflow the hamburger — the only way to reach the
     nav at all — gets pushed off-screen and becomes unreachable. "Contact"
     is already the last item in the dropdown menu, so nothing is lost. */
  .header-actions .btn { display: none; }

  /* Stop the two-line brand lockup from wrapping into the header row. */
  .brand { min-width: 0; }
  .brand-name { white-space: nowrap; }

  /* Hero art can get tall on narrow screens — cap it so the headline
     and primary CTA stay above the fold. */
  .hero { padding: clamp(56px, 12vw, 80px) 0 clamp(56px, 10vw, 80px); }
}

/* Very narrow phones: shrink the brand lockup and keep the language switch
   from crowding the hamburger. */
@media (max-width: 400px) {
  .brand-mark { --ak-logo-size: 36px; width: 36px; height: 36px; flex-basis: 36px; }
  .brand-name .b-top { font-size: 12px; }
  .brand-name .b-bottom { font-size: 7px; letter-spacing: 0.24em; }
  .lang-switch button { padding: 6px 9px; }
}

/* 3 — Touch ergonomics. */
@media (hover: none) and (pointer: coarse) {
  /* 44px is the accepted minimum comfortable touch target. */
  .nav a { padding: 15px 12px; }
  .btn { min-height: 46px; padding: 14px 22px; }
  .btn-sm { min-height: 40px; }
  .nav-toggle { width: 44px; height: 44px; }
}

/* Stack button groups and widen them on the narrowest phones. */
@media (max-width: 560px) {
  .btn { width: 100%; justify-content: center; }
  /* Inline buttons sitting in a horizontal group keep their natural width —
     stretching them breaks the row. */
  .header-actions .btn, .row .btn, .actions .btn, td .btn { width: auto; }
  /* Toasts span the viewport minus a gutter instead of hanging off the
     right edge where they can be clipped. */
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }

  /* Inputs at 16px+ stop iOS Safari zooming the page on focus. */
  input, select, textarea, .field input, .field select, .field textarea {
    font-size: 16px;
  }
}

/* 4 — Respect the user's motion preference. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover { transform: none; }
}
