/*
 * Hushhh! brand stylesheet, shared by every public legal/support page
 * (support, privacy, terms, delete-account).
 *
 * u81 (HUS-305): these pages used to each carry their own copy of the same
 * grey/plain CSS. One shared file means a brand tweak happens once, in one
 * place, instead of drifting across four files. Colors and the font stack
 * are copied verbatim from the setup email's BRAND block (server/setupEmail.js)
 * so the web pages, the email, and the app (src/theme.ts "warm editorial:
 * parchment paper") all read as the same product.
 *
 * No text in the four pages changes with this file. Only look and feel.
 */

:root {
  --tint: #fdf0e3; /* page background, warm parchment */
  --card: #fffdf7; /* the white-ish container */
  --card-line: #f2dcc3; /* container border / soft rules */
  --ink: #2a2520; /* primary text */
  --ink2: #5c5247; /* secondary text */
  --ink3: #6b6050; /* tertiary/footer text */
  --accent: #ee8b3c; /* small accents only: title bar, list markers, the delete button */
  --on-accent: #2a2520; /* text color on top of --accent */
  --link: #ab642b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  /* Defensive: a long untranslated word or a wide table cell must never
     force the whole page to scroll sideways. */
  max-width: 100%;
  overflow-x: hidden;
}

body {
  /* Same stack as the setup email (server/setupEmail.js), which is the
     email-safe system-font list every mail client renders consistently. */
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.7;
  color: var(--ink);
  background: var(--tint);
  padding: 40px 16px;
}

@media (max-width: 640px) {
  body {
    /* 16px side gutter on phones; less top/bottom air than desktop. */
    padding: 24px 16px;
  }
}

.container {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 2px 16px rgba(42, 37, 32, 0.08);
}

@media (max-width: 640px) {
  .container {
    padding: 20px;
  }
}

.brand-header {
  /* Logo + wordmark. This sits OUTSIDE the per-language .section blocks, so
     it is language-neutral and never changes with ?lang=. No dir="rtl"
     handling needed here on purpose - a logo reads the same for everyone. */
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--card-line);
}

.brand-header img {
  height: 44px;
  width: auto;
  border-radius: 10px;
  display: block;
}

.brand-header .brand-wordmark {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

/* Hebrew pages read right-to-left, so the brand header must hug the page's
   START side too, which is the right for Hebrew - not always the physical
   left. The header sits BEFORE any .section and carries no dir of its own,
   so :has() on .container is how it learns the active section's direction.
   row-reverse both flips the logo/wordmark order (logo ends up on the
   right, closest to the edge, same as the app's own RTL headers) and - since
   justify-content defaults to flex-start, which row-reverse points at the
   container's right edge - pulls the whole header over to that side. */
.container:has(.section.active[dir="rtl"]) .brand-header {
  flex-direction: row-reverse;
}

h1 {
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--ink);
}

/* Thin accent bar under the title of whichever language section is active.
   margin-inline-end:auto (not a plain width+no-margin block) is what makes
   this mirror correctly under dir="rtl" sections: it pins the bar to the
   title's own inline-start edge, which is the right side in Hebrew and the
   left side everywhere else, instead of always hugging the physical left. */
.section.active h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 10px;
  margin-inline-end: auto;
  background: var(--accent);
  border-radius: 2px;
}

h2 {
  font-size: 20px;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--ink);
}

h3 {
  font-size: 16px;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--ink);
}

p,
li {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 12px;
  color: var(--ink);
}

ul,
ol {
  padding-left: 24px;
}

[dir="rtl"] ul,
[dir="rtl"] ol {
  padding-right: 24px;
  padding-left: 0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

table th,
table td {
  border: 1px solid var(--card-line);
  padding: 8px 12px;
  text-align: left;
  font-size: 15px;
}

[dir="rtl"] table th,
[dir="rtl"] table td {
  text-align: right;
}

img {
  max-width: 100%;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

[dir="rtl"] {
  text-align: right;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.date {
  color: var(--ink3);
  font-size: 14px;
  margin-bottom: 24px;
}

.contact-box {
  background: var(--tint);
  border: 1px solid var(--card-line);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}

.important {
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 16px;
  margin-top: 32px;
  font-size: 14px;
  color: var(--ink2);
}

/* Footer line, if a page ever adds one. ink3 matches the email's footer
   color (server/setupEmail.js) so it reads as the quiet, secondary line it
   is meant to be. No page currently has footer markup; this rule is here so
   one can be added later without guessing a color. */
.footer {
  color: var(--ink3);
  font-size: 13px;
  margin-top: 32px;
}

/* delete-account.html primary action, if/when it gets a real button -
   today the page only has a mailto link, which the `a` rule above already
   covers. Kept so a future button matches the app's primary-button look
   (accent fill, dark ink text, 12px radius) instead of a browser default. */
button,
.btn-primary,
input[type="submit"] {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

input[type="text"],
input[type="email"],
textarea {
  border: 1px solid var(--card-line);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--card);
}
