/* --------------------------------------------------------------------------
   noten.zoo-pony.ro

   Design follows the zoo-pony wordmark: italic serif with a treble clef, black
   on paper. So: ink on warm paper, serif headings, one petrol accent and one
   amber highlight. No trace of the old PHP-Fusion "Milestone" theme.

   Contrast (WCAG AA, against --surface #FFFFFF):
     --ink      #221F1B  15.9:1     --primary   #1A5A69   6.4:1
     --muted    #5E574E   6.6:1     --accent-d  #8A5316   5.6:1
   -------------------------------------------------------------------------- */

:root {
  --ink:          #221F1B;
  --muted:        #5E574E;
  --faint:        #8A8279;

  --primary:      #1A5A69;
  --primary-dark: #114049;
  --primary-soft: #E3EFF2;

  --accent:       #C8862F;
  --accent-dark:  #8A5316;
  --accent-soft:  #FBF0DC;

  --paper:        #F6F2EA;
  --surface:      #FFFFFF;
  --line:         #DED7CA;
  --line-soft:    #EDE7DC;
  --row-alt:      #FAF8F3;

  --danger:       #9B2C24;
  --ok-bg:        #E9F3E4;
  --ok-line:      #7FA766;

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans:  "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --radius: 4px;
}

* { box-sizing: border-box; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  margin: 0;
  padding: 16px 12px;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--primary); text-decoration: none; }
a:hover, a:focus-visible { color: var(--primary-dark); text-decoration: underline; }
img { border: 0; max-width: 100%; height: auto; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 12px; top: 12px; z-index: 100;
  background: var(--surface); padding: 10px 14px;
  border: 2px solid var(--primary); border-radius: var(--radius);
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(34, 31, 27, .07);
}

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

.site-header {
  padding: 18px 22px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .logo { display: inline-block; }
.site-header .logo img { display: block; width: auto; height: 58px; }

/* ---------- navigation ---------- */

.mainnav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--primary);
  padding: 0 22px;
}
.mainnav ul {
  display: flex; flex-wrap: wrap; gap: 0;
  list-style: none; margin: 0; padding: 0;
  flex: 1 1 auto;
}
.mainnav a {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  padding: 13px 15px;
  border-bottom: 3px solid transparent;
}
.mainnav a:hover, .mainnav a:focus-visible {
  background: var(--primary-dark);
  text-decoration: none;
  color: #FFFFFF;
}
.mainnav a.active {
  border-bottom-color: var(--accent);
  background: var(--primary-dark);
}
.navdate {
  font-size: 13px;
  color: #D6E6EA;
  white-space: nowrap;
  padding: 6px 0;
}

.navtoggle {
  display: none;
  font: inherit; font-size: 15px; font-weight: 600;
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: var(--radius);
  padding: 8px 14px; margin: 8px 0;
  cursor: pointer;
}

/* ---------- columns ---------- */

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
  padding: 22px;
  align-items: start;
}
.main, .side { min-width: 0; }

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

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 0 0 20px;
  overflow: hidden;
}
.panel-caption {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 12px 16px;
}
.side-caption {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  background: var(--primary);
  margin: 0;
  padding: 10px 14px;
}
.panel-body { padding: 16px; }
.side-panel .panel-body { padding: 14px; }

/* ---------- text ---------- */

h1 {
  font-family: var(--serif);
  font-size: 27px; line-height: 1.25;
  margin: 0 0 14px; color: var(--ink);
}
h3 {
  font-family: var(--serif);
  font-size: 18px; margin: 0 0 4px; color: var(--ink);
}
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

.muted { color: var(--muted); }
.small { font-size: 14px; }

.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.plain li:last-child { border-bottom: 0; }

/* ---------- controls ---------- */

.button {
  display: inline-block;
  font-family: var(--sans);
  font-size: 15px; font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none;
}
.button:hover, .button:focus-visible {
  background: #EFE9DD; text-decoration: none; color: var(--ink);
}
.button-primary {
  background: var(--primary); color: #FFFFFF; border-color: var(--primary);
}
.button-primary:hover, .button-primary:focus-visible {
  background: var(--primary-dark); color: #FFFFFF;
}
.button-danger { color: var(--danger); border-color: #D8B4B0; }
.button-danger:hover { background: #FBEEED; color: var(--danger); }

input[type=text], input[type=password], input[type=date], input[type=time],
input[type=email], input[type=file], select, textarea {
  font-family: var(--sans);
  font-size: 16px;                 /* 16px keeps iOS from zooming on focus */
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #A9A196;
  border-radius: var(--radius);
  padding: 10px 12px;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
}
textarea { min-height: 140px; resize: vertical; }

/* Inline controls (the calendar's month/year jump) size to their content
   rather than stretching across the panel. */
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form select { width: auto; min-width: 8em; }
.inline-form label { margin: 0; }

/* Layout helpers. These exist as classes rather than style="" attributes so
   the Content-Security-Policy can keep style-src at 'self' with no
   'unsafe-inline' escape hatch. */
.form-narrow { max-width: 340px; }
.form-medium { max-width: 540px; }
.actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field { flex: 1 1 150px; min-width: 0; }
.nowrap { white-space: nowrap; }
.note { margin-top: 14px; }
label {
  display: block;
  font-size: 14px; font-weight: 600;
  margin: 14px 0 5px;
  color: var(--muted);
}

.flash {
  background: var(--ok-bg); border-left: 4px solid var(--ok-line);
  padding: 12px 14px; border-radius: var(--radius); font-size: 15px;
}
.error {
  background: #FBEEED; border-left: 4px solid var(--danger);
  color: #7A231C; padding: 12px 14px; border-radius: var(--radius); font-size: 15px;
}

.breadcrumb { font-size: 14px; color: var(--muted); margin: 0 0 14px; }

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

.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th {
  text-align: left;
  font-size: 14px; font-weight: 700;
  color: var(--muted);
  background: var(--paper);
  border-bottom: 2px solid var(--line);
  padding: 10px 12px;
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:nth-child(even) td { background: var(--row-alt); }
.tbl .num { text-align: right; white-space: nowrap; color: var(--muted); }

.table-scroll { overflow-x: auto; }

/* ---------- downloads ---------- */

.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li {
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 4px;
  display: flex; justify-content: space-between; gap: 14px; align-items: baseline;
}
.cat-list li:last-child { border-bottom: 0; }
.cat-list a { font-size: 17px; font-weight: 600; }
.cat-list .count { color: var(--muted); font-size: 14px; white-space: nowrap; }

.dl-item { border-bottom: 1px solid var(--line-soft); padding: 16px 4px; }
.dl-item:first-child { padding-top: 0; }
.dl-item:last-child { border-bottom: 0; padding-bottom: 0; }
.dl-meta { font-size: 14px; color: var(--muted); }

.dl-files { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dl-files li { margin: 0; }
.dl-files a, .dl-files > li > span {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px 6px 6px;
  font-size: 14px;
  background: var(--surface);
}
.dl-files a:hover { background: var(--primary-soft); text-decoration: none; border-color: var(--primary); }
.dl-files .ext {
  display: inline-block; min-width: 42px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #FFFFFF; background: var(--muted);
  border-radius: 999px; text-align: center; padding: 3px 8px;
}
.dl-files .ext-pdf  { background: #9B2C24; }
.dl-files .ext-mid  { background: #2F6B45; }
.dl-files .ext-midi { background: #2F6B45; }
.dl-files .ext-cap  { background: #5B3D74; }
.dl-files .ext-capx { background: #5B3D74; }
.dl-files .ext-zip  { background: #5E574E; }
.dl-files .ext-mscz { background: #1A5A69; }

/* ---------- calendar ---------- */

.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin: 0 0 16px;
}
.cal-head h1 { margin: 0; }
.cal-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.cal-nav a {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius);
  padding: 9px 15px; font-size: 15px; font-weight: 600;
}
.cal-nav a:hover { background: var(--paper); text-decoration: none; }

.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th {
  font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); background: var(--paper);
  border: 1px solid var(--line); padding: 9px 4px; text-align: center;
}
.cal td {
  border: 1px solid var(--line-soft);
  vertical-align: top;
  height: 104px;
  padding: 4px;
}
.cal td.out { background: var(--row-alt); }
.cal td.today { background: var(--accent-soft); border-color: var(--accent); }
.cal .daynum {
  display: block; font-size: 14px; font-weight: 700;
  color: var(--muted); padding: 2px 4px; text-decoration: none;
}
.cal .daynum:hover { color: var(--primary); }
.cal td.today .daynum { color: var(--accent-dark); }
.cal .ev {
  display: block;
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
  border-radius: 2px;
  padding: 3px 6px;
  margin: 3px 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--primary-dark);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal .ev:hover { background: #CFE3E8; text-decoration: none; }
.cal .ev.cont { border-left-style: dotted; }

.events-mini { list-style: none; margin: 0; padding: 0; }
.events-mini li { padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.events-mini li:last-child { border-bottom: 0; }
.events-mini .when { display: block; color: var(--muted); font-size: 13px; }

.more { margin: 12px 0 0; font-size: 15px; font-weight: 600; }
.greeting { font-size: 16px; margin: 0 0 10px; }
.loginform .button, .logout .button { margin-top: 14px; width: 100%; }

.event-day { border-bottom: 1px solid var(--line-soft); padding: 16px 4px; }
.event-day:first-child { padding-top: 0; }
.event-day:last-child { border-bottom: 0; }
.event-day .date { font-size: 15px; color: var(--muted); }

/* ---------- gallery ---------- */

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.gallery figure {
  margin: 0; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px; background: var(--surface);
}
.gallery figcaption { font-size: 14px; text-align: center; padding-top: 8px; color: var(--muted); }

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 16px 22px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
.site-footer p { margin: 0; }

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  body { padding: 0; }
  .wrap { border: 0; border-radius: 0; box-shadow: none; }
  .cols { grid-template-columns: 1fr; padding: 16px; gap: 16px; }

  .mainnav { padding: 0 16px; align-items: stretch; }
  .navtoggle { display: block; }
  .mainnav ul { display: none; flex-direction: column; width: 100%; flex-basis: 100%; }
  .mainnav ul.open { display: flex; }
  .mainnav li { border-top: 1px solid rgba(255,255,255,.18); }
  .mainnav a { padding: 14px 2px; border-bottom: 0; border-left: 3px solid transparent; }
  .mainnav a.active { border-bottom: 0; border-left-color: var(--accent); }
  .navdate { display: none; }

  .site-header { padding: 14px 16px 12px; }
  h1 { font-size: 23px; }
  .panel-caption { font-size: 17px; }

  .cal td { height: auto; min-height: 64px; }
  .cal .ev { font-size: 11px; padding: 2px 4px; }
  .cal th { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- print ----------
   Choir members print the sheet-music lists and the month plan, so drop the
   furniture and let the content use the page. */
@media print {
  body { background: #fff; padding: 0; font-size: 11pt; }
  .wrap { max-width: none; border: 0; box-shadow: none; }
  .mainnav, .side, .site-footer, .skip, .cal-nav, .inline-form,
  .navtoggle, .more, .actions { display: none !important; }
  .cols { display: block; padding: 0; }
  .panel { border: 0; margin-bottom: 14pt; break-inside: avoid; }
  .panel-caption { background: none; border-bottom: 1pt solid #000; padding-left: 0; }
  .panel-body { padding: 0; }
  .site-header { border-bottom: 1pt solid #000; padding-left: 0; }
  a { color: #000; text-decoration: none; }
  .cal td { height: auto; }
  .cal .ev { background: none; border-left: 2pt solid #000; color: #000; white-space: normal; }
  .tbl tbody tr:nth-child(even) td { background: none; }
  .dl-files a { border-color: #666; }
}

/* Subscribe hint under the calendar. */
.subscribe {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 15px;
}
.subscribe code {
  font-size: 13px; background: var(--paper); padding: 3px 8px;
  border: 1px solid var(--line); border-radius: var(--radius);
  word-break: break-all;
}
