* {
  box-sizing: border-box;
}

:root {
  --ink: #252622;
  --muted: #7e8178;
  --line: #d9d6cc;
  --paper: #f3efe6;
  --panel: #fbfaf6;
  --lime: #ccf05b;
  --coral: #ed745d;
  --mono: "DM Mono", monospace;
  --sans: "Space Grotesk", sans-serif;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  background-image:
    radial-gradient(
      circle at 88% 9%,
      rgba(237, 116, 93, 0.16),
      transparent 23rem
    ),
    linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 45%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}

.shell {
  width: min(940px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 24px;
  position: relative;
}
.topbar,
.action-row,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.06em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font-size: 0.75rem;
  letter-spacing: -0.08em;
}
.local-badge,
.eyebrow,
.section-kicker,
.field-label,
.command-label,
footer {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.66rem;
}
.local-badge {
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #80a83b;
  box-shadow: 0 0 0 4px rgba(128, 168, 59, 0.13);
}
.intro {
  max-width: 660px;
  padding: 106px 0 63px;
}
.eyebrow,
.section-kicker {
  color: var(--coral);
  margin: 0 0 15px;
}
h1 {
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.09em;
  margin: 0;
  font-weight: 600;
}
h1 em {
  color: var(--coral);
  font-style: normal;
}
.lede {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 28px 0 0;
  max-width: 370px;
}
.download-panel {
  border: 1px solid var(--line);
  background: rgba(251, 250, 246, 0.78);
  padding: clamp(25px, 5vw, 49px);
  box-shadow: 16px 16px 0 rgba(37, 38, 34, 0.045);
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 34px;
}
h2 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  letter-spacing: -0.06em;
  margin: 0;
  font-weight: 600;
}
.panel-number {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
}
.field-label {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}
.url-row {
  display: flex;
  gap: 10px;
}
input,
select {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  background: #fffefb;
  color: var(--ink);
  padding: 0 15px;
  font: inherit;
  outline: none;
  border-radius: 0;
}
input:focus,
select:focus {
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--lime);
}
input::placeholder {
  color: #b2b1aa;
}
.paste-button {
  border: 1px solid var(--ink);
  background: transparent;
  padding: 0 18px;
  font: 500 0.75rem var(--mono);
  text-transform: uppercase;
  cursor: pointer;
}
.paste-button:hover {
  background: var(--ink);
  color: var(--lime);
}
.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 25px;
}
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 22px,
    calc(100% - 14px) 22px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.progress-wrap {
  margin-top: 32px;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font: 0.68rem var(--mono);
  margin-bottom: 10px;
}
.progress-track {
  height: 8px;
  background: #e4e0d5;
  overflow: hidden;
}
.progress-bar {
  width: 0;
  height: 100%;
  background: var(--coral);
  transition: width 0.3s ease;
}
.logs-wrap {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.logs-button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  border: 0;
  padding: 14px 0 0;
  background: transparent;
  color: var(--muted);
  font: 0.68rem var(--mono);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.logs-button:hover {
  color: var(--ink);
}
.logs-chevron {
  color: var(--coral);
  font-size: 1rem;
  line-height: 0.7;
}
.logs-output {
  max-height: 210px;
  margin: 14px 0 0;
  padding: 15px;
  overflow: auto;
  background: var(--ink);
  color: var(--lime);
  font: 0.68rem/1.6 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.action-row {
  margin-top: 32px;
  gap: 18px;
}
.privacy-note {
  color: var(--muted);
  font: 0.68rem var(--mono);
  margin: 0;
}
.lock {
  color: var(--coral);
  font-size: 1rem;
  margin-right: 5px;
}
.download-button {
  display: inline-flex;
  align-items: center;
  gap: 23px;
  border: 0;
  background: var(--coral);
  color: #fffaf4;
  min-height: 54px;
  padding: 0 18px 0 20px;
  font: 600 0.78rem var(--mono);
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.download-button:hover {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--ink);
}
.download-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}
.arrow {
  font-size: 1.2rem;
  line-height: 1;
}
.result {
  min-height: 20px;
  margin-top: 20px;
  font: 0.75rem var(--mono);
}
.result.success {
  color: #557d26;
}
.result.error {
  color: #bd4f3e;
}
.result.loading {
  color: var(--muted);
}
.file-link {
  color: #557d26;
  font-weight: 600;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
footer {
  margin-top: 30px;
  color: var(--muted);
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 30px, 940px);
    padding-top: 20px;
  }
  .intro {
    padding: 85px 0 45px;
  }
  .controls-grid {
    grid-template-columns: 1fr;
    gap: 19px;
  }
  .action-row {
    align-items: flex-start;
    flex-direction: column-reverse;
  }
  .download-button {
    width: 100%;
    justify-content: space-between;
  }
  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
