:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #62615f;
  --line: #dedbd4;
  --paper: #fffdf8;
  --panel: #ffffff;
  --brand: #ff5a3d;
  --brand-dark: #b72d1a;
  --teal: #087f7b;
  --green: #147a45;
  --yellow: #a86400;
  --red: #b42318;
  --shadow: 0 22px 70px rgba(23, 23, 23, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 90, 61, 0.10), transparent 34%),
    linear-gradient(220deg, rgba(8, 127, 123, 0.10), transparent 36%),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  align-items: start;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 8px;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.auth-panel {
  display: grid;
  width: min(360px, 100%);
  gap: 8px;
}

.auth-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 10px 12px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
}

.auth-help {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.plan-status {
  border: 1px solid #ffdca9;
  border-radius: 8px;
  background: #fff8ec;
  padding: 10px 12px;
  color: var(--yellow);
  font-size: 13px;
  font-weight: 900;
}

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

.login-form input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.login-form input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 90, 61, 0.16);
}

.secondary-button {
  min-height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.secondary-button:hover {
  background: #f8f6f1;
}

.checker,
.result,
.payment {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.checker {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 28px;
  padding: 24px;
}

.intro h2 {
  margin-bottom: 12px;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: 0;
}

.intro p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.form {
  min-width: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
  border: 0;
  padding: 0;
}

.category-grid legend,
.field-label {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.category-grid label {
  cursor: pointer;
}

.category-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.category-grid span {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f6f1;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.category-grid input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.field-label {
  display: block;
}

.field-help {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  outline: none;
}

textarea:focus,
.upload:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 90, 61, 0.16);
}

.upload-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 14px;
}

.upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8f6f1;
  padding: 14px;
}

.upload.drag-over {
  border-color: var(--brand);
  background: #fff2ea;
  box-shadow: 0 0 0 4px rgba(255, 90, 61, 0.16);
}

.upload input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.upload-title {
  font-weight: 900;
}

.upload-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

button {
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  padding: 0 22px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 950;
}

button:hover {
  background: var(--brand-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.result {
  margin-top: 18px;
  overflow: hidden;
}

.hidden {
  display: none;
}

.result-head {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 22px;
}

.score {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 34px;
  font-weight: 950;
}

.score.green {
  background: var(--green);
}

.score.yellow {
  background: var(--yellow);
}

.score.red {
  background: var(--red);
}

.verdict-label {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.result h2 {
  margin-bottom: 8px;
  font-size: 34px;
  line-height: 1.08;
}

.one-liner {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.result-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 22px;
}

.summary,
.share {
  grid-column: 1 / -1;
}

.block h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.block p,
.block li {
  color: var(--muted);
  line-height: 1.55;
}

.block ul {
  margin: 0;
  padding-left: 20px;
}

.share-box {
  border-left: 4px solid var(--brand);
  background: #fff5ef;
  padding: 14px 16px;
}

.error {
  border-color: #f1b5ae;
  background: #fff5f3;
  color: var(--red);
  padding: 18px;
}

.payment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 18px;
  padding: 24px;
}

.payment h2 {
  margin-bottom: 10px;
  font-size: 30px;
  line-height: 1.05;
}

.payment p {
  color: var(--muted);
  line-height: 1.6;
}

.payment-info-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 20px;
}

.payment-info-card.account-card {
  grid-column: 1 / -1;
}

.free-note,
.pro-note,
.account-note {
  display: grid;
  gap: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.free-note strong,
.pro-note strong,
.account-note strong {
  color: var(--ink);
}

.payment-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f6f1;
  padding: 18px;
}

.payment-card.pro-active {
  border-color: #b5dfc8;
  background: #f1fbf6;
}

.price {
  margin-bottom: 8px;
  font-size: 34px;
  font-weight: 950;
}

.payment-copy {
  margin-bottom: 14px;
}

.payment-hint {
  border: 1px solid #ffdca9;
  border-radius: 8px;
  background: #fff8ec;
  padding: 10px 12px;
  color: var(--yellow);
  font-size: 14px;
  font-weight: 800;
}

.payment-hint.hidden {
  display: none;
}

.paypal-status {
  margin-top: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.paypal-status.login-jump {
  cursor: pointer;
}

.paypal-status.login-jump:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  box-shadow: 0 0 0 4px rgba(255, 90, 61, 0.12);
}

.paypal-status.success {
  border-color: #b5dfc8;
  background: #edf9f2;
  color: var(--green);
}

.paypal-status.error {
  border-color: #f1b5ae;
  background: #fff5f3;
  color: var(--red);
}

.partner-ads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.partner-ad {
  display: grid;
  grid-template-rows: 180px auto auto 1fr auto;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.partner-ad img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.partner-ad .eyebrow,
.partner-ad h2,
.partner-ad p,
.partner-ad-cta {
  margin-left: 20px;
  margin-right: 20px;
}

.partner-ad .eyebrow {
  margin-top: 18px;
}

.partner-ad h2 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.05;
}

.partner-ad p {
  color: var(--muted);
  line-height: 1.55;
}

.partner-ad-cta {
  align-self: end;
  margin-bottom: 20px;
  color: var(--brand-dark);
  font-weight: 900;
}

.history {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  padding: 22px;
  box-shadow: var(--shadow);
}

.history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.history-head h2 {
  margin: 0;
}

.history-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-more {
  width: 100%;
  margin-top: 12px;
  background: var(--ink);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 14px;
}

.footer-links a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 780px) {
  .checker,
  .result-body,
  .result-head,
  .payment,
  .partner-ads {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  h1 {
    font-size: 44px;
  }

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

  .login-form {
    grid-template-columns: 1fr;
  }

  .partner-ad {
    min-height: auto;
  }

  .partner-ad img {
    height: 220px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
