/* Crazy Events site shell: header (inc/head.inc), menu (inc/link.inc), footer (inc/fuss.inc).
   Page content is legacy HTML (font tags, fixed-width tables, Excel exports), so rules
   for it stay defensive: they make it fit small screens without restyling it. */

:root {
  --ce-navy: #12122e;
  --ce-blue: #1668b1;
  --ce-blue-dark: #0f4f8a;
  --ce-blue-light: #e8f1fa;
  --ce-text: #1f2430;
  --ce-muted: #5d6675;
  --ce-border: #dde3ea;
  --ce-surface: #f5f7fa;
  --ce-radius: 10px;
  --ce-nav-width: 240px;
}

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

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

body {
  margin: 0;
  background: #fff;
  color: var(--ce-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

/* Legacy <font face=...> tags would otherwise force Verdana/Lucida everywhere */
font[face] { font-family: inherit; }

a { color: var(--ce-blue); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

/* Excel-exported pages ship a stylesheet with a:link { font-size:10pt; text-decoration:underline }
   that would otherwise restyle the header, menu and footer links */
.ce-header a:link, .ce-header a:visited,
.ce-nav a:link, .ce-nav a:visited,
.ce-footer a:link, .ce-footer a:visited {
  font-size: inherit;
  font-weight: inherit;
  text-decoration: none;
}
.ce-nav a:hover, .ce-footer a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

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

.ce-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 3px solid var(--ce-blue);
  box-shadow: 0 2px 8px rgba(18, 18, 46, .06);
}

.ce-header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 20px;
}

.ce-logo { display: block; flex: 0 1 auto; min-width: 0; line-height: 0; }
.ce-logo img { width: 360px; max-width: 100%; height: auto; }

.ce-search { margin-left: auto; display: flex; gap: 6px; }
.ce-search input[type="text"] {
  width: 220px;
  padding: 8px 12px;
  border: 1px solid var(--ce-border);
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
}
.ce-search input[type="text"]:focus { outline: 2px solid var(--ce-blue); outline-offset: 1px; border-color: transparent; }

.ce-button,
.ce-search input[type="submit"],
.ce-newsletter input[type="submit"] {
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ce-blue);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.ce-button:hover,
.ce-search input[type="submit"]:hover,
.ce-newsletter input[type="submit"]:hover { background: var(--ce-blue-dark); }

.ce-menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px 14px;
  border: 1px solid var(--ce-border);
  border-radius: 999px;
  background: #fff;
  color: var(--ce-navy);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.ce-menu-toggle-icon,
.ce-menu-toggle-icon::before,
.ce-menu-toggle-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  content: "";
}
.ce-menu-toggle-icon { position: relative; }
.ce-menu-toggle-icon::before { position: absolute; top: -6px; }
.ce-menu-toggle-icon::after { position: absolute; top: 6px; }

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

.ce-layout {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 0;
}

.ce-nav {
  flex: 0 0 var(--ce-nav-width);
  position: sticky;
  top: 96px;
}

.ce-nav-title {
  margin: 0 0 8px;
  padding: 0 12px;
  color: var(--ce-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ce-nav ul { list-style: none; margin: 0 0 24px; padding: 0; }
.ce-nav { font-size: 16px; }
.ce-nav li a:link, .ce-nav li a:visited {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ce-navy);
  font-weight: 500;
}
.ce-nav li a:hover { background: var(--ce-blue-light); color: var(--ce-blue-dark); text-decoration: none; }
.ce-nav li a[aria-current="page"] { background: var(--ce-blue); color: #fff; }

.ce-main {
  flex: 1 1 auto;
  min-width: 0;          /* lets wide legacy tables scroll instead of widening the page */
  overflow-x: auto;
  padding-bottom: 24px;
}

/* ---------- Newsletter box (inc/newsletter.php markup) ---------- */

.ce-newsletter {
  padding: 16px;
  border: 1px solid var(--ce-border);
  border-radius: var(--ce-radius);
  background: var(--ce-surface);
}
.ce-newsletter-title { margin: 0 0 4px; color: var(--ce-navy); font-size: 16px; font-weight: 700; }
.ce-newsletter-text { margin: 0 0 10px; color: var(--ce-muted); font-size: 14px; line-height: 1.4; }
.ce-newsletter form { margin: 0; }
.ce-newsletter-msg { margin: 0 0 10px; color: var(--ce-blue-dark); font-size: 14px; font-weight: 600; }
.ce-newsletter input[type="text"],
.ce-newsletter input[type="email"] {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid var(--ce-border);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 15px;
}
.ce-newsletter input[type="submit"] { width: 100%; }

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

.ce-footer {
  margin-top: 40px;
  background: var(--ce-navy);
  color: #c9cde0;
  font-size: 14px;
}
.ce-footer-inner { max-width: 1400px; margin: 0 auto; padding: 28px 20px; }
.ce-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 16px; }
.ce-footer a:link, .ce-footer a:visited { color: #fff; }
.ce-footer p { margin: 0; }

/* ---------- Legacy content ---------- */

.ce-main > center:first-child,
.ce-main table[width="100%"] { max-width: 100%; }

/* ---------- /news (WordPress, licht theme = 2005 "Kubrick" layout with fixed pixel widths) ---------- */

.ce-main #page {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px;
  width: auto;
  margin: 0;
  border: 0;
  background: none;
}
.ce-main #page > #header,
.ce-main #page > hr { display: none; }
.ce-main #content.narrowcolumn,
.ce-main #content.widecolumn {
  flex: 1 1 480px;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 0;
  float: none;
}
.ce-main #sidebar {
  flex: 0 0 240px;
  width: auto;
  margin: 0;
  padding: 16px;
  float: none;
  border: 1px solid var(--ce-border);
  border-radius: var(--ce-radius);
  background: var(--ce-surface);
  font: inherit;
  font-size: 14px;
}
.ce-main #footer { flex: 1 1 100%; width: auto; margin: 0; background: none; border: 0; }
.ce-nav { text-align: left; }   /* the Kubrick theme centres everything on body */
.ce-main #sidebar #searchform > div { display: flex; gap: 6px; }
.ce-main #sidebar #searchform #s {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  padding: 6px 10px;
  border: 1px solid var(--ce-border);
  border-radius: 999px;
  font: inherit;
}
.ce-main #sidebar #searchsubmit {
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--ce-blue);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.ce-main .post { margin-bottom: 40px; text-align: left; }
.ce-main .post h2 { margin: 0 0 4px; font-size: 22px; line-height: 1.3; }
.ce-main .post h2 a:link, .ce-main .post h2 a:visited { color: var(--ce-navy); }
.ce-main .entry { overflow-x: auto; }   /* posts are forwarded newsletter e-mails with fixed-width tables */

/* ---------- /mp3cddb ---------- */

.mp3-title { margin: 0 0 12px; color: var(--ce-navy); font-size: 28px; line-height: 1.2; }
.mp3-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.mp3-nav a:link, .mp3-nav a:visited {
  padding: 6px 14px;
  border: 1px solid var(--ce-border);
  border-radius: 999px;
  color: var(--ce-navy);
  font-size: 15px;
}
.mp3-nav a[aria-current="page"] { border-color: var(--ce-blue); background: var(--ce-blue); color: #fff; }
.mp3-form {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--ce-border);
  border-radius: var(--ce-radius);
  background: var(--ce-surface);
}
.mp3-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 14px; }
.mp3-field { display: grid; grid-template-columns: 1fr; gap: 4px; font-weight: 600; }
.mp3-field select, .mp3-field input, .mp3-options select, .mp3-options input[type="number"] {
  padding: 7px 10px;
  border: 1px solid var(--ce-border);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-weight: 400;
}
.mp3-options { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.mp3-options label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.mp3-options input[type="number"] { width: 90px; }
.mp3-summary { color: var(--ce-muted); }
.mp3-table-wrap { overflow-x: auto; }
.mp3-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.mp3-table th, .mp3-table td { padding: 8px 10px; border-bottom: 1px solid var(--ce-border); text-align: left; vertical-align: top; }
.mp3-table th { background: var(--ce-navy); color: #fff; font-weight: 600; }
.mp3-table tbody tr:nth-child(even) { background: var(--ce-surface); }
.mp3-paging { display: flex; justify-content: space-between; gap: 12px; }
.mp3-paging .mp3-next { margin-left: auto; }

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  .ce-header-inner { flex-wrap: wrap; padding: 8px 14px; gap: 10px; }
  .ce-logo { flex: 1 1 0; }
  .ce-logo img { width: 260px; }
  .ce-menu-toggle { display: inline-flex; }
  .ce-search { order: 3; flex: 1 1 100%; margin-left: 0; }
  .ce-search input[type="text"] { flex: 1 1 auto; width: auto; min-width: 0; }

  /* The sidebar dissolves: menu above the content (folded behind the button), newsletter below it */
  .ce-layout { flex-direction: column; align-items: stretch; gap: 0; padding: 16px 14px 0; }
  .ce-nav { display: contents; }
  .ce-nav > nav { order: 0; margin-bottom: 16px; }
  .js .ce-nav > nav { display: none; }
  .js .ce-nav.is-open > nav { display: block; }
  .ce-nav ul { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; margin-bottom: 0; }
  .ce-main { order: 1; }
  .ce-newsletter { order: 2; margin-top: 24px; }

  .ce-main table { font-size: 14px; }
}

@media (min-width: 601px) and (max-width: 900px) {
  .ce-header-inner { flex-wrap: nowrap; }
  .ce-search { order: 0; flex: 0 1 320px; margin-left: auto; }
  .ce-menu-toggle { order: 1; margin-left: 0; }
}

@media (max-width: 420px) {
  .ce-nav ul { grid-template-columns: 1fr; }
}

@media print {
  .ce-header, .ce-nav, .ce-footer { display: none; }
  .ce-layout { display: block; padding: 0; }
}
