/* Resume builder shell, guided navigation, and live preview. */

body {
  overflow-x: hidden;
  background: #f3f7f5;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

.builder-shell {
  min-height: 100vh;
}

.builder-topbar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid #e3ebe7;
  background: #fff;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #19323a;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.builder-home-link {
  margin-left: auto;
  padding: 7px 11px;
  border-radius: 8px;
  color: #176b5d;
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: none;
}

.builder-home-link:hover {
  background: #f0f8f4;
}

.site-heading {
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
}

.site-logo__mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #b8ded3;
  border-radius: 12px 12px 12px 4px;
  background: #dff2eb;
  color: #176b5d;
  font-size: 1rem;
  font-weight: 700;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid #d6e7df;
  border-radius: 8px;
  background: #f5faf7;
  color: #376b57;
  font-size: 0.75rem;
  font-weight: 600;
}

.privacy-badge svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.builder-main {
  min-width: 0;
}

.hero {
  max-width: 1760px;
  margin: 0 auto;
  padding: 13px clamp(24px, 4vw, 64px) 10px;
}

.hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "eyebrow cta" "title cta" "description cta";
  align-items: center;
  column-gap: 24px;
  row-gap: 3px;
  justify-items: start;
}

.hero__eyebrow,
.landing-section__eyebrow {
  color: #176b5d;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero__eyebrow { grid-area: eyebrow; }

.hero h1 {
  grid-area: title;
  max-width: 800px;
  color: #19323a;
  font-size: clamp(1.65rem, 2.8vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.hero__description {
  grid-area: description;
  color: #53666b;
  font-size: 0.95rem;
  line-height: 1.5;
}

.hero__cta {
  grid-area: cta;
  min-height: 40px;
  margin-top: 0;
  gap: 12px;
  border-radius: 10px;
}

.hero__cta:hover {
  background: #12594e;
}

.step-navigation {
  max-width: 1760px;
  margin: 0 auto;
  padding: 12px clamp(24px, 4vw, 64px) 8px;
}

.step-navigation__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.step-navigation__eyebrow {
  color: #52645f;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.step-navigation__meta strong {
  color: #4f6761;
  font-size: 0.8125rem;
  font-weight: 600;
}

.step-navigation nav {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #bed6ce transparent;
}

.step-list {
  position: relative;
  display: grid;
  min-width: 700px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 0;
  padding: 0 0 4px;
  list-style: none;
}

.step-list::before {
  position: absolute;
  top: 13px;
  right: 8%;
  left: 8%;
  height: 2px;
  background: #d9e5e0;
  content: "";
}

.step-list__item {
  position: relative;
  min-width: 0;
}

.step-link {
  display: flex;
  width: 100%;
  align-items: center;
  flex-direction: column;
  gap: 4px;
  padding: 0 5px;
  border: 0;
  background: transparent;
  color: #536660;
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  transition: color 140ms ease;
}

.step-link:hover,
.step-link.is-active,
.step-link.is-past {
  color: #176b5d;
}

.step-link__number {
  position: relative;
  z-index: 1;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 2px solid #cad9d3;
  border-radius: 50%;
  background: #f3f7f5;
  color: #52645f;
  font-size: 0.8125rem;
  font-weight: 700;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.step-link.is-past .step-link__number {
  border-color: #8bc6b3;
  background: #dff2eb;
  color: #176b5d;
}

.step-link.is-active .step-link__number {
  border-color: #176b5d;
  background: #176b5d;
  color: #fff;
  box-shadow: 0 0 0 4px #dcefe8;
}

.builder-workspace {
  display: grid;
  max-width: 1760px;
  min-height: calc(100vh - 220px);
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: start;
  gap: clamp(24px, 3.4vw, 52px);
  margin: 0 auto;
  padding: 18px clamp(24px, 4vw, 64px) 30px;
}

.mobile-tabs,
.mobile-download-bar {
  display: none;
}

#editor {
  min-width: 0;
  padding: clamp(20px, 2.5vw, 32px);
  border: 1px solid #e0e9e5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 26px rgb(37 73 60 / 5%);
}

.step-heading {
  max-width: 760px;
  margin-bottom: 22px;
}

.step-heading__count {
  margin-bottom: 8px;
  color: #176b5d;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.step-heading h2 {
  max-width: 100%;
  margin-bottom: 8px;
  color: #19323a;
  font-size: clamp(1.45rem, 1.85vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.18;
}

.step-heading p:last-child {
  color: #53666b;
  font-size: 0.95rem;
  line-height: 1.5;
}

.wizard-step[hidden] {
  display: none;
}

#editor .form-section__title {
  margin-bottom: 18px;
  color: #19323a;
  font-size: 0.9375rem;
  font-weight: 700;
}

.wizard-actions {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid #e8efec;
}

.wizard-actions .btn {
  min-height: 44px;
  padding: 0.65rem 1.1rem;
  border-radius: 10px;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.wizard-actions .btn:active {
  transform: translateY(1px);
}

.wizard-actions .btn--secondary {
  border-color: #cbd9d4;
  background: #fff;
  color: #3b5650;
}

.wizard-actions .btn--secondary:hover {
  border-color: #8db9aa;
  background: #f6faf8;
}

.wizard-actions #next-step {
  margin-left: auto;
  min-width: 174px;
  justify-content: space-between;
  gap: 16px;
  border-color: #a94732;
  background: #a94732;
  color: #fff;
}

.wizard-actions #next-step::after {
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
  content: "→";
}

.wizard-actions #next-step:hover {
  border-color: #873a2a;
  background: #873a2a;
}

.finalize-note {
  max-width: 560px;
  padding: 22px;
  border: 1px solid #dce8e3;
  border-radius: 12px;
  background: #f6faf8;
}

.finalize-note h2 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.finalize-note p {
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

#preview-panel {
  position: sticky;
  top: 24px;
  align-self: start;
  min-width: 0;
  height: calc(100vh - 48px);
  height: calc(100dvh - 48px);
  min-height: min(560px, calc(100vh - 48px));
  min-height: min(560px, calc(100dvh - 48px));
  padding: 16px;
  overflow: auto;
  border: 1px solid #dce7e2;
  border-radius: 16px;
  background: #eaf1ed;
  box-shadow: 0 8px 26px rgb(37 73 60 / 6%);
}

body.preview-fullscreen {
  overflow: hidden;
}

body.preview-fullscreen #preview-panel {
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.preview-toolbar {
  position: sticky;
  top: -16px;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: -16px -16px 10px;
  padding: 7px 12px;
  border-bottom: 1px solid #dce7e2;
  border-radius: 15px 15px 0 0;
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(10px);
}

#template-picker {
  display: flex;
  align-items: stretch;
  gap: 4px;
  color: var(--color-text);
}

.template-option {
  display: flex;
  width: 64px;
  min-height: 68px;
  align-items: center;
  flex: 0 0 64px;
  flex-direction: column;
  gap: 2px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: #425c55;
  cursor: pointer;
  font: inherit;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.2;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.template-option:hover {
  border-color: #b4d3c8;
  background: #f7fbf9;
}

.template-option.is-selected {
  border-color: var(--color-primary);
  background: #f0f8f4;
  color: var(--color-primary);
}

.template-option svg {
  display: block;
  width: 38px;
  height: 50px;
  flex: 0 0 50px;
}

.template-option__label {
  display: block;
  white-space: nowrap;
}

.preview-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  align-self: flex-start;
  margin-left: auto;
  padding-top: 0;
}

.preview-actions .btn {
  min-height: 36px;
  padding: 0.5rem 0.8rem;
}

.preview-actions__error {
  flex: 1 0 100%;
  margin-top: 0;
  text-align: right;
}

.preview-fullscreen-toggle {
  gap: 7px;
  border-color: #cbd9d4;
  background: #fff;
  color: #3b5650;
}

.preview-fullscreen-toggle:hover {
  border-color: #8db9aa;
  background: #f6faf8;
}

.preview-fullscreen-toggle svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.preview-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.preview-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34866a;
  box-shadow: 0 0 0 3px #e0f1e9;
}

#preview-viewport {
  display: flex;
  justify-content: flex-start;
  overflow: hidden;
}

#resume-preview {
  position: relative;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 4px 24px rgb(15 23 42 / 12%);
}

.resume-empty-state {
  position: absolute;
  top: 44%;
  left: 50%;
  display: flex;
  width: 340px;
  max-width: calc(100% - 3rem);
  align-items: center;
  flex-direction: column;
  transform: translate(-50%, -50%);
  color: var(--color-text);
  text-align: center;
}

.resume-empty-state__icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  place-items: center;
  border: 1px solid #cde3d9;
  border-radius: 14px 14px 14px 5px;
  background: #e5f3ed;
  color: #176b5d;
  font-size: 1.25rem;
  font-weight: 700;
}

.resume-empty-state strong {
  margin-bottom: 6px;
  font-size: 0.9375rem;
}

.resume-empty-state p {
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 20px 24px 24px;
  border-top: 1px solid #e3ebe7;
  background: #fff;
  color: var(--color-muted);
  font-size: 0.75rem;
  text-align: center;
}

.site-footer__links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.site-footer__links a,
.legal-content a {
  color: #176b5d;
  font-weight: 600;
  text-underline-offset: 3px;
}

.site-footer__links a {
  font-size: 0.8125rem;
}

.site-footer__links a[aria-current="page"] {
  color: #19323a;
  text-decoration: none;
}

.legal-content {
  width: min(100% - 32px, 800px);
  min-height: calc(100vh - 154px);
  margin: 0 auto;
  padding: clamp(42px, 7vw, 76px) 0;
}

.legal-content > .landing-section__eyebrow {
  margin-bottom: 8px;
}

.legal-content h1 {
  margin-bottom: 14px;
  color: #19323a;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.legal-content h2 {
  margin: 30px 0 8px;
  color: #19323a;
  font-size: 1.125rem;
}

.legal-content p {
  margin-bottom: 14px;
  color: #53666b;
  font-size: 0.95rem;
  line-height: 1.75;
}

.legal-content .legal-content__updated {
  margin-bottom: 32px;
  font-size: 0.8125rem;
}

.legal-content .legal-content__notice {
  margin-top: 32px;
  padding: 14px 16px;
  border-left: 3px solid #b58a38;
  border-radius: 0 8px 8px 0;
  background: #fff9e9;
  color: #66521f;
  font-size: 0.875rem;
}

.landing-content {
  display: grid;
  gap: 0;
  margin-top: 28px;
  border-top: 1px solid #e3ebe7;
  background: #fff;
}

.landing-section {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 56px clamp(24px, 5vw, 72px);
}

.landing-section + .landing-section {
  border-top: 1px solid #edf1ef;
}

.landing-section h2 {
  margin-top: 8px;
  color: #19323a;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  letter-spacing: -0.035em;
}

.how-it-works__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.how-it-works__steps li,
.why-pehlicv__points li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.how-it-works__number {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid #b8ded3;
  border-radius: 50%;
  background: #e7f4ef;
  color: #176b5d;
  font-size: 0.875rem;
  font-weight: 700;
}

.how-it-works__steps h3,
.why-pehlicv__points h3 {
  margin: 2px 0 5px;
  color: #19323a;
  font-size: 0.95rem;
}

.how-it-works__steps p,
.why-pehlicv__points p {
  color: #53666b;
  font-size: 0.875rem;
  line-height: 1.6;
}

.why-pehlicv__points {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin: 25px 0 0;
  padding: 0;
  list-style: none;
}

.why-pehlicv__points li > span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 50%;
  background: #e7f4ef;
  color: #176b5d;
  font-size: 0.8rem;
  font-weight: 700;
}

.faq__list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.faq details {
  border: 1px solid #dce7e2;
  border-radius: 10px;
  background: #fff;
}

.faq summary {
  position: relative;
  padding: 15px 44px 15px 16px;
  color: #19323a;
  cursor: pointer;
  font-size: 0.925rem;
  font-weight: 650;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  position: absolute;
  top: 50%;
  right: 17px;
  color: #176b5d;
  content: "+";
  font-size: 1.2rem;
  transform: translateY(-50%);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  padding: 0 16px 16px;
  color: #53666b;
  font-size: 0.875rem;
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .builder-workspace {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  #editor,
  #preview-panel {
    width: min(100%, 860px);
    margin: 0 auto;
  }

  #preview-panel {
    position: static;
    height: auto;
    min-height: 520px;
    overflow: hidden;
  }

}

@media (max-width: 760px) {
  .hero {
    padding-top: 19px;
    padding-bottom: 13px;
  }

  .hero__content {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "eyebrow" "title" "description" "cta";
    row-gap: 6px;
  }

  .hero__cta {
    margin-top: 4px;
  }

  .how-it-works__steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

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

  .landing-section {
    padding-top: 42px;
    padding-bottom: 42px;
  }
}

@media (max-width: 1023px) {
  .builder-workspace {
    padding-bottom: 104px;
  }

  .mobile-tabs {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border: 1px solid #dce7e2;
    border-radius: 12px;
    background: #eaf1ed;
  }

  .mobile-tabs__button {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #536b64;
    cursor: pointer;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
  }

  .mobile-tabs__button.is-active {
    background: #fff;
    color: #176b5d;
    box-shadow: 0 1px 3px rgb(25 50 58 / 12%);
  }

  .app-grid[data-active-panel="edit"] #preview-panel,
  .app-grid[data-active-panel="preview"] #editor {
    display: none;
  }

  .mobile-download-bar {
    position: fixed;
    z-index: 5;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: center;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid #dce7e2;
    background: rgb(255 255 255 / 96%);
    box-shadow: 0 -6px 20px rgb(25 50 58 / 8%);
    backdrop-filter: blur(10px);
  }

  .mobile-download-bar .btn {
    width: min(100%, 520px);
    min-height: 48px;
    font-size: 1rem;
  }

  .preview-actions [data-action="download-pdf"] {
    display: none;
  }

  #editor input,
  #editor textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .site-logo {
    min-height: 44px;
  }

  .form-actions .btn,
  .wizard-actions .btn,
  .preview-actions .btn,
  .repeatable-section__add,
  .item-card__remove,
  .skill-suggestion,
  .skill-chip__remove {
    min-height: 44px;
  }

  .skill-chip__remove {
    width: 44px;
    flex-basis: 44px;
  }

  .step-link {
    min-height: 60px;
  }

  .site-footer {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 767px) {
  .hero { padding-right: 18px; padding-left: 18px; }
  .builder-topbar { min-height: 62px; padding: 0 18px; }
  .step-navigation { padding: 11px 18px 7px; }
  .builder-workspace { gap: 18px; padding: 16px 18px 22px; }
  #editor { padding: 22px 18px; }
}

@media (max-width: 560px) {
  .hero { padding: 16px 16px 10px; }
  .hero h1 { font-size: 1.75rem; }
  .hero__description { max-width: 38rem; }
  .builder-topbar { min-height: 56px; padding: 0 14px; }
  .site-logo { gap: 0.5rem; font-size: 0.98rem; }
  .site-logo__mark { width: 31px; height: 31px; }
  .privacy-badge { gap: 5px; padding: 6px 8px; font-size: 0.6875rem; }
  .privacy-badge svg { width: 14px; height: 14px; flex-basis: 14px; }
  .step-navigation { padding: 9px 14px 6px; }
  .step-navigation__meta { margin-bottom: 7px; }
  .step-list { min-width: 650px; }
  .step-link { gap: 6px; font-size: 0.6875rem; }
  .step-link__number { width: 28px; height: 28px; }
  .step-list::before { top: 13px; }
  .builder-workspace { padding: 14px 12px 18px; }
  #editor { padding: 20px 15px; border-radius: 13px; }
  .step-heading { margin-bottom: 24px; }
  .step-heading h2 { font-size: 1.45rem; }
  .step-heading p:last-child { font-size: 0.9rem; }
  .wizard-actions { flex-wrap: wrap; gap: 8px; margin-top: 26px; }
  .wizard-actions #next-step { min-width: 0; }
  #preview-panel { min-height: 390px; padding: 12px; }
  .preview-toolbar { top: -12px; margin: -12px -12px 10px; padding: 7px 10px; }
}

@media (max-width: 420px) {
  .why-pehlicv__points {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

@media (max-width: 360px) {
  .wizard-actions .btn { padding-right: 0.8rem; padding-left: 0.8rem; font-size: 0.85rem; }
}
