:root {
  --navy: #1a2332;
  --navy-2: #222f43;
  --navy-3: #2d3a4d;
  --yellow: #f5c518;
  --yellow-soft: #fff7d8;
  --paper: #fbfaf7;
  --white: #ffffff;
  --ink: #17202d;
  --muted: #697386;
  --line: #dde1e7;
  --line-dark: #c8ced7;
  --green: #18765a;
  --green-soft: #eaf6f1;
  --red: #a73b3b;
  --red-soft: #fff0ee;
  --orange: #b96c19;
  --shadow-sm: 0 1px 2px rgba(23, 32, 45, 0.06), 0 8px 28px rgba(23, 32, 45, 0.05);
  --shadow-lg: 0 28px 70px rgba(23, 32, 45, 0.18);
  --sidebar-width: 292px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 8%, rgba(245, 197, 24, 0.07), transparent 24rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button,
textarea,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible,
[contenteditable="true"]:focus-visible {
  outline: 3px solid rgba(245, 197, 24, 0.42);
  outline-offset: 2px;
}

::selection {
  color: var(--navy);
  background: rgba(245, 197, 24, 0.65);
}

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

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 30px 28px 26px;
  color: #fff;
  overflow: hidden auto;
  background:
    linear-gradient(156deg, rgba(255, 255, 255, 0.035), transparent 30%),
    var(--navy);
}

.sidebar::before {
  content: "";
  position: absolute;
  top: -130px;
  right: -135px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(255, 255, 255, 0.015), 0 0 0 86px rgba(255, 255, 255, 0.012);
  pointer-events: none;
}

.brand-lockup {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 197, 24, 0.45);
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  content: "";
  position: absolute;
  background: var(--yellow);
}

.brand-mark::before {
  width: 16px;
  height: 2px;
  transform: rotate(45deg);
}

.brand-mark::after {
  width: 16px;
  height: 2px;
  transform: rotate(-45deg);
}

.brand-mark span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.brand-name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.brand-name span {
  color: var(--yellow);
}

.brand-subtitle {
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.43);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.sidebar-intro {
  position: relative;
  margin: 18px 0 34px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: var(--yellow);
}

.sidebar-title {
  max-width: 210px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.32;
}

.step-nav {
  position: relative;
  flex: 1;
  padding-left: 4px;
}

.step-nav::before {
  content: "";
  position: absolute;
  top: 21px;
  bottom: 21px;
  left: 18px;
  width: 1px;
  background: rgba(255, 255, 255, 0.11);
}

.nav-step {
  position: relative;
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 29px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 5px 0;
  color: rgba(255, 255, 255, 0.42);
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: color 180ms ease;
}

.nav-step:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.nav-step:not(:disabled):hover {
  color: #fff;
}

.nav-step-dot {
  position: relative;
  z-index: 1;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: var(--navy);
  transition: 200ms ease;
}

.nav-step.done .nav-step-dot {
  color: var(--navy);
  border-color: var(--yellow);
  background: var(--yellow);
}

.nav-step.active .nav-step-dot {
  color: var(--navy);
  border-color: var(--yellow);
  background: var(--yellow);
  box-shadow: 0 0 0 5px rgba(245, 197, 24, 0.1);
}

.nav-step-copy span {
  display: block;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.28);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-step-copy strong {
  display: block;
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav-step.active .nav-step-copy span {
  color: var(--yellow);
}

.nav-step.active,
.nav-step.done {
  color: rgba(255, 255, 255, 0.94);
}

.nav-step-arrow {
  opacity: 0;
  transform: translateX(-4px);
  transition: 180ms ease;
}

.nav-step.active .nav-step-arrow {
  opacity: 0.7;
  transform: translateX(0);
}

.sidebar-foot {
  position: relative;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.candidate-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}

.candidate-dot {
  width: 9px;
  height: 9px;
  border: 2px solid var(--yellow);
  border-radius: 50%;
}

.candidate-mini span,
.candidate-mini strong {
  display: block;
}

.candidate-mini span {
  color: rgba(255, 255, 255, 0.35);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.candidate-mini strong {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
}

.sidebar-foot > p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.25);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  font-style: italic;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(28px, 5vw, 78px);
  border-bottom: 1px solid rgba(221, 225, 231, 0.82);
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: blur(18px);
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-breadcrumb i {
  width: 18px;
  height: 1px;
  background: var(--line-dark);
}

.topbar-breadcrumb strong {
  color: var(--ink);
  font-weight: 800;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.topbar-status span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(24, 118, 90, 0.1);
}

.mobile-menu {
  display: none;
}

.main-content {
  width: min(100%, 1120px);
  min-height: calc(100vh - 66px);
  padding: clamp(54px, 7vw, 96px) clamp(28px, 6vw, 86px) 90px;
  animation: enter 420ms var(--ease) both;
}

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

.page-head {
  max-width: 790px;
  margin-bottom: 34px;
}

.page-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.page-kicker::before {
  content: "";
  width: 30px;
  height: 3px;
  background: var(--yellow);
}

.page-title {
  max-width: 720px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.03;
}

.page-title em {
  color: var(--muted);
  font-weight: inherit;
}

.page-lede {
  max-width: 660px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.brief-stats {
  display: flex;
  gap: 28px;
  margin-top: 24px;
}

.brief-stat {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.brief-stat strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 400;
}

.brief-stat span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hint {
  position: relative;
  max-width: 790px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 24px;
  padding: 15px 44px 15px 16px;
  color: #5d5128;
  border: 1px solid #ead991;
  border-radius: 10px;
  background: var(--yellow-soft);
}

.hint-icon {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--navy);
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  border-radius: 50%;
  background: var(--yellow);
}

.hint p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

.hint-close {
  position: absolute;
  top: 13px;
  right: 13px;
  padding: 4px;
  color: #8a7b45;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brief-card {
  max-width: 790px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
}

.field-label {
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field-meta {
  color: var(--muted);
  font-size: 10px;
}

.jd-textarea {
  width: 100%;
  min-height: 320px;
  resize: vertical;
  padding: 21px;
  color: var(--ink);
  line-height: 1.7;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background:
    linear-gradient(var(--white), var(--white)) padding-box,
    repeating-linear-gradient(transparent 0 27px, rgba(23, 32, 45, 0.03) 28px) border-box;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.jd-textarea::placeholder {
  color: #a5acb7;
}

.jd-textarea:focus {
  border-color: var(--navy);
  outline: none;
  box-shadow: 0 0 0 4px rgba(26, 35, 50, 0.07);
}

.card-footnote {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 10px;
}

.card-footnote svg {
  width: 13px;
  color: var(--green);
}

.action-bar {
  max-width: 790px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.action-bar.end {
  justify-content: flex-end;
}

.button {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 19px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

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

.button-primary {
  color: var(--navy);
  background: var(--yellow);
  box-shadow: 0 8px 20px rgba(245, 197, 24, 0.22);
}

.button-primary:hover:not(:disabled) {
  background: #ffd52a;
  box-shadow: 0 10px 24px rgba(245, 197, 24, 0.3);
}

.button-secondary {
  color: var(--ink);
  border-color: var(--line-dark);
  background: var(--white);
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--navy);
}

.button-dark {
  color: #fff;
  background: var(--navy);
}

.button-quiet {
  min-height: 34px;
  padding: 0 10px;
  color: var(--muted);
  border: 0;
  background: transparent;
}

.button svg {
  width: 15px;
  height: 15px;
}

.loading-panel {
  max-width: 790px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.loading-orbit {
  position: relative;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.loading-orbit::before {
  content: "";
  position: absolute;
  inset: -1px;
  border: 2px solid transparent;
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

.loading-orbit::after {
  content: "";
  position: absolute;
  inset: 17px;
  border-radius: 50%;
  background: var(--navy);
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-panel h2 {
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 400;
}

.loading-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.error-panel {
  max-width: 790px;
  padding: 22px;
  color: var(--red);
  border: 1px solid #efc2bd;
  border-radius: var(--radius);
  background: var(--red-soft);
}

.error-panel strong,
.error-panel span {
  display: block;
}

.error-panel strong {
  margin-bottom: 4px;
  color: #752727;
}

.error-panel span {
  font-size: 12px;
}

.match-summary {
  max-width: 790px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 25px;
}

.match-stat {
  min-height: 85px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.match-stat span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.match-stat strong {
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 400;
}

.match-section {
  max-width: 790px;
  margin-top: 30px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 11px;
}

.section-heading-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

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

.match-badge {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.match-badge.exact { background: var(--green); }
.match-badge.partial { background: var(--orange); }
.match-badge.none { background: var(--red); }

.skill-match-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) 28px minmax(0, 1.15fr);
  align-items: center;
  gap: 16px;
  margin-top: -1px;
  padding: 18px 19px;
  border: 1px solid var(--line);
  background: var(--white);
}

.skill-match-card:first-of-type {
  margin-top: 0;
  border-radius: 11px 11px 0 0;
}

.skill-match-card:last-child {
  border-radius: 0 0 11px 11px;
}

.skill-match-card:only-child {
  border-radius: 11px;
}

.skill-origin span,
.profile-skill > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.skill-origin strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
}

.skill-connector {
  color: var(--line-dark);
  text-align: center;
}

.profile-skill-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-chip-button {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  color: var(--navy);
  text-align: left;
  border: 1px solid #cdd3dd;
  border-radius: 7px;
  background: #f8f9fb;
  cursor: pointer;
}

.skill-chip-button:hover {
  border-color: var(--navy);
}

.skill-chip-button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.skill-chip-button .skill-name {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-chip-button .skill-level {
  padding-left: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  border-left: 1px solid var(--line);
}

.add-skill-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
  border: 1px dashed var(--line-dark);
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.add-skill-button:hover {
  border-color: var(--yellow);
  background: var(--yellow-soft);
}

.add-skill-button.added {
  color: var(--green);
  border-style: solid;
  border-color: #b7d8cc;
  background: var(--green-soft);
}

.skill-editor {
  max-width: 790px;
  margin: 10px 0 20px;
  padding: 20px;
  border: 1px solid var(--navy);
  border-radius: 11px;
  background: var(--white);
  box-shadow: 0 15px 35px rgba(23, 32, 45, 0.1);
}

.skill-editor-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto;
  align-items: end;
  gap: 20px;
}

.skill-input-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.skill-name-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  color: var(--ink);
  border: 1px solid var(--line-dark);
  border-radius: 7px;
  background: #fbfbfc;
}

.proficiency-control {
  display: flex;
  align-items: center;
  gap: 5px;
}

.prof-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfbfc;
  cursor: pointer;
}

.prof-button svg {
  width: 18px;
  height: 18px;
}

.prof-button:hover,
.prof-button.active {
  color: var(--navy);
  border-color: var(--yellow);
  background: var(--yellow-soft);
}

.prof-button.active {
  box-shadow: inset 0 -2px 0 var(--yellow);
}

.skill-editor-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.skill-editor-foot small {
  color: var(--muted);
}

.experience-summary {
  max-width: 790px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 15px 18px;
  color: #fff;
  border-radius: 10px;
  background: var(--navy);
}

.experience-summary strong {
  color: var(--yellow);
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 400;
}

.experience-summary span {
  margin-left: 7px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.experience-summary p {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
}

.position-card {
  max-width: 790px;
  margin-bottom: 17px;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.position-head {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 21px 22px 17px;
  border-bottom: 1px solid var(--line);
}

.position-head h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 400;
}

.position-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.position-dates {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bullet-list {
  padding: 8px;
}

.bullet-card {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 11px;
  padding: 13px 13px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: border-color 160ms ease, background 160ms ease;
}

.bullet-card + .bullet-card {
  margin-top: 3px;
}

.bullet-card.selected {
  border-color: #ead991;
  background: #fffdf3;
}

.bullet-toggle {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  margin-top: 2px;
  color: transparent;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.bullet-card.selected .bullet-toggle {
  color: var(--navy);
  border-color: var(--yellow);
  background: var(--yellow);
}

.bullet-toggle svg {
  width: 12px;
  height: 12px;
}

.bullet-edit {
  width: 100%;
  min-height: 42px;
  resize: none;
  overflow: hidden;
  padding: 1px 0 4px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
}

.bullet-edit:focus {
  outline: none;
  border-bottom-color: var(--yellow);
}

.bullet-tags {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
}

.bullet-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  color: #506076;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.02em;
  border-radius: 999px;
  background: #edf0f4;
}

.tag-remove {
  width: 13px;
  height: 13px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #8a94a3;
  font-size: 11px;
  line-height: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tag-add {
  padding: 3px 7px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  border: 1px dashed var(--line-dark);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.tag-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 5px);
  left: 0;
  width: min(300px, 100%);
  max-height: 180px;
  padding: 6px;
  overflow: auto;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(23, 32, 45, 0.14);
}

.tag-menu button {
  width: 100%;
  display: block;
  padding: 8px 9px;
  color: var(--ink);
  font-size: 10px;
  text-align: left;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
}

.tag-menu button:hover {
  background: var(--yellow-soft);
}

.show-more {
  width: calc(100% - 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 4px 8px 8px;
  padding: 11px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 0;
  border-radius: 7px;
  background: #f6f7f9;
  cursor: pointer;
}

.show-more:hover {
  color: var(--navy);
  background: #eff1f4;
}

.gap-hero {
  max-width: 790px;
  display: grid;
  grid-template-columns: 168px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.gap-score {
  min-height: 185px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 24px;
  color: #fff;
  background: var(--navy);
}

.gap-score strong {
  font-family: Georgia, serif;
  font-size: 52px;
  font-weight: 400;
  line-height: 1;
}

.gap-score span {
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.gap-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 31px;
}

.gap-copy h2 {
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 400;
}

.gap-copy p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.gap-list {
  max-width: 790px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 20px;
}

.gap-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid #efd6ae;
  border-radius: 9px;
  background: #fffaf0;
}

.gap-item span {
  font-size: 11px;
  font-weight: 700;
}

.gap-item button {
  flex: 0 0 auto;
  padding: 5px 7px;
  color: var(--orange);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.all-covered {
  max-width: 790px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 18px;
  color: var(--green);
  border: 1px solid #b7d8cc;
  border-radius: 10px;
  background: var(--green-soft);
}

.all-covered-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--green);
}

.all-covered strong,
.all-covered span {
  display: block;
}

.all-covered strong { font-size: 12px; }
.all-covered span { margin-top: 2px; font-size: 10px; opacity: 0.8; }

.preview-toolbar {
  max-width: 960px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 12px 14px 12px 18px;
  color: #fff;
  border-radius: 10px;
  background: var(--navy);
}

.preview-toolbar p {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
}

.preview-toolbar strong {
  color: #fff;
}

.cv-stage {
  width: min(100%, 960px);
  padding: clamp(14px, 3vw, 34px);
  overflow: auto;
  border: 1px solid #d5d9df;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent),
    #e8e9ea;
}

.cv-page {
  width: 210mm;
  min-height: 297mm;
  display: grid;
  grid-template-columns: 62mm 1fr;
  margin: 0 auto;
  color: #222a35;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.cv-left {
  position: relative;
  padding: 17mm 9mm 13mm;
  color: #fff;
  background: var(--navy);
}

.cv-left::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2.4mm;
  background: var(--yellow);
}

.cv-photo-wrap {
  position: relative;
  width: 35mm;
  height: 35mm;
  margin: 0 auto 10mm;
}

.cv-photo-wrap::before {
  content: "";
  position: absolute;
  inset: -2.2mm;
  border: 0.5mm solid var(--yellow);
  border-radius: 50%;
}

.cv-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: 50%;
  filter: saturate(0.82) contrast(1.02);
}

.cv-contact {
  margin-bottom: 9mm;
}

.cv-contact-item {
  display: grid;
  grid-template-columns: 5mm 1fr;
  gap: 2mm;
  margin-bottom: 3.2mm;
  color: rgba(255, 255, 255, 0.78);
  font-size: 7.2pt;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cv-contact-item svg {
  width: 3.3mm;
  height: 3.3mm;
  color: var(--yellow);
}

.cv-side-section {
  margin-top: 8mm;
}

.cv-side-title {
  display: flex;
  align-items: center;
  gap: 2.5mm;
  margin-bottom: 4mm;
  color: var(--yellow);
  font-size: 7pt;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cv-side-title::after {
  content: "";
  flex: 1;
  height: 0.25mm;
  background: rgba(255, 255, 255, 0.16);
}

.cv-edu {
  margin-bottom: 4.5mm;
}

.cv-edu strong {
  display: block;
  font-size: 7.6pt;
  font-weight: 700;
  line-height: 1.35;
}

.cv-edu span {
  display: block;
  margin-top: 1mm;
  color: rgba(255, 255, 255, 0.55);
  font-size: 6.5pt;
  line-height: 1.4;
}

.cv-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8mm;
}

.cv-skill {
  display: inline-flex;
  align-items: center;
  gap: 1.5mm;
  padding: 1.2mm 2mm;
  color: rgba(255, 255, 255, 0.87);
  font-size: 6.1pt;
  line-height: 1.2;
  border: 0.25mm solid rgba(255, 255, 255, 0.16);
  border-radius: 8mm;
}

.cv-skill .proficiency-ring {
  width: 2.5mm;
  height: 2.5mm;
  flex: 0 0 auto;
  color: var(--yellow);
}

.cv-language {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4mm;
  margin-bottom: 2.3mm;
  color: rgba(255, 255, 255, 0.75);
  font-size: 6.8pt;
}

.language-dots {
  display: flex;
  gap: 1mm;
}

.language-dots i {
  width: 1.5mm;
  height: 1.5mm;
  border: 0.25mm solid var(--yellow);
  border-radius: 50%;
}

.language-dots i.filled {
  background: var(--yellow);
}

.cv-right {
  padding: 16mm 13mm 13mm 14mm;
}

.cv-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8mm;
  padding-bottom: 7mm;
  border-bottom: 1.1mm solid var(--yellow);
}

.cv-name {
  margin: 0;
  color: var(--navy);
  font-family: Georgia, serif;
  font-size: 27pt;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.cv-role {
  margin-top: 2.3mm;
  color: #707987;
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cv-batmark {
  width: 12mm;
  height: 12mm;
  object-fit: contain;
  opacity: 0.82;
  filter: grayscale(1) contrast(1.25);
}

.cv-summary {
  margin: 6mm 0 7mm;
  color: #56616f;
  font-family: Georgia, serif;
  font-size: 8.2pt;
  font-style: italic;
  line-height: 1.65;
}

.cv-main-title {
  display: flex;
  align-items: center;
  gap: 3mm;
  margin: 0 0 5mm;
  color: var(--navy);
  font-size: 8pt;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cv-main-title::after {
  content: "";
  flex: 1;
  height: 0.25mm;
  background: #d9dde2;
}

.cv-job {
  position: relative;
  padding: 0 0 5mm 5mm;
  break-inside: avoid;
}

.cv-job::before {
  content: "";
  position: absolute;
  top: 1.2mm;
  bottom: 0;
  left: 0;
  width: 0.3mm;
  background: #e2e5e9;
}

.cv-job::after {
  content: "";
  position: absolute;
  top: 1.1mm;
  left: -1.1mm;
  width: 2.5mm;
  height: 2.5mm;
  border: 0.4mm solid var(--yellow);
  border-radius: 50%;
  background: #fff;
}

.cv-job-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5mm;
}

.cv-job-title {
  color: var(--navy);
  font-family: Georgia, serif;
  font-size: 10.5pt;
  font-weight: 700;
  line-height: 1.2;
}

.cv-job-dates {
  color: #79818d;
  font-size: 6.5pt;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cv-job-company {
  margin-top: 0.8mm;
  color: #707987;
  font-size: 7pt;
  font-weight: 650;
}

.cv-job ul {
  margin: 2.4mm 0 0;
  padding-left: 4mm;
}

.cv-job li {
  margin-bottom: 1.4mm;
  padding-left: 1mm;
  color: #4b5665;
  font-size: 7pt;
  line-height: 1.48;
}

.cv-job li::marker {
  color: var(--yellow);
}

.empty-cv {
  padding: 10mm;
  color: var(--muted);
  font-size: 8pt;
  text-align: center;
  border: 0.3mm dashed #ccd1d8;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 8px;
}

.toast {
  max-width: 330px;
  padding: 13px 15px;
  color: #fff;
  font-size: 11px;
  border-left: 3px solid var(--yellow);
  border-radius: 7px;
  background: var(--navy);
  box-shadow: 0 12px 30px rgba(23, 32, 45, 0.2);
  animation: toast-in 240ms var(--ease) both;
}

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

@media (max-width: 1050px) {
  :root { --sidebar-width: 250px; }
  .sidebar { padding-inline: 22px; }
  .sidebar-title { font-size: 18px; }
  .main-content { padding-inline: 38px; }
  .cv-stage { width: 100%; }
  .cv-page { transform-origin: top left; }
}

@media (max-width: 780px) {
  .sidebar {
    width: min(310px, 86vw);
    transform: translateX(-102%);
    box-shadow: 18px 0 55px rgba(23, 32, 45, 0.25);
    transition: transform 260ms var(--ease);
  }

  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open::after {
    content: "";
    position: fixed;
    z-index: 15;
    inset: 0;
    background: rgba(13, 19, 28, 0.42);
  }

  .workspace { margin-left: 0; }
  .topbar { padding: 0 20px; }
  .mobile-menu {
    width: 34px;
    height: 34px;
    display: grid;
    place-content: center;
    gap: 5px;
    margin-right: 12px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
  }
  .mobile-menu span { width: 15px; height: 1px; background: var(--navy); }
  .topbar-breadcrumb { margin-right: auto; }
  .topbar-breadcrumb > span,
  .topbar-breadcrumb > i { display: none; }
  .topbar-status { display: none; }
  .main-content { padding: 48px 20px 70px; }
  .page-title { font-size: 40px; }
  .skill-match-card { grid-template-columns: 1fr; gap: 12px; }
  .skill-connector { display: none; }
  .skill-origin { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .skill-editor-grid { grid-template-columns: 1fr; }
  .gap-hero { grid-template-columns: 1fr; }
  .gap-score { min-height: 130px; }
  .gap-list { grid-template-columns: 1fr; }
  .cv-stage { padding: 12px; }
  .cv-page { transform: scale(0.72); margin-bottom: calc(-297mm * 0.28); transform-origin: top left; }
}

@media (max-width: 560px) {
  .page-title { font-size: 36px; }
  .page-lede { font-size: 14px; }
  .brief-stats { flex-wrap: wrap; }
  .brief-card { padding: 17px; }
  .jd-textarea { min-height: 280px; padding: 16px; }
  .action-bar { align-items: stretch; flex-direction: column-reverse; }
  .action-bar .button { width: 100%; }
  .match-summary { grid-template-columns: 1fr; }
  .match-stat { min-height: 68px; flex-direction: row; align-items: center; }
  .proficiency-control { flex-wrap: wrap; }
  .experience-summary { align-items: flex-start; flex-direction: column; }
  .position-head { flex-direction: column; gap: 6px; }
  .preview-toolbar { align-items: flex-start; flex-direction: column; }
  .preview-toolbar .button { width: 100%; }
  .cv-page { transform: scale(0.4); margin-bottom: calc(-297mm * 0.6); }
}

@media print {
  @page { size: A4; margin: 0; }
  html, body { width: 210mm; margin: 0; background: #fff; }
  .sidebar,
  .topbar,
  .page-head,
  .hint,
  .preview-toolbar,
  .action-bar,
  .toast-region { display: none !important; }
  .workspace,
  .main-content { width: 210mm; min-height: 0; margin: 0; padding: 0; }
  .cv-stage { width: 210mm; padding: 0; overflow: visible; border: 0; border-radius: 0; background: none; }
  .cv-page { width: 210mm; min-height: 297mm; margin: 0; box-shadow: none; transform: none !important; }
}


/* Compact, row-based skill matching */
.skill-match-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 10px 14px;
}

.skill-row {
  min-height: 36px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.role-skill-row {
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.profile-skill-row {
  padding-top: 7px;
}

.skill-row-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skill-row-content {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-row-content strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
}

.skill-origin,
.profile-skill,
.skill-connector {
  display: none;
}

.skill-chip-shell {
  position: relative;
  min-width: 0;
  display: inline-flex;
}

.skill-chip-button {
  position: relative;
  min-height: 30px;
  gap: 7px;
  padding: 5px 9px;
  overflow: hidden;
  border-radius: 6px;
}

.skill-chip-button .proficiency-ring {
  width: 17px;
  height: 17px;
}

.proficiency-ring-track {
  stroke: #6f622e;
}

.proficiency-ring-value {
  stroke: var(--yellow);
}

.skill-chip-button .skill-name {
  font-size: 11px;
}

.skill-chip-edit-cue {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  background: rgba(26, 35, 50, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.skill-chip-edit-cue svg {
  width: 12px;
  height: 12px;
}

.skill-chip-button:hover .skill-chip-edit-cue,
.skill-chip-button:focus-visible .skill-chip-edit-cue,
.skill-chip-shell.is-editing .skill-chip-edit-cue {
  opacity: 1;
}

.skill-chip-shell .skill-editor {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  width: min(500px, calc(100vw - 48px));
  max-width: none;
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(23, 32, 45, 0.18);
}

.skill-chip-shell .skill-editor::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 18px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--navy);
  border-left: 1px solid var(--navy);
  background: var(--white);
  transform: rotate(45deg);
}

.skill-chip-shell .skill-editor-grid {
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 12px;
}

.skill-chip-shell .skill-name-input {
  height: 36px;
}

.skill-chip-shell .prof-button {
  width: 36px;
  height: 36px;
}

.skill-chip-shell .prof-button .proficiency-ring {
  width: 20px;
  height: 20px;
}

.skill-chip-shell .skill-editor-foot {
  margin-top: 10px;
  padding-top: 10px;
}

.skill-chip-shell .skill-editor-foot .button {
  min-height: 32px;
  padding: 0 10px;
}

.add-skill-button {
  flex: 0 0 auto;
  padding: 5px 8px;
}

@media (max-width: 680px) {
  .skill-match-card {
    gap: 0;
    padding: 10px 12px;
  }

  .skill-row {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 8px;
  }

  .skill-chip-shell .skill-editor {
    left: -84px;
    width: calc(100vw - 48px);
  }

  .skill-chip-shell .skill-editor-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .skill-chip-shell .skill-editor-foot {
    align-items: flex-end;
    gap: 8px;
  }

  .skill-chip-shell .skill-editor-foot small {
    display: none;
  }
}


/* Transactional skill editor and clearer match grouping */
.skill-match-card,
.skill-match-card:first-of-type,
.skill-match-card:last-child,
.skill-match-card:only-child {
  margin: 8px 0 0;
  border: 1px solid #d5dae2;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(23, 32, 45, 0.035);
}

.skill-row + .skill-row {
  margin-top: 1px;
}

.proficiency-ring {
  display: block;
  object-fit: contain;
}

.add-skill-shell {
  position: relative;
  display: inline-flex;
}

.add-skill-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
}

.add-skill-status svg {
  width: 13px;
  height: 13px;
}

.add-skill-shell .skill-editor {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  width: min(500px, calc(100vw - 48px));
  max-width: none;
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(23, 32, 45, 0.18);
}

.add-skill-shell .skill-editor::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 18px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--navy);
  border-left: 1px solid var(--navy);
  background: var(--white);
  transform: rotate(45deg);
}

.add-skill-shell .skill-editor-grid {
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 12px;
}

.add-skill-shell .skill-name-input {
  height: 36px;
}

.add-skill-shell .prof-button {
  width: 36px;
  height: 36px;
}

.add-skill-shell .prof-button .proficiency-ring {
  width: 22px;
  height: 22px;
}

.add-skill-shell .skill-editor-foot {
  margin-top: 10px;
  padding-top: 10px;
}

.add-skill-shell .skill-editor-foot .button {
  min-height: 32px;
  padding: 0 10px;
}

/* Step 3 alignment and shared skill-chip language */
.experience-summary > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.experience-summary strong,
.experience-summary span {
  display: block;
  margin: 0;
  line-height: 1;
}

.bullet-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.bullet-toggle svg {
  display: block;
  flex: 0 0 auto;
}

.bullet-edit {
  min-height: 24px;
}

.bullet-tags {
  margin-top: 3px;
}

.bullet-tag {
  gap: 6px;
  padding: 5px 8px;
  color: var(--navy);
  font-size: 9px;
  border: 1px solid #cdd3dd;
  border-radius: 6px;
  background: #f8f9fb;
}

.bullet-tag .proficiency-ring {
  width: 15px;
  height: 15px;
}

.bullet-tag > span {
  font-weight: 750;
}

.tag-add {
  padding: 5px 8px;
  border-radius: 6px;
}

@media (max-width: 680px) {
  .add-skill-shell .skill-editor {
    left: -96px;
    width: calc(100vw - 48px);
  }

  .add-skill-shell .skill-editor-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .add-skill-shell .skill-editor-foot small {
    display: none;
  }
}

.profile-skill-row .skill-row-content { flex-wrap: wrap; }


/* Split skill actions and reversible match statuses */
.skill-chip-shell.has-remove .skill-chip-button {
  min-width: 168px;
}

.skill-chip-actions {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.skill-chip-shell.edit-only .skill-chip-actions {
  grid-template-columns: 1fr;
}

.skill-chip-actions button {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 7px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  border: 0;
  background: rgba(26, 35, 50, 0.88);
  cursor: pointer;
}

.skill-chip-actions button + button {
  border-left: 1px solid rgba(255, 255, 255, 0.4);
}

.skill-chip-actions button:hover,
.skill-chip-actions button:focus-visible {
  background: rgba(26, 35, 50, 0.98);
  outline: none;
}

.skill-chip-actions .remove-action:hover,
.skill-chip-actions .remove-action:focus-visible {
  background: rgba(154, 48, 48, 0.96);
}

.skill-chip-actions svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.skill-chip-shell.actions-visible .skill-chip-actions {
  opacity: 1;
  pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
  .skill-chip-shell:hover .skill-chip-actions,
  .skill-chip-shell:focus-within .skill-chip-actions {
    opacity: 1;
    pointer-events: auto;
  }
}

.match-status-shell {
  position: relative;
  display: inline-flex;
  overflow: hidden;
  border-radius: 6px;
}

.match-status-chip,
.match-status-undo {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 800;
  border-radius: 6px;
  cursor: pointer;
}

.match-status-chip svg,
.match-status-undo svg {
  width: 12px;
  height: 12px;
}

.match-status-shell.added .match-status-chip {
  color: var(--green);
  border: 1px solid #b7d8cc;
  background: var(--green-soft);
}

.match-status-shell.removed .match-status-chip {
  color: #a53a3a;
  border: 1px solid #e2b6b6;
  background: #fff1f1;
}

.match-status-undo {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  color: #fff;
  border: 0;
  background: rgba(26, 35, 50, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.match-status-undo:hover,
.match-status-undo:focus-visible {
  background: rgba(26, 35, 50, 1);
  outline: none;
}

.match-status-shell.actions-visible .match-status-undo {
  opacity: 1;
  pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
  .match-status-shell:hover .match-status-undo,
  .match-status-shell:focus-within .match-status-undo {
    opacity: 1;
    pointer-events: auto;
  }
}

.proficiency-legend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.proficiency-legend .proficiency-ring {
  width: 13px;
  height: 13px;
}

.proficiency-legend span {
  margin-left: 5px;
}

.skill-editor-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.button-remove-match {
  color: #a53a3a;
  background: transparent;
}

.button-remove-match:hover {
  color: #822a2a;
  background: #fff1f1;
}

.button-remove-match svg {
  width: 13px;
  height: 13px;
}

@media (max-width: 680px) {
  .skill-editor-foot {
    align-items: flex-end;
    gap: 10px;
  }

  .proficiency-legend span {
    display: none;
  }

  .skill-editor-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}


/* Dark pill treatment for Step 2 */
.skill-chip-button {
  color: #fff;
  border-color: #464e59;
  border-radius: 999px;
  background: #3b424c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.skill-chip-button:hover {
  border-color: #596473;
}

.skill-chip-actions {
  border-radius: 999px;
}

.skill-chip-actions button:first-child {
  background: rgba(52, 91, 132, 0.96);
}

.skill-chip-actions button:first-child:hover,
.skill-chip-actions button:first-child:focus-visible {
  background: rgba(61, 105, 151, 1);
}

.skill-chip-actions .remove-action {
  background: rgba(43, 49, 58, 0.96);
}

.skill-chip-shell .prof-button,
.add-skill-shell .prof-button {
  color: #fff;
  border-color: #48515d;
  border-radius: 999px;
  background: #3b424c;
}

.skill-chip-shell .prof-button:hover,
.skill-chip-shell .prof-button.active,
.add-skill-shell .prof-button:hover,
.add-skill-shell .prof-button.active {
  border-color: var(--yellow);
  background: #343b45;
}

.skill-chip-shell .prof-button.active,
.add-skill-shell .prof-button.active {
  box-shadow: 0 0 0 2px rgba(245, 197, 24, 0.22);
}

/* CV brand mark and print color fidelity */
.cv-batmark {
  width: 17mm;
  height: 17mm;
  box-sizing: border-box;
  padding: 2.4mm;
  border-radius: 50%;
  background: var(--yellow);
  opacity: 1;
  filter: grayscale(1) contrast(1.4);
}

@media print {
  html,
  body,
  .cv-page,
  .cv-page * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .cv-left {
    color: #fff !important;
    background-color: #1a2332 !important;
  }

  .cv-left::after,
  .cv-batmark {
    background-color: #f5c518 !important;
  }
}


/* Sticky match-section navigation */
.match-summary {
  position: sticky;
  z-index: 9;
  top: 76px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 24px;
  padding: 7px;
  border: 1px solid rgba(205, 211, 221, 0.9);
  border-radius: 8px;
  background: rgba(251, 250, 247, 0.94);
  box-shadow: 0 8px 22px rgba(23, 32, 45, 0.08);
  backdrop-filter: blur(14px);
}

.match-stat {
  min-height: 50px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  color: var(--ink);
  text-align: left;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.match-stat span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  letter-spacing: 0.07em;
}

.match-stat .match-badge {
  flex: 0 0 auto;
}

.match-stat strong {
  font-size: 21px;
}

.match-stat:hover:not(:disabled),
.match-stat:focus-visible,
.match-stat.active {
  border-color: #aeb8c6;
  background: #fff;
  box-shadow: inset 0 -2px 0 var(--yellow);
  outline: none;
}

.match-stat:disabled {
  opacity: 0.42;
  cursor: default;
}

.match-section {
  scroll-margin-top: 145px;
}

/* Position-level collapse */
.position-head {
  align-items: center;
}

.position-copy {
  min-width: 0;
}

.position-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.position-selected-count {
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.position-collapse {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f8f9fb;
  cursor: pointer;
}

.position-collapse:hover,
.position-collapse:focus-visible {
  border-color: var(--yellow);
  background: var(--yellow-soft);
  outline: none;
}

.position-collapse svg {
  width: 14px;
  height: 14px;
  transition: transform 160ms ease;
}

.position-collapse.collapsed svg {
  transform: rotate(-90deg);
}

.position-card.collapsed .position-head {
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom: 0;
}

/* Action colors appear only on the targeted half */
.skill-chip-actions button:first-child,
.skill-chip-actions .remove-action {
  background: rgba(43, 49, 58, 0.96);
}

.skill-chip-actions button:first-child:hover,
.skill-chip-actions button:first-child:focus-visible {
  background: rgba(52, 91, 132, 0.98);
}

.skill-chip-actions .remove-action:hover,
.skill-chip-actions .remove-action:focus-visible {
  background: rgba(154, 48, 48, 0.96);
}

@media (max-width: 680px) {
  .match-summary {
    display: flex;
    top: 72px;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .match-summary::-webkit-scrollbar {
    display: none;
  }

  .match-stat {
    min-width: 155px;
    flex: 0 0 auto;
  }

  .position-head {
    align-items: stretch;
  }

  .position-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .position-selected-count {
    margin-right: auto;
  }
}


/* Fitted pills and clearer proficiency selection */
.skill-chip-shell.has-remove .skill-chip-button {
  min-width: 0;
}

.skill-chip-actions button {
  gap: 3px;
  padding-right: 5px;
  padding-left: 5px;
  font-size: 8px;
}

.skill-chip-actions button > span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 7px), transparent 100%);
  mask-image: linear-gradient(to right, #000 calc(100% - 7px), transparent 100%);
}

.skill-chip-shell .prof-button,
.add-skill-shell .prof-button {
  border-width: 2px;
  border-color: #4b5562;
}

.skill-chip-shell .prof-button.active,
.add-skill-shell .prof-button.active {
  border-color: var(--yellow);
  background: #222b35;
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.45);
  transform: scale(1.06);
}

/* Yellow image field without an added shape */
.cv-batmark-wrap {
  width: 20mm;
  height: 20mm;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--yellow);
  isolation: isolate;
}

.cv-batmark {
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  opacity: 1;
  filter: grayscale(1) contrast(1.45);
  mix-blend-mode: multiply;
}

@media print {
  .cv-batmark-wrap {
    background-color: #f5c518 !important;
  }
}

/* Position controls and CV mark refinements. */
.position-head-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.cv-batmark-wrap {
  width: 24mm;
  height: 14mm;
  overflow: hidden;
  background: transparent;
  isolation: auto;
}

.cv-batmark {
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
}

@media print {
  .cv-batmark-wrap {
    background: transparent !important;
  }
}

@media (max-width: 680px) {
  .position-head-main {
    width: 100%;
  }
}

/* Overflow-aware chip actions and unboxed match navigation. */
.skill-chip-actions button {
  gap: 5px;
  padding-right: 7px;
  padding-left: 7px;
  font-size: 11px;
  container-type: inline-size;
}

.skill-chip-actions svg {
  width: 17px;
  height: 17px;
}

.skill-chip-actions button > span {
  -webkit-mask-image: none;
  mask-image: none;
  text-overflow: clip;
}

@container (max-width: 60px) {
  .skill-chip-actions button:first-child > span {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 7px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 7px), transparent 100%);
  }
}

@container (max-width: 82px) {
  .skill-chip-actions .remove-action > span {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 7px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 7px), transparent 100%);
  }
}

.match-summary {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

/* Fade action labels only after their measured content actually overflows. */
.skill-chip-actions button {
  container-type: normal;
}

.skill-chip-actions button > span {
  -webkit-mask-image: none;
  mask-image: none;
}

.skill-chip-actions button.label-overflowing > span {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 7px), transparent 100%);
  mask-image: linear-gradient(to right, #000 calc(100% - 7px), transparent 100%);
}

/* Keep newly revealed evidence from becoming the scroll anchor. */
.position-extra[hidden] {
  display: none;
}

.position-extra,
.show-more {
  overflow-anchor: none;
}

/* Supplied Batman vector and higher-contrast proficiency tracks. */
.proficiency-ring-track {
  stroke: #eef2f6;
}

.cv-batmark-wrap {
  width: 24mm;
  height: auto;
  aspect-ratio: 122.13 / 69.89;
  overflow: visible;
}

.cv-batmark {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Keep position header geometry identical when collapsed or expanded. */
.position-card.collapsed .position-head {
  padding: 21px 22px 17px;
}

/* Restore the previous proficiency track tone. */
.proficiency-ring-track {
  stroke: #aeb8c6;
}


/* Personal website navigation shell. */
:root {
  --personal-header-height: 76px;
}

.personal-site-header {
  position: sticky;
  z-index: 60;
  top: 0;
  height: var(--personal-header-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(24px, 5vw, 80px);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(23, 33, 49, 0.97);
  backdrop-filter: blur(16px);
}

.personal-site-header a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.personal-site-header a:focus-visible {
  outline: 3px solid rgba(245, 197, 24, 0.5);
  outline-offset: 3px;
}

.personal-site-brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 11px;
}

.personal-brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(245, 197, 24, 0.48);
  border-radius: 50%;
}

.personal-brand-mark::before,
.personal-brand-mark::after,
.personal-brand-mark span {
  content: "";
  position: absolute;
  background: var(--yellow);
}

.personal-brand-mark::before {
  width: 15px;
  height: 2px;
  transform: rotate(45deg);
}

.personal-brand-mark::after {
  width: 15px;
  height: 2px;
  transform: rotate(-45deg);
}

.personal-brand-mark span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.personal-brand-copy strong,
.personal-brand-copy small {
  display: block;
}

.personal-brand-copy strong {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.personal-brand-copy strong span {
  color: var(--yellow);
}

.personal-brand-copy small {
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.personal-site-nav {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 38px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.personal-site-nav a {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.personal-site-nav .active {
  color: #fff;
}

.personal-site-nav .active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: var(--yellow);
}

.personal-header-contact {
  justify-self: end;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.personal-header-contact span {
  margin-left: 5px;
  color: var(--yellow);
}

.app-shell,
.workspace {
  min-height: calc(100vh - var(--personal-header-height));
}

.sidebar {
  top: var(--personal-header-height);
}

.topbar {
  top: var(--personal-header-height);
}

.main-content {
  min-height: calc(100vh - var(--personal-header-height) - 66px);
}

.match-summary {
  top: calc(var(--personal-header-height) + 76px);
}

.match-section {
  scroll-margin-top: calc(var(--personal-header-height) + 145px);
}

@media (max-width: 1100px) {
  .personal-site-header {
    grid-template-columns: auto 1fr auto;
  }

  .personal-site-nav {
    justify-self: center;
    gap: 22px;
  }
}

@media (max-width: 780px) {
  body.sidebar-open::after {
    top: var(--personal-header-height);
  }
}

@media (max-width: 760px) {
  :root {
    --personal-header-height: 68px;
  }

  .personal-site-header {
    grid-template-columns: auto 1fr;
    gap: 16px;
    padding: 0 16px;
  }

  .personal-brand-copy {
    display: none;
  }

  .personal-brand-mark {
    width: 32px;
    height: 32px;
  }

  .personal-site-nav {
    justify-self: end;
    gap: clamp(12px, 4vw, 20px);
    font-size: 8px;
  }

  .personal-header-contact {
    display: none;
  }
}

@media (max-width: 680px) {
  .match-summary {
    top: calc(var(--personal-header-height) + 72px);
  }
}

@media print {
  .personal-site-header {
    display: none !important;
  }
}
