:root {
  color-scheme: light dark;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #657085;
  --line: #d9dfeb;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --danger: #b42318;
  --shadow: 0 18px 60px rgba(23, 32, 51, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), transparent 42%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(100%, 560px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 40px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 32px;
}

.mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

p {
  line-height: 1.6;
}

.state p,
.status,
.label,
dt {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.file {
  display: grid;
  gap: 28px;
}

.files {
  display: grid;
  gap: 18px;
}

.files-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.files-head h2 {
  margin: 0;
  font-size: 22px;
}

.files-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.file-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.file-name {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.file-meta {
  color: var(--muted);
  font-size: 13px;
}

.file-download {
  width: auto;
  min-width: 128px;
  min-height: 40px;
  padding: 0 14px;
}

.label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
}

dt {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.password {
  display: grid;
  gap: 8px;
  margin: 32px 0 18px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  background: transparent;
  color: inherit;
  font: inherit;
}

input:focus {
  outline: 3px solid rgba(15, 118, 110, 0.24);
  border-color: var(--accent);
}

button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.status {
  min-height: 24px;
  margin: 16px 0 0;
}

.status.error {
  color: var(--danger);
}

@media (max-width: 560px) {
  .shell {
    padding: 0;
    place-items: stretch;
  }

  .panel {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  dl {
    grid-template-columns: 1fr;
  }

  .file-item {
    grid-template-columns: 1fr;
  }

  .file-download {
    width: 100%;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101624;
    --panel: #151d2d;
    --text: #eef3fb;
    --muted: #a5b0c4;
    --line: #2c374b;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  }
}
