:root {
  --bg: #f7f6f3;
  --card: #ffffff;
  --ink: #16181d;
  --muted: #5f6672;
  --line: #e3e1db;
  --accent: #1f5f4b;
  --accent-ink: #ffffff;
  --warn: #8a4b12;
  --err: #a12020;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --card: #1c1f25;
    --ink: #eceef2;
    --muted: #9aa3b0;
    --line: #2c313a;
    --accent: #5fbf9d;
    --accent-ink: #0d1512;
    --warn: #e0a866;
    --err: #ff8b8b;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

header h1 {
  margin: 0 0 8px;
  font-size: 30px;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 52ch;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 18px;
}

.card h2 {
  margin: 0 0 16px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 550;
  margin-bottom: 6px;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 11px 12px;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 14px;
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .row { grid-template-columns: 1fr; }
}

button {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

button:hover { filter: brightness(1.06); }
button:disabled { opacity: 0.55; cursor: progress; }

.status {
  margin: 12px 0 0;
  font-size: 14px;
  min-height: 1.4em;
}

.status.ok { color: var(--accent); }
.status.warn { color: var(--warn); }
.status.err { color: var(--err); }

.history {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.history li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.history li:first-child { border-top: 0; }

.history a {
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history a:hover { text-decoration: underline; }
.history time { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }

.hint { color: var(--muted); font-size: 13px; margin: 12px 0 0; }

.plan ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.plan li + li { margin-top: 6px; }
.plan strong { color: var(--ink); }

footer {
  margin-top: 32px;
  font-size: 12px;
  color: var(--muted);
}

footer a { color: var(--muted); }
