/* Civvo's privacy policy and support pages. The colours are the app's
   (core/theme/src/Theme.kt) and so is the font (Nunito, a variable font). */

@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito.ttf") format("truetype");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --background: #f7f3ec; /* Sand */
  --surface: #fffdf9; /* Paper */
  --text: #24211c; /* Ink */
  --text-secondary: #5a544a; /* Ink2 */
  --accent: #1e6b4f; /* Pine */
  --line: #e4dccf; /* Line */
  --scroll-shadow: rgba(36, 33, 28, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #171511; /* Night */
    --surface: #1f1c17; /* Night1 */
    --text: #f3eee6; /* Cream */
    --text-secondary: #c3bbae; /* Cream2 */
    --accent: #8fd3ae; /* PineLight */
    --line: #34302a; /* NightLine */
    --scroll-shadow: rgba(0, 0, 0, 0.55);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.page {
  box-sizing: content-box;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

@media (min-width: 48rem) {
  .page {
    padding: 2.5rem 1.5rem 4rem;
  }
}

.wordmark {
  display: inline-block;
  margin-bottom: 1.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

h1,
h2 {
  color: var(--accent);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem);
  letter-spacing: -0.01em;
}

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.3125rem;
}

p,
ul {
  margin: 0 0 1rem;
}

ul {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.625rem;
}

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

strong,
th {
  font-weight: 700;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.updated {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.75rem;
}

/* Tables scroll sideways in their own box when the screen is too narrow.
   The shadows show there's more to the left or right. */
.table-scroll {
  margin: 0 0 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(to right, var(--surface) 40%, transparent) left / 2.5rem 100% no-repeat local,
    linear-gradient(to left, var(--surface) 40%, transparent) right / 2.5rem 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, var(--scroll-shadow), transparent) left / 0.875rem 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, var(--scroll-shadow), transparent) right / 0.875rem 100% no-repeat scroll,
    var(--surface);
}

.table-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.table-wide {
  min-width: 38rem;
}

.table-narrow {
  min-width: 18rem;
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
}

thead th {
  color: var(--text-secondary);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--line);
}

tbody tr + tr > * {
  border-top: 1px solid var(--line);
}

tbody th {
  min-width: 8.5rem;
}

/* A list of links, like the app's grouped rows. */
.links {
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.links li + li {
  margin-top: 0;
  border-top: 1px solid var(--line);
}

.links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  color: var(--text);
  text-decoration: none;
}

.links a::after {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-top: 2px solid var(--text-secondary);
  border-right: 2px solid var(--text-secondary);
  transform: rotate(45deg);
}

.links a:hover {
  color: var(--accent);
}

.links a:focus-visible {
  outline-offset: -2px;
}

.site-footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.site-footer a {
  margin-right: 1.25rem;
}

.site-footer a[aria-current="page"] {
  color: var(--text-secondary);
  text-decoration: none;
}
