:root {
  color-scheme: light;
  --ink: #152922;
  --muted: #63716c;
  --paper: #f6f4ee;
  --card: #fffefa;
  --line: #d9ded8;
  --accent: #1f755c;
  --accent-dark: #125540;
  --accent-soft: #dff0e8;
  --warm: #f0a868;
  --error: #a13c38;
  --shadow: 0 22px 70px rgba(27, 52, 43, 0.1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 7%, rgba(240, 168, 104, 0.22), transparent 23rem),
    radial-gradient(circle at 88% 44%, rgba(31, 117, 92, 0.12), transparent 30rem),
    var(--paper);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.shell {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hero {
  max-width: 780px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px 12px 12px 4px;
  color: #fff;
  background: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.eyebrow,
.step-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  margin-top: 78px;
}

h1 {
  max-width: 770px;
  margin: 16px 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 6.25rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.intro {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.65;
}

.upload-card {
  margin-top: 64px;
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid rgba(21, 41, 34, 0.1);
  border-radius: 28px;
  background: rgba(255, 254, 250, 0.93);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.card-heading,
.selection-summary,
.progress-copy,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

h2,
h3 {
  margin: 7px 0 0;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  letter-spacing: -0.03em;
}

.network-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #3fa478;
  box-shadow: 0 0 0 4px rgba(63, 164, 120, 0.12);
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.picker {
  min-width: 0;
}

.token-panel {
  margin-top: 32px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8faf7;
}

.token-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.token-heading label {
  font-size: 0.9rem;
  font-weight: 780;
}

.token-heading span {
  color: var(--muted);
  font-size: 0.76rem;
}

#tokenInput {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #bdc9c3;
  border-radius: 12px;
  color: var(--ink);
  background: var(--card);
  outline: none;
}

#tokenInput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 117, 92, 0.14);
}

.remember-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
}

.remember-control input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.picker-label {
  display: flex;
  min-height: 142px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px;
  border: 1.5px dashed #a9b9b1;
  border-radius: 20px;
  background: #f8faf7;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.picker-label:hover {
  border-color: var(--accent);
  background: #f0f7f3;
  transform: translateY(-2px);
}

.visually-hidden:focus-visible + .picker-label {
  outline: 3px solid rgba(31, 117, 92, 0.32);
  outline-offset: 3px;
}

.picker-label strong,
.picker-label small {
  display: block;
}

.picker-label strong {
  font-size: 1.02rem;
}

.picker-label small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.4;
}

.picker-icon {
  position: relative;
  width: 54px;
  height: 41px;
  flex: 0 0 auto;
  border-radius: 6px 10px 10px 10px;
  background: var(--warm);
  box-shadow: inset 0 -5px 0 rgba(117, 64, 16, 0.08);
}

.picker-icon::before {
  position: absolute;
  top: -8px;
  left: 4px;
  width: 24px;
  height: 12px;
  border-radius: 6px 6px 0 0;
  background: var(--warm);
  content: "";
}

.file-icon {
  width: 42px;
  height: 52px;
  border-radius: 7px;
}

.file-icon::before {
  display: none;
}

.selection,
.progress-panel {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.text-button {
  border: 0;
  color: var(--accent);
  background: none;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 750;
}

.text-button:hover {
  text-decoration: underline;
}

.file-preview {
  display: grid;
  gap: 0;
  margin: 20px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.file-preview li {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.83rem;
}

.file-preview li span:first-child {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-preview .remainder {
  display: block;
  border-bottom: 0;
  color: var(--accent);
  font-weight: 700;
}

.progress-panel {
  background: #f8faf7;
}

.progress-copy {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.progress-copy strong {
  color: var(--ink);
}

progress {
  display: block;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  accent-color: var(--accent);
  background: #dfe6e1;
}

progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #dfe6e1;
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--accent);
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--accent);
}

.actions {
  justify-content: flex-start;
  margin-top: 26px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 0 24px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 780;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.primary-button {
  color: white;
  background: var(--accent);
}

.primary-button:not(:disabled):hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.secondary-button {
  border: 1px solid #e1aaa7;
  color: var(--error);
  background: #fff8f7;
}

.status-message {
  min-height: 1.4em;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.status-ready,
.status-success {
  color: var(--accent);
}

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

.trust-note {
  display: flex;
  max-width: 760px;
  align-items: flex-start;
  gap: 15px;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.trust-note p {
  margin: 0;
}

.trust-note strong {
  color: var(--ink);
}

.lock-mark {
  position: relative;
  width: 18px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 6px;
  border-radius: 4px;
  background: var(--accent);
}

.lock-mark::before {
  position: absolute;
  top: -8px;
  left: 4px;
  width: 8px;
  height: 9px;
  border: 2px solid var(--accent);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  content: "";
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 1080px);
    padding-top: 24px;
  }

  .eyebrow {
    margin-top: 54px;
  }

  h1 {
    font-size: clamp(2.7rem, 15vw, 4.5rem);
  }

  .upload-card {
    margin-top: 46px;
    border-radius: 22px;
  }

  .card-heading {
    align-items: flex-start;
  }

  .network-badge {
    display: none;
  }

  .picker-label {
    min-height: 170px;
    flex-direction: column;
    text-align: center;
  }

  .picker-grid {
    grid-template-columns: 1fr;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
