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

:root {
  --navy: #00003D;
  --purple: #6b4c9a;
  --purple-dark: #5a3f85;
  --reports-blue: #4a6287;
  --support-green: #4a9b5c;
  --admin-orange: #d4772c;
  --readers-coral: #d9534f;
  --readers-red: #b31b1b;
  --blue-accent: #0078d4;
  --baby-blue: #7eb8e8;
  --gray-bg: #f2f2f2;
  --gray-text: #666;
  --gray-border: #e0e0e0;
  --white: #fff;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--gray-bg);
  color: var(--navy);
  min-height: 100vh;
}

.show-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 2rem 0.85rem 0.75rem;
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
}

.show-header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.show-header-logo-link {
  flex-shrink: 0;
  display: inline-flex;
  text-decoration: none;
}

.show-header-logo-link:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
  border-radius: 2px;
}

.show-header-logo {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  background: none;
}

.show-header-logo::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--navy);
  transform: scaleX(-1) rotate(25deg);
  transform-origin: center center;
  -webkit-mask: url('/speaksandiegologo2.png') no-repeat center / contain;
  mask: url('/speaksandiegologo2.png') no-repeat center / contain;
}

.show-header-title {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.15;
}

.show-header-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--navy);
}

.show-header-tagline {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-text);
}

.show-header-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.show-identity-fields {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.show-identity-or {
  flex-shrink: 0;
  color: var(--gray-text);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: lowercase;
}

.show-student-name-input {
  width: 9.5rem;
  max-width: 100%;
}

.show-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.show-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.show-avatar.has-image {
  color: transparent;
}

.show-avatar-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.865rem;
  height: 1.865rem;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
}

.show-avatar-upload:hover {
  background: rgba(0, 0, 61, 0.06);
}

.show-avatar-upload svg {
  width: 1.19rem;
  height: 1.19rem;
}

.show-avatar-input {
  display: none;
}

.show-user-name {
  width: 9.5rem;
  max-width: 100%;
  padding: 0.35rem 0.5rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
  background: var(--white);
  border: 1px solid rgba(0, 0, 61, 0.18);
  border-radius: 4px;
}

.show-user-name::placeholder {
  color: var(--gray-text);
  opacity: 0.85;
}

.show-user-name:focus {
  outline: 2px solid rgba(0, 0, 61, 0.25);
  outline-offset: 1px;
}

.show-school-field {
  position: relative;
}

.show-school-suggestions {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 20;
  width: min(18rem, 70vw);
  max-height: 14rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--white);
  border: 1px solid rgba(0, 0, 61, 0.15);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 61, 0.12);
}

.show-school-suggestion {
  padding: 0.55rem 0.75rem;
  cursor: pointer;
}

.show-school-suggestion:hover,
.show-school-suggestion.is-active {
  background: rgba(0, 0, 61, 0.06);
}

.show-school-suggestion-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.35;
}

.show-school-suggestion-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--gray-text);
  line-height: 1.35;
}

.show-school-status {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 19;
  width: min(18rem, 70vw);
  margin: 0;
  font-size: 0.72rem;
  color: var(--navy);
}

.show-header-icons {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: 0.25rem;
}

.show-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  border-radius: 4px;
  text-decoration: none;
}

.show-header-icon:hover {
  background: rgba(0, 0, 61, 0.06);
}

.show-header-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

#show-header-feature-btn svg {
  width: 1.85rem;
  height: 1.85rem;
  stroke-width: 1.75;
}

.show-verify-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 61, 0.35);
}

.show-verify-overlay[hidden] {
  display: none;
}

.show-verify-popover {
  position: relative;
  width: min(34rem, 100%);
  padding: 2rem 2.25rem 2.15rem;
  background: var(--white);
  border: 1px solid #c8d0da;
  border-radius: 0.35rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.show-verify-popover[hidden] {
  display: none;
}

.show-verify-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.show-verify-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--navy);
}

.show-verify-close {
  flex: 0 0 auto;
  padding: 0;
  border: none;
  background: transparent;
  color: #667788;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.show-verify-close:hover {
  color: var(--navy);
}

.show-verify-message {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
}

.show-verify-label {
  display: block;
  margin-bottom: 0.45rem;
  color: #333;
  font-size: 0.92rem;
  font-weight: 600;
}

.show-verify-input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #c8d0da;
  border-radius: 0.2rem;
  font: inherit;
  font-size: 1rem;
}

.show-verify-input:focus,
.show-verify-input:focus-visible {
  outline: none;
  border-color: #c8d0da;
  box-shadow: none;
}

.show-verify-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 0.2rem;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--navy);
  color: var(--white);
}

.show-verify-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.show-verify-status {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  color: var(--navy);
}

.show-verify-status.is-error {
  color: #b00020;
}

.show-feature-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 61, 0.35);
}

.show-feature-overlay[hidden] {
  display: none;
}

.show-feature-popover {
  position: relative;
  width: min(34rem, 100%);
  padding: 2rem 2.25rem 2.15rem;
  background: var(--white);
  border: 1px solid #c8d0da;
  border-radius: 0.35rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.show-feature-popover[hidden] {
  display: none;
}

.show-feature-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.show-feature-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--navy);
}

.show-feature-close {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--gray-text);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.show-feature-close:hover {
  color: var(--navy);
}

.show-feature-message {
  margin: 0 0 1.25rem;
  color: var(--gray-text);
  font-size: 0.95rem;
  line-height: 1.55;
}

.show-feature-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 600;
}

.show-feature-optional {
  color: var(--gray-text);
  font-weight: 400;
}

.show-feature-file {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.show-feature-file-btn {
  flex: 0 0 auto;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--gray-border);
  border-radius: 0.15rem;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.show-feature-file-name {
  color: var(--gray-text);
  font-size: 0.88rem;
}

.show-feature-textarea {
  width: 100%;
  min-height: 6.5rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--gray-border);
  border-radius: 0.15rem;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
  resize: vertical;
}

.show-feature-textarea:focus,
.show-feature-textarea:focus-visible {
  outline: 2px solid rgba(74, 155, 92, 0.35);
  border-color: var(--support-green);
}

.show-feature-submit {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0.15rem;
  background: var(--navy);
  color: var(--white);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.show-feature-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.show-feature-status {
  margin: 0.85rem 0 0;
  color: var(--support-green);
  font-size: 0.88rem;
}

.show-feature-status.is-error {
  color: #b00020;
}

.show-main {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3.5rem 1.5rem 2rem;
}

.show-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 19.5rem));
  justify-content: center;
  gap: 2rem;
  max-width: 62.5rem;
  width: 100%;
}

.show-card[hidden] {
  display: none !important;
}

.show-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 19.5rem;
  min-height: 17.5rem;
  background: var(--white);
  border-radius: 0.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.show-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.25rem 1.5rem 1.75rem;
}

.show-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.4rem;
  height: 5.4rem;
  border-radius: 50%;
  margin-bottom: 1.25rem;
}

.show-card--courses .show-card-icon {
  background: var(--navy);
}

.show-card--scheduler .show-card-icon {
  background: var(--purple);
}

.show-card--reports .show-card-icon,
.show-card--gradebook .show-card-icon {
  background: var(--reports-blue);
}

.show-card--support .show-card-icon {
  background: var(--support-green);
}

.show-card--admin .show-card-icon {
  background: var(--admin-orange);
}

.show-card--readers .show-card-icon {
  background: var(--readers-coral);
}

.show-card-icon svg {
  width: 2.7rem;
  height: 2.7rem;
  color: var(--white);
}

.show-card-icon__mark {
  display: block;
  width: 2.7rem;
  height: 2.7rem;
  background-color: var(--white);
  -webkit-mask: no-repeat center / contain;
  mask: no-repeat center / contain;
}

.show-card-icon__mark--support {
  -webkit-mask-image: url('/app/courses/support.png');
  mask-image: url('/app/courses/support.png');
}

.show-card-title {
  width: 100%;
  font-size: 1.62rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.show-card--courses .show-card-title {
  color: var(--navy);
}

.show-card--scheduler .show-card-title {
  color: var(--purple);
}

.show-card--reports .show-card-title,
.show-card--gradebook .show-card-title {
  color: var(--reports-blue);
}

.show-card--support .show-card-title {
  color: var(--support-green);
}

.show-card--admin .show-card-title {
  color: var(--admin-orange);
}

.show-card--readers .show-card-title {
  color: var(--readers-coral);
}

.show-card-desc {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--gray-text);
}

.show-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 2.25rem;
  padding: 0 0.85rem;
}

.show-card--courses .show-card-footer {
  background: var(--navy);
}

.show-card--scheduler .show-card-footer {
  background: var(--purple);
}

.show-card--reports .show-card-footer,
.show-card--gradebook .show-card-footer {
  background: var(--reports-blue);
}

.show-card--support .show-card-footer {
  background: var(--support-green);
}

.show-card--admin .show-card-footer {
  background: var(--admin-orange);
}

.show-card--readers .show-card-footer {
  background: var(--readers-coral);
}

.show-card-footer svg {
  width: 1rem;
  height: 1rem;
  color: var(--white);
}

.show-support-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-left: -0.15rem;
  margin-right: 0.15rem;
  color: var(--navy);
  text-decoration: none;
}

.show-support-back svg {
  width: 1.25rem;
  height: 1.25rem;
}

.courses-back,
.course-section-back,
.planner-back,
.icl-back,
.icl-lesson-back,
.levels-back,
.lesson-overview-back {
  margin-left: -0.15rem;
}

.show-support-body {
  background: var(--gray-bg);
}

.show-support-page {
  position: relative;
  min-height: calc(100vh - 4.5rem);
  background: var(--gray-bg);
}

.show-support-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2.5rem) 3rem;
}

.show-support-intro {
  color: var(--navy);
}

.show-support-heading {
  margin-bottom: 0.85rem;
  color: var(--support-green);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
}

.show-support-lead {
  max-width: 24rem;
  margin-bottom: 2rem;
  color: var(--gray-text);
  font-size: 1rem;
  line-height: 1.55;
}

.show-support-lead a {
  color: var(--support-green);
  font-weight: 600;
  text-decoration: none;
}

.show-support-lead + .show-support-lead {
  margin-top: -1rem;
}

.show-support-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.35rem 1.25rem 1.5rem;
  border: 1px solid var(--gray-border);
  border-radius: 2px;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.show-support-field,
.show-support-field-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.show-support-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.show-support-field > span,
.show-support-field-row .show-support-field > span {
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 600;
}

.show-support-optional {
  color: var(--gray-text);
  font-weight: 400;
}

.show-support-control {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--gray-border);
  border-radius: 0.15rem;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 0.92rem;
}

.show-support-control:focus {
  outline: none;
  border-color: var(--support-green);
  box-shadow: 0 0 0 2px rgba(74, 155, 92, 0.15);
}

.show-support-control--textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.show-support-file {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.15rem;
}

.show-support-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--gray-border);
  border-radius: 0.15rem;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.show-support-file-btn svg {
  width: 1rem;
  height: 1rem;
}

.show-feature-file-btn:hover,
.show-feature-file-btn:focus,
.show-feature-file-btn:active,
.show-feature-file-btn:focus-visible,
.show-support-file-btn:hover,
.show-support-file-btn:focus,
.show-support-file-btn:active,
.show-support-file-btn:focus-visible {
  border-color: var(--gray-border);
  outline: none;
}

.show-support-file-name {
  color: var(--gray-text);
  font-size: 0.88rem;
}

.show-support-form-status {
  margin: 0;
  color: var(--support-green);
  font-size: 0.88rem;
  font-weight: 600;
}

.show-support-form-status.is-error {
  color: #b00020;
}

.show-support-submit {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.9rem 1rem;
  border: none;
  border-radius: 0.15rem;
  background: var(--support-green);
  color: var(--white);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.show-support-submit:hover {
  filter: brightness(0.92);
}

.show-support-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .show-support-layout {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .show-support-lead {
    margin-bottom: 0.85rem;
  }

  .show-support-lead:last-child {
    margin-bottom: 0;
  }

  .show-header-title {
    display: none;
  }

  .show-main {
    padding: 2rem 0.65rem 2rem;
  }

  .show-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 0.85rem;
    max-width: none;
    width: 100%;
  }

  .show-card {
    width: 100%;
    max-width: none;
    min-height: 0;
  }

  .show-card-body {
    padding: 1.25rem 0.4rem 1rem;
  }

  .show-card-icon {
    width: 4.68rem;
    height: 4.68rem;
    margin-bottom: 0.75rem;
  }

  .show-card-icon svg,
  .show-card-icon__mark {
    width: 2.34rem;
    height: 2.34rem;
  }

  .show-card-title {
    width: 100%;
    font-size: 1.14rem;
    line-height: 1.2;
    margin-bottom: 0.35rem;
  }

  .show-card-desc {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .show-card-footer {
    height: 1.75rem;
    padding: 0 0.6rem;
  }

  .show-card-footer svg {
    width: 0.85rem;
    height: 0.85rem;
  }
}

@media (max-width: 640px) {
  .show-header {
    flex-wrap: nowrap;
    gap: 0.5rem;
    padding: 0.85rem 1rem 0.85rem 0.75rem;
  }

  .show-header-brand {
    display: flex;
    align-items: center;
    align-self: center;
    flex-shrink: 0;
  }

  .show-header-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
  }

  .show-header-user {
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.3rem;
    margin-left: 0;
  }

  .show-avatar-wrap {
    flex-shrink: 0;
    gap: 0.35rem;
  }

  .show-identity-fields {
    flex: 0 1 auto;
    min-width: 0;
    gap: 0.35rem;
  }

  .show-school-field {
    flex: 0 1 auto;
    min-width: 0;
  }

  .show-identity-or {
    flex-shrink: 0;
    font-size: 0.68rem;
  }

  .show-user-name,
  .show-student-name-input {
    width: 3.5rem;
    flex: 0 0 auto;
    min-width: 0;
    max-width: 3.5rem;
    font-size: 0.65rem;
    padding: 0.2rem 0.3rem;
  }

  .show-header-icons {
    flex-shrink: 0;
    gap: 0.35rem;
    margin-left: auto;
  }

  .show-header-icon {
    width: 1.65rem;
    height: 1.65rem;
  }

  .show-header-icon svg {
    width: 1rem;
    height: 1rem;
  }

  #show-header-feature-btn svg {
    width: 1.45rem;
    height: 1.45rem;
  }

  .show-avatar-upload {
    width: 1.64rem;
    height: 1.64rem;
  }

  .show-avatar-upload svg {
    width: 1.02rem;
    height: 1.02rem;
  }

  .show-avatar {
    width: 2.15rem;
    height: 2.15rem;
    font-size: 0.75rem;
  }

  .show-header-logo {
    width: 2.15rem;
    height: 2.15rem;
  }
}

/* TabNav accessibility widget — keep button on the bottom left */
.tr-button,
#tr-button {
  left: 1rem !important;
  right: auto !important;
  top: auto !important;
  bottom: 0.35rem !important;
  margin-top: 0 !important;
  transform: translateY(0) scale(0.88) !important;
  transform-origin: bottom left !important;
}
