@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Work+Sans:wght@300;400;500;600&display=swap');

:root {
  --ink: #101418;
  --muted: #5c6671;
  --accent: #c77c2e;
  --accent-dark: #a86520;
  --accent-light: #d89044;
  --blue: #2c5282;
  --blue-light: #3d6ca3;
  --paper: #f6f3ee;
  --panel: #ffffff;
  --border: #d7d0c6;
  --shadow: 0 18px 40px rgba(16, 20, 24, 0.12);
  --shadow-sm: 0 4px 12px rgba(16, 20, 24, 0.08);
  --notice: #fff7e6;
  --notice-border: #f0d6a5;
  --stripe: #fafafa;
  --hover: #f8f5f1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Work Sans', system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #1a2a3a 0%, #0f1620 50%, #1a1f2e 100%);
  min-height: 100vh;
  line-height: 1.6;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.banner {
  display: flex;
  justify-content: center;
  background: var(--panel);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 20px;
  transition: transform 0.3s ease;
}

.banner:hover {
  transform: translateY(-2px);
}

.banner__image {
  width: min(720px, 100%);
  height: auto;
  border-radius: 16px;
  transition: transform 0.3s ease;
}

.banner:hover .banner__image {
  transform: scale(1.01);
}

.hero {
  margin-top: 24px;
  background: linear-gradient(135deg, #243b55, #141e30);
  color: #fdf7f0;
  padding: 48px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 60%);
  pointer-events: none;
}

.hero__inner {
  display: flex;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.hero__logo-wrap {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

.hero__logo-wrap:hover {
  transform: rotate(5deg) scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.hero__logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  display: block;
}

.hero__content {
  flex: 1;
  max-width: 720px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: rgba(253, 247, 240, 0.7);
  margin: 0 0 12px;
}

h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  margin: 0 0 12px;
}

h2 {
  font-family: 'DM Serif Display', serif;
  margin: 0 0 16px;
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: var(--ink);
}

.lede {
  margin: 0;
  color: rgba(253, 247, 240, 0.85);
  line-height: 1.6;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-top: 24px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(16, 20, 24, 0.08);
  transition: box-shadow 0.3s ease;
}

.panel:hover {
  box-shadow: 0 14px 32px rgba(16, 20, 24, 0.12);
}

.notice {
  background: var(--notice);
  border-color: var(--notice-border);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.notice__icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
  opacity: 0.9;
}

.notice__content {
  flex: 1;
}

.notice__content h2 {
  margin-top: 0;
}

.notice p {
  margin: 8px 0;
  color: #3b2a14;
  line-height: 1.6;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field--buttons {
  justify-content: flex-end;
  gap: 10px;
  flex-direction: row;
}

label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
}

input,
select,
button,
textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--accent-light);
}

textarea {
  resize: vertical;
}

button {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.btn-primary {
  background: var(--accent);
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(199, 124, 46, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 14px;
  line-height: 1;
}

button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
  font-weight: 500;
}

button.ghost:hover {
  background: var(--hover);
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.results__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.pager {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-indicator {
  min-width: 40px;
  text-align: center;
  padding: 6px 12px;
  background: var(--stripe);
  border-radius: 8px;
  font-weight: 600;
  color: var(--blue);
  border: 1px solid var(--border);
}

.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

thead {
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

th,
td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

td {
  transition: background 0.2s ease;
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  padding-top: 16px;
  padding-bottom: 16px;
}

tbody tr:nth-child(even) td {
  background: var(--stripe);
}

tbody tr:hover td {
  background: var(--hover) !important;
  cursor: pointer;
}

.corrections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.corrections > div:first-child {
  padding-right: 16px;
  border-right: 2px solid var(--border);
}

.corrections h2 {
  margin-top: 0;
  color: var(--blue);
}

.corrections p {
  line-height: 1.7;
  color: var(--muted);
}

.status {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .corrections {
    grid-template-columns: 1fr;
  }
  
  .corrections > div:first-child {
    border-right: none;
    border-bottom: 2px solid var(--border);
    padding-right: 0;
    padding-bottom: 24px;
    margin-bottom: 8px;
  }
  
  .notice {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 32px 24px;
    text-align: center;
  }

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

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

  .results__meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Loading States */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Badges for Motion Types */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge--written {
  background: #e6f2ff;
  color: #2c5282;
  border: 1px solid #bdd9f2;
}

.badge--oral {
  background: #fff5e6;
  color: #c77c2e;
  border: 1px solid #f0d6a5;
}

/* Success/Error States */
.status.success {
  color: #2d7a3e;
  background: #e8f5e9;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #94d3a2;
}

.status.error {
  color: #b71c1c;
  background: #ffebee;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ef9a9a;
}

/* Smooth Transitions */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus Visible for Accessibility */
*:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Disabled State */
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button:disabled:hover {
  transform: none;
  box-shadow: none;
}
