@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=Playfair+Display:wght@700&display=swap");

:root {
  --sun-red: #e62f2d;
  --deep-pink: #c93a32;
  --teal: #1f1f23;
  --off-white: #f5f3e8;
  --brand-black: #1a1a1a;
  --brand-white: #ffffff;
  --rule: #d9d2c4;
  --font-terminal: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --font-stylish: "Playfair Display", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--brand-black);
  font-family: var(--font-terminal);
  background-color: var(--off-white);
  min-height: 100vh;
}

.site-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 40px;
  display: grid;
  gap: 18px;
}

.hero {
  background: var(--sun-red);
  border: 2px solid var(--brand-black);
  border-radius: 16px;
  color: var(--brand-white);
  padding: 22px 24px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.14);
}

.hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.hero-link {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 20px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  letter-spacing: 0.02em;
  transition: background 150ms, border-color 150ms;
}

.hero-link:hover {
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.7);
}

.hero .meta {
  margin: 0;
  letter-spacing: 0.02em;
  opacity: 0.9;
  font-size: 14px;
}

.lang-toggle {
  display: inline-flex;
  gap: 6px;
  position: relative;
  z-index: 2;
}

.lang-btn {
  width: auto;
  min-width: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lang-btn.active {
  background: var(--brand-black);
  border-color: var(--brand-black);
}

.hero h1 {
  margin: 8px 0 16px;
  font-family: var(--font-stylish);
  font-size: clamp(50px, 8vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.hero p {
  margin: 8px 0 0;
  max-width: 900px;
  font-size: 18px;
  line-height: 1.5;
}

.hero-sub {
  opacity: 0.95;
}

.wizard-shell {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: none;
  background: transparent;
  padding: 0;
}

.progress-wrap {
  border-radius: 12px;
  background: rgba(245, 243, 232, 0.94);
  border: 1px solid rgba(26, 26, 26, 0.25);
  padding: 10px;
  margin-bottom: 12px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
}

.progress-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.14);
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--sun-red) 0%, var(--deep-pink) 70%, var(--teal) 100%);
  transition: width 420ms cubic-bezier(0.4, 0, 0.2, 1);
}

.step-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 2px;
  padding: 0;
  list-style: none;
}

.step-chip {
  border: 1px solid rgba(26, 26, 26, 0.24);
  border-radius: 999px;
  background: #fff;
  color: rgba(26, 26, 26, 0.7);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  user-select: none;
}

.step-chip.active {
  background: var(--brand-black);
  color: #fff;
  border-color: var(--brand-black);
}

.step-chip.clickable {
  cursor: pointer;
}

.step-chip.disabled {
  opacity: 0.55;
}

.block {
  background: var(--off-white);
  border: 2px solid rgba(26, 26, 26, 0.25);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 12px;
}

.tone-dark {
  background: #ffffff;
}

.tone-white {
  background: #fffdfa;
}

.tone-light {
  background: #fef8f0;
}

.block h2 {
  margin: 0 0 8px;
  font-family: var(--font-stylish);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.04;
  color: var(--brand-black);
}

.block h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-family: var(--font-terminal);
}

.block-sub,
.meta {
  margin: 0 0 12px;
  color: rgba(26, 26, 26, 0.78);
  font-size: 13px;
  letter-spacing: 0.01em;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(26, 26, 26, 0.9);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

input,
select,
textarea,
button {
  width: 100%;
  border: 1px solid rgba(26, 26, 26, 0.25);
  border-radius: 11px;
  padding: 12px 14px;
  font: inherit;
  color: var(--brand-black);
  background: var(--brand-white);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(230, 47, 45, 0.45);
  outline-offset: 1px;
}

.check-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 400;
}

.file-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 2px 0;
}

.file-picker button {
  width: auto;
  min-width: 140px;
  margin: 0;
}

.file-picker-name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(26, 26, 26, 0.72);
  word-break: break-all;
}

.more-options {
  border: 1px solid rgba(26, 26, 26, 0.2);
  border-radius: 10px;
  padding: 10px;
  margin: 10px 0 12px;
  background: #fff;
}

.more-options summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.more-options[open] summary {
  margin-bottom: 10px;
}

.check-inline input {
  width: 16px;
  height: 16px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.row-actions-between {
  justify-content: space-between;
}

.btn-primary,
.btn-secondary,
.btn {
  border: 1px solid var(--brand-black);
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.btn-primary,
button.btn-primary {
  background: var(--deep-pink);
  color: var(--brand-white);
  box-shadow: 0 3px 0 rgba(26, 26, 26, 0.22);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 10px 14px;
}

.btn-primary:hover:not(:disabled),
button.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #ba302c;
}

.btn-secondary,
button.btn-secondary {
  background: var(--off-white);
  color: var(--brand-black);
}

.btn-secondary:hover:not(:disabled),
button.btn-secondary:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #eee8da;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.list-rows {
  display: grid;
  gap: 9px;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 10px 0 6px;
}

.list-clean {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: rgba(26, 26, 26, 0.82);
}

.row-card {
  background: #fff;
  border: 1px solid rgba(26, 26, 26, 0.2);
  border-radius: 12px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 14px;
  align-items: start;
}

.intro-card {
  grid-template-columns: 1fr;
  gap: 8px;
}

.intro-card strong {
  display: block;
}

.row-card:nth-child(odd) {
  background: #fffdf9;
}

.row-card.required {
  border-left: 7px solid var(--sun-red);
}

.row-card p {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(26, 26, 26, 0.75);
}

.row-card.muted {
  color: rgba(26, 26, 26, 0.6);
}

.row-card.success-soft {
  border-color: rgba(26, 26, 26, 0.35);
  background: rgba(26, 26, 26, 0.05);
}

.score-box {
  background: #fff;
  border: 1px solid rgba(26, 26, 26, 0.22);
  border-left: 8px solid var(--teal);
  border-radius: 12px;
  padding: 12px;
}

.result-shell {
  min-height: 14px;
}

.result-nav {
  margin-top: 16px;
}

.card.result {
  border: 2px solid var(--brand-black);
  border-radius: 14px;
  padding: 24px;
  background: #fff;
}

.result h2 {
  margin-top: 0;
  font-family: var(--font-stylish);
  font-size: clamp(30px, 4vw, 42px);
}

.score-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  margin: 10px 0 14px;
}

.score-main {
  border: 1px solid rgba(26, 26, 26, 0.25);
  border-left: 8px solid var(--deep-pink);
  border-radius: 11px;
  padding: 14px 12px;
  text-align: center;
  background: #fff;
}

.score-main span {
  display: block;
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  color: var(--deep-pink);
}

.score-main small {
  color: rgba(26, 26, 26, 0.7);
}

.actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.btn {
  display: inline-block;
  padding: 11px 12px;
  background: var(--teal);
  color: #fff;
}

.btn:hover {
  transform: translateY(-1px);
  background: #17171a;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
}

.email-field {
  flex: 1;
  min-width: 260px;
}

.email-field span {
  font-size: 12px;
  margin-bottom: 5px;
}

.inline-form button {
  width: auto;
  min-width: 180px;
}

.alert {
  border-radius: 11px;
  padding: 10px 12px;
  margin: 8px 0;
  border: 1px solid rgba(26, 26, 26, 0.16);
}

.alert.warn {
  background: rgba(230, 47, 45, 0.11);
}

.alert.success {
  background: rgba(26, 26, 26, 0.09);
}

@media (max-width: 980px) {
}

@media (max-width: 820px) {
  .site-wrap {
    padding: 12px;
  }

  .hero h1 {
    font-size: clamp(40px, 13vw, 62px);
  }

  .hero p {
    font-size: 16px;
  }

  .block {
    padding: 16px;
  }

  .row-card,
  .score-grid {
    grid-template-columns: 1fr;
  }

  .inline-form {
    display: grid;
  }

  .row-actions-between {
    justify-content: flex-start;
  }
}

@media (min-width: 1100px) {
  .site-wrap {
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* Page enter */
.wizard-shell {
  animation: pageEnter 220ms ease-out;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Active chip emphasis */
.step-chip.active {
  animation: chipPulse 300ms ease-out;
}

@keyframes chipPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* Button micro-lift */
.btn-primary:not(:disabled):hover {
  transform: translateY(-2px);
  transition: transform 120ms ease;
}

.btn-primary:not(:disabled):active {
  transform: translateY(0);
  transition: transform 80ms ease;
}

/* Section stagger */
.block {
  animation: sectionReveal 200ms ease-out backwards;
}

.block:nth-child(2) {
  animation-delay: 60ms;
}

.block:nth-child(3) {
  animation-delay: 120ms;
}

@keyframes sectionReveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .wizard-shell,
  .block,
  .step-chip.active {
    animation: none;
  }

  .progress-track span {
    transition: none;
  }

  .btn-primary:not(:disabled):hover {
    transform: none;
  }
}

/* ===== ADVANCED MODE ===== */
.advanced-block {
  border: 1px solid rgba(26, 26, 26, 0.2);
  border-radius: 10px;
  padding: 10px;
  margin: 10px 0 12px;
  background: #fff;
}

.advanced-block > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.advanced-block[open] > summary {
  margin-bottom: 12px;
}

.adv-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.exp-row,
.edu-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 4px solid var(--sun-red);
  background: #fffdf9;
  border-radius: 8px;
  padding: 12px 12px 12px 14px;
}

.row-remove {
  align-self: flex-end;
  width: auto;
  min-width: 0;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid rgba(230, 47, 45, 0.5);
  background: transparent;
  color: var(--sun-red);
  cursor: pointer;
}

.row-remove:hover {
  background: rgba(230, 47, 45, 0.08);
}

.telos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.telos-item label {
  display: grid;
  gap: 6px;
}

.telos-item textarea {
  width: 100%;
  min-height: 60px;
  resize: vertical;
}

.adv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.adv-actions button {
  width: auto;
  min-width: 140px;
}

@media (max-width: 600px) {
  .adv-actions {
    flex-direction: column;
  }

  .adv-actions button {
    width: 100%;
  }
}

#comparison-toggle {
  margin: 1.2rem 0 0.6rem;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0 1.2rem;
  font-size: 0.85rem;
}

.comparison-table th,
.comparison-table td {
  border: 1px solid var(--rule);
  padding: 0.5rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.comparison-table thead th {
  background: var(--brand-black);
  color: var(--brand-white);
  font-weight: 600;
}

.comparison-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.03);
}

@media (max-width: 600px) {
  .comparison-table {
    font-size: 0.75rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.35rem 0.4rem;
  }
}

.fmt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.fmt-dialog {
  background: var(--brand-white);
  border-radius: 8px;
  padding: 1.5rem 1.8rem;
  max-width: 580px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.fmt-dialog h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-stylish);
  font-size: 1.2rem;
}

.fmt-dialog ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0;
}

.fmt-dialog li {
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

.fmt-example {
  background: var(--off-white);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0.6rem 0;
  white-space: pre-wrap;
  overflow-x: auto;
}

.fmt-close {
  margin-top: 0.8rem;
  width: 100%;
}

.site-footer {
  text-align: center;
  padding: 32px 16px 12px;
  opacity: 0.7;
}

.site-footer .footer-tagline {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--brand-black);
}

.site-footer .footer-text-link {
  font-size: 12px;
  color: var(--brand-black);
  opacity: 0.6;
}
