:root {
  font-family: 'Helvetica Neue', 'Segoe UI', sans-serif;
  color: #2f3437;
  background: #f7f6f3;
  font-size: 16px;
  line-height: 1.6;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button {
  background: #242827;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 600;
}
button:hover {
  background: #383e3c;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.secondary {
  background: transparent;
  color: #2f3437;
  border-color: #d7d8d4;
}
.secondary:hover {
  background: #eeeee9;
}
.danger {
  background: #9f2f2d;
}
.danger:hover {
  background: #812724;
}
button:focus-visible,
input:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid #1f6c9f;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
header,
footer {
  max-width: 1120px;
  margin: auto;
  padding: 24px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
header {
  border-bottom: 1px solid #eaeaea;
}
header a {
  text-decoration: none;
  color: inherit;
  font-weight: 750;
  font-size: 14px;
  letter-spacing: 0.09em;
}
header a span {
  display: block;
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 400;
  color: #686c68;
}
main {
  max-width: 1120px;
  padding: 60px 36px 80px;
  margin: auto;
}
.intro {
  max-width: 680px;
  margin-bottom: 38px;
}
.eyebrow,
.step {
  font-family: Consolas, 'SF Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #60685f;
}
.intro h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: clamp(38px, 5vw, 60px);
  letter-spacing: -0.035em;
  line-height: 1.07;
  margin: 18px 0 22px;
}
.intro > p:last-child {
  max-width: 520px;
  color: #686c68;
  font-size: 17px;
}
h2 {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 10px 0 14px;
}
p {
  margin: 0 0 18px;
}
.panel {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 30px;
}
#login-panel,
#setup-panel {
  max-width: 520px;
}
form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
label {
  font-size: 14px;
  font-weight: 600;
}
input {
  width: 100%;
  border: 1px solid #d7d8d4;
  background: #fff;
  border-radius: 4px;
  min-height: 44px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
input[type='file'] {
  margin: 12px 0 0;
  padding: 14px;
  background: #f9f9f8;
  overflow: hidden;
}
input::file-selector-button {
  border: 1px solid #d7d8d4;
  border-radius: 4px;
  padding: 6px 10px;
  background: #fff;
  color: #2f3437;
  margin-right: 12px;
  cursor: pointer;
}
.note {
  font-size: 13px;
  color: #686c68;
}
.session,
.list-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.session {
  font-size: 14px;
}
.grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 42px;
}
.guide {
  padding: 20px 0;
}
.guide ol {
  list-style: none;
  counter-reset: steps;
  padding: 0;
  margin: 24px 0;
}
.guide li {
  counter-increment: steps;
  position: relative;
  padding: 0 0 24px 38px;
}
.guide li::before {
  content: '0' counter(steps);
  font-family: Consolas, monospace;
  font-size: 12px;
  color: #60685f;
  position: absolute;
  left: 0;
  top: 3px;
}
.guide strong {
  display: block;
  font-size: 15px;
}
.guide span {
  display: block;
  font-size: 14px;
  color: #686c68;
}
.pending {
  margin-top: 42px;
  border-top: 1px solid #eaeaea;
  padding-top: 28px;
}
.list-heading h2 {
  margin: 0;
}
.backup-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #eaeaea;
}
.backup-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.backup-row p {
  margin: 0;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.message {
  background: #edf3ec;
  border: 1px solid #d6e2d3;
  color: #346538;
  padding: 16px 20px;
  border-radius: 5px;
  overflow-wrap: anywhere;
}
.message.error {
  background: #fdebec;
  color: #9f2f2d;
  border-color: #f0d1d1;
}
progress {
  width: 100%;
  height: 10px;
  accent-color: #346538;
}
#upload-progress {
  margin-top: 20px;
}
#progress-label {
  font-weight: 400;
  font-size: 13px;
}
dialog {
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 32px;
  max-width: 540px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow: auto;
  color: #2f3437;
}
dialog::backdrop {
  background: rgba(32, 36, 32, 0.35);
}
dialog .actions {
  margin-top: 10px;
}
details {
  border-top: 1px solid #eaeaea;
  margin-top: 25px;
  padding-top: 20px;
}
summary {
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 15px;
}
footer {
  border-top: 1px solid #eaeaea;
  font-size: 12px;
  color: #686c68;
}
#restore-status {
  color: #956400;
  background: #fbf3db;
  padding: 12px;
  border-radius: 4px;
  margin-top: 14px;
}
select {
  width: 100%;
  padding: 12px;
  margin: 8px 0 18px;
  border: 1px solid #cbd5d0;
  border-radius: 6px;
  background: white;
  color: inherit;
  font: inherit;
}
#drive-panel {
  margin: 24px 0;
}
@media (max-width: 680px) {
  header,
  footer {
    padding: 20px;
  }
  header .secondary {
    font-size: 12px;
    padding: 9px;
  }
  main {
    padding: 38px 20px 50px;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .panel {
    padding: 23px;
  }
  .guide {
    padding: 12px 0;
  }
  .intro {
    margin-bottom: 28px;
  }
  .intro h1 {
    font-size: 42px;
  }
  .list-heading,
  .backup-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .session {
    align-items: flex-start;
  }
  .backup-row .actions {
    width: 100%;
  }
  dialog {
    padding: 24px;
  }
  footer {
    align-items: flex-start;
  }
}
@media (prefers-reduced-motion: no-preference) {
  main {
    animation: appear 0.35s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
