/*
  The public pages: privacy policy, terms of use, account deletion (publish-google-play D3) and Claude
  (add-connector-guide). Static, readable without JavaScript, in the website's colors (client/src/index.css); legal.js
  picks the reader's language and DayLive's theme.
*/
:root {
  --bg: #fcf9f5;
  --surface: #fffdfa;
  --surface-2: #f6f2ec;
  --fg: #202020;
  --muted: #6b6b6b;
  --border: #ebe5dd;
  --accent: #c03b25;
  --accent-fg: #ffffff;
  --focus: #c03b25;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --bg: #1b1b1b;
    --surface: #262626;
    --surface-2: #2f2f2f;
    --fg: #ececec;
    --muted: #a6a6a6;
    --border: #323232;
    --accent: #f0735a;
    --accent-fg: #1b1b1b;
    --focus: #f0735a;
    color-scheme: dark;
  }
}

:root.dark {
  --bg: #1b1b1b;
  --surface: #262626;
  --surface-2: #2f2f2f;
  --fg: #ececec;
  --muted: #a6a6a6;
  --border: #323232;
  --accent: #f0735a;
  --accent-fg: #1b1b1b;
  --focus: #f0735a;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* In the Android app the page is drawn under the phone's status and navigation bars. */
.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: calc(16px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) 16px
    calc(32px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.home {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  color: var(--fg);
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
}

.home span {
  color: var(--muted);
  font-weight: 400;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The language switch: the chosen language is filled. */
nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

nav a[aria-current='true'] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
}

a {
  color: var(--accent);
}

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

section[lang] {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

/* With JavaScript only the reader's language shows (legal.js). */
.one-language section[lang]:not(.shown) {
  display: none;
}

.one-language section[lang] {
  border-top: 0;
}

h1 {
  margin: 16px 0 4px;
  font-size: 28px;
  line-height: 1.25;
}

h2 {
  margin: 28px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.updated {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

p,
ul,
ol {
  margin: 8px 0;
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin: 4px 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
}

/* The connector's address with its copy button (add-connector-guide D1). */
.address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 8px 8px 8px 16px;
}

.address button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.address button[hidden] {
  display: none;
}

.box {
  margin: 16px 0;
  border-radius: 16px;
  background: var(--surface-2);
  padding: 12px 16px;
}

footer {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

footer a {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  margin-right: 16px;
}

/* The contents of a long page (privacy, terms) and the way back to them: plain links, not the language chips. */
.contents ol {
  margin: 8px 0 16px;
  padding-left: 22px;
}

.contents li {
  margin: 0;
}

.contents a,
.top a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: none;
  color: var(--accent);
  font-size: 16px;
  font-weight: 400;
  text-decoration: underline;
}

.top {
  margin-top: 24px;
}
