/* ═══════════════════════════════════════════════════════════════
   AIOS DEVELOP — Projekta anketa
   Design: studio_minimal — balta, 1px borders, Helvetica Neue
   ═══════════════════════════════════════════════════════════════ */

/* ─── Tokens ─────────────────────────────────────────────────── */
:root {
  --accent:      #0A0A0A;
  --accent-bg:   #F2F2F2;
  --accent-dark: #000000;
  --bg:          #FFFFFF;
  --surface:     #FFFFFF;
  --sidebar-bg:  rgba(255,255,255,0.96);
  --text:        #0A0A0A;
  --text-2:      #555555;
  --text-3:      #999999;
  --border:      #E5E5E5;
  --border-2:    #F0F0F0;
  --green:       #2D7A3A;
  --red:         #C0392B;
  --brand:       #3D5C3A;
  --brand-bg:    rgba(61,92,58,0.06);
  --s1: #F7F7F7; --s2: #F0F0F0; --s3: #D9D9D9; --s4: #BBBBBB; --s5: #888888;
  --grad-silver: linear-gradient(135deg, var(--s2) 0%, var(--s3) 100%);
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:   0 12px 40px rgba(0,0,0,0.10);
  --r-sm:        4px;
  --r-md:        6px;
  --r-lg:        8px;
  --r-xl:        10px;
  --sidebar-w:   248px;
  --topbar-h:    52px;
  --navbar-h:    72px;
  --font:        'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono:   'JetBrains Mono', 'Courier New', monospace;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.5;
  display: flex; flex-direction: column; min-height: 100dvh;
  padding-top: calc(var(--topbar-h) + 4px); /* header height + progress bar */
  padding-bottom: var(--navbar-h);
}

/* ─── APP HEADER ─────────────────────────────────────────────── */
#app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.app-header-inner {
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; gap: 0;
  max-width: 1080px; margin: 0 auto; width: 100%;
}


.header-logo {
  display: flex; align-items: center; gap: 7px;
  text-decoration: none; flex-shrink: 0;
}
.header-wm {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em; color: var(--text);
}

.header-center {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
}

.header-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

.header-label {
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-3);
}
.header-step {
  font-size: 12px; color: var(--text-3);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ─── LANGUAGE SWITCHER ──────────────────────────────────────── */
.lang-wrap { display: flex; gap: 2px; margin-right: 4px; }
.lang-btn {
  font-size: 12px; font-weight: 500; padding: 4px 8px; border: none; background: none;
  color: var(--text-3); cursor: pointer; border-radius: 6px; font-family: var(--font);
  transition: color .15s, background .15s; letter-spacing: 0.03em;
}
.lang-btn:hover { color: var(--text-2); background: rgba(0,0,0,0.05); }
.lang-btn.active { color: var(--text); background: rgba(0,0,0,0.07); font-weight: 600; }

/* ─── HEADER HOME LINK ───────────────────────────────────────── */
.header-home {
  font-size: 12px; font-weight: 500; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 0; padding: 5px 14px;
  text-decoration: none; transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap; letter-spacing: 0.02em;
}
.header-home:hover { background: var(--text); color: #fff; border-color: var(--text); }

/* ─── PROGRESS ───────────────────────────────────────────────── */
#progress-track {
  height: 4px;
  background: var(--border-2);
}
#progress-fill {
  height: 100%;
  background: var(--brand);
  transition: width 0.5s var(--ease);
  width: 0%;
}

/* ─── VIEWPORT ───────────────────────────────────────────────── */
#viewport {
  flex: 1;
  display: flex;
  align-items: flex-start;
  max-width: calc(var(--sidebar-w) + 720px);
  margin: 0 auto;
  width: 100%;
  overflow-x: hidden;
}

/* ─── SIDEBAR NAV ────────────────────────────────────────────── */
#sidebar-nav {
  width: var(--sidebar-w);
  flex-shrink: 0;
  padding: 16px 8px;
  margin: 16px 0 16px 0;
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  height: calc(100vh - var(--topbar-h) - 32px - var(--navbar-h));
  overflow-y: auto;
  -ms-overflow-style: none; scrollbar-width: none;
  background: var(--surface);
  border-radius: 0;
  border: 1px solid var(--border);
  box-shadow: none;
}
#sidebar-nav::-webkit-scrollbar { display: none; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .15s;
  margin-bottom: 1px;
  user-select: none;
}
.nav-item:hover { background: var(--s1); }
.nav-item.active { background: var(--brand-bg); }

.nav-letter {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: var(--text-3);
  flex-shrink: 0;
  transition: all .2s;
  position: relative;
}
.nav-item.active .nav-letter {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}
.nav-item.done .nav-letter {
  border-color: var(--green);
  background: var(--green);
  font-size: 0; color: transparent;
}
.nav-item.done .nav-letter::after {
  content: '';
  display: block;
  width: 12px; height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6.5L4.5 9L10 3' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}
.nav-check { display: none; }

.nav-item.ec-badge:not(.active):not(.done) .nav-letter {
  background: rgba(255,149,0,0.1);
  border-color: rgba(255,149,0,0.3);
  color: #C47B00;
}
.nav-title {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.3;
  transition: color .15s;
}
.nav-item.active .nav-title { color: var(--brand); font-weight: 600; }
.nav-item.done .nav-title { color: var(--text-2); }

/* ─── Sidebar guide link (apakšā) ───────────────────────────── */
.sidebar-guide-wrap {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-2);
}
.sidebar-guide-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: background .15s;
}
.sidebar-guide-link:hover { background: var(--brand-bg); }
.sidebar-guide-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(61,92,58,0.3);
  background: rgba(61,92,58,0.08);
  color: var(--brand);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: var(--font);
  transition: all .15s;
}
.sidebar-guide-link:hover .sidebar-guide-icon {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}
.sidebar-guide-text {
  font-size: 12.5px;
  color: var(--brand);
  font-weight: 500;
}

#section-wrap {
  flex: 1;
  min-width: 0;
  max-width: 680px;
  padding: 40px 32px 40px 24px;
}

/* ─── Section ────────────────────────────────────────────────── */
.section-header {
  margin-bottom: 32px;
}

.section-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--s5);
  margin-bottom: 6px;
}

.section-title {
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ─── Question Card ──────────────────────────────────────────── */
.q-card {
  background: var(--surface);
  border-radius: 0;
  padding: 24px;
  margin-bottom: 0;
  margin-top: -1px;
  border: 1px solid var(--border);
  transition: border-color 0.2s var(--ease);
}
.q-card:focus-within { border-color: var(--text-3); }
.q-card.has-error {
  border-color: var(--red) !important;
  border-width: 2px !important;
  background: rgba(192, 57, 43, 0.03) !important;
}
.q-card.has-error .q-label { color: var(--red); }
.q-card.has-error::after {
  content: '← Obligāts lauks';
  display: block;
  font-size: 11px;
  color: var(--red);
  margin-top: 8px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
html[lang="en"] .q-card.has-error::after {
  content: '← Required field';
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.q-label-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

.q-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.q-guide-btn {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-bg);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(61,92,58,0.28);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  margin-top: 1px;
  cursor: pointer;
}
.q-guide-btn:hover {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  transform: scale(1.1);
}

.q-required {
  color: var(--red);
  font-size: 12px;
  font-weight: 400;
}

.q-hint {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 14px;
  line-height: 1.45;
  background: rgba(61,92,58,0.04);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  border-left: 3px solid var(--brand);
}

/* ─── Text Input ─────────────────────────────────────────────── */
.q-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.q-input::placeholder { color: var(--text-3); }
.q-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(61,92,58,0.10);
  background: white;
}

.q-textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.5;
}

/* ─── Chips (multi-select) ───────────────────────────────────── */
.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: white;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  user-select: none;
  position: relative;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--text);
  color: var(--text);
  background: var(--s1);
}

.chip.selected {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}

.chip-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 2px;
  background: rgba(255,149,0,0.12);
  color: #C47B00;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.chip.selected .chip-badge {
  background: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
}

.chip-sub {
  font-size: 11px;
  opacity: 0.65;
  font-weight: 400;
}
.chip.selected .chip-sub { opacity: 0.85; }

/* ─── Visual Chip Cards ──────────────────────────────────────── */
.chips-visual {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.chip-visual {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 18px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  user-select: none;
  min-height: 92px;
}
.chip-visual:hover {
  border-color: var(--brand);
  background: var(--brand-bg);
}
.chip-visual.selected {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: none;
}
.chip-visual-icon {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 6px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}
.chip-visual-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}
.chip-visual.selected .chip-visual-label { color: #fff; }
.chip-visual.selected .chip-visual-icon  { color: rgba(255,255,255,0.75); }
.chip-visual.selected .chip-visual-desc  { color: rgba(255,255,255,0.6); }
.chip-visual-desc {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.3;
}
/* Adaptīvie stāvokļi */
.chip-visual--recommended {
  border-color: var(--brand);
  background: var(--brand-bg);
}
.chip-visual--less {
  opacity: 0.38;
}
.chip-visual--less:hover {
  opacity: 0.85;
}
.chip-visual-hint {
  font-size: 9px;
  color: var(--brand);
  letter-spacing: 0.06em;
  line-height: 1;
  margin-top: auto;
  padding-top: 4px;
}
@media (max-width: 600px) {
  .chips-visual { grid-template-columns: repeat(2, 1fr); }
  .chip-visual  { padding: 14px 12px; min-height: 76px; }
  .chip-visual-icon { font-size: 18px; }
}

/* ─── Radio rows ─────────────────────────────────────────────── */
.radio-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  user-select: none;
  background: white;
}

.radio-row:hover { border-color: var(--brand); background: var(--brand-bg); }

.radio-row.selected {
  border-color: var(--brand);
  background: var(--brand-bg);
}

.radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.radio-row.selected .radio-dot {
  border-color: var(--brand);
  background: var(--brand);
}

.radio-dot-fill {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: white;
  opacity: 0;
  transition: opacity 0.15s;
}

.radio-row.selected .radio-dot-fill { opacity: 1; }

.radio-letter {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  min-width: 18px;
  flex-shrink: 0;
  transition: color .15s;
  font-variant-numeric: tabular-nums;
}
.radio-row.selected .radio-letter { color: var(--text-2); }

.radio-text { font-size: 14px; color: var(--text); flex: 1; line-height: 1.3; }
.radio-sub  { font-size: 12px; color: var(--text-2); margin-top: 1px; }

/* ─── Custom input (cits) ────────────────────────────────────── */
.custom-input-wrap {
  margin-top: 12px;
  display: none;
}
.custom-input-wrap.visible { display: block; }

/* ─── BOTTOM NAV ─────────────────────────────────────────────── */
#nav-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(245,245,247,0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border-2);
  height: var(--navbar-h);
}

.nav-bar-inner {
  height: 100%; display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
  max-width: 840px; margin: 0 auto; width: 100%;
}

#step-counter {
  font-size: 13px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  flex: 1;
  text-align: center;
}

/* ─── APP FOOTER ─────────────────────────────────────────────── */
#app-footer {
  border-top: 1px solid var(--border-2);
  background: var(--surface);
  padding: 0;
}

.app-footer-inner {
  max-width: 840px; margin: 0 auto; width: 100%;
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}

.footer-copy {
  font-size: 11px; color: var(--text-3);
}

.footer-links {
  display: flex; gap: 16px;
}

.footer-links a {
  font-size: 11px; color: var(--text-3); text-decoration: none;
  transition: color .15s;
}
.footer-links a:hover { color: var(--text-2); }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--text);
  color: white;
  border: none;
  border-radius: 0;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.btn-primary:hover { background: #000; }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: transparent;
  color: var(--text-2);
  border: none;
  border-radius: 0;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-ghost:hover { background: var(--s1); color: var(--text); }
.btn-ghost:disabled { opacity: 0.3; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--text-2); background: white; }

.btn-ghost-sm {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  transition: color 0.15s;
}
.btn-ghost-sm:hover { color: var(--text); }

/* Generate button */
.btn-generate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 18px;
  background: var(--text);
  color: white;
  border: none;
  border-radius: var(--r-xl);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  margin-top: 8px;
  letter-spacing: -0.01em;
}
.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  background: #000;
}
.btn-generate:active { transform: translateY(0); }
.btn-generate.loading {
  background: var(--s5);
  animation: gradientShift 1.5s ease infinite alternate;
  cursor: not-allowed;
}

@keyframes gradientShift {
  from { filter: brightness(1); }
  to   { filter: brightness(1.1); }
}

/* ─── Review section ─────────────────────────────────────────── */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.review-card {
  background: white;
  border-radius: var(--r-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.review-card-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}

.review-card-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  word-break: break-word;
}

.review-card-value.empty {
  color: var(--text-3);
  font-style: italic;
  font-weight: 400;
}

/* ─── Transitions ────────────────────────────────────────────── */
.section-enter { animation: slideIn 0.3s var(--ease) forwards; }
.section-exit  { animation: slideOut 0.25s var(--ease) forwards; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-24px); }
}

.section-enter-back { animation: slideInBack 0.3s var(--ease) forwards; }
@keyframes slideInBack {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── Success overlay ────────────────────────────────────────── */
#success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.3s var(--ease);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.success-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 40px;
  max-width: 440px;
  width: calc(100% - 40px);
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.4s var(--ease);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.success-icon { margin-bottom: 20px; }
.success-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.success-subtitle { font-size: 15px; color: var(--text-2); margin-bottom: 20px; }

.success-path {
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 24px;
  word-break: break-all;
  text-align: left;
}

#success-price {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--s1);
  border-radius: var(--r-sm);
  padding: 5px 12px;
  margin-bottom: 20px;
}

#success-file-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.success-hint {
  font-size: 13px;
  color: var(--text-2);
  background: var(--s1);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  text-align: left;
  line-height: 1.5;
}

.success-hint code {
  font-family: var(--font-mono);
  background: var(--s2);
  color: var(--text);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}

/* ─── MODALS ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 400; display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface); border-radius: var(--r-xl); padding: 36px;
  max-width: 520px; width: 100%; max-height: 80vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(.96) translateY(10px); transition: transform .2s;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal h2 { font-size: 20px; font-weight: 700; letter-spacing: -.03em; margin-bottom: 18px; }
.modal-body { font-size: 14px; color: var(--text-2); line-height: 1.7; }
.modal-body h3 { font-size: 13px; font-weight: 600; color: var(--text); margin: 14px 0 5px; }
.modal-close {
  float: right; background: var(--bg); border: none; border-radius: 50%;
  width: 28px; height: 28px; font-size: 14px; cursor: pointer;
  color: var(--text-2); display: flex; align-items: center; justify-content: center;
  font-family: var(--font); transition: background .15s;
}
.modal-close:hover { background: var(--border-2); color: var(--text); }

/* ─── GUIDE OVERLAY ──────────────────────────────────────────── */
#guide-overlay {
  position: fixed; inset: 0;
  /* No backdrop-filter here — moved to ::before so iframe stays in its own layer */
  z-index: 500;
  display: flex; align-items: stretch; justify-content: center;
  padding: 40px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
/* Backdrop blur on separate pseudo-element — children unaffected */
#guide-overlay::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}
#guide-overlay.open { opacity: 1; pointer-events: all; }
#guide-frame-wrap {
  position: relative; z-index: 1;
  flex: 1; max-width: 940px;
  background: #fff;
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.32), 0 0 0 1px rgba(255,255,255,0.12);
  display: flex; flex-direction: column;
  /* No opacity — parent overlay handles fade; opacity:0 defers iframe paint */
  transform: translateY(16px);
  transition: transform .3s;
}
#guide-overlay.open #guide-frame-wrap { transform: translateY(0); }
#guide-frame {
  width: 100%; flex: 1; border: none; display: block; min-height: 0;
  transform: translateZ(0);
  will-change: scroll-position;
}
#guide-overlay-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,0.14); border: 1px solid rgba(255,255,255,0.18);
  cursor: pointer; color: var(--text); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; z-index: 10; font-family: var(--font);
}
#guide-overlay-close:hover { background: rgba(0,0,0,0.28); }
@media (max-width: 700px) {
  #guide-overlay { padding: 16px; }
  #guide-frame-wrap { border-radius: 14px; }
}

/* ─── Utilities ──────────────────────────────────────────────── */
.hidden { display: none !important; }
.divider { height: 1px; background: var(--border-2); margin: 8px 0; }

/* ─── Section notes card ─────────────────────────────────────── */
.q-card-notes {
  border: 1.5px dashed var(--border-2);
  background: transparent;
}
.q-label-notes {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.01em;
}

/* ─── File upload zone ───────────────────────────────────────── */
.upload-zone {
  border: 1.5px dashed var(--border-2);
  border-radius: var(--r-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: transparent;
  user-select: none;
}
.upload-zone:hover {
  border-color: var(--text-2);
  background: var(--s1);
}
.upload-zone-icon {
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--text-3);
}
.upload-zone-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 4px;
}
.upload-zone-hint {
  font-size: 12px;
  color: var(--text-3);
}

.upload-file-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.upload-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--s1);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: 13px;
}
.upload-file-icon { font-size: 15px; flex-shrink: 0; }
.upload-file-name {
  flex: 1;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upload-file-size {
  color: var(--text-3);
  font-size: 12px;
  flex-shrink: 0;
}
.upload-file-remove {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s;
  flex-shrink: 0;
  font-family: var(--font);
}
.upload-file-remove:hover { color: var(--text); }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 800px) {
  #sidebar-nav { display: none; }
  #section-wrap { padding: 32px 20px 32px; }
}
@media (max-width: 600px) {
  .app-header-inner { padding: 0 16px; }
  .header-center { display: none; }
  .nav-bar-inner { padding: 0 16px; }
  #section-wrap { padding: 24px 16px 24px; }
  .review-grid { grid-template-columns: 1fr; }
  .app-footer-inner { flex-direction: column; gap: 8px; align-items: flex-start; }
}
@media (max-width: 420px) {
  .lang-wrap { display: none; }
}
