/* nullaudit — style.css
   Design rules: minimalist. No frameworks. No shadows. No rounded corners. */

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ── Theme tokens ──────────────────────────────────────── */
:root,
[data-theme="dark"] {
  --bg:             #0e0e10;
  --bg-soft:        #141417;
  --fg:             #e8e8e8;
  --fg-muted:       #8a8a8f;
  --border:         #26262b;
  --border-strong:  #3a3a42;
  --accent:         #e8e8e8;
  --accent-fg:      #0e0e10;
  --danger:         #d16060;
}

[data-theme="light"] {
  --bg:             #fafafa;
  --bg-soft:        #ffffff;
  --fg:             #111113;
  --fg-muted:       #6a6a70;
  --border:         #e2e2e5;
  --border-strong:  #c8c8cd;
  --accent:         #111113;
  --accent-fg:      #fafafa;
  --danger:         #b13b3b;
}

/* ── Base ──────────────────────────────────────────────── */
html {
  font-size: 16px;
  color-scheme: dark light;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

/* ── Header ────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.linklike {
  background: none;
  border: none;
  color: var(--fg-muted);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0;
  font-variant-numeric: tabular-nums;
}
.linklike:hover { color: var(--fg); }

/* ── Main ──────────────────────────────────────────────── */
.site-main {
  flex: 1;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.page-sub {
  color: var(--fg-muted);
  margin: 0 0 2.25rem;
}

/* ── Tool ──────────────────────────────────────────────── */
#merge-form { display: block; }

.dropzone {
  padding: 2.75rem 1.5rem;
  border: 1px dashed var(--border-strong);
  background: var(--bg-soft);
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: border-color 100ms ease;
}
.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-dragover {
  border-color: var(--fg);
  border-style: solid;
}

.dropzone-main {
  margin: 0;
  color: var(--fg);
}
.dropzone-hint {
  margin: 0.35rem 0 0;
  color: var(--fg-muted);
  font-size: 0.8125rem;
}

/* ── File list ─────────────────────────────────────────── */
.file-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.file-list:empty { display: none; }

.file-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1.25rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  color: var(--fg-muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.file-remove {
  background: none;
  border: none;
  color: var(--fg-muted);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0;
}
.file-remove:hover {
  color: var(--danger);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Actions ───────────────────────────────────────────── */
.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  font: inherit;
  font-size: 0.9375rem;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: var(--accent-fg);
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: opacity 100ms ease;
}
.btn:hover:not(:disabled) { opacity: 0.82; }
.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-quiet {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}
.btn-quiet:hover:not(:disabled) {
  opacity: 1;
  border-color: var(--fg);
}

/* ── Status ────────────────────────────────────────────── */
.status {
  margin: 1rem 0 0;
  min-height: 1.2rem;
  font-size: 0.875rem;
}
.status.is-error { color: var(--danger); }
.status.is-ok    { color: var(--fg-muted); }

.remaining {
  margin: 0.35rem 0 0;
  color: var(--fg-muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  min-height: 1.2rem;
}

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.5rem 2rem;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  color: var(--fg-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}
.site-footer p { margin: 0.25rem 0; }

/* ── Focus ─────────────────────────────────────────────── */
button:focus-visible,
a:focus-visible,
.dropzone:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 2px;
}

/* ── Mobile ────────────────────────────────────────────── */
@media (max-width: 480px) {
  .site-main { padding: 2rem 1rem 3rem; }
  .site-header { padding: 1rem; }
  .site-footer { padding: 1.25rem 1rem 1.75rem; }
  .file-item { grid-template-columns: 1fr auto; gap: 1rem; }
  .file-size { display: none; }
  .dropzone { padding: 2rem 1rem; }
}

/* ── Download area ─────────────────────────────────────── */
.download-area {
  margin-top: 1rem;
}
.download-area .btn {
  display: inline-block;
  text-decoration: none;
}

/* ── Brand mark ────────────────────────────────────────── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-mark {
  display: block;
  width: 20px;
  height: 20px;
}


/* ── Landing page tool list ────────────────────────────── */
.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.tool-item {
  border-bottom: 1px solid var(--border);
}

.tool-link {
  display: block;
  padding: 1.35rem 0;
  text-decoration: none;
  color: var(--fg);
  transition: opacity 100ms ease;
}

.tool-link:hover {
  opacity: 0.75;
  text-decoration: none;
}

.tool-name {
  font-size: 1.0625rem;
  font-weight: 500;
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.tool-desc {
  font-size: 0.875rem;
  color: var(--fg-muted);
  margin: 0;
  line-height: 1.5;
}