/*
 * Shared styling for the four public HETF pages.
 *
 * Palette transcribed from `packages/shared/src/tokens.ts` so the site and the app do not disagree
 * about what the brand colour is. Kept to one small stylesheet on purpose: these pages exist to be
 * read by an app reviewer and by a contractor on a phone, and neither is helped by a build step.
 */

:root {
  --ember: #d2601a;
  --ink: #1c1310;
  --text: #0f172a;
  --text-secondary: #334155;
  --muted: #64748b;
  --app-bg: #f4efe8;
  --card: #ffffff;
  --border: #eae2d6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ember: #e8823f;
    --ink: #f4efe8;
    --text: #ece7e1;
    --text-secondary: #c3bcb4;
    --muted: #9a938b;
    --app-bg: #17110e;
    --card: #221a16;
    --border: #362b24;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--app-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

header.masthead {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
  margin-bottom: 2.25rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
}

.brand strong {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand span {
  color: var(--muted);
  font-size: 0.9rem;
}

h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

h2 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
  color: var(--ink);
}

h3 {
  font-size: 1rem;
  margin: 1.75rem 0 0.5rem;
  color: var(--ink);
}

.effective {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 2rem;
}

p,
li {
  color: var(--text-secondary);
}

a {
  color: var(--ember);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

ul {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

/* Cards used for the landing page links and for callouts. */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 0.85rem;
}

a.card {
  display: block;
  text-decoration: none;
  color: inherit;
}

a.card strong {
  display: block;
  color: var(--ember);
  margin-bottom: 0.15rem;
}

a.card span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* A pulled-out statement that must not be missed — used sparingly. */
.note {
  border-left: 3px solid var(--ember);
  background: var(--card);
  border-radius: 0 8px 8px 0;
  padding: 0.9rem 1.15rem;
  margin: 1.5rem 0;
}

.note p:last-child {
  margin-bottom: 0;
}

/* Wide content must scroll inside itself rather than pushing the page sideways. */
.table-scroll {
  overflow-x: auto;
  margin: 1rem 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

td {
  color: var(--text-secondary);
}

footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

footer a {
  margin-right: 1rem;
}
