:root {
  --ink: #16211d;
  --muted: #66716c;
  --line: #dce3df;
  --paper: #f8faf8;
  --white: #ffffff;
  --green: #087f5b;
  --green-dark: #056247;
  --mint: #dff5e9;
  --orange: #ff7a45;
  --shadow: 0 24px 70px rgba(29, 59, 47, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(22, 33, 29, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 33, 29, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 40px 40px;
  font-family: "DM Sans", "Noto Sans SC", sans-serif;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-glow {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.34;
  pointer-events: none;
}

.page-glow-one {
  top: -170px;
  right: -110px;
  background: #c2f3d7;
}

.page-glow-two {
  top: 520px;
  left: -260px;
  background: #ffe2c9;
}

.site-header,
main,
footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--green);
  border-radius: 10px 10px 10px 3px;
  transform: rotate(-2deg);
}

.brand-mark svg {
  width: 23px;
  fill: white;
}

.brand-mark path:last-child {
  fill: none;
  stroke: white;
  stroke-linecap: round;
  stroke-width: 2;
}

.status-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 13px;
  color: #426057;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(185, 202, 195, 0.8);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(12px);
}

.status-chip span {
  width: 7px;
  height: 7px;
  background: #19aa74;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(25, 170, 116, 0.12);
}

.hero {
  padding: 82px 0 60px;
  text-align: center;
}

.eyebrow,
.step-label {
  margin: 0;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 790px;
  margin: 20px auto 22px;
  font-size: clamp(48px, 7.6vw, 84px);
  line-height: 1.03;
  letter-spacing: -0.065em;
}

.hero h1 span {
  color: var(--green);
}

.hero-copy {
  max-width: 610px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.workspace,
.job-card {
  padding: 38px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(205, 216, 211, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.workspace-heading,
.job-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.workspace h2,
.job-card h2,
.how-it-works h2 {
  margin: 6px 0 0;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.source-badges {
  display: flex;
  gap: 9px;
}

.source-badges span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 8px 11px;
  color: #4f5f59;
  background: #f5f7f6;
  border: 1px solid #e3e9e6;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
}

.source-badges svg {
  width: 15px;
  fill: currentColor;
}

.source-badges .upload-source-icon {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

form {
  margin-top: 30px;
}

.source-tabs {
  width: fit-content;
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  background: #f0f4f2;
  border-radius: 10px;
}

.source-tab {
  min-height: 36px;
  padding: 0 15px;
  color: #6f7d77;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.source-tab.active {
  color: var(--green);
  background: white;
  box-shadow: 0 2px 8px rgba(29, 59, 47, 0.08);
}

.field-label {
  display: block;
  margin-bottom: 9px;
  color: #52615c;
  font-size: 12px;
  font-weight: 600;
}

.url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.file-picker {
  min-width: 0;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  color: #75817c;
  background: var(--white);
  border: 1px dashed #b8c8c0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.file-picker:hover,
.file-picker:focus-within {
  color: var(--green);
  background: #fbfdfc;
  border-color: var(--green);
}

.file-picker svg {
  width: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.file-picker span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.upload-note {
  margin: 9px 0 0;
  color: #7e8984;
  font-size: 11px;
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: var(--white);
  border: 1px solid #cfd9d4;
  border-radius: 12px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.input-shell:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(8, 127, 91, 0.1);
}

.input-shell svg {
  width: 20px;
  fill: none;
  stroke: #83908a;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.input-shell input {
  width: 100%;
  min-width: 0;
  height: 56px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.input-shell input::placeholder {
  color: #a1aaa6;
}

.primary-button {
  min-width: 152px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  color: white;
  background: var(--green);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(8, 127, 91, 0.22);
  cursor: pointer;
  font-weight: 700;
  transition:
    background 0.2s,
    transform 0.2s;
}

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

.primary-button:disabled {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

.primary-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.options-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.option {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 13px 14px;
  background: #f7f9f8;
  border: 1px solid #e8ecea;
  border-radius: 11px;
}

.option-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--mint);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.option-icon svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.option div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.option small {
  color: #7b8782;
  font-size: 10px;
}

.option strong {
  font-size: 12px;
  font-weight: 600;
}

.access-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #edf0ee;
}

.access-panel summary {
  width: fit-content;
  color: #78847f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.access-content {
  max-width: 460px;
  margin-top: 14px;
}

.access-content label {
  display: block;
  margin-bottom: 7px;
  color: #52615c;
  font-size: 12px;
  font-weight: 600;
}

.token-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.token-row input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #cfd9d4;
  border-radius: 9px;
  outline: 0;
}

.token-row input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(8, 127, 91, 0.09);
}

.token-row button {
  padding: 0 15px;
  color: var(--green);
  background: var(--mint);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.access-content p,
.form-message {
  min-height: 18px;
  margin: 8px 0 0;
  color: #818c87;
  font-size: 11px;
}

.form-message {
  color: #b33a2b;
}

.job-card {
  margin-top: 24px;
}

.job-status {
  padding: 8px 12px;
  color: #8a5a13;
  background: #fff4d9;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.job-status.completed {
  color: var(--green);
  background: var(--mint);
}

.job-status.failed {
  color: #b33a2b;
  background: #fde7e3;
}

.progress-track {
  height: 9px;
  margin-top: 28px;
  overflow: hidden;
  background: #ebefed;
  border-radius: 999px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), #2bbd82);
  border-radius: inherit;
  transition: width 0.5s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 11px;
  color: #77837e;
  font-size: 12px;
}

.progress-meta strong {
  color: var(--green);
}

.resume-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.resume-actions span {
  color: var(--muted);
  font-size: 12px;
}

.resume-button {
  min-height: 44px;
  padding: 0 18px;
  color: white;
  background: var(--green);
  border: 0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.resume-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.result-actions a,
.result-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 17px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.download-primary {
  color: white;
  background: var(--green);
}

.download-secondary {
  color: var(--green);
  background: var(--mint);
}

.summary-button {
  color: #8a481f;
  background: #fff0e5;
}

.summary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.result-actions svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.summary-panel {
  margin-top: 20px;
  padding: 22px;
  background: #f7faf8;
  border: 1px solid #dde7e2;
  border-radius: 14px;
}

.summary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.summary-heading h3 {
  margin: 5px 0 0;
  font-size: 17px;
}

.copy-button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--green);
  background: var(--mint);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.summary-message {
  margin: 15px 0 0;
  color: #74817b;
  font-size: 12px;
}

.summary-content {
  margin-top: 14px;
  padding: 16px;
  color: #263a32;
  background: white;
  border: 1px solid #e1e8e4;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.85;
  white-space: pre-wrap;
}

.summary-count {
  display: block;
  margin-top: 8px;
  color: #86918c;
  text-align: right;
}

.how-it-works {
  padding: 88px 0 26px;
}

.how-it-works > h2 {
  margin-top: 9px;
  font-size: 34px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.process-grid article {
  min-height: 190px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid #e0e6e3;
  border-radius: 16px;
}

.process-grid article > span {
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.process-grid h3 {
  margin: 25px 0 9px;
  font-size: 17px;
}

.process-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 34px 0 72px;
  padding: 19px 22px;
  color: #4f6059;
  background: #edf5f1;
  border: 1px solid #d9e8e1;
  border-radius: 13px;
}

.notice svg {
  width: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.notice strong {
  display: block;
  margin-bottom: 4px;
  color: #30463e;
  font-size: 12px;
}

.notice p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 25px 0 36px;
  color: #8a9691;
  border-top: 1px solid #dfe5e2;
  font-size: 11px;
}

.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .site-header,
  main,
  footer {
    width: min(100% - 24px, 1120px);
  }

  .site-header {
    height: 72px;
  }

  .status-chip {
    display: none;
  }

  .hero {
    padding: 58px 0 44px;
  }

  .hero h1 {
    font-size: clamp(43px, 14vw, 66px);
  }

  .hero-copy {
    font-size: 15px;
  }

  .workspace,
  .job-card {
    padding: 24px 18px;
    border-radius: 18px;
  }

  .workspace-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .url-row {
    grid-template-columns: 1fr;
  }

  .upload-row {
    grid-template-columns: 1fr;
  }

  .primary-button {
    min-height: 52px;
  }

  .options-row,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .option {
    padding: 11px 13px;
  }

  .process-grid article {
    min-height: auto;
  }

  .process-grid h3 {
    margin-top: 17px;
  }

  .result-actions,
  .resume-actions,
  .summary-heading,
  footer {
    align-items: stretch;
    flex-direction: column;
  }

  footer {
    gap: 7px;
  }
}

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