:root {
  --ink: #10201a;
  --ink-soft: #52665e;
  --paper: #f3f5ef;
  --surface: #fffefa;
  --line: #d8e0da;
  --acid: #c9ff55;
  --acid-dark: #9dd52e;
  --teal: #1e6b59;
  --teal-soft: #dceddf;
  --danger: #b5443d;
  --shadow: 0 24px 80px rgba(16, 32, 26, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(16, 32, 26, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 32, 26, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 48px 48px;
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei",
    system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
}

.ambient-one {
  top: -180px;
  right: -80px;
  background: rgba(201, 255, 85, 0.24);
}

.ambient-two {
  bottom: -240px;
  left: -180px;
  background: rgba(30, 107, 89, 0.13);
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  width: min(1240px, calc(100% - 40px));
  height: 86px;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 10px;
  transform: rotate(2deg);
}

.brand-mark i {
  position: absolute;
  display: block;
  background: var(--ink);
}

.brand-mark i:nth-child(1) {
  width: 17px;
  height: 2px;
}

.brand-mark i:nth-child(2) {
  width: 2px;
  height: 17px;
}

.brand-mark i:nth-child(3) {
  width: 7px;
  height: 7px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--acid);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 650;
}

.site-nav form {
  margin: 0;
}

.site-nav a:not(.nav-cta),
.nav-button {
  transition: opacity 0.2s ease;
}

.site-nav a:not(.nav-cta):hover,
.nav-button:hover {
  opacity: 0.55;
}

.nav-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-cta {
  padding: 11px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-cta:hover {
  color: var(--paper);
  background: var(--ink);
}

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 13px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 760;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.button-primary {
  border-color: var(--ink);
  background: var(--acid);
  box-shadow: 5px 5px 0 var(--ink);
}

.button-primary:hover {
  box-shadow: 2px 2px 0 var(--ink);
}

.button-ghost {
  border-color: var(--line);
  background: rgba(255, 254, 250, 0.68);
}

.button-ghost:hover {
  border-color: var(--ink);
}

.button-wide {
  width: 100%;
}

.button-small {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: none;
}

.eyebrow {
  display: flex;
  margin: 0 0 17px;
  align-items: center;
  gap: 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 22px;
  height: 2px;
  background: currentColor;
}

.hero {
  display: grid;
  min-height: 690px;
  padding: 64px 0 92px;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: center;
  gap: 60px;
}

.hero h1,
.auth-copy h1,
.upload-head h1,
.dashboard-head h1 {
  margin: 0;
  font-size: clamp(48px, 6.2vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero h1 em {
  position: relative;
  color: var(--teal);
  font-style: normal;
}

.hero h1 em::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 5px;
  border-radius: 50%;
  background: var(--acid);
  content: "";
  transform: rotate(-1deg);
}

.hero-lead {
  max-width: 580px;
  margin: 30px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  margin-top: 34px;
  gap: 14px;
}

.trust-row {
  display: flex;
  margin-top: 38px;
  gap: 26px;
  color: var(--ink-soft);
  font-size: 12px;
}

.trust-row span {
  position: relative;
  padding-left: 14px;
}

.trust-row span::before {
  position: absolute;
  top: 6px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  content: "";
}

.trust-row b {
  color: var(--ink);
}

.hero-visual {
  position: relative;
  height: 535px;
  perspective: 1100px;
}

.drawing-card {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(16, 32, 26, 0.22);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.drawing-source {
  top: 4px;
  left: 0;
  width: 74%;
  height: 340px;
  background:
    linear-gradient(rgba(30, 107, 89, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 107, 89, 0.07) 1px, transparent 1px),
    #fffefa;
  background-size: 24px 24px;
  transform: rotateY(4deg) rotateZ(-2deg);
}

.drawing-result {
  right: 0;
  bottom: 5px;
  width: 73%;
  height: 348px;
  border-color: rgba(201, 255, 85, 0.46);
  background: #10231c;
  transform: rotateY(-5deg) rotateZ(2deg);
}

.drawing-label {
  position: absolute;
  top: 18px;
  left: 19px;
  z-index: 2;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.74);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.drawing-result .drawing-label {
  color: var(--acid);
  background: rgba(201, 255, 85, 0.1);
}

.mechanical-part {
  position: absolute;
  inset: 78px 60px 52px;
}

.part-body {
  position: absolute;
  inset: 34px 40px;
  border: 3px solid var(--ink);
  border-radius: 46px 12px 12px 46px;
}

.part-hole {
  position: absolute;
  top: 50%;
  left: 44%;
  width: 72px;
  height: 72px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.axis {
  position: absolute;
  z-index: 2;
  display: block;
  opacity: 0.65;
  background: repeating-linear-gradient(
    90deg,
    var(--teal) 0 10px,
    transparent 10px 15px,
    var(--teal) 15px 18px,
    transparent 18px 23px
  );
}

.axis-x {
  top: 50%;
  left: 10px;
  width: calc(100% - 20px);
  height: 1px;
}

.axis-y {
  top: 4px;
  left: 44%;
  width: 1px;
  height: calc(100% - 8px);
  background: repeating-linear-gradient(
    180deg,
    var(--teal) 0 10px,
    transparent 10px 15px,
    var(--teal) 15px 18px,
    transparent 18px 23px
  );
}

.dimension {
  position: absolute;
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
}

.dimension-top {
  top: 0;
  left: 37%;
}

.dimension-side {
  right: 2px;
  bottom: 48%;
}

.conversion-beam {
  position: absolute;
  top: 234px;
  left: 33%;
  z-index: 5;
  display: grid;
  width: 160px;
  height: 56px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--acid);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-4deg);
}

.conversion-beam span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.cad-grid {
  position: absolute;
  inset: 72px 44px 42px;
  background:
    linear-gradient(rgba(201, 255, 85, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 255, 85, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
}

.cad-outline {
  position: absolute;
  inset: 48px 30px;
  border: 2px solid var(--acid);
  border-radius: 44px 10px 10px 44px;
}

.cad-hole {
  position: absolute;
  top: 50%;
  left: 44%;
  width: 68px;
  height: 68px;
  border: 2px solid var(--acid);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cad-center-x,
.cad-center-y {
  position: absolute;
  background: #67d9bf;
  opacity: 0.7;
}

.cad-center-x {
  top: 50%;
  right: 10px;
  left: 10px;
  height: 1px;
}

.cad-center-y {
  top: 12px;
  bottom: 12px;
  left: 44%;
  width: 1px;
}

.node {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid #10231c;
  background: var(--acid);
}

.n1 { top: 46px; left: 27px; }
.n2 { top: 46px; right: 27px; }
.n3 { right: 27px; bottom: 46px; }
.n4 { bottom: 46px; left: 27px; }

.process-section {
  padding: 100px 0 120px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  margin-bottom: 48px;
  grid-template-columns: 1fr 0.7fr;
  align-items: end;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
}

.section-heading h2,
.limits-section h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.section-heading > p:last-child {
  margin: 0 0 3px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.step-card {
  min-height: 250px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 254, 250, 0.72);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.step-card:hover {
  border-color: var(--teal);
  transform: translateY(-4px);
}

.step-number {
  display: block;
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 800;
}

.step-card h3 {
  margin: 74px 0 12px;
  font-size: 23px;
  letter-spacing: -0.03em;
}

.step-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.75;
}

.limits-section {
  display: grid;
  margin-bottom: 100px;
  padding: 56px;
  border-radius: 28px;
  color: #f7fff8;
  background: var(--ink);
  grid-template-columns: 0.8fr 1.2fr;
  gap: 70px;
}

.eyebrow-light {
  color: var(--acid);
}

.limit-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
}

.limit-list div {
  display: flex;
  min-height: 62px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  align-items: center;
  justify-content: space-between;
}

.limit-list span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
}

.limit-list strong {
  color: var(--acid);
  font-size: 14px;
}

.site-footer {
  display: flex;
  width: min(1240px, calc(100% - 40px));
  min-height: 90px;
  margin-inline: auto;
  border-top: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 12px;
}

.flash-stack {
  position: fixed;
  top: 92px;
  right: 24px;
  z-index: 50;
}

.flash {
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 13px;
}

/* Authentication */

.auth-shell {
  display: grid;
  min-height: calc(100vh - 176px);
  padding: 70px 0 110px;
  grid-template-columns: 1fr 480px;
  align-items: center;
  gap: 90px;
}

.auth-copy h1 {
  font-size: clamp(45px, 5vw, 68px);
}

.auth-copy > p:not(.eyebrow) {
  max-width: 570px;
  margin: 28px 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.85;
}

.check-list {
  display: grid;
  padding: 0;
  gap: 13px;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  font-size: 14px;
}

.check-list li::before {
  position: absolute;
  top: 1px;
  left: 0;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--acid);
  content: "✓";
  font-size: 11px;
  font-weight: 900;
}

.auth-card,
.upload-card,
.requirements-card,
.processing-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 254, 250, 0.93);
  box-shadow: var(--shadow);
}

.auth-card {
  min-height: 520px;
  padding: 44px;
}

.auth-step {
  display: none;
}

.auth-step.active {
  display: block;
}

.mini-label {
  display: block;
  margin-bottom: 14px;
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-card h2,
.requirements-card h2,
.processing-panel h2 {
  margin: 0;
  font-size: 29px;
  letter-spacing: -0.04em;
}

.auth-card h2 + p {
  margin: 12px 0 30px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.auth-card form {
  display: grid;
  gap: 12px;
}

.auth-card label,
.upload-card label > span {
  font-size: 12px;
  font-weight: 750;
}

.input-wrap {
  display: flex;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  align-items: center;
  background: white;
}

.input-wrap:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(30, 107, 89, 0.1);
}

.input-wrap span {
  padding-left: 16px;
  color: var(--teal);
  font-weight: 800;
}

.input-wrap input {
  width: 100%;
  height: 100%;
  padding: 0 14px 0 9px;
  border: 0;
  outline: 0;
  background: transparent;
}

.code-input {
  width: 100%;
  height: 72px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  color: var(--ink);
  background: white;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-align: center;
}

.code-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(30, 107, 89, 0.1);
}

.back-link,
.resend-button,
.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.back-link {
  margin-bottom: 26px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 750;
}

.resend-button {
  display: block;
  margin: 18px auto 0;
  color: var(--teal);
  font-size: 12px;
}

.resend-button:disabled {
  color: var(--ink-soft);
  cursor: default;
}

.privacy-note {
  margin: 30px 0 0;
  color: #809088;
  font-size: 11px;
  line-height: 1.65;
  text-align: center;
}

.form-message {
  min-height: 21px;
  margin-top: 16px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
}

.form-message.error {
  color: var(--danger);
}

/* Dashboard */

.dashboard {
  min-height: 720px;
  padding: 70px 0 120px;
}

.dashboard-head,
.upload-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.dashboard-head h1,
.upload-head h1 {
  font-size: clamp(38px, 4.2vw, 60px);
}

.dashboard-head > div > p:last-child,
.upload-head > div > p:last-child {
  margin: 18px 0 0;
  color: var(--ink-soft);
}

.quota-grid {
  display: grid;
  margin: 46px 0 70px;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 14px;
}

.quota-card {
  display: flex;
  min-height: 170px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(255, 254, 250, 0.74);
}

.quota-card > span {
  margin-bottom: auto;
  color: var(--ink-soft);
  font-size: 12px;
}

.quota-card strong {
  font-size: 46px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.quota-card small {
  margin-top: 7px;
  color: var(--ink-soft);
}

.quota-main {
  color: white;
  background: var(--ink);
}

.quota-main > span,
.quota-main small {
  color: rgba(255, 255, 255, 0.58);
}

.quota-main strong {
  color: var(--acid);
}

.quota-track {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  overflow: hidden;
  width: 100%;
  height: 3px;
  margin-top: 18px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.17);
}

.quota-track::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.17);
}

.quota-track::-webkit-progress-value {
  border-radius: inherit;
  background: var(--acid);
}

.quota-track::-moz-progress-bar {
  border-radius: inherit;
  background: var(--acid);
}

.jobs-heading {
  display: flex;
  margin-bottom: 20px;
  align-items: flex-end;
  justify-content: space-between;
}

.jobs-heading h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.jobs-heading p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.live-chip {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  background: var(--surface);
  font-size: 11px;
}

.live-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #54a767;
  box-shadow: 0 0 0 4px rgba(84, 167, 103, 0.14);
}

.job-list {
  display: grid;
  gap: 12px;
}

.job-card {
  display: flex;
  min-height: 142px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 17px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 254, 250, 0.8);
}

.job-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 20px;
}

.file-icon {
  position: relative;
  display: grid;
  width: 55px;
  height: 68px;
  flex: 0 0 auto;
  place-items: end center;
  padding-bottom: 11px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: var(--acid);
}

.file-icon::after {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 17px;
  height: 17px;
  border-bottom: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
  background: var(--paper);
  content: "";
}

.file-icon span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 900;
}

.job-copy {
  min-width: 0;
  width: 100%;
}

.job-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.job-title-row h3 {
  overflow: hidden;
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 99px;
  color: var(--ink-soft);
  background: #e9ede9;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-complete,
.status-partial {
  color: #1f6842;
  background: #dff5df;
}

.status-running {
  color: #155f75;
  background: #d9f1f7;
}

.status-failed,
.status-canceled {
  color: #9b3c37;
  background: #f8dfdd;
}

.job-copy > p {
  margin: 9px 0 12px;
  color: var(--ink-soft);
  font-size: 12px;
}

.progress-track {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  overflow: hidden;
  width: 100%;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: #e2e7e2;
}

.progress-track::-webkit-progress-bar {
  background: #e2e7e2;
}

.progress-track::-webkit-progress-value {
  border-radius: inherit;
  background: var(--teal);
  transition: inline-size 0.4s ease;
}

.progress-track::-moz-progress-bar {
  border-radius: inherit;
  background: var(--teal);
}

.job-meta {
  display: flex;
  margin-top: 8px;
  gap: 14px;
  color: #7a8982;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.job-actions {
  display: flex;
  max-width: 285px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.text-button {
  width: 100%;
  margin-top: 2px;
  font-size: 10px;
  text-align: right;
}

.danger {
  color: var(--danger);
}

.muted-action {
  color: var(--ink-soft);
  font-size: 11px;
}

.empty-state {
  display: grid;
  min-height: 360px;
  padding: 50px;
  border: 1px dashed #bdc9c1;
  border-radius: 22px;
  place-items: center;
  align-content: center;
  background: rgba(255, 254, 250, 0.48);
  text-align: center;
}

.empty-drawing {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  border: 1px solid var(--teal);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49%, var(--teal) 49% 51%, transparent 51%),
    linear-gradient(transparent 49%, var(--teal) 49% 51%, transparent 51%);
}

.empty-state h3 {
  margin: 5px 0;
}

.empty-state p {
  margin: 6px 0 24px;
  color: var(--ink-soft);
}

/* Upload */

.upload-shell {
  min-height: 760px;
  padding: 70px 0 120px;
}

.remaining-pill {
  display: flex;
  min-width: 126px;
  padding: 15px 18px;
  border: 1px solid var(--ink);
  border-radius: 14px;
  align-items: baseline;
  gap: 7px;
  background: var(--acid);
  box-shadow: 4px 4px 0 var(--ink);
}

.remaining-pill span {
  margin-right: auto;
  font-size: 10px;
  font-weight: 750;
}

.remaining-pill strong {
  font-size: 28px;
}

.remaining-pill small {
  font-size: 10px;
}

.upload-layout {
  display: grid;
  margin-top: 45px;
  grid-template-columns: 1.45fr 0.75fr;
  align-items: start;
  gap: 20px;
}

.upload-card {
  padding: 30px;
}

.drop-zone {
  display: grid;
  min-height: 245px;
  padding: 30px;
  border: 1.5px dashed #9bada3;
  border-radius: 17px;
  place-items: center;
  align-content: center;
  background:
    linear-gradient(rgba(30, 107, 89, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 107, 89, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.drop-zone.dragging,
.drop-zone:hover {
  border-color: var(--teal);
  background-color: rgba(220, 237, 223, 0.45);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-symbol {
  display: grid;
  width: 62px;
  height: 62px;
  margin-bottom: 20px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--acid);
  font-size: 27px;
}

.drop-zone strong {
  font-size: 17px;
}

.drop-zone small {
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 11px;
}

.form-grid {
  display: grid;
  margin: 24px 0;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid label {
  display: grid;
  gap: 8px;
}

.form-grid label > span i {
  color: var(--ink-soft);
  font-style: normal;
  font-weight: 500;
}

.form-grid input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: white;
}

.form-grid input:focus {
  border-color: var(--teal);
}

.form-grid small {
  color: #7a8982;
  font-size: 10px;
}

.unit-input {
  position: relative;
}

.unit-input input {
  padding-right: 48px;
}

.unit-input b {
  position: absolute;
  top: 16px;
  right: 14px;
  color: var(--ink-soft);
  font-size: 11px;
}

.upload-notice {
  display: flex;
  margin: 0 0 22px;
  padding: 12px 14px;
  border-radius: 10px;
  align-items: flex-start;
  gap: 10px;
  background: #edf4ee;
}

.upload-notice > span {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--teal);
  font-family: serif;
  font-size: 11px;
  font-weight: 800;
}

.upload-notice p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.6;
}

.requirements-card {
  padding: 30px;
  box-shadow: none;
}

.requirements-card ul {
  display: grid;
  margin: 28px 0 0;
  padding: 0;
  gap: 0;
  list-style: none;
}

.requirements-card li {
  display: flex;
  padding: 19px 0;
  border-top: 1px solid var(--line);
  gap: 15px;
}

.requirements-card li > span {
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 900;
}

.requirements-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.requirements-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.6;
}

.processing-panel {
  margin-top: 28px;
  padding: 30px;
  box-shadow: none;
}

.processing-header {
  display: flex;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
  justify-content: space-between;
}

.processing-body {
  display: grid;
  min-height: 230px;
  grid-template-columns: 240px 1fr;
  align-items: center;
  gap: 45px;
}

.radar {
  position: relative;
  width: 170px;
  height: 170px;
  margin: auto;
  border: 1px solid #a7bab0;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49.5%, #c6d2cb 49.5% 50.5%, transparent 50.5%),
    linear-gradient(transparent 49.5%, #c6d2cb 49.5% 50.5%, transparent 50.5%);
}

.radar i {
  position: absolute;
  inset: 24px;
  border: 1px solid #cad5ce;
  border-radius: 50%;
}

.radar i:nth-child(2) {
  inset: 48px;
}

.radar i:nth-child(3) {
  inset: 72px;
}

.radar span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48%;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), transparent);
  transform-origin: left center;
  animation: scan 2.2s linear infinite;
}

@keyframes scan {
  to { transform: rotate(360deg); }
}

.processing-copy > strong {
  display: block;
  overflow: hidden;
  max-width: 540px;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.processing-copy > p {
  margin: 10px 0 30px;
  color: var(--ink-soft);
  font-size: 12px;
}

.progress-large {
  height: 8px;
}

.processing-meta {
  display: flex;
  margin-top: 10px;
  justify-content: space-between;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.result-preview {
  display: grid;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f6f8f3;
  grid-template-columns: minmax(260px, 1fr) 1fr;
  align-items: center;
  gap: 32px;
}

.result-preview[hidden] {
  display: none;
}

.result-preview img {
  width: 100%;
  max-height: 330px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.result-preview h3 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.result-preview p {
  color: var(--ink-soft);
  line-height: 1.7;
}

.result-actions {
  display: flex;
  margin-top: 22px;
  gap: 12px;
}

.dashboard-link {
  display: block;
  margin-top: 22px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.limit-reached {
  margin-top: 45px;
  padding: 70px 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  text-align: center;
}

.limit-reached > span {
  color: var(--danger);
  font-size: 11px;
  font-weight: 800;
}

.limit-reached h2 {
  margin: 12px 0;
}

.limit-reached p {
  margin: 0 0 24px;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .hero,
  .auth-shell,
  .upload-layout,
  .limits-section {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 45px;
  }

  .hero-visual {
    height: 515px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 15px;
  }

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

  .step-card {
    min-height: 180px;
  }

  .step-card h3 {
    margin-top: 44px;
  }

  .limits-section {
    gap: 35px;
  }

  .auth-shell {
    gap: 45px;
  }

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

  .processing-body {
    grid-template-columns: 180px 1fr;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    width: min(100% - 28px, 1240px);
    height: 72px;
  }

  .site-nav {
    gap: 13px;
  }

  .site-nav > a:first-child {
    display: none;
  }

  .hero {
    min-height: 0;
    padding: 50px 0 70px;
    gap: 25px;
  }

  .hero h1 {
    font-size: 48px;
  }

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

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

  .trust-row {
    flex-wrap: wrap;
    gap: 10px 18px;
  }

  .hero-visual {
    height: 410px;
    transform: scale(0.88);
    transform-origin: top center;
  }

  .drawing-source {
    width: 90%;
  }

  .drawing-result {
    width: 88%;
  }

  .process-section {
    padding: 70px 0;
  }

  .limits-section {
    margin-bottom: 50px;
    padding: 34px 24px;
  }

  .limit-list {
    grid-template-columns: 1fr;
  }

  .site-footer {
    width: min(100% - 28px, 1240px);
    padding: 25px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .auth-shell,
  .dashboard,
  .upload-shell {
    padding: 45px 0 75px;
  }

  .auth-card,
  .upload-card,
  .requirements-card,
  .processing-panel {
    padding: 24px;
  }

  .auth-copy h1,
  .dashboard-head h1,
  .upload-head h1 {
    font-size: 39px;
  }

  .dashboard-head,
  .upload-head,
  .jobs-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .quota-grid {
    margin: 32px 0 50px;
    grid-template-columns: 1fr 1fr;
  }

  .quota-card {
    min-height: 145px;
    padding: 19px;
  }

  .quota-main {
    grid-column: 1 / -1;
  }

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

  .job-actions {
    max-width: none;
    justify-content: flex-start;
  }

  .text-button {
    width: auto;
    margin-left: auto;
  }

  .form-grid,
  .processing-body,
  .result-preview {
    grid-template-columns: 1fr;
  }

  .processing-body {
    padding: 25px 0;
    gap: 20px;
  }

  .radar {
    width: 130px;
    height: 130px;
  }
}

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