:root {
  --avva-blue: #1f4a7a;
  --avva-blue-dark: #143153;
  --avva-yellow: #f5c042;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --bg: #fafaf7;
  --card: #ffffff;
  --border: #e5e7eb;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--avva-blue); }
a:hover { color: var(--avva-blue-dark); }
.container { max-width: 980px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header {
  background: var(--avva-blue);
  color: #fff;
  border-bottom: 4px solid var(--avva-yellow);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem; padding: 1.25rem 1.25rem;
}
.brand { color: #fff; text-decoration: none; display: flex; flex-direction: column; }
.brand-name { font-size: 1.5rem; font-weight: 700; letter-spacing: 0.5px; }
.brand-tagline { font-size: 0.85rem; opacity: 0.85; font-weight: 400; }
.site-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.site-nav a {
  color: #fff; text-decoration: none; padding: 0.5rem 0.9rem;
  border-radius: 4px; font-weight: 500;
}
.site-nav a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.site-nav a.active { background: var(--avva-yellow); color: var(--avva-blue-dark); }

/* Main */
.site-main { padding: 2.5rem 1.25rem 3rem; }
.page h1 { font-size: 2.2rem; margin: 0 0 1.25rem; color: var(--avva-blue-dark); }
.page h2 { font-size: 1.5rem; color: var(--avva-blue-dark); margin-top: 2rem; }
.page h3 { font-size: 1.2rem; color: var(--avva-blue-dark); }
.page-body img {
  max-width: 100%; height: auto; border-radius: 4px;
  margin: 0.5rem 0;
}
.page-body p { margin: 0.9rem 0; }
.page-body ul, .page-body ol { padding-left: 1.5rem; }
.page-body blockquote {
  border-left: 4px solid var(--avva-yellow);
  margin: 1rem 0; padding: 0.5rem 1rem;
  background: #fff7e0; color: #4a3a0a;
}
.page-body sup a { text-decoration: none; font-weight: 600; }
.page-body sup a:hover { text-decoration: underline; }
.page-body ol.refs { font-size: 0.9rem; }
.page-body ol.refs li { margin-bottom: 0.35rem; }
.page-body ol.refs li:target { background: var(--avva-yellow); padding: 0.25rem 0.5rem; border-radius: 4px; }
.page-body hr { border: 0; border-top: 1px solid var(--border, #e5e7eb); margin: 2rem 0; }

/* Public submission widget */
.submit-widget {
  margin: 2rem 0; padding: 1.5rem;
  background: #fff; border: 2px dashed var(--avva-yellow);
  border-radius: 6px;
}
.submit-widget h3 { margin-top: 0; color: var(--avva-blue-dark); }
.submit-widget form { display: flex; flex-direction: column; gap: 0.7rem; }
.submit-widget label { display: flex; flex-direction: column; gap: 0.25rem; font-weight: 500; font-size: 0.95rem; }
.submit-widget input[type=text], .submit-widget input[type=email], .submit-widget textarea, .submit-widget input[type=file] {
  font: inherit; padding: 0.5rem 0.7rem; border: 1px solid #d1d5db; border-radius: 4px; background: #fff;
}
.submit-widget button {
  align-self: flex-start;
  background: var(--avva-blue); color: #fff;
  border: 0; border-radius: 5px;
  padding: 0.6rem 1.2rem; font: inherit; font-weight: 600; cursor: pointer;
}
.submit-widget button:hover { background: var(--avva-blue-dark); }
.submit-widget .note { font-size: 0.85rem; color: #6b7280; margin: 0; }

.dropzone {
  position: relative;
  border: 2px dashed #c7d2e1;
  background: #f8fafc;
  border-radius: 8px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.dropzone:hover { background: #f1f5f9; border-color: var(--avva-blue); }
.dropzone.drag { background: #fff7e0; border-color: var(--avva-yellow); border-style: solid; }
.dropzone .dz-prompt { pointer-events: none; }
.dropzone .dz-prompt strong { font-size: 1.05rem; color: var(--avva-blue-dark); }
.dropzone .dz-prompt .dz-link { color: var(--avva-blue); text-decoration: underline; }
.dropzone input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.dz-list {
  list-style: none; padding: 0; margin: 0.75rem 0 0; max-height: 240px; overflow-y: auto;
  border: 1px solid #e5e7eb; border-radius: 6px; background: #fff;
}
.dz-list li {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 0.7rem; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem;
}
.dz-list li:last-child { border-bottom: 0; }
.dz-list .dz-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-list .dz-size { color: #6b7280; font-variant-numeric: tabular-nums; font-size: 0.85rem; }
.dz-list .dz-remove {
  background: transparent; border: 0; color: #9ca3af; font-size: 1.3rem; line-height: 1;
  width: 1.7rem; height: 1.7rem; cursor: pointer; border-radius: 4px;
}
.dz-list .dz-remove:hover { background: #fee2e2; color: #b91c1c; }
.dz-summary { margin-top: 0.4rem; font-size: 0.85rem; color: #6b7280; }
.submit-widget button:disabled { opacity: 0.55; cursor: not-allowed; }
.submit-widget .alert.success { background: #dcfce7; color: #166534; border: 1px solid #86efac; padding: 0.6rem 0.8rem; border-radius: 4px; margin-bottom: 0.5rem; }
.submit-widget .alert.error { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; padding: 0.6rem 0.8rem; border-radius: 4px; margin-bottom: 0.5rem; }

/* Footer */
.site-footer {
  background: var(--avva-blue-dark);
  color: #cfd8e3;
  padding: 1.5rem 0 1rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}
.site-footer p { margin: 0.5rem 0; line-height: 1.55; }
.site-footer a { color: #fff; text-decoration: underline; }
.admin-link { margin-top: 0.75rem; opacity: 0.7; font-size: 0.8rem; }
.admin-link a { text-decoration: none; }

.footer-notice {
  background: #fff7e0;
  color: #4a3a0a;
  border-left: 4px solid var(--avva-yellow);
  padding: 1rem 1.2rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.footer-notice a { color: var(--avva-blue-dark); text-decoration: underline; }
.footer-notice-head { font-size: 1.05rem; margin: 0 0 0.5rem !important; }
.footer-cta { margin-top: 0.85rem !important; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.footer-cta .cta-button {
  display: inline-block; padding: 0.45rem 0.95rem; background: var(--avva-blue); color: #fff !important;
  text-decoration: none !important; border-radius: 4px; font-weight: 600; font-size: 0.92rem;
  border: 2px solid var(--avva-blue);
}
.footer-cta .cta-button:hover { background: var(--avva-blue-dark); border-color: var(--avva-blue-dark); }
.footer-cta .cta-button.outline { background: transparent; color: var(--avva-blue) !important; }
.footer-cta .cta-button.outline:hover { background: var(--avva-blue); color: #fff !important; }
.footer-bottom { padding-top: 0.5rem; }

/* Feedback form */
.feedback-form { display: flex; flex-direction: column; gap: 0.9rem; max-width: 640px; }
.feedback-form label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 500; }
.feedback-form input[type=text], .feedback-form input[type=email], .feedback-form textarea {
  font: inherit; padding: 0.55rem 0.75rem; border: 1px solid #d1d5db; border-radius: 4px; background: #fff;
}
.feedback-form fieldset.kind-picker {
  border: 1px solid #d1d5db; border-radius: 6px; padding: 0.75rem 1rem; display: flex; flex-direction: column; gap: 0.4rem;
}
.feedback-form fieldset.kind-picker legend { padding: 0 0.5rem; font-weight: 600; color: var(--avva-blue-dark); }
.feedback-form fieldset.kind-picker label { flex-direction: row; align-items: center; gap: 0.5rem; font-weight: 400; }
.feedback-form .btn-primary {
  align-self: flex-start; background: var(--avva-blue); color: #fff;
  border: 0; padding: 0.65rem 1.4rem; border-radius: 5px; font: inherit; font-weight: 600; cursor: pointer;
}
.feedback-form .btn-primary:hover { background: var(--avva-blue-dark); }
.lead-in { font-size: 1.05rem; line-height: 1.55; }

/* Floating "Submit a correction" button — sits on the right edge of the viewport */
.floating-correction {
  position: fixed;
  right: 1rem;
  top: 35%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--avva-yellow);
  color: var(--avva-blue-dark) !important;
  text-decoration: none !important;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  border: 2px solid #d4a72c;
  font-weight: 700;
  font-size: 0.92rem;
  z-index: 50;
  transition: transform 0.15s, box-shadow 0.15s;
}
.floating-correction:hover {
  transform: translateY(-50%) scale(1.04);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  color: var(--avva-blue-dark) !important;
}
.floating-correction .fc-icon { font-size: 1.1rem; }

@media (max-width: 700px) {
  /* On phones, collapse to a smaller pill at the bottom-right */
  .floating-correction {
    top: auto; bottom: 1rem;
    transform: none;
    font-size: 0.85rem;
    padding: 0.45rem 0.7rem;
  }
  .floating-correction:hover { transform: scale(1.04); }
  .floating-correction .fc-text { display: none; }
}

@media (max-width: 600px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-nav { width: 100%; }
  .page h1 { font-size: 1.6rem; }
}
