/* Shared styles for Liftly's privacy policy and data deletion pages.
   A plain document layout: readable on phones, neutral in tone. */

:root {
  --accent: #128a46;
  --accent-strong: #0e6f38;
  --ink: #16202a;
  --body: #36414d;
  --muted: #66727f;
  --bg: #ffffff;
  --subtle: #f5f7f8;
  --rule: #dfe4e8;
  --field: #ffffff;
  --warn-bg: #fdf3f2;
  --warn-rule: #c8372d;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #3fd17f;
    --accent-strong: #5fe096;
    --ink: #eef2f5;
    --body: #c9d1d9;
    --muted: #8f9ba7;
    --bg: #111619;
    --subtle: #182025;
    --rule: #2a343b;
    --field: #182025;
    --warn-bg: #2a1a19;
    --warn-rule: #e0645a;
  }
}

* {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

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

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

strong {
  color: var(--ink);
  font-weight: 600;
}

.doc {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-right)) 56px max(20px, env(safe-area-inset-left));
}

/* Top bar */
.brandbar {
  border-bottom: 1px solid var(--rule);
  padding-top: env(safe-area-inset-top);
}

.brandbar .doc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding-bottom: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.brandbar nav a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}

.brandbar nav a:hover {
  color: var(--ink);
}

/* Title block */
.title {
  padding: 36px 0 24px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 8px;
}

.title h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.title .dates {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.title .lead {
  margin: 14px 0 0;
}

/* Headings and text */
h2 {
  margin: 40px 0 12px;
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--ink);
}

h3 {
  margin: 26px 0 8px;
  font-size: 1.05rem;
  color: var(--ink);
}

p {
  margin: 0 0 14px;
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
}

li {
  margin-bottom: 8px;
}

li::marker {
  color: var(--muted);
}

/* Summary box */
.summary {
  margin: 28px 0 0;
  padding: 18px 22px 6px;
  background: var(--subtle);
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.summary h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

/* Contents */
.toc {
  margin: 24px 0 0;
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.toc summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toc summary::-webkit-details-marker {
  display: none;
}

.toc summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.15s ease;
}

.toc[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.toc ol {
  margin: 0;
  padding: 0 18px 14px 2.6em;
  columns: 1;
}

.toc li {
  margin: 0;
  padding: 3px 0;
}

/* Definition rows: label + description, stacked on phones */
.rows {
  margin: 12px 0 18px;
  border-top: 1px solid var(--rule);
}

.rows > div {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.rows dt {
  font-weight: 600;
  color: var(--ink);
}

.rows dd {
  margin: 4px 0 0;
}

@media (min-width: 640px) {
  .rows > div {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
  }

  .rows dd {
    margin: 0;
  }

  .toc ol {
    columns: 2;
    column-gap: 32px;
  }
}

/* Notices */
.notice {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--accent);
  background: var(--subtle);
  border-radius: 0 6px 6px 0;
}

.notice.warning {
  border-left-color: var(--warn-rule);
  background: var(--warn-bg);
}

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

/* Steps */
ol.steps li {
  padding-left: 4px;
}

/* Contact */
.contact {
  margin: 12px 0 16px;
  padding: 16px 18px;
  background: var(--subtle);
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.contact a {
  font-weight: 600;
  word-break: break-word;
}

/* Forms */
.form {
  margin: 16px 0 8px;
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

.field .optional {
  font-weight: 400;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  /* 16px or larger stops iOS from zooming in on focus */
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid #b9c2ca;
  border-radius: 6px;
  padding: 11px 12px;
}

@media (prefers-color-scheme: dark) {
  .field input,
  .field textarea {
    border-color: #3a464f;
  }
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.form .hint {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 14px 0 0;
}

.button {
  display: inline-block;
  width: 100%;
  padding: 13px 20px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
}

.button:hover {
  background: var(--accent-strong);
}

.button.danger {
  background: #b3261e;
}

.button.danger:hover {
  background: #93201a;
}

@media (prefers-color-scheme: dark) {
  .button {
    color: #0b1f13;
  }

  .button.danger {
    color: #fff;
    background: #c8372d;
  }
}

@media (min-width: 640px) {
  .button {
    width: auto;
  }
}

/* Footer */
.legal-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--muted);
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 10px;
}

@media (max-width: 360px) {
  body {
    font-size: 16px;
  }

  .title h1 {
    font-size: 1.65rem;
  }

  .form {
    padding: 16px;
  }
}
