/* Waddi website. LIGHT THEME ONLY (owner decision 2026-11-08): no dark mode, no dark sections.
   Tokens: #FAFBFB background, #FFFFFF surfaces, #0E1416 text, #0D6E65 platform accent (6.1:1 on white),
   #E4E9E8 borders; app identity colours Captain #EA580C, Business #1D4ED8, OM #2CCFBE (decorative only).
   Typeface: Cairo (OFL), the apps' UI font, self-hosted. The WADDi logo is inline SVG (src/brand/logo.json). */

@font-face {
  font-family: "Cairo";
  src: url("/assets/fonts/cairo-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cairo";
  src: url("/assets/fonts/cairo-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cairo";
  src: url("/assets/fonts/cairo-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fafbfb;
  --surface: #ffffff;
  --surface-sunk: #f2f5f5;
  --ink: #0e1416;
  --muted: #4a5457;
  --line: #e4e9e8;
  --line-strong: #d3d8d9;
  --accent: #0d6e65;
  --accent-hover: #0a5751;
  --accent-soft: #e6f2f0;
  --on-accent: #ffffff;
  --logo-ink: #0e1416;
  --logo-dot: #0d6e65;
  --app-business: #1d4ed8;
  --app-captain: #ea580c;
  --app-om: #2ccfbe;
  --mark-bg: #fff4d6;
  --mark-ink: #7a4a00;
  --mark-line: #e3a23b;
  --focus: #0d6e65;
  --radius-lg: 1.5rem;
  --radius: 1rem;
  --radius-sm: 0.625rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 4.25rem;
  --font: "Cairo", "Segoe UI", Tahoma, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.75;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body {
  line-height: 1.9;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 0.375rem;
}

main:focus {
  outline: none;
}

h1,
h2,
h3 {
  font-weight: 700;
  color: var(--ink);
}

html[lang="en"] h1,
html[lang="en"] h2 {
  letter-spacing: -0.01em;
}

p,
ul,
ol {
  margin: 0 0 1.1em;
}

ul,
ol {
  padding-inline-start: 1.4rem;
}

li + li {
  margin-top: 0.4rem;
}

li::marker {
  color: var(--accent);
}

strong {
  font-weight: 700;
}

/* Official app names (Waddi Captain / Business / OM) are direction-isolated inside Arabic text. Where there
   is room they also never break across lines; on very narrow screens with large text they may wrap rather
   than overflow. */
.app-name {
  unicode-bidi: isolate;
}

@media (min-width: 20rem) {
  .app-name,
  html[dir="ltr"] bdi[lang="ar"] {
    white-space: nowrap;
  }
}

.skip-link {
  position: absolute;
  inset-inline-start: 0.75rem;
  top: -10rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--surface);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: 0.75rem;
}

/* Draft indicators (local review only; the production build refuses unresolved content). */

.draft-banner {
  background: var(--mark-bg);
  color: var(--mark-ink);
  border-bottom: 1px solid var(--mark-line);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
  padding: 0.5rem var(--gutter);
}

.draft-banner p {
  margin: 0;
}

mark.unresolved {
  background: var(--mark-bg);
  color: var(--mark-ink);
  box-shadow: inset 0 -1px 0 var(--mark-line);
  border-radius: 0.25rem;
  padding: 0 0.2em;
  font-weight: 600;
}

/* WADDi logo */

.logo {
  display: block;
  height: auto;
}

.lg-ink {
  fill: var(--logo-ink);
}

.lg-dot {
  fill: var(--logo-dot);
}

.logo-header {
  width: 7.5rem;
}

.logo-footer {
  width: 6.25rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-block: 0.5rem;
  border-radius: var(--radius-sm);
}

.main-nav {
  flex: 1;
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li + li {
  margin: 0;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.875rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--ink);
  background: var(--surface-sunk);
}

.main-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}

.lang-switch:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 47.99rem) {
  .header-row {
    flex-wrap: wrap;
    gap: 0 0.75rem;
    justify-content: space-between;
    padding-block: 0.25rem;
  }

  .main-nav {
    order: 3;
    flex-basis: 100%;
    padding-block: 0.25rem 0.5rem;
  }

  /* Wraps instead of scrolling sideways, so no item is ever hidden off-screen (320 px, 200% text). */
  .main-nav ul {
    flex-wrap: wrap;
    gap: 0.125rem 0.25rem;
  }

  .main-nav a {
    padding-inline: 0.75rem;
  }

  .site-header {
    position: static;
  }

  html {
    scroll-padding-top: 1rem;
  }
}

/* Home */

.hero {
  max-width: 72rem;
  margin: clamp(1rem, 3vw, 2rem) auto 0;
  padding-inline: var(--gutter);
}

.hero-inner {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 7vw, 5rem) clamp(1.5rem, 6vw, 4.5rem);
}

.hero-mark {
  display: none;
}

@media (min-width: 64rem) {
  .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: center;
    gap: 3rem;
  }

  .hero-mark {
    display: flex;
    justify-content: center;
  }

  .logo-hero {
    width: min(100%, 20rem);
  }
}

.hero-eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9375rem;
  margin: 0 0 1rem;
}

.hero h1 {
  color: var(--ink);
  font-size: clamp(1.75rem, 3.6vw, 2.625rem);
  line-height: 1.3;
  margin: 0;
  max-width: 26ch;
}

html[lang="ar"] .hero h1 {
  line-height: 1.45;
}

.hero-lead {
  color: var(--muted);
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  margin: 1.25rem 0 0;
  max-width: 44ch;
}

.home-body {
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem);
}

.home-body > p:first-child {
  font-size: 1.1875rem;
  color: var(--muted);
  max-width: 46rem;
}

.home-body h2 {
  font-size: clamp(1.375rem, 2.6vw, 1.75rem);
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 1.25rem;
}

.cards,
.page-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.cards li,
.page-links li {
  margin: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--app-om);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card-1 {
  border-top-color: var(--app-business);
}

.card-2 {
  border-top-color: var(--app-captain);
}

.card-3 {
  border-top-color: var(--app-om);
}

.card-title {
  font-size: 1.1875rem;
  margin: 0 0 0.5rem;
}

.card p {
  color: var(--muted);
  margin: 0;
}

.page-links {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.page-links a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  height: 100%;
  padding: 1.25rem 1.25rem 1.25rem 1.25rem;
  padding-inline-end: 3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
}

.page-links a::after {
  content: "→";
  position: absolute;
  inset-inline-end: 1.25rem;
  top: 1.2rem;
  color: var(--accent);
  font-weight: 700;
}

html[dir="rtl"] .page-links a::after {
  content: "←";
}

.page-links a:hover {
  border-color: var(--accent);
}

.page-link-title {
  font-weight: 700;
  font-size: 1.0625rem;
}

.page-link-hint {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Page and document headers */

.doc-header {
  padding-block: clamp(2rem, 5vw, 3.25rem) clamp(1.25rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.doc-header h1 {
  font-size: clamp(1.875rem, 4.2vw, 2.75rem);
  line-height: 1.3;
  margin: 0;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.doc-meta > span {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.15rem 0.75rem;
}

.governing {
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Reading layout */

.doc {
  max-width: 46rem;
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.doc h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  line-height: 1.45;
  margin: 2.75rem 0 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.doc > h2:first-child,
.doc > .toc-mobile + h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.doc h3 {
  font-size: 1.125rem;
  margin: 2rem 0 0.75rem;
}

.doc-layout {
  display: block;
}

.toc-side {
  display: none;
}

.toc-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

html[lang="ar"] .toc-title {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9375rem;
}

.toc ol,
.toc-mobile ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li,
.toc-mobile li {
  margin: 0;
}

.toc a,
.toc-mobile a {
  display: block;
  padding: 0.4rem 0.75rem;
  border-inline-start: 2px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.toc a:hover,
.toc-mobile a:hover {
  color: var(--accent);
  border-inline-start-color: var(--accent);
}

.toc-mobile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.toc-mobile summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 700;
}

.toc-mobile summary {
  list-style: none;
  gap: 1rem;
  justify-content: space-between;
}

.toc-mobile summary::-webkit-details-marker {
  display: none;
}

.toc-mobile summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
}

.toc-mobile[open] summary::after {
  content: "−";
}

.toc-mobile[open] summary {
  border-bottom: 1px solid var(--line);
}

.toc-mobile ol {
  padding: 0.75rem 0.75rem 1rem;
}

@media (min-width: 64rem) {
  .doc-layout {
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
    gap: 4rem;
    align-items: start;
  }

  .toc-side {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    max-height: calc(100vh - var(--header-h) - 3rem);
    overflow-y: auto;
    padding-bottom: 1rem;
  }

  .toc-mobile {
    display: none;
  }
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9375rem;
  line-height: 1.7;
}

th,
td {
  text-align: start;
  vertical-align: top;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  min-width: 8rem;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--surface-sunk);
  font-weight: 700;
}

/* Account deletion and support */

.action {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 4vw, 2rem);
  margin: 0 0 2.5rem;
  box-shadow: 0 1px 2px rgb(14 20 22 / 0.04), 0 8px 24px -12px rgb(14 20 22 / 0.12);
}

.doc .action h2 {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}

.action-cta {
  margin: 0 0 1.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  text-align: center;
  min-height: 3rem;
  padding: 0.5rem 1.5rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.action-fallback,
.action-subject,
.action-include-label {
  margin-bottom: 0.5rem;
}

.action-include {
  margin-bottom: 1.25rem;
}

.copyable {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.9375em;
  line-height: 1.5;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.4rem;
  background: var(--surface-sunk);
  color: var(--ink);
  max-width: 100%;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
  unicode-bidi: isolate;
}

.caution {
  background: var(--mark-bg);
  color: var(--mark-ink);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin: 0;
  font-weight: 600;
  font-size: 0.9375rem;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 4vw, 2rem);
  margin: 0 0 2.5rem;
}

.support-email {
  font-weight: 700;
  font-size: clamp(1.125rem, 2.4vw, 1.375rem);
  margin: 0 0 0.75rem;
}

.support-email-text {
  margin: 0;
}

.page-delete-account > p:first-child,
.page-support > p:first-child {
  font-size: 1.125rem;
  color: var(--muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9375rem;
  padding-block: 2.5rem 2rem;
}

.footer-grid {
  display: grid;
  gap: 1.5rem 2.5rem;
  grid-template-columns: 1fr;
}

.footer-tagline {
  margin: 0.75rem 0 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.footer-links li + li {
  margin: 0;
}

.footer-links a,
.footer-contact a {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  overflow-wrap: anywhere;
  min-height: 2.75rem;
  color: var(--ink);
  text-decoration: none;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-contact p {
  margin: 0;
}

.operator {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  margin: 0;
  font-size: 0.875rem;
}

@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr) minmax(0, 1fr);
  }

  .footer-links {
    flex-direction: column;
  }
}

.not-found {
  padding-block: 3rem;
}

.not-found .brand {
  margin-bottom: 2rem;
}

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .toc-side,
  .toc-mobile {
    display: none;
  }

  .doc-layout {
    display: block;
  }

  .table-wrap {
    overflow: visible;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
