/* =============================================================
   style.css — Finploy Job Posting Page
   Responsive: phones (sm/md/lg), tablets, desktops
   ============================================================= */

/* ── RESET & ROOT ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy:        #0D1F3C;
  --navy-mid:    #1A3258;
  --navy-light:  #2A4A7F;
  --navy-hover:  #243B6B;
  --gold:        #C9A84C;
  --gold-light:  #E8C97A;
  --gold-pale:   #FAF3E0;
  --gold-border: #E0C87A;
  --white:       #FFFFFF;
  --surface:     #F2F5FA;
  --border:      #DDE3EE;
  --text:        #0D1F3C;
  --muted:       #718096;
  --success:     #1A7F5A;
  --success-bg:  #E6F5EE;
  --success-bd:  #9DD9BE;
  --info-bg:     #EEF3FF;
  --info-bd:     #C5D2F0;
  --info-text:   #2A4A8F;
  --warn-bg:     #FEF3C7;
  --warn-bd:     #FCD34D;
  --warn:        #B45309;
  --r:    8px;
  --rl:   12px;
  --rxl:  16px;

  /* Spacing scale */
  --sp-xs:  0.35rem;
  --sp-sm:  0.65rem;
  --sp-md:  1rem;
  --sp-lg:  1.5rem;
  --sp-xl:  2rem;
}

/* ── BASE ── */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--navy);
  min-height: 100vh;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── PAGE SHELL ── */
.shell {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ============================================================
   MOBILE NAV (hamburger bar — visible only on small screens)
   ============================================================ */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--navy);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  align-items: center;
  justify-content: space-between;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ── MOBILE DRAWER ── */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 55px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 190;
  background: linear-gradient(180deg, #0D1F3C 0%, #091628 100%);
  padding: 1.5rem 1.25rem;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
}
.mobile-drawer.open { transform: translateX(0); }
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgba(0,0,0,0.45);
}
.drawer-overlay.open { display: block; }

.mob-steps { margin-bottom: 1.5rem; }
.mob-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.85rem 0.75rem;
  border-radius: var(--r);
  cursor: pointer;
  transition: background 0.2s;
  opacity: 0.45;
}
.mob-step.active  { opacity: 1; background: rgba(201,168,76,0.1); }
.mob-step.done    { opacity: 0.65; }
.mob-step-num {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.5);
  flex-shrink: 0; transition: all 0.2s;
}
.mob-step.active .mob-step-num { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.mob-step.done   .mob-step-num { background: var(--navy-mid); border-color: var(--gold); color: var(--gold); }
.mob-step-title  { font-size: 14px; font-weight: 500; color: var(--white); }
.mob-step-desc   { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 2px; }
.mob-connector {
  width: 1px; height: 16px;
  background: rgba(255,255,255,0.08);
  margin: 0 auto 0 calc(0.75rem + 15px);
}
.mob-notice {
  font-size: 11px; color: rgba(255,255,255,0.28); line-height: 1.6;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 1.25rem;
}
.mob-notice strong {
  display: block; font-size: 9px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--gold); opacity: 0.8; margin-bottom: 4px;
}

/* ============================================================
   SIDEBAR (desktop)
   ============================================================ */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0D1F3C 0%, #091628 100%);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255,255,255,0.07);
  overflow-y: auto;
}

.sb-top { padding: 1.75rem 1.5rem 1.5rem; }

.logo { display: flex; align-items: center; gap: 10px; margin-bottom: 2rem; }
.logo-mark {
  width: 38px; height: 38px; background: var(--gold); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 700; color: var(--navy);
  box-shadow: 0 2px 8px rgba(201,168,76,0.4);
  flex-shrink: 0;
}
.logo-name { font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 500; color: var(--white); letter-spacing: 0.3px; }
.logo-sub  { font-size: 9px; color: var(--gold); letter-spacing: 1.8px; text-transform: uppercase; margin-top: -1px; opacity: 0.85; }

.sb-divider { height: 1px; background: rgba(255,255,255,0.07); margin: 0 1.5rem 1.25rem; }

.sb-label {
  font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,0.3); padding: 0 1.5rem; margin-bottom: 0.6rem;
}

.sb-step {
  display: flex; align-items: center; gap: 10px;
  padding: 0.65rem 1.5rem; cursor: pointer;
  opacity: 0.4; transition: opacity 0.2s, background 0.2s;
  position: relative;
}
.sb-step.active { opacity: 1; background: rgba(201,168,76,0.08); }
.sb-step.active::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; background: var(--gold); border-radius: 0 2px 2px 0;
}
.sb-step.done { opacity: 0.65; }

.sb-num {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.5);
  flex-shrink: 0; transition: all 0.2s;
}
.sb-step.active .sb-num { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.sb-step.done   .sb-num { background: var(--navy-mid); border-color: var(--gold); color: var(--gold); }

.sb-title { font-size: 13px; font-weight: 500; color: var(--white); }
.sb-desc  { font-size: 10px; color: rgba(255,255,255,0.35); margin-top: 1px; }

.sb-connector {
  width: 1px; height: 18px;
  background: rgba(255,255,255,0.08);
  margin: 0 auto 0 calc(1.5rem + 13px);
}

.sb-bottom {
  margin-top: auto;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.sb-note { font-size: 11px; color: rgba(255,255,255,0.28); line-height: 1.6; }
.sb-note strong {
  display: block; font-size: 9px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--gold); opacity: 0.8; margin-bottom: 4px;
}

/* ============================================================
   CONTENT AREA
   ============================================================ */
.content {
  flex: 1;
  background: var(--surface);
  overflow-y: auto;
  min-width: 0;
}

/* ── TOP BAR ── */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 1rem;
}
.topbar-title { font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 500; color: var(--navy); }
.topbar-sub   { font-size: 12px; color: var(--muted); margin-top: 1px; }
.topbar-right { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ── BUTTONS ── */
.btn {
  padding: 6px 16px; border-radius: var(--r);
  font-size: 12px; font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer; border: 1.5px solid transparent;
  transition: all 0.15s; white-space: nowrap;
  display: inline-flex; align-items: center;
}
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover { border-color: var(--navy-light); color: var(--navy); }
.btn-navy  { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-mid); }
.btn-gold  { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 700; font-size: 13px; padding: 7px 20px; }
.btn-gold:hover { background: var(--gold-light); }
.btn-gold:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── PROGRESS TABS ── */
.progress-strip {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.progress-strip::-webkit-scrollbar { display: none; }

.ptab {
  display: flex; align-items: center; gap: 7px;
  padding: 0.7rem 1.1rem;
  font-size: 12px; font-weight: 500; color: var(--muted);
  border-bottom: 2.5px solid transparent;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.ptab.active { color: var(--navy); border-bottom-color: var(--gold); }
.ptab.done   { color: var(--success); }
.pnum {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--border); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0; transition: all 0.15s;
}
.ptab.active .pnum { background: var(--navy); color: var(--white); }
.ptab.done   .pnum { background: var(--success); color: var(--white); }

/* ── MAIN GRID ── */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 268px;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  max-width: 1100px;
}

/* ── FORM CARD ── */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--rxl);
  overflow: hidden;
}

/* ── HERO BANNER ── */
.form-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1E3D6B 100%);
  padding: 1.25rem 1.75rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 3px solid var(--gold);
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-eyebrow {
  font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold); opacity: 0.9; margin-bottom: 4px;
}
.hero-title { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 500; color: var(--white); }
.hero-sub   { font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 2px; }
.hero-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.tpl-btn {
  padding: 6px 13px; border-radius: var(--r);
  border: 1.5px solid var(--gold); background: transparent;
  color: var(--gold); font-size: 11px; font-weight: 600; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: all 0.15s; white-space: nowrap;
}
.tpl-btn:hover { background: var(--gold); color: var(--navy); }

.status-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 12px;
  background: rgba(26,127,90,0.2); border: 1px solid rgba(157,217,190,0.3);
  font-size: 11px; font-weight: 500; color: #6EDBB0;
  white-space: nowrap;
}
.sdot { width: 6px; height: 6px; border-radius: 50%; background: #6EDBB0; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── TEMPLATE DRAWER ── */
.tpl-drawer {
  display: none;
  background: var(--gold-pale);
  border-bottom: 1px solid var(--gold-border);
  padding: 1.1rem 1.75rem;
}
.tpl-drawer.open { display: block; }
.tpl-drawer-title {
  font-size: 10px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: #8A6A10; margin-bottom: 0.75rem;
}
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 7px;
}
.tcard {
  background: var(--white); border: 1.5px solid var(--gold-border); border-radius: var(--r);
  padding: 0.6rem 0.85rem; cursor: pointer; transition: all 0.15s;
}
.tcard:hover { border-color: var(--navy); background: #F0F4FF; transform: translateY(-1px); }
.tc-title { font-size: 12px; font-weight: 600; color: var(--navy); }
.tc-sub   { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* ── FORM BODY ── */
.form-body { padding: 1.5rem 1.75rem; }

/* ── SECTION ── */
.section { margin-bottom: 1.5rem; }
.sec-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 1rem; padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.sec-icon {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.sec-title { font-size: 13px; font-weight: 600; color: var(--navy); font-family: 'Playfair Display', serif; }
.badge { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; letter-spacing: 0.2px; margin-left: auto; white-space: nowrap; }
.b-req { background: var(--gold-pale); color: #8A6A10; border: 1px solid var(--gold-border); }
.b-opt { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.b-sg  { background: var(--info-bg); color: var(--info-text); border: 1px solid var(--info-bd); }

/* ── GRID LAYOUTS ── */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.span2 { grid-column: 1 / -1; }

/* ── FIELD ── */
.f { display: flex; flex-direction: column; gap: 4px; }
.f label { font-size: 10px; font-weight: 700; color: var(--navy); letter-spacing: 0.5px; text-transform: uppercase; }
.req { display: inline-block; width: 5px; height: 5px; background: var(--gold); border-radius: 50%; margin-left: 3px; vertical-align: middle; margin-bottom: 2px; }
.opt { font-size: 10px; color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: 4px; }
.hint { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.5; }

/* ── INPUTS ── */
input, select, textarea {
  font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--text);
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--r);
  padding: 0.55rem 0.8rem; outline: none; width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(42,74,127,0.1);
}
input::placeholder, textarea::placeholder { color: #B5BFCF; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%23718096' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
textarea { resize: vertical; min-height: 145px; line-height: 1.65; }

.rr { display: flex; align-items: center; gap: 6px; }
.rr input { flex: 1; }
.rsep { font-size: 12px; color: var(--muted); flex-shrink: 0; }

/* ── PILLS ── */
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.pl {
  display: block; padding: 4px 12px;
  border: 1.5px solid var(--border); border-radius: 14px;
  font-size: 12px; font-weight: 500; color: var(--muted);
  cursor: pointer; transition: all 0.15s;
}
.pill input:checked + .pl      { background: var(--navy); border-color: var(--navy); color: var(--white); }
.cpl input:checked + .pl       { background: var(--navy); border-color: var(--navy); color: var(--white); }
.pill:hover .pl                { border-color: var(--navy-light); color: var(--navy); }

/* ── CHIPS / TAG INPUT ── */
.tag-area {
  border: 1.5px solid var(--border); border-radius: var(--r);
  padding: 5px; display: flex; flex-wrap: wrap; gap: 5px;
  cursor: text; min-height: 40px;
  transition: border-color 0.15s;
}
.tag-area:focus-within { border-color: var(--navy-light); box-shadow: 0 0 0 3px rgba(42,74,127,0.1); }
.chip {
  background: #E8EDF6; color: var(--navy); border-radius: 4px;
  padding: 3px 7px; font-size: 12px; font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}
.chip .rm { cursor: pointer; opacity: 0.4; font-size: 13px; line-height: 1; color: var(--navy); }
.chip .rm:hover { opacity: 1; }
.tag-in {
  border: none !important; outline: none !important; padding: 3px 5px !important;
  font-size: 12px; flex: 1; min-width: 100px;
  background: transparent !important; box-shadow: none !important;
}

/* ── TOGGLE ── */
.tog-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.65rem 0.85rem; border: 1.5px solid var(--border); border-radius: var(--r);
  cursor: pointer; transition: border-color 0.15s; margin-bottom: 6px;
  gap: 1rem;
}
.tog-row:hover { border-color: var(--gold); }
.tl { font-size: 13px; font-weight: 500; color: var(--navy); }
.ts { font-size: 11px; color: var(--muted); margin-top: 1px; }
.tog { position: relative; width: 38px; height: 21px; flex-shrink: 0; }
.tog input { opacity: 0; width: 0; height: 0; position: absolute; }
.ttrack { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #DDE3EE; border-radius: 11px; transition: background 0.2s; }
.tthumb { position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; background: var(--white); border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.tog input:checked ~ .ttrack { background: var(--navy); }
.tog input:checked ~ .tthumb { transform: translateX(17px); }

/* ── RICH TEXT EDITOR ── */
.rte-bar {
  display: flex; gap: 2px; padding: 5px 8px;
  border: 1.5px solid var(--border); border-bottom: none;
  border-radius: var(--r) var(--r) 0 0;
  background: var(--surface); flex-wrap: wrap; align-items: center;
}
.rb {
  padding: 3px 7px; border-radius: 4px; border: none; background: transparent;
  cursor: pointer; font-size: 11px; font-weight: 600; color: var(--muted);
  font-family: 'DM Sans', sans-serif; transition: background 0.1s;
}
.rb:hover { background: var(--border); color: var(--navy); }
.rsepv { width: 1px; height: 15px; background: var(--border); margin: 0 2px; }
.rte-body {
  border: 1.5px solid var(--border); border-top: none;
  border-radius: 0 0 var(--r) var(--r); min-height: 150px;
  padding: 0.85rem; outline: none; font-size: 13px; line-height: 1.7; color: var(--text);
}
.rte-body:focus { border-color: var(--navy-light); box-shadow: 0 0 0 3px rgba(42,74,127,0.1); }
.rte-body:empty::before { content: "Write the role overview, key responsibilities and requirements…"; color: #C0C9D8; pointer-events: none; }
.wc { font-size: 11px; color: var(--muted); text-align: right; margin-top: 3px; }

/* ── DIVIDER ── */
.div { height: 1px; background: var(--border); margin: 1.25rem 0; }

/* ── NOTICES ── */
.notice {
  border-radius: var(--r); padding: 0.75rem 0.9rem;
  font-size: 12px; line-height: 1.6; margin-top: 0.85rem;
}
.notice strong { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.n-gold  { background: var(--gold-pale); border: 1px solid var(--gold-border); color: #7A5F0C; }
.n-gold strong { color: #5A4509; }
.n-info  { background: var(--info-bg); border: 1px solid var(--info-bd); color: var(--info-text); }
.n-info strong { color: #1A3A8F; }

/* ── CHECKLIST ── */
.chk-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 0.65rem 0.85rem; border: 1.5px solid var(--border); border-radius: var(--r);
  margin-bottom: 6px; cursor: pointer; transition: border-color 0.15s;
}
.chk-item:hover { border-color: var(--gold); }
.chk-item input[type=checkbox] {
  width: 15px; height: 15px; border-radius: 3px; flex-shrink: 0;
  accent-color: var(--navy); margin-top: 2px; cursor: pointer;
}
.ci-title { font-size: 13px; font-weight: 500; color: var(--navy); }
.ci-sub   { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ── FOOTER ── */
.form-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(90deg, rgba(13,31,60,0.02), transparent);
  flex-wrap: wrap;
  gap: 0.75rem;
}
.ft-hint { font-size: 12px; color: var(--muted); }
.ft-hint strong { color: var(--navy); }
.ft-actions { display: flex; gap: 8px; }

/* ── RIGHT PANEL ── */
.rpanel { display: flex; flex-direction: column; gap: 1.1rem; }

.pcard { background: var(--white); border: 1px solid var(--border); border-radius: var(--rl); overflow: hidden; }
.ph {
  padding: 0.75rem 1.1rem; border-bottom: 1px solid var(--border);
  font-size: 10px; font-weight: 700; color: var(--navy);
  letter-spacing: 0.8px; text-transform: uppercase;
  display: flex; align-items: center; gap: 6px;
}
.ph-gold { background: var(--navy); color: var(--gold); border-bottom: 2px solid var(--gold); }
.pb { padding: 1rem 1.1rem; }

/* ── PROGRESS ── */
.prog-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.prog-track  { height: 6px; background: var(--surface); border-radius: 3px; overflow: hidden; border: 1px solid var(--border); }
.prog-fill   { height: 100%; background: linear-gradient(90deg, var(--navy), var(--gold)); border-radius: 3px; transition: width 0.35s; }

.vbadge {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px; border-radius: var(--r); margin-top: 5px;
  font-size: 12px; font-weight: 500;
}
.vb-ok { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-bd); }
.vb-no { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }

/* ── WHY LIST ── */
.why-item { display: flex; gap: 9px; margin-bottom: 0.75rem; align-items: flex-start; }
.wi-icon {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--navy); display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0; margin-top: 1px;
}
.wi-title { font-size: 12px; font-weight: 600; color: var(--navy); }
.wi-sub   { font-size: 11px; color: var(--muted); margin-top: 1px; line-height: 1.5; }

/* ── TIME CARD ── */
.time-big { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 600; color: var(--navy); }
.time-sub { font-size: 11px; color: var(--muted); line-height: 1.6; margin-top: 4px; }
.time-sub span { color: var(--navy); font-weight: 600; }

/* ── TAB PANELS ── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================

   Breakpoint scale:
   xs:  < 400px   (small phones — iPhone SE)
   sm:  400–600px (medium phones)
   md:  600–768px (large phones / phablets)
   lg:  768–1024px (tablets)
   xl:  > 1024px  (desktop — default styles above)
   ============================================================ */

/* ── TABLET (≤ 1024px) ── */
@media (max-width: 1024px) {
  .main-grid {
    grid-template-columns: 1fr 230px;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
  }
  .sidebar { width: 210px; }
}

/* ── TABLET PORTRAIT (≤ 860px) — collapse sidebar & right panel ── */
@media (max-width: 860px) {
  .sidebar { display: none; }
  .mobile-nav { display: flex; }
  .mobile-drawer { display: block; }

  .content { padding-top: 55px; } /* offset for fixed mobile nav */

  .topbar {
    padding: 0.75rem 1rem;
    position: sticky;
    top: 55px;
  }
  .topbar-title { font-size: 16px; }
  .topbar-sub   { font-size: 11px; }

  .progress-strip { padding: 0 1rem; }

  .main-grid {
    grid-template-columns: 1fr;
    padding: 1.25rem 1rem;
    gap: 1.25rem;
    max-width: 100%;
  }

  /* Show rpanel stacked below on tablet */
  .rpanel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .rpanel .pcard:last-child { grid-column: 1 / -1; }

  .form-body { padding: 1.25rem 1.25rem; }

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

/* ── LARGE PHONES (≤ 640px) ── */
@media (max-width: 640px) {
  .topbar-sub { display: none; }
  .topbar-right .btn-ghost:first-child { display: none; } /* hide Save Draft, keep Preview */

  .form-hero {
    padding: 1rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-right { width: 100%; }

  .form-body { padding: 1rem; }

  .g2 { grid-template-columns: 1fr; }
  .g3 { grid-template-columns: 1fr; }

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

  .rpanel {
    grid-template-columns: 1fr;
  }
  .rpanel .pcard:last-child { grid-column: auto; }

  .form-footer {
    padding: 0.85rem 1rem;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.6rem;
  }
  .ft-actions {
    justify-content: flex-end;
    width: 100%;
  }
  .ft-hint { font-size: 11px; }

  .rte-bar { gap: 1px; }
  .rb { padding: 3px 5px; font-size: 10px; }
}

/* ── MEDIUM PHONES (≤ 480px) ── */
@media (max-width: 480px) {
  .topbar { padding: 0.7rem 0.85rem; gap: 0.5rem; }
  .topbar-title { font-size: 15px; }

  .progress-strip { padding: 0 0.5rem; }
  .ptab { padding: 0.6rem 0.6rem; font-size: 11px; gap: 4px; }

  .form-hero { padding: 0.85rem 1rem; }
  .hero-title { font-size: 15px; }

  .tpl-drawer { padding: 0.9rem 1rem; }
  .tpl-grid { grid-template-columns: 1fr; }

  .form-body { padding: 0.9rem 0.85rem; }

  .sec-head { gap: 6px; }
  .sec-title { font-size: 12px; }

  .pills { gap: 5px; }
  .pl { font-size: 11px; padding: 4px 10px; }

  .btn { font-size: 11px; padding: 6px 12px; }
  .btn-gold { font-size: 12px; padding: 6px 14px; }

  .chk-item { padding: 0.55rem 0.7rem; gap: 8px; }
  .ci-title { font-size: 12px; }
  .ci-sub   { font-size: 10px; }

  .tog-row { padding: 0.55rem 0.75rem; }
  .tl { font-size: 12px; }
  .ts { font-size: 10px; }

  .pcard .ph { font-size: 9px; padding: 0.65rem 0.9rem; }
  .pb { padding: 0.85rem 0.9rem; }

  .time-big { font-size: 24px; }
}

/* ── SMALL PHONES (≤ 380px — iPhone SE, Galaxy A) ── */
@media (max-width: 380px) {
  .main-grid { padding: 0.85rem 0.75rem; gap: 1rem; }

  .form-hero { padding: 0.75rem 0.9rem; }
  .hero-eyebrow { font-size: 8px; }
  .hero-title { font-size: 14px; }
  .hero-sub { font-size: 10px; }
  .status-pill { font-size: 10px; padding: 3px 8px; }

  .tpl-btn { font-size: 10px; padding: 5px 10px; }

  .form-body { padding: 0.8rem 0.75rem; }

  .sec-icon { width: 24px; height: 24px; font-size: 11px; }

  .badge { font-size: 9px; padding: 2px 6px; }

  .rte-body { min-height: 120px; font-size: 12px; }

  .ft-actions { flex-wrap: wrap; gap: 6px; }
  .btn-gold, .btn-navy, .btn-ghost { width: 100%; justify-content: center; }
}

/* ── LANDSCAPE PHONES ── */
@media (max-width: 860px) and (orientation: landscape) {
  .content { padding-top: 48px; }
  .mobile-nav { padding: 0.5rem 1rem; }
  .mobile-drawer { top: 48px; }
  .topbar { top: 48px; }
  .form-hero { padding: 0.9rem 1.5rem; }
  .form-body { padding: 1rem 1.5rem; }
  .main-grid { padding: 1rem 1.5rem; }
}

/* ── LARGE DESKTOP (≥ 1280px) ── */
@media (min-width: 1280px) {
  .main-grid {
    grid-template-columns: 1fr 290px;
    max-width: 1200px;
    padding: 2rem 2.5rem;
  }
  .sidebar { width: 260px; }
}

/* ── PRINT ── */
@media print {
  .sidebar, .mobile-nav, .topbar-right, .ft-actions, .rpanel { display: none !important; }
  .content { padding-top: 0; }
  .main-grid { grid-template-columns: 1fr; padding: 1rem; }
  .form-card { border: none; box-shadow: none; }
}
