:root {
  --ink: #101311;
  --ink-soft: #5e655f;
  --canvas: #f3f4f0;
  --surface: #ffffff;
  --line: #dde1db;
  --line-strong: #cbd1c9;
  --green: #b8ff65;
  --green-strong: #84df24;
  --blue: #3159f5;
  --sidebar: #0d0f0e;
  --sidebar-muted: #929992;
  --danger: #c53a3a;
  --shadow: 0 24px 70px rgba(16, 19, 17, 0.09);
  --radius: 20px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--canvas); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(49, 89, 245, 0.2);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 244px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  color: #f7f9f7;
  background:
    radial-gradient(circle at 10% 5%, rgba(184, 255, 101, 0.08), transparent 24%),
    var(--sidebar);
  border-right: 1px solid rgba(255,255,255,.06);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; color: inherit; text-decoration: none; font-weight: 720; letter-spacing: -.025em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center;
  background: var(--green); color: #10160c; font-weight: 900; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12);
}
.primary-nav { display: grid; gap: 7px; margin-top: 52px; }
.nav-item {
  width: 100%; border: 0; border-radius: 12px; background: transparent; color: var(--sidebar-muted);
  display: flex; align-items: center; gap: 12px; padding: 12px 13px; cursor: pointer; text-align: left;
  font-weight: 620; transition: 160ms ease;
}
.nav-item svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #10130f; background: var(--green); }
.sidebar-bottom { margin-top: auto; }
.account-button {
  width: 100%; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px;
  border: 1px solid rgba(255,255,255,.09); border-radius: 14px; padding: 10px; cursor: pointer;
  color: #fff; background: rgba(255,255,255,.035); text-align: left;
}
.avatar { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: #272b28; color: var(--green); font-weight: 750; }
.account-copy { min-width: 0; display: grid; gap: 2px; }
.account-copy strong, .account-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { font-size: 12px; font-weight: 650; }
.account-copy small { color: var(--sidebar-muted); font-size: 11px; }

.workspace { grid-column: 2; min-width: 0; padding: 0 48px 64px; }
.topbar {
  height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 23px; line-height: 1.1; letter-spacing: -.035em; margin: 4px 0 0; }
.eyebrow { color: #747c75; font-size: 10px; font-weight: 760; letter-spacing: .14em; text-transform: uppercase; }
.mobile-menu { display: none; }
.balance-pill {
  display: flex; align-items: center; gap: 9px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.78);
  border-radius: 999px; padding: 10px 14px; cursor: pointer; font-size: 13px; font-weight: 670;
  box-shadow: 0 5px 20px rgba(16,19,17,.04);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-strong); box-shadow: 0 0 0 4px rgba(132,223,36,.13); }
.page { display: none; max-width: 1280px; margin: 0 auto; padding-top: 44px; }
.page.active { display: block; animation: pageIn .3s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.section-intro { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
.section-intro h2, .tool-heading h2 { margin: 0; font-size: clamp(31px, 4vw, 48px); letter-spacing: -.055em; line-height: 1; }
.section-intro p, .tool-heading p { max-width: 650px; margin: 12px 0 0; color: var(--ink-soft); line-height: 1.55; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 360px)); gap: 20px; }
.tool-card {
  min-height: 330px; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: left;
  display: flex; flex-direction: column; background: var(--surface); cursor: pointer; transition: 200ms ease;
  box-shadow: 0 12px 34px rgba(16,19,17,.035);
}
.tool-card:hover { transform: translateY(-4px); border-color: #b7beb6; box-shadow: var(--shadow); }
.tool-card-top, .tool-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tool-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: #111411; color: var(--green); font-weight: 820; letter-spacing: -.04em; }
.price-chip { border: 1px solid #dfe5da; background: #f7f9f4; border-radius: 999px; padding: 8px 10px; font-size: 11px; font-weight: 700; }
.tool-card-copy { margin: auto 0; }
.tool-card-copy h3 { margin: 0 0 12px; font-size: 24px; letter-spacing: -.04em; }
.tool-card-copy p { color: var(--ink-soft); line-height: 1.55; margin: 0; font-size: 14px; }
.tool-card-bottom { padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 650; }
.arrow { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 50%; background: var(--green); font-size: 16px; }

.empty-state {
  min-height: 410px; border: 1px dashed #cbd1c9; border-radius: var(--radius); display: grid; place-content: center;
  justify-items: center; text-align: center; padding: 50px; background: rgba(255,255,255,.45);
}
.empty-state h3 { margin: 22px 0 7px; font-size: 22px; letter-spacing: -.035em; }
.empty-state p { margin: 0; color: var(--ink-soft); max-width: 420px; line-height: 1.5; }
.empty-orbit { width: 58px; height: 58px; border: 1px solid #aeb7ac; border-radius: 50%; display: grid; place-items: center; position: relative; }
.empty-orbit::after { content: ""; position: absolute; inset: -8px 12px; border: 1px solid #c7cec5; border-radius: 50%; transform: rotate(50deg); }
.empty-orbit i { width: 12px; height: 12px; background: var(--green-strong); border-radius: 50%; }

.back-link, .text-button { appearance: none; border: 0; padding: 0; background: transparent; cursor: pointer; font-weight: 680; }
.back-link { margin-bottom: 24px; color: var(--ink-soft); }
.tool-title-row { display: flex; justify-content: space-between; align-items: end; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.tool-price { min-width: 170px; text-align: right; display: grid; }
.tool-price strong { font-size: 30px; letter-spacing: -.05em; }
.tool-price span { color: var(--ink-soft); font-size: 12px; }
.tool-price small { color: #3e7314; font-size: 11px; font-weight: 720; margin-top: 7px; }
.scraper-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 24px; padding-top: 28px; }
.scraper-form { display: grid; gap: 16px; }
.form-card { display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.disabled-card { opacity: .58; }
.disabled-card.enabled { opacity: 1; }
.step-number { color: #737b74; font-size: 11px; font-weight: 760; padding-top: 4px; }
.form-card h3 { margin: 0; font-size: 19px; letter-spacing: -.035em; }
.form-card p { color: var(--ink-soft); margin: 7px 0 18px; line-height: 1.5; font-size: 13px; }
.field { display: grid; gap: 8px; margin-top: 16px; }
.field > span { font-size: 11px; font-weight: 720; color: #596059; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 12px; background: #fafbf9; color: var(--ink);
  padding: 13px 14px; transition: 160ms ease;
}
.field textarea { resize: vertical; min-height: 132px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #7a8979; background: #fff; outline: 3px solid rgba(72,91,70,.08); }
.field input:disabled { cursor: not-allowed; }
.inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.primary-button, .secondary-button, .light-button {
  appearance: none; border-radius: 12px; min-height: 44px; padding: 0 16px; border: 1px solid transparent;
  cursor: pointer; font-weight: 720; font-size: 13px; transition: 160ms ease;
}
.primary-button { background: var(--ink); color: #fff; }
.primary-button:hover:not(:disabled) { background: #252a26; transform: translateY(-1px); }
.primary-button:disabled { opacity: .38; cursor: not-allowed; }
.secondary-button { background: #fff; border-color: var(--line-strong); }
.secondary-button:hover:not(:disabled) { border-color: #899087; background: #f8faf7; }
.light-button { background: var(--green); color: #11150f; }
.text-button { color: #5a625a; font-size: 12px; }
.inline-status { color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.quantity-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.quantity-heading strong { font-size: 24px; letter-spacing: -.04em; }
.quote-panel { margin-top: 20px; border-radius: 14px; padding: 16px; background: #f1f4ed; border: 1px solid #e0e6dc; }
.quote-line { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.quote-line strong { font-size: 18px; }
.quote-line.subtle { margin-top: 11px; padding-top: 11px; border-top: 1px solid #dce2d8; color: #596159; font-size: 12px; }
.quote-line.subtle strong { font-size: 13px; }
.quote-note { margin: 12px 0 0 !important; font-size: 11px !important; }
.start-button { width: 100%; margin-top: 14px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; min-height: 50px; }
.job-panel { position: sticky; top: 24px; background: #111411; color: #f8faf8; border-radius: var(--radius); padding: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.15); }
.job-panel-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 670; }
.job-panel .text-button { color: #b7bdb7; }
.live-indicator { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--green); }
.progress-number { display: flex; align-items: baseline; margin-top: 35px; }
.progress-number strong { font-size: 48px; letter-spacing: -.07em; }
.progress-number span { color: #858c86; margin-left: 6px; }
.progress-track { height: 5px; margin-top: 18px; border-radius: 10px; background: #303531; overflow: hidden; }
.progress-track i { display: block; width: 0; height: 100%; background: var(--green); transition: width .25s ease; }
.job-metric { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid #2b302c; font-size: 12px; color: #9ca29d; }
.job-metric strong { color: #fff; }
.job-log { height: 170px; overflow: auto; padding: 16px 0; color: #9fa6a0; font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.download-button { width: 100%; background: transparent; color: #fff; border-color: #3b413c; }

.billing-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 18px; }
.billing-summary-card { min-height: 245px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; align-items: flex-start; }
.billing-summary-card h3 { margin: 28px 0 8px; font-size: 28px; letter-spacing: -.05em; }
.billing-summary-card p { color: var(--ink-soft); font-size: 12px; line-height: 1.55; margin: 0 0 18px; }
.billing-summary-card button { margin-top: auto; }
.card-label { font-size: 10px; font-weight: 760; letter-spacing: .13em; text-transform: uppercase; color: #747c75; }
.dark-card { background: #111411; color: #fff; border-color: #111411; }
.dark-card .card-label, .dark-card p { color: #a9b0aa; }
.transactions-card { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.transactions-head { display: flex; justify-content: space-between; align-items: center; padding: 21px 24px; border-bottom: 1px solid var(--line); }
.transactions-head h3 { margin: 0; font-size: 16px; }
.transactions-head span { font-size: 10px; color: var(--ink-soft); font-weight: 750; }
.transaction-row { display: grid; grid-template-columns: 1fr auto; gap: 20px; padding: 17px 24px; border-bottom: 1px solid #edf0eb; }
.transaction-row:last-child { border-bottom: 0; }
.transaction-copy { display: grid; gap: 4px; }
.transaction-copy strong { font-size: 13px; }
.transaction-copy small { color: var(--ink-soft); font-size: 11px; }
.transaction-amount { text-align: right; font-size: 13px; font-weight: 720; }
.transaction-empty { padding: 38px 24px; color: var(--ink-soft); text-align: center; font-size: 13px; }

.onboarding { position: fixed; inset: 0; z-index: 100; overflow: auto; background: #0d0f0e; color: #fff; }
.onboarding-glow { position: fixed; width: 620px; height: 620px; left: 50%; top: -400px; transform: translateX(-50%); background: rgba(184,255,101,.16); filter: blur(80px); border-radius: 50%; pointer-events: none; }
.onboarding-content { position: relative; width: min(980px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 45px; }
.onboarding-brand { display: flex; align-items: center; gap: 10px; font-weight: 720; font-size: 14px; }
.onboarding-heading { max-width: 760px; margin: 64px auto 38px; text-align: center; }
.onboarding-heading .eyebrow { color: var(--green); }
.onboarding-heading h1 { margin: 15px 0 13px; font-size: clamp(38px, 6vw, 64px); line-height: .98; letter-spacing: -.065em; }
.onboarding-heading p { color: #a9b0aa; }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; max-width: 870px; margin: 0 auto; }
.plan-card { position: relative; min-height: 465px; display: flex; flex-direction: column; padding: 28px; background: #171a18; border: 1px solid #2b302c; border-radius: 24px; }
.plan-card.featured { border-color: rgba(184,255,101,.6); box-shadow: 0 25px 80px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.04); }
.popular-badge { position: absolute; top: 18px; right: 18px; padding: 6px 9px; border-radius: 999px; background: var(--green); color: #10150d; font-size: 9px; font-weight: 810; text-transform: uppercase; letter-spacing: .08em; }
.plan-kicker { color: #919992; font-size: 10px; font-weight: 780; text-transform: uppercase; letter-spacing: .13em; }
.plan-card h2 { margin: 14px 0 8px; font-size: 29px; letter-spacing: -.05em; }
.plan-price { min-height: 48px; color: #c3c9c4; font-size: 15px; }
.plan-price strong { color: #fff; font-size: 42px; letter-spacing: -.065em; }
.plan-price span { margin-left: 5px; color: #a1a8a2; }
.plan-card ul { list-style: none; display: grid; gap: 14px; padding: 24px 0; margin: 22px 0 18px; border-top: 1px solid #303531; }
.plan-card li { position: relative; padding-left: 24px; color: #c2c8c3; font-size: 13px; line-height: 1.4; }
.plan-card li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 820; }
.plan-cta { margin-top: auto; width: 100%; background: var(--green); color: #11150e; min-height: 50px; }
.plan-cta:hover:not(:disabled) { background: #cdff92; }
.plan-card > small { text-align: center; color: #777e78; margin-top: 11px; font-size: 10px; }
.terms-copy { max-width: 680px; margin: 24px auto 0; color: #707771; text-align: center; font-size: 10px; line-height: 1.5; }

.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(8,10,9,.72); backdrop-filter: blur(9px); }
.modal-card { position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 30px; border-radius: 22px; background: #fff; box-shadow: 0 35px 100px rgba(0,0,0,.3); }
.modal-card h2 { margin: 11px 0 9px; font-size: 30px; letter-spacing: -.05em; }
.modal-card > p { color: var(--ink-soft); line-height: 1.55; font-size: 13px; }
.modal-close { position: absolute; right: 18px; top: 18px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 19px; }
.field-row { display: grid; grid-template-columns: .8fr 1.2fr; gap: 12px; }
.full-button { width: 100%; margin-top: 18px; min-height: 50px; }
.modal-error { min-height: 18px; margin-top: 11px; color: var(--danger); font-size: 12px; }
.compact-modal { max-width: 480px; }
.confirmation-breakdown { display: grid; gap: 10px; padding: 16px; margin-top: 20px; border-radius: 14px; background: #f2f5ef; }
.confirmation-line { display: flex; justify-content: space-between; gap: 20px; font-size: 13px; }
.confirmation-line strong { font-weight: 750; }
.modal-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 22px; }
.toast-stack { position: fixed; right: 24px; bottom: 24px; z-index: 300; display: grid; gap: 10px; }
.toast { max-width: 360px; padding: 14px 16px; border-radius: 13px; background: #111411; color: #fff; font-size: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.24); animation: toastIn .25s ease both; }
.toast.error { background: #7d2525; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1050px) {
  .scraper-layout { grid-template-columns: 1fr; }
  .job-panel { position: static; }
  .billing-grid { grid-template-columns: 1fr 1fr; }
  .billing-summary-card:first-child { grid-column: span 2; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  body.menu-open .sidebar { transform: translateX(0); box-shadow: 20px 0 60px rgba(0,0,0,.2); }
  .workspace { padding: 0 20px 48px; }
  .topbar { height: 90px; }
  .mobile-menu { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
  .topbar > div { margin-right: auto; }
  .balance-pill { padding: 9px 11px; }
  .section-intro { margin-bottom: 22px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 280px; }
  .tool-title-row { align-items: start; }
  .tool-price { min-width: 120px; }
  .form-card { grid-template-columns: 1fr; }
  .step-number { padding: 0; }
  .billing-grid { grid-template-columns: 1fr; }
  .billing-summary-card:first-child { grid-column: auto; }
  .plan-grid { grid-template-columns: 1fr; }
  .onboarding-heading { margin-top: 48px; }
  .field-row, .modal-actions { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .topbar h1 { font-size: 18px; }
  .balance-pill { max-width: 140px; }
  .balance-pill span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tool-title-row { display: grid; }
  .tool-price { text-align: left; }
  .onboarding-content { width: min(100% - 24px, 980px); padding-top: 20px; }
  .onboarding-heading h1 { font-size: 39px; }
  .plan-card { padding: 22px; min-height: 430px; }
  .modal-card { padding: 24px 20px; }
}
