/* Shared styling for the ItsMyGoal legal documents (terms / privacy / cookies).
   Tuned to match the main site: clean sans, teal links, comfortable measure. */

:root {
  --text: #1b2122;
  --muted: #6f797b;
  --link: #006875;
  --link-hover: #00505a;
  --border: rgba(0, 0, 0, 0.08);
  --surface: #f6f9fa;
  --max-width: 760px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 24px 20px 72px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Headings (real tags + Termly's semantic classes) */
h1,
[data-custom-class="title"] {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 0.25rem;
}

h2,
[data-custom-class="heading_1"] {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 2.5rem 0 0.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}

h3,
[data-custom-class="heading_2"] {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 1.6rem 0 0.4rem;
}

[data-custom-class="subtitle"] {
  color: var(--muted);
}

p {
  margin: 0.65rem 0;
}

a,
[data-custom-class="link"] {
  color: var(--link);
  text-decoration: none;
  overflow-wrap: anywhere;
}

a:hover,
[data-custom-class="link"]:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

ul,
ol {
  margin: 0.65rem 0 0.65rem 1.3rem;
  padding: 0;
}

li {
  margin: 0.3rem 0;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

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

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

th {
  background: var(--surface);
  font-weight: 700;
}

img,
svg,
table {
  max-width: 100%;
}

/* Helpers used by the hand-written terms / cookies docs */
header {
  margin-bottom: 1.5rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
  color: var(--muted);
}

.section {
  margin-top: 0;
}

.toc {
  margin: 1.75rem 0;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.toc strong {
  display: block;
  margin-bottom: 0.5rem;
}

.toc a {
  display: block;
  margin: 0.3rem 0;
}

.note {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: rgba(0, 104, 117, 0.06);
  border-left: 4px solid var(--link);
}

footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
}
