/* Shared styles for the public legal pages served at tabbakha.app.
   The cook contract page is also printed to the PDF the API serves
   (scripts/build-cook-contract-pdf.sh), so print rules live here too. */

:root {
  --bg: #fbf8f4;
  --surface: #ffffff;
  --text: #2b2420;
  --muted: #6f625a;
  --line: #e8dfd6;
  --brand: #b4542a;
  --brand-soft: #fbeee6;
  --note: #fff7e0;
  --note-line: #efd98f;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1614;
    --surface: #221d1a;
    --text: #efe7e0;
    --muted: #b3a79e;
    --line: #3a322d;
    --brand: #e98a5c;
    --brand-soft: #33241c;
    --note: #2e2816;
    --note-line: #5c4f22;
  }
}

:root[data-theme="dark"] {
  --bg: #1a1614;
  --surface: #221d1a;
  --text: #efe7e0;
  --muted: #b3a79e;
  --line: #3a322d;
  --brand: #e98a5c;
  --brand-soft: #33241c;
  --note: #2e2816;
  --note-line: #5c4f22;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.85;
}

a { color: var(--brand); }

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header .inner,
main,
.site-footer .inner {
  max-width: 820px;
  margin: 0 auto;
  padding-inline: 16px;
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 14px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 22px;
  color: var(--brand);
  text-decoration: none;
}

.site-nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--brand); font-weight: 600; }

main { padding-block: 32px 48px; }

h1 { font-size: 30px; line-height: 1.4; margin: 0 0 6px; }
h2 { font-size: 21px; margin: 36px 0 8px; padding-top: 8px; border-top: 1px solid var(--line); }
h3 { font-size: 18px; margin: 22px 0 6px; }

.meta { color: var(--muted); font-size: 15px; margin: 0 0 24px; }

ul, ol { padding-inline-start: 24px; }
li { margin-bottom: 4px; }

.note {
  background: var(--note);
  border: 1px solid var(--note-line);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 20px 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 16px 0;
}

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
}

table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; vertical-align: top; }
th { background: var(--brand-soft); }
.table-wrap { overflow-x: auto; }

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.site-footer .inner { padding-block: 20px; }

/* Contract form fields — blank lines the cook fills by hand. */
.fields { width: 100%; border-collapse: collapse; }
.fields td { border: 1px solid var(--line); padding: 12px 10px; }
.fields td:first-child { width: 34%; background: var(--brand-soft); font-weight: 600; }

.sign-page { margin-top: 32px; }

@media print {
  @page { size: A4; margin: 18mm 16mm; }
  :root { --bg: #fff; --surface: #fff; --text: #111; --muted: #444; --line: #999; --brand: #8a3a17; --brand-soft: #f3ece6; --note: #fff; --note-line: #999; }
  body { font-size: 12.5pt; line-height: 1.7; }
  .site-header, .site-footer, .no-print { display: none !important; }
  main { max-width: none; padding: 0; }
  h1 { font-size: 20pt; }
  h2 { font-size: 14pt; margin-top: 18px; break-after: avoid; }
  a { color: inherit; text-decoration: none; }
  .sign-page { break-before: page; margin-top: 0; }
  .fields td { padding: 16px 10px; }
  .print-only { display: block !important; }
}

.print-only { display: none; }
