:root {
  --paper: #f4efe3;
  --surface: #ffffff;
  --ink: #11130f;
  --muted: #5f665d;
  --line: #171a15;
  --green: #2f7e54;
  --green-dark: #173f2b;
  --acid: #dcff78;
  --sky: #c8dcff;
  --sand: #c6bba4;
  --rose: #f0c8d6;
  --shadow: 0 24px 70px rgba(17, 19, 15, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.wizard-page .workflow-section,
body.wizard-page .seo-section,
body.wizard-page .feature-band,
body.wizard-page .faq-section,
body.wizard-page .bottom-ribbon,
body.wizard-page .site-footer,
body.wizard-page .site-header,
body:has(.hero-section.is-reviewing-job) .workflow-section,
body:has(.hero-section.is-reviewing-job) .seo-section,
body:has(.hero-section.is-reviewing-job) .feature-band,
body:has(.hero-section.is-reviewing-job) .faq-section,
body:has(.hero-section.is-reviewing-job) .bottom-ribbon,
body:has(.hero-section.is-reviewing-job) .site-footer {
  display: none;
}

body.wizard-page .hero-section {
  min-height: 100vh;
}

button,
input,
textarea {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(244, 239, 227, 0.82);
  border-bottom: 1px solid rgba(17, 19, 15, 0.16);
  backdrop-filter: blur(16px);
}

.site-header,
.hero-copy,
.word-ribbon,
.bottom-ribbon,
.workflow-section,
.seo-section,
.feature-band,
.faq-section,
.site-footer {
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

body.is-exiting-page-copy .site-header,
body.is-exiting-page-copy .hero-copy,
body.is-exiting-page-copy .word-ribbon,
body.is-exiting-page-copy .bottom-ribbon,
body.is-exiting-page-copy .workflow-section,
body.is-exiting-page-copy .seo-section,
body.is-exiting-page-copy .feature-band,
body.is-exiting-page-copy .faq-section,
body.is-exiting-page-copy .site-footer {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.brand,
.nav-links,
.hero-actions,
.settings-row,
.panel-topline,
.output-actions,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 4px;
  min-height: 44px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  font-weight: 900;
  line-height: 1;
}

.brand-mark {
  position: relative;
  display: block;
  width: 30px;
  height: 38px;
  flex: 0 0 30px;
}

.brand-mark span {
  position: absolute;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  font-size: 1.55rem;
  line-height: 1;
  transform: rotate(-15deg);
}

.brand-mark span:nth-child(1) {
  top: 6px;
  left: 0;
  color: var(--acid);
}

.brand-mark span:nth-child(2) {
  top: 3px;
  left: 5px;
  color: var(--ink);
}

.brand-mark span:nth-child(3) {
  top: 0;
  left: 10px;
  color: transparent;
  -webkit-text-stroke: 0.9px var(--ink);
  text-stroke: 0.9px var(--ink);
}

.brand-word {
  display: inline-block;
  white-space: nowrap;
}

.brand-domain {
  color: transparent;
  -webkit-text-stroke: 0.8px var(--ink);
  text-stroke: 0.8px var(--ink);
}

.nav-links {
  gap: 24px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-links a:hover {
  color: var(--ink);
}

.header-action,
.primary-button,
.secondary-button,
.generate-button,
.output-actions button,
.keyword-row button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.header-action {
  padding: 10px 16px;
  color: var(--ink);
  background: var(--acid);
  border: 1px solid var(--ink);
  font-weight: 900;
}

.hero-section {
  display: grid;
  gap: clamp(12px, 2vw, 18px);
  justify-items: center;
  align-content: start;
  padding: clamp(18px, 2.4vw, 26px) clamp(18px, 5vw, 72px) clamp(32px, 4vw, 46px);
}

.word-ribbon,
.bottom-ribbon {
  display: grid;
  width: min(100%, 980px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  color: var(--green-dark);
  font-size: clamp(0.9rem, 2vw, 1.22rem);
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.hero-section:not(.is-step-1) .hero-copy,
.hero-section:not(.is-step-1) .word-ribbon,
.hero-section:not(.is-step-1) .bottom-ribbon {
  display: none;
}

.hero-section.is-reviewing-job {
  gap: 14px;
  padding-top: 18px;
}

.hero-section.is-reviewing-job .hero-copy,
.hero-section.is-reviewing-job .word-ribbon,
.hero-section.is-reviewing-job .bottom-ribbon {
  display: none;
}

.hero-copy {
  max-width: 860px;
  text-align: center;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
}

h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(2.55rem, 5.4vw, 5rem);
  line-height: 1;
  letter-spacing: 0;
  overflow-wrap: normal;
}

.tagline-domain {
  display: inline;
  margin-left: 0.08em;
  padding: 0;
  color: transparent;
  background: transparent;
  border: 0;
  font: inherit;
  line-height: inherit;
  -webkit-text-stroke: 1.5px var(--ink);
  text-stroke: 1.5px var(--ink);
}

h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.7vw, 3.45rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: clamp(1.24rem, 2vw, 1.7rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  overflow-wrap: normal;
  word-break: normal;
}

.hero-text {
  max-width: 680px;
  margin: 10px auto 0;
  color: #435049;
  font-size: clamp(1.04rem, 1.7vw, 1.24rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  font-weight: 800;
}

.primary-button {
  color: var(--ink);
  background: var(--acid);
  border-color: var(--ink);
}

.secondary-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--ink);
}

.primary-button:hover,
.generate-button:hover,
.header-action:hover {
  background: var(--acid);
  transform: translateY(-1px);
}

.secondary-button:hover,
.output-actions button:hover,
.keyword-row button:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

.hero-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 520px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.hero-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(23, 32, 27, 0.08);
  border-radius: 8px;
}

.hero-steps span {
  display: grid;
  width: 28px;
  height: 28px;
  grid-row: span 2;
  place-items: center;
  color: white;
  background: var(--green);
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 900;
}

.hero-steps strong {
  font-size: 0.94rem;
  line-height: 1.15;
}

.hero-steps small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-media {
  margin: 0;
}

.hero-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 315px;
  object-fit: cover;
  border: 1px solid rgba(23, 32, 27, 0.1);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.generator-section,
.workflow-section,
.seo-section,
.feature-band,
.faq-section {
  padding: clamp(42px, 7vw, 80px) clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.section-heading.compact {
  max-width: 680px;
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(340px, 1.08fr);
  gap: 18px;
  align-items: stretch;
}

.input-panel,
.output-panel {
  min-width: 0;
  padding: clamp(18px, 3vw, 28px);
  background: var(--surface);
  border: 1px solid rgba(23, 32, 27, 0.1);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(23, 32, 27, 0.08);
}

.panel-topline {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.status-pill {
  padding: 7px 10px;
  color: var(--green-dark);
  background: #e6f4ee;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-pill.is-vibe {
  display: grid;
  width: clamp(78px, 9vw, 108px);
  aspect-ratio: 1;
  place-items: center;
  padding: 10px;
  color: var(--ink);
  background: var(--acid);
  border-radius: 50%;
  font-size: clamp(0.9rem, 1.5vw, 1.08rem);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-4deg);
}

.upload-zone {
  display: grid;
  gap: 7px;
  place-items: center;
  padding: 28px 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px dashed var(--ink);
  border-radius: 8px;
  cursor: pointer;
}

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

.upload-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink);
  background: var(--acid);
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
}

.upload-zone small,
.field-group label,
.segmented-control legend {
  color: var(--muted);
  font-size: 0.88rem;
}

.field-group {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

input[type="url"],
textarea {
  width: 100%;
  color: var(--ink);
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

input[type="url"] {
  height: 46px;
  padding: 0 13px;
}

textarea {
  min-height: 156px;
  padding: 13px;
  resize: vertical;
}

input[type="url"]:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(31, 122, 92, 0.12);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

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

.segmented-control legend {
  grid-column: 1 / -1;
  margin-bottom: 8px;
}

.segmented-control label {
  min-width: 0;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
}

.segmented-control span {
  display: grid;
  min-height: 40px;
  place-items: center;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.segmented-control input:checked + span {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}

.settings-row {
  flex-wrap: wrap;
  gap: 14px;
  margin: 18px 0;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #435049;
  font-size: 0.9rem;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  position: relative;
  width: 42px;
  height: 24px;
  background: #cbd5ce;
  border-radius: 999px;
}

.switch span::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  content: "";
  background: white;
  border-radius: 50%;
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--green);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

.generate-button {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  color: var(--ink);
  background: var(--acid);
  border: 1px solid var(--ink);
  font-weight: 900;
}

.generate-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.secondary-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.flow-shell {
  width: min(100%, 940px);
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 720px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress-steps li {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 4px 10px;
  color: var(--muted);
}

.progress-steps span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink);
  background: rgba(220, 255, 120, 0.42);
  border: 1px solid rgba(17, 19, 15, 0.18);
  border-radius: 50%;
  font-size: 1.08rem;
  font-weight: 900;
}

.progress-steps strong {
  font-size: 0.95rem;
  text-align: center;
}

.progress-steps li.active {
  color: var(--ink);
}

.progress-steps li.active span {
  color: var(--ink);
  background: var(--acid);
  border-color: var(--ink);
}

.flow-card {
  display: grid;
  text-align: center;
}

.flow-step {
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    visibility 220ms ease;
  visibility: hidden;
}

.flow-step.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.hero-upload {
  width: min(100%, 760px);
  min-height: 106px;
  margin: 10px auto 0;
  background: #fbfcfb;
}

.flow-outer-button {
  width: min(100%, 320px);
  margin: 12px auto 0;
}

.flow-actions {
  display: grid;
  grid-template-columns: minmax(160px, 0.4fr) minmax(220px, 0.6fr);
  gap: 12px;
  width: min(100%, 620px);
  margin: 18px auto 0;
}

.flow-actions.single-action {
  grid-template-columns: 1fr;
  width: min(100%, 360px);
}

.flow-actions .secondary-button {
  width: 100%;
}

.job-input-card {
  width: min(100%, 760px);
  margin: 18px auto 0;
  padding: clamp(18px, 3vw, 26px);
  text-align: left;
  background: rgba(255, 255, 255, 0.82);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  box-shadow: 12px 12px 0 rgba(17, 19, 15, 0.08);
}

.job-input-card .field-group:first-child {
  margin-top: 0;
}

#jobInputView:has(#jobDescription:not(:placeholder-shown)) #jobLinkField,
#jobInputView:has(#jobLink:not(:placeholder-shown)) #jobTextField,
#jobInputView:has(#jobDescription:not(:placeholder-shown)) #jobInputDivider,
#jobInputView:has(#jobLink:not(:placeholder-shown)) #jobInputDivider {
  display: none;
}

.job-review-view {
  display: grid;
  gap: 14px;
  width: min(100%, 980px);
  margin: 0 auto;
  text-align: left;
}

.job-review-view[hidden],
.cv-review-view[hidden] {
  display: none;
}

#jobInputView,
.job-review-view,
#cvInputView,
.cv-review-view {
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

#jobInputView.is-leaving,
.job-review-view.is-leaving,
#cvInputView.is-leaving,
.cv-review-view.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

#jobInputView.is-entering,
.job-review-view.is-entering,
#cvInputView.is-entering,
.cv-review-view.is-entering {
  animation: panel-enter 260ms ease both;
}

.cv-review-view {
  display: grid;
  gap: 14px;
  width: min(100%, 1120px);
  margin: 0 auto;
  text-align: left;
}

.review-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 0.28fr) minmax(150px, 0.28fr) minmax(220px, 0.44fr);
  gap: 12px;
  width: min(100%, 760px);
  margin: 0 auto;
}

.review-toolbar .secondary-button,
.review-toolbar .generate-button {
  width: 100%;
}

.job-review-view.is-loading .job-paper {
  opacity: 0.68;
  pointer-events: none;
}

.cv-review-view.is-loading .cv-markup-layout {
  opacity: 0.68;
  pointer-events: none;
}

.job-paper {
  position: relative;
  width: 100%;
  min-height: 720px;
  margin: 0;
  padding: clamp(28px, 5vw, 62px);
  color: #11130f;
  background: #fffdf8;
  border: 1px solid rgba(17, 19, 15, 0.22);
  border-radius: 3px;
  box-shadow:
    0 20px 70px rgba(17, 19, 15, 0.14),
    10px 10px 0 rgba(17, 19, 15, 0.07);
}

.job-paper-header {
  display: grid;
  gap: 8px;
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(17, 19, 15, 0.18);
}

.job-paper-header span,
.highlight-legend {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.job-paper-header h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 3rem);
}

.job-paper-header p {
  margin: 0;
  color: #3d463f;
}

.highlight-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 auto 4px;
}

.legend-item {
  position: relative;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 8px;
  color: var(--ink);
  isolation: isolate;
}

.legend-item::before {
  position: absolute;
  inset: -4px -8px;
  z-index: -1;
  content: "";
  background: var(--highlight-color, var(--acid));
  mask: url("assets/highlight.svg") center / 100% 100% no-repeat;
  -webkit-mask: url("assets/highlight.svg") center / 100% 100% no-repeat;
  opacity: 0.82;
}

.highlighted-job-text {
  overflow: visible;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 0.98rem;
  line-height: 1.72;
}

.highlighted-job-text p {
  margin: 0 0 0.7em;
}

.highlighted-job-text p:last-child {
  margin-bottom: 0;
}

.highlighted-job-text p.is-heading {
  margin: 1.05em 0 0.45em;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.18;
}

.highlighted-job-text p.is-heading:first-child {
  margin-top: 0;
}

.highlighted-job-text p.is-gap {
  min-height: 0.25em;
  margin: 0;
}

.highlighted-job-text p.is-list-item {
  padding-left: 16px;
}

.highlight-mark {
  position: relative;
  color: var(--ink);
  background: transparent;
  font-weight: 900;
  isolation: isolate;
}

.highlight-mark::before {
  position: absolute;
  inset: -0.18em -0.32em -0.12em;
  z-index: -1;
  content: "";
  background: var(--highlight-color, var(--acid));
  mask: url("assets/highlight.svg") center / 100% 100% no-repeat;
  -webkit-mask: url("assets/highlight.svg") center / 100% 100% no-repeat;
  opacity: 0.78;
}

.is-must {
  --highlight-color: #dcff78;
}

.is-tool {
  --highlight-color: #c8dcff;
}

.is-language {
  --highlight-color: #f0c8d6;
}

.is-soft {
  --highlight-color: #b9ead3;
}

.is-nice {
  --highlight-color: #ffe08a;
}

.is-ats {
  --highlight-color: #e5ddff;
}

.job-analysis-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 16px;
  background: #fbfcfb;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
}

.job-analysis-panel[hidden] {
  display: none;
}

.job-analysis-panel.is-loading,
.job-analysis-panel.is-error {
  gap: 6px;
}

.job-analysis-panel.is-loading {
  background: rgba(220, 255, 120, 0.16);
}

.job-analysis-panel.is-loading::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 42%;
  content: "";
  background: rgba(220, 255, 120, 0.82);
  animation: analysis-progress 1.25s ease-in-out infinite;
}

.job-analysis-panel.is-loading > * {
  position: relative;
  z-index: 1;
}

.job-analysis-panel.is-error {
  background: #fff3f0;
  border-color: #9a2f22;
}

.job-analysis-panel p {
  margin: 0;
  color: var(--muted);
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes analysis-progress {
  0% {
    transform: translateX(-110%);
  }

  55% {
    transform: translateX(95%);
  }

  100% {
    transform: translateX(250%);
  }
}

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

.analysis-summary {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.cv-review-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  gap: 18px;
  align-items: end;
  width: min(100%, 980px);
  margin: 0 auto;
}

.cv-review-topline span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cv-review-topline h2 {
  margin-top: 4px;
  font-size: clamp(1.7rem, 3.4vw, 3rem);
}

.cv-review-summary {
  max-width: 760px;
  margin: 8px 0 0;
  color: #3d463f;
}

.cv-correction-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.cv-note-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 8px;
  background: var(--correction-color, var(--acid));
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  transform: rotate(var(--chip-rotation, -1deg));
}

.cv-note-chip.is-add,
.cv-margin-note.is-add,
.cv-mark.is-add {
  --correction-color: #dfffa6;
}

.cv-note-chip.is-replace,
.cv-margin-note.is-replace,
.cv-mark.is-replace,
.cv-note-chip.is-emphasize,
.cv-margin-note.is-emphasize,
.cv-mark.is-emphasize {
  --correction-color: #fff08a;
}

.cv-note-chip.is-remove,
.cv-margin-note.is-remove,
.cv-mark.is-remove {
  --correction-color: #ffc7c7;
}

.cv-note-chip.is-clarify,
.cv-margin-note.is-clarify,
.cv-mark.is-clarify {
  --correction-color: #c8dcff;
}

.cv-note-chip.is-clarify {
  --chip-rotation: 1deg;
}

.cv-fit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 980px);
  margin: 0 auto;
}

.cv-fit-grid section {
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 19, 15, 0.14);
  border-radius: 8px;
}

.cv-fit-grid h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.cv-fit-grid ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #3d463f;
  font-size: 0.92rem;
}

.cv-markup-layout {
  display: grid;
  grid-template-columns: minmax(0, 794px) minmax(220px, 280px);
  gap: 18px;
  align-items: start;
  justify-content: center;
}

.cv-paper {
  display: grid;
  gap: 0.32em;
  min-height: 980px;
  padding: clamp(34px, 5vw, 72px) clamp(26px, 5vw, 58px);
  color: #050505;
  background: white;
  border: 1px solid #b8b8b8;
  border-radius: 3px;
  box-shadow: 0 18px 60px rgba(23, 32, 27, 0.16);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(0.72rem, 1.2vw, 0.96rem);
  line-height: 1.35;
}

.cv-paper-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.34fr);
  gap: 10px;
  align-items: start;
}

.cv-paper-row:not(.has-notes) {
  grid-template-columns: minmax(0, 1fr);
}

.cv-paper-row p {
  margin: 0 0 0.55em;
  white-space: pre-wrap;
}

.cv-paper-row p.is-cv-heading {
  margin-top: 0.7em;
  font-weight: 900;
  text-transform: uppercase;
}

.cv-paper-row:first-child p.is-cv-heading {
  margin-top: 0;
}

.cv-paper-row p.is-cv-list-item {
  padding-left: 10px;
}

.cv-mark {
  position: relative;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0.02em 0.16em;
  background: linear-gradient(transparent 18%, var(--correction-color) 18% 88%, transparent 88%);
  font-weight: 800;
}

.cv-mark.is-remove {
  color: #7e1f1a;
  text-decoration: line-through;
  text-decoration-color: #c42018;
  text-decoration-thickness: 0.16em;
}

.cv-mark.is-clarify {
  text-decoration: underline wavy #315fbb 0.12em;
  text-underline-offset: 0.16em;
}

.cv-margin-notes,
.cv-general-notes {
  display: grid;
  gap: 10px;
}

.cv-general-notes {
  position: sticky;
  top: 18px;
}

.cv-general-notes h3 {
  font-size: 1.05rem;
}

.cv-margin-note {
  position: relative;
  padding: 10px 11px;
  background: var(--correction-color);
  border-radius: 8px 8px 16px 8px;
  box-shadow: 4px 5px 0 rgba(17, 19, 15, 0.12);
  color: #11130f;
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
  font-size: 0.82rem;
  line-height: 1.2;
  transform: rotate(-1.3deg);
}

.cv-margin-note:nth-child(even) {
  transform: rotate(1.1deg);
}

.cv-margin-note span {
  display: block;
  margin-bottom: 4px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cv-margin-note p,
.cv-margin-note strong,
.cv-margin-note small {
  display: block;
  margin: 0;
}

.cv-margin-note strong {
  margin-top: 6px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  line-height: 1.25;
}

.cv-margin-note small {
  margin-top: 6px;
  color: #3d463f;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
}

.warning-list {
  display: grid;
  gap: 6px;
}

.warning-list p {
  margin: 0;
  padding: 8px 10px;
  color: #704500;
  background: rgba(220, 255, 120, 0.24);
  border: 1px solid rgba(122, 75, 0, 0.2);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 800;
}

.job-external-link {
  position: absolute;
  top: clamp(8px, 1.4vw, 16px);
  right: clamp(-34px, -2.4vw, -18px);
  z-index: 2;
  display: grid;
  width: clamp(82px, 10vw, 116px);
  aspect-ratio: 1;
  align-items: center;
  justify-items: center;
  padding: 12px;
  color: var(--ink);
  background: var(--acid);
  border: 0;
  border-radius: 50%;
  box-shadow: 5px 5px 0 rgba(17, 19, 15, 0.12);
  font-size: clamp(0.72rem, 1.1vw, 0.86rem);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transform: rotate(5deg);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.job-external-link:hover {
  box-shadow: 2px 2px 0 rgba(17, 19, 15, 0.14);
  transform: rotate(2deg) translate(2px, 2px);
}

.paper-toolbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.paper-preview-frame {
  position: relative;
  width: min(100%, 794px);
  margin: 0 auto;
}

.a4-paper {
  width: 100%;
  aspect-ratio: 210 / 297;
  margin: 0 auto;
  padding: clamp(34px, 7vw, 86px) clamp(30px, 8vw, 92px);
  color: #050505;
  background: white;
  border: 1px solid #b8b8b8;
  border-radius: 3px;
  box-shadow: 0 18px 60px rgba(23, 32, 27, 0.16);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(0.56rem, 1.28vw, 0.96rem);
  line-height: 1.23;
  text-align: left;
}

.paper-paywall {
  position: absolute;
  inset: 31% 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(42px, 5.8vw, 64px) clamp(14px, 3vw, 26px) clamp(14px, 3vw, 26px);
  border-radius: 0 0 3px 3px;
  pointer-events: none;
}

.paper-paywall::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.18) 18%,
    rgba(255, 255, 255, 0.74) 43%,
    rgba(255, 255, 255, 0.94) 66%,
    rgba(255, 255, 255, 0.98)
  );
  border-radius: 0 0 3px 3px;
  backdrop-filter: blur(5px);
  mask-image: linear-gradient(180deg, transparent 0%, black 28%, black 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 28%, black 100%);
}

.paywall-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(100%, 410px);
  padding: 18px;
  color: var(--ink);
  text-align: center;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 8px 8px 18px 8px;
  box-shadow: 10px 10px 0 rgba(17, 19, 15, 0.16);
  pointer-events: auto;
}

.paywall-card span {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.paywall-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
  line-height: 1;
}

.paywall-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.paywall-card button {
  min-height: 44px;
  margin-top: 4px;
  color: var(--ink);
  background: var(--acid);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}

.a4-paper p {
  margin: 0 0 1.05em;
}

.a4-paper p:last-child {
  margin-bottom: 0;
}

.letter-address {
  margin-bottom: 2.35em;
}

.letter-recipient {
  margin-bottom: 2.9em;
}

.letter-date {
  margin: 0 0 2.3em auto;
  text-align: right;
}

.letter-subject {
  margin-bottom: 1.45em;
  font-weight: 700;
}

.letter-body {
  margin-bottom: 2.6em;
}

.signature-space {
  height: 2.7em;
}

.letter-attachments {
  margin-top: 2.7em;
}

.letter-attachments strong {
  text-decoration: underline;
}

.output-panel {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
}

.output-actions {
  gap: 8px;
}

.output-actions button,
.keyword-row button {
  min-height: 34px;
  padding: 7px 10px;
  color: var(--ink);
  background: #f7faf7;
  border-color: var(--line);
  font-size: 0.82rem;
  font-weight: 800;
}

.match-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  background: #18221d;
  border-radius: 8px;
  color: white;
}

.match-score {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
}

.match-card p {
  margin: 4px 0 0;
  color: #c8d7ce;
}

.score-ring {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #18221d 55%, transparent 57%),
    conic-gradient(var(--amber) 0 82%, rgba(255, 255, 255, 0.18) 82% 100%);
}

.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 16px 0;
}

.keyword-row span {
  margin-right: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.letter-preview {
  min-height: 368px;
  padding: clamp(18px, 3vw, 28px);
  background:
    linear-gradient(#ffffff 0 0) padding-box,
    repeating-linear-gradient(0deg, #edf1ed 0 1px, transparent 1px 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.letter-preview p {
  margin: 0 0 16px;
}

.letter-preview p:last-child {
  margin-bottom: 0;
}

.muted-line {
  color: var(--muted);
  font-weight: 800;
}

.workflow-section,
.faq-section {
  background: var(--paper);
}

.workflow-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(18px, 5vw, 80px);
  align-items: center;
  margin-bottom: 28px;
}

.vibe-bubble {
  display: grid;
  width: clamp(128px, 14vw, 190px);
  aspect-ratio: 1;
  place-items: center;
  padding: 10px;
  color: var(--ink);
  background: var(--acid);
  border-radius: 50%;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  transform: rotate(-4deg);
}

.step-grid,
.feature-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.step-grid article,
.feature-band article {
  padding: 22px;
  background: rgba(255, 255, 255, 0.76);
  border: 1.5px solid var(--ink);
  border-radius: 8px 8px 18px 8px;
}

.step-grid span {
  display: block;
  margin-bottom: 36px;
  color: var(--green-dark);
  font-weight: 900;
}

.step-grid p,
.feature-band p,
.seo-section p,
.faq-list p {
  color: var(--muted);
}

.seo-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(300px, 1.1fr);
  gap: clamp(22px, 5vw, 80px);
  align-items: start;
  background: var(--sky);
  border-top: 1px solid rgba(17, 19, 15, 0.12);
  border-bottom: 1px solid rgba(17, 19, 15, 0.12);
}

.seo-section p {
  margin: 0;
  font-size: 1.05rem;
}

.feature-band {
  background: var(--sand);
  color: var(--ink);
}

.feature-band article {
  background: rgba(244, 239, 227, 0.62);
  border-color: var(--ink);
}

.feature-band p {
  color: #30352f;
}

.faq-list {
  display: grid;
  gap: 10px;
  max-width: 920px;
}

details {
  background: rgba(255, 255, 255, 0.78);
  border: 1.5px solid rgba(17, 19, 15, 0.16);
  border-radius: 8px;
}

summary {
  padding: 18px 20px;
  font-weight: 900;
  cursor: pointer;
}

details p {
  margin: 0;
  padding: 0 20px 18px;
}

.site-footer {
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 72px);
  color: var(--ink);
  background: var(--acid);
  border-top: 1.5px solid var(--ink);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .tool-shell,
  .seo-section,
  .cv-markup-layout {
    grid-template-columns: 1fr;
  }

  .hero-section {
    padding-top: 38px;
  }

  .step-grid,
  .feature-band,
  .cv-fit-grid {
    grid-template-columns: 1fr;
  }

  .cv-general-notes {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  h2 {
    font-size: clamp(1.75rem, 8vw, 2.55rem);
  }

  h3 {
    font-size: clamp(1.18rem, 5.6vw, 1.48rem);
  }

  .site-header {
    position: static;
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .header-action {
    padding-inline: 12px;
  }

  .hero-steps,
  .segmented-control {
    grid-template-columns: 1fr;
  }

  .progress-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .progress-steps li {
    padding: 10px 5px;
  }

  .progress-steps span {
    width: 34px;
    height: 34px;
  }

  .progress-steps strong {
    font-size: 0.78rem;
  }

  .flow-actions {
    grid-template-columns: 1fr;
  }

  .review-toolbar {
    grid-template-columns: 1fr;
  }

  .cv-review-topline,
  .cv-paper-row,
  .cv-paper-row.has-notes,
  .cv-general-notes {
    grid-template-columns: 1fr;
  }

  .cv-correction-legend {
    justify-content: flex-start;
  }

  .cv-paper {
    min-height: 0;
    padding: 28px 20px;
  }

  .cv-margin-note {
    font-size: 0.8rem;
  }

  .workflow-intro {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .vibe-bubble {
    width: clamp(116px, 34vw, 150px);
    justify-self: end;
  }

  .paper-toolbar {
    flex-direction: column;
  }

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

  .output-actions {
    width: 100%;
  }

  .output-actions button {
    flex: 1;
  }
}

@media (max-width: 440px) {
  .hero-actions > *,
  .primary-button,
  .secondary-button {
    width: 100%;
  }

  h1 {
    font-size: clamp(2rem, 9vw, 2.7rem);
  }
}
