/* MC-QUEST — simple branded styling using the KAUST palette.
   Deliberately restrained: no animations beyond default hover/focus. */

:root {
  --navy: #1c3a5e;        /* KAUST Academy navy */
  --navy-dark: #142c49;
  --teal: #00a9b7;        /* KAUST teal */
  --gold: #f5a800;        /* KAUST gold */
  --orange: #ee7623;      /* KAUST orange */
  --green: #b5bd00;       /* KAUST green */
  --ink: #253341;
  --muted: #5c6b7a;
  --bg: #f4f6f8;
  --card: #ffffff;
  --line: #dfe5ec;
  --danger: #b3261e;
  --ok: #1a7f37;
}

* { box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

/* --- Header --------------------------------------------------------- */

.site-header { background: #fff; }
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: .6rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand-logo { height: 46px; width: auto; }
.brand-name { font-size: 1.3rem; font-weight: 700; color: var(--navy); letter-spacing: .4px; }
.site-header nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.site-header nav a { color: var(--navy); text-decoration: none; font-weight: 600; }
.site-header nav a:hover { color: var(--teal); }
.accent-bar {
  height: 4px;
  background: linear-gradient(90deg,
    var(--navy) 0 25%, var(--teal) 25% 50%,
    var(--gold) 50% 75%, var(--orange) 75% 100%);
}

/* --- Layout --------------------------------------------------------- */

main { max-width: 960px; margin: 1.5rem auto 2.5rem; padding: 0 1rem; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 1px 3px rgba(16, 32, 49, .06);
}

h1 { color: var(--navy); font-size: 1.55rem; margin: .2rem 0 .8rem; }
h2 { color: var(--navy); font-size: 1.15rem; margin: 1.6rem 0 .5rem; }
a { color: var(--teal); }
a:hover { color: var(--navy); }
small { color: var(--muted); }

/* --- Buttons -------------------------------------------------------- */

button, .button {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  border: none;
  padding: .55rem 1.15rem;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .button:hover { background: var(--navy-dark); color: #fff; }
.button-secondary { background: #fff; color: var(--navy); border: 2px solid var(--navy); padding: calc(.55rem - 2px) calc(1.15rem - 2px); }
.button-secondary:hover { background: var(--navy); color: #fff; }
button.linklike {
  background: none;
  border: none;
  color: var(--navy);
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
}
button.linklike:hover { color: var(--teal); background: none; }
.inline-form { display: inline; }

/* --- Forms ---------------------------------------------------------- */

textarea,
input[type="text"], input[type="email"], input[type="password"],
input[type="url"], input[type="number"], input[type="search"],
select {
  width: 100%;
  max-width: 640px;
  padding: .5rem .65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 169, 183, .18);
}
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--teal); }
input[type="file"] { font: inherit; }

form p > label, .field > label { font-weight: 600; }
.field { margin-bottom: 1.05rem; }
.field div label { font-weight: 400; }   /* radio/checkbox option labels */

.errorlist { color: var(--danger); margin: .25rem 0; padding-left: 1.1rem; font-size: .95rem; }

/* --- Messages & notices --------------------------------------------- */

ul.messages { list-style: none; padding: 0; margin: 0 0 1rem; }
ul.messages li { padding: .6rem .9rem; border-radius: 6px; margin-bottom: .5rem; border: 1px solid var(--line); }
ul.messages li.success { background: #effaf1; border-color: #bfe5c8; color: var(--ok); }
ul.messages li.error { background: #fdf0ef; border-color: #f2c6c2; color: var(--danger); }
ul.messages li.info { background: #eef7fa; border-color: #c4e2ee; color: var(--navy); }

.notice {
  border-left: 4px solid var(--gold);
  background: #fff8e6;
  padding: .7rem 1rem;
  border-radius: 0 6px 6px 0;
  margin: 1rem 0;
}

.consent-text { border: 1px solid var(--line); border-radius: 6px; padding: .75rem 1rem; background: #fafbfc; }
.scrollbox { max-height: 16rem; overflow-y: auto; }

/* --- Tables --------------------------------------------------------- */

table { border-collapse: collapse; width: 100%; margin: .75rem 0; }
th, td { border: 1px solid var(--line); padding: .5rem .65rem; text-align: left; vertical-align: top; }
th { background: #f2f5f8; color: var(--navy); }
tbody tr:nth-child(even) td { background: #fafbfc; }

/* --- Wizard --------------------------------------------------------- */

.wizard-nav { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin: .5rem 0 1.25rem; }
.wizard-nav a, .wizard-nav strong, .wizard-nav .disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  font-weight: 700;
  text-decoration: none;
}
.wizard-nav a { background: #e6f6f8; color: #067a85; border: 1px solid var(--teal); }
.wizard-nav a:hover { background: var(--teal); color: #fff; }
.wizard-nav strong { background: var(--navy); color: #fff; }
.wizard-nav .disabled { background: #eef1f4; color: #9aa7b3; border: 1px solid var(--line); }
.wizard-hint { color: var(--muted); font-size: .85rem; margin-left: .4rem; }

.meme-preview img {
  max-height: 200px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #fff;
}

/* Q15a: long checkbox list scrolls inside a box; a JS filter sits above it. */
#id_q15a_languages {
  max-height: 16rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .45rem .7rem;
  max-width: 640px;
  background: #fff;
}
#id_q15a_languages label { font-weight: 400; }
.list-filter { margin-bottom: .35rem; }

ul#id_q11b_types, ul#id_q13b_elements, ul#id_q15b_scripts,
div#id_q11b_types, div#id_q13b_elements, div#id_q15b_scripts { list-style: none; padding-left: 0; }

/* --- Hero (home page) ------------------------------------------------ */

.hero { text-align: center; padding: .75rem 0 .25rem; }
.hero-logo { height: 88px; width: auto; margin-bottom: .5rem; }
.hero h1 { font-size: 2rem; margin: .2rem 0; }
.tagline { color: var(--muted); font-size: 1.1rem; margin: 0 0 1rem; }
.hero .blurb { max-width: 640px; margin: 0 auto 1rem; text-align: start; }
.hero .cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin: 1.1rem 0 .5rem; }

/* --- Footer ---------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.2rem 1rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.footer-logos { display: flex; gap: 1.4rem; align-items: center; }
.footer-logos img { height: 38px; width: auto; }
.site-footer p { color: var(--muted); font-size: .85rem; margin: 0; }
.site-footer a { color: var(--navy); }

/* Honeypot: hidden from humans, visible to naive bots. */
.hp-field, label[for="id_website"] { position: absolute !important; left: -9999px !important; }
