:root {
  color-scheme: light;
  --paper: #f6f3ee;
  --ink: #1c1c1c;
  --muted: #8d8d8d;
  --line: #d5d5d5;
  --danger: #9a3b3b;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
}

button, input, textarea { font: inherit; }

button { cursor: pointer; }

a { color: #333; }

.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto 64px; }

.hero {
  padding: 4px 18px 2px;
  text-align: center;
  color: #161616;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(214, 230, 232, 0.55)),
    linear-gradient(115deg, #b7c9cc 0%, #d5e4e6 28%, #e7eef0 52%, #c9ddd8 100%);
}

.hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}

.hero h1 {
  margin: 28px 0 0;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero p {
  margin: 10px 0 0;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 400;
}

.menu { display: flex; align-items: center; gap: 4px; }

.menu-item {
  background: transparent;
  color: #222;
  border: 0;
  border-radius: 0;
  padding: 4px 12px;
}

.menu-item.active { box-shadow: inset 0 -2px 0 #222; }

.account { display: flex; align-items: center; gap: 12px; }

.last-login { color: #333; font-size: 0.92rem; white-space: nowrap; }

.auth { width: min(440px, calc(100% - 32px)); margin: 48px auto 0; }

.auth form { margin-top: 8px; }

form { display: grid; gap: 12px; }

label { display: grid; gap: 6px; }

input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #c8c8c8;
  background: transparent;
  border-radius: 0;
  padding: 10px 2px;
  color: var(--ink);
}

.page-title {
  margin: 6px 0 4px;
  text-align: center;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0 0 22px;
  text-align: center;
  color: var(--muted);
}

.page-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 0 0 8px;
}

.upload-action { justify-content: flex-start; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 28, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  padding: 16px;
}

.modal {
  width: min(420px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 22px 24px 8px;
  text-align: center;
}

.modal p { margin: 0 0 18px; font-size: 1.15rem; }

.primary, .quiet, .danger, .ghost {
  border-radius: 0;
  border: 1px solid transparent;
  padding: 8px 14px;
  background: transparent;
  color: #222;
}

.primary { border-color: #222; }

.primary:hover { background: #222; color: #fff; }

.quiet:hover, .ghost:hover { text-decoration: underline; }

.danger { color: var(--danger); }

.primary:disabled, .quiet:disabled, .danger:disabled, .ghost:disabled { opacity: 0.45; cursor: wait; }

.banner {
  background: #fff4f2;
  color: var(--danger);
  border: 1px solid #f0d0d0;
  padding: 10px 12px;
  margin-top: 16px;
}

.muted { color: var(--muted); }

.table-wrap { overflow-x: auto; background: transparent; }

table { width: 100%; border-collapse: collapse; min-width: 760px; background: transparent; }

th, td {
  text-align: left;
  padding: 14px 10px;
  border: 0;
  vertical-align: middle;
  background: transparent;
}

th {
  font-size: 1rem;
  font-weight: 700;
  color: #222;
  border-bottom: 1px solid #cfcfcf;
}

td { color: #4a4a4a; }

th button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
}

.name-link { color: #333; font-weight: 500; text-decoration: none; }

.name-link:hover { text-decoration: underline; }

.inline { display: flex; gap: 8px; align-items: center; }

.empty { padding: 28px 10px; color: var(--muted); }

.icon {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.icon.armed { background: #f8d6d6; border-color: #e7b0b0; }

.progress-wrap { margin: 0 auto 18px; max-width: 520px; }

.progress-label { margin-bottom: 6px; color: var(--muted); text-align: center; }

.progress-track {
  height: 8px;
  background: #e4e0da;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: #222;
}

.progress-bar.busy {
  width: 35%;
  animation: progress-slide 1.1s ease-in-out infinite;
}

@keyframes progress-slide {
  from { transform: translateX(-120%); }
  to { transform: translateX(320%); }
}

.instructions {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 28px;
  min-height: 180px;
  padding: 14px;
  border: 1px solid #d5d5d5;
  border-radius: 0;
  background: transparent;
  color: #333;
  font: 14px/1.45 Consolas, "Courier New", monospace;
  resize: vertical;
}

.api { margin: 0 0 48px; }

.api pre {
  white-space: pre-wrap;
  background: transparent;
  color: #333;
  border-top: 1px solid #d5d5d5;
  padding: 14px 0;
  overflow-x: auto;
}

.key-once {
  background: transparent;
  border-top: 1px solid #d5d5d5;
  padding: 12px 0;
  margin: 12px 0;
  word-break: break-all;
}

.keys { display: grid; gap: 8px; margin-top: 12px; }

.key-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }

code { font-family: Consolas, "Courier New", monospace; }
