/* ─── RESET & BASE ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal:        #1D9E75;
  --teal-light:  #E1F5EE;
  --teal-mid:    #9FE1CB;
  --teal-dark:   #0F6E56;
  --bg:          #FAFAF8;
  --surface:     #F3F2EE;
  --border:      #E4E2DA;
  --text:        #1A1A18;
  --text-mid:    #4A4A46;
  --text-soft:   #8A8A84;
  --mono:        'DM Mono', monospace;
  --sans:        'DM Sans', sans-serif;
  --radius:      10px;
  --radius-lg:   16px;
}

html { font-size: 16px; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── NAV ───────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.nav-tag {
  font-size: 12px;
  color: var(--text-soft);
}

/* ─── HERO ──────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 3rem 32px 1.5rem;
}

.hero h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 300;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.accent { color: var(--teal); font-weight: 500; }

.hero-sub {
  font-size: 15px;
  color: var(--text-mid);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── VALUE CARDS ───────────────────────────────────── */
.value-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 1.5rem 32px;
  flex-wrap: wrap;
}

.value-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-mid);
}

.value-icon { font-size: 16px; }

/* ─── MAIN ──────────────────────────────────────────── */
.main {
  flex: 1;
  padding: 0 32px 2rem;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

/* ─── DROP ZONE ─────────────────────────────────────── */
.drop-zone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 1rem;
  text-align: center;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 1.5rem;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--teal);
  background: var(--teal-light);
}

.drop-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.drop-icon-wrap {
  color: var(--text-soft);
  margin-bottom: 4px;
}

.drop-label {
  font-size: 14px;
  color: var(--text-mid);
}

.browse-link {
  color: var(--teal);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.drop-hint {
  font-size: 12px;
  color: var(--text-soft);
}

.format-badges {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--teal-light);
  color: var(--teal-dark);
  font-family: var(--mono);
}

/* ─── PANELS ────────────────────────────────────────── */
.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 1rem;
}

.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.panel-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.panel-hint {
  font-size: 11px;
  color: var(--text-soft);
  font-family: var(--mono);
}

.panel-body {
  padding: 14px;
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
}

/* ─── FILE LIST ─────────────────────────────────────── */
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}

.file-item:hover { background: var(--teal-light); border-color: var(--teal-mid); }
.file-item.active { background: var(--teal-light); border-color: var(--teal); }

.file-ext {
  font-size: 10px;
  font-weight: 500;
  font-family: var(--mono);
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--border);
  color: var(--text-mid);
  flex-shrink: 0;
}

.file-name {
  font-size: 13px;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

.status-waiting  { background: var(--surface); color: var(--text-soft); border: 1px solid var(--border); }
.status-converting { background: #FAEEDA; color: #854F0B; }
.status-done     { background: var(--teal-light); color: var(--teal-dark); }
.status-error    { background: #FCEBEB; color: #A32D2D; }

/* ─── MARKDOWN PREVIEW ──────────────────────────────── */
.md-preview {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ─── ACTIONS ───────────────────────────────────────── */
.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.btn-primary {
  background: var(--teal);
  color: white;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--sans);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover { background: var(--teal-dark); }

.btn-secondary {
  background: transparent;
  color: var(--text-mid);
  border: 1px solid var(--border);
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--sans);
  cursor: pointer;
  transition: border-color 0.15s;
}

.btn-secondary:hover { border-color: var(--text-soft); }

/* ─── STATUS BAR ────────────────────────────────────── */
.status-bar {
  margin-top: 12px;
  padding: 10px 16px;
  background: var(--teal-light);
  border: 1px solid var(--teal-mid);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--teal-dark);
  text-align: center;
}

/* ─── FOOTER ────────────────────────────────────────── */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-copy { font-size: 12px; color: var(--text-soft); }

.credits-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--teal);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  padding: 0;
}

.credits-btn:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ─── MODAL ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-title { font-size: 14px; font-weight: 500; color: var(--text); }

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-soft);
  padding: 4px;
  border-radius: 6px;
  display: flex;
}

.modal-close:hover { background: var(--surface); }

.modal-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.25rem;
}

.modal-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--teal-light);
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--mono);
}

.modal-name { font-size: 15px; font-weight: 500; color: var(--text); margin-bottom: 3px; }
.modal-role { font-size: 12px; color: var(--text-soft); line-height: 1.5; }

.modal-bio {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-bottom: 1.25rem;
}

.modal-bio strong { color: var(--text); font-weight: 500; }

.modal-links { display: flex; gap: 8px; }

.modal-link {
  font-size: 12px;
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-mid);
  text-decoration: none;
  transition: border-color 0.15s;
}

.modal-link:hover { border-color: var(--text-soft); }
.modal-link.primary { background: var(--teal-light); color: var(--teal-dark); border-color: var(--teal-mid); }
.modal-link.primary:hover { background: var(--teal-mid); }

/* ─── SCROLLBAR ─────────────────────────────────────── */
.panel-body::-webkit-scrollbar { width: 4px; }
.panel-body::-webkit-scrollbar-track { background: transparent; }
.panel-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ─── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 640px) {
  .panels { grid-template-columns: 1fr; }
  .nav, .main, .footer { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 2rem 16px 1rem; }
  .value-row { padding: 1rem 16px; }
}
/* ─── PROGRESS BAR ──────────────────────────────────── */
.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.progress-track {
  width: 100%;
  height: 5px;
  background: var(--teal-mid);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--teal-dark);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

/* ─── COPY BUTTON ───────────────────────────────────── */
.copy-btn {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid var(--teal-mid);
  background: var(--teal-light);
  color: var(--teal-dark);
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.15s;
}

.copy-btn:hover { background: var(--teal-mid); }
.copy-btn.copied { background: var(--teal); color: white; border-color: var(--teal); }

/* ─── DARK MODE ─────────────────────────────────────── */
.theme-btn {
  background: var(--text);
  border: none;
  border-radius: var(--radius);
  padding: 6px 9px;
  cursor: pointer;
  color: var(--bg);
  font-size: 17px;
  display: flex;
  align-items: center;
  transition: background 0.15s;
}

.theme-btn:hover { opacity: 0.85; }

body.dark {
  --bg:        #0F1010;
  --surface:   #1A1B1B;
  --border:    #2A2B2B;
  --text:      #F0EFEB;
  --text-mid:  #A8A8A2;
  --text-soft: #666662;
}

body.dark .panel,
body.dark .modal { background: #1A1B1B; }

body.dark .drop-zone { background: var(--surface); }
body.dark .drop-zone:hover { background: #0F2E22; }
body.dark .value-card { background: var(--surface); }
body.dark .file-item { background: var(--surface); }
body.dark .file-item:hover,
body.dark .file-item.active { background: #0F2E22; }
body.dark .panel-header { background: var(--surface); }
body.dark .nav { background: var(--bg); }
body.dark .footer { background: var(--bg); }

/* ─── WORKS WITH ────────────────────────────────────── */
.works-with {
  text-align: center;
  font-size: 12px;
  color: var(--text-soft);
  margin: -0.5rem 0 1.5rem;
  letter-spacing: 0.01em;
}

.works-with span {
  color: var(--text-mid);
  font-weight: 500;
}
/* ─── LANDING ───────────────────────────────────────── */
.landing {
  padding: 2rem 32px 2rem;
  text-align: center;
}

.landing-inner {
  max-width: 720px;
  margin: 0 auto;
}

.landing-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  background: var(--teal-light);
  color: var(--teal-dark);
  margin-bottom: 1.25rem;
  letter-spacing: 0.03em;
}

.landing-headline {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1rem;
}

.landing-sub {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 420px;
  margin: 0 auto 2rem;
}

.landing-compare {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 2rem;
  text-align: left;
}

.compare-col {
  flex: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.compare-label {
  font-size: 12px;
  font-weight: 500;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}

.compare-col.bad .compare-label { background: #FCEBEB; color: #A32D2D; }
.compare-col.good .compare-label { background: var(--teal-light); color: var(--teal-dark); }

.compare-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 11px;
  background: var(--surface);
  min-height: 110px;
}

.compare-col.bad .compare-content { color: var(--text-soft); }
.compare-col.good .compare-content { color: var(--text-mid); }

.md-h1 { color: var(--text); font-weight: 500; font-size: 12px; }
.md-h2 { color: var(--text-mid); font-size: 11px; }

.compare-arrow {
  font-size: 24px;
  color: var(--teal);
  flex-shrink: 0;
}

.landing-cta {
  display: inline-block;
  background: var(--teal);
  color: white;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}

.landing-cta:hover { background: var(--teal-dark); }

/* Dark mode landing */
body.dark .compare-content { background: var(--surface); }
body.dark .landing-badge { background: #0F2E22; }