/* Shared styling for the legal pages. Deliberately a separate file rather than
   inlined three times — these pages change on their own schedule and one
   stylesheet keeps them from drifting apart. Tokens match site/index.html. */

:root {
  --navy: #132238;
  --navy-deep: #0f1c2e;
  --orange: #d98a2b;
  --brass: #c8963e;
  --paper: #faf8f4;
  --card: #ffffff;
  --ink: #26374b;
  --muted: #5f7186;
  --line: #e6e0d6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--orange); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */

.legal-head {
  background: var(--navy);
  padding: 18px 0;
}
.legal-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.legal-head .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.legal-head .brand svg { width: 34px; height: 34px; flex: none; }
.legal-head .word {
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-weight: 600;
  font-size: 25px;
  letter-spacing: .01em;
  color: #fff;
  line-height: 1;
}
.legal-head .word span { color: var(--orange); }
.legal-head .back {
  font-size: 14.5px;
  color: #cfd8e3;
  text-decoration: none;
}
.legal-head .back:hover { color: var(--orange); }

/* ---------- body ---------- */

/* A measure of ~72 characters. Legal text is read in long runs, and the
   1100px site container is far too wide to track across comfortably. */
main.legal {
  max-width: 760px;
  padding-top: 54px;
  padding-bottom: 72px;
  /* Sections number themselves. Hand-numbered headings drift the moment a
     clause is inserted, and a Terms page that jumps 6, 7, 7, 9 undermines
     the one thing it is for. */
  counter-reset: sec;
}

.legal h1 {
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-weight: 600;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: .005em;
  color: var(--navy);
}

.legal .updated {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--muted);
}

.legal .lede {
  margin-top: 22px;
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--navy);
}

.legal h2 {
  font-family: "Barlow", sans-serif;
  font-weight: 700;
  font-size: 21px;
  color: var(--navy);
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.legal h2::before {
  counter-increment: sec;
  content: counter(sec) ". ";
  color: var(--brass);
}

.legal h3 {
  font-weight: 600;
  font-size: 17.5px;
  color: var(--navy);
  margin-top: 24px;
}

.legal p { margin-top: 14px; }

.legal ul { margin-top: 14px; padding-left: 22px; }
.legal li { margin-top: 8px; }

.legal dl { margin-top: 14px; }
.legal dt { font-weight: 600; color: var(--navy); margin-top: 16px; }
.legal dd { margin-left: 0; }

/* The one paragraph on the Terms page nobody should skim past. */
.legal .callout {
  margin-top: 20px;
  padding: 16px 18px;
  background: #fdf4e6;
  border: 1px solid var(--brass);
  border-radius: 10px;
  color: var(--navy);
}

.legal table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  font-size: 15.5px;
}
.legal th, .legal td {
  text-align: left;
  vertical-align: top;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}
.legal th { color: var(--navy); font-weight: 600; background: #f3efe7; }

/* ---------- footer ---------- */

.legal-foot {
  background: var(--navy);
  color: #cfd8e3;
  padding: 26px 0;
  font-size: 14.5px;
}
.legal-foot .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.legal-foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.legal-foot a { color: #cfd8e3; text-decoration: none; }
.legal-foot a:hover { color: var(--orange); }

@media (max-width: 640px) {
  .legal h1 { font-size: 34px; }
  main.legal { padding-top: 38px; }
  .legal-foot .wrap { flex-direction: column; align-items: flex-start; }
}

/* ---------- pricing ---------- */

/* The pricing page borrows this stylesheet for header, footer and typography,
   but it is not a numbered legal document — turn the section counter off. */
.legal.plain h2::before { content: none; }

.legal .plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 30px;
}

.legal .plan {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 22px;
}
.legal .plan.is-best { border-color: var(--brass); box-shadow: 0 2px 14px rgba(200,150,62,.12); }

.legal .plan h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal .plan .amount {
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-weight: 600;
  font-size: 46px;
  line-height: 1.05;
  color: var(--navy);
  margin-top: 6px;
}
.legal .plan .amount span {
  font-family: "Barlow", sans-serif;
  font-weight: 500;
  font-size: 17px;
  color: var(--muted);
}

.legal .plan .sub { margin-top: 8px; font-size: 15.5px; color: var(--muted); }

.legal .plan .badge {
  position: absolute;
  top: -11px;
  right: 18px;
  background: var(--brass);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}

.legal .taxline { margin-top: 18px; font-size: 15.5px; color: var(--muted); }
.legal .muted-note { color: var(--muted); font-size: 15.5px; }

@media (max-width: 640px) {
  .legal .plans { grid-template-columns: 1fr; }
}
