/* Public pages (registration, fees, class schedule) – GLP / ΤΕΓ.
   Token-based light and dark palettes; the colours are placeholders until the new home page sets the brand.
   Bilingual markup: <span class="el">…</span><span class="en">…</span>, switched by html[data-ui]. */
:root {
  --page: #f5f7fa; --surface: #ffffff; --surface-2: #eef2f7; --ink: #15202b; --ink-2: #4a5866; --muted: #6b7785;
  --line: #dde3ea; --ring: #c5ced8; --brand: #0d5eaf; --brand-ink: #ffffff; --brand-soft: #e3eefa; --focus: #2a78d6;
  --good: #1f7a3a; --good-bg: #e6f4ea; --bad: #b3261e; --bad-bg: #fdecea; --warn: #7a5200; --warn-bg: #fff4d6;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --k-early: #c2410c; --k-primary: #0d5eaf; --k-levels: #0f766e; --k-adult: #7e22ce;
  /* events: GLP celebrations and events stand out in green; national days and Qatar holidays stay quiet in grey */
  --e-national: #8d97a5; --e-glp: #15803d; --e-holiday: #a7aeb8; --e-quiet-bg: #f1f3f6; --e-glp-bg: #e3f4e8;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0f1419; --surface: #182029; --surface-2: #212b36; --ink: #e8edf2; --ink-2: #b4c0cc; --muted: #8b98a6;
    --line: #2c3845; --ring: #3d4b59; --brand: #6aa6f0; --brand-ink: #0b1520; --brand-soft: #1b2d44; --focus: #8bbcf5;
    --good: #7fd49a; --good-bg: #15301e; --bad: #ff9c94; --bad-bg: #3a1a18; --warn: #f0c870; --warn-bg: #3a2c0a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4); --k-early: #fb923c; --k-primary: #6aa6f0; --k-levels: #2dd4bf; --k-adult: #c084fc;
    --e-national: #7a8694; --e-glp: #4ade80; --e-holiday: #66717e; --e-quiet-bg: #1f2731; --e-glp-bg: #163323; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0f1419; --surface: #182029; --surface-2: #212b36; --ink: #e8edf2; --ink-2: #b4c0cc; --muted: #8b98a6;
  --line: #2c3845; --ring: #3d4b59; --brand: #6aa6f0; --brand-ink: #0b1520; --brand-soft: #1b2d44; --focus: #8bbcf5;
  --good: #7fd49a; --good-bg: #15301e; --bad: #ff9c94; --bad-bg: #3a1a18; --warn: #f0c870; --warn-bg: #3a2c0a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4); --k-early: #fb923c; --k-primary: #6aa6f0; --k-levels: #2dd4bf; --k-adult: #c084fc;
  --e-national: #7a8694; --e-glp: #4ade80; --e-holiday: #66717e; --e-quiet-bg: #1f2731; --e-glp-bg: #163323; color-scheme: dark;
}

html[data-ui="el"] .en, html[data-ui="en"] .el { display: none !important; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.pub h1:focus, .pub h2:focus { outline: none; }
body.pub { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-text-size-adjust: 100%; }
.pub a { color: var(--brand); text-underline-offset: 3px; }
.pub :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pub h1, .pub h2, .pub h3 { line-height: 1.25; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* header */
.pub-top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.pub-top-in { max-width: 1040px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.pub-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.pub-brand img { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; background: #fff; }
.pub-brand b { display: block; font-size: 15px; }
.pub-brand small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-top .grow { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--ring); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: transparent; color: var(--ink-2); font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1; padding: 8px 12px; cursor: pointer; min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }
.icon-btn { border: 1px solid var(--ring); background: var(--surface); color: var(--ink); border-radius: 999px; width: 38px; height: 38px; font-size: 17px; cursor: pointer; display: inline-grid; place-items: center; padding: 0; }

.pub-main { max-width: 1040px; margin: 0 auto; padding: 20px 16px 64px; }
.pub-main.narrow { max-width: 760px; }
.lead { color: var(--ink-2); margin: 6px 0 0; }
.pub-foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 19px; margin-bottom: 4px; }
.card h3 { font-size: 16px; }
.hint { color: var(--ink-2); font-size: 14px; }
.note { border-radius: 10px; padding: 10px 12px; font-size: 14px; background: var(--brand-soft); color: var(--ink); }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.good { background: var(--good-bg); color: var(--good); }
.note.bad { background: var(--bad-bg); color: var(--bad); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; border: 1px solid var(--ring); background: var(--surface); color: var(--ink);
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; padding: 11px 18px; min-height: 44px; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.btn.link { border: 0; background: none; color: var(--brand); padding: 4px 6px; min-height: 0; text-decoration: underline; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; color: var(--ink-2); font-size: 13px; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.tbl .sub { display: block; color: var(--muted); font-size: 13px; }

/* form fields */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .field > .lbl { font-weight: 600; font-size: 14px; }
.field .opt { font-weight: 400; color: var(--muted); }
.inp { width: 100%; min-height: 44px; border: 1px solid var(--ring); border-radius: 10px; background: var(--surface); color: var(--ink); font-family: inherit; font-size: 16px; line-height: 1.3; padding: 10px 12px; }
.inp:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.inp[aria-invalid="true"] { border-color: var(--bad); background: var(--bad-bg); }
select.inp { appearance: auto; }
.phone { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 8px; }
.err { color: var(--bad); font-size: 13px; }
.err:empty { display: none; }
.fmt { color: var(--muted); font-size: 13px; }
.fmt:empty { display: none; }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ring); border-radius: 10px; padding: 9px 14px; cursor: pointer; min-height: 44px; font-size: 15px; background: var(--surface); }
.choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
.opt-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--ring); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: var(--surface); }
.opt-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.opt-card input { accent-color: var(--brand); width: 18px; height: 18px; margin: 3px 0 0; flex: none; }
.opt-card b { display: block; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; padding: 6px 0; }
.check input { accent-color: var(--brand); width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
details.more { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--surface-2); }
details.more summary { cursor: pointer; padding: 10px 0; font-weight: 600; font-size: 14px; color: var(--brand); }
details.more .body { font-size: 14px; color: var(--ink-2); padding-bottom: 12px; white-space: pre-line; }
.file { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.file .name { font-size: 14px; color: var(--ink-2); word-break: break-all; }

@media (max-width: 640px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; border-radius: 12px; }
  .pub-brand small { display: none; }
  .pub-main { padding: 14px 12px 48px; }
  .phone { grid-template-columns: minmax(0, 120px) minmax(0, 1fr); }
}
@media print { .pub-top .seg, .icon-btn, .teg-theme-toggle { display: none !important; } body.pub { background: #fff; } .card { box-shadow: none; } }
