:root {
  --ink: #0f0e0d;
  --paper: #f5f2ee;
  --paper-dark: #ede9e3;
  --accent: #c8472b;
  --accent-light: #e8604a;
  --gold: #c9a84c;
  --muted: #7a7570;
  --white: #ffffff;
  --border: rgba(15, 14, 13, 0.12);
  --success: #2d7a4f;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", sans-serif;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ─── NAV ─── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  background: rgba(245, 242, 238, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: "Playfair Display", serif;
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.nav-logo span {
  color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-back {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}

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

/* ─── PROGRESS BAR ─── */
.progress-bar {
  height: 3px;
  background: var(--paper-dark);
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.5s ease;
  width: 0%;
}

/* ─── LAYOUT ─── */
.form-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 65px);
}

/* ─── SIDEBAR STEPS ─── */
.sidebar {
  background: var(--ink);
  padding: 2.5rem 1.75rem;
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-title {
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 242, 238, 0.3);
  margin-bottom: 1.25rem;
}

.step-btn {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  text-align: left;
  transition: background 0.2s;
  width: 100%;
}

.step-btn:hover {
  background: rgba(245, 242, 238, 0.06);
}

.step-btn.active {
  background: rgba(200, 71, 43, 0.15);
}

.step-btn.done .step-circle {
  background: var(--success);
  border-color: var(--success);
}

.step-btn.done .step-circle::after {
  content: "✓";
  font-size: 0.6rem;
  color: white;
}

.step-btn.partial .step-circle {
  background: var(--gold);
  border-color: var(--gold);
}

.step-btn.partial .step-circle::after {
  content: "–";
  font-size: 0.85rem;
  color: white;
  font-weight: bold;
}

.step-btn.partial .step-label {
  color: rgba(245, 242, 238, 0.6);
}

.step-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(245, 242, 238, 0.2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  color: rgba(245, 242, 238, 0.4);
  transition: all 0.25s;
}

.step-btn.active .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.step-label {
  font-size: 0.82rem;
  font-weight: 400;
  color: rgba(245, 242, 238, 0.45);
  line-height: 1.3;
  transition: color 0.2s;
}

.step-btn.active .step-label {
  color: rgba(245, 242, 238, 0.9);
  font-weight: 500;
}

.step-btn.done .step-label {
  color: rgba(245, 242, 238, 0.6);
}

.sidebar-divider {
  height: 1px;
  background: rgba(245, 242, 238, 0.07);
  margin: 0.75rem 0;
}

.sidebar-cta {
  margin-top: auto;
  padding-top: 2rem;
}

.btn-escolher {
  display: block;
  width: 100%;
  background: var(--accent);
  color: white;
  font-family: "DM Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0.875rem 1rem;
  border-radius: 3px;
  text-decoration: none;
  transition:
    background 0.2s,
    transform 0.2s;
}

.btn-escolher:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* ─── FORM AREA ─── */
.form-area {
  padding: 3rem 4rem;
  max-width: 860px;
}

.form-section {
  display: none;
  animation: fadeUp 0.4s ease forwards;
}

.form-section.active {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

.section-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.section-eyebrow {
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.section-desc {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.6;
}

/* ─── FIELDS ─── */
.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
}

.fields-grid.single {
  grid-template-columns: 1fr;
}

.fields-grid.triple {
  grid-template-columns: 1fr 1fr 1fr;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field.span-2 {
  grid-column: span 2;
}

label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

label .required {
  color: var(--accent);
  margin-left: 2px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea,
select {
  font-family: "DM Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.75rem 1rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  outline: none;
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 71, 43, 0.08);
}

textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 300;
  opacity: 0.8;
}

/* ─── REPEATABLE BLOCKS ─── */
.block-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.block-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  position: relative;
  transition: border-color 0.2s;
}

.block-item:hover {
  border-color: rgba(200, 71, 43, 0.3);
}

.block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.block-index {
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}

.btn-remove {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: "DM Sans", sans-serif;
}

.btn-remove:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px dashed rgba(200, 71, 43, 0.4);
  color: var(--accent);
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
}

.btn-add:hover {
  background: rgba(200, 71, 43, 0.05);
  border-style: solid;
}

/* ─── SKILLS / TAGS ─── */
.tags-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
  min-height: 48px;
  cursor: text;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.tags-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 71, 43, 0.08);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--paper-dark);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  color: var(--ink);
}

.tag-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  color: var(--muted);
  padding: 0;
  transition: color 0.15s;
}

.tag-remove:hover {
  color: var(--accent);
}

.tags-input {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0.2rem 0.3rem;
  font-size: 0.9rem;
  background: transparent;
  flex: 1;
  min-width: 120px;
}

/* ─── PROFILE PHOTO ─── */
.photo-upload-area {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.photo-preview {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--paper-dark);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.2s;
}

.photo-preview:hover {
  border-color: var(--accent);
}

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

.photo-preview span {
  font-size: 2rem;
}

.photo-upload-info {
  flex: 1;
}

.photo-upload-info p {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-upload:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#photoInput {
  display: none;
}

/* ─── LEVEL SELECT (idiomas/habilidades) ─── */
.level-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: end;
}

select.level-select {
  width: auto;
  min-width: 130px;
}

/* ─── NAVIGATION BUTTONS ─── */
.form-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.btn-prev {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.875rem 1.75rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-prev:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: white;
  font-family: "DM Sans", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.875rem 2rem;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
}

.btn-next:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

.btn-next svg,
.btn-prev svg {
  pointer-events: none;
}

/* ─── SAVE INDICATOR ─── */
.save-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.4s;
}

.save-indicator.show {
  opacity: 1;
}

.save-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

/* ─── MODEL CARDS (step 7) ─── */
.models-chooser {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  text-align: left;
}

.model-option {
  border: 2px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
  text-decoration: none;
  display: block;
  background: var(--white);
}

.model-option:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(200, 71, 43, 0.12);
}

.model-preview-area {
  height: 180px;
  position: relative;
  overflow: hidden;
  background: var(--paper-dark);
}

.model-preview-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.4s ease;
}

.model-option:hover .model-preview-area img {
  transform: scale(1.03);
}

.model-preview-area.no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    var(--paper-dark),
    var(--paper-dark) 6px,
    var(--paper) 6px,
    var(--paper) 12px
  );
}

.model-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.5;
}

.ph-icon-sm {
  font-size: 1.75rem;
}

.ph-label-sm {
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.model-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(200, 71, 43, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}

.model-option:hover .model-hover-overlay {
  opacity: 1;
}

.model-hover-overlay span {
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.model-option-info {
  padding: 1rem 1.1rem 1.1rem;
}

.model-option-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.model-option-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.badge-free-sm {
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--paper-dark);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

.badge-premium-sm {
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.35);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

.model-option-desc {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.model-option-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mtag {
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.15rem 0.5rem;
  background: var(--paper);
}

.final-section {
  text-align: center;
  padding: 3rem 0;
}

.final-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-8px);
  }

  40% {
    transform: translateX(8px);
  }

  60% {
    transform: translateX(-5px);
  }

  80% {
    transform: translateX(5px);
  }
}

.final-title {
  font-family: "Playfair Display", serif;
  font-weight: 900;
  font-size: 2.5rem;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.final-title em {
  font-style: italic;
  color: var(--accent);
}

.final-desc {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.7;
  max-width: 45ch;
  margin: 0 auto 3rem;
}

.final-note {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.final-note a {
  color: var(--accent);
}

/* ─── EXP TYPE TABS ─── */
.exp-type-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.exp-tab {
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.6rem 1.1rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.exp-tab:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.exp-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.never-worked-box {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.nw-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.never-worked-box strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

.never-worked-box p {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.6;
}

/* ─── CHECKBOX TOGGLE ─── */
.toggle-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toggle-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-field label {
  text-transform: none;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
  cursor: pointer;
}

/* ─── PROFILE SELECTOR ─── */
.profile-selector-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--ink);
  padding: 0.6rem 1rem 0.6rem 1.25rem;
  border-radius: 4px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.profile-selector-bar .ps-label {
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 242, 238, 0.45);
  white-space: nowrap;
  margin-right: 0.25rem;
}

.profile-btn {
  background: none;
  border: 1px solid rgba(245, 242, 238, 0.15);
  color: rgba(245, 242, 238, 0.5);
  font-family: "DM Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.profile-btn:hover {
  border-color: rgba(245, 242, 238, 0.4);
  color: rgba(245, 242, 238, 0.85);
}

.profile-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.profile-badge {
  display: inline-block;
  font-size: 0.65rem;
  background: rgba(245, 242, 238, 0.1);
  border-radius: 2px;
  padding: 0.1rem 0.4rem;
  font-family: "DM Mono", monospace;
  letter-spacing: 0.05em;
  margin-left: 0.2rem;
}

.profile-btn.active .profile-badge {
  background: rgba(255, 255, 255, 0.2);
}

/* ─── FIELD TOOLTIP ─── */
.field-tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper-dark);
  border: 1px solid var(--border);
  font-size: 0.6rem;
  color: var(--muted);
  cursor: help;
  margin-left: 0.4rem;
  flex-shrink: 0;
  font-style: normal;
  transition:
    background 0.15s,
    color 0.15s;
}

.tooltip-icon:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.tooltip-bubble {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--ink);
  color: var(--paper);
  font-family: "DM Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.5;
  padding: 0.6rem 0.9rem;
  border-radius: 4px;
  width: 240px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: normal;
}

.tooltip-bubble::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left: 0;
  border-right-color: var(--ink);
}

.tooltip-icon:hover + .tooltip-bubble,
.tooltip-icon:focus + .tooltip-bubble {
  opacity: 1;
}

/* ─── FIELD VALIDATION STATES ─── */
input.field-ok,
textarea.field-ok,
select.field-ok {
  border-color: var(--success) !important;
  box-shadow: 0 0 0 2px rgba(45, 122, 79, 0.1) !important;
}

input.field-error,
textarea.field-error,
select.field-error {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(200, 71, 43, 0.1) !important;
}

.field-msg {
  font-size: 0.72rem;
  font-weight: 400;
  margin-top: -0.25rem;
  display: none;
}

.field-msg.show {
  display: block;
}

.field-msg.ok {
  color: var(--success);
}

.field-msg.err {
  color: var(--accent);
}

/* char counter */
.char-counter {
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  color: var(--muted);
  text-align: right;
  margin-top: -0.25rem;
  transition: color 0.2s;
}

.char-counter.warn {
  color: var(--gold);
}

.char-counter.good {
  color: var(--success);
}

/* label row helper */
.label-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 0;
}

.label-row label {
  margin-bottom: 0;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .form-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .form-area {
    padding: 2rem 1.5rem;
    max-width: 100%;
  }

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

  .fields-grid.triple {
    grid-template-columns: 1fr 1fr;
  }

  .field.span-2 {
    grid-column: span 1;
  }

  .models-chooser {
    grid-template-columns: 1fr;
  }

  nav {
    padding: 1rem 1.5rem;
  }
}
