@import url('https://fonts.googleapis.com/css2?family=Encode+Sans:wght@400;500;600;700&display=swap');

/* ── Reset & base ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #e7e5e5;
  --color-surface: #ffffff;
  --color-border: rgba(0, 0, 0, 0.2);
  --color-primary: #169b1d;
  --color-primary-h: #15741a;
  --color-text: #1e293b;
  --color-muted: #64748b;
  --color-danger: #dc2626;
  --color-warning: #d97706;
  --color-success: #16a34a;
  --radius: 8px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 16px rgba(0, 0, 0, .2);
  font-family: 'Encode Sans', system-ui, -apple-system, sans-serif;
  color: var(--color-text);
}

body {
  background: var(--color-bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Typography ─────────────────────────────────────────────── */
h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

p {
  line-height: 1.6;
  color: var(--color-muted);
}

.mono {
  /* font-family: ui-monospace, monospace; */
  font-variant-numeric: tabular-nums;
}

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  flex: 1;
}

/* ── Header ─────────────────────────────────────────────────── */
.page-header {
  background: var(--color-surface);
  border-bottom: 0px solid var(--color-border);
  padding: .875rem 1.5rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.brand {
  display: flex;
  align-items: center;
  gap: .625rem;
}

.brand-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  /* letter-spacing: -.01em; */
}

/* ── Footer ─────────────────────────────────────────────────── */
.page-footer {
  text-align: center;
  padding: 1.25rem;
  font-size: .8125rem;
  color: var(--color-muted);
}

.page-footer strong {
  color: var(--color-text);
}


.page-footer a {
  text-decoration: none;
  color: var(--color-primary-h);
  text-underline-offset: 0.2em;
}

.page-footer a:hover {
  text-decoration: underline;
  color: var(--color-primary);
}


/* ── Download card ──────────────────────────────────────────── */
.download-card {
  background: var(--color-surface);
  border: 0px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.greeting h1 {
  color: var(--color-text);
}

.greeting .subtitle {
  margin-top: .25rem;
  font-size: 1.0625rem;
}

/* ── Meta bar ───────────────────────────────────────────────── */
.meta-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: .875rem 1rem;
}

.meta-divider {
  width: 1px;
  height: 2rem;
  background: var(--color-border);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: .125rem;
}

.meta-label {
  font-size: .75rem;
  text-transform: uppercase;
  /* letter-spacing: .05em; */
  color: var(--color-muted);
}

.meta-value {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
}

.meta-sub {
  font-size: .8125rem;
  color: var(--color-muted);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .9375rem;
  font-weight: 600;
  padding: .625rem 1.125rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: background .15s, transform .1s;
}

.btn:active {
  transform: scale(.98);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-h);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn-secondary:hover {
  background: #eff6ff;
}

.btn-sm {
  font-size: .875rem;
  padding: .5rem .875rem;
}

.btn-zip {
  width: 100%;
  justify-content: center;
  padding: .875rem;
  font-size: 1rem;
}

/* ── File list ──────────────────────────────────────────────── */
.file-list {
  display: flex;
  flex-direction: column;
  gap: .625rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .875rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}

.file-icon {
  color: var(--color-muted);
  flex-shrink: 0;
}

.file-icon svg {
  width: 20px;
  height: 20px;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  display: block;
  font-weight: 500;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  font-size: .8125rem;
  color: var(--color-muted);
}

/* ── Task label ─────────────────────────────────────────────── */
.task-label {
  font-size: .8125rem;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
  padding-top: .875rem;
}

/* ── Error card ─────────────────────────────────────────────── */
.error-card {
  text-align: center;
  align-items: center;
}

.error-icon {
  /* color: var(--color-danger); */
  color: var(--color-primary-h);
}

.error-icon svg {
  width: 48px;
  height: 48px;
}

.error-card h1 {
  margin-top: .5rem;
}

.error-card .help-text {
  font-size: .875rem;
}

/* ── Index page ─────────────────────────────────────────────── */
.index-main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.index-logo {
  width: 120px;
  height: auto;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .download-card {
    padding: 1.25rem;
  }

  .meta-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .meta-divider {
    display: none;
  }

  .file-item {
    flex-wrap: wrap;
  }

  .btn-sm {
    width: 100%;
    justify-content: center;
  }
