/*
 * Static TR/EN legal pages (/kvkk, /account-deletion). SEO_PROTECTED §21 keeps
 * them as static documents outside the Next app, so they cannot use the app
 * shell; this sheet mirrors the app's legal document template instead
 * (src/features/legal/legal-document.module.css) with the same tokens as
 * src/styles/tokens.css. There is no theme toggle here, so the page follows
 * the OS colour scheme like a first visit to the app does.
 */
:root {
  color-scheme: light dark;
  --canvas: #ffffff;
  --surface-1: #fefffe;
  --surface-2: #f5f5f3;
  --text-1: #171716;
  --text-2: #5f625e;
  --text-3: #62665f;
  --border: #d7d9d4;
  --border-strong: #b9bcb6;
  --brand: #f75114;
  --brand-text: #b52f00;
  --font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto,
    ui-sans-serif, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #000000;
    --surface-1: #1c1c1d;
    --surface-2: #252527;
    --text-1: #f7f7f4;
    --text-2: #b8bbb5;
    --text-3: #989c95;
    --border: #393a3d;
    --border-strong: #56585c;
    --brand-text: #ff8b61;
  }
}

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
}

a {
  color: var(--brand-text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible,
.table-scroll:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── Header: the app header's height and wordmark, without search/nav ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-block-end: 1px solid var(--border);
  background: var(--surface-1);
}

.site-header .bar {
  display: flex;
  max-width: 90rem;
  height: 3.5rem;
  margin-inline: auto;
  padding-inline: 1rem;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  display: block;
  width: auto;
  height: 22px;
}

/* ── Document ───────────────────────────────────────────────────────── */
.doc {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1rem 3.5rem;
}

.doc h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.doc .updated,
.doc .sub {
  margin: 0 0 2rem;
  color: var(--text-2);
  font-size: 0.875rem;
}

.doc h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.35;
}

.doc h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.4;
}

.doc p {
  margin: 0 0 0.85rem;
}

.doc ul,
.doc ol {
  margin: 0 0 0.85rem;
  padding-inline-start: 1.4rem;
}

.doc li + li {
  margin-block-start: 0.4rem;
}

.doc strong {
  font-weight: 650;
}

/* Quiet callout, like the app's translation notice: no card. */
.doc .note,
.doc .lang-note {
  margin: 0 0 1.5rem;
  padding-inline-start: 0.85rem;
  border-inline-start: 3px solid var(--border-strong);
  color: var(--text-2);
  font-size: 0.9375rem;
}

/* Tables: hairlines only. The wrapper scrolls sideways on phones so the
   page itself never scrolls horizontally. */
.doc .table-scroll {
  max-width: 100%;
  margin: 1rem 0 1.5rem;
  overflow-x: auto;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  border-block-start: 1px solid var(--border);
  font-size: 0.9375rem;
}

.doc .table-scroll table {
  min-width: 37.5rem;
}

.doc th,
.doc td {
  padding: 0.75rem 0.75rem 0.75rem 0;
  border-block-end: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
}

.doc thead th {
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  border-block-start: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-2);
  font-size: 0.875rem;
}

.site-footer .container {
  display: grid;
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  gap: 1rem;
}

.site-footer .org {
  margin: 0.5rem 0 0;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.foot-links a {
  color: var(--text-2);
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--text-1);
}

.copyright {
  margin: 0;
  color: var(--text-3);
  font-size: 0.8125rem;
}

/* ── Language toggle (lang.js builds it into .site-header nav) ──────── */
html[data-lang="tr"] [data-l="en"],
html[data-lang="en"] [data-l="tr"] {
  display: none !important;
}

.lang-toggle {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.lang-toggle button {
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: 600 0.8125rem/1 var(--font);
  cursor: pointer;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--surface-2);
  color: var(--text-1);
}
