/* ACTAS public site — The Official Ledger. Paper, ink, one clay action. */
:root {
  --paper: #FAF7F1;
  --surface: #FFFFFF;
  --rule: #E8E2D8;
  --ink: #221D17;
  --muted: #756B5E;
  --clay: #A34B22;
  --clay-dark: #7E3512;
  --clay-soft: #F6E9E2;
  /* Warn ink, from the product's DESIGN.md. Used for a line that is not an
     error but costs the reader something to know. */
  --warn-ink: #704B16;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --ui: "Instrument Sans", -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--rule);
}

.brand img { display: block; height: 32px; width: auto; }

.login {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 0;
}
.login:hover, .login:focus-visible { color: var(--ink); }

.page {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 28px 22px 40px;
}

h1 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(40px, 11vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.sub { margin: 0 0 22px; }

/* The 404 page's way home. A class, not a style attribute, because the CSP
   in index.ts allows no inline styles. */
.back { text-decoration: underline; }

.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0 0 24px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.9;
}
.proof span { white-space: nowrap; }
.proof span:not(:last-child)::after { content: "·"; margin: 0 8px; }

.action {
  display: block;
  width: 100%;
  padding: 16px 20px;
  border-radius: 10px;
  background: var(--clay);
  color: #fff;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  transition: background 140ms ease-out;
}
.action:hover { background: var(--clay-dark); }
.action:focus-visible { outline: 3px solid var(--clay-soft); outline-offset: 2px; }

@media (min-width: 600px) {
  .top { padding: 20px 32px; }
  .page { padding-top: 56px; }
}

/* Long-form pages: privacy, the app page. Same paper, ink, and rules. */
.doc { max-width: 640px; }
.doc h1 { font-size: clamp(36px, 9vw, 48px); }
.doc h2 {
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 36px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 20px; }
.doc li { margin: 0 0 8px; }
.doc a:not(.brand):not(.login) { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); }
.doc a:not(.brand):not(.login):hover { text-decoration-color: var(--clay); }

/* ---------------------------------------------------------------------------
   Arabic search landing (/ar). The same Official Ledger, typeset for Arabic:
   Amiri for display, Readex Pro for everything else, more leading, and no
   letter-spacing anywhere — tracking breaks a joined script. Logical properties
   only, so the RTL direction on <html> does the mirroring.
   --------------------------------------------------------------------------- */
.ar {
  --display: "Amiri", "Times New Roman", serif;
  --ui: "Readex Pro", -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.75;
}

/* main takes the slack so the footer sits on the bottom edge of the sheet
   instead of leaving a ragged block of paper under the fold on a tablet. */
.ar .page { max-width: 640px; flex: 1; }

.ar h1 {
  font-weight: 700;
  font-size: clamp(36px, 8.5vw, 48px);
  line-height: 1.35;
  letter-spacing: 0;
  text-wrap: balance;
  margin: 0 0 16px;
}

.ar .kicker {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.ar .sub { margin: 0 0 24px; }

/* The proof line keeps the switchboard order; first word sits at the start of
   the line, which is the right edge under dir="rtl". No uppercase, no tracking:
   both are Latin devices that do not port to Arabic. */
.ar .proof {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  line-height: 2;
  margin: 0 0 24px;
}
/* Symmetric margin on purpose: a separator sits evenly between two words in
   either direction, and a one-sided margin reads as attached to the next one. */
.ar .proof span:not(:last-child)::after { content: "·"; margin-inline: 9px; }

/* 24px to the button. It was 16px while a disclosure line sat between the two and
   carried the 24px itself. */
.ar .price { margin: 0 0 24px; }

.ar .action { font-size: 18px; font-weight: 600; }

.ar .note {
  margin: 8px 0 0;
  font-size: 16px;
  color: var(--muted);
  text-align: start;
}

.ar .facts {
  margin: 64px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.ar .facts li {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.ar .facts b {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 2px;
}

.ar .foot {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 22px 32px;
  font-size: 14px;
  color: var(--muted);
}
.ar .foot a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); }
.ar .foot a:hover { text-decoration-color: var(--clay); }
