/* Easy Fox Games — shared site styles.
   Loaded by every page except index.html, which still carries its own inline styles. */

:root {
  --orange: #f57c00;
  --orange-light: #ffb74d;
  --blue: #1e88e5;
  --blue-dark: #0d47a1;
  --ink: #1a1a2e;
  --muted: #5c5c72;
  --surface: #ffffff;
  --bg: #f4f6fb;
  --border: rgba(26, 26, 46, 0.12);
  --ok: #2e7d32;
  --ok-bg: #e8f5e9;
  --warn: #b25000;
  --warn-bg: #fff3e0;
  --shadow: 0 10px 30px rgba(26, 26, 46, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 60;
  background: var(--surface);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  margin-right: auto;
}

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

/* ---------- language picker ---------- */

.lang-picker { position: relative; }

.lang-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
}

.lang-picker-btn svg { width: 0.7rem; height: 0.7rem; transition: transform 0.15s ease; }
.lang-picker:hover .lang-picker-btn svg,
.lang-picker:focus-within .lang-picker-btn svg { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 9rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(26, 26, 46, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.lang-picker:hover .lang-menu,
.lang-picker:focus-within .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.lang-option {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
}

.lang-option:hover,
.lang-option[aria-current="true"] { background: #eef4ff; color: var(--blue-dark); }

/* ---------- layout ---------- */

.wrap { width: min(1040px, 100%); margin: 0 auto; padding: 0 1.25rem; }

.page-head { padding: 3rem 0 1.5rem; }

.page-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
}

.page-title { margin: 0 0 0.75rem; font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.2; }
.page-lede { margin: 0; font-size: clamp(1rem, 2vw, 1.12rem); color: var(--muted); }

.updated { margin: 1rem 0 0; font-size: 0.85rem; color: var(--muted); }

section.block { padding: 2.25rem 0; border-top: 1px solid var(--border); }

h2.block-title { margin: 0 0 0.5rem; font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 800; }
h3.sub-title { margin: 1.75rem 0 0.6rem; font-size: 1.05rem; font-weight: 800; }
.block-intro { margin: 0 0 1.5rem; color: var(--muted); }

/* ---------- region switch ---------- */

.region-switch {
  display: inline-flex;
  padding: 0.3rem;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.region-switch a {
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
}

.region-switch a[aria-current="page"] { background: var(--blue-dark); color: #fff; }
.region-switch a:not([aria-current="page"]):hover { background: #eef4ff; color: var(--blue-dark); }

.region-note {
  margin: 1rem 0 0;
  padding: 0.9rem 1.1rem;
  background: var(--warn-bg);
  border-left: 4px solid var(--orange);
  border-radius: 0 10px 10px 0;
  font-size: 0.93rem;
}

/* ---------- diagram ---------- */

.diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem 1rem;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.diagram svg { width: 100%; min-width: 660px; height: auto; display: block; }

.diagram-caption { margin: 0.9rem 0 0; font-size: 0.88rem; color: var(--muted); text-align: center; }

/* Pulled-out statement for the strongest fact in a section. */
.note {
  margin: 1.25rem 0 0;
  padding: 0.9rem 1.1rem;
  background: var(--ok-bg);
  border-left: 4px solid var(--ok);
  border-radius: 0 10px 10px 0;
  font-size: 0.95rem;
}

.d-label { font-family: "Nunito", sans-serif; font-weight: 800; font-size: 13px; fill: var(--ink); }
.d-sub { font-family: "Nunito", sans-serif; font-weight: 700; font-size: 11px; fill: var(--muted); }

/* Group captions for the device boundary and the external-provider column. */
.d-group {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  fill: var(--muted);
}

/* White halo so edge labels stay readable where they sit close to a connector. */
.d-edge {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 11px;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
  stroke-linejoin: round;
}

/* ---------- flow steps ---------- */

.steps { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.75rem; }

.steps li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.85rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
}

.steps .n {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--blue-dark);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
}

/* ---------- model cards ---------- */

.model-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.model-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.model-role {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.model-role.primary { background: var(--ok-bg); color: var(--ok); }
.model-role.fallback { background: var(--warn-bg); color: var(--warn); }

.model-id {
  margin: 0 0 0.2rem;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 0.98rem;
  font-weight: 700;
  word-break: break-all;
}

.model-provider { margin: 0 0 0.9rem; font-size: 0.88rem; color: var(--muted); font-weight: 700; }

.model-facts { margin: 0; font-size: 0.9rem; }
.model-facts dt { font-weight: 800; color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.7rem; }
.model-facts dd { margin: 0.1rem 0 0; }

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }

table.policy { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 0.92rem; }

table.policy th, table.policy td { padding: 0.85rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
table.policy thead th { background: #eef4ff; color: var(--blue-dark); font-weight: 800; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
table.policy tbody tr:last-child td { border-bottom: 0; }
table.policy th[scope="row"] { font-weight: 800; }

.pill { display: inline-block; font-size: 0.78rem; font-weight: 800; padding: 0.2rem 0.55rem; border-radius: 999px; white-space: nowrap; }
.pill.yes { background: var(--ok-bg); color: var(--ok); }
.pill.no { background: #ffebee; color: #c62828; }
.pill.info { background: #eef4ff; color: var(--blue-dark); }

/* ---------- data panels ---------- */

.split { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow);
}

.panel h3 { margin: 0 0 0.75rem; font-size: 1rem; font-weight: 800; }
.panel ul { margin: 0; padding-left: 1.1rem; }
.panel li { margin: 0.4rem 0; }
.panel.sent { border-top: 4px solid var(--orange); }
.panel.kept { border-top: 4px solid var(--ok); }

/* ---------- footer ---------- */

.site-footer { padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--border); margin-top: 2rem; }
.site-footer p { margin: 0.25rem 0; }
.site-footer a { color: var(--blue-dark); text-decoration: none; font-weight: 700; }
.site-footer a:hover { text-decoration: underline; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; justify-content: center; margin-bottom: 0.75rem; }

@media (max-width: 720px) {
  .page-head { padding: 2rem 0 1rem; }
  .diagram { padding: 1rem 0.6rem; }
}
