:root {
  --bg: #f3f4f6;
  --panel: #fff;
  --ink: #0f1115;
  --muted: #6b7280;
  --line: #e5e7eb;
  --green: #059669;
  --pink: #db2777;
  --orange: #ea580c;
  --orange-soft: #fff7ed;
  --blue: #2563eb;
  --shadow-sm: 0 1px 2px rgba(15, 17, 21, 0.05);
  --shadow-md: 0 10px 32px rgba(15, 17, 21, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 17, 21, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, Manrope, system-ui, sans-serif;
  color: var(--ink);
  background: #fafafa;
}

button, input, textarea { font: inherit; }

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(228, 228, 231, 0.8);
  background: rgba(250, 250, 250, 0.82);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: var(--shadow-sm);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  order: 1;
}

.brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.topbar-center {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  order: 2;
}

.topbar-revert-btn {
  width: 44px;
  min-width: 44px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

.topbar-revert-btn[hidden] {
  display: none;
}

.topbar-revert-btn svg {
  width: 18px;
  height: 18px;
}

.topbar-revert-btn:hover:not(:disabled) {
  border-color: #fdba74;
  background: #ffedd5;
  color: #7c2d12;
}

.topbar-revert-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.topbar-revert-btn:disabled,
.topbar-revert-btn.is-disabled {
  opacity: 1;
}

.mode-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #eef0f3;
  border: 1px solid var(--line);
}

.mode-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.mode-tabs button svg {
  width: 15px;
  height: 15px;
}

.mode-tabs button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

body[data-mode="tailor"] .mode-tabs button[data-mode="tailor"].active {
  color: var(--orange);
  box-shadow: 0 0 0 1px rgba(234, 88, 12, 0.25), var(--shadow-sm);
}

body[data-mode="compare"] .mode-tabs button[data-mode="compare"].active {
  color: var(--blue);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2), var(--shadow-sm);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  order: 3;
}

.save-pill {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.tool-btn {
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.tool-btn:hover {
  border-color: #cbd5e1;
  background: #fafafa;
}

.tool-btn.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.tool-btn.primary:hover {
  background: #1a1d24;
  border-color: #1a1d24;
}

.tool-btn-ai {
  border-color: #f0a030;
  background: linear-gradient(180deg, #fff8ef 0%, #fff 100%);
  color: #a85600;
}

.tool-btn-ai:hover {
  border-color: #e08a10;
  background: #fff3e0;
}

.workspace {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  height: calc(100vh - 72px);
  min-height: 0;
  position: relative;
  background: #fafafa;
}

body[data-mode="builder"] .workspace {
  grid-template-columns: 380px minmax(0, 1fr);
}

body[data-mode="builder"] .sidebar { grid-column: 1; }
body[data-mode="builder"] .preview-panel { grid-column: 2; }
body[data-mode="builder"] .flow-connector,
body[data-mode="builder"] .center-panel { display: none; }

body.sidebar-editing[data-mode="builder"] .workspace {
  grid-template-columns: 380px minmax(0, 1fr);
}

body.sidebar-editing[data-mode="tailor"] .workspace {
  grid-template-columns: minmax(300px, 340px) 28px minmax(260px, 320px) 28px minmax(0, 1fr);
}

body[data-mode="tailor"] .workspace {
  grid-template-columns: 280px 28px minmax(260px, 340px) 28px minmax(0, 1fr);
}

body[data-mode="tailor"] .sidebar { grid-column: 1; }
body[data-mode="tailor"] .flow-plus { grid-column: 2; }
body[data-mode="tailor"] .center-panel { grid-column: 3; display: block; }
body[data-mode="tailor"] .flow-equals { grid-column: 4; }
body[data-mode="tailor"] .preview-panel { grid-column: 5; }

body[data-mode="compare"] .workspace,
body[data-mode="export"] .workspace {
  grid-template-columns: minmax(360px, 44%) minmax(0, 56%);
}

body[data-mode="compare"] .sidebar,
body[data-mode="export"] .sidebar {
  display: none;
}

body[data-mode="compare"] .center-panel,
body[data-mode="export"] .center-panel {
  grid-column: 1;
  display: block;
  padding: 24px 20px 32px;
}

body[data-mode="compare"] .preview-panel,
body[data-mode="export"] .preview-panel {
  grid-column: 2;
}

body[data-mode="compare"] .flow-connector,
body[data-mode="export"] .flow-connector {
  display: none;
}

body[data-mode="compare"] .preview-head,
body[data-mode="tailor"] .preview-head {
  display: flex;
  padding: 20px 20px 0;
}

body[data-mode="compare"] .zoom-dock,
body[data-mode="compare"] .preview-side-controls,
body[data-mode="tailor"] .zoom-dock,
body[data-mode="tailor"] .preview-side-controls,
body[data-mode="export"] .zoom-dock,
body[data-mode="export"] .preview-side-controls {
  display: none;
}

.sidebar,
.center-panel {
  min-height: 0;
  overflow: auto;
}

.sidebar {
  background: #fff;
}

.center-panel {
  background: #fff;
}

body[data-mode="builder"] .sidebar {
  background: rgba(244, 244, 245, 0.82);
  backdrop-filter: blur(24px);
  border-right: 1px solid rgba(228, 228, 231, 0.85);
  box-shadow:
    1px 0 0 rgba(0, 0, 0, 0.04),
    20px 0 80px -10px rgba(0, 0, 0, 0.03),
    inset -1px 0 1px rgba(255, 255, 255, 0.25);
  padding: 24px 24px 128px;
  position: relative;
}

.preview-panel {
  min-height: 0;
  overflow: hidden;
  background: transparent;
  position: relative;
}

.sidebar {
  padding: 28px 28px;
  border-right: 1px solid var(--line);
}

body[data-mode="builder"] .sidebar {
  padding: 24px 24px 128px;
}

.center-panel {
  display: none;
  padding: 28px 24px 40px;
  border-right: 1px solid var(--line);
  position: relative;
}

body[data-mode="tailor"] .center-panel,
body[data-mode="compare"] .center-panel,
body[data-mode="export"] .center-panel {
  display: block;
}

.preview-panel {
  display: flex;
  flex-direction: column;
  position: relative;
}

.workspace-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.workspace-bg-blob {
  position: absolute;
  border-radius: 999px;
  mix-blend-mode: multiply;
  filter: blur(120px);
}

.workspace-bg-blob-a {
  top: -25%;
  left: -10%;
  width: 80%;
  height: 80%;
  background: linear-gradient(to bottom right, rgba(129, 140, 248, 0.28), rgba(196, 181, 253, 0.18), rgba(228, 228, 231, 0.18));
}

.workspace-bg-blob-b {
  bottom: -10%;
  right: -5%;
  width: 70%;
  height: 70%;
  background: linear-gradient(to top left, rgba(192, 132, 252, 0.22), rgba(245, 208, 254, 0.16), rgba(244, 244, 245, 0.16));
  filter: blur(110px);
}

.workspace-bg-blob-c {
  top: 30%;
  left: 20%;
  width: 50%;
  height: 50%;
  background: linear-gradient(to top right, rgba(191, 219, 254, 0.38), rgba(224, 242, 254, 0.28), transparent);
  filter: blur(90px);
}

.workspace-bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background: url("./noise.svg");
  background-size: 256px 256px;
}

.workspace-bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.8;
  background:
    linear-gradient(to right, rgba(128, 128, 128, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(128, 128, 128, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 70%, transparent 100%);
}

body[data-mode="builder"] #sidebar-kicker { display: none; }

body[data-mode="builder"]:not(.sidebar-editing) #sidebar-head {
  display: none;
}

body[data-mode="tailor"] #sidebar-head {
  display: none;
}

body[data-mode="builder"]:not(.sidebar-editing) .sidebar {
  padding-top: 20px;
}

.column-head {
  margin-bottom: 22px;
}

.column-head .kicker {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--green);
}

.column-head .kicker-ai { color: var(--orange); }
.column-head .kicker-result { color: var(--pink); }

.column-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

body[data-mode="builder"] .preview-head {
  display: none;
}

body[data-mode="builder"] .section-list {
  gap: 10px;
}

body[data-mode="builder"] .section-card {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border-color: #f3f4f6;
  background: rgba(249, 250, 251, 0.85);
  box-shadow: none;
}

body[data-mode="builder"] .section-card:hover {
  border-color: #e5e7eb;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 17, 21, 0.04);
}

body[data-mode="builder"] .section-card.active {
  border-color: #fdba74;
  background: linear-gradient(135deg, #fff7ed 0%, #fff 100%);
}

body[data-mode="builder"] .section-card.is-empty {
  background: rgba(255, 255, 255, 0.72);
  border-color: #f4f4f5;
}

body[data-mode="builder"] .section-card.is-empty .section-name {
  color: #a1a1aa;
}

body[data-mode="builder"] .section-card.is-empty .section-icon {
  color: #a1a1aa;
}

body[data-mode="builder"] .section-card.has-content {
  background: rgba(249, 250, 251, 0.95);
  border-color: #e4e4e7;
}

body[data-mode="builder"] .section-card.has-content .section-name {
  color: #27272a;
}

.section-list {
  display: grid;
  gap: 10px;
}

.section-card {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.section-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.section-card.active {
  border-color: #fdba74;
  background: linear-gradient(135deg, #fff7ed 0%, #fff 100%);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.section-card .drag {
  color: #c2bdb6;
  font-size: 14px;
  letter-spacing: -2px;
  user-select: none;
  cursor: grab;
}

.section-card .drag:active {
  cursor: grabbing;
}

.section-card.dragging {
  opacity: 0.5;
}

.section-card.drag-over {
  border-color: #f0a030;
  box-shadow: 0 0 0 2px rgba(240, 160, 48, 0.22);
}

.section-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #666;
}

.section-icon svg {
  width: 18px;
  height: 18px;
}

.section-name {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.section-action {
  min-width: 72px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

body[data-mode="builder"] .section-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 68px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
}

body[data-mode="builder"] .section-action svg {
  flex-shrink: 0;
}

.section-action.edit {
  border: 0;
  background: var(--blue);
  color: #fff;
}

body[data-mode="builder"] .section-action.edit {
  border: 0;
  background: #18181b;
  color: #fafafa;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

body[data-mode="builder"] .section-action.edit:hover {
  background: #27272a;
}

.section-action.add {
  border: 1px solid #f0c07a;
  background: #fff8ef;
  color: #b06a00;
}

body[data-mode="builder"] .section-action.add {
  border: 1px solid #e4e4e7;
  background: #fff;
  color: #71717a;
  box-shadow: none;
}

body[data-mode="builder"] .section-action.add:hover {
  border-color: #d4d4d8;
  background: #fafafa;
  color: #52525b;
}

.sidebar-pdf-banner {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #e8e6e2;
  background: #faf9f7;
}

.sidebar-pdf-banner[hidden] {
  display: none;
}

.sidebar-pdf-banner p {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.sidebar-convert-btn {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #d5d8de;
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.sidebar-convert-btn:hover {
  border-color: #f0a030;
  background: #fff8ef;
}

.sidebar-view-pdf-btn {
  margin-top: 8px;
}

.sidebar-editor {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.sidebar-editor[hidden] {
  display: none;
}

.sidebar-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.sidebar-editor-head-text {
  min-width: 0;
}

.sidebar-editor-head h3 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.sidebar-editor-kicker {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #a1a1aa;
}

.editor-done-btn {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: #18181b;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.editor-done-btn:hover {
  background: #27272a;
}

.sidebar-editor-back {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.sidebar-editor-head h3 {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
}

.sidebar-editor-body {
  flex: 1;
  overflow: auto;
  padding-bottom: 24px;
}

body.sidebar-editing .sidebar {
  display: flex;
  flex-direction: column;
}

body.sidebar-editing #sidebar-head,
body.sidebar-editing #sidebar-pdf-banner,
body.sidebar-editing #sidebar-sections-wrap {
  display: none !important;
}

.flow-connector {
  display: none;
  place-self: center;
  z-index: 5;
}

.flow-connector span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

body[data-mode="tailor"] .flow-connector { display: grid; }

.mode-panel { display: none; }
body[data-mode="tailor"] #tailor-mode,
body[data-mode="compare"] #compare-mode,
body[data-mode="export"] #export-mode,
body[data-mode="applications"] #applications-mode { display: block; }

body[data-mode="applications"] .workspace {
  grid-template-columns: minmax(0, 1fr);
  background: #f4f4f5;
}

body[data-mode="applications"] .sidebar,
body[data-mode="applications"] .flow-connector,
body[data-mode="applications"] .preview-panel {
  display: none;
}

body[data-mode="applications"] .center-panel {
  grid-column: 1 / -1;
  display: block;
  padding: 0;
  border-right: 0;
  background: transparent;
  overflow: hidden;
}

body[data-mode="applications"] #applications-mode {
  height: 100%;
  display: flex;
  flex-direction: column;
}

body[data-mode="applications"] #applications-mode .column-head {
  padding: 28px 40px 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

body[data-mode="applications"] #applications-root {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.tailor-ai-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fdba74;
}

.tailor-ai-status.is-ready {
  color: #14532d;
  background: #f0fdf4;
  border-color: #86efac;
}

.tailor-empty-state {
  display: grid;
  gap: 16px;
  padding: 28px 24px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff7ed 0%, #fff 100%);
  border: 1px dashed #fdba74;
  text-align: center;
}

.tailor-empty-state[hidden] {
  display: none !important;
}

.tailor-empty-lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
  color: #431407;
}

.tailor-empty-state .generate-btn {
  justify-self: center;
  min-width: 180px;
}

.job-posting-form {
  display: grid;
  gap: 16px;
  height: calc(100% - 90px);
}

.job-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.job-posting-form label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #555;
}

.job-posting-form input,
.job-posting-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
}

.job-posting-form input:focus,
.job-posting-form textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(240, 138, 24, 0.14);
}

.job-desc-label {
  flex: 1;
}

.job-desc-label textarea {
  min-height: min(520px, calc(100vh - 320px));
  resize: vertical;
  line-height: 1.55;
}

.generate-btn {
  justify-self: start;
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.tailor-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

#tailor-review-import {
  display: none !important;
}

.preview-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  z-index: 1;
}

.preview-scroll-container {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 48px 96px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.preview-scroll-container::-webkit-scrollbar {
  display: none;
}

.preview-canvas {
  position: relative;
  margin: 0 auto 32px;
  overflow: hidden;
  flex-shrink: 0;
}

.resume-zoom-container {
  width: var(--paper-width, 794px);
  margin: 0;
  transform-origin: top left;
  will-change: transform;
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

body[data-mode="builder"] .preview-canvas {
  margin-left: auto;
  margin-right: auto;
}

body[data-mode="builder"] .resume-page:not(.style-preview-page):not(.layout-thumb-page):not(:has(.cv-empty-state-visual)):not(:has(.cv-empty-state-upload)) {
  width: var(--paper-width, 794px);
  max-width: var(--paper-width, 794px);
  min-width: var(--paper-width, 794px);
  min-height: auto;
  box-shadow: 0 12px 40px rgba(15, 17, 21, 0.14);
}

.preview-subtitle {
  flex-basis: 100%;
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

body[data-mode="compare"] .review-head h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

body[data-mode="compare"] .center-panel .column-head h2 {
  font-size: clamp(22px, 2.2vw, 28px);
}

.preview-head {
  padding: 28px 24px 0;
  background: transparent;
  flex: 0 0 auto;
}

.resume-page {
  --cv-accent: #1e293b;
  --cv-accent-line: #cbd5e1;
  --cv-text: #1a1a1a;
  --cv-muted: #64748b;
  --cv-body: Inter, system-ui, sans-serif;
  --cv-display: Inter, system-ui, sans-serif;
  --cv-page-pad-x: 52px;
  --cv-page-pad-top: 48px;
  --cv-page-pad-bottom: 56px;
  position: relative;
  width: 794px;
  min-height: 1123px;
  height: auto;
  margin: 0;
  padding: var(--cv-page-pad-top) var(--cv-page-pad-x) var(--cv-page-pad-bottom);
  background: #fff;
  box-shadow: var(--shadow-lg);
  font-family: var(--cv-body);
  color: var(--cv-text);
  font-size: 10.5px;
  line-height: 1.55;
  overflow: visible;
  box-sizing: border-box;
  border-radius: 2px;
  transition: box-shadow 0.3s ease;
}

.cv-header.is-highlighted,
.cv-section.is-highlighted,
.cv-summary.is-highlighted,
.cv-links.is-highlighted,
.cv-block.is-highlighted {
  outline: 2px solid rgba(99, 102, 241, 0.45);
  outline-offset: 3px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.06);
}

.cv-editable .cv-block.is-selected {
  outline: 2px solid rgba(99, 102, 241, 0.28);
  outline-offset: 3px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.06);
}

.cv-block {
  position: relative;
  margin-bottom: 4px;
  border-radius: 8px;
  transition: box-shadow 0.15s ease, background 0.15s ease, outline-color 0.15s ease;
}

.cv-editable .cv-block-editable:hover {
  background: rgba(99, 102, 241, 0.05);
}

.cv-editable .cv-block-editable:hover:not(.is-highlighted):not(.is-selected) {
  outline: 1px solid rgba(99, 102, 241, 0.18);
  outline-offset: 3px;
}

.cv-block-edit-btn {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 6;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 999px;
  background: #fff;
  color: #4f46e5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cv-editable .cv-block-editable:hover .cv-block-edit-btn,
.cv-editable .cv-block-editable.is-selected .cv-block-edit-btn,
.cv-editable .cv-block-editable.is-highlighted .cv-block-edit-btn {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.cv-block-edit-btn:hover {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.28);
}

.cv-editable .cv-block-editable .cv-block-body {
  cursor: pointer;
}

.cv-block-grip {
  position: absolute;
  top: 50%;
  left: 2px;
  z-index: 5;
  padding: 2px 4px;
  color: #c8c2b8;
  font-size: 13px;
  letter-spacing: -2px;
  line-height: 1;
  cursor: grab;
  user-select: none;
  touch-action: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.15s ease, color 0.15s ease;
}

.cv-editable .cv-block-editable:hover .cv-block-grip,
.cv-editable .cv-block-editable.is-selected .cv-block-grip,
.cv-editable .cv-block-editable.is-highlighted .cv-block-grip,
.cv-block.dragging .cv-block-grip {
  opacity: 1;
  pointer-events: auto;
}

.cv-editable .cv-block-editable:hover .cv-block-grip,
.cv-block.dragging .cv-block-grip {
  color: #6366f1;
}

.cv-block-grip:active {
  cursor: grabbing;
}

.cv-editable .cv-block-body {
  padding: 2px 28px 2px 36px;
}

.cv-block.dragging .cv-block-body {
  cursor: grabbing;
}

.cv-block.dragging {
  opacity: 0.55;
}

.cv-block.drag-over {
  box-shadow: inset 0 3px 0 #f0a030;
}

.cv-block.drag-over-after {
  box-shadow: inset 0 -3px 0 #f0a030;
}

.cv-block-toolbar {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #ddd;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.cv-editable .cv-block:hover .cv-block-toolbar,
.cv-editable .cv-block.is-highlighted .cv-block-toolbar {
  opacity: 1;
  pointer-events: auto;
}

.cv-block-size {
  display: flex;
  align-items: center;
  gap: 2px;
}

.cv-block-size button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #444;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.cv-block-size button:hover {
  border-color: #f0a030;
  color: #c56a00;
}

.cv-block-delete-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cv-block-delete-btn:hover {
  background: #dc2626;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.cv-block-size span {
  min-width: 28px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #666;
}

.cv-ai-pill {
  position: absolute;
  top: 6px;
  left: 42px;
  z-index: 6;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #f0c07a;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff8ef 0%, #fff 100%);
  color: #c56a00;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(240, 138, 24, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cv-editable .cv-block-editable:hover .cv-ai-pill,
.cv-editable .cv-block-editable.is-selected .cv-ai-pill,
.cv-editable .cv-block-editable.is-highlighted .cv-ai-pill,
.cv-editable .cv-block-editable.cv-block-ai-active .cv-ai-pill {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.cv-ai-pill:hover {
  border-color: #f0a030;
  background: #fff3e0;
}

.cv-block-ai-active {
  background: rgba(99, 102, 241, 0.08) !important;
  outline: 2px solid rgba(123, 92, 255, 0.45) !important;
  outline-offset: 3px;
}

.section-ai-popover {
  position: absolute;
  z-index: 100;
  width: 340px;
  max-width: calc(100% - 24px);
  padding: 16px 16px 14px;
  border: 1px solid #e8e4de;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(20, 20, 20, 0.16);
}

.section-ai-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

.section-ai-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1e1a16;
}

.section-ai-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}

.section-ai-field textarea {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid #e4ded5;
  border-radius: 12px;
  resize: vertical;
  background: #fcfaf6;
  color: #1e1a16;
}

.section-ai-field textarea:focus {
  outline: 2px solid rgba(123, 92, 255, 0.35);
  border-color: #c9b8ff;
}

.section-ai-send {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #141414;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.section-ai-send:hover:not(:disabled) {
  background: #2a2a2a;
}

.section-ai-send:disabled {
  opacity: 0.55;
  cursor: wait;
}

.cv-block-body {
  grid-column: 2;
  grid-row: 1;
  font-size: var(--section-font-size, 10.5px);
  line-height: 1.55;
}

.cv-block-personal .cv-name {
  font-size: 26px;
}

.cv-block-personal .cv-title {
  font-size: 13px;
}

.cv-header-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.cv-header-main {
  flex: 1;
  min-width: 0;
}

.cv-header-photo-right {
  flex-direction: row-reverse;
}

.cv-header-photo-center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cv-header-photo-center .cv-header-main {
  width: 100%;
}

.cv-photo-wrap {
  flex-shrink: 0;
  position: relative;
  width: var(--cv-photo-size, 96px);
  height: var(--cv-photo-size, 96px);
}

.cv-photo,
.photo-settings-thumb {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #f3f4f6;
}

.photo-settings-preview .photo-settings-thumb {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.cv-photo-wrap-editable .cv-photo:not(.cv-photo-empty) {
  cursor: grab;
  touch-action: none;
}

.cv-photo-wrap-editable .cv-photo:not(.cv-photo-empty):active {
  cursor: grabbing;
}

.cv-photo-toolbar {
  position: absolute;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  z-index: 8;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.cv-photo-wrap-editable:hover .cv-photo-toolbar,
.cv-photo-wrap-editable:focus-within .cv-photo-toolbar,
.cv-block-personal.is-highlighted .cv-photo-toolbar {
  opacity: 1;
  pointer-events: auto;
}

.cv-photo-size {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.cv-photo-size button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #444;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.cv-photo-size button:hover {
  border-color: #f0a030;
  color: #c56a00;
}

.cv-photo-size span {
  min-width: 28px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #666;
}

.cv-photo-add-target {
  cursor: pointer;
}

.cv-photo-add-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: #c56a00;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

.cv-photo-add-target:hover .cv-photo-add-label {
  background: rgba(255, 248, 241, 0.92);
}

.cv-photo-empty,
.photo-settings-thumb.cv-photo-empty {
  border: 1px dashed #d1d5db;
  border-radius: 12px;
}

.resume-page[data-cv-photo="off"] .cv-photo-wrap {
  display: none;
}

.resume-page[data-cv-layout="sidebar"] .cv-header-row {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.resume-page[data-cv-layout="sidebar"] .cv-header-main {
  width: 100%;
}

.cv-header-row:has(.cv-photo-wrap-editable) {
  margin-bottom: 28px;
}

.photo-settings-block {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #f3e8dc;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8f1 0%, #fff 100%);
  display: grid;
  gap: 12px;
}

.photo-settings-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.photo-settings-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.photo-settings-actions {
  display: grid;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.photo-settings-upload {
  display: block;
  cursor: pointer;
}

.photo-upload-btn {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  padding: 10px 14px;
  font-size: 12px;
}

.photo-settings-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.photo-settings-form {
  gap: 14px;
}

.photo-profile-notice {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
  color: #7c2d12;
}

.photo-profile-notice strong {
  font-size: 13px;
}

.photo-profile-notice span {
  font-size: 12px;
  line-height: 1.35;
  color: #9a3412;
}

.photo-profile-notice button {
  justify-self: start;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #fdba74;
  border-radius: 999px;
  background: #fff;
  color: #9a3412;
  font-weight: 800;
  cursor: pointer;
}

.photo-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
}

.photo-settings-check,
.photo-settings-radios label {
  cursor: pointer;
}

.photo-settings-show {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.photo-settings-radios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.photo-settings-radios-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.photo-settings-show legend {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
}

.photo-settings-radios button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
}

.photo-settings-radios button.active {
  border-color: #1d4ed8;
  background: #eef2ff;
  color: #1e3a8a;
}

.export-photo-block {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.export-photo-block strong {
  font-size: 13px;
}

.export-photo-hint {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.export-photo-radios {
  display: grid;
  gap: 6px;
}

.export-photo-radios label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.account-menu-row-icon--muted {
  background: #f8fafc;
  color: #64748b;
}

.account-profile-photo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px #f3e8dc;
}

.account-photo-block {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.account-photo-label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.account-photo-hint {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.account-photo-preview {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  object-fit: cover;
  background: #f8fafc;
}

.account-photo-preview-empty {
  border: 1px dashed #d1d5db;
}

.account-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-photo-upload-btn,
.account-photo-remove-btn {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.account-photo-remove-btn {
  color: #dc2626;
  border-color: #fecaca;
  background: #fff5f5;
}

.account-photo-upload-btn input {
  display: none;
}

.cv-block-personal:has(+ .cv-block-links.cv-block-merged) {
  margin-bottom: 0;
}

.cv-block-personal:has(+ .cv-block-links.cv-block-merged) .cv-block-body {
  padding: 10px 12px;
  border: 1px solid #e6e6e6;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  background: #fafafa;
}

.cv-block-links.cv-block-merged {
  margin-top: 0;
}

.cv-block-links.cv-block-merged .cv-block-body {
  padding: 0 12px 10px;
  border: 1px solid #e6e6e6;
  border-top: none;
  border-radius: 0 0 4px 4px;
  background: #fafafa;
}

[data-cv-section] {
  cursor: pointer;
  transition: outline 0.15s ease, background 0.15s ease;
}

body[data-mode="compare"] [data-cv-section],
body[data-mode="export"] [data-cv-section] {
  cursor: default;
}

.print-root {
  display: none;
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  html,
  body {
    width: 210mm;
    height: 297mm;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: hidden;
  }

  body.is-printing > *:not(#print-root) {
    display: none !important;
  }

  body.is-printing #print-root {
    display: block !important;
    box-sizing: border-box;
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: var(--cv-page-pad-top) var(--cv-page-pad-x) var(--cv-page-pad-bottom);
    background: #fff;
    color: #202020;
    font-family: Arial, sans-serif;
    box-shadow: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  body.is-printing #print-root *,
  body.is-printing #print-root *::before,
  body.is-printing #print-root *::after {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  #print-root .cv-block-toolbar,
  #print-root .cv-block-grip,
  #print-root .cv-block-edit-btn,
  #print-root .cv-block-delete-btn {
    display: none !important;
  }

  #print-root .cv-editable .cv-block-draggable,
  #print-root .cv-block-draggable {
    display: block !important;
    grid-template-columns: unset !important;
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #print-root .cv-block.is-highlighted,
  #print-root .cv-header.is-highlighted,
  #print-root .cv-section.is-highlighted,
  #print-root .cv-summary.is-highlighted,
  #print-root .cv-links.is-highlighted {
    outline: none !important;
    background: transparent !important;
  }

  #print-root .cv-block-personal:has(+ .cv-block-links.cv-block-merged) .cv-block-body,
  #print-root .cv-block-links.cv-block-merged .cv-block-body {
    border: none !important;
    padding: 0 !important;
  }

  #print-root .cv-block {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 10px;
  }

  #print-root .cv-row {
    flex-wrap: wrap;
  }
}

.cv-placeholder {
  margin: 0;
  color: #aaa;
  font-size: 10px;
  font-style: italic;
}

.cv-name {
  margin: 0;
  font-family: var(--cv-display);
  font-size: 28px;
  font-weight: 700;
  text-transform: var(--cv-name-transform, none);
  letter-spacing: var(--cv-name-spacing, -0.02em);
  color: var(--cv-text);
  line-height: 1.15;
}

.cv-title {
  margin: 5px 0 10px;
  color: var(--cv-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.cv-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--cv-muted);
  font-size: 10px;
  line-height: 1.5;
}

.cv-contact a.cv-contact-action {
  color: var(--cv-accent);
  text-decoration: underline;
  pointer-events: auto;
}

.cv-contact a:not(.cv-link-label):not(.cv-contact-action) {
  color: var(--cv-accent);
  text-decoration: underline;
  pointer-events: none;
}

.cv-link-chip .cv-link-label {
  pointer-events: none;
}

.cv-editable .cv-preview-field {
  cursor: text;
  border-radius: 4px;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

.cv-editable .cv-preview-field-empty {
  color: #94a3b8;
  font-style: italic;
}

.cv-editable .cv-preview-field:hover,
.cv-editable .cv-preview-field:focus-visible,
.cv-editable .cv-preview-field.is-field-active {
  background: rgba(99, 102, 241, 0.1);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.35);
}

.form-section-kicker {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #71717a;
}

.structured-form-core label input,
.structured-form-core label textarea {
  font-size: 14px;
}

.cv-summary,
.cv-text.cv-preview-field {
  white-space: pre-wrap;
}

.cv-editable .cv-preview-links {
  cursor: pointer;
}

.cv-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  pointer-events: auto;
}

.cv-link-drag {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  line-height: 1;
  color: #94a3b8;
  cursor: grab;
  border-radius: 3px;
  flex-shrink: 0;
  user-select: none;
}

.cv-link-drag:active {
  cursor: grabbing;
}

.cv-link-chip.is-dragging {
  opacity: 0.55;
}

.cv-link-chip.drag-over-before {
  box-shadow: inset 2px 0 0 #6366f1;
}

.cv-link-chip.drag-over-after {
  box-shadow: inset -2px 0 0 #6366f1;
}

.cv-contact-links-below {
  margin-top: 6px;
}

.cv-contact-links-below.is-active .cv-preview-links-row {
  margin-top: 4px;
}

.cv-preview-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--cv-muted);
  font-size: 10px;
}

.cv-contact-links-below.is-drop-target:not(.is-active) {
  min-height: 22px;
}

.cv-editable .cv-block-personal.is-link-dragging .cv-links-drop-inline.is-drop-target,
.cv-editable .cv-block-personal.is-link-dragging .cv-links-drop-below.is-drop-target {
  border-radius: 6px;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

.cv-editable .cv-links-drop-inline.drag-over,
.cv-editable .cv-links-drop-below.drag-over {
  background: rgba(99, 102, 241, 0.08);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.35);
}

.item-card[data-item="links"].is-link-active {
  box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0.35);
  border-radius: 12px;
}

.cv-link-chip.is-link-active {
  background: rgba(99, 102, 241, 0.14);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.45);
}

.cv-editable .cv-link-chip {
  padding: 1px 2px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.06);
}

.cv-link-remove {
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.cv-editable .cv-link-chip:hover .cv-link-remove,
.cv-editable .cv-link-chip:focus-within .cv-link-remove,
.cv-editable .cv-link-remove:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

@media (hover: none) {
  .cv-editable .cv-link-remove {
    opacity: 1;
    pointer-events: auto;
  }
}

.cv-link-remove:hover {
  background: #dc2626;
  transform: scale(1.08);
}

.personal-links-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #ececf1;
}

.personal-links-block .drawer-hint {
  margin-top: -6px;
}

.cv-contact-sep {
  pointer-events: none;
  user-select: none;
}

.cv-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  line-height: 1.5;
}

.cv-links a {
  color: var(--cv-accent);
  text-decoration: underline;
}

.cv-summary,
.cv-text {
  white-space: pre-wrap;
  line-height: 1.55;
}

.cv-section {
  margin-top: 18px;
}

.cv-block-body .cv-section {
  margin-top: 0;
}

.cv-block:not(.cv-block-personal) {
  margin-top: 14px;
}

.cv-block-body .cv-section h2 {
  font-size: calc(var(--section-font-size, 10.5px) + 1px);
}

.cv-section h2 {
  margin: 0 0 8px;
  padding-bottom: 5px;
  border-bottom: 1.5px solid var(--cv-accent-line);
  color: var(--cv-accent);
  font-family: var(--cv-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resume-page[data-cv-section-style="serif"] .cv-section h2 {
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 11.5px;
  font-weight: 600;
  border-bottom-width: 1px;
}

.cv-item { margin-bottom: 10px; }

.cv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: inherit;
}

.cv-row strong {
  color: var(--cv-text);
  font-weight: 700;
}

.cv-row span {
  color: var(--cv-muted);
  font-size: 9.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cv-sub {
  margin: 2px 0 4px;
  color: var(--cv-muted);
  font-size: 9.5px;
}

.cv-bullets {
  margin: 4px 0 0;
  padding-left: 15px;
  font-size: inherit;
  line-height: 1.5;
}

.cv-bullets li {
  margin-bottom: 2px;
}

.zoom-dock {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px;
  border-radius: 999px;
  background: rgba(24, 24, 27, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  z-index: 12;
  pointer-events: auto;
}

body[data-mode="tailor"] .zoom-dock,
body[data-mode="compare"] .zoom-dock,
body[data-mode="export"] .zoom-dock,
body[data-mode="tailor"] .preview-side-controls,
body[data-mode="compare"] .preview-side-controls,
body[data-mode="export"] .preview-side-controls {
  display: none;
}

.zoom-dock-btn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.zoom-dock-btn:hover:not(:disabled) {
  color: #fff;
}

.zoom-dock-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.zoom-dock-btn-icon {
  width: 36px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.zoom-dock-btn-icon:first-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.zoom-dock-btn-icon:last-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.zoom-dock-btn-label {
  min-width: 88px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.zoom-dock-btn-label:hover {
  color: #fff;
}

.zoom-dock-btn-label.is-active {
  color: #fff;
}

.zoom-dock-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  margin: 0 2px;
}

.preview-side-controls {
  position: absolute;
  right: 48px;
  bottom: 32px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: auto;
}

.preview-side-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.preview-side-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(24, 24, 27, 0.82);
  backdrop-filter: blur(16px);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.preview-side-btn:hover {
  background: rgba(39, 39, 42, 0.92);
  border-color: rgba(255, 255, 255, 0.2);
}

.preview-side-btn.a4-badge {
  position: static;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.preview-side-btn-group {
  position: relative;
}

.paper-badge-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 8px;
  border-radius: 4px;
  background: #171717;
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.preview-side-btn-group:hover .paper-badge-tooltip {
  opacity: 1;
}

.editor-backdrop {
  position: absolute;
  inset: 0;
  z-index: 19;
  background: rgba(20, 20, 20, 0.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.editor-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.editor-backdrop[hidden] {
  display: block;
}

.editor-drawer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(440px, 92%);
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: 16px 0 40px rgba(0, 0, 0, 0.12);
  z-index: 20;
  display: flex;
  flex-direction: column;
  transform: translateX(-105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.22s ease, visibility 0.22s ease;
}

.editor-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.drawer-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 18px 20px 28px;
}

.drawer-hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.links-display-options {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.links-display-options label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.links-display-options select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.structured-form,
.item-card {
  display: grid;
  gap: 14px;
}

.structured-form label,
.item-card label {
  display: grid;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #5d574f;
}

.item-card label.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #5d574f;
  cursor: pointer;
  user-select: none;
}

.item-card label.check-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  flex: 0 0 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

.check-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  flex: 0 0 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

.item-card input[data-key="end"]:disabled {
  background: #f4f4f5;
  color: #71717a;
  cursor: not-allowed;
}

.structured-form input:not([type="checkbox"]):not([type="radio"]):not(.photo-file-input),
.structured-form textarea,
.item-card input:not([type="checkbox"]),
.item-card textarea {
  width: 100%;
  padding: 11px;
  border: 1px solid #d7d2cb;
  border-radius: 6px;
  outline: 0;
}

.structured-form input:not([type="checkbox"]):not([type="radio"]):not(.photo-file-input):focus,
.structured-form textarea:focus,
.item-card input:not([type="checkbox"]):focus,
.item-card textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 108, 244, 0.12);
}

.structured-form textarea,
.item-card textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.55;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cv-meta {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

.item-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.item-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.item-head h3 {
  margin: 0;
  font-size: 14px;
}

.item-move-row {
  display: inline-flex;
  gap: 4px;
}

.item-move-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.item-move-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.icon-button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.add-button {
  display: block;
  text-align: center;
  width: 100%;
  padding: 11px;
  border: 1px dashed #ccbda8;
  border-radius: 7px;
  background: #fffaf2;
  color: #955600;
  font-weight: 700;
  cursor: pointer;
}

.compare-empty h3 { margin: 0 0 6px; }
.compare-empty p { margin: 0; color: var(--muted); font-size: 12px; }

.compare-flow {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.compare-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.compare-card.tailored {
  border-color: #f0c07a;
  background: #fff8ef;
}

.compare-card p {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.compare-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
  color: #202020;
}

.compare-card span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.compare-arrow {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--muted);
}

.diff {
  margin-bottom: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.diff-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
}

.tag {
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 9px;
  text-transform: uppercase;
}

.tag.added { background: #e4f6ec; color: #08764e; }
.tag.changed { background: #fff2cc; color: #8a6300; }
.tag.removed { background: #fde8e6; color: #aa3e34; }

.diff p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.export-option {
  display: grid;
  gap: 4px;
  width: 100%;
  margin-bottom: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.export-option span {
  color: var(--muted);
  font-size: 11px;
}

.export-translate-block {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #e8dcc8;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf8 0%, #fff 100%);
}

.export-translate-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.export-translate-head strong {
  font-size: 13px;
}

.export-translate-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff3df;
  color: #9a6200;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

.export-translate-source,
.export-translate-lead,
.translate-status {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.translate-lang-picker {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.translate-lang-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted, #6b7280);
}

.translate-lang-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.translate-lang-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.translate-lang-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.translate-lang-run {
  padding: 10px 14px;
  border: 1px solid #f39418;
  border-radius: 8px;
  background: #fff3df;
  color: #9a6200;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.translate-lang-run:hover:not(:disabled) {
  border-color: #e08600;
  background: #ffe8c4;
  transform: translateY(-1px);
}

.translate-lang-run:disabled,
.translate-lang-run.is-busy {
  opacity: 0.55;
  cursor: wait;
}

.translate-lang-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.translate-lang-btn {
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.translate-lang-btn:hover:not(:disabled) {
  border-color: #f0c07a;
  background: #fff8ed;
  transform: translateY(-1px);
}

.translate-lang-btn.is-active {
  border-color: #f39418;
  background: #fff3df;
  color: #9a6200;
}

.translate-lang-btn:disabled,
.translate-lang-btn.is-busy {
  opacity: 0.55;
  cursor: wait;
}

.translate-version-switch {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.translate-version-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.translate-version-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.translate-version-tab {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.translate-version-tab.is-active {
  border-color: #f39418;
  background: #fff3df;
  color: #9a6200;
}

.topbar-app-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  margin-left: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  cursor: pointer;
}

.app-chip-company {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.applications-shell {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 0;
  height: calc(100vh - 178px);
  min-height: 520px;
  overflow: hidden;
}

.applications-list-panel,
.applications-detail-panel {
  min-height: 0;
}

.applications-list-panel {
  padding: 20px 18px 28px 40px;
  border-right: 1px solid var(--line);
  background: #fff;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.applications-detail-panel {
  padding: 24px 40px 40px 28px;
  background: linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.applications-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.applications-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.app-new-btn,
.app-open-workspace {
  padding: 8px 12px;
  border: 1px solid #f0c07a;
  border-radius: 999px;
  background: #fff8ed;
  color: #9a6200;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.app-new-btn:hover,
.app-open-workspace:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(243, 148, 24, 0.12);
}

.applications-list {
  display: grid;
  gap: 10px;
}

.app-list-item {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 1px solid #f0c07a;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf8 0%, #fff8ed 100%);
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  box-shadow:
    1px 0 0 #f39418,
    0 1px 0 #f39418,
    4px 4px 0 rgba(243, 148, 24, 0.18);
}

.app-list-select {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  outline: none;
}

.app-list-select:focus-visible {
  outline: 2px solid #f39418;
  outline-offset: 2px;
  border-radius: 8px;
}

.app-list-item:hover {
  transform: translateY(-1px);
  box-shadow:
    1px 0 0 #f39418,
    0 1px 0 #f39418,
    6px 6px 0 rgba(243, 148, 24, 0.22);
}

.app-list-item.is-active {
  border-color: #f39418;
  background: linear-gradient(180deg, #fffdf8 0%, #fff8ed 100%);
  box-shadow:
    2px 0 0 #f39418,
    0 2px 0 #f39418,
    6px 6px 0 rgba(243, 148, 24, 0.28),
    0 12px 32px rgba(243, 148, 24, 0.12);
}

.app-list-pdf-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff1f1 0%, #ffe4e4 100%);
  color: #dc2626;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.app-list-file {
  color: #3f3f46;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.app-list-file-draft {
  color: var(--muted);
  font-weight: 600;
}

.app-detail-cv-tag {
  margin: 6px 0 0;
  color: #9a6200;
  font-size: 12px;
  font-weight: 700;
}

.app-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
  border-top: 1px solid rgba(243, 148, 24, 0.15);
}

.app-list-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid #e4e4e7;
  border-radius: 999px;
  background: #fff;
  color: #3f3f46;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.app-list-action:hover {
  border-color: #f0c07a;
  color: #9a6200;
}

.app-list-action-danger {
  border-color: #fecaca;
  background: #fff5f5;
  color: #b91c1c;
}

.app-list-action-danger:hover {
  border-color: #fca5a5;
  color: #991b1b;
}

.app-detail-no-cv {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px dashed #fde6bf;
  border-radius: 12px;
  background: #fffdf8;
}

.app-detail-no-cv p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.app-list-avatar,
.app-detail-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #18181b;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.app-list-body {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.app-list-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.app-list-top strong {
  font-size: 14px;
  line-height: 1.2;
}

.app-list-role {
  color: #52525b;
  font-size: 12px;
  line-height: 1.35;
}

.app-list-meta {
  color: var(--muted);
  font-size: 11px;
}

.applications-empty-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 180px);
  padding: 40px 24px;
  background: linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
}

.applications-empty-card {
  width: min(480px, 100%);
  padding: 40px 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(24, 24, 27, 0.08);
  text-align: center;
}

.applications-empty-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: #fff8ed;
  color: #f39418;
  font-size: 24px;
  font-weight: 800;
}

.applications-empty-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.15;
}

.applications-empty-card p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.app-detail-empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  min-height: 360px;
  padding: 40px 24px;
  border: 1px dashed #d4d4d8;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.app-detail-empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 20px;
}

.app-detail-empty p {
  max-width: 320px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.app-detail-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(24, 24, 27, 0.06);
}

.app-detail-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.app-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f4f4f5;
}

.app-progress-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 18px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.app-progress-cell {
  display: grid;
  gap: 6px;
  padding: 12px 10px;
  border-right: 1px solid #f4f4f5;
  min-width: 0;
}

.app-progress-cell:last-child {
  border-right: 0;
}

.app-progress-cell.is-done .app-progress-value {
  color: #047857;
}

.app-progress-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a1a1aa;
}

.app-progress-value {
  font-size: 12px;
  line-height: 1.35;
  color: #18181b;
  word-break: break-word;
}

.app-progress-status {
  display: inline-block;
  width: fit-content;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.app-progress-cell-next .app-progress-value {
  color: #52525b;
  font-weight: 700;
}

.app-detail-tabs {
  margin-top: 20px;
  padding-top: 4px;
  border-top: 1px solid #f4f4f5;
}

.app-detail-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 14px;
}

.app-detail-tab {
  padding: 10px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #71717a;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.app-detail-tab:hover {
  color: #18181b;
}

.app-detail-tab.is-active {
  color: #f39418;
  border-bottom-color: #f39418;
}

.app-detail-tab-panel {
  min-height: 120px;
}

.app-tab-panel-inner {
  padding: 4px 0 8px;
}

.app-tab-field {
  display: grid;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.app-tab-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fafafa;
  font: inherit;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  resize: vertical;
}

.app-tab-field textarea:focus {
  outline: none;
  border-color: #f39418;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(243, 148, 24, 0.12);
}

.app-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 6px;
}

.app-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 18px;
}

.app-timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 0;
  width: 2px;
  background: #fde6bf;
}

.app-timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 999px;
  background: #f39418;
  box-shadow: 0 0 0 4px #fff8ed;
}

.app-timeline-body time {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.app-timeline-text {
  margin: 0;
  color: #52525b;
  font-size: 13px;
  line-height: 1.45;
}

.app-timeline-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.app-timeline-doc {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fff;
}

.app-timeline-doc-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.app-timeline-doc-body strong {
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.app-timeline-doc-badge {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 10px;
  font-weight: 800;
}

.app-sent-card-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-sent-pdf-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff1f1 0%, #ffe4e4 100%);
  color: #dc2626;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.app-sent-pdf-icon--sm {
  flex-basis: 36px;
  width: 36px;
  height: 36px;
  font-size: 9px;
}

.app-sent-card-main {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.app-sent-card-kind {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.app-sent-card-main time {
  color: var(--muted);
  font-size: 11px;
}

.app-doc-btn-icon {
  font-size: 12px;
  line-height: 1;
}

.app-doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.app-detail-kicker {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f39418;
}

.app-detail-head h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.app-detail-role {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.app-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.app-detail-wide { grid-column: 1 / -1; }

.app-detail-grid label {
  display: grid;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.app-detail-grid input,
.app-detail-grid select,
.app-detail-grid textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #fafafa;
  font: inherit;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

.app-detail-grid input:focus,
.app-detail-grid select:focus,
.app-detail-grid textarea:focus {
  outline: none;
  border-color: #f39418;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(243, 148, 24, 0.12);
}

.app-detail-docs {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #f4f4f5;
}

.app-detail-docs > strong {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #71717a;
}

.app-empty-docs {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.app-status {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.app-status-saved { background: #eef2ff; color: #3730a3; }
.app-status-applied { background: #fff3df; color: #9a6200; }
.app-status-interview { background: #e0f2fe; color: #0369a1; }
.app-status-offer { background: #dcfce7; color: #166534; }
.app-status-rejected { background: #fee2e2; color: #991b1b; }
.app-status-withdrawn { background: #f3f4f6; color: #4b5563; }

.app-doc-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.app-doc-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.app-doc-list time {
  color: var(--muted);
}

.app-doc-open {
  margin-left: auto;
  border: 0;
  background: none;
  color: #9a6200;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.app-detail-ask {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8ed 0%, #fffdf8 100%);
  border: 1px solid #fde6bf;
  font-size: 12px;
  line-height: 1.5;
  color: #7c5a12;
}

.app-detail-ask p {
  margin: 0;
}

.app-list-sent {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.app-sent-pill {
  padding: 3px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 10px;
  font-weight: 800;
}

.app-sent-cards {
  display: grid;
  gap: 10px;
}

.app-sent-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fff;
}

.app-detail-cv-panel {
  margin: 16px 0 18px;
  padding: 14px 16px;
  border: 1px solid #fde6bf;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf8 0%, #fff8ed 100%);
}

.app-detail-cv-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.app-detail-cv-panel-head > strong {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #71717a;
}

.app-detail-cv-empty {
  display: grid;
  gap: 10px;
}

.app-detail-cv-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.app-sent-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.app-sent-card-head time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.app-sent-card-title {
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.app-doc-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border: 1px solid #e4e4e7;
  border-radius: 999px;
  background: #fff;
  color: #3f3f46;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.app-doc-btn:hover {
  border-color: #f0c07a;
  color: #9a6200;
}

.app-doc-btn-primary {
  border-color: #f0c07a;
  background: #fff8ed;
  color: #9a6200;
}

.app-doc-btn-compact {
  padding: 6px 10px;
  font-size: 10px;
}

.app-doc-btn-danger {
  border-color: #fecaca;
  background: #fff5f5;
  color: #b91c1c;
}

.app-doc-btn-danger:hover {
  border-color: #fca5a5;
  color: #991b1b;
}

.app-sent-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.app-sent-card strong {
  font-size: 13px;
}

.app-job-link {
  grid-column: 1 / -1;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff8ed;
  color: #9a6200;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.app-history {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f4f4f5;
  font-size: 12px;
}

.app-history > strong {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #71717a;
}

.app-history ul {
  margin: 0;
  padding-left: 18px;
  color: #52525b;
}

.app-history time {
  color: var(--muted);
}

@media (max-width: 980px) {
  .app-progress-bar {
    grid-template-columns: 1fr 1fr;
  }

  .app-progress-cell:nth-child(2n) {
    border-right: 0;
  }

  .app-progress-cell:nth-child(-n + 4) {
    border-bottom: 1px solid #f4f4f5;
  }

  .app-sent-card-row {
    flex-direction: column;
    align-items: stretch;
  }

  .app-doc-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  .applications-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .applications-list-panel {
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .applications-detail-panel {
    padding: 20px;
    overflow: visible;
  }

  body[data-mode="applications"] #applications-mode .column-head {
    padding: 20px 20px 0;
  }
}

.export-cover-letter-block {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}

.compare-cover-letter-block {
  margin-bottom: 18px;
}

.cover-letter-disclosure {
  margin-top: 20px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.cover-letter-disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 800;
  color: #1e3a8a;
  user-select: none;
}

.cover-letter-disclosure-summary::-webkit-details-marker {
  display: none;
}

.cover-letter-disclosure[open] .cover-letter-disclosure-chevron {
  transform: rotate(180deg);
}

.cover-letter-disclosure-chevron {
  font-size: 12px;
  color: #64748b;
  transition: transform 0.15s ease;
}

.cover-letter-disclosure .tailor-cover-letter-block {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  border-top: 1px solid #e8eef8;
}

.export-cover-letter-head strong { font-size: 13px; }

.export-cover-letter-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 700;
}

.export-cover-letter-source,
.export-cover-letter-lead,
.cover-letter-status {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.cover-letter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.cover-letter-preview-btn {
  align-self: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.cover-letter-field {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: 11px;
}

.cover-letter-field input,
.cover-letter-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
}

.cover-letter-fit {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 11px;
}

.cover-letter-page {
  padding: 48px 56px;
  min-height: 100%;
  font-size: 11pt;
  line-height: 1.55;
}

.cover-letter-page-subject {
  margin: 0 0 24px;
  font-size: 12pt;
}

.cover-letter-page-body p {
  margin: 0 0 14px;
}

.topbar-menu-btn {
  width: 40px;
  height: 40px;
  margin: 0 0 0 8px;
  order: 4;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.account-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.account-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.35);
}

.account-drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: min(320px, 88vw);
  height: 100%;
  padding: 16px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(20, 20, 20, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#account-drawer-content {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

.account-drawer-footer {
  flex-shrink: 0;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.account-logout-btn {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff5f5;
  color: #b91c1c;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.account-logout-btn:hover {
  background: #fee2e2;
}

.account-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.account-drawer-head strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.account-drawer-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.account-drawer-close:hover {
  background: #f9fafb;
  color: var(--ink);
}

.account-menu {
  display: grid;
  gap: 12px;
}

.account-profile-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid #f3e8dc;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff8f1 0%, #fff 100%);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.account-profile-card:hover {
  border-color: #f0c07a;
  box-shadow: 0 8px 24px rgba(240, 138, 24, 0.1);
}

.account-profile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  color: #e07a00;
  box-shadow: inset 0 0 0 1px #f3e8dc;
  flex-shrink: 0;
}

.account-profile-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-profile-body strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  word-break: break-word;
}

.account-profile-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fff3e0;
  color: #c56a00;
  font-size: 11px;
  font-weight: 800;
}

.account-profile-stat {
  font-size: 12px;
  color: var(--muted);
}

.account-menu-list {
  display: grid;
  gap: 4px;
}

.account-menu-row,
.account-menu-row:visited {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 10px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.account-menu-row:hover {
  background: #fafafa;
}

.account-menu-row--featured {
  background: #fff8f1;
}

.account-menu-row--featured:hover {
  background: #fff3e6;
}

.account-menu-row--featured .account-menu-row-chevron {
  color: #e07a00;
}

.account-menu-row--danger {
  color: #dc2626;
}

.account-menu-row--danger .account-menu-row-icon {
  color: #dc2626;
  background: #fff5f5;
}

.account-menu-row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff7ed;
  color: #e07a00;
  flex-shrink: 0;
}

.account-menu-row-text {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.account-menu-row-text strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.account-menu-row-text span {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.account-menu-row-chevron {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.account-menu-logout {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.account-menu-user {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.account-menu-user-btn {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fffaf5 0%, #fff7ed 100%);
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.account-menu-user-btn:hover {
  border-color: #fdba74;
  box-shadow: var(--shadow-sm);
}

.account-menu-item {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s ease;
}

.account-menu-item:hover,
.account-menu-item.account-menu-featured {
  background: #fff8ed;
}

.account-menu-featured {
  font-weight: 700;
  color: #9a3412;
}

.account-menu-muted { color: var(--muted); }

.account-menu-divider {
  height: 1px;
  margin: 8px 0;
  background: var(--line);
}

.account-panel {
  display: grid;
  gap: 14px;
}

.account-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin: 0;
  padding: 7px 12px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.account-back::before {
  content: "←";
  font-size: 14px;
  line-height: 1;
}

.account-back:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: var(--ink);
}

.account-form {
  display: grid;
  gap: 12px;
}

.account-field {
  display: grid;
  gap: 6px;
}

.account-field span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.account-panel input,
.account-panel select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.account-panel input:focus,
.account-panel select:focus {
  outline: none;
  border-color: #fdba74;
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.15);
}

.account-panel input[readonly] {
  background: #f9fafb;
  color: var(--muted);
}

.account-save-btn {
  width: 100%;
  justify-self: stretch;
  text-align: center;
}

.account-plan-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  box-shadow: var(--shadow-sm);
}

.account-plan-card--free {
  border-color: #e5e7eb;
}

.account-plan-card--pro {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #fffaf5 0%, #fff7ed 100%);
}

.account-plan-card--unlimited {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
}

.account-plan-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.account-plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.account-plan-card--pro .account-plan-badge {
  background: #ffedd5;
  color: #9a3412;
}

.account-plan-card--unlimited .account-plan-badge {
  background: #dcfce7;
  color: #166534;
}

.account-plan-renew {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.account-beta-active {
  margin: 10px 0 0;
  color: #047857;
  font-size: 12px;
  font-weight: 800;
}

.account-beta-form {
  display: none !important;
  gap: 10px;
  padding: 14px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff8ed;
}

.account-beta-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.account-beta-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
}

.account-beta-form button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #18181b;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.account-beta-form button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.account-beta-message {
  min-height: 18px;
  margin: 0;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}

.account-usage-list {
  display: grid;
  gap: 12px;
}

.account-usage-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.account-usage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.account-usage-label {
  font-size: 12px;
  font-weight: 700;
}

.account-usage-stat {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.account-usage-bar {
  height: 6px;
  border-radius: 999px;
  background: #f3f4f6;
  overflow: hidden;
}

.account-usage-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fb923c 0%, #ea580c 100%);
  transition: width 0.2s ease;
}

.account-usage-bar--unlimited span {
  background: linear-gradient(90deg, #86efac 0%, #22c55e 100%);
  opacity: 0.7;
}

.account-usage-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.account-upgrade-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.28);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.account-upgrade-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.34);
}

.account-doc-list {
  display: grid;
  gap: 8px;
}

.account-doc-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.account-doc-item:hover {
  border-color: #fed7aa;
  background: #fffaf5;
  box-shadow: var(--shadow-sm);
}

.account-doc-item strong {
  font-size: 13px;
}

.account-empty-card {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: #fafafa;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.account-doc-item span,
.account-empty {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.app-sent-cards {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.app-sent-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.app-sent-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.app-job-link {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 700;
}

.app-history {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
}

.app-history ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.app-history time {
  color: var(--muted);
}

body.account-drawer-open {
  overflow: hidden;
}

.sidebar-translate {
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fffdf8;
}

.sidebar-translate-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-translate-hint {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 10px;
}

.sidebar-translate-link {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #f0c07a;
  border-radius: 8px;
  background: #fff8ed;
  color: #9a6200;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.sidebar-translate-link:hover {
  background: #fff3df;
}

.translate-status.is-error {
  color: #b42318;
}

.translate-status.is-success {
  color: #15966b;
}

.tailor-result {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #f0c07a;
  border-radius: 8px;
  background: var(--orange-soft);
}

.tailor-insights {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.tailor-match {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #f0c07a;
  border-radius: 8px;
  background: #fff;
}

.tailor-match strong {
  font-size: 28px;
  color: #c56a00;
}

.tailor-insights-block h4 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a5a12;
}

.tailor-insights-block ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.55;
}

.tailor-scores {
  display: grid;
  gap: 8px;
}

.tailor-score-row {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
  align-items: center;
  font-size: 11px;
}

.tailor-score-bar {
  height: 6px;
  border-radius: 999px;
  background: #f1e3cf;
  overflow: hidden;
}

.tailor-score-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f0a030, #e87820);
}

.ai-section-bar {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #f0c07a;
  border-radius: 10px;
  background: var(--orange-soft);
}

.ai-section-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #f0c07a;
  color: #c56a00;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ai-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-section-actions button {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid #e8c48a;
  border-radius: 999px;
  background: #fff;
  color: #7a4d00;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.ai-section-actions button:hover,
.ai-section-actions button.active {
  border-color: #f0a030;
  background: #fff3e0;
}

.ai-section-result {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
}

.ai-section-reason {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #5a4a32;
}

.ai-section-alt-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a5a12;
}

.ai-alt-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.ai-alt-card {
  padding: 10px 12px;
  border: 1px solid #e8dcc8;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  white-space: pre-wrap;
  cursor: pointer;
}

.ai-alt-card.is-selected {
  border-color: #f0a030;
  background: #fff8ef;
  box-shadow: inset 0 0 0 1px #f0c07a;
}

.diff-missing .tag.missing,
.tag.missing { background: #fff4df; color: #9a6400; }
.diff-improved .tag.improved,
.tag.improved { background: #eef6ff; color: #245f9a; }
.diff-skipped .tag.skipped,
.tag.skipped { background: #f4f4f4; color: #666; }

.ai-section-result-actions {
  display: flex;
  gap: 8px;
}

.ai-section-result-actions button {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.ai-section-result-actions .apply-btn {
  border: 1px solid #f0a030;
  background: #fff3e0;
  color: #a85600;
}

.ai-section-result-actions .dismiss-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.improvements-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 92%);
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.12);
  z-index: 21;
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.22s ease, visibility 0.22s ease;
}

.improvements-panel.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.improvements-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--line);
}

.improvements-header h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.improvements-body {
  flex: 1;
  overflow: auto;
  padding: 18px 20px 28px;
}

.improvements-group + .improvements-group {
  margin-top: 18px;
}

.improvements-group h3 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a5a12;
}

.improvements-group ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.55;
}

.improvements-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.compare-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.compare-actions button {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.compare-actions button[data-compare-accept] {
  border-color: #8fd19e;
  background: #f3fbf5;
  color: #1f6b35;
}

.compare-actions button[data-compare-reject] {
  border-color: #efb4b4;
  background: #fff6f6;
  color: #9b3030;
}

.compare-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.compare-status.accepted {
  background: #e8f8ec;
  color: #1f6b35;
}

.compare-status.rejected {
  background: #fdecec;
  color: #9b3030;
}

.compare-alt {
  flex-basis: 100%;
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px dashed #f0c07a;
  border-radius: 8px;
  background: #fffaf3;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 12px 16px;
  border-radius: 7px;
  background: #24211e;
  color: #fff;
  font-size: 12px;
  z-index: 40;
}

.toast[hidden] { display: none; }

@media (max-width: 1100px) {
  body[data-mode="tailor"] .workspace,
  body[data-mode="compare"] .workspace,
  body[data-mode="export"] .workspace {
    grid-template-columns: 260px 1fr;
  }

  .preview-panel {
    grid-column: 1 / -1;
    min-height: 720px;
  }

  .flow-connector { display: none !important; }

  .workspace,
  body[data-mode="builder"] .workspace,
  body.sidebar-editing[data-mode="builder"] .workspace {
    grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  }
}

.import-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.import-modal[hidden] {
  display: none;
}

.import-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 16, 0.55);
}

.import-dialog {
  position: relative;
  width: min(720px, 96vw);
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
}

.import-dialog h2 {
  margin: 6px 0 8px;
  font-size: 24px;
}

.import-hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.import-text-review {
  width: 100%;
  min-height: 320px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  resize: vertical;
}

.import-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.import-review-stats {
  margin-bottom: 14px;
}

.import-file-line {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
}

.import-name-line {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f3f7ff;
  border: 1px solid #d8e4ff;
  font-size: 14px;
}

.import-lang-line {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.import-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.import-check {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.import-check.ok {
  background: #eef9f2;
  color: #176b42;
}

.import-check.warn {
  background: #fff8ef;
  color: #9a5b00;
}

.import-text-details {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #faf9f7;
}

.import-text-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.import-text-details .import-text-review {
  margin-top: 10px;
  min-height: 180px;
}

.bullets-editor {
  margin-top: 12px;
}

.bullets-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.bullets-head strong {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.bullet-add-btn {
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.bullets-list {
  display: grid;
  gap: 8px;
}

.bullet-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.bullet-marker {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.bullet-row input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cv-empty-state {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  min-height: 520px;
  padding: 48px 32px;
  text-align: center;
}

.cv-empty-state .generate-btn {
  justify-self: center;
}

.cv-empty-state h2 {
  margin: 0;
  font-size: 24px;
}

.cv-empty-state p {
  margin: 0;
  max-width: 360px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.template-empty-kicker {
  margin: 8px 0 0 !important;
  font-size: 12px !important;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888 !important;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 680px;
  margin: 8px 0 4px;
}

.starter-template-picker {
  width: min(100%, 620px);
  display: grid;
  gap: 12px;
  margin: 8px 0 2px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-align: left;
}

.starter-template-head {
  display: grid;
  gap: 4px;
  text-align: center;
}

.starter-template-head strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.starter-template-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.starter-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.starter-template-card {
  display: grid;
  gap: 5px;
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf2;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.starter-template-card:hover,
.starter-template-card:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 10px 28px rgba(245, 132, 31, 0.16);
  transform: translateY(-1px);
  outline: none;
}

.starter-template-card strong {
  font-size: 13px;
  font-weight: 900;
}

.starter-template-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.template-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto 8px;
}

.template-grid-sidebar {
  grid-template-columns: 1fr;
  max-width: none;
  gap: 12px;
}

.template-grid-compact {
  grid-template-columns: 1fr;
  max-width: none;
}

.template-card {
  display: grid;
  gap: 0;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.template-card:hover {
  border-color: var(--ink);
  box-shadow: 0 12px 32px rgba(15, 17, 21, 0.12);
  transform: translateY(-2px);
}

.template-card-visual .template-preview-frame {
  height: 420px;
}

.template-card-compact .template-preview-frame {
  height: 220px;
}

.template-preview-frame {
  overflow: hidden;
  background: linear-gradient(180deg, #eef2f7 0%, #f8fafc 100%);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12px 10px 0;
}

.style-preview-viewport {
  --preview-scale: 0.32;
  overflow: hidden;
  flex-shrink: 0;
  margin: 0 auto;
}

.section-skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0.5;
}

.section-skeleton-row {
  height: 44px;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  background: rgba(249, 250, 251, 0.5);
}

body.resume-blank[data-mode="builder"] #sidebar-sections-wrap {
  padding-bottom: 128px;
}

body.sidebar-editing .sidebar-editor {
  padding-top: 8px;
}

.style-preview-zoom {
  width: 794px;
  transform: scale(var(--preview-scale, 0.32));
  transform-origin: top left;
}

.style-preview-page,
.layout-thumb-page {
  width: 794px !important;
  max-width: 794px !important;
  min-width: 794px !important;
  min-height: auto !important;
  height: auto !important;
  --cv-page-pad-x: 40px;
  --cv-page-pad-top: 32px;
  --cv-page-pad-bottom: 40px;
  padding: var(--cv-page-pad-top) var(--cv-page-pad-x) var(--cv-page-pad-bottom) !important;
  margin: 0 !important;
  box-shadow: 0 8px 28px rgba(15, 17, 21, 0.12);
  pointer-events: none;
  transform: none !important;
  box-sizing: border-box;
}

.template-card-caption {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.template-card strong {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
}

.template-card span {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.template-card em {
  display: none;
}

.style-preview-page .cv-block-toolbar,
.style-preview-page .cv-block-grip,
.layout-thumb-page .cv-block-toolbar,
.layout-thumb-page .cv-block-grip {
  display: none !important;
}

.cv-empty-state-visual {
  min-height: auto;
  padding: 32px 28px 40px;
  gap: 16px;
  align-content: start;
  justify-items: stretch;
  text-align: center;
}

.empty-state-hero {
  max-width: 520px;
  margin: 0 auto;
}

.resume-page:has(.cv-empty-state-visual) {
  min-height: auto;
  height: auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
  width: 100%;
  max-width: none;
}

.template-sidebar {
  display: grid;
  gap: 14px;
}

.template-sidebar-lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.template-sidebar-actions {
  display: grid;
  gap: 8px;
}

.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

.cv-empty-state-upload {
  display: grid;
  place-content: center;
  justify-items: center;
  min-height: min(520px, calc(100vh - 220px));
  padding: 48px 32px;
  text-align: center;
}

body[data-mode="builder"] .resume-page:has(.cv-empty-state-upload) {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-mode="builder"] .preview-canvas:has(.cv-empty-state-upload) {
  max-width: none;
  width: 100%;
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-mode="builder"] .preview-scroll-container:has(.cv-empty-state-upload) {
  align-items: stretch;
}

.cv-empty-state-upload .generate-btn.empty-upload-btn {
  justify-self: center;
  min-width: 240px;
  padding: 16px 32px;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 10px;
}

.quick-start-steps {
  display: grid;
  gap: 10px;
  width: min(520px, 100%);
  margin: 22px 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.quick-start-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  padding: 12px 14px;
  border: 1px solid rgba(243, 148, 24, 0.22);
  border-radius: 10px;
  background: rgba(255, 248, 237, 0.8);
}

.quick-start-steps li::before {
  content: counter(list-item);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #f39418;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
}

.quick-start-steps strong {
  font-size: 13px;
  color: #151519;
}

.quick-start-steps span {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.empty-upload-hint {
  margin: 18px 0 0;
  max-width: 320px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.empty-upload-banner {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfd;
  display: grid;
  gap: 10px;
}

.empty-upload-banner-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.empty-upload-banner-btn {
  width: 100%;
}

.sidebar-blank-upload {
  padding: 0 12px 12px;
}

.sidebar-blank-upload .generate-btn {
  width: 100%;
}

.resume-page:has(.cv-empty-state-upload) {
  min-height: auto;
  height: auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
  width: 100%;
  max-width: none;
}

body[data-mode="builder"] .preview-canvas:has(.cv-empty-state-upload) {
  max-width: none;
  width: 100%;
}

.preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.preview-mode-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

body[data-mode="builder"] .preview-mode-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-mode-btn {
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.preview-mode-btn:hover {
  border-color: #f0a030;
}

.preview-mode-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.resume-page-pdf {
  width: 794px;
  min-height: auto;
  padding: 0;
  background: #ececec;
  box-shadow: none;
}

.cv-pdf-pages {
  display: grid;
  gap: 16px;
  padding: 12px 12px 48px;
}

.cv-pdf-page {
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.cv-pdf-page canvas {
  display: block;
  width: 100%;
  height: auto;
}

.cv-pdf-loading {
  display: grid;
  place-items: center;
  min-height: 420px;
  color: var(--muted);
  font-size: 13px;
}

/* ── Product flow overlay ── */
body.flow-active {
  overflow: hidden;
}

.flow-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 20, 20, 0.42);
  backdrop-filter: blur(6px);
  animation: flow-fade-in 0.25s ease;
}

.flow-overlay[hidden] {
  display: none;
}

.flow-overlay-card {
  width: min(480px, 100%);
  padding: 28px 28px 24px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
  animation: flow-card-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.flow-overlay-head h2 {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.flow-steps {
  list-style: none;
  margin: 22px 0 18px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.flow-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7f6f4;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.flow-step.active {
  background: var(--orange-soft);
  color: var(--ink);
  transform: translateX(2px);
}

.flow-step.done {
  color: var(--ink);
  background: #eef9f2;
}

.flow-step-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: #e8e6e2;
  color: #888;
}

.flow-step.active .flow-step-icon {
  background: var(--orange);
  color: #fff;
  animation: flow-pulse 1.2s ease infinite;
}

.flow-step.done .flow-step-icon {
  background: var(--green);
  color: #fff;
}

.flow-step.done .flow-step-icon::before {
  content: "✓";
}

.flow-step.active .flow-step-icon::before,
.flow-step.pending .flow-step-icon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.flow-step.pending .flow-step-icon {
  background: #e8e6e2;
  color: #bbb;
}

.flow-step-body {
  flex: 1;
  min-width: 0;
}

.flow-step-body strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.flow-step-body span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
}

.flow-step.active .flow-step-body span,
.flow-step.done .flow-step-body span {
  color: #6a645e;
}

.flow-progress {
  height: 4px;
  border-radius: 999px;
  background: #eceae6;
  overflow: hidden;
}

.flow-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), #f5b04a);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.flow-step-detail {
  margin: 14px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  line-height: 1.45;
}

.flow-step-detail[hidden] {
  display: none;
}

@keyframes flow-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes flow-card-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes flow-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ── Tailor onboarding ── */
.tailor-onboarding {
  margin: 0 0 18px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid #d8f0e4;
  background: linear-gradient(135deg, #f3fbf6 0%, #fff 100%);
  animation: flow-card-in 0.4s ease;
}

.tailor-onboarding[hidden] {
  display: none;
}

.tailor-onboarding-badge {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.tailor-onboarding h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
}

.tailor-onboarding p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.tailor-review-link {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Compare intro ── */
.compare-intro {
  margin-bottom: 20px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid #e8e6e2;
  background: #faf9f7;
}

.compare-intro h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 800;
}

.compare-intro p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.compare-intro-stats {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--green);
}

.diff .compare-why {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f6f4;
  font-size: 13px;
  line-height: 1.5;
}

.diff .compare-why strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

#section-nav.sections-fresh .section-card {
  animation: section-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#section-nav.sections-fresh .section-card:nth-child(1) { animation-delay: 0.05s; }
#section-nav.sections-fresh .section-card:nth-child(2) { animation-delay: 0.1s; }
#section-nav.sections-fresh .section-card:nth-child(3) { animation-delay: 0.15s; }
#section-nav.sections-fresh .section-card:nth-child(4) { animation-delay: 0.2s; }
#section-nav.sections-fresh .section-card:nth-child(5) { animation-delay: 0.25s; }
#section-nav.sections-fresh .section-card:nth-child(6) { animation-delay: 0.3s; }
#section-nav.sections-fresh .section-card:nth-child(7) { animation-delay: 0.35s; }
#section-nav.sections-fresh .section-card:nth-child(8) { animation-delay: 0.4s; }

@keyframes section-pop {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ── PR-style tailor review ─────────────────────────────── */
.review-head {
  padding: 4px 2px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.review-head h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.review-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.review-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f2f7f4;
  border: 1px solid #d7ece0;
  color: #1f7a4d;
  font-size: 12px;
  font-weight: 600;
}

.review-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.review-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.rev-btn-download {
  background: #111;
  color: #fff;
  border-color: #111;
}

.rev-btn-download:hover {
  background: #333;
  border-color: #333;
}

.review-progress {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.review-change {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.review-change.status-accepted {
  border-color: #bfe6cf;
  box-shadow: inset 3px 0 0 var(--green);
}

.review-change.status-rejected {
  opacity: 0.55;
  box-shadow: inset 3px 0 0 #d6d3ce;
}

.review-change-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.review-sec {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.review-type {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}

.review-type.rewrite { background: #eef2ff; color: #3b52c4; }
.review-type.add { background: #eafaf0; color: #1f8a56; }

.review-line {
  display: block;
  margin-bottom: 8px;
}

.review-line > span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

.review-line p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
}

.review-line.before p {
  color: #8a8681;
  text-decoration: line-through;
  text-decoration-color: #d9b3b3;
}

.review-line.after p {
  background: #f4f9f5;
  border-radius: 8px;
  padding: 8px 10px;
}

.review-line textarea {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
}

.review-reason {
  font-size: 12.5px;
  line-height: 1.5;
  color: #55504b;
  background: #faf9f7;
  border-radius: 8px;
  padding: 9px 11px;
  margin-bottom: 12px;
}

.review-reason strong {
  font-weight: 800;
  color: var(--ink);
  margin-right: 4px;
}

.review-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rev-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.rev-btn:hover { background: #f4f3f1; }

.rev-btn.accept {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}
.rev-btn.accept:hover { background: #18804f; }

.rev-btn.reject:hover {
  border-color: var(--pink);
  color: var(--pink);
  background: #fdf1f6;
}

.rev-btn.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.rev-btn.primary:hover { background: #000; }

.rev-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.rev-badge.accepted { background: #eafaf0; color: #1f8a56; }
.rev-badge.rejected { background: #f2efec; color: #8a8681; }

.review-keywords .kw-list {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.review-keywords .kw-list li {
  font-size: 12.5px;
  line-height: 1.5;
  color: #55504b;
}

.review-keywords .kw-yes span { color: var(--green); font-weight: 800; }
.review-keywords .kw-no span { color: var(--pink); font-weight: 800; }
.review-keywords .kw-list strong { color: var(--ink); }

.kw-missing-title {
  margin: 10px 0 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Premium polish ─────────────────────────────────────── */
.cv-theme-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cv-theme-picker span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}

.cv-theme-btn {
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cv-theme-btn:hover {
  border-color: #cbd5e1;
  color: var(--ink);
}

.cv-theme-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

body[data-mode="compare"] .review-head {
  position: relative;
  background: #fff;
  padding: 8px 2px 16px;
  margin-bottom: 16px;
}

.review-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e6e8ec;
  border-radius: 10px;
  background: #fff;
}

.review-progress-ring {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.review-progress-ring svg {
  width: 44px;
  height: 44px;
  transform: rotate(-90deg);
}

.review-progress-ring .ring-bg {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 3;
}

.review-progress-ring .ring-fg {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 0.35s ease;
}

.review-progress-ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--ink);
}

.review-progress-text {
  flex: 1;
  min-width: 0;
}

.review-progress-text strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.review-progress-text em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.generate-btn {
  justify-self: start;
  padding: 13px 22px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.generate-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
}

.generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.export-option {
  display: grid;
  gap: 4px;
  width: 100%;
  margin-bottom: 12px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.export-option:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.export-option strong {
  font-size: 15px;
}

.export-option.is-soon {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.export-option.is-soon:hover,
[data-review-download].is-quota-blocked,
[data-export="pdf"].is-quota-blocked {
  opacity: 0.55;
  cursor: not-allowed;
}

.rev-btn-download.is-quota-blocked {
  opacity: 0.55;
  cursor: not-allowed;
}

.export-option.is-soon:hover {
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}

.section-card.is-readonly .drag {
  display: none;
}

.cv-empty-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.cv-empty-desc {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 320px;
}

.tailor-onboarding.tailor-hint {
  padding: 14px 16px;
  border-style: dashed;
  background: #fafafa;
  border-color: #e2e8f0;
}

.tailor-onboarding.tailor-hint p {
  color: #64748b;
  font-weight: 600;
}

.cv-empty-state {
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
  border-radius: var(--radius);
  border: 1px dashed #d1d5db;
}

.cv-empty-state h2 {
  font-size: 26px;
  letter-spacing: -0.02em;
}

.cv-block-accepted {
  outline: 2px solid rgba(5, 150, 105, 0.5);
  outline-offset: 5px;
  border-radius: 6px;
  background: rgba(236, 253, 245, 0.45);
  animation: accept-flash 0.5s ease;
}

@keyframes accept-flash {
  from { background: rgba(167, 243, 208, 0.7); }
  to { background: rgba(236, 253, 245, 0.45); }
}

body[data-mode="compare"] .center-panel {
  padding: 20px 24px 32px;
}

body[data-mode="compare"] .review-change {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

body[data-mode="compare"] .preview-panel {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
}

.tailor-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.tailor-summary-metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e6e8ec;
  border-radius: 10px;
  background: #fff;
}

.tailor-summary-metric span,
.ai-analysis-grid span,
.review-confidence span {
  display: block;
  color: #6b7280;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tailor-summary-metric strong {
  display: block;
  margin-top: 6px;
  color: #111827;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.tailor-summary-metric em {
  display: block;
  margin-top: 5px;
  color: #047857;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.ai-analysis {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e6e8ec;
  border-radius: 10px;
  background: #fafafa;
}

.ai-eyebrow {
  color: #9a5b00;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ai-analysis h3 {
  margin: 4px 0 2px;
  color: #111827;
  font-size: 16px;
  font-weight: 850;
}

.ai-analysis p {
  margin: 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.4;
}

.ai-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-analysis-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #eceef2;
  border-radius: 8px;
  background: #fff;
}

.ai-analysis-grid strong {
  display: block;
  margin-top: 5px;
  color: #111827;
  font-size: 12px;
  line-height: 1.35;
}

.ai-ignored {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  padding: 10px;
  border: 1px solid #eee1cd;
  border-radius: 8px;
  background: #fff8ed;
  color: #7c4a03;
  font-size: 12px;
}

.ai-ignored em {
  grid-column: 2;
  color: #8a6b3f;
  font-style: normal;
}

.review-progress-bar {
  width: 100%;
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eceff3;
}

.review-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #111827;
  transition: width 0.25s ease;
}

.impact-group {
  margin: 22px 0;
  scroll-margin-top: 120px;
}

.impact-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}

.impact-group-head strong {
  color: #111827;
  font-size: 13px;
  font-weight: 850;
}

.impact-group-head span {
  min-width: 0;
  color: #6b7280;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-rec-card {
  padding: 13px 14px;
  border-color: #e6e8ec;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.ai-rec-card .review-change-head {
  align-items: flex-start;
}

.ai-rec-card .review-change-head strong {
  display: block;
  margin-top: 3px;
  color: #111827;
  font-size: 14px;
  font-weight: 850;
}

.impact-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.impact-5 { background: #111827; color: #fff; }
.impact-4 { background: #eef2ff; color: #3730a3; }
.impact-3,
.impact-2 { background: #f3f4f6; color: #4b5563; }

.ai-rec-card .review-line.before p {
  display: -webkit-box;
  overflow: hidden;
  color: #6b7280;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ai-rec-card .review-line.after p {
  display: -webkit-box;
  overflow: hidden;
  background: #f8fafc;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ai-rec-card mark {
  padding: 0 2px;
  border-radius: 4px;
  background: #fff0c2;
  color: inherit;
}

.ai-rec-card .review-reason {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 8px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.review-confidence {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #111827;
}

.review-confidence strong {
  font-size: 12px;
  font-weight: 850;
}

@media (max-width: 980px) {
  body[data-mode="compare"] .preview-panel {
    position: relative;
    height: auto;
  }

  .tailor-summary,
  .ai-analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .tailor-summary,
  .ai-analysis-grid {
    grid-template-columns: 1fr;
  }

  .review-topbar,
  .impact-group-head {
    align-items: stretch;
    flex-direction: column;
  }

  .review-topbar-actions,
  .review-topbar-actions .rev-btn {
    width: 100%;
  }
}

.toast {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-weight: 600;
}

.preview-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.preview-live-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: live-pulse 1.4s ease infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.resume-page.preview-pulse {
  animation: preview-pulse 0.55s ease;
}

@keyframes preview-pulse {
  0% { box-shadow: var(--shadow-lg); }
  40% { box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.35), var(--shadow-lg); }
  100% { box-shadow: var(--shadow-lg); }
}

/* ── CV layout variants (print-ready, ATS-friendly) ─────── */

/* CLASSIC — Harvard-style single column */
.resume-page[data-cv-layout="classic"] .cv-block-personal {
  margin-bottom: 6px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--cv-accent);
}

.resume-page[data-cv-layout="classic"] .cv-name {
  font-size: 26px;
  color: var(--cv-text);
}

/* ACCENT — executive header band + accent rule */
.resume-page[data-cv-layout="accent"] {
  --cv-page-pad-top: 0;
}

.resume-page[data-cv-layout="accent"] .cv-block-personal {
  margin-bottom: 18px;
}

.resume-page[data-cv-layout="accent"] .cv-block-personal .cv-block-body {
  margin: 0 calc(var(--cv-page-pad-x) * -1) 0;
  padding: 32px var(--cv-page-pad-x) 24px;
  background: var(--cv-accent);
  color: #fff;
}

.resume-page[data-cv-layout="accent"] .cv-block-personal .cv-name,
.resume-page[data-cv-layout="accent"] .cv-block-personal .cv-title,
.resume-page[data-cv-layout="accent"] .cv-block-personal .cv-contact,
.resume-page[data-cv-layout="accent"] .cv-block-personal .cv-contact a {
  color: #fff;
}

.resume-page[data-cv-layout="accent"] .cv-block-personal .cv-title {
  opacity: 0.9;
  font-weight: 500;
}

.resume-page[data-cv-layout="accent"] .cv-section h2 {
  border-bottom-color: var(--cv-accent);
  color: var(--cv-accent);
}

/* STANDARD — centered header, clean body */
.resume-page[data-cv-layout="standard"] .cv-block-personal .cv-block-body {
  text-align: center;
}

.resume-page[data-cv-layout="standard"] .cv-block-personal .cv-contact {
  justify-content: center;
}

.resume-page[data-cv-layout="standard"] .cv-block-personal .cv-name {
  font-size: 28px;
}

.resume-page[data-cv-layout="standard"] .cv-section h2 {
  text-align: center;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 10px;
}

.resume-page[data-cv-layout="standard"] .cv-section h2::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  margin: 6px auto 0;
  background: var(--cv-accent);
}

/* INDENT — left rule, readable hierarchy */
.resume-page[data-cv-layout="indent"] .cv-block:not(.cv-block-personal) .cv-section {
  padding-left: 14px;
  border-left: 2px solid var(--cv-accent-line);
}

.resume-page[data-cv-layout="indent"] .cv-section h2 {
  margin-left: -14px;
  padding-left: 12px;
  border-bottom: none;
  border-left: 3px solid var(--cv-accent);
  background: #fff;
}

/* SIDEBAR — two-column (sidebar: contact, skills, languages) */
.resume-page[data-cv-layout="sidebar"] {
  --cv-page-pad-x: 44px;
  display: grid;
  grid-template-columns: 168px 1fr;
  column-gap: 28px;
  align-items: start;
}

.resume-page[data-cv-layout="sidebar"] .cv-block-personal,
.resume-page[data-cv-layout="sidebar"] .cv-block-links,
.resume-page[data-cv-layout="sidebar"] .cv-block-skills,
.resume-page[data-cv-layout="sidebar"] .cv-block-languages,
.resume-page[data-cv-layout="sidebar"] .cv-block-interests,
.resume-page[data-cv-layout="sidebar"] .cv-block-certificates {
  grid-column: 1;
}

.resume-page[data-cv-layout="sidebar"] .cv-block-personal {
  padding: 14px 12px;
  background: color-mix(in srgb, var(--cv-accent) 6%, #fff);
  border-radius: 4px;
  border: 1px solid var(--cv-accent-line);
}

.resume-page[data-cv-layout="sidebar"] .cv-block-personal .cv-name {
  font-size: 15px;
  line-height: 1.2;
  color: var(--cv-text);
}

.resume-page[data-cv-layout="sidebar"] .cv-block-personal .cv-title {
  font-size: 10px;
  margin: 4px 0 8px;
}

.resume-page[data-cv-layout="sidebar"] .cv-block-personal .cv-contact {
  flex-direction: column;
  gap: 3px;
  font-size: 9px;
}

.resume-page[data-cv-layout="sidebar"] .cv-block:not(.cv-block-personal):not(.cv-block-links):not(.cv-block-skills):not(.cv-block-languages):not(.cv-block-interests):not(.cv-block-certificates) {
  grid-column: 2;
}

.resume-page[data-cv-layout="sidebar"] .cv-block-skills .cv-text,
.resume-page[data-cv-layout="sidebar"] .cv-block-languages .cv-text {
  font-size: 9.5px;
}

.resume-page[data-cv-layout="sidebar"] .cv-section h2 {
  font-size: 9.5px;
}

/* COMPACT — dense ATS layout, still readable */
.resume-page[data-cv-layout="compact"] {
  --cv-page-pad-top: 40px;
  --cv-page-pad-bottom: 44px;
  --cv-page-pad-x: 48px;
  font-size: 10px;
}

.resume-page[data-cv-layout="compact"] .cv-name {
  font-size: 22px;
}

.resume-page[data-cv-layout="compact"] .cv-block:not(.cv-block-personal) {
  margin-top: 10px;
}

.resume-page[data-cv-layout="compact"] .cv-section {
  margin-top: 10px;
}

.resume-page[data-cv-layout="compact"] .cv-item {
  margin-bottom: 7px;
}

.resume-page[data-cv-layout="compact"] .cv-section h2 {
  margin-bottom: 6px;
  font-size: 10px;
}

/* TIMELINE — experience & education only */
.resume-page[data-cv-timeline="on"] .cv-block-experience .cv-item,
.resume-page[data-cv-timeline="on"] .cv-block-education .cv-item {
  position: relative;
  margin-left: 2px;
  padding-left: 14px;
  border-left: 2px solid var(--cv-accent-line);
}

.resume-page[data-cv-timeline="on"] .cv-block-experience .cv-item::before,
.resume-page[data-cv-timeline="on"] .cv-block-education .cv-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cv-accent);
  border: 1px solid #fff;
}

/* Preview thumbs inherit page padding vars above */

/* ── Template Variations modal ──────────────────────────── */
.variations-modal[hidden] { display: none; }

.variations-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}

.variations-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 21, 0.55);
  backdrop-filter: blur(4px);
}

.variations-dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, 96vw);
  max-height: min(90vh, 920px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.variations-header {
  padding: 22px 24px 12px;
  border-bottom: 1px solid var(--line);
}

.variations-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.variations-header p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.variations-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.variations-controls {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.variations-controls section {
  margin-bottom: 20px;
}

.variations-controls h4 {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.style-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.style-pick-btn {
  min-height: 42px;
  padding: 8px 10px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.style-pick-btn[data-typography="modern"] { font-family: "DM Sans", system-ui, sans-serif; }
.style-pick-btn[data-typography="elegant"] { font-family: Literata, Georgia, serif; }
.style-pick-btn[data-typography="creative"] { font-family: "Playfair Display", Georgia, serif; }
.style-pick-btn[data-typography="digital"] { font-family: "Space Grotesk", sans-serif; }
.style-pick-btn[data-typography="classic"] { font-family: Arial, sans-serif; }
.style-pick-btn[data-typography="clean"] { font-family: Georgia, serif; }

.style-pick-btn.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(15, 17, 21, 0.08);
}

.style-pick-btn.active::after {
  content: "✓";
  float: right;
  color: var(--ink);
}

.theme-swatches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.theme-swatch-btn {
  display: grid;
  gap: 0;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
}

.theme-swatch-btn.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(15, 17, 21, 0.08);
}

.theme-swatch-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 22px;
}

.theme-swatch-bar span {
  display: block;
  height: 100%;
}

.theme-swatch-label {
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  color: var(--muted);
}

.timeline-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.variations-layouts-wrap {
  padding: 18px 20px;
  overflow-y: auto;
}

.variations-layouts-wrap h3 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.variations-layouts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (min-width: 1100px) {
  .variations-layouts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.layout-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.layout-card.active::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  z-index: 2;
  pointer-events: none;
}

.layout-card:hover {
  border-color: #94a3b8;
}

.layout-card.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(15, 17, 21, 0.08);
}

.layout-card.active .layout-thumb {
  outline: 2px solid var(--ink);
  outline-offset: -1px;
}

.layout-card strong {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.layout-thumb {
  height: 280px;
  border-radius: 10px;
  background: linear-gradient(180deg, #eef2f7 0%, #f8fafc 100%);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  position: relative;
}

.layout-thumb-inner {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 140px;
  height: 180px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  pointer-events: none;
}

.layout-thumb-inner[data-layout="accent"] { border-left: 4px solid var(--cv-accent, #1e3a5f); }
.layout-thumb-inner[data-layout="sidebar"] {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 4px;
  padding: 6px;
}
.layout-thumb-inner[data-layout="sidebar"] .lt-side { background: #f1f5f9; border-radius: 2px; }
.layout-thumb-inner[data-layout="sidebar"] .lt-main { display: grid; gap: 3px; }
.layout-thumb-inner[data-layout="indent"] .lt-line { margin-left: 8px; border-left: 2px solid #cbd5e1; padding-left: 6px; }

.lt-bar { height: 6px; border-radius: 999px; background: #cbd5e1; margin-bottom: 4px; }
.lt-bar.dark { background: #334155; width: 70%; }
.lt-bar.accent { background: var(--cv-accent, #1e3a5f); width: 45%; }
.lt-bar.thin { height: 4px; width: 90%; }
.lt-bar.short { width: 55%; }

.variations-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

body.variations-open {
  overflow: hidden;
}

@media (max-width: 820px) {
  .variations-body { grid-template-columns: 1fr; }
  .variations-controls { border-right: 0; border-bottom: 1px solid var(--line); max-height: 42vh; }
}

.layout-thumb-live {
  height: 100%;
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 8px 6px 0;
  background: transparent;
  border-radius: 10px;
}

.template-card-compact .template-card-caption span {
  display: none;
}

.template-card-compact .template-card-caption {
  padding: 10px 12px;
}

@media (max-width: 640px) {
  .starter-template-grid {
    grid-template-columns: 1fr;
  }

  .starter-template-picker {
    padding: 12px;
  }
}

body[data-mode="builder"] .preview-canvas:has(.cv-empty-state-visual) {
  max-width: 1040px;
  width: 100%;
}

.section-card.is-optional .section-name {
  color: #64748b;
}

/* ── Custom sections ───────────────────────────────────── */
.add-custom-section-btn {
  display: block;
  width: calc(100% - 24px);
  margin: 8px 12px 14px;
  padding: 10px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fafbfd;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.add-custom-section-btn:hover {
  border-color: var(--cv-accent, #1e3a5f);
  color: var(--cv-accent, #1e3a5f);
  background: #f4f7fb;
}

.section-card.is-custom-section .section-icon {
  color: var(--cv-accent, #1e3a5f);
}

.custom-section-modal[hidden] {
  display: none;
}

.custom-section-modal {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 24px;
}

.credits-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.credits-modal[hidden] {
  display: none;
}

.credits-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 16, 0.58);
  backdrop-filter: blur(2px);
}

.credits-dialog {
  position: relative;
  width: min(420px, 94vw);
  padding: 28px 28px 22px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #ece8e1;
  box-shadow: 0 28px 80px rgba(20, 20, 20, 0.18);
  text-align: center;
}

.credits-dialog .drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.credits-icon {
  width: 72px;
  height: 72px;
  margin: 4px auto 18px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #fff6df 0%, #fff 100%);
  border: 1px solid #ffe3a8;
  color: #f08a18;
  box-shadow: 0 10px 28px rgba(240, 138, 24, 0.14);
}

.credits-dialog h2 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.credits-line {
  margin: 0 0 6px;
  font-size: 15px;
  color: #5f584f;
}

.credits-num {
  font-weight: 800;
}

.credits-num-blue {
  color: #2563eb;
}

.credits-num-orange {
  color: #f08a18;
}

.credits-lead {
  margin: 14px 0 22px;
  font-size: 14px;
  line-height: 1.5;
  color: #7a7570;
}

.credits-upgrade-btn {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: #141414;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(20, 20, 20, 0.18);
}

.credits-upgrade-btn:hover {
  background: #2a2a2a;
}

.credits-upgrade-btn-secondary {
  margin-top: 10px;
  border: 1px solid rgba(20, 20, 20, 0.12);
  background: #fff8ed;
  color: #9a6200;
  box-shadow: none;
}

.credits-upgrade-btn-secondary:hover {
  background: #ffefd2;
}

.credits-upgrade-icon {
  font-size: 14px;
}

.credits-later-btn {
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: #9a9389;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.credits-later-btn:hover {
  color: #5f584f;
}

.custom-section-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 21, 0.55);
  backdrop-filter: blur(4px);
}

.custom-section-dialog {
  position: relative;
  z-index: 1;
  width: min(440px, 96vw);
  padding: 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.custom-section-dialog h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.custom-section-lead {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.custom-section-field,
.custom-section-kind {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.custom-section-field span,
.custom-section-kind > span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.custom-section-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
}

.custom-kind-toggle {
  display: flex;
  gap: 8px;
}

.custom-section-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.custom-section-editor-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.custom-section-editor-head label {
  flex: 1;
}

.custom-section-remove-btn {
  flex-shrink: 0;
  color: #b42318;
  border-color: #fecaca;
}
