@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Premium Light Theme - Clean, Modern Slate Palette */
  --bg-app: #f8fafc;
  /* Slate-50 - Main Background */
  --surface-card: #ffffff;
  /* White - Cards */
  --surface-hover: #f1f5f9;
  /* Slate-100 - Hover interactions */

  --brand: #4f46e5;
  /* Indigo-600 - Primary Brand */
  --brand-hover: #4338ca;
  /* Indigo-700 */
  --brand-light: #e0e7ff;
  /* Indigo-50 - Background tints */

  --text-main: #0f172a;
  /* Slate-900 - Primary Text */
  --text-muted: #64748b;
  /* Slate-500 - Secondary Text */

  --border: #e2e8f0;
  /* Slate-200 - Borders */
  --border-highlight: #cbd5e1;
  /* Slate-300 */

  --success: #10b981;
  /* Emerald-500 */
  --danger: #ef4444;
  /* Red-500 */
  --warning: #f59e0b;
  /* Amber-500 */

  --header-height: 72px;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

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

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-app);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.is-hidden {
  display: none !important;
}

a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-hover);
  text-decoration: none;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.9);
  /* White with blur */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
  /* Dark text for brand in light mode */
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface-card);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: var(--surface-hover);
  border-color: var(--border-highlight);
  outline: none;
}

.menu-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  background: currentColor;
  border-radius: 999px;
}

.menu-icon::before {
  top: -6px;
}

.menu-icon::after {
  top: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: all 0.15s ease;
  font-size: 0.95rem;
}

.nav-link:hover {
  background: var(--surface-hover);
  color: var(--brand);
  /* Brand color on hover */
  text-decoration: none;
}

.nav-link.is-active {
  background: var(--brand-light);
  color: var(--brand);
  /* Brand color for active state */
  font-weight: 600;
}

/* Layout */
.layout {
  max-width: 1200px;
  margin: 48px auto 120px auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Cards */
.desktop-split-row {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 1024px) {
  .desktop-split-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 32px;
  }
}

.section-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  /* Clean light shadow */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* Removed dark mode glow effect - clean white card */
.card::before {
  display: none;
}

.card h2 {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.card p {
  margin: 0 0 24px 0;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Program editor overlay */
.program-editor-overlay[hidden] {
  display: none !important;
}

.program-editor-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  z-index: 100;
}

.program-editor-dialog {
  width: min(720px, 100%);
}

.program-editor-card {
  position: relative;
  margin: 40px 0;
  width: 100%;
}

.program-editor-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.program-editor-close:hover,
.program-editor-close:focus-visible {
  background: rgba(15, 23, 42, 0.9);
  transform: scale(1.02);
  outline: none;
}

body.program-editor-open,
body.manage-events-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .program-editor-overlay {
    padding: 0;
    align-items: stretch;
  }

  .program-editor-card {
    margin: 0;
    border-radius: 0;
    min-height: 100vh;
    padding: 32px 20px 40px 20px;
  }

  .program-editor-close {
    top: 12px;
    right: 12px;
  }
}

/* Forms */
label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="time"],
input[type="url"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 1rem;
  background: var(--surface-hover);
  color: var(--text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface-hover);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.inline-form {
  display: flex;
  gap: 12px;
  align-items: end;
}

.inline-form input {
  flex: 1;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  align-items: center;
}

.catalog-search-form .form-actions {
  margin-top: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.suggestions {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: 0 8px 18px -12px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px 0;
  z-index: 5;
}

.inline-form+.suggestions {
  margin-top: 12px;
}

.quick-form-date-label {
  margin-top: 16px;
  display: inline-block;
}

.suggestion-item {
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.12s ease;
}

.suggestion-item:hover,
.suggestion-item.is-active {
  background: rgba(79, 70, 229, 0.08);
}

.suggestion-name {
  font-weight: 600;
  color: var(--text-main);
}

.suggestion-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.suggestion-empty {
  padding: 12px 16px;
  font-size: 0.95rem;
  color: var(--muted);
}

.status {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--muted);
}

.status.error {
  color: var(--danger);
}

.notice {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.3);
  color: var(--warning);
  font-weight: 600;
}

.program-summary {
  margin: 0 0 18px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
}

.program-summary.empty-state {
  color: var(--muted);
}

.program-summary span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.95rem;
}

.program-metrics {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.program-metrics-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.program-metrics-heading {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
}

.program-metrics-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.program-metrics-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.metric-card {
  background: rgba(79, 70, 229, 0.08);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metric-card-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.metric-card-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.histogram {
  position: relative;
  padding: 28px 10px 16px;
  background: var(--surface-hover);
  border-radius: 12px;
  overflow: hidden;
}

.histogram-bars {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  align-items: end;
  min-height: 120px;
}

.histogram-bar {
  background: rgba(79, 70, 229, 0.35);
  border-radius: 6px 6px 0 0;
  transition: transform 0.2s ease;
}

.histogram-bar:hover {
  transform: scaleY(1.06);
}

.histogram-pointer {
  position: absolute;
  top: 6px;
  bottom: 18px;
  transform: translateX(-50%);
}

.histogram-pointer::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: var(--brand);
  opacity: 0.55;
}

.histogram-pointer-label {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -100%);
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.histogram-pointer.align-left .histogram-pointer-label {
  left: 0;
  transform: translate(0, -100%);
}

.histogram-pointer.align-right .histogram-pointer-label {
  left: 100%;
  transform: translate(-100%, -100%);
}

.histogram-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

.histogram-axis span:nth-child(2) {
  font-weight: 600;
  color: var(--text-main);
}

.metric-card-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.program-metrics-empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.program-detail-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.program-comments {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.program-comments-heading {
  margin: 8px 0 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
}

.program-comments-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.program-comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.program-comment-form label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

.program-comment-form textarea {
  resize: vertical;
  min-height: 96px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  background: var(--surface-hover);
  color: var(--text-main);
}

.program-comment-form textarea:focus {
  border-color: var(--brand);
  outline: 2px solid rgba(79, 70, 229, 0.25);
}

.program-comment-actions {
  display: flex;
  justify-content: flex-end;
}

.program-comment-actions button {
  align-self: flex-end;
}

.program-comment-form .status {
  margin: 0;
  font-size: 0.85rem;
}

.program-comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.program-comment-item {
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.08);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.program-comment-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-main);
  word-break: break-word;
}

.program-comment-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.program-comment-author {
  font-weight: 600;
  color: var(--brand);
}

.program-comment-separator {
  color: rgba(148, 163, 184, 0.75);
}

.program-comment-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.6);
  border-radius: 12px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
}

.detail-group {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-card);
  overflow: hidden;
}

.detail-group-heading {
  margin: 0;
  padding: 18px 24px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--brand);
  font-size: 1.1rem;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.detail-group-heading:hover {
  background: rgba(79, 70, 229, 0.12);
}

.detail-group-heading:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.35);
  outline-offset: 2px;
}

.detail-group-heading::-webkit-details-marker {
  display: none;
}

.detail-group-heading::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.detail-group[open] .detail-group-heading::after {
  transform: rotate(-135deg);
}

.detail-group-body {
  display: grid;
  gap: 16px;
  padding: 20px 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
}

.detail-subgroup {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  padding: 16px 20px;
  background: rgba(148, 163, 184, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-subgroup-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.detail-list {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 1fr);
  gap: 12px 18px;
}

.detail-list dt {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-main);
  word-break: break-word;
}

@media (max-width: 720px) {
  .detail-list {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

button:hover:not(:disabled) {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.secondary-button {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.secondary-button:hover {
  background: var(--surface-hover);
  color: var(--text-main);
  border-color: var(--border-highlight);
}

.alert {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-main);
  font-size: 0.95rem;
}

.alert strong {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.alert.warning {
  border-color: rgba(217, 119, 6, 0.45);
  background: rgba(217, 119, 6, 0.12);
  color: var(--warning);
}

/* Sliders */
.slider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.slider-group {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-card);
}

.slider-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.slider-group-header label {
  margin: 0;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--brand);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
}

/* Program Lists */
#program-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.program-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  background: var(--surface-card);
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  cursor: pointer;
}

.program-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.program-card:hover {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  transform: translateY(-2px);
  border-color: var(--brand);
}

.program-content {
  display: flex;
  align-items: stretch;
  gap: 32px;
}

.program-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.program-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.program-mobile-score {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  line-height: 1.1;
  margin-left: auto;
}

.program-mobile-score-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand);
}

.program-mobile-score-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.program-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.program-rank {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand);
}

.program-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  line-height: 1.2;
}

.program-interview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: rgba(79, 70, 229, 0.12);
  border-radius: 12px;
  padding: 4px 12px;
}

.program-summary {
  width: 220px;
  min-width: 200px;
  padding-left: 24px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.program-summary-score {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.program-score-value {
  font-size: 2.15rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}

.program-score-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.program-elo-average {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}

.program-summary-link {
  width: 100%;
}

.program-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.program-detail-header h2 {
  margin: 0;
}

.program-note-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1.2rem;
  color: var(--text-main);
}

.program-note-button:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.program-note-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.program-note-button.has-note {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.note-panel-card {
  width: 100%;
  max-width: 600px;
}

.note-panel-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.note-panel-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.note-panel-attachment-label {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}



.attachment-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.program-detail-link-row {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.attachment-status {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.attachment-link {
  color: var(--brand);
  text-decoration: underline;
}

.attachment-size {
  margin-left: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

.program-attachment {
  margin: 10px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: var(--text-main);
}

.program-attachment-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.program-attachment-link {
  color: var(--brand);
  text-decoration: underline;
  word-break: break-word;
}

.program-attachment-size {
  font-size: 0.85rem;
  color: var(--muted);
}

.program-private-empty {
  margin: 16px 0;
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: #f8fafc;
  color: var(--muted);
}

.program-private-tools {
  margin: 16px 0;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.program-note-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.program-note-row .program-note-button {
  flex: 0 0 auto;
}

.program-note-row .program-notes {
  flex: 1 1 220px;
}

.program-notes-empty {
  color: var(--muted);
  font-style: italic;
}

.program-private-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.program-private-heading {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.program-private-description {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.program-summary .program-interview {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
}

.program-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-items: center;
}

.program-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.program-actions .button-text {
  font-weight: 600;
}

.details-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--brand);
  background: rgba(79, 70, 229, 0.08);
  color: var(--brand);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.details-link:hover {
  background: rgba(79, 70, 229, 0.16);
  text-decoration: none;
}

.edit-btn {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
  padding: 8px 16px;
  font-size: 0.875rem;
}

.edit-btn:hover {
  background: #047857;
  border-color: #047857;
}

.delete-btn {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  padding: 8px 16px;
  font-size: 0.875rem;
}

.delete-btn:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

@media (max-width: 640px) {
  #program-list {
    gap: 12px;
  }

  .program-card {
    padding: 16px 18px;
  }

  .program-content {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .program-info {
    flex: 1 1 auto;
    gap: 8px;
  }

  .program-header {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 12px;
  }

  .program-card .program-notes,
  .program-card .program-attachment {
    display: none;
  }

  .program-mobile-score {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    line-height: 1;
    padding-left: 12px;
    border-left: 1px solid var(--border);
    height: 100%;
    white-space: nowrap;
  }

  .program-card .program-heading {
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
  }

  .program-card .program-name {
    font-weight: 500;
    font-size: 1rem;
  }

  .program-card .program-rank {
    display: none;
  }

  .program-summary {
    display: none;
  }

  .program-actions {
    display: none;
  }

  .program-mobile-score-value {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-main);
  }

  .program-mobile-score-label {
    display: none;
  }

  .program-header .program-heading {
    flex: 1 1 auto;
  }

  .program-header .program-mobile-score {
    flex: 0 0 auto;
    width: auto;
  }
}

/* Interview calendar */
.calendar-layout {
  gap: 32px;
  padding: 32px 20px 64px;
}

.calendar-columns {
  display: grid;
  gap: 32px;
  grid-template-areas:
    "sidebar"
    "main";
}

.calendar-sidebar {
  grid-area: sidebar;
}

.calendar-main-column {
  grid-area: main;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.calendar-manage-card p {
  margin: 0 0 16px 0;
  color: var(--muted);
}

.calendar-manage-sections {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.calendar-manage-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
}

.calendar-manage-section h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.calendar-manage-section form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-subscription-card p:not(.status) {
  margin: 0 0 16px 0;
  color: var(--muted);
}

.calendar-subscription-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.calendar-subscription-actions input {
  flex: 1;
  min-width: 220px;
}

.calendar-subscription-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.calendar-subscription-buttons>* {
  white-space: nowrap;
}

.calendar-summary-card h1 {
  margin: 0 0 8px 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
}

.calendar-summary-card p {
  margin: 0 0 20px 0;
  color: var(--muted);
}

.calendar-upcoming h2 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
}

.calendar-upcoming-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.calendar-upcoming-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-hover);
}

.calendar-upcoming-date {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
}

.calendar-upcoming-name {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.calendar-upcoming-name:hover {
  text-decoration: underline;
}

.calendar-card h2 {
  margin: 0 0 16px 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-time-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 8px 0 0;
}

.form-time-field {
  flex: 1 1 160px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-schedule-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 12px 0;
}

.form-schedule-field {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (max-width: 720px) {
  .form-schedule-field {
    flex: 1 1 100%;
  }
}

/* Chat Page Specific Styles */

.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height));
  width: 100%;
  max-width: 100%;
  margin: 0;
  background: var(--surface-card);
  overflow: hidden;
}

.chat-top-nav-container {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0;
  z-index: 10;
}

.chat-nav-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 12px 24px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Firefox */
}

.chat-nav-scroll::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari/Opera */
}

.chat-channel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.chat-channel-btn:hover {
  background: var(--surface-hover);
  color: var(--brand);
}

.chat-channel-btn.active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-app);
  /* Use app bg for messages area context */
  position: relative;
  overflow: hidden;
}

/* Chat Header now just for room title if needed, or we can merge it? 
   Let's keep it for the title/topic but make it subtle or remove if the nav handles it.
   User said "make the top all the possible chats", so the nav IS the header effectively.
   But we might want a sub-header for the specific room title + topic.
   Let's keep .chat-header but make it minimal.
*/

.chat-header {
  padding: 1rem 1.5rem;
  background: var(--surface-card);
  border-bottom: 1px solid var(--border);
  display: none;
  /* Hide for now if nav is enough, or use for topic? Let's show it for title consistency. */
  align-items: center;
  justify-content: space-between;
  height: auto;
  min-height: 60px;
}

/* Actually, if we have a top bar of channels, we might not need the title repeated right below it.
   But let's keep it to show "Global Chat" vs "Emergency Medicine" explicitly.
   Actually, let's make .chat-header sticky? No, the nav is sticky.
*/
.chat-header {
  display: flex;
}


.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  max-width: 70%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  position: relative;
  word-wrap: break-word;
  line-height: 1.5;
  font-size: 0.95rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.message.own {
  align-self: flex-end;
  background: var(--brand);
  color: white;
  border-bottom-right-radius: 2px;
}

.message.other {
  align-self: flex-start;
  background: var(--surface-card);
  /* White card for others */
  color: var(--text-main);
  border: 1px solid var(--border);
  border-bottom-left-radius: 2px;
}

.message-meta {
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
  opacity: 0.8;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: inherit;
}

.chat-input-area {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface-card);
}

.chat-input-wrapper {
  display: flex;
  gap: 0.75rem;
  background: var(--surface-card);
}

.chat-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-app);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
}

.chat-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}

@media (max-width: 768px) {
  .chat-container {
    height: calc(100vh - 60px);
    margin-top: 0;
  }
}

.calendar-week-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.calendar-week-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-main);
}

.calendar-week-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.calendar-week-manage-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  white-space: nowrap;
}

.calendar-week-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.calendar-week-card {
  display: none;
}

.calendar-week-range {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.calendar-week-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-week-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-card);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-week-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

.calendar-week-date {
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.calendar-week-time {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--muted);
}

.calendar-week-meta .calendar-item-tag {
  margin-left: auto;
}

.calendar-week-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  word-break: break-word;
}

.calendar-week-name:hover,
.calendar-week-name:focus {
  text-decoration: underline;
  color: var(--brand);
}

.calendar-week-location {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
  word-break: break-word;
}

.calendar-week-empty {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.calendar-months {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.calendar-month {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-card);
  padding: 16px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-month-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.calendar-month-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 60%;
}

.calendar-month-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.calendar-open-manage-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  white-space: nowrap;
  padding: 10px 14px;
}

.calendar-month-header h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  flex: 1 1 auto;
}

.calendar-month-nav {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-nav-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-card);
  color: var(--text-main);
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.calendar-nav-button:hover,
.calendar-nav-button:focus-visible {
  border-color: var(--brand);
  background: rgba(79, 70, 229, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.calendar-cell-muted {
  background: rgba(148, 163, 184, 0.15);
  border-style: dashed;
  color: var(--muted);
}

.calendar-legend {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.calendar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(148, 163, 184, 0.18);
  color: var(--muted);
}

.calendar-legend-interview {
  background: rgba(79, 70, 229, 0.16);
  color: var(--brand-dark);
}

.calendar-legend-other,
.calendar-legend-social {
  background: rgba(16, 185, 129, 0.18);
  color: #047857;
}

.calendar-todo-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calendar-todo-form {
  margin: 0;
}

.calendar-todo-input-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.calendar-todo-input-row input {
  flex: 1;
}

.calendar-todo-input-row button {
  white-space: nowrap;
}

.calendar-todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calendar-todo-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.calendar-todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.calendar-todo-item[draggable="true"] {
  cursor: grab;
}

.calendar-todo-item.is-dragging {
  opacity: 0.7;
  border-color: var(--brand);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.15);
  cursor: grabbing;
}

.calendar-todo-item:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.calendar-todo-item-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.calendar-todo-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.calendar-todo-text {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-main);
  word-break: break-word;
}

.calendar-todo-item.is-completed {
  background: rgba(148, 163, 184, 0.12);
}

.calendar-todo-item.is-completed .calendar-todo-text {
  text-decoration: line-through;
  color: var(--muted);
}

.calendar-todo-delete {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.calendar-todo-delete:hover,
.calendar-todo-delete:focus-visible {
  color: var(--danger);
  background: rgba(220, 38, 38, 0.08);
  outline: none;
}

.calendar-grid-labels {
  margin-bottom: 4px;
}

.calendar-cell {
  min-height: 96px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.calendar-cell-label {
  min-height: auto;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}

.calendar-cell-empty {
  background: transparent;
  border: none;
}

.calendar-cell-has-events {
  background: rgba(79, 70, 229, 0.1);
  border-color: rgba(79, 70, 229, 0.35);
}

.calendar-cell-today {
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.35);
}

.calendar-day-number {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  padding-right: 20px;
}

.calendar-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  width: 100%;
}

.calendar-add-button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(79, 70, 229, 0.12);
  color: var(--brand-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  z-index: 2;
}

.calendar-add-button:hover,
.calendar-add-button:focus-visible {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
  transform: translateY(-1px);
  outline: none;
}

.calendar-add-button span[aria-hidden="true"] {
  line-height: 1;
}

.calendar-add-menu {
  position: fixed;
  display: none;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  z-index: 40;
}

.calendar-add-menu.is-visible {
  display: flex;
}

.calendar-add-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-main);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.calendar-add-menu button:hover,
.calendar-add-menu button:focus-visible {
  background: rgba(79, 70, 229, 0.1);
  border-color: rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
  outline: none;
}

.calendar-add-menu button[data-add-type="interview"] {
  color: var(--brand-dark);
}

.calendar-add-menu button[data-add-type="other"] {
  color: #047857;
}

.calendar-add-menu button small {
  font-weight: 500;
  color: var(--muted);
}

.calendar-events li {
  width: 100%;
}

.calendar-event {
  display: block;
  width: 100%;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
  background: rgba(148, 163, 184, 0.18);
  color: var(--text-main);
  text-decoration: none;
  word-break: break-word;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.calendar-event:hover,
.calendar-event:focus-visible {
  text-decoration: none;
  outline: none;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
  transform: translateY(-1px);
}

.calendar-event--interview {
  background: rgba(79, 70, 229, 0.18);
  color: var(--brand-dark);
}

.calendar-event--other,
.calendar-event--social,
.calendar-event--info_session {
  background: rgba(16, 185, 129, 0.18);
  color: #047857;
}

.calendar-event-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.calendar-event-groups {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calendar-event-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 16px 16px;
  background: #fff;
}

.calendar-event-group[open] {
  padding-top: 8px;
}

.calendar-event-group summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 -16px;
  padding: 12px 16px;
}

.calendar-event-group summary::-webkit-details-marker {
  display: none;
}

.calendar-event-group summary::marker {
  content: '';
}

.calendar-event-group summary::after {
  content: '';
  width: 12px;
  height: 12px;
  border: solid var(--muted);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  pointer-events: none;
}

.calendar-event-group[open] summary::after {
  transform: rotate(-135deg);
}

.calendar-event-count {
  font-size: 0.85rem;
  color: var(--muted);
}

.calendar-event-group ul {
  margin-top: 16px;
}

.calendar-event-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calendar-event-empty {
  margin: 0;
  padding: 20px 16px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
  text-align: center;
}

.calendar-event-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.calendar-event-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.calendar-event-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.calendar-event-date {
  font-size: 0.85rem;
  color: var(--muted);
}

.calendar-event-location {
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-word;
}

.calendar-event-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.calendar-event-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.calendar-item-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-main);
  background: rgba(148, 163, 184, 0.2);
}

.calendar-item-tag-interview {
  background: rgba(79, 70, 229, 0.18);
  color: var(--brand-dark);
}

.calendar-item-tag-other {
  background: rgba(16, 185, 129, 0.18);
  color: #047857;
}

.calendar-empty {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Head-to-head */
.matchup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.matchup-heading {
  margin: 0;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.matchup-subhead {
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.matchup-subhead[hidden] {
  display: none;
}

.matchup-empty-cta {
  margin-top: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.matchup-empty-cta a {
  color: var(--brand);
  font-weight: 600;
}

.candidate-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  background: #fff;
  transition: all 0.15s ease;
  cursor: pointer;
  font: inherit;
  color: inherit;
  width: 100%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 160px;
  appearance: none;
}

.candidate-card:not(.is-disabled):hover,
.candidate-card:not(.is-disabled):focus-visible {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  transform: translateY(-2px);
  border-color: var(--brand);
}

.candidate-card:not(.is-disabled):focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.candidate-card.is-disabled,
.candidate-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  border-color: var(--border);
}

.candidate-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-main);
}

.equal-button {
  width: 100%;
  margin-top: 20px;
  background: #fff;
  color: var(--text-main);
  border-color: var(--border);
}

.equal-button:hover {
  background: var(--surface);
}

/* Status and messages */
.status {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.875rem;
}

.status.error {
  color: var(--danger);
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: var(--surface);
}

/* ELO rankings */
.elo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.elo-list-mobile {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
}

.mobile-ranking-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
  gap: 16px;
}

.mobile-ranking-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-main);
  min-width: 0;
}

.mobile-ranking-position {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  min-width: 1.75ch;
}

.mobile-ranking-name {
  flex: 1;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.mobile-ranking-score {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
  margin-left: auto;
}

.elo-note-button {
  border: none;
  background: transparent;
  padding: 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.program-note-button {
  margin: 0;
}

.elo-note-button:hover,
.elo-note-button:focus-visible,
.program-note-button:hover,
.program-note-button:focus-visible {
  color: var(--brand);
  background: rgba(79, 70, 229, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.elo-note-button.has-note,
.program-note-button.has-note {
  color: var(--warning);
}

.elo-actions .details-link {
  font-size: 0.875rem;
}

@media (max-width: 900px) {
  .elo-list {
    display: none;
  }

  .elo-list-mobile {
    display: grid;
    gap: 8px;
  }
}

/* Notes panel */
.note-panel {
  display: none;
  position: fixed;
  top: 24px;
  right: 24px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #fef3c7;
  border: 1px solid #facc15;
  border-radius: 14px;
  box-shadow: 0 18px 30px -12px rgb(15 23 42 / 0.45);
  padding: 16px 18px;
  z-index: 200;
}

.note-panel.is-visible {
  display: block;
  animation: note-panel-in 0.18s ease-out;
}

@keyframes note-panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.note-panel-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.note-panel-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.note-panel-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  border-radius: 8px;
  padding: 2px 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.note-panel-close:hover,
.note-panel-close:focus-visible {
  color: var(--brand-dark);
  background: rgba(79, 70, 229, 0.12);
  outline: none;
}

.note-panel-body textarea {
  width: 100%;
  min-height: 160px;
  border-radius: 10px;
  border: 1px solid #facc15;
  background: #fef9c3;
  padding: 12px;
  font-size: 0.95rem;
  color: var(--text-main);
  resize: vertical;
}

.note-panel-attachment-label {
  display: block;
  margin: 12px 0 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.note-panel-body input[type="file"] {
  width: 100%;
}

.note-panel-body textarea:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.note-panel-status {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  min-height: 1.25rem;
}

.note-panel-status.error {
  color: var(--danger);
}

.note-panel-actions {
  display: flex;
  justify-content: flex-end;
}

.note-panel-actions button {
  min-width: 120px;
}

@media (max-width: 640px) {
  .note-panel {
    right: 12px;
    left: 12px;
    top: 12px;
    width: auto;
    max-width: none;
  }
}

/* Compare programs */
.compare-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.compare-empty-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.compare-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.875rem;
  color: var(--text-main);
}

.compare-tag-name {
  font-weight: 600;
}

.compare-remove {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.compare-remove:hover,
.compare-remove:focus-visible {
  color: var(--danger);
  outline: none;
}

.comparison-table-container {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.compare-table th,
.compare-table td {
  border: 1px solid var(--border);
  padding: 12px;
  text-align: left;
  vertical-align: top;
  font-size: 0.875rem;
}

.compare-table thead th {
  background: var(--surface);
  font-size: 0.9375rem;
  font-weight: 600;
}

.compare-header-title {
  display: block;
  color: var(--text-main);
}

.compare-header-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.compare-group-cell {
  background: var(--surface);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  color: var(--muted);
}

.compare-section-cell {
  background: #f1f5f9;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-main);
}

.compare-table tbody tr:nth-of-type(odd) td {
  background: #f8fafc;
}

/* Auth pages */
.auth-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  min-height: 100vh;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #4338ca 100%);
  padding: 24px;
}

.auth-wrapper {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-wrapper header {
  text-align: center;
  color: #fff;
}

.auth-wrapper header h1 {
  margin: 0 0 8px 0;
  font-size: 2rem;
  font-weight: 700;
}

.auth-wrapper header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.tab-bar {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 4px;
}

.tab-button {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-button.active {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-main);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.error {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  margin-bottom: 16px;
}

.forms {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

.forms form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-footnote {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-footnote a {
  color: var(--brand);
  font-weight: 600;
}

/* Info page */
.info-body {
  background: linear-gradient(160deg, #eef2ff 0%, #f8fafc 55%, #e0f2fe 100%);
  color: var(--text-main);
}

.info-layout {
  max-width: 960px;
  margin: 0 auto;
  padding: 64px 24px 120px;
  display: grid;
  gap: 32px;
}

.info-layout header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.info-layout header h1 {
  margin: 0;
  font-size: 3.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.info-layout header p {
  margin: 0;
  font-size: 1.125rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 720px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  padding: 14px 28px;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 10px 25px -12px rgba(79, 70, 229, 0.8);
}

.cta:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 16px 30px -12px rgba(29, 78, 216, 0.75);
}

.info-layout .card {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-main);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 24px 48px -24px rgba(15, 23, 42, 0.25);
}

.info-layout .card h2 {
  color: var(--text-main);
  margin-bottom: 18px;
}

.info-layout .card p,
.info-layout .card li {
  color: var(--muted);
  line-height: 1.7;
}

.info-layout .card ul {
  margin: 20px 0;
  padding-left: 20px;
}

.info-layout .card code {
  background: rgba(79, 70, 229, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--brand);
}

.info-layout footer {
  text-align: center;
  padding: 32px 16px 48px;
  color: var(--muted);
}

.info-layout footer a {
  color: var(--brand);
  font-weight: 600;
}

/* Settings */
.new-category-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.new-category-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.new-category-form>div,
.new-category-form fieldset {
  display: grid;
  gap: 6px;
}

.new-category-form button {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 8px;
}

/* Setup */
body.setup-minimal {
  background: var(--surface);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
}

body.setup-minimal .site-header {
  display: none;
}

.setup-shell {
  min-height: 100vh;
  padding: 32px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  justify-content: center;
}

.setup-chrome {
  width: min(960px, 100%);
  display: flex;
  align-items: center;
  gap: 16px;
}

.setup-prev {
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.setup-prev[disabled],
.setup-prev[aria-disabled="true"] {
  opacity: 0.4;
  cursor: default;
}

.setup-prev:not([disabled]):hover,
.setup-prev:not([aria-disabled="true"]):hover {
  background: rgba(79, 70, 229, 0.1);
  color: var(--brand);
}

.setup-progress-track {
  flex: 1;
  height: 6px;
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  overflow: hidden;
}

.setup-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--brand);
  border-radius: inherit;
  transition: width 0.25s ease;
}

.setup-close {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.25rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.setup-close:hover,
.setup-close:focus-visible {
  background: rgba(79, 70, 229, 0.08);
  border-color: var(--brand);
  color: var(--brand);
  outline: none;
}

.setup-stage {
  width: min(780px, 100%);
}

.setup-panel {
  background: var(--card-bg);
  border-radius: 32px;
  padding: clamp(32px, 6vw, 64px);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.15);
  border: 1px solid var(--border);
  display: none;
  flex-direction: column;
  gap: 24px;
}

.setup-panel.is-active {
  display: flex;
}

.setup-question {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.setup-step-label {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.setup-question h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  color: var(--text-main);
}

.setup-question p {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
  line-height: 1.5;
}

body.setup-minimal label {
  color: var(--text-main);
}

body.setup-minimal input,
body.setup-minimal select,
body.setup-minimal textarea {
  background: #fff;
  border-color: var(--border);
  color: var(--text-main);
}

.setup-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.setup-actions button {
  min-width: 180px;
}

.setup-actions button,
.setup-next {
  border-radius: 999px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
}

.setup-actions button[type="submit"] {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-main);
}

.setup-actions button[type="submit"]:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.setup-next {
  border: none;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.setup-next:hover,
.setup-next:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 20px 35px rgba(79, 70, 229, 0.45);
  outline: none;
}

.setup-stage form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.category-choice-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.category-choice {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 18px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-choice input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.category-choice-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-choice-name {
  font-weight: 600;
  color: var(--text-main);
}

.category-choice-input {
  border: none;
  background: transparent;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 0;
  width: 100%;
}

.category-choice-input:focus {
  outline: none;
  border-bottom: 1px solid var(--brand);
}

.category-choice.is-selected {
  border-color: var(--brand);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15);
}

.category-choice-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

@media (max-width: 640px) {
  .setup-shell {
    padding: 16px;
    justify-content: flex-start;
  }

  .setup-chrome {
    flex-direction: column;
    align-items: stretch;
  }

  .setup-prev {
    align-self: flex-start;
  }

  .setup-stage {
    width: 100%;
  }

  .setup-panel {
    border-radius: 24px;
    padding: 32px 20px 40px;
  }
}

/* Utility classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Specialty rankings */
.specialty-layout {
  gap: 32px;
  padding: 32px 20px 64px;
}

.intro-card p {
  margin: 0;
}

.intro-card p+p {
  margin-top: 8px;
  color: var(--muted);
}

.specialty-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.specialty-card-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.specialty-card-header h2 {
  margin: 0;
}

.specialty-card-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.ranking-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.specialty-highlight {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.specialty-categories {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.specialty-category-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.specialty-category-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.specialty-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.specialty-category-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  font-size: 0.95rem;
  color: var(--text-main);
}

.specialty-category-name {
  font-weight: 400;
  color: var(--text-main);
  line-height: 1.4;
}

.specialty-top-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.specialty-top-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.specialty-rank {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand);
}

.specialty-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

.specialty-score {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--muted);
}

.ranking-column h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.ranking-podium {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
}

.podium-item {
  flex: 0 1 240px;
  display: flex;
  justify-content: center;
}

.podium-column {
  --podium-height: 130px;
  position: relative;
  width: 100%;
  max-width: 220px;
  min-height: var(--podium-height);
  padding: 16px 12px 20px;
  border-radius: 18px 18px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.3), rgba(79, 70, 229, 0.6));
  box-shadow: 0 16px 32px rgba(17, 25, 40, 0.18);
  text-align: center;
}

.podium-place-1 .podium-column {
  --podium-height: 180px;
  background: linear-gradient(180deg, #facc15 0%, #f59e0b 100%);
  color: #3b2100;
}

.podium-place-2 .podium-column {
  --podium-height: 155px;
  background: linear-gradient(180deg, #e2e8f0 0%, #94a3b8 100%);
  color: #1f2937;
}

.podium-place-3 .podium-column {
  --podium-height: 140px;
  background: linear-gradient(180deg, #f97316 0%, #c2410c 100%);
  color: #3b1708;
}

.podium-medal {
  font-size: 1.8rem;
  line-height: 1;
}

.podium-name {
  font-weight: 600;
  font-size: 1rem;
  word-break: break-word;
}

.podium-score {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: 0.95rem;
  opacity: 0.85;
}

.ranking-empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Mock Interview */
.mock-interview-layout {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.mock-interview-layout .form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 16px;
}

.mock-interview-layout input[type="file"] {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mock-interview-layout input[type="file"]:hover,
.mock-interview-layout input[type="file"]:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.mock-interview-layout input[list] {
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='10' viewBox='0 0 14 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 2l5 5 5-5' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
  padding-right: 48px;
}

.mock-interview-layout input[list]:focus {
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  outline: none;
}

.mock-interview-layout select {
  appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='10' viewBox='0 0 14 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 2l5 5 5-5' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.mock-interview-layout select:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.mock-interview-layout select:focus {
  outline: none;
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.interview-display {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(79, 70, 229, 0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.question-summary {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  text-transform: none;
  letter-spacing: normal;
}

.interviewer-script {
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.7;
}

.interview-audio {
  width: 100%;
  margin-top: 8px;
}

.feedback-panel {
  margin-top: 24px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(5, 150, 105, 0.3);
  background: rgba(5, 150, 105, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feedback-label {
  font-weight: 600;
  color: var(--success);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.feedback-focus {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.interview-controls {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
}

.mic-status {
  font-size: 0.9rem;
  color: var(--muted);
}

.control-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-action {
  min-width: 160px;
}

.typed-response {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.interview-log {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.interview-log .log-entry {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(148, 163, 184, 0.14);
}

.interview-log .log-entry.log-interviewer {
  border-color: rgba(79, 70, 229, 0.35);
  background: rgba(79, 70, 229, 0.12);
}

.interview-log .log-entry.log-candidate {
  border-color: rgba(5, 150, 105, 0.3);
  background: rgba(5, 150, 105, 0.1);
}

.interview-log .log-entry-header {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.interview-log .log-entry-body {
  margin: 0;
  color: var(--text-main);
  line-height: 1.6;
}

.mail-config-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.mail-app {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mail-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.mail-columns {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(240px, 320px) 1fr;
  min-height: 520px;
}

.mail-thread-list {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
}

.mail-thread-item {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s ease;
}

.mail-thread-item:hover {
  background: var(--surface);
}

.mail-thread-item.is-active {
  background: var(--surface);
  border-left: 4px solid var(--brand);
  padding-left: 14px;
}

.mail-thread-item h3 {
  margin: 0 0 6px 0;
  font-size: 1rem;
  font-weight: 600;
}

.mail-thread-item .mail-item-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.mail-thread-item .mail-item-snippet {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.mail-message-detail {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 24px;
  overflow-y: auto;
}

.mail-message-header {
  margin-bottom: 16px;
}

.mail-message-header h3 {
  margin: 0 0 8px 0;
}

.mail-message-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 6px 0;
}

.mail-message-body {
  white-space: pre-wrap;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  font-family: inherit;
  font-size: 1rem;
}

.mail-attachments {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mail-attachments a {
  color: var(--brand);
  font-weight: 500;
}

.mail-empty {
  text-align: center;
  color: var(--muted);
  padding: 36px 12px;
}

.mail-compose {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mail-compose .form-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.mail-compose textarea {
  min-height: 160px;
  resize: vertical;
}

.mail-status {
  color: var(--muted);
  font-size: 0.9rem;
  min-height: 1.4em;
}

.mail-status.error {
  color: var(--danger);
}

.mail-status.success {
  color: var(--success);
}

/* Interview Map */
.map-view-layout {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  display: block;
  min-height: calc(100vh - var(--header-height));
}

.map-empty-state {
  text-align: center;
  padding: 32px 16px;
  border: 1px dashed #cbd5f5;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
}

.map-full-empty {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 0;
  border: none;
}

#map-frame {
  width: 100%;
  height: calc(100vh - var(--header-height));
  min-height: 560px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #0f172a;
  display: block;
}

@media (max-width: 720px) {
  .mock-interview-layout {
    grid-template-columns: 1fr;
  }

  .interview-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .control-buttons {
    width: 100%;
  }

  .control-buttons>button {
    flex: 1;
  }
}

@media (max-width: 1200px) {
  .ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 20px;
    height: auto;
  }

  .header-bar {
    width: 100%;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-link {
    display: block;
    padding: 12px 16px;
    border-radius: 0;
    text-align: center;
  }

  .nav-link+.nav-link {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .layout {
    padding: 0 16px;
    margin: 24px auto 80px;
    gap: 20px;
  }

  .mail-columns {
    grid-template-columns: 1fr;
  }

  .specialty-layout {
    padding: 24px 16px 56px;
    gap: 24px;
  }

  .card {
    padding: 20px 24px;
  }

  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .slider-grid {
    grid-template-columns: 1fr;
  }

  .matchup-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .ranking-podium {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .podium-item {
    flex: 1 1 auto;
    justify-content: stretch;
  }

  .podium-column {
    --podium-height: auto;
    min-height: 0;
    align-items: flex-start;
    text-align: left;
    padding: 16px;
    gap: 8px;
    border-radius: 16px;
    max-width: none;
  }

  .podium-medal {
    font-size: 1.4rem;
  }

  .program-metrics {
    margin-bottom: 20px;
  }

  .program-metrics-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    padding: 14px 16px;
  }

  .histogram {
    padding: 24px 8px 14px;
  }

  .histogram-bars {
    min-height: 100px;
  }

  .histogram-pointer-label {
    font-size: 0.7rem;
  }

  .program-content {
    flex-direction: column;
    gap: 24px;
  }

  .program-summary {
    width: 100%;
    min-width: 0;
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 20px;
  }

  .program-header {
    flex-direction: column;
    gap: 12px;
    align-items: start;
  }

  .candidate-actions {
    flex-direction: column;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-time-row {
    flex-direction: column;
    gap: 8px;
  }

  .calendar-layout {
    padding: 24px 16px 56px;
    gap: 24px;
  }

  .calendar-columns {
    grid-template-columns: 1fr;
    grid-template-areas:
      "sidebar"
      "main";
    gap: 20px;
  }

  .calendar-main-column {
    gap: 24px;
  }

  .calendar-open-manage-button {
    display: none;
  }

  .calendar-week-controls {
    width: 100%;
    justify-content: space-between;
  }

  .calendar-week-manage-button {
    flex: 1 1 auto;
    justify-content: center;
  }

  .calendar-card {
    display: none;
  }

  .calendar-week-card {
    display: block;
  }

  .calendar-upcoming-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .calendar-months {
    grid-template-columns: 1fr;
  }

  .calendar-cell {
    min-height: 80px;
  }

  .calendar-month-header h1 {
    font-size: 1.2rem;
  }

  .calendar-nav-button {
    width: 32px;
    height: 32px;
  }

  .calendar-legend {
    justify-content: flex-start;
  }

  .calendar-event-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .calendar-event-actions {
    justify-content: flex-start;
  }

  .calendar-program-item {
    padding: 14px 16px;
  }

  .calendar-program-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .calendar-program-actions {
    justify-content: flex-start;
  }

  .calendar-event-group summary::after {
    margin-left: auto;
  }

  #map-frame {
    min-height: 420px;
  }

  .auth-wrapper {
    padding: 0 16px;
  }

  .info-layout {
    padding: 32px 20px 64px;
  }

  .info-layout header h1 {
    font-size: 2.25rem;
  }
}

@media (max-width: 520px) {
  .calendar-cell {
    padding: 6px;
  }

  .calendar-cell-label {
    font-size: 0.7rem;
  }

  .calendar-day-number {
    font-size: 0.85rem;
  }

  .calendar-nav-button {
    width: 30px;
    height: 30px;
  }

  .calendar-month-header h1 {
    font-size: 1.05rem;
  }
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand);
  text-decoration: none;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  display: inline;
}

.link-button:hover {
  text-decoration: underline;
}

.danger-button {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.danger-button:hover {
  background: #fecaca;
  border-color: #fca5a5;
}

/* Comparison Page */
.comparison-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* Feature Rows for Info Page (Added) */
.feature-section {
  display: flex;
  flex-direction: column;
  gap: 80px;
  padding: 40px 0;
}

.feature-row {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}

.feature-content {
  flex: 1;
}

.feature-image {
  flex: 1;
  width: 100%;
}

.feature-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.feature-image img:hover {
  transform: translateY(-4px);
}

.feature-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.feature-content p {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0 0 24px 0;
}

.feature-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (min-width: 1024px) {
  .feature-row {
    flex-direction: row;
    gap: 64px;
  }

  .feature-row.reverse {
    flex-direction: row-reverse;
  }
}