:root {
  color-scheme: light;
  --orange: #ff5500;
  --orange-dark: #e64d00;
  --ink: #111111;
  --muted: #666666;
  --soft: #f2f2f2;
  --line: #e5e5e5;
  --panel: #ffffff;
  --danger: #b42318;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f7f7f7;
  color: var(--ink);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #333333;
  color: #ffffff;
  border-top: 4px solid var(--orange);
}

.topbar-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 16px;
  background: var(--orange);
  font-weight: 800;
}

.brand-mark {
  width: 28px;
  height: 18px;
  display: block;
  border-radius: 20px 20px 12px 12px;
  background:
    linear-gradient(90deg, transparent 0 12%, #fff 12% 18%, transparent 18% 28%, #fff 28% 34%, transparent 34% 44%, #fff 44% 50%, transparent 50%),
    #ffffff;
  clip-path: polygon(8% 70%, 14% 50%, 25% 48%, 33% 28%, 44% 26%, 54% 42%, 68% 40%, 82% 54%, 92% 70%, 92% 100%, 8% 100%);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #d8d8d8;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: #ffffff;
}

.ghost-button,
.secondary-button,
.danger-button,
.primary-button {
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.ghost-button {
  margin-left: auto;
  padding: 8px 13px;
  background: transparent;
  border: 1px solid #777777;
  color: #ffffff;
}

.ghost-button:hover,
.primary-button:hover,
.secondary-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.hero {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.48)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 3px, transparent 3px 16px),
    linear-gradient(135deg, #2b2b2b, #ff6a00);
  color: #ffffff;
}

.hero-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 315px;
  display: grid;
  align-content: center;
  margin: 0 auto;
  padding: 44px 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(3rem, 8vw, 6.3rem);
  line-height: 0.95;
  font-weight: 850;
}

.hero-copy {
  max-width: 610px;
  margin-top: 18px;
  color: #f2f2f2;
  font-size: 1.18rem;
  line-height: 1.5;
}

.upload-section,
.search-section,
.library {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.upload-card {
  margin-top: -58px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.token-field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.token-field input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #cccccc;
  border-radius: 4px;
}

.uploader {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 230px;
  padding: 34px;
  border: 2px dashed #cccccc;
  background:
    linear-gradient(90deg, rgba(255, 85, 0, 0.08), transparent 52%),
    #fafafa;
  transition: border-color 160ms ease, background 160ms ease;
}

.uploader.is-dragging {
  border-color: var(--orange);
  background: #fff4ed;
}

.upload-copy {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 20px;
}

.upload-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 850;
}

.upload-copy h2 {
  font-size: 1.65rem;
  font-weight: 800;
}

.upload-copy p {
  grid-column: 2;
  margin-top: 7px;
  color: var(--muted);
  font-size: 1.02rem;
}

.primary-button {
  min-width: 174px;
  min-height: 46px;
  display: inline-grid;
  place-items: center;
  padding: 0 22px;
  background: var(--orange);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--orange-dark);
}

.progress-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

progress {
  width: 100%;
  height: 12px;
  accent-color: var(--orange);
}

.status {
  min-height: 34px;
  padding-top: 14px;
  color: var(--muted);
}

.search-section {
  padding-top: 28px;
}

.search-card {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  align-items: end;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.search-tabs {
  display: flex;
  border: 1px solid #dddddd;
  border-radius: 4px;
  overflow: hidden;
}

.search-tab {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid #dddddd;
  background: #f7f7f7;
  color: #555555;
  cursor: pointer;
  font-weight: 750;
}

.search-tab:last-child {
  border-right: 0;
}

.search-tab.is-active {
  background: var(--orange);
  color: #ffffff;
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.search-box input {
  min-height: 42px;
  width: 100%;
  padding: 0 13px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  background: #ffffff;
}

.library {
  padding: 24px 0 70px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: 1.8rem;
}

#fileCount {
  min-width: 38px;
  min-height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eeeeee;
  color: #333333;
  font-weight: 800;
}

.file-list {
  display: grid;
  gap: 14px;
}

.file-item {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(260px, 420px) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.file-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.file-art {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #ff5500, #222222);
}

.file-art span {
  width: 5px;
  border-radius: 999px;
  background: #ffffff;
}

.file-art span:nth-child(1) {
  height: 18px;
}

.file-art span:nth-child(2) {
  height: 34px;
}

.file-art span:nth-child(3) {
  height: 24px;
}

.file-text {
  min-width: 0;
}

.file-text h3 {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-text p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.88rem;
}

audio {
  width: 100%;
  min-width: 220px;
  height: 40px;
}

.file-actions {
  display: flex;
  gap: 8px;
}

.secondary-button,
.danger-button {
  display: inline-grid;
  min-height: 36px;
  min-width: 96px;
  place-items: center;
  padding: 0 12px;
  font-size: 0.88rem;
}

.secondary-button {
  background: #f2f2f2;
  color: #222222;
}

.danger-button {
  background: #fff1f0;
  color: var(--danger);
}

.empty {
  padding: 34px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 820px) {
  .topbar-inner,
  .upload-section,
  .search-section,
  .library,
  .hero-inner {
    width: min(100% - 24px, 1180px);
  }

  .nav-links {
    display: none;
  }

  .hero-inner {
    min-height: 260px;
  }

  .upload-card {
    margin-top: -34px;
    padding: 18px;
  }

  .uploader,
  .search-card,
  .file-item {
    grid-template-columns: 1fr;
  }

  .upload-copy {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .upload-icon {
    margin: 0 auto 16px;
  }

  .upload-copy p {
    grid-column: auto;
  }

  .primary-button,
  .secondary-button,
  .danger-button {
    width: 100%;
  }

  .file-actions {
    justify-content: stretch;
  }
}
