:root {
  --ink: #102d3a;
  --ink-2: #203e49;
  --muted: #60747c;
  --muted-2: #82949a;
  --navy: #102d3a;
  --navy-deep: #0a222d;
  --teal: #18777a;
  --teal-dark: #105f63;
  --teal-soft: #dff1f0;
  --blue: #286c9b;
  --blue-soft: #e3eef7;
  --violet: #7665a8;
  --violet-soft: #eeeaf8;
  --amber: #c47a25;
  --amber-soft: #faecd8;
  --coral: #b65d54;
  --coral-soft: #f7e6e3;
  --green: #3f7c62;
  --green-soft: #e3f0e9;
  --danger: #a7434b;
  --danger-soft: #f7e4e6;
  --canvas: #f4f7f8;
  --paper: #ffffff;
  --paper-2: #f9fbfb;
  --line: #dce5e8;
  --line-strong: #c7d5da;
  --shadow: 0 18px 50px rgba(16, 45, 58, .09);
  --shadow-soft: 0 8px 24px rgba(16, 45, 58, .07);
  --radius-xl: 24px;
  --radius: 17px;
  --radius-sm: 11px;
  --sidebar: 268px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

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

button,
label[for],
.file-button {
  cursor: pointer;
}

button {
  border: 0;
}

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

h1,
h2,
h3,
strong {
  letter-spacing: -.015em;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2vw, 1.72rem);
  line-height: 1.2;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.18rem;
  line-height: 1.3;
}

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

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

a {
  color: var(--teal-dark);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--paper);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input,
select {
  min-height: 46px;
  padding: 10px 12px;
}

textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #98a7ac;
}

input:focus,
textarea:focus,
select:focus,
button:focus-visible,
[tabindex]:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(24, 119, 122, .16);
}

button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

progress {
  overflow: hidden;
  width: 100%;
  height: 7px;
  border: 0;
  border-radius: 99px;
  background: #d7e4e7;
}

progress::-webkit-progress-bar {
  border-radius: 99px;
  background: #d7e4e7;
}

progress::-webkit-progress-value {
  border-radius: 99px;
  background: linear-gradient(90deg, var(--teal), #43a49c);
}

progress::-moz-progress-bar {
  border-radius: 99px;
  background: linear-gradient(90deg, var(--teal), #43a49c);
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  margin: -1px !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 40;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar);
  padding: 24px 18px 18px;
  background:
    radial-gradient(circle at 12% 8%, rgba(80, 161, 157, .16), transparent 24%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 7px 22px;
}

.brand-sphere {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 50%;
  background: linear-gradient(145deg, #48a09c, #17686e);
  box-shadow: inset -8px -8px 18px rgba(5, 35, 44, .28), 0 8px 24px rgba(0, 0, 0, .18);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
}

.brand-sphere::before,
.brand-sphere::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .46);
  border-radius: 50%;
  content: "";
}

.brand-sphere::before {
  width: 54px;
  height: 20px;
  transform: rotate(-22deg);
}

.brand-sphere::after {
  width: 18px;
  height: 48px;
  transform: rotate(23deg);
}

.brand-sphere span {
  position: relative;
  z-index: 1;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-copy strong {
  font-size: 1.16rem;
  letter-spacing: -.025em;
}

.brand-copy small {
  color: #a8c7ca;
  font-size: .73rem;
}

.local-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 12px;
  background: rgba(255, 255, 255, .055);
}

.local-badge > span:last-child {
  display: flex;
  flex-direction: column;
}

.local-badge strong {
  font-size: .78rem;
  font-weight: 650;
}

.local-badge small {
  color: #94b4b8;
  font-size: .68rem;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #64c3a4;
  box-shadow: 0 0 0 4px rgba(100, 195, 164, .12);
}

.side-nav {
  overflow-y: auto;
  margin-right: -5px;
  padding-right: 5px;
  scrollbar-color: rgba(255, 255, 255, .15) transparent;
  scrollbar-width: thin;
}

.nav-label {
  margin: 17px 12px 7px;
  color: #7fa0a6;
  font-size: .64rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  width: 100%;
  min-height: 52px;
  margin: 2px 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  color: #bfd1d4;
  text-align: left;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, .065);
  color: #fff;
}

.nav-link.active {
  background: rgba(73, 160, 157, .18);
  color: #fff;
}

.nav-link.active::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -7px;
  width: 3px;
  border-radius: 99px;
  background: #60c1b7;
  content: "";
}

.nav-icon {
  display: grid;
  grid-row: 1 / 3;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #91b4b8;
  font-size: 1.08rem;
}

.nav-link.active .nav-icon {
  color: #69c4bd;
}

.nav-link > span:nth-child(2) {
  overflow: hidden;
  grid-column: 2;
  font-size: .86rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: normal;
}

.nav-link small {
  grid-column: 2;
  color: #7fa0a6;
  font-size: .62rem;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 15px;
}

.quiet-button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px;
  border-radius: 9px;
  background: transparent;
  color: #a9c1c5;
  font-size: .8rem;
  text-align: left;
}

.quiet-button:hover {
  background: rgba(255, 255, 255, .055);
  color: #fff;
}

.sidebar-footer p {
  margin: 9px 10px 0;
  color: #64868c;
  font-size: .65rem;
}

.workspace {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 18px;
  padding: 12px clamp(20px, 3.4vw, 48px);
  border-bottom: 1px solid rgba(199, 213, 218, .82);
  background: rgba(244, 247, 248, .94);
  backdrop-filter: blur(14px);
}

.page-heading {
  min-width: 0;
  margin-right: auto;
}

.page-kicker,
.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--teal-dark);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.page-heading h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.save-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .73rem;
  white-space: nowrap;
}

.save-indicator.saving .status-dot {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(196, 122, 37, .12);
}

.profile-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--navy));
  box-shadow: 0 4px 14px rgba(16, 45, 58, .18);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
}

.mobile-menu {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  font-size: 1.1rem;
}

main {
  padding: 30px clamp(20px, 3.4vw, 48px) 90px;
}

.screen {
  display: none;
  width: min(100%, 1480px);
  margin: 0 auto;
  animation: screen-in .22s ease;
}

.screen.active {
  display: block;
}

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

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.panel:not(.pilot-toolbar):not(.forge-select) {
  padding: 22px;
}

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

.panel-heading h2 {
  margin: 0;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border .16s ease;
}

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

.button-primary {
  background: var(--teal);
  box-shadow: 0 8px 20px rgba(24, 119, 122, .17);
  color: #fff;
}

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

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

.button-secondary:hover {
  border-color: #9eb4ba;
  background: var(--paper-2);
}

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

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

.button.compact {
  min-height: 38px;
  padding: 8px 13px;
  font-size: .75rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.button-row.split {
  justify-content: space-between;
}

.text-button {
  padding: 2px;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--teal-dark);
  font-size: .76rem;
  font-weight: 750;
}

.text-button:hover {
  border-color: currentColor;
}

.text-button.light {
  color: #d5efed;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.2rem;
}

.icon-button:hover {
  background: var(--paper-2);
}

.icon-button.inverse {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(330px, .8fr);
  gap: 18px;
}

.objective-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 88% 8%, rgba(89, 188, 181, .28), transparent 31%),
    linear-gradient(135deg, #113946, #102d3a 66%, #0d2530);
  box-shadow: 0 22px 50px rgba(16, 45, 58, .20);
  color: #fff;
}

.objective-card::after {
  position: absolute;
  top: -70px;
  right: -40px;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(255, 255, 255, .025), 0 0 0 55px rgba(255, 255, 255, .018);
  content: "";
}

.objective-card .eyebrow {
  color: #8ed1cc;
}

.card-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.objective-content {
  position: relative;
  z-index: 1;
  max-width: 770px;
  margin: 24px 0 18px;
}

.objective-content h2 {
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.objective-content p {
  max-width: 640px;
  margin: 0;
  color: #b8d0d3;
}

.objective-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.objective-meta span {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 99px;
  background: rgba(255, 255, 255, .065);
  color: #c8dcde;
  font-size: .7rem;
}

.objective-card .button {
  position: relative;
  z-index: 1;
}

.merlin-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 250px;
  align-items: flex-start;
  gap: 18px;
  padding: 27px;
  border: 1px solid #d4e4e4;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 100% 0%, rgba(54, 151, 148, .13), transparent 42%),
    linear-gradient(145deg, #f3fbfa, #e8f3f2);
}

.merlin-hero::after {
  position: absolute;
  right: -45px;
  bottom: -55px;
  width: 145px;
  height: 145px;
  border: 1px solid rgba(24, 119, 122, .10);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(24, 119, 122, .035);
  content: "";
}

.merlin-hero h2 {
  max-width: 360px;
  margin-top: 16px;
  font-size: 1.32rem;
}

.merlin-hero p {
  max-width: 440px;
  font-size: .87rem;
}

.merlin-orb {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #53aaa4, #166b70);
  box-shadow: inset -7px -8px 14px rgba(10, 58, 63, .28), 0 7px 18px rgba(19, 91, 94, .20);
  color: #fff;
  font-size: .75rem;
  font-weight: 850;
}

.merlin-orb::before {
  position: absolute;
  width: 118%;
  height: 48%;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 50%;
  content: "";
  transform: rotate(-24deg);
}

.merlin-orb span {
  position: relative;
  z-index: 1;
}

.merlin-orb.large {
  width: 60px;
  height: 60px;
  font-size: 1rem;
}

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

.metric-card {
  display: flex;
  min-height: 118px;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.metric-icon {
  display: grid;
  width: 45px;
  height: 45px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  font-size: 1.22rem;
}

.metric-icon.blue { background: var(--blue-soft); color: var(--blue); }
.metric-icon.teal { background: var(--teal-soft); color: var(--teal); }
.metric-icon.amber { background: var(--amber-soft); color: var(--amber); }
.metric-icon.violet { background: var(--violet-soft); color: var(--violet); }

.metric-card > div:last-child {
  display: grid;
}

.metric-card span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 650;
}

.metric-card strong {
  margin: 2px 0 0;
  font-size: 1.65rem;
  line-height: 1.1;
}

.metric-card small {
  color: var(--muted-2);
  font-size: .66rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 18px;
  margin-bottom: 18px;
}

.action-list {
  display: grid;
  gap: 3px;
}

.action-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 4px;
  border-bottom: 1px solid #edf1f2;
}

.action-item:last-child {
  border-bottom: 0;
}

.action-item input {
  width: 19px;
  min-height: 19px;
  accent-color: var(--teal);
}

.action-item label {
  min-width: 0;
}

.action-item label span {
  display: block;
  overflow: hidden;
  font-size: .82rem;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-item label small {
  color: var(--muted);
  font-size: .67rem;
}

.action-item.done label {
  opacity: .55;
  text-decoration: line-through;
}

.action-date {
  padding: 4px 8px;
  border-radius: 99px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: .65rem;
  white-space: nowrap;
}

.delete-mini {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-2);
}

.delete-mini:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

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

.funnel-row {
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 11px;
}

.funnel-row > span {
  color: var(--muted);
  font-size: .72rem;
}

.funnel-row > strong {
  font-size: .75rem;
  text-align: right;
}

.funnel-track {
  overflow: hidden;
  height: 8px;
  border-radius: 99px;
  background: #ecf1f2;
}

.funnel-fill {
  min-width: 4px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #57aaa6);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid #edf1f2;
  font-size: .76rem;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .065em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fafcfc;
}

.company-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.company-avatar {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: .68rem;
  font-weight: 800;
}

.company-cell > span {
  display: flex;
  flex-direction: column;
}

.company-cell small {
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 99px;
  background: #edf2f3;
  color: var(--ink-2);
  font-size: .67rem;
  font-weight: 750;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #87999f;
  content: "";
}

.status-pill.prepared { background: var(--blue-soft); color: #245f86; }
.status-pill.prepared::before { background: var(--blue); }
.status-pill.sent { background: var(--teal-soft); color: #126366; }
.status-pill.sent::before { background: var(--teal); }
.status-pill.interview { background: var(--amber-soft); color: #9b5e17; }
.status-pill.interview::before { background: var(--amber); }
.status-pill.offer { background: var(--violet-soft); color: #64538f; }
.status-pill.offer::before { background: var(--violet); }
.status-pill.rejected { background: var(--danger-soft); color: var(--danger); }
.status-pill.rejected::before { background: var(--danger); }
.status-pill.accepted { background: var(--green-soft); color: var(--green); }
.status-pill.accepted::before { background: var(--green); }

.empty-state {
  display: flex;
  min-height: 240px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px;
  text-align: left;
}

.empty-state p {
  margin: 3px 0 0;
  font-size: .78rem;
}

.empty-icon {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 1.4rem;
}

.compact-empty {
  min-height: 100px;
}

.module-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding: 2px 2px 0;
}

.module-intro > div:first-child {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.module-intro h2 {
  margin: 0 0 4px;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
}

.module-intro p {
  max-width: 780px;
  margin: 0;
  font-size: .86rem;
}

.module-mark {
  display: grid;
  width: 53px;
  height: 53px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  font-size: 1.48rem;
}

.module-mark.blue { color: var(--blue); background: var(--blue-soft); }
.module-mark.teal { color: var(--teal); background: var(--teal-soft); }
.module-mark.violet { color: var(--violet); background: var(--violet-soft); }
.module-mark.amber { color: var(--amber); background: var(--amber-soft); }
.module-mark.coral { color: var(--coral); background: var(--coral-soft); }

.completion-box {
  display: grid;
  grid-template-columns: 1fr auto;
  width: 190px;
  flex: 0 0 auto;
  gap: 5px 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

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

.completion-box strong {
  font-size: .82rem;
}

.completion-box progress {
  grid-column: 1 / -1;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, .65fr);
  gap: 20px;
}

.form-stack {
  display: grid;
  gap: 18px;
}

.form-stack > .panel {
  padding: 24px;
}

.sticky-column {
  position: sticky;
  top: 100px;
  align-self: start;
  display: grid;
  gap: 18px;
}

.insight-card,
.compass-card {
  overflow: hidden;
  padding: 24px;
  border: 1px solid #d2e4e4;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(53, 159, 153, .13), transparent 35%),
    linear-gradient(145deg, #f5fbfb, #ecf6f5);
  box-shadow: var(--shadow-soft);
}

.insight-card h2 {
  margin-top: 13px;
}

.insight-card p {
  font-size: .83rem;
}

.check-list {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-2);
  font-size: .76rem;
}

.check-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  content: "✓";
  font-size: .65rem;
  font-weight: 900;
}

.check-list li.missing::before {
  background: var(--amber-soft);
  color: var(--amber);
  content: "!";
}

.mini-panel blockquote {
  margin: 14px 0 4px;
  color: var(--ink-2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.55;
}

.step-number {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-right: 9px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: .65rem;
  font-weight: 800;
  vertical-align: middle;
}

.panel-heading > div:first-child h2 {
  display: inline;
}

.optional-tag,
.confidence-badge,
.local-analysis-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 99px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: .64rem;
  font-weight: 700;
  white-space: nowrap;
}

.field-grid {
  display: grid;
  gap: 15px;
}

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

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 15px;
}

.field:last-child {
  margin-bottom: 0;
}

.field > span {
  color: var(--ink-2);
  font-size: .73rem;
  font-weight: 720;
}

.field > span small {
  color: var(--muted-2);
  font-size: .64rem;
  font-weight: 500;
}

.field-help {
  color: var(--muted);
  font-size: .67rem;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f3f7f8;
  color: var(--muted);
  font-size: .68rem;
}

.privacy-note span {
  color: var(--teal);
}

.upload-zone {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px dashed #9ab7bb;
  border-radius: 13px;
  background: #f8fbfb;
  transition: border .16s ease, background .16s ease;
}

.upload-zone:hover {
  border-color: var(--teal);
  background: #f3fafa;
}

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

.upload-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 1.2rem;
}

.upload-zone > span:nth-child(2) {
  display: flex;
  flex-direction: column;
}

.upload-zone small {
  color: var(--muted);
  font-size: .67rem;
}

.inline-feedback {
  color: var(--green);
  font-size: .72rem;
}

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 17px;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid #d2e0e3;
  border-radius: 99px;
  background: #f7fafb;
  color: var(--ink-2);
  font-size: .68rem;
  font-weight: 650;
}

.skill-chip button {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  background: #e7edef;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1;
}

.nested-form {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper-2);
}

.experience-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.experience-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.experience-card h3 {
  margin: 0;
}

.experience-card .experience-meta {
  color: var(--muted);
  font-size: .68rem;
}

.experience-card p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: .75rem;
}

.trajectory-list {
  display: grid;
  gap: 11px;
  margin-top: 18px;
}

.trajectory-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(24, 119, 122, .12);
  border-radius: 11px;
  background: rgba(255, 255, 255, .7);
}

.trajectory-rank {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: .72rem;
  font-weight: 850;
}

.trajectory-item strong {
  display: block;
  font-size: .8rem;
}

.trajectory-item small {
  display: block;
  color: var(--muted);
  font-size: .63rem;
}

.trajectory-score {
  color: var(--teal-dark);
  font-size: .88rem;
  font-weight: 850;
}

.muted {
  color: var(--muted);
  font-size: .73rem;
}

.summary-list {
  display: grid;
  gap: 0;
  margin-top: 10px;
}

.summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f2;
  font-size: .71rem;
}

.summary-row:last-child {
  border-bottom: 0;
}

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

.summary-row strong {
  max-width: 62%;
  text-align: right;
}

.analysis-layout {
  display: grid;
  grid-template-columns: minmax(380px, .82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: 20px;
}

.offer-input-panel {
  position: sticky;
  top: 100px;
}

.method-note {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid #edf1f2;
  font-size: .68rem;
}

.local-analysis-badge {
  border: 1px solid #cee2df;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.analysis-placeholder {
  display: grid;
  min-height: 590px;
  place-items: center;
  align-content: center;
  padding: 40px;
  border: 1px dashed #bdcdd1;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .55);
  text-align: center;
}

.empty-illustration {
  display: grid;
  width: 82px;
  height: 82px;
  margin-bottom: 20px;
  place-items: center;
  border: 1px solid #d2e1e4;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  color: var(--violet);
  font-size: 2rem;
}

.analysis-placeholder p {
  max-width: 480px;
  font-size: .82rem;
}

.analysis-placeholder ol {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
  text-align: left;
}

.analysis-placeholder li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  font-size: .75rem;
}

.analysis-placeholder li span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: .63rem;
  font-weight: 800;
}

.analysis-results {
  display: grid;
  gap: 18px;
}

.score-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 180px;
  padding: 24px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(119, 102, 168, .22), transparent 35%),
    linear-gradient(135deg, #122e3b, #162b42);
  box-shadow: 0 18px 38px rgba(16, 45, 58, .18);
  color: #fff;
}

.score-card .eyebrow {
  color: #99c6c8;
}

.score-card h2 {
  margin-top: 8px;
  font-size: 1.45rem;
}

.score-card p {
  margin-bottom: 12px;
  color: #aec3ca;
  font-size: .78rem;
}

.score-ring {
  display: grid;
  width: 124px;
  height: 124px;
  place-items: center;
  align-content: center;
  border: 9px solid rgba(255, 255, 255, .11);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .06), transparent 69%);
  box-shadow: inset 0 0 0 2px rgba(87, 190, 181, .65);
}

.score-ring strong {
  font-size: 1.75rem;
  line-height: 1;
}

.score-ring span {
  margin-top: 4px;
  color: #9dbbc0;
  font-size: .62rem;
}

.score-legend {
  display: flex;
  gap: 16px;
  color: #b9ccd0;
  font-size: .65rem;
}

.score-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.score-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-good { background: #68c5a2; }
.legend-gap { background: #e1a55c; }

.score-components {
  display: grid;
  gap: 13px;
}

.score-component {
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
}

.score-component span {
  color: var(--muted);
  font-size: .7rem;
}

.score-component strong {
  font-size: .72rem;
  text-align: right;
}

.score-component .component-track {
  overflow: hidden;
  height: 8px;
  border-radius: 99px;
  background: #edf1f2;
}

.component-fill {
  min-width: 3px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), #9b8cc8);
}

.score-warning {
  margin: 18px 0 0;
  padding: 11px 13px;
  border-radius: 9px;
  background: #f6f7fa;
  font-size: .67rem;
}

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

.result-panel {
  border-top: 3px solid;
}

.result-panel.positive { border-top-color: var(--green); }
.result-panel.gap { border-top-color: var(--amber); }

.result-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.result-heading span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 8px;
  font-weight: 850;
}

.positive .result-heading span { background: var(--green-soft); color: var(--green); }
.gap .result-heading span { background: var(--amber-soft); color: var(--amber); }

.result-heading h2 {
  margin: 0;
}

.result-panel ul,
.recommendation-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.result-panel li {
  position: relative;
  padding: 10px 10px 10px 32px;
  border-radius: 9px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: .74rem;
}

.result-panel li::before {
  position: absolute;
  top: 10px;
  left: 10px;
  color: var(--green);
  content: "✓";
  font-weight: 850;
}

.gap li::before {
  color: var(--amber);
  content: "?";
}

.recommendation-list {
  counter-reset: recommendations;
}

.recommendation-list li {
  position: relative;
  min-height: 43px;
  padding: 10px 12px 10px 48px;
  border: 1px solid #edf1f2;
  border-radius: 10px;
  color: var(--ink-2);
  counter-increment: recommendations;
  font-size: .75rem;
}

.recommendation-list li::before {
  position: absolute;
  top: 8px;
  left: 9px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--violet-soft);
  color: var(--violet);
  content: counter(recommendations);
  font-size: .67rem;
  font-weight: 850;
}

.pilot-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 13px 15px;
}

.search-field {
  position: relative;
  display: flex;
  min-width: 250px;
  flex: 1;
  align-items: center;
}

.search-field > span {
  position: absolute;
  left: 12px;
  color: var(--muted);
}

.search-field input {
  padding-left: 34px;
}

.filter-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-field span {
  color: var(--muted);
  font-size: .7rem;
}

.filter-field select {
  min-width: 150px;
}

.view-toggle {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f3f6f7;
}

.view-toggle button {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
}

.view-toggle button.active {
  background: var(--paper);
  box-shadow: 0 2px 7px rgba(16, 45, 58, .08);
  color: var(--ink);
}

.pilot-table-view {
  padding: 8px 12px 12px !important;
}

.pilot-table-view select {
  min-height: 34px;
  width: auto;
  padding: 5px 30px 5px 9px;
  border: 0;
  background-color: #f1f5f6;
  font-size: .68rem;
  font-weight: 700;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.row-action {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.row-action:hover {
  background: var(--paper-2);
  color: var(--teal);
}

.row-action.danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.kanban {
  overflow-x: auto;
  grid-template-columns: repeat(7, minmax(230px, 1fr));
  gap: 13px;
  padding-bottom: 10px;
}

.kanban:not([hidden]) {
  display: grid;
}

.kanban-column {
  min-height: 430px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #eef3f4;
}

.kanban-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
  font-size: .72rem;
  font-weight: 800;
}

.kanban-head span {
  display: grid;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  place-items: center;
  border-radius: 99px;
  background: var(--paper);
  color: var(--muted);
  font-size: .63rem;
}

.kanban-cards {
  display: grid;
  gap: 9px;
}

.kanban-card {
  padding: 12px;
  border: 1px solid #dce5e8;
  border-radius: 11px;
  background: var(--paper);
  box-shadow: 0 4px 12px rgba(16, 45, 58, .05);
}

.kanban-card strong {
  display: block;
  font-size: .76rem;
}

.kanban-card > span {
  color: var(--muted);
  font-size: .68rem;
}

.kanban-card p {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid #edf1f2;
  font-size: .66rem;
}

.forge-select {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
  padding: 18px;
}

.forge-readiness {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-bottom: 15px;
  color: var(--muted);
  font-size: .72rem;
}

.readiness-dots {
  display: flex;
  gap: 4px;
}

.readiness-dots i {
  width: 24px;
  height: 6px;
  border-radius: 99px;
  background: #dce5e8;
}

.readiness-dots i.active {
  background: var(--teal);
}

.forge-empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .55);
}

.forge-results {
  display: grid;
  gap: 12px;
}

.forge-tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.forge-tabs button {
  min-height: 39px;
  padding: 8px 14px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: .73rem;
  font-weight: 750;
}

.forge-tabs button.active {
  background: var(--navy);
  color: #fff;
}

.forge-panel {
  display: none;
  min-height: 380px;
}

.forge-panel.active {
  display: block;
}

.generated-text,
.prompt-output {
  border-color: #d5e1e4;
  background: #fbfcfc;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: .79rem;
  line-height: 1.68;
}

.generated-output {
  color: var(--ink-2);
  font-size: .8rem;
  line-height: 1.7;
}

.structured-output {
  display: grid;
  gap: 14px;
}

.strategy-block {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-2);
}

.strategy-block h3 {
  margin-bottom: 6px;
  color: var(--teal-dark);
}

.strategy-block p,
.strategy-block ul {
  margin: 0;
  color: var(--ink-2);
  font-size: .75rem;
}

.strategy-block ul {
  padding-left: 19px;
}

.generation-warning {
  margin: 12px 0 0;
  color: var(--amber);
  font-size: .67rem;
}

.interview-list {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.interview-list li {
  padding: 14px;
  border-left: 3px solid var(--teal);
  border-radius: 0 10px 10px 0;
  background: var(--paper-2);
}

.interview-list strong {
  display: block;
  margin-bottom: 4px;
}

.interview-list p {
  margin: 0;
  font-size: .73rem;
}

.prompt-layout {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr);
  gap: 20px;
}

.prompt-settings {
  align-self: start;
}

.check-fieldset {
  display: grid;
  gap: 3px;
  padding: 0;
  border: 0;
  margin: 22px 0;
}

.check-fieldset legend {
  margin-bottom: 8px;
  color: var(--ink-2);
  font-size: .73rem;
  font-weight: 720;
}

.check-fieldset label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: .73rem;
}

.check-fieldset label:hover {
  background: var(--paper-2);
}

.check-fieldset input {
  width: 17px;
  min-height: 17px;
  accent-color: var(--teal);
}

.sensitive-option {
  color: var(--danger);
}

.sensitive-option small {
  font-size: .61rem;
}

.privacy-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid #ecdcbf;
  border-radius: 11px;
  background: #fff9ee;
}

.privacy-callout > span {
  color: var(--amber);
  font-size: 1.05rem;
}

.privacy-callout strong {
  font-size: .76rem;
}

.privacy-callout p {
  margin: 3px 0 0;
  font-size: .68rem;
}

.prompt-output-panel {
  min-width: 0;
}

.prompt-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: .64rem;
}

.merlin-fab {
  position: fixed;
  z-index: 45;
  right: 22px;
  bottom: 20px;
  display: flex;
  min-width: 210px;
  align-items: center;
  gap: 10px;
  padding: 10px 15px 10px 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 99px;
  background: var(--navy);
  box-shadow: 0 14px 38px rgba(8, 34, 45, .28);
  color: #fff;
  text-align: left;
}

.merlin-fab:hover {
  background: #153d4a;
  transform: translateY(-1px);
}

.merlin-fab > span:last-child {
  display: flex;
  flex-direction: column;
}

.merlin-fab strong {
  font-size: .72rem;
}

.merlin-fab small {
  color: #9ebbc0;
  font-size: .62rem;
}

.merlin-panel {
  position: fixed;
  z-index: 60;
  right: 20px;
  bottom: 20px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(190px, 1fr) auto auto auto;
  width: min(390px, calc(100vw - 30px));
  height: min(620px, calc(100vh - 40px));
  border: 1px solid rgba(16, 45, 58, .14);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 25px 70px rgba(8, 34, 45, .28);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(14px) scale(.98);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.merlin-panel.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.merlin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  background:
    radial-gradient(circle at 85% 0%, rgba(83, 170, 164, .24), transparent 33%),
    var(--navy);
  color: #fff;
}

.merlin-panel-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.merlin-panel-head > div > span:last-child {
  display: flex;
  flex-direction: column;
}

.merlin-panel-head strong {
  font-size: .82rem;
}

.merlin-panel-head small {
  color: #9ebbc0;
  font-size: .63rem;
}

.merlin-chat {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 17px;
  background: #f7f9fa;
}

.chat-message {
  display: flex;
  max-width: 94%;
  align-items: flex-start;
  gap: 9px;
}

.chat-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-message > div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px 12px 12px 12px;
  background: var(--paper);
  box-shadow: 0 3px 10px rgba(16, 45, 58, .04);
}

.chat-message.user > div {
  border-color: var(--teal);
  border-radius: 12px 5px 12px 12px;
  background: var(--teal);
  color: #fff;
}

.chat-message strong {
  font-size: .73rem;
}

.chat-message p {
  margin: 3px 0 0;
  color: var(--ink-2);
  font-size: .7rem;
}

.chat-message.user p {
  color: #fff;
}

.chat-avatar {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: .62rem;
  font-weight: 850;
}

.chat-message.user .chat-avatar {
  background: var(--navy);
}

.quick-prompts {
  display: flex;
  overflow-x: auto;
  gap: 6px;
  padding: 9px 13px;
  border-top: 1px solid var(--line);
}

.quick-prompts button {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--paper);
  color: var(--teal-dark);
  font-size: .62rem;
  white-space: nowrap;
}

.merlin-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 7px;
  padding: 10px 13px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.merlin-input input {
  min-height: 39px;
}

.merlin-input button {
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--teal);
  color: #fff;
}

.merlin-disclaimer {
  padding: 7px 12px 10px;
  margin: 0;
  color: var(--muted-2);
  font-size: .58rem;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  overflow-y: auto;
  padding: 30px 18px;
  background: rgba(7, 28, 37, .58);
  backdrop-filter: blur(4px);
}

.modal-backdrop:not([hidden]) {
  display: grid;
  place-items: center;
}

.modal {
  width: min(800px, 100%);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(7, 28, 37, .28);
  animation: modal-in .18s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.small-modal {
  width: min(520px, 100%);
}

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

.modal-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-head h2 {
  margin: 0;
  font-size: 1.3rem;
}

.modal-symbol {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 12px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 1.15rem;
}

.modal-symbol.amber { background: var(--amber-soft); color: var(--amber); }
.modal-symbol.teal { background: var(--teal-soft); color: var(--teal); }
.modal-symbol.danger { background: var(--danger-soft); color: var(--danger); }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}

.privacy-summary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding: 15px;
  border-radius: 12px;
  background: var(--green-soft);
}

.privacy-summary strong {
  font-size: .8rem;
}

.privacy-summary p {
  margin: 2px 0 0;
  color: #4f6b5d;
  font-size: .7rem;
}

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

.privacy-grid article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.privacy-grid h3 {
  margin: 12px 0 5px;
}

.privacy-grid p {
  min-height: 60px;
  margin: 0 0 13px;
  font-size: .68rem;
}

.privacy-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
}

.privacy-grid .danger-zone {
  border-color: #ecd1d4;
  background: #fffafb;
}

.danger-zone .privacy-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.policy-note {
  margin-top: 18px;
  padding: 16px;
  border-radius: 11px;
  background: #f4f7f8;
}

.policy-note strong {
  font-size: .76rem;
}

.policy-note p {
  margin: 4px 0 0;
  font-size: .68rem;
}

.toast-region {
  position: fixed;
  z-index: 150;
  right: 20px;
  top: 90px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  box-shadow: var(--shadow);
  color: var(--ink-2);
  font-size: .72rem;
  animation: toast-in .22s ease;
}

.toast::before {
  color: var(--green);
  content: "✓";
  font-weight: 900;
}

.toast.warning::before {
  color: var(--amber);
  content: "!";
}

.toast.error::before {
  color: var(--danger);
  content: "×";
}

/* Accueil explicatif et constellation */
.constellation-banner {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, .94fr) minmax(380px, 1.06fr);
  min-height: 286px;
  margin-bottom: 26px;
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid rgba(112, 184, 181, .2);
  border-radius: 26px;
  background:
    radial-gradient(circle at 86% 20%, rgba(85, 194, 184, .18), transparent 25%),
    radial-gradient(circle at 64% 92%, rgba(118, 101, 168, .18), transparent 29%),
    linear-gradient(135deg, #0a2530 0%, #123f49 58%, #183c4d 100%);
  box-shadow: 0 24px 58px rgba(10, 34, 45, .17);
  color: #fff;
}

.constellation-banner::before {
  position: absolute;
  inset: 0;
  opacity: .55;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.72) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(94,210,198,.72) 0 1px, transparent 1.5px);
  background-position: 0 0, 23px 31px;
  background-size: 53px 53px, 79px 79px;
  content: "";
  mask-image: linear-gradient(90deg, transparent 4%, #000 48%, #000 100%);
}

.constellation-copy,
.constellation-map {
  position: relative;
  z-index: 1;
}

.constellation-copy {
  align-self: center;
  max-width: 560px;
}

.constellation-copy .eyebrow {
  color: #80d8ce;
}

.constellation-copy h2 {
  margin-bottom: 12px;
  color: #fff;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.08;
}

.constellation-copy p {
  max-width: 520px;
  margin-bottom: 20px;
  color: #c5dbdd;
}

.constellation-copy .button-row {
  justify-content: flex-start;
}

.constellation-map {
  min-height: 220px;
}

.constellation-node {
  position: absolute;
  z-index: 2;
  display: grid;
  min-width: 98px;
  min-height: 74px;
  place-items: center;
  padding: 11px 15px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 18px;
  background: rgba(9, 31, 40, .66);
  box-shadow: 0 14px 30px rgba(3, 18, 25, .24), inset 0 1px 0 rgba(255,255,255,.08);
  color: #fff;
  backdrop-filter: blur(9px);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.constellation-node::before {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 11px;
  height: 11px;
  border: 3px solid rgba(13, 42, 52, .86);
  border-radius: 50%;
  background: #71d1c4;
  box-shadow: 0 0 18px rgba(113, 209, 196, .9);
  content: "";
}

.constellation-node:hover {
  border-color: rgba(113, 209, 196, .68);
  background: rgba(13, 56, 66, .88);
  transform: translateY(-3px);
}

.constellation-node span {
  font-weight: 800;
  letter-spacing: -.01em;
}

.constellation-node small {
  color: #9fc2c6;
  font-size: .64rem;
}

.node-you { top: 35%; left: 4%; }
.node-soren { top: 4%; left: 43%; }
.node-merlin { right: 2%; bottom: 8%; }
.node-action { bottom: 0; left: 38%; }
.node-soren::before { background: #e6b85f; box-shadow: 0 0 18px rgba(230, 184, 95, .9); }
.node-merlin::before { background: #a590df; box-shadow: 0 0 18px rgba(165, 144, 223, .9); }
.node-action::before { background: #5dc79d; box-shadow: 0 0 18px rgba(93, 199, 157, .9); }

.constellation-line {
  position: absolute;
  z-index: 0;
  display: block;
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(113,209,196,.14), rgba(113,209,196,.68), rgba(255,255,255,.12));
}

.line-one { top: 47%; left: 18%; width: 38%; transform: rotate(-29deg); }
.line-two { top: 21%; left: 56%; width: 37%; transform: rotate(48deg); }
.line-three { bottom: 25%; left: 24%; width: 57%; transform: rotate(8deg); }

.module-guide {
  margin-bottom: 26px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.section-heading h2 {
  max-width: 690px;
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2vw, 1.62rem);
}

.section-heading > p {
  max-width: 430px;
  margin: 0;
  font-size: .78rem;
}

.module-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.module-guide-card {
  position: relative;
  display: flex;
  min-height: 222px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.module-guide-card:hover {
  border-color: #bdd6d8;
  box-shadow: 0 14px 34px rgba(16, 45, 58, .1);
  transform: translateY(-3px);
}

.module-guide-card.featured {
  border-color: #d5c59f;
  background: linear-gradient(155deg, #fff 35%, #fff9eb);
}

.guide-number {
  position: absolute;
  top: 16px;
  right: 17px;
  color: #b6c3c7;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.guide-icon {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  place-items: center;
  border-radius: 12px;
  font-size: 1.15rem;
  font-weight: 800;
}

.guide-icon.blue { background: var(--blue-soft); color: var(--blue); }
.guide-icon.teal { background: var(--teal-soft); color: var(--teal); }
.guide-icon.violet { background: var(--violet-soft); color: var(--violet); }
.guide-icon.green { background: var(--green-soft); color: var(--green); }
.guide-icon.coral { background: var(--coral-soft); color: var(--coral); }
.guide-icon.amber { background: var(--amber-soft); color: var(--amber); }

.module-guide-card > small {
  margin-bottom: 4px;
  color: var(--muted-2);
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.module-guide-card h3 {
  margin-bottom: 7px;
  font-size: 1.03rem;
}

.module-guide-card p {
  margin-bottom: 17px;
  font-size: .74rem;
}

.module-guide-card .text-button,
.module-guide-card .button {
  align-self: flex-start;
  margin-top: auto;
}

.ethical-offer {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(430px, 1.1fr);
  align-items: center;
  gap: 30px;
  margin-top: 26px;
  padding: 26px 30px;
  border: 1px solid #d8dced;
  border-radius: 20px;
  background: linear-gradient(135deg, #f9fbff, #f4f0fb);
}

.ethical-offer h2 {
  margin-bottom: 6px;
}

.ethical-offer p {
  margin-bottom: 0;
}

.offer-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.offer-preview > div {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid rgba(174, 179, 207, .5);
  border-radius: 13px;
  background: rgba(255,255,255,.78);
}

.offer-preview strong {
  margin: 10px 0 5px;
  font-size: .88rem;
}

.offer-preview small {
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.5;
}

.plan-pill {
  padding: 4px 8px;
  border-radius: 99px;
  font-size: .58rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.plan-pill.free { background: var(--green-soft); color: var(--green); }
.plan-pill.premium { background: var(--violet-soft); color: var(--violet); }

/* Merlin : personnage visible, sans envahir l'interface */
.merlin-character {
  display: grid;
  overflow: hidden;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 15px;
  background: radial-gradient(circle at 50% 35%, #2a5861, #0c2d38 72%);
}

.merlin-character img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.merlin-character.large {
  width: 124px;
  height: 124px;
  border-radius: 30px;
  box-shadow: 0 20px 40px rgba(6, 26, 35, .2);
}

/* Module CV détachable */
.studio-screen {
  max-width: none;
}

.studio-intro {
  align-items: center;
}

.studio-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.module-mark.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.studio-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
  padding: 12px 15px;
  border: 1px solid #cde2dd;
  border-radius: 13px;
  background: #f1f8f6;
}

.studio-notice > span:first-child {
  color: var(--green);
}

.studio-notice p {
  margin: 1px 0 0;
  font-size: .7rem;
}

.studio-sync-status {
  margin-left: auto;
  padding: 5px 9px;
  border-radius: 99px;
  background: #fff;
  color: var(--green);
  font-size: .65rem;
  font-weight: 750;
  white-space: nowrap;
}

.studio-frame-shell {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.studio-frame-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 44px;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fa;
}

.studio-frame-bar > span {
  display: flex;
  gap: 6px;
}

.studio-frame-bar i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c7d2d6;
}

.studio-frame-bar i:nth-child(2) { background: #dac68c; }
.studio-frame-bar i:nth-child(3) { background: #9ecdbb; }
.studio-frame-bar strong { font-size: .72rem; }
.studio-frame-bar small { justify-self: end; color: var(--muted-2); font-size: .62rem; }

#career-studio-frame {
  display: block;
  width: 100%;
  height: min(1040px, calc(100vh - 120px));
  min-height: 760px;
  border: 0;
  background: #f3f2ec;
}

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

@media (max-width: 1180px) {
  :root { --sidebar: 230px; }
  .constellation-banner { grid-template-columns: minmax(0, 1fr) minmax(330px, .8fr); }
  .module-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ethical-offer { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; }
  .merlin-hero { min-height: 200px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .two-column { grid-template-columns: minmax(0, 1fr) 300px; }
  .analysis-layout { grid-template-columns: 1fr; }
  .offer-input-panel { position: static; }
  .analysis-placeholder { min-height: 360px; }
  .prompt-layout { grid-template-columns: 1fr; }
  .prompt-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
  .prompt-settings .panel-heading,
  .prompt-settings .privacy-callout { grid-column: 1 / -1; }
}

@media (max-width: 920px) {
  .app-shell { display: block; }
  .workspace { display: block; }
  .sidebar {
    width: min(300px, 86vw);
    transform: translateX(-102%);
    transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: grid; }
  .topbar { padding: 12px 18px; }
  main { padding: 24px 18px 88px; }
  .constellation-banner { grid-template-columns: 1fr; }
  .constellation-map { min-height: 230px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 9px; }
  .save-indicator { display: none; }
  .two-column { grid-template-columns: 1fr; }
  .sticky-column { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-intro { align-items: flex-start; }
  .pilot-toolbar { flex-wrap: wrap; }
  .search-field { min-width: 100%; }
  .forge-select { grid-template-columns: 1fr; }
  .forge-readiness { justify-content: flex-start; padding-bottom: 0; }
  .privacy-grid { grid-template-columns: 1fr; }
  .privacy-grid p { min-height: 0; }
}

@media (max-width: 670px) {
  body { font-size: 14px; }
  .topbar { min-height: 68px; }
  .page-kicker { display: none; }
  .page-heading h1 { font-size: 1rem; }
  #demo-button { display: none; }
  .profile-button { width: 36px; height: 36px; }
  .constellation-banner { min-height: 0; padding: 24px 20px; border-radius: 20px; }
  .constellation-copy h2 { font-size: 1.65rem; }
  .constellation-map { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-height: 0; margin-top: 22px; }
  .constellation-node { position: relative; inset: auto; min-width: 0; min-height: 68px; border-radius: 14px; }
  .constellation-line { display: none; }
  .module-guide-grid { grid-template-columns: 1fr; }
  .module-guide-card { min-height: 0; }
  .ethical-offer { padding: 20px; }
  .offer-preview { grid-template-columns: 1fr; }
  .studio-actions { justify-content: flex-start; }
  .studio-actions .button { width: 100%; }
  .studio-notice { align-items: flex-start; }
  .studio-sync-status { display: none; }
  .studio-frame-bar { grid-template-columns: 1fr auto; }
  .studio-frame-bar strong { justify-self: end; }
  .studio-frame-bar small { display: none; }
  #career-studio-frame { min-height: 680px; height: calc(100vh - 96px); }
  .module-intro {
    display: grid;
  }
  .module-intro > div:first-child { gap: 12px; }
  .module-mark { width: 44px; height: 44px; border-radius: 12px; }
  .module-intro h2 { font-size: 1.24rem; }
  .completion-box { width: 100%; }
  .hero-grid,
  .metric-grid,
  .dashboard-grid,
  .result-grid { grid-template-columns: 1fr; }
  .objective-card,
  .merlin-hero { min-height: 0; padding: 22px; border-radius: 18px; }
  .merlin-hero { display: grid; }
  .metric-card { min-height: 96px; }
  .panel:not(.pilot-toolbar):not(.forge-select) { padding: 18px; }
  .field-grid.two,
  .sticky-column,
  .prompt-settings { grid-template-columns: 1fr; }
  .prompt-settings > * { grid-column: 1 !important; }
  .analysis-layout { grid-template-columns: minmax(0, 1fr); }
  .score-card { grid-template-columns: 1fr; text-align: center; }
  .score-ring { margin: 0 auto; }
  .score-legend { justify-content: center; }
  .score-component { grid-template-columns: 92px minmax(0, 1fr) 36px; }
  .filter-field { flex: 1; }
  .filter-field select { min-width: 0; }
  .pilot-toolbar .view-toggle { width: 100%; }
  .view-toggle button { flex: 1; }
  .forge-tabs { overflow-x: auto; }
  .forge-tabs button { white-space: nowrap; }
  .merlin-fab {
    min-width: 0;
    right: 14px;
    bottom: 14px;
    padding: 9px;
  }
  .merlin-fab > span:last-child { display: none; }
  .merlin-panel { right: 8px; bottom: 8px; width: calc(100vw - 16px); height: calc(100vh - 16px); }
  .modal-backdrop { padding: 12px; }
  .modal { max-height: calc(100vh - 24px); padding: 19px; }
  .button-row.split { justify-content: flex-start; }
}

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

@media print {
  .sidebar,
  .topbar,
  .merlin-fab,
  .merlin-panel,
  .module-intro,
  .prompt-settings,
  .forge-tabs,
  button {
    display: none !important;
  }
  .app-shell,
  .workspace,
  .prompt-layout {
    display: block;
  }
  main {
    padding: 0;
  }
  .screen {
    display: none !important;
  }
  .screen.active {
    display: block !important;
  }
  .panel {
    border: 0;
    box-shadow: none;
  }
}
