@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@400;600;700&display=swap");

:root {
  --bg: #f7f9fc;
  --card: #ffffff;
  --text: #11253f;
  --muted: #465d78;
  --primary: #002e5d;
  --primary-contrast: #ffffff;
  --border: #c8d4e3;
  --danger: #a02c2c;
  --focus: #0b66c3;
  --accent: #0057a4;
  --surface-tint: #eaf0f8;
  --bar: #001f3f;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, #f4f7fb, #f8fafd 45%, var(--bg));
  color: var(--text);
  line-height: 1.5;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.4rem 1.25rem 1.25rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 5px 10px 1px rgba(120, 136, 152, 0.45);
}

.site-byu-bar {
  background-color: var(--primary);
  color: #fff;
}

.site-byu-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.site-university {
  color: #fff;
  text-decoration: none;
  font-family: "Montserrat", "Open Sans", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-university:hover,
.site-university:focus,
.site-university:visited {
  color: #fff;
}

.site-user-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.site-user-links a {
  color: #fff;
  text-decoration: none;
}

.site-user-links a:hover,
.site-user-links a:focus {
  text-decoration: underline;
}

#title {
  background-color: #f6f6f8;
  color: #141414;
  cursor: default;
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  padding: 1.4rem 0.75rem;
}

.site-footer {
  margin-top: 2rem;
  padding: 1.5rem 1rem;
  border-top: 1px solid #d7e0ea;
  text-align: center;
  background: #fff;
}

.site-footer-inner {
  max-width: 980px;
  margin: 0 auto;
}

.site-footer p {
  margin: 0;
  color: #2b4056;
  font-size: 0.9rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  border-top: 8px solid var(--primary);
  padding: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 35, 80, 0.08);
}

h1, h2, h3 { line-height: 1.2; }
h1 { margin-top: 0; }
h1, h2, h3 {
  color: var(--primary);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0.02em;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="datetime-local"],
textarea {
  width: 100%;
  border: 1px solid #9fb3c8;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  background: #fff;
}

textarea { min-height: 90px; }

fieldset {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0 0 1rem;
  padding: 0.9rem;
}

legend {
  font-weight: 700;
  padding: 0 0.35rem;
}

.form-group { margin-bottom: 1rem; }
.helper { color: var(--muted); font-size: 0.95rem; }
.error { color: var(--danger); font-weight: 600; margin-top: 0.25rem; }
.banner-error {
  border-left: 5px solid var(--danger);
  background: #fdebec;
  padding: 0.75rem;
  margin-bottom: 1rem;
}
.banner-success {
  border-left: 5px solid #00623b;
  background: #e7f4ec;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.check-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.35rem;
}
.check-row input { margin-top: 0.25rem; }
.check-row-missing {
  border-color: #d14444;
  background: #fff2f2;
}

button,
.button-link {
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #00356a, var(--primary));
  color: var(--primary-contrast);
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button:hover,
.button-link:hover { filter: brightness(1.08); }

a { color: var(--accent); }

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

table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  text-align: left;
  padding: 0.55rem;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--surface-tint);
  color: var(--primary);
}

tr.clickable-row {
  cursor: pointer;
}

tr.clickable-row:hover td {
  background: #eef5fd;
}

tr.clickable-row:focus-visible td {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.speech-prompt-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
  background: #f4f8fd;
}

.speech-prompt-card h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.speech-controls {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.speech-prompt-text {
  border-left: 4px solid var(--accent);
  padding-left: 0.6rem;
}

.speech-timer {
  font-weight: 700;
  min-height: 1.3rem;
}

.speech-prompt-card audio {
  width: 100%;
  margin-top: 0.35rem;
}

.speech-prompt-missing {
  border-color: #d14444;
  background: #fff2f2;
}

.speech-prompt-card.is-recording {
  border-color: #cc3232;
  box-shadow: 0 0 0 3px rgba(204, 50, 50, 0.2);
}

.recording-indicator {
  margin: 0.45rem 0 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: 1px solid #cc3232;
  background: #fff1f1;
  color: #7c1616;
  padding: 0.2rem 0.55rem;
  font-weight: 700;
}

.recording-indicator[hidden] {
  display: none;
}

.recording-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #d11a1a;
  animation: pulse-dot 1s infinite;
}

.recording-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.recording-bars i {
  width: 3px;
  height: 4px;
  display: block;
  background: #d11a1a;
  border-radius: 2px;
  animation: level-bars 0.8s infinite ease-in-out;
}

.recording-bars i:nth-child(2) {
  animation-delay: 0.12s;
}

.recording-bars i:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes pulse-dot {
  0% { opacity: 1; }
  50% { opacity: 0.35; }
  100% { opacity: 1; }
}

@keyframes level-bars {
  0%, 100% { height: 4px; }
  50% { height: 12px; }
}

.top-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  align-items: center;
}

@media (max-width: 680px) {
  .site-byu-inner {
    flex-wrap: wrap;
    justify-content: center;
  }
  .site-university {
    text-align: center;
    width: 100%;
  }  #title {
    font-size: 1.45rem;
    padding: 1rem 0.65rem;
  }
  .container { padding: 0.75rem; }
  .card { padding: 0.9rem; }
}
