:root {
  color-scheme: light;
  --bg: #f6f5f1;
  --surface: #ffffff;
  --text: #17201d;
  --muted: #65736d;
  --line: #d8ded9;
  --primary: #0f766e;
  --primary-dark: #0b5751;
  --accent: #b45309;
  --danger: #b91c1c;
  --soft: #e7f3ef;
  --shadow: 0 14px 32px rgba(18, 31, 28, 0.1);
  --topbar-height: 90px;
  --bottom-dock-height: 78px;
  --bottom-dock-gap: 16px;
  --bottom-safe-space: calc(var(--bottom-dock-height) + var(--bottom-dock-gap) + env(safe-area-inset-bottom, 0px));
}

:root[data-theme="azur"] {
  --bg: #f5f7f8;
  --text: #162329;
  --muted: #607078;
  --line: #d5dfe3;
  --primary: #176b87;
  --primary-dark: #104c62;
  --accent: #b85c2c;
  --soft: #e5f2f7;
  --shadow: 0 14px 32px rgba(22, 35, 41, 0.1);
}

:root[data-theme="corail"] {
  --bg: #f8f6f4;
  --text: #2a1d1b;
  --muted: #756864;
  --line: #e2d8d5;
  --primary: #b94f46;
  --primary-dark: #873a34;
  --accent: #286b66;
  --soft: #f9e9e7;
  --shadow: 0 14px 32px rgba(42, 29, 27, 0.1);
}

:root[data-theme="graphite"] {
  --bg: #f5f5f4;
  --text: #1f2428;
  --muted: #687078;
  --line: #d9dde1;
  --primary: #374151;
  --primary-dark: #1f2937;
  --accent: #b7791f;
  --soft: #edf0f3;
  --shadow: 0 14px 32px rgba(31, 36, 40, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

html {
  scroll-padding-top: calc(var(--topbar-height) + 12px);
  scroll-padding-bottom: var(--bottom-safe-space);
}

body {
  margin: 0;
  min-height: 100vh;
  padding-top: var(--topbar-height);
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 48%, transparent);
  outline-offset: 2px;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 12px;
}

textarea {
  resize: vertical;
}

label {
  display: block;
  margin: 14px 0;
  color: var(--muted);
  font-weight: 700;
}

label small {
  display: block;
  margin-top: 4px;
  font-weight: 500;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 2rem;
  line-height: 1.1;
}

h2 {
  font-size: 1.25rem;
}

h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

ul,
ol {
  padding-left: 1.2rem;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar strong {
  display: block;
}

.top-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.runtime-mode {
  background: color-mix(in srgb, var(--soft) 72%, #fff);
  color: var(--primary-dark);
}

.pill.is-clickable,
.account-menu-trigger.is-clickable {
  cursor: pointer;
}

.pill.is-clickable:focus-visible,
.account-menu-trigger:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 42%, transparent);
  outline-offset: 2px;
}

.account-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
}

.account-menu-trigger .pill {
  pointer-events: none;
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 90;
  width: min(260px, calc(100vw - 24px));
}

.account-menu-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 8px;
}

.account-menu-card button {
  justify-content: flex-start;
  width: 100%;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
}

.account-menu-card button:hover,
.account-menu-card button:focus-visible {
  background: var(--soft);
  color: var(--primary-dark);
}

.runtime-panel {
  display: grid;
  gap: 12px;
}

.account-mode-details,
.home-options {
  display: block;
}

.account-mode-details > summary,
.home-options > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.account-mode-details > summary::-webkit-details-marker,
.home-options > summary::-webkit-details-marker {
  display: none;
}

.account-mode-details > summary::before,
.home-options > summary::before {
  content: "›";
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary-dark);
  font-weight: 900;
  transform: rotate(0deg);
  transition: transform 0.18s ease;
}

.account-mode-details[open] > summary::before,
.home-options[open] > summary::before {
  transform: rotate(90deg);
}

.account-mode-details > summary > div,
.home-options > summary > div {
  flex: 1;
  min-width: 0;
}

.account-mode-details > summary > .pill,
.home-options > summary > .pill {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(132px, 42vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-mode-details[open] .runtime-switch,
.account-mode-details[open] .runtime-status,
.account-mode-details[open] .backend-auth,
.account-mode-details[open] .backend-session,
.account-mode-details[open] .backend-packs,
.home-options[open] .section-head,
.home-options[open] .identity-choice-grid,
.home-options[open] .home-interface-mode {
  margin-top: 12px;
}

.apply-entry-panel {
  display: grid;
  gap: 14px;
}

.apply-entry-panel .section-head,
.apply-entry-panel .flow-progress {
  margin-bottom: 0;
}

.job-paste-field {
  display: grid;
  gap: 8px;
}

.job-paste-field textarea {
  min-height: 230px;
}

.apply-primary-actions {
  margin-top: 0;
}

.apply-control-notice {
  align-items: flex-start;
}

.apply-options {
  display: block;
}

.apply-options > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.apply-options > summary::-webkit-details-marker {
  display: none;
}

.apply-options > summary::before {
  content: "›";
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 999px;
  place-items: center;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-weight: 900;
  transition: transform 0.18s ease;
}

.apply-options[open] > summary::before {
  transform: rotate(90deg);
}

.apply-options > summary > div {
  flex: 1;
}

.apply-options-content {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.apply-options .identity-selector-apply,
.apply-options .cv-style-selector,
.apply-options .country-context,
.apply-options .contact-selector {
  margin: 0;
}

.runtime-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.runtime-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.danger-text {
  color: var(--danger);
  font-weight: 800;
}

.backend-auth,
.backend-session,
.backend-packs {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--soft) 48%, var(--surface));
  padding: 12px;
}

.backend-auth {
  display: grid;
  gap: 10px;
}

.backend-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.backend-session > div:first-child {
  min-width: min(100%, 220px);
}

.backend-session .button-row {
  flex: 1 1 360px;
  justify-content: flex-end;
  margin-top: 0;
}

.backend-session .button-row > button {
  flex: 1 1 0;
  min-width: 0;
}

.backend-session small,
.pack-card small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.pack-grid {
  display: grid;
  gap: 8px;
}

.pack-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}

.pack-card em {
  display: inline-flex;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 3px 7px;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.pack-card button {
  grid-column: 1 / -1;
}

.mode-toggle {
  min-height: 36px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 900;
}

.user-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.view {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 16px 14px var(--bottom-safe-space);
}

.hero,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  gap: 18px;
  padding: 22px;
  margin-bottom: 14px;
}

.hero-premium {
  overflow: hidden;
  position: relative;
}

.hero-premium::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -120px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  pointer-events: none;
}

.hero-premium > * {
  position: relative;
  z-index: 1;
}

.hero-premium h1 {
  max-width: 780px;
  margin-bottom: 10px;
}

.hero-premium p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
}

.hero-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-benefits span {
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--soft) 72%, var(--surface));
  color: var(--primary-dark);
  padding: 7px 10px;
  font-size: 0.84rem;
  font-weight: 900;
}

.hero-action {
  display: grid;
  align-content: center;
  gap: 8px;
}

.hero-action .primary {
  width: 100%;
}

.hero-action small {
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.panel {
  padding: 18px;
  margin-bottom: 14px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h1,
.section-head h2 {
  margin-bottom: 0;
}

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

.two {
  grid-template-columns: 1fr;
}

.metric span,
.metric small,
.application-card small,
.admin-user small {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  font-size: 2rem;
}

.benefit-panel {
  box-shadow: none;
}

.credit-value-panel {
  border-color: color-mix(in srgb, var(--primary) 26%, var(--line));
}

.credit-value-grid {
  display: grid;
  gap: 10px;
}

.credit-value-grid article {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.credit-value-grid span,
.recommended-pack span {
  color: var(--muted);
  font-size: 0.9rem;
}

.recommended-pack {
  display: grid;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary-soft) 54%, var(--surface));
  padding: 12px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.inline-form label {
  min-width: 0;
}

.form-message.success {
  color: var(--accent-strong);
}

.form-message.error {
  color: var(--danger);
}

.recommended-pack strong,
.recommended-pack span {
  display: block;
}

.benefit-grid {
  display: grid;
  gap: 10px;
}

.benefit-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.benefit-card > strong {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.benefit-card h3 {
  margin: 0 0 4px;
}

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

.home-options .identity-choice-grid {
  margin-bottom: 12px;
}

.home-interface-mode {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 8px;
  border: 1px dashed #aebbb5;
  border-radius: 8px;
  background: #fbfcfb;
  padding: 20px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.primary {
  background: var(--primary);
  color: white;
  padding: 0 16px;
  font-weight: 800;
}

.primary:hover {
  background: var(--primary-dark);
}

.secondary,
.ghost,
.icon-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0 14px;
  font-weight: 800;
}

.ghost {
  background: var(--soft);
}

.icon-button {
  width: 44px;
  padding: 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.button-row > button {
  flex: 1 1 140px;
  min-width: 0;
  white-space: nowrap;
}

.profile-section {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, var(--soft));
  padding: 14px;
}

.profile-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: 1.02rem;
  font-weight: 900;
}

.profile-section summary::after {
  content: "+";
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary);
}

.profile-section[open] summary {
  margin-bottom: 12px;
}

.profile-section[open] summary::after {
  content: "-";
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.check-row input {
  width: auto;
}

.profile-links {
  margin: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.form-section-title {
  margin: 26px 0 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.photo-editor {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 14px;
}

.profile-photo-preview {
  display: grid;
  width: 88px;
  height: 108px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  padding: 6px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 14px;
  cursor: pointer;
}

.file-button input {
  display: none;
}

.contact-selector {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.contact-selector > summary {
  color: var(--primary-dark);
}

.contact-selector-head {
  align-items: center;
  margin-top: 14px;
}

.contact-selector .section-head p {
  margin-bottom: 0;
}

.contact-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.contact-choice {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 8px;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px;
  cursor: pointer;
}

.contact-choice input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
}

.contact-choice span,
.contact-choice small {
  display: block;
  min-width: 0;
}

.contact-choice small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-choice:has(input:checked) {
  border-color: var(--primary);
  background: var(--soft);
}

.contact-choice.is-unavailable {
  cursor: not-allowed;
  opacity: 0.55;
}

.flow-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0 18px;
}

.flow-progress span {
  min-width: 0;
  border-bottom: 3px solid var(--line);
  color: var(--muted);
  padding: 6px 2px;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.flow-progress span.is-active {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.cv-style-selector {
  gap: 12px;
}

.theme-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.identity-selector {
  display: grid;
  gap: 12px;
}

.identity-selector-apply {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.country-context {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.country-context label {
  margin: 0;
}

.country-warning {
  margin-top: 0;
}

.identity-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.identity-choice-grid.is-compact {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 230px);
  grid-template-columns: none;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
}

.identity-choice,
.admin-identity-card {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 8px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}

.identity-choice {
  cursor: pointer;
  scroll-snap-align: start;
}

.identity-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.identity-choice:has(input:checked) {
  border-color: var(--identity-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--identity-primary) 20%, transparent);
}

.identity-choice strong,
.identity-choice small,
.admin-identity-card strong,
.admin-identity-card small {
  display: block;
}

.identity-choice small,
.admin-identity-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.identity-preview {
  position: relative;
  display: block;
  width: 100%;
  height: 48px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.identity-preview i,
.identity-preview b,
.identity-preview em {
  position: absolute;
  display: block;
}

.identity-preview i {
  inset: 0 auto 0 0;
  width: 28%;
  background: var(--identity-primary);
}

.identity-preview b {
  inset: 9px 10px auto 36%;
  height: 5px;
  background: var(--identity-accent);
}

.identity-preview em {
  inset: 22px 10px 8px 36%;
  background: repeating-linear-gradient(to bottom, var(--identity-soft) 0 3px, transparent 3px 8px);
}

.identity-ats {
  justify-self: start;
  border-radius: 999px;
  background: var(--identity-soft);
  color: var(--identity-primary);
  padding: 3px 7px;
  font-size: 0.66rem;
  font-weight: 900;
}

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

.admin-language-list {
  display: grid;
  gap: 10px;
}

.admin-language-row {
  margin: 0;
}

.translation-status {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary-dark);
  padding: 2px 7px;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.translation-status.is-incomplete {
  background: #fff7ed;
  color: #9a3412;
}

.admin-identity-card {
  grid-template-columns: 82px minmax(0, 1fr) auto auto;
  align-items: center;
}

.compact-check {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  white-space: nowrap;
  font-size: 0.78rem;
}

.compact-check input {
  width: 18px;
  margin: 0;
}

.interface-mode-panel {
  display: grid;
  gap: 12px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 4px;
}

.segmented-control label {
  position: relative;
  margin: 0;
}

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

.segmented-control span {
  display: grid;
  min-height: 38px;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.segmented-control input:checked + span {
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.cv-style-choice,
.theme-choice {
  display: grid;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  cursor: pointer;
}

.cv-style-choice input,
.theme-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.cv-style-choice:has(input:checked),
.theme-choice:has(input:checked) {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--soft);
}

.cv-style-choice strong,
.cv-style-choice small,
.theme-choice strong {
  display: block;
}

.cv-style-choice small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

.cv-style-grid.is-compact {
  grid-auto-columns: minmax(210px, 250px);
}

.cv-style-choice {
  align-content: start;
}

.cv-style-choice:has(input:checked) {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 24%, transparent);
}

.cv-style-preview {
  position: relative;
  display: block;
  width: 100%;
  height: 82px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.cv-style-preview i {
  position: absolute;
  display: block;
  border-radius: 2px;
  background: var(--primary);
}

.cv-style-preview .head {
  inset: 8px auto auto 10px;
  width: 48%;
  height: 9px;
}

.cv-style-preview .head.compact {
  width: 38%;
}

.cv-style-preview .head.premium {
  width: 58%;
  background: var(--accent);
}

.cv-style-preview .head.creative {
  width: 42%;
  height: 18px;
}

.cv-style-preview .line,
.cv-style-preview .summary,
.cv-style-preview .value {
  inset: 22px 10px auto;
  height: 6px;
  opacity: 0.45;
}

.cv-style-preview .summary.offset {
  left: 34%;
}

.cv-style-preview .education,
.cv-style-preview .project,
.cv-style-preview .experience,
.cv-style-preview .achievement,
.cv-style-preview .portfolio,
.cv-style-preview .services,
.cv-style-preview .clients,
.cv-style-preview .languages,
.cv-style-preview .availability,
.cv-style-preview .licenses,
.cv-style-preview .links {
  height: 8px;
  opacity: 0.78;
}

.cv-style-preview .education {
  inset: 26px 10px auto;
  background: var(--accent);
}

.cv-style-preview .project,
.cv-style-preview .experience {
  left: 10px;
  right: 10px;
  background: repeating-linear-gradient(to right, var(--line) 0 18px, transparent 18px 24px);
}

.cv-style-preview .project {
  top: 42px;
}

.cv-style-preview .project.short {
  right: 42%;
  top: 56px;
}

.cv-style-preview .experience {
  top: 50px;
}

.cv-style-preview .experience.short {
  right: 34%;
  top: 64px;
}

.cv-style-preview .skills,
.cv-style-preview .stack,
.cv-style-preview .expertise,
.cv-style-preview .skillgrid {
  inset: auto 10px 8px;
  height: 10px;
  background: repeating-linear-gradient(to right, var(--soft) 0 24px, transparent 24px 30px);
}

.cv-style-preview .skills.wide {
  inset: 34px 10px auto;
}

.cv-style-preview .stack {
  inset: 28px 10px auto;
  background: repeating-linear-gradient(to right, var(--primary) 0 20px, transparent 20px 28px);
}

.cv-style-preview .skillgrid {
  inset: 42px 46% auto 10px;
  height: 24px;
}

.cv-style-preview .availability {
  inset: 26px 56% auto 10px;
  background: var(--accent);
}

.cv-style-preview .licenses {
  inset: 26px 10px auto 48%;
  background: var(--soft);
}

.cv-style-preview .achievement {
  inset: 50px 10px auto 10px;
  background: var(--accent);
}

.cv-style-preview .portfolio {
  inset: 40px 10px auto 35%;
  height: 22px;
  background: var(--soft);
}

.cv-style-preview .services {
  inset: 36px 52% auto 10px;
  height: 24px;
  background: var(--soft);
}

.cv-style-preview .clients {
  inset: 36px 10px auto 52%;
  height: 24px;
  background: var(--accent);
}

.cv-style-preview .links,
.cv-style-preview .languages {
  inset: auto 10px 8px;
  background: var(--soft);
}

.cv-style-preview .side {
  inset: 0 auto 0 0;
  width: 28%;
  height: auto;
  border-radius: 0;
  background: var(--primary);
  opacity: 0.9;
}

.cv-style-preview .sidebarHead {
  left: 36%;
  width: 46%;
}

.cv-style-preview .sideSkills {
  inset: 18px auto auto 8px;
  width: 18%;
  height: 34px;
  background: repeating-linear-gradient(to bottom, #fff 0 3px, transparent 3px 8px);
  opacity: 0.82;
}

.cv-style-preview .main {
  left: 36%;
  right: 10px;
}

.cv-style-preview .sideEducation {
  inset: auto auto 8px 8px;
  width: 18%;
  background: #fff;
  opacity: 0.8;
}

.cv-style-miniature {
  position: relative;
  display: block;
  width: 54px;
  height: 70px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
}

.cv-style-miniature i,
.cv-style-miniature b,
.cv-style-miniature em {
  position: absolute;
  display: block;
  background: var(--primary);
}

.cv-style-miniature-editorial i {
  inset: 7px 6px auto;
  height: 5px;
}

.cv-style-miniature-editorial b {
  inset: 18px 6px auto;
  height: 2px;
  opacity: 0.45;
}

.cv-style-miniature-editorial em {
  inset: 26px 6px 7px;
  background: repeating-linear-gradient(to bottom, var(--line) 0 2px, transparent 2px 7px);
}

.cv-style-miniature-sidebar i {
  inset: 0 auto 0 0;
  width: 18px;
  background: var(--primary);
}

.cv-style-miniature-sidebar b {
  inset: 8px 5px auto 24px;
  height: 5px;
}

.cv-style-miniature-sidebar em {
  inset: 20px 5px 7px 24px;
  background: repeating-linear-gradient(to bottom, var(--line) 0 2px, transparent 2px 7px);
}

.theme-choice {
  gap: 8px;
  align-content: start;
}

.theme-swatches {
  display: flex;
  gap: 5px;
}

.theme-swatches i {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
}

.send-center {
  margin-top: 20px;
  border: 1px solid #99d5cd;
  border-radius: 8px;
  background: #f4f8f6;
  padding: 16px;
}

.send-center .section-head p {
  margin-bottom: 0;
}

.send-center .section-head {
  display: grid;
}

.send-center .section-head .pill {
  justify-self: start;
  white-space: normal;
}

.send-identity,
.send-note {
  display: grid;
  gap: 2px;
  margin: 12px 0;
  border-left: 3px solid var(--primary);
  background: #fff;
  padding: 10px 12px;
}

.send-identity span,
.send-note span {
  color: var(--muted);
  font-size: 0.86rem;
}

.send-primary {
  margin-top: 8px;
}

.attachment-step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.attachment-step.is-ready {
  border-color: var(--primary);
  background: var(--soft);
}

.attachment-step > div {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
}

.attachment-step > div > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.attachment-step p,
.attachment-step strong,
.attachment-step small {
  display: block;
  margin: 0;
}

.attachment-step small {
  margin-top: 3px;
  color: var(--muted);
}

.has-print-preview {
  overflow: hidden;
}

.has-print-preview .bottom-nav {
  display: none;
}

.print-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: block;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #eef1ef;
}

.print-preview-toolbar {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 14px 16px;
  box-shadow: 0 3px 14px rgba(24, 41, 38, 0.1);
}

.print-preview-toolbar > div:first-child {
  display: grid;
  gap: 3px;
}

.print-preview-toolbar strong {
  font-size: 1.05rem;
}

.print-preview-toolbar span {
  color: var(--muted);
  font-size: 0.86rem;
}

.print-preview-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.print-preview-send {
  grid-column: 1 / -1;
  margin: 0;
  border: 2px solid var(--primary);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}

.print-preview-send summary {
  min-height: 46px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  padding: 10px 12px;
  font-size: 1.05rem;
  font-weight: 900;
}

.print-preview-send > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.print-preview-send button {
  width: 100%;
}

.print-preview-send small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.attachment-reminder {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  border-left: 4px solid var(--accent);
  background: #fff;
  padding: 10px 12px;
}

.attachment-reminder strong,
.attachment-reminder span {
  display: block;
}

.email-copy-panel {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.email-copy-panel > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.email-copy-panel p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.email-copy-panel textarea {
  font-family: inherit;
  font-size: 0.86rem;
}

.reward-notice {
  display: grid;
  gap: 2px;
  border-left: 4px solid var(--accent);
  background: #fff7ed;
  padding: 12px;
}

.feedback-panel {
  display: block;
}

.feedback-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

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

.feedback-summary::before {
  content: "›";
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 900;
  transform: rotate(0deg);
  transition: transform 0.18s ease;
}

.feedback-panel[open] .feedback-summary::before {
  transform: rotate(90deg);
}

.improvement-cta {
  display: grid;
  gap: 14px;
  margin: 24px 0 8px;
  border: 1px solid #b8d8d2;
  border-radius: 8px;
  background: #f4faf8;
  padding: 16px;
}

.improvement-cta div,
.improvement-cta span {
  display: grid;
  gap: 3px;
}

.improvement-cta span {
  color: var(--muted);
  font-size: 0.88rem;
}

.reward-notice span {
  color: var(--muted);
  font-size: 0.86rem;
}

.feedback-admin-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.feedback-admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.feedback-admin-card p {
  white-space: pre-wrap;
}

.print-preview-frame {
  display: block;
  width: 100%;
  height: max(72vh, 720px);
  min-height: 72vh;
  border: 0;
  background: #5f6468;
}

.send-options {
  margin-top: 12px;
  border: 0;
  padding: 0;
}

.send-options summary {
  color: var(--primary-dark);
}

.send-channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.send-channel-grid button {
  width: 100%;
}

.full {
  width: 100%;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: env(safe-area-inset-bottom, 0px);
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.bottom-nav button {
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.bottom-nav button.is-active {
  background: var(--primary);
  color: white;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pill,
.score,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--soft);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.score {
  background: #fff7ed;
  color: var(--accent);
}

.fit-decision {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
}

.fit-score-head {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.fit-score-head h2,
.fit-score-head p {
  margin: 0;
}

.fit-score-value {
  display: grid;
  width: 74px;
  height: 74px;
  place-content: center;
  border: 5px solid var(--primary);
  border-radius: 50%;
  background: var(--soft);
  color: var(--primary-dark);
  text-align: center;
}

.fit-score-value strong {
  font-size: 1.7rem;
  line-height: 1;
}

.fit-score-value span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.score-progress {
  margin-top: 4px !important;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
}

.fit-diagnostic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 16px 0;
}

.fit-diagnostic span {
  display: grid;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 5px;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.fit-diagnostic strong {
  color: var(--text);
  font-size: 1rem;
}

.fit-summary-grid {
  display: grid;
  gap: 10px;
}

.fit-summary-grid > div {
  min-width: 0;
  border-left: 3px solid var(--primary);
  background: #fbfcfb;
  padding: 10px 12px;
}

.fit-summary-grid h3 {
  margin: 0 0 6px;
  font-size: 0.92rem;
}

.fit-summary-grid ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.86rem;
}

.fit-explanation {
  margin: 16px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.decision-actions {
  display: grid;
  gap: 8px;
}

.criteria-details {
  margin-top: 12px;
}

.criteria-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.criterion-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.criterion-detail strong,
.criterion-detail small {
  display: block;
}

.criterion-detail small {
  color: var(--muted);
  font-size: 0.72rem;
}

.criterion-status {
  border-radius: 999px;
  background: var(--soft);
  padding: 4px 8px;
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

.criterion-status.is-missing {
  background: #fff1f2;
  color: #9f1239;
}

.criterion-status.is-partial,
.criterion-status.is-unclear {
  background: #fff7ed;
  color: #9a3412;
}

.completion-panel {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--soft) 45%, #fff);
}

.completion-panel .section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.completion-panel .section-head p {
  margin-bottom: 0;
  font-size: 0.86rem;
}

.completion-question {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.question-kicker {
  margin: 0 0 5px;
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.completion-question h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.quick-answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.quick-answers button {
  min-width: 0;
  min-height: 40px;
  padding: 8px;
  font-size: 0.82rem;
}

.question-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 10px;
}

.generate-anyway {
  margin-top: 12px;
}

.completion-finished {
  display: grid;
  gap: 3px;
  border-left: 3px solid var(--primary);
  background: #fff;
  padding: 12px;
}

.completion-finished span {
  color: var(--muted);
  font-size: 0.86rem;
}

.score-update {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.score-update span {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
}

.score-update small {
  color: var(--muted);
  font-size: 0.7rem;
}

.score-update p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.compact-notice {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  border-left: 3px solid var(--primary);
  background: #fff;
  padding: 9px 11px;
}

.compact-notice span {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.application-meta span {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 9px;
  color: var(--muted);
  font-size: 0.76rem;
}

.application-meta strong {
  color: var(--text);
  font-size: 0.84rem;
}

.danger-button {
  color: #9f1239;
}

.status {
  background: #eef2ff;
  color: #3730a3;
}

.steps {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
}

.facts {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.facts div,
.application-card,
.admin-user,
.tx,
.pack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.application-card {
  width: 100%;
  min-height: 68px;
  color: var(--text);
  text-align: left;
}

.application-card:hover {
  border-color: var(--primary);
  background: var(--soft);
}

.view > :last-child,
.panel:last-child,
.hero:last-child,
input,
textarea,
select,
button {
  scroll-margin-bottom: var(--bottom-safe-space);
}

.tx span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tx small {
  color: var(--muted);
  font-weight: 600;
}

.application-card div {
  min-width: 0;
}

.application-card strong,
.application-card small {
  display: block;
}

.application-card small + small {
  margin-top: 3px;
  color: var(--accent);
  font-weight: 800;
}

.notice {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  background: #fff7ed;
  padding: 12px;
}

.notice span {
  color: var(--muted);
}

.facts span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.facts strong {
  display: block;
  word-break: break-word;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  font-weight: 800;
}

.muted {
  color: var(--muted);
}

.doc-preview {
  overflow: auto;
  overflow-x: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.doc-preview > .resume-professional,
.doc-preview > .letter-professional {
  width: 794px;
  min-width: 794px;
  max-width: none;
  box-sizing: border-box;
}

details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

details:last-child {
  border-bottom: 1px solid var(--line);
}

summary {
  cursor: pointer;
  font-weight: 900;
}

details > pre,
details > .doc-preview,
details > h3 {
  margin-top: 14px;
}

.application-detail-head {
  display: grid;
  gap: 16px;
}

.detail-title {
  margin-bottom: 0;
}

.toggle-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.toggle-row input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
}

.toggle-row span,
.toggle-row small {
  display: block;
}

.follow-up-panel {
  border-color: #99d5cd;
}

.calendar-actions {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 10px 12px;
}

.calendar-actions summary {
  color: var(--primary-dark);
}

.calendar-actions p {
  margin: 9px 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  padding: 8px 0;
}

.timeline-item > span {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.timeline-item strong,
.timeline-item small {
  display: block;
}

.timeline-item small {
  color: var(--muted);
}

.doc {
  color: #111;
}

.resume-professional,
.letter-professional {
  max-width: 794px;
  margin: 0 auto;
  background: #fff;
  color: #17201d;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

.resume-professional {
  display: flex;
  flex-direction: column;
}

.resume-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 24px;
  border-bottom: 3px solid var(--primary);
  padding: 8px 0 18px;
}

.resume-header h1 {
  margin: 2px 0 6px;
  color: #102a26;
  font-size: 2rem;
  line-height: 1.05;
}

.resume-kicker {
  margin: 0;
  color: #65736d;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.doc-title {
  margin: 0;
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 900;
}

.resume-photo {
  width: 92px;
  height: 112px;
  border: 1px solid #cfd9d5;
  border-radius: 6px;
  object-fit: cover;
}

.resume-contact {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  border-bottom: 1px solid #d8ded9;
  padding: 14px 0;
}

.resume-contact h2,
.resume-section h2 {
  margin: 0;
  color: var(--primary);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.resume-contact > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
}

.resume-contact p {
  margin: 0;
  font-size: 0.76rem;
  word-break: break-word;
}

.resume-contact strong,
.resume-contact span {
  display: block;
}

.resume-contact strong {
  color: #65736d;
  font-size: 0.66rem;
  text-transform: uppercase;
}

.resume-section {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  border-bottom: 1px solid #e5e9e7;
  padding: 18px 0;
}

.resume-section > :not(h2) {
  grid-column: 2;
}

.resume-summary {
  margin: 0;
  font-size: 0.88rem;
}

.resume-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.resume-skills span {
  border-radius: 4px;
  background: var(--soft);
  color: var(--primary-dark);
  padding: 4px 7px;
  font-size: 0.72rem;
  font-weight: 800;
}

.resume-experience {
  margin-bottom: 16px;
}

.resume-experience:last-child {
  margin-bottom: 0;
}

.resume-experience-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.resume-experience h3,
.resume-experience p,
.resume-education {
  margin: 0;
}

.resume-experience h3 {
  color: #17201d;
  font-size: 0.92rem;
}

.resume-experience-head strong {
  color: var(--primary);
  font-size: 0.8rem;
}

.resume-experience-head p {
  color: #65736d;
  text-align: right;
  font-size: 0.7rem;
}

.resume-experience ul {
  margin: 8px 0 0;
  padding-left: 16px;
  font-size: 0.78rem;
}

.resume-education {
  display: grid;
  gap: 2px;
  margin-bottom: 9px;
  font-size: 0.8rem;
}

.resume-education span {
  color: #65736d;
}

.resume-student .resume-profile-section {
  order: 1;
}

.resume-student .resume-education-section {
  order: 2;
}

.resume-student .resume-skills-section {
  order: 3;
}

.resume-student .resume-experience-section {
  order: 4;
}

.resume-ats_friendly .resume-profile-section,
.resume-field_operational .resume-profile-section,
.resume-technical_it .resume-profile-section,
.resume-premium_corporate .resume-profile-section,
.resume-creative_controlled .resume-profile-section,
.resume-independent .resume-profile-section,
.resume-international_premium .resume-profile-section {
  order: 1;
}

.resume-ats_friendly .resume-skills-section,
.resume-field_operational .resume-skills-section,
.resume-technical_it .resume-skills-section,
.resume-premium_corporate .resume-skills-section,
.resume-creative_controlled .resume-skills-section,
.resume-independent .resume-skills-section,
.resume-international_premium .resume-skills-section {
  order: 2;
}

.resume-ats_friendly .resume-experience-section,
.resume-field_operational .resume-experience-section,
.resume-premium_corporate .resume-experience-section,
.resume-creative_controlled .resume-experience-section,
.resume-independent .resume-experience-section,
.resume-international_premium .resume-experience-section {
  order: 3;
}

.resume-technical_it .resume-experience-section {
  order: 4;
}

.resume-ats_friendly .resume-education-section,
.resume-field_operational .resume-education-section,
.resume-premium_corporate .resume-education-section,
.resume-creative_controlled .resume-education-section,
.resume-independent .resume-education-section,
.resume-international_premium .resume-education-section {
  order: 4;
}

.resume-technical_it .resume-education-section {
  order: 5;
}

.resume-editorial .resume-profile-section,
.resume-editorial .resume-skills-section,
.resume-editorial .resume-experience-section,
.resume-editorial .resume-education-section,
.resume-sidebar .resume-profile-section,
.resume-sidebar .resume-skills-section,
.resume-sidebar .resume-experience-section,
.resume-sidebar .resume-education-section {
  order: initial;
}

.layout-one_column_simple .resume-contact > div {
  grid-template-columns: 1fr;
}

.layout-one_column_simple .resume-section,
.layout-one_column_simple .resume-contact {
  display: block;
}

.layout-one_column_simple .resume-section > :not(h2) {
  grid-column: auto;
}

.layout-one_column_simple .resume-skills {
  display: flex;
  flex-wrap: wrap;
}

.layout-card_blocks .resume-section,
.layout-card_blocks .resume-contact {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 16px;
}

.layout-card_blocks .resume-section h2,
.layout-card_blocks .resume-contact h2 {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.layout-balanced_two_columns {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(180px, 0.75fr);
  column-gap: 22px;
  align-items: start;
}

.layout-balanced_two_columns .resume-header {
  grid-column: 1 / -1;
}

.layout-balanced_two_columns .resume-contact,
.layout-balanced_two_columns .resume-skills-section,
.layout-balanced_two_columns .resume-education-section {
  grid-column: 2;
  display: block;
}

.layout-balanced_two_columns .resume-profile-section,
.layout-balanced_two_columns .resume-experience-section {
  grid-column: 1;
  display: block;
}

.layout-right_discreet_column {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(170px, 0.65fr);
  column-gap: 20px;
  align-items: start;
}

.layout-right_discreet_column .resume-header {
  grid-column: 1 / -1;
}

.layout-right_discreet_column .resume-contact,
.layout-right_discreet_column .resume-skills-section,
.layout-right_discreet_column .resume-education-section {
  grid-column: 2;
  display: block;
  border-left: 3px solid var(--line);
  padding-left: 14px;
}

.layout-right_discreet_column .resume-profile-section,
.layout-right_discreet_column .resume-experience-section {
  grid-column: 1;
  display: block;
}

.layout-vertical_timeline_limited .resume-experience {
  position: relative;
  padding-left: 18px;
}

.layout-vertical_timeline_limited .resume-experience::before {
  content: "";
  position: absolute;
  inset: 6px auto 4px 0;
  width: 3px;
  border-radius: 999px;
  background: var(--primary);
}

.resume-sidebar {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  overflow: hidden;
  border: 1px solid var(--line);
}

.resume-sidebar .resume-header {
  grid-column: 1 / -1;
  grid-row: 1;
  min-height: 132px;
  border: 0;
  background: var(--primary);
  padding: 24px;
}

.resume-sidebar .resume-header h1,
.resume-sidebar .doc-title {
  color: #fff;
}

.resume-sidebar .resume-kicker {
  color: rgba(255, 255, 255, 0.76);
}

.resume-sidebar .resume-photo {
  border-color: rgba(255, 255, 255, 0.5);
}

.resume-sidebar .resume-contact,
.resume-sidebar .resume-skills-section,
.resume-sidebar .resume-education-section {
  grid-column: 1;
  display: block;
  margin: 0;
  border: 0;
  background: var(--soft);
  padding: 22px 18px;
}

.resume-sidebar .resume-contact {
  grid-row: 2;
}

.resume-sidebar .resume-skills-section {
  grid-row: 3;
}

.resume-sidebar .resume-education-section {
  grid-row: 4;
  min-height: 170px;
}

.resume-sidebar .resume-contact > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.resume-sidebar .resume-section > :not(h2) {
  grid-column: auto;
}

.resume-sidebar .resume-skills {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.resume-sidebar .resume-skills span {
  background: #fff;
}

.resume-sidebar .resume-education {
  margin-top: 14px;
}

.resume-sidebar .resume-profile-section,
.resume-sidebar .resume-experience-section {
  grid-column: 2;
  display: block;
  margin: 0;
  border: 0;
  padding: 24px 26px;
}

.resume-sidebar .resume-profile-section {
  grid-row: 2;
}

.resume-sidebar .resume-experience-section {
  grid-row: 3 / span 2;
}

.resume-sidebar .resume-profile-section h2,
.resume-sidebar .resume-experience-section h2 {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.letter-professional {
  min-height: 900px;
  padding: 20px 24px;
}

.letter-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 18px;
}

.letter-header strong,
.letter-header span {
  display: block;
}

.letter-header span,
.letter-header p {
  margin: 0;
  color: #65736d;
  font-size: 0.78rem;
}

.letter-subject {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  margin: 30px 0;
  border-left: 4px solid var(--primary);
  background: var(--soft);
  padding: 12px;
}

.letter-body {
  font-size: 0.9rem;
  line-height: 1.65;
}

.letter-body p {
  margin-bottom: 18px;
}

.letter-signature {
  margin-top: 30px;
  font-weight: 800;
}

pre {
  white-space: pre-wrap;
  font-family: inherit;
}

.completion-actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.completion-actions > div {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.completion-actions > div > span {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.completion-actions p {
  display: grid;
  gap: 3px;
  margin: 0;
}

.completion-actions small {
  color: var(--muted);
  line-height: 1.4;
}

.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 82px;
  z-index: 30;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  border-radius: 8px;
  background: #17201d;
  color: white;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  transition: 0.2s ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.danger-zone {
  border-color: #fecaca;
}

:root[data-color-mode="dark"] {
  color-scheme: dark;
  --bg: #07110f;
  --surface: #10211c;
  --surface-2: #142b25;
  --surface-3: #1b362f;
  --text: #f2f8f5;
  --muted: #b8d0c8;
  --line: rgba(180, 230, 215, 0.18);
  --primary: #5ec4b6;
  --primary-dark: #72d8ca;
  --accent: #ffc65c;
  --danger: #ff4f86;
  --soft: #19342e;
  --warning-bg: rgba(255, 198, 92, 0.12);
  --warning-border: rgba(255, 198, 92, 0.35);
  --warning-text: #ffe3a3;
  --disabled-bg: rgba(255, 255, 255, 0.08);
  --disabled-text: rgba(242, 248, 245, 0.48);
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

:root[data-color-mode="dark"] body {
  background:
    radial-gradient(circle at 18% 0%, rgba(94, 196, 182, 0.07), transparent 28rem),
    var(--bg);
}

:root[data-color-mode="dark"] .topbar,
:root[data-color-mode="dark"] .panel,
:root[data-color-mode="dark"] .hero,
:root[data-color-mode="dark"] .account-menu-card,
:root[data-color-mode="dark"] .send-center {
  background: var(--surface);
  color: var(--text);
}

:root[data-color-mode="dark"] .account-menu-card button:hover,
:root[data-color-mode="dark"] .account-menu-card button:focus-visible {
  background: var(--surface-2);
  color: var(--primary-dark);
}

:root[data-color-mode="dark"] .topbar {
  background: rgba(7, 17, 15, 0.94);
}

:root[data-color-mode="dark"] .bottom-nav {
  background: rgba(16, 33, 28, 0.95);
  border-color: var(--line);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

:root[data-color-mode="dark"] .bottom-nav button:not(.is-active) {
  color: var(--muted);
}

:root[data-color-mode="dark"] .bottom-nav button:not(.is-active):hover {
  background: var(--surface-2);
  color: var(--text);
}

:root[data-color-mode="dark"] .user-avatar,
:root[data-color-mode="dark"] .mode-toggle,
:root[data-color-mode="dark"] .secondary,
:root[data-color-mode="dark"] .ghost,
:root[data-color-mode="dark"] .icon-button,
:root[data-color-mode="dark"] .file-button,
:root[data-color-mode="dark"] .danger-button {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

:root[data-color-mode="dark"] .secondary:hover,
:root[data-color-mode="dark"] .ghost:hover,
:root[data-color-mode="dark"] .icon-button:hover,
:root[data-color-mode="dark"] .file-button:hover,
:root[data-color-mode="dark"] .mode-toggle:hover {
  background: var(--surface-3);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
}

:root[data-color-mode="dark"] .primary {
  background: var(--primary);
  color: #07110f;
}

:root[data-color-mode="dark"] .primary:hover,
:root[data-color-mode="dark"] .bottom-nav button.is-active {
  background: var(--primary-dark);
  color: #07110f;
}

:root[data-color-mode="dark"] button:disabled,
:root[data-color-mode="dark"] .button-row button:disabled,
:root[data-color-mode="dark"] .contact-choice.is-unavailable {
  background: var(--disabled-bg);
  border-color: var(--line);
  color: var(--disabled-text);
  opacity: 1;
}

:root[data-color-mode="dark"] .danger-button {
  color: var(--danger);
}

:root[data-color-mode="dark"] input,
:root[data-color-mode="dark"] textarea,
:root[data-color-mode="dark"] select {
  background: #0d1c18;
  border-color: var(--line);
  color: var(--text);
}

:root[data-color-mode="dark"] input::placeholder,
:root[data-color-mode="dark"] textarea::placeholder {
  color: rgba(216, 234, 227, 0.58);
  opacity: 1;
}

:root[data-color-mode="dark"] input:disabled,
:root[data-color-mode="dark"] textarea:disabled,
:root[data-color-mode="dark"] select:disabled {
  background: var(--disabled-bg);
  color: var(--disabled-text);
}

:root[data-color-mode="dark"] label,
:root[data-color-mode="dark"] .muted,
:root[data-color-mode="dark"] .metric span,
:root[data-color-mode="dark"] .metric small,
:root[data-color-mode="dark"] .application-card small,
:root[data-color-mode="dark"] .admin-user small,
:root[data-color-mode="dark"] .facts span,
:root[data-color-mode="dark"] .completion-panel .section-head p,
:root[data-color-mode="dark"] .attachment-step small,
:root[data-color-mode="dark"] .send-identity span,
:root[data-color-mode="dark"] .send-note span,
:root[data-color-mode="dark"] .compact-notice span,
:root[data-color-mode="dark"] .completion-finished span,
:root[data-color-mode="dark"] .score-update small,
:root[data-color-mode="dark"] .score-update p,
:root[data-color-mode="dark"] .fit-explanation,
:root[data-color-mode="dark"] .email-copy-panel p,
:root[data-color-mode="dark"] .reward-notice span,
:root[data-color-mode="dark"] .improvement-cta span,
:root[data-color-mode="dark"] .timeline-item small {
  color: var(--muted);
}

:root[data-color-mode="dark"] .empty-state,
:root[data-color-mode="dark"] .profile-section,
:root[data-color-mode="dark"] .photo-editor,
:root[data-color-mode="dark"] .profile-photo-preview,
:root[data-color-mode="dark"] .credit-value-grid article,
:root[data-color-mode="dark"] .recommended-pack,
:root[data-color-mode="dark"] .benefit-card,
:root[data-color-mode="dark"] .contact-selector,
:root[data-color-mode="dark"] .country-context,
:root[data-color-mode="dark"] .contact-choice,
:root[data-color-mode="dark"] .cv-style-selector,
:root[data-color-mode="dark"] .cv-style-choice,
:root[data-color-mode="dark"] .identity-selector-apply,
:root[data-color-mode="dark"] .identity-choice,
:root[data-color-mode="dark"] .admin-language-row,
:root[data-color-mode="dark"] .admin-identity-card,
:root[data-color-mode="dark"] .facts > div,
:root[data-color-mode="dark"] .application-card,
:root[data-color-mode="dark"] .admin-user,
:root[data-color-mode="dark"] .tx,
:root[data-color-mode="dark"] .pack,
:root[data-color-mode="dark"] .feedback-admin-card,
:root[data-color-mode="dark"] .toggle-row,
:root[data-color-mode="dark"] .attachment-step,
:root[data-color-mode="dark"] .send-identity,
:root[data-color-mode="dark"] .send-note,
:root[data-color-mode="dark"] .email-copy-panel,
:root[data-color-mode="dark"] .completion-question,
:root[data-color-mode="dark"] .completion-finished,
:root[data-color-mode="dark"] .score-update span,
:root[data-color-mode="dark"] .application-meta span,
:root[data-color-mode="dark"] .fit-diagnostic span,
:root[data-color-mode="dark"] .fit-summary-grid > div,
:root[data-color-mode="dark"] .compact-notice,
:root[data-color-mode="dark"] .calendar-actions {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

:root[data-color-mode="dark"] .profile-section summary::after {
  background: var(--surface-3);
  color: var(--primary);
}

:root[data-color-mode="dark"] .contact-choice:has(input:checked),
:root[data-color-mode="dark"] .cv-style-choice:has(input:checked),
:root[data-color-mode="dark"] .identity-choice:has(input:checked),
:root[data-color-mode="dark"] .attachment-step.is-ready,
:root[data-color-mode="dark"] .completion-panel {
  background: var(--surface-3);
  border-color: var(--primary);
}

:root[data-color-mode="dark"] .fit-decision,
:root[data-color-mode="dark"] .follow-up-panel,
:root[data-color-mode="dark"] .send-center {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
}

:root[data-color-mode="dark"] .fit-score-value,
:root[data-color-mode="dark"] .pill,
:root[data-color-mode="dark"] .score,
:root[data-color-mode="dark"] .status,
:root[data-color-mode="dark"] .criterion-status,
:root[data-color-mode="dark"] .identity-ats {
  background: rgba(94, 196, 182, 0.14);
  border: 1px solid rgba(94, 196, 182, 0.22);
  color: var(--primary-dark);
}

:root[data-color-mode="dark"] .fit-score-value {
  border-width: 5px;
}

:root[data-color-mode="dark"] .status {
  color: #d9fff8;
}

:root[data-color-mode="dark"] .score {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning-text);
}

:root[data-color-mode="dark"] .criterion-status.is-missing {
  background: rgba(255, 79, 134, 0.14);
  border-color: rgba(255, 79, 134, 0.34);
  color: #ffc2d5;
}

:root[data-color-mode="dark"] .criterion-status.is-partial,
:root[data-color-mode="dark"] .criterion-status.is-unclear,
:root[data-color-mode="dark"] .notice,
:root[data-color-mode="dark"] .reward-notice {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning-text);
}

:root[data-color-mode="dark"] .fit-diagnostic strong,
:root[data-color-mode="dark"] .application-meta strong,
:root[data-color-mode="dark"] .facts strong,
:root[data-color-mode="dark"] .fit-summary-grid h3,
:root[data-color-mode="dark"] .reward-notice strong,
:root[data-color-mode="dark"] .compact-notice strong,
:root[data-color-mode="dark"] .completion-finished strong,
:root[data-color-mode="dark"] .send-identity strong,
:root[data-color-mode="dark"] .send-note strong {
  color: var(--text);
}

:root[data-color-mode="dark"] .hero-benefits span {
  background: rgba(94, 196, 182, 0.12);
  border-color: rgba(94, 196, 182, 0.24);
  color: #d9fff8;
}

:root[data-color-mode="dark"] .pack-card em {
  background: rgba(94, 196, 182, 0.16);
  color: #d9fff8;
}

:root[data-color-mode="dark"] .translation-status {
  background: rgba(94, 196, 182, 0.14);
  border: 1px solid rgba(94, 196, 182, 0.22);
  color: var(--primary-dark);
}

:root[data-color-mode="dark"] .translation-status.is-incomplete {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning-text);
}

:root[data-color-mode="dark"] .chips span,
:root[data-color-mode="dark"] .quick-answers button {
  background: rgba(94, 196, 182, 0.12);
  border-color: rgba(94, 196, 182, 0.24);
  color: #d9fff8;
}

:root[data-color-mode="dark"] .chips span:hover,
:root[data-color-mode="dark"] .quick-answers button:hover {
  background: rgba(94, 196, 182, 0.2);
}

:root[data-color-mode="dark"] .improvement-cta {
  background: linear-gradient(135deg, rgba(94, 196, 182, 0.12), rgba(20, 43, 37, 0.96));
  border-color: rgba(94, 196, 182, 0.28);
  color: var(--text);
}

:root[data-color-mode="dark"] .notice span {
  color: #f6ddb0;
}

:root[data-color-mode="dark"] .doc-preview {
  background: #252d2a;
}

:root[data-color-mode="dark"] .doc,
:root[data-color-mode="dark"] .resume-professional,
:root[data-color-mode="dark"] .letter-professional,
:root[data-color-mode="dark"] .identity-preview,
:root[data-color-mode="dark"] .print-sheet {
  color-scheme: light;
  background: #fff;
  color: #17201d;
}

:root[data-color-mode="dark"] .print-preview-toolbar {
  background: #18211e;
  color: var(--text);
}

:root[data-color-mode="dark"] .print-preview-send,
:root[data-color-mode="dark"] .attachment-reminder {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  color: var(--text);
}

:root[data-color-mode="dark"] .attachment-reminder span,
:root[data-color-mode="dark"] .print-preview-send small {
  color: var(--text-soft);
}

@media (min-width: 720px) {
  .view {
    padding: 24px 24px var(--bottom-safe-space);
  }

  .hero {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 30px;
  }

  .hero-action {
    min-width: 230px;
  }

  .benefit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .credit-value-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .recommended-pack {
    grid-template-columns: minmax(0, 1fr) auto;
  }

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

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

  .fit-summary-grid,
  .decision-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-choice-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .theme-choice-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .identity-choice-grid:not(.is-compact) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .send-channel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .attachment-step {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .improvement-cta {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .completion-actions {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .completion-actions .full {
    width: auto;
  }

  .print-preview-toolbar {
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: center;
  }

  .print-preview-actions {
    grid-template-columns: auto auto auto;
  }

  .print-preview-send > div {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .bottom-nav {
    width: min(620px, calc(100% - 32px));
    left: 50%;
    right: auto;
    bottom: calc(var(--bottom-dock-gap) + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .toast {
    width: 420px;
    left: 50%;
    right: auto;
    transform: translate(-50%, 20px);
  }

  .toast.is-visible {
    transform: translate(-50%, 0);
  }
}

@media (max-width: 719px) {
  .inline-form {
    grid-template-columns: 1fr;
  }

  :root {
    --topbar-height: 66px;
    --bottom-dock-height: 78px;
    --bottom-dock-gap: 12px;
  }

  .topbar {
    gap: 8px;
    padding: 10px;
  }

  .backend-session {
    align-items: stretch;
  }

  .backend-session .button-row {
    width: 100%;
    flex-direction: column;
    margin-top: 8px;
  }

  .backend-session .button-row > button {
    width: 100%;
  }

  .topbar > div:first-child {
    min-width: 0;
  }

  .top-actions {
    min-width: 0;
    gap: 5px;
  }

  .top-actions .pill {
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mode-toggle {
    min-width: 0;
    padding: 5px 7px;
  }

  .user-avatar {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
  }

  .identity-choice-grid.is-compact {
    max-width: 100%;
    min-width: 0;
  }

  .home-options .identity-choice-grid.is-compact {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
  }

  .home-options .identity-choice-grid.is-compact .identity-choice {
    flex: 0 0 min(190px, calc(100vw - 64px));
    max-width: calc(100vw - 64px);
  }

  .feedback-summary {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
  }

  .feedback-summary > .pill {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
    height: auto;
    white-space: normal;
  }

  .section-head {
    flex-wrap: wrap;
  }

  .section-head > .pill {
    max-width: 100%;
    height: auto;
    white-space: normal;
  }

  .layout-balanced_two_columns,
  .layout-right_discreet_column,
  .resume-sidebar {
    display: block;
  }

  .layout-balanced_two_columns .resume-contact,
  .layout-balanced_two_columns .resume-skills-section,
  .layout-balanced_two_columns .resume-education-section,
  .layout-balanced_two_columns .resume-profile-section,
  .layout-balanced_two_columns .resume-experience-section,
  .layout-right_discreet_column .resume-contact,
  .layout-right_discreet_column .resume-skills-section,
  .layout-right_discreet_column .resume-education-section,
  .layout-right_discreet_column .resume-profile-section,
  .layout-right_discreet_column .resume-experience-section,
  .resume-sidebar .resume-contact,
  .resume-sidebar .resume-skills-section,
  .resume-sidebar .resume-education-section,
  .resume-sidebar .resume-profile-section,
  .resume-sidebar .resume-experience-section {
    grid-column: auto;
    grid-row: auto;
    border-left: 0;
  }

  .print-preview-toolbar {
    position: relative;
    padding: 10px;
  }

  .print-preview-frame {
    height: 78vh;
    min-height: 620px;
  }

  .score-update,
  .application-meta {
    grid-template-columns: 1fr;
  }

  .admin-identity-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .admin-identity-card .compact-check {
    grid-column: span 1;
  }
}

/* =========================================================
Paste2Apply Brand Layer - RC1 safe visual identity
Reversible additive layer
========================================================= */
body.p2a-brand {
  --p2a-blue-deep: #071b3a;
  --p2a-blue: #155eef;
  --p2a-blue-soft: #2f80ff;
  --p2a-green: #18c98b;
  --p2a-bg: #f7fafc;
  --p2a-surface: #ffffff;
  --p2a-text: #0f172a;
  --p2a-muted: #475569;
  --p2a-border: #e2e8f0;
  --p2a-radius: 18px;
  --p2a-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --bg: var(--p2a-bg);
  --surface: var(--p2a-surface);
  --text: var(--p2a-text);
  --muted: var(--p2a-muted);
  --line: var(--p2a-border);
  --primary: var(--p2a-blue);
  --primary-dark: #0b3fb4;
  --accent: var(--p2a-green);
  --soft: #eef6ff;
  --shadow: var(--p2a-shadow);
  background:
    radial-gradient(circle at 8% 0%, rgba(47, 128, 255, 0.12), transparent 28rem),
    radial-gradient(circle at 88% 6%, rgba(24, 201, 139, 0.1), transparent 26rem),
    var(--bg);
}

body.p2a-brand .topbar {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(21, 94, 239, 0.12);
  box-shadow: 0 10px 28px rgba(7, 27, 58, 0.06);
}

body.p2a-brand .brand-mark {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  padding: 7px 11px;
  border: 1px solid rgba(21, 94, 239, 0.18);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(236, 246, 255, 0.82));
  box-shadow: 0 16px 38px rgba(21, 94, 239, 0.14);
}

body.p2a-brand .brand-mark img {
  display: block;
  width: clamp(142px, 16vw, 198px) !important;
  flex: 0 0 clamp(142px, 16vw, 198px);
  height: auto;
  max-height: 46px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border-radius: 0;
}

body.p2a-brand .brand-mark .eyebrow {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

body.p2a-brand .brand-mark strong {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

body.p2a-brand .mode-toggle,
body.p2a-brand .pill,
body.p2a-brand .status {
  border: 1px solid rgba(21, 94, 239, 0.12);
}

body.p2a-brand .user-avatar {
  background: linear-gradient(135deg, var(--p2a-blue), var(--p2a-green));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 24px rgba(21, 94, 239, 0.18);
}

body.p2a-brand .hero,
body.p2a-brand .panel {
  border-color: rgba(21, 94, 239, 0.1);
  border-radius: var(--p2a-radius);
}

body.p2a-brand .hero-premium {
  min-height: 258px;
  background:
    linear-gradient(135deg, rgba(7, 27, 58, 0.96), rgba(21, 94, 239, 0.88)),
    var(--p2a-blue-deep);
  color: #fff;
  border-color: rgba(47, 128, 255, 0.24);
  box-shadow: 0 24px 64px rgba(7, 27, 58, 0.22);
}

body.p2a-brand .hero-premium::after {
  right: -42px;
  bottom: -82px;
  width: 260px;
  height: 260px;
  background:
    radial-gradient(circle, rgba(24, 201, 139, 0.22), transparent 66%),
    color-mix(in srgb, var(--p2a-blue-soft) 20%, transparent);
}

body.p2a-brand .hero-premium .eyebrow {
  color: #7ff0cb;
}

body.p2a-brand .hero-premium p:not(.eyebrow),
body.p2a-brand .hero-action small {
  color: rgba(255, 255, 255, 0.82);
}

body.p2a-brand .hero-benefits span {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

body.p2a-brand .primary,
body.p2a-brand .hero-action .primary,
body.p2a-brand .bottom-nav button.is-active {
  background: linear-gradient(135deg, var(--p2a-blue), var(--p2a-green));
  color: #fff;
  box-shadow: 0 12px 30px rgba(21, 94, 239, 0.2);
}

body.p2a-brand .primary:hover,
body.p2a-brand .hero-action .primary:hover {
  filter: saturate(1.05) brightness(1.02);
  transform: translateY(-1px);
}

body.p2a-brand .credit-value-grid article,
body.p2a-brand .benefit-card,
body.p2a-brand .metric,
body.p2a-brand .application-card,
body.p2a-brand .recommended-pack,
body.p2a-brand .empty-state {
  border-color: rgba(21, 94, 239, 0.11);
  background: color-mix(in srgb, var(--surface) 92%, #eef6ff);
}

body.p2a-brand .benefit-card > strong,
body.p2a-brand .step-number,
body.p2a-brand .fit-score-value {
  background: linear-gradient(135deg, var(--p2a-blue), var(--p2a-green));
  color: #fff;
}

body.p2a-brand .compact-notice,
body.p2a-brand .notice,
body.p2a-brand .attachment-reminder {
  border-left-color: var(--p2a-green);
  background: rgba(24, 201, 139, 0.08);
}

body.p2a-brand .job-image-import {
  margin: 14px 0 0;
  position: relative;
  border: 1px solid color-mix(in srgb, var(--p2a-blue) 30%, var(--line));
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(24, 201, 139, 0.16), transparent 38%),
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 88%, #eef6ff), color-mix(in srgb, var(--surface-2) 92%, #eaf7f4));
  box-shadow: 0 18px 42px rgba(21, 94, 239, 0.1);
  overflow: hidden;
}

body.p2a-brand .job-image-import summary {
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid transparent;
}

body.p2a-brand .job-image-import[open] summary {
  border-bottom-color: color-mix(in srgb, var(--p2a-blue) 18%, var(--line));
}

body.p2a-brand .job-image-import summary h2 {
  margin: 0 0 4px;
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  letter-spacing: 0;
}

body.p2a-brand .job-image-import summary .pill {
  border-color: color-mix(in srgb, var(--p2a-green) 48%, var(--line));
  background: color-mix(in srgb, var(--p2a-green) 14%, var(--surface));
  color: color-mix(in srgb, var(--p2a-green) 72%, var(--text));
}

body.p2a-brand .job-image-import-body {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
}

body.p2a-brand .image-import-benefit {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--p2a-green) 24%, var(--line));
  border-radius: 12px;
  background: rgba(24, 201, 139, 0.08);
  color: var(--text);
  font-weight: 800;
}

body.p2a-brand .image-upload-drop {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px dashed color-mix(in srgb, var(--p2a-blue) 58%, var(--line));
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.1), rgba(24, 201, 139, 0.1)),
    color-mix(in srgb, var(--surface-2) 82%, transparent);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

body.p2a-brand .image-upload-drop:hover,
body.p2a-brand .image-upload-drop:focus-within {
  border-color: color-mix(in srgb, var(--p2a-green) 70%, var(--p2a-blue));
  box-shadow: 0 12px 28px rgba(24, 201, 139, 0.12);
  transform: translateY(-1px);
}

body.p2a-brand .image-upload-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body.p2a-brand .image-upload-drop span {
  font-weight: 800;
  color: var(--text);
  font-size: 1.02rem;
}

body.p2a-brand .image-import-preview {
  display: grid;
  grid-template-columns: minmax(94px, 150px) 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

body.p2a-brand .image-import-preview img {
  width: 100%;
  max-height: 112px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

body.p2a-brand .image-extraction-result {
  display: grid;
  gap: 12px;
  margin-bottom: 84px;
  padding: 12px;
  border: 1px solid rgba(24, 201, 139, 0.28);
  border-radius: 12px;
  background: rgba(24, 201, 139, 0.08);
  scroll-margin-bottom: 148px;
}

body.p2a-brand .image-extraction-result textarea {
  min-height: 160px;
  overflow-wrap: anywhere;
}

body.p2a-brand .image-facts {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

body.p2a-brand .image-facts .fact {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.p2a-brand .warning-soft {
  border-left-color: #d89a2b;
  background: rgba(216, 154, 43, 0.1);
}

body.p2a-brand .bottom-nav {
  border-color: rgba(21, 94, 239, 0.12);
  box-shadow: 0 18px 48px rgba(7, 27, 58, 0.12);
}

:root[data-color-mode="dark"] body.p2a-brand {
  --bg: #06111f;
  --surface: #0c1a2d;
  --surface-2: #10223a;
  --surface-3: #173252;
  --text: #eef7ff;
  --muted: #b7c8dc;
  --line: rgba(172, 206, 255, 0.18);
  --primary: #67a5ff;
  --primary-dark: #8adbbf;
  --accent: #18c98b;
  --soft: #102747;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  background:
    radial-gradient(circle at 8% 0%, rgba(47, 128, 255, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 6%, rgba(24, 201, 139, 0.12), transparent 26rem),
    var(--bg);
}

:root[data-color-mode="dark"] body.p2a-brand .topbar {
  background: rgba(6, 17, 31, 0.94);
  border-bottom-color: rgba(103, 165, 255, 0.16);
}

:root[data-color-mode="dark"] body.p2a-brand .brand-mark {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(225, 241, 255, 0.86));
  border-color: rgba(89, 167, 255, 0.3);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(105, 215, 255, 0.08);
}

:root[data-color-mode="dark"] body.p2a-brand .hero-premium {
  background:
    linear-gradient(135deg, rgba(7, 27, 58, 0.98), rgba(10, 52, 112, 0.92)),
    var(--p2a-blue-deep);
}

:root[data-color-mode="dark"] body.p2a-brand .credit-value-grid article,
:root[data-color-mode="dark"] body.p2a-brand .benefit-card,
:root[data-color-mode="dark"] body.p2a-brand .metric,
:root[data-color-mode="dark"] body.p2a-brand .application-card,
:root[data-color-mode="dark"] body.p2a-brand .recommended-pack,
:root[data-color-mode="dark"] body.p2a-brand .empty-state {
  background: var(--surface-2);
  border-color: var(--line);
}

:root[data-color-mode="dark"] body.p2a-brand .job-image-import,
:root[data-color-mode="dark"] body.p2a-brand .image-import-preview {
  background: var(--surface-2);
  border-color: var(--line);
}

:root[data-color-mode="dark"] body.p2a-brand .job-image-import {
  border-color: rgba(110, 231, 212, 0.22);
  background:
    radial-gradient(circle at top right, rgba(24, 201, 139, 0.16), transparent 38%),
    linear-gradient(135deg, rgba(15, 42, 74, 0.96), rgba(10, 33, 44, 0.96));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

@media (max-width: 719px) {
  body.p2a-brand .brand-mark {
    gap: 7px;
    padding: 6px 8px;
    border-radius: 16px;
  }

  body.p2a-brand .brand-mark img {
    width: clamp(92px, 28vw, 122px) !important;
    flex-basis: clamp(92px, 28vw, 122px);
    max-height: 34px;
  }

  body.p2a-brand .brand-mark .eyebrow {
    display: none;
  }

  body.p2a-brand .brand-mark strong {
    font-size: 0.8rem;
  }

  body.p2a-brand .hero-premium {
    min-height: 0;
  }

  body.p2a-brand .job-image-import summary {
    align-items: flex-start;
  }

  body.p2a-brand .image-import-preview {
    grid-template-columns: 1fr;
  }

  body.p2a-brand .image-facts {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  .topbar,
  .bottom-nav,
  .toast,
  .completion-actions {
    display: none;
  }

  body {
    background: #fff;
  }

  .panel,
  .hero {
    border: 0;
    box-shadow: none;
  }
}
