/*
 * World Football Tournament — Legal site styles
 * RTL-aware (uses CSS logical properties), light/dark via prefers-color-scheme.
 */
:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #1a1d21;
  --muted: #5b626b;
  --border: #e2e5ea;
  --accent: #1f6feb;
  --notice-bg: #fff7e6;
  --notice-border: #f0c36d;
  --notice-text: #6b4e00;
  --maxw: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --surface: #171b21;
    --text: #e7eaee;
    --muted: #9aa3ad;
    --border: #2a2f37;
    --accent: #5b9bff;
    --notice-bg: #2a2410;
    --notice-border: #6b561f;
    --notice-text: #f0d999;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "Hiragino Sans", "Noto Sans", "Noto Sans Arabic", "Noto Sans CJK JP", Arial, sans-serif;
  line-height: 1.7;
  font-size: 16px;
}

/* Honour RTL document direction set by i18n.js */
html[dir="rtl"] body { text-align: start; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-block-end: 1px solid var(--border);
  background: var(--surface);
}

.site-header a { color: var(--accent); text-decoration: none; font-weight: 600; }
.site-header a:hover { text-decoration: underline; }

.lang-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.lang-control select {
  font: inherit;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  max-width: 60vw;
}

main {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 24px 20px 64px;
}

h1 { font-size: 1.8rem; line-height: 1.3; margin-block: 0.2em 0.3em; }
h2 { font-size: 1.25rem; margin-block: 1.6em 0.4em; }
h3 { font-size: 1.05rem; margin-block: 1.2em 0.3em; }

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

.updated { color: var(--muted); font-size: 0.9rem; margin-block: 0 1.5em; }

.notice {
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  color: var(--notice-text);
  padding: 12px 16px;
  border-radius: 10px;
  margin-block: 0 1.5em;
  font-size: 0.95rem;
}

article ul, article ol { padding-inline-start: 1.4em; }
article li { margin-block: 0.3em; }
article p { margin-block: 0.8em; }

article table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 1em;
  font-size: 0.95rem;
}
article th, article td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: start;
  vertical-align: top;
}
article th { background: var(--surface); }

.home-hero {
  text-align: center;
  padding-block: 8vh;
}
.home-hero h1 { font-size: 2rem; }
.home-hero p { color: var(--muted); max-width: 36ch; margin-inline: auto; }

.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-block-start: 2em;
}
.doc-links a {
  display: inline-block;
  padding: 14px 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
  font-weight: 600;
  color: var(--accent);
}
.doc-links a:hover { border-color: var(--accent); }

.site-footer {
  border-block-start: 1px solid var(--border);
  padding: 18px 20px;
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}
.site-footer a { color: var(--muted); }
