/* KhảoSát.ResearchSTAT - signed-in area: avatar, user menu, account sidebar, forms with icons, tooltips, confirmation dialog. */

/* avatar */
.av { display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #E0E7FF; }
.av-txt { background: linear-gradient(135deg, #3B1FD6, #1A00AA 55%, #F97316 160%); color: #fff; font-weight: 700; letter-spacing: .02em; line-height: 1; user-select: none; }
.av-xl { box-shadow: 0 0 0 4px #fff, 0 10px 30px rgba(26,0,170,.22); }

/* header: user menu */
.user-btn { padding: 4px 10px 4px 4px !important; border: 1px solid #E4E2FB !important; border-radius: 99px !important; background: #fff !important; gap: 8px !important; }
.user-btn .av { box-shadow: none; }
.user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--ink); }
.dd-user .dd-menu { left: auto; right: 0; transform: translateY(6px); min-width: 300px; }
.dd-user:hover .dd-menu, .dd-user.open .dd-menu, .dd-user:focus-within .dd-menu { transform: none; }
.um-head { display: flex; gap: 12px; align-items: center; padding: 10px 10px 14px; margin-bottom: 6px; border-bottom: 1px solid #EEECFB; }
.um-head b { display: block; color: var(--ink); line-height: 1.3; }
.um-head small { display: block; color: var(--muted); font-size: .8rem; word-break: break-all; }
.um-head .chip { margin: 6px 0 0; font-size: .72rem; }
.dd-user form { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid #EEECFB; }
.um-out { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: none; font: 600 .92rem var(--font); color: var(--red); cursor: pointer; text-align: left; }
.um-out:hover { background: #FEF2F2; }
@media (max-width: 1180px) {
  .user-btn { width: 100%; border-radius: 12px !important; padding: 8px 10px !important; }
  .user-name { max-width: none; }
  .dd-user .dd-menu { transform: none; }
  .um-head { padding: 8px 4px 12px; }
}

/* signed-in layout */
.app { grid-template-columns: 264px minmax(0, 1fr); gap: 28px; transition: grid-template-columns .25s ease; }
.app-main { min-width: 0; }
.page-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.page-head h1 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin: 0 0 4px; }
.page-head p { margin: 0; }
.ph-ic { flex-shrink: 0; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, #EEF0FF, #E0E7FF); color: var(--navy); box-shadow: inset 0 0 0 1px #DDE1FF; }

/* account sidebar */
.side { position: sticky; top: 86px; display: flex; flex-direction: column; max-height: calc(100vh - 104px); background: #fff; border: 1px solid #E8E6F8; border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.side-head { display: flex; align-items: center; gap: 8px; padding: 14px 12px 14px 14px; background: linear-gradient(135deg, #F7F6FF, #EEF0FF); border-bottom: 1px solid #EEECFB; }
.side-user { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; text-decoration: none; color: inherit; border-radius: 12px; }
.side-user b { display: block; color: var(--ink); font-size: .95rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user small { display: block; color: var(--orange); font-size: .76rem; font-weight: 600; }
.side-user .st { min-width: 0; }
.side-x { flex-shrink: 0; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #DDE1FF; border-radius: 11px; background: #fff; color: var(--navy); cursor: pointer; transition: background .15s, transform .15s; }
.side-x:hover { background: var(--tint); transform: translateY(-1px); }
.side-x .when-min, .side-x .when-mobile { display: none; }
.side-nav { display: grid; gap: 2px; padding: 8px 10px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #DDE1F0 transparent; }
.side-min .side-nav { scrollbar-width: none; }
.side .group { display: block; margin: 12px 0 4px; padding: 0 10px; font-size: .7rem; font-weight: 700; color: #94A3B8; text-transform: uppercase; letter-spacing: .09em; }
.side .group:first-child { margin-top: 4px; }
.side-nav a, .side-out button { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; text-decoration: none; color: #334155; font: 500 .93rem var(--font); white-space: nowrap; transition: background .15s, color .15s; }
.side .si { flex-shrink: 0; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #F4F5FB; color: #64748B; transition: background .15s, color .15s; }
.side-nav a:hover { background: #F7F6FF; color: var(--navy); }
.side-nav a:hover .si { background: #E8E9FF; color: var(--navy); }
.side-nav a.on { background: linear-gradient(90deg, #EEF0FF, #F7F6FF); color: var(--navy); font-weight: 600; }
.side-nav a.on .si { background: var(--navy); color: #fff; box-shadow: 0 6px 14px rgba(26,0,170,.25); }
.side-nav a.on::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--orange); }
.side-out { margin: 0; padding: 8px 10px 12px; border-top: 1px solid #EEECFB; }
.side-out button { width: 100%; border: 0; background: none; cursor: pointer; color: var(--red); }
.side-out button .si { background: #FEF2F2; color: var(--red); }
.side-out button:hover { background: #FEF2F2; }
.side-open, .side-backdrop { display: none; }

/* collapsed to icons (desktop only) */
@media (min-width: 901px) {
  .side-min .app { grid-template-columns: 78px minmax(0, 1fr); }
  .side-min .side .st { display: none; }
  .side-min .side-head { flex-direction: column; padding: 12px 8px; }
  .side-min .side-user { justify-content: center; flex: none; }
  .side-min .side .group { height: 1px; margin: 8px 8px; padding: 0; background: #EEECFB; }
  .side-min .side-nav { padding: 8px; }
  .side-min .side-nav a, .side-min .side-out button { justify-content: center; padding: 6px; }
  .side-min .side-nav a.on::before { left: -8px; }
  .side-min .side-out { padding: 8px; }
  .side-min .side-x .when-open { display: none; }
  .side-min .side-x .when-min { display: block; }
}

/* phones and tablets: slide-in drawer */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 18px; }
  .side-open { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 8px 10px 8px 14px; border: 1px solid #E4E2FB; border-radius: 14px; background: linear-gradient(135deg, #F7F6FF, #fff); font: 600 .95rem var(--font); color: var(--navy); cursor: pointer; box-shadow: var(--shadow); }
  .side-open .av { margin-left: auto; box-shadow: none; }
  .side { position: fixed; z-index: 70; top: 0; left: 0; bottom: 0; width: min(310px, 86vw); max-height: none; border-radius: 0 22px 22px 0; transform: translateX(-105%); transition: transform .28s cubic-bezier(.2,.8,.2,1); box-shadow: 0 30px 80px rgba(15,23,42,.3); }
  .side.open { transform: none; }
  .side-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(15,23,42,.45); backdrop-filter: blur(2px); animation: fadeIn .2s; }
  .side-x .when-open, .side-x .when-min { display: none !important; }
  .side-x .when-mobile { display: block !important; }
  .side-lock body { overflow: hidden; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* role chips */
.rchip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: .76rem; font-weight: 600; margin: 2px 4px 2px 0; white-space: nowrap; }
.r-admin { background: #EDE9FE; color: #5B21B6; } .r-customer { background: #E0F2FE; color: #075985; }
.r-respondent { background: #DCFCE7; color: #166534; } .r-ctv { background: #FFEDD5; color: #9A3412; }

/* personal information */
.profile-hero { display: flex; gap: 26px; align-items: center; padding: 26px; margin-bottom: 20px; background: radial-gradient(600px 220px at 100% 0%, #EEF0FF, transparent 70%), radial-gradient(400px 200px at 0% 120%, #FFF1E6, transparent 70%), #fff; }
.ph-avatar { position: relative; flex-shrink: 0; }
.ph-cam { position: absolute; right: 2px; bottom: 2px; width: 38px; height: 38px; margin: 0; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: #fff; border: 3px solid #fff; cursor: pointer; box-shadow: 0 6px 16px rgba(249,115,22,.35); transition: transform .15s; }
.ph-cam:hover { transform: scale(1.08); }
.ph-info h2 { margin: 0 0 2px; font-size: 1.4rem; }
.ph-info > p { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; word-break: break-all; }
.ph-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding: 0; color: var(--muted); font-size: .86rem; }
.ph-meta li { display: flex; align-items: center; gap: 6px; }
.ph-meta .ic { color: #94A3B8; }
@media (max-width: 640px) { .profile-hero { flex-direction: column; text-align: center; padding: 22px 16px; } .ph-info > p, .ph-meta { justify-content: center; } }
.grid-acc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 20px; align-items: start; }
@media (max-width: 1080px) { .grid-acc { grid-template-columns: minmax(0, 1fr); } }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin: 0 0 16px; }
.card-title .ic { color: var(--navy); }
.avatar-form { display: grid; gap: 12px; margin-bottom: 12px; }
.drop { display: flex; align-items: center; gap: 14px; margin: 0; padding: 16px; border: 2px dashed #C7D2FE; border-radius: 16px; background: #FAFAFF; cursor: pointer; transition: border-color .15s, background .15s; font-weight: 400; }
.drop:hover, .drop.over { border-color: var(--navy-2); background: #F1F0FF; }
.drop.has { border-style: solid; border-color: #A7F3D0; background: #F0FDF4; }
.drop b { display: block; color: var(--ink); font-size: .93rem; }
.drop small { display: block; color: var(--muted); font-size: .8rem; }
.drop-prev { flex-shrink: 0; }
.drop-err { margin: 0; color: var(--red); font-size: .86rem; }
.drop-err:empty { display: none; }

/* fields with a leading icon */
.ifield { position: relative; }
.ifield > .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #94A3B8; pointer-events: none; transition: color .15s; }
.ifield > input, .ifield > select { padding-left: 42px; }
.ifield:focus-within > .ic { color: var(--navy-2); }
.ifield.sm > .ic { left: 11px; }
.ifield.sm > input { min-height: 38px; padding: 6px 10px 6px 34px; font-size: .9rem; }
.ifield.grow { flex: 1; min-width: 180px; }
input:disabled, input[readonly] { background: #F8FAFC; color: #64748B; }
.opt { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 99px; background: #F1F5F9; color: #64748B; font-size: .72rem; font-weight: 500; vertical-align: 1px; }

/* "i" tooltip */
.tip { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 4px; vertical-align: -3px; border-radius: 50%; background: #E0E7FF; color: var(--navy); cursor: help; outline: none; }
.tip > i { font: 700 italic 11.5px/1 Georgia, "Times New Roman", serif; }
.tip:hover, .tip:focus-visible, .tip.open { background: var(--navy); color: #fff; }
.tip:focus-visible { box-shadow: 0 0 0 3px #C7D2FE; }
.tip-box { --dx: 0px; position: absolute; z-index: 45; bottom: calc(100% + 10px); left: 50%; width: max-content; max-width: min(300px, 80vw); padding: 10px 13px; border-radius: 12px; background: #1E1B4B; color: #E0E7FF; font: 400 .83rem/1.55 var(--font); text-align: left; text-transform: none; letter-spacing: 0; white-space: normal; box-shadow: 0 14px 34px rgba(15,23,42,.28); display: none; transform: translate(calc(-50% + var(--dx)), 0); }
.tip-box::after { content: ""; position: absolute; top: 100%; left: calc(50% - var(--dx)); margin-left: -6px; border: 6px solid transparent; border-top-color: #1E1B4B; }
.tip-box a { color: #FDBA74; }
.tip.below .tip-box { bottom: auto; top: calc(100% + 10px); }
.tip.below .tip-box::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #1E1B4B; }
.tip:hover .tip-box, .tip:focus .tip-box, .tip.open .tip-box { display: block; animation: tipIn .16s ease-out; }
@keyframes tipIn { from { opacity: 0; margin-bottom: -4px; } to { opacity: 1; margin-bottom: 0; } }

/* project form */
.wizard { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 20px; padding: 0; }
.wizard li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #F8FAFC; border: 1px solid var(--line); color: #64748B; font-size: .86rem; font-weight: 600; }
.wizard span { width: 24px; height: 24px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: #E2E8F0; color: #475569; font-size: .78rem; }
.wizard li.on { background: #EEF0FF; border-color: #DDE1FF; color: var(--navy); }
.wizard li.on span { background: var(--navy); color: #fff; }
@media (max-width: 640px) { .wizard { grid-template-columns: repeat(2, 1fr); } }
.fs { display: grid; gap: 16px; padding: 22px; border: 1px solid #E8E6F8; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.fs legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; padding: 0 0 14px; margin-bottom: 2px; border-bottom: 1px solid #F1F0FB; }
.fs legend b { display: block; font-size: 1.05rem; color: var(--ink); }
.fs legend small { display: block; font-weight: 400; font-size: .84rem; color: var(--muted); }
.fs legend + * { clear: both; }
.fs-ic { flex-shrink: 0; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, var(--navy-2), var(--navy)); color: #fff; box-shadow: 0 8px 18px rgba(26,0,170,.22); }
.plat-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; color: var(--muted); font-size: .8rem; }
.plat-row .pi { display: inline-flex; width: 20px; height: 20px; }
.plat-row .pi svg { width: 20px; height: 20px; }
.plat-row span:not(.pi) { margin-right: 8px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { position: relative; margin: 0; font-weight: 500; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid #DDE1F0; border-radius: 99px; background: #fff; color: #334155; font-size: .88rem; cursor: pointer; transition: all .15s; }
.pick span::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid #CBD5E1; background: #fff center/10px no-repeat; transition: all .15s; }
.pick label:hover span { border-color: #A5B4FC; background: #FAFAFF; }
.pick input:checked + span { border-color: var(--navy); background: #EEF0FF; color: var(--navy); font-weight: 600; }
.pick input:checked + span::before { border-color: var(--navy); background-color: var(--navy); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E"); }
.pick input:focus-visible + span { box-shadow: 0 0 0 3px #C7D2FE; }
details.box summary { display: flex; align-items: center; gap: 8px; list-style: none; }
details.box summary::-webkit-details-marker { display: none; }
details.box summary::after { content: "+"; margin-left: auto; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: var(--tint); color: var(--navy); font-weight: 700; }
details.box[open] summary::after { content: "−"; }
details.box summary .ic { color: var(--navy); }
.commit { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; background: #F7F6FF; border: 1px solid #ECEAFD; }
.commit.opt-box { background: #FFFBF5; border-color: #FDE7CF; }
.commit .check { font-size: .92rem; }
.quote-card { position: sticky; top: 86px; border-radius: 20px; overflow: hidden; background: #fff; border: 1px solid #E4E2FB; box-shadow: 0 20px 50px rgba(26,0,170,.12); }
.qc-head { padding: 20px 22px; background: radial-gradient(400px 160px at 100% 0%, rgba(249,115,22,.35), transparent 70%), linear-gradient(135deg, #2A10C9, #1A00AA); color: #fff; }
.qc-label { display: flex; align-items: center; gap: 6px; font-size: .84rem; color: #C7D2FE; }
.qc-head .quote-total { color: #fff; font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; }
.qc-body { padding: 16px 20px 20px; display: grid; gap: 12px; }
.qc-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .86rem; color: #475569; }
.qc-lines li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 6px; border-bottom: 1px dashed #E2E8F0; }
.qc-lines li b { color: var(--ink); white-space: nowrap; }
.qc-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #EEF0FF; }
.qc-total b[data-total] { color: var(--navy); font-size: 1.2rem; }
.qc-reward { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #FFF7ED; color: #9A3412; font-size: .86rem; }
.qc-reward .ic { color: var(--orange); flex-shrink: 0; }
.qc-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .84rem; color: #475569; }
.qc-notes li { display: flex; align-items: center; gap: 8px; }
.qc-notes .ic { color: var(--green); flex-shrink: 0; }
@media (max-width: 900px) { .quote-card { position: static; } }

/* admin: accounts */
.search { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.search .ifield { flex: 1; min-width: 220px; max-width: 460px; }
.search input[type=search] { width: 100%; min-height: 44px; padding: 10px 12px 10px 42px; border: 1px solid #CBD5E1; border-radius: 10px; font: inherit; }
.ulist { display: grid; gap: 12px; }
.ucard { border: 1px solid #E8E6F8; border-radius: 16px; background: #fff; box-shadow: var(--shadow); transition: box-shadow .2s, border-color .2s; }
.ucard:hover, .ucard.open { border-color: #D4D7FB; box-shadow: 0 10px 30px rgba(26,0,170,.1); }
.ucard.locked { background: #FCFCFD; }
.ucard.locked .av { filter: grayscale(1); opacity: .6; }
.uc-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 16px; }
.uc-id b { color: var(--ink); }
.uc-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--muted); font-size: .82rem; }
.uc-sub .ic { color: #94A3B8; }
.uc-roles { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; max-width: 280px; }
.uc-roles .badge { gap: 4px; }
@media (max-width: 760px) { .uc-main { grid-template-columns: auto minmax(0, 1fr); } .uc-roles { grid-column: 1 / -1; justify-content: flex-start; max-width: none; } .uc-toggle { grid-column: 1 / -1; } }
.uc-panel { display: grid; gap: 14px; padding: 14px 16px 16px; border-top: 1px solid #F1F0FB; background: #FAFAFF; border-radius: 0 0 16px 16px; }
.uc-panel[hidden] { display: none; }
.uc-h { display: block; margin-bottom: 8px; font-size: .74rem; font-weight: 700; color: #64748B; text-transform: uppercase; letter-spacing: .07em; }
.tgl { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px 6px 6px; border: 1px solid #DDE1F0; border-radius: 99px; background: #fff; font: 600 .86rem var(--font); color: #475569; cursor: pointer; transition: all .15s; }
.tgl-dot { position: relative; width: 34px; height: 20px; border-radius: 99px; background: #CBD5E1; transition: background .2s; }
.tgl-dot::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.tgl.on { border-color: #C7D2FE; color: var(--navy); background: #EEF0FF; }
.tgl.on .tgl-dot { background: var(--navy); }
.tgl.on .tgl-dot::after { transform: translateX(14px); }
.tgl:hover { border-color: #A5B4FC; }
.empty { display: grid; place-items: center; gap: 6px; padding: 40px; color: var(--muted); text-align: center; }

/* confirmation dialog */
.cfm { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.cfm[hidden] { display: none; }
.cfm-bg { position: absolute; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s; }
.cfm-box { position: relative; width: min(440px, 100%); padding: 26px 24px 20px; border-radius: 22px; background: #fff; box-shadow: 0 30px 80px rgba(15,23,42,.35); text-align: center; opacity: 0; transform: translateY(14px) scale(.97); transition: opacity .2s, transform .22s cubic-bezier(.2,.8,.2,1); }
.cfm.show .cfm-bg { opacity: 1; }
.cfm.show .cfm-box { opacity: 1; transform: none; }
.cfm-ic { width: 56px; height: 56px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: #EEF0FF; color: var(--navy); box-shadow: 0 0 0 8px #F7F6FF; }
.cfm.danger .cfm-ic { background: #FEE2E2; color: var(--red); box-shadow: 0 0 0 8px #FEF2F2; }
.cfm-box h3 { margin: 0 0 6px; font-size: 1.15rem; }
.cfm-box p { margin: 0 0 20px; color: #475569; font-size: .95rem; }
.cfm-act { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cfm-act .btn { width: 100%; }
.cfm-open body { overflow: hidden; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(220,38,38,.28); }
.btn-red:hover { background: #B91C1C; }
.btn.is-busy { opacity: .7; pointer-events: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
@media (prefers-reduced-motion: reduce) { .side, .cfm-box, .cfm-bg, .tip-box, .app { transition: none; } }

/* ===== round 3: sizing, spacing, separators, occupations, date presets ===== */
/* whole site 1.5px smaller: every rem follows the root size */
html { font-size: 14.5px; }
body { font-size: 1rem; }

/* header navigation: more air between items */
.nav { gap: 6px; }
.nav a, .nav .dd-btn { padding: 9px 14px; }
.nav > form, .nav > .dd { margin-left: 2px; }
.nav a.btn-primary { margin-left: 6px; padding: 9px 18px; }
@media (max-width: 1380px) and (min-width: 1181px) { .nav { gap: 4px; } .nav a, .nav .dd-btn { padding: 8px 10px; } }
/* dropdown items: the icon stays visible on hover (white on navy) */
.nav .dd-menu a .dd-ic .ic { color: var(--navy); }
.nav .dd-menu a:hover .dd-ic, .nav .dd-menu a.on .dd-ic { background: var(--navy); }
.nav .dd-menu a:hover .dd-ic .ic, .nav .dd-menu a.on .dd-ic .ic { color: #fff; }
.dd-menu a { gap: 14px !important; padding: 12px !important; }
.dd-menu a + a { margin-top: 4px; }
.dd-menu a b { display: block; color: var(--ink); }
.dd-menu a small { display: block; color: var(--muted); font-size: .82rem; }

/* page titles in the signed-in area */
.page-head { align-items: center; gap: 18px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid #EEECFB; }
.page-head h1 { margin: 0; }
.page-head p { margin-top: 4px; }
.ph-ic { width: 52px; height: 52px; border-radius: 16px; }
.actions > .page-head { border-bottom: 0; padding-bottom: 0; }

/* the one separator used everywhere instead of a middle dot */
.sep { display: inline-block; width: 5px; height: 5px; margin: 0 9px; vertical-align: middle; transform: rotate(45deg) translateY(-1px); border-radius: 1.5px; background: linear-gradient(135deg, var(--orange), #FDBA74); opacity: .85; }

/* occupations grouped by field */
.occ { display: grid; gap: 10px; }
.occ-g { padding: 12px 14px; border: 1px solid #EEECFB; border-radius: 14px; background: #FCFCFF; }
.occ-h { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: .78rem; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .06em; }
.occ-h .ic { color: var(--navy); }
.occ .pick span { padding: 7px 13px; font-size: .86rem; }
.hard { font-style: normal; color: var(--orange); font-size: .8em; margin-left: 2px; }
.occ-note { margin: 0; font-size: .8rem; color: var(--muted); }

/* quick deadline choices */
.dpre { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dchip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border: 1px solid #DDE1F0; border-radius: 99px; background: #fff; font: 500 .8rem var(--font); color: #475569; cursor: pointer; transition: all .15s; }
.dchip .ic { color: #94A3B8; }
.dchip:hover { border-color: #A5B4FC; color: var(--navy); }
.dchip.on { border-color: var(--navy); background: #EEF0FF; color: var(--navy); font-weight: 600; }
.dchip.on .ic { color: var(--navy); }
.dchip.urgent.on { border-color: var(--orange); background: #FFF7ED; color: #9A3412; }
.dchip.urgent.on .ic { color: var(--orange); }
.dchip.clear { color: #94A3B8; }

/* ===== round 4 ===== */
html { font-size: 14px; }

/* the quote stays in view while the form scrolls (pricing page and new project) */
#calc { align-items: start; }
#calc > div:last-child, .quote-card { position: sticky; top: 88px; align-self: start; }
@media (max-width: 900px) { #calc > div:last-child, .quote-card { position: static; } }

/* choices laid out in even columns */
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 8px; }
.pick label { display: flex; }
.pick span { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 12px; border-radius: 12px; line-height: 1.35; }
.pick span::before { flex-shrink: 0; width: 16px; height: 16px; border-radius: 5px; }
.pick .hard { margin-left: auto; padding-left: 6px; }
.occ .pick span { padding: 8px 12px; font-size: .9rem; }
.occ-g { padding: 14px 16px 16px; }
@media (max-width: 560px) { .pick { grid-template-columns: minmax(0, 1fr); } }

/* quick deadline choices: one even row of tiles */
.dpre { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-top: 10px; }
.dchip { justify-content: center; gap: 6px; min-height: 40px; padding: 6px 10px; border-radius: 12px; border: 1px solid #E2E4F3; background: #F8F9FE; font-size: .84rem; font-weight: 600; color: #475569; }
.dchip:hover { background: #fff; border-color: #A5B4FC; color: var(--navy); box-shadow: 0 4px 12px rgba(26,0,170,.08); }
.dchip.on { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 8px 18px rgba(26,0,170,.22); }
.dchip.on .ic { color: #fff; }
.dchip.urgent { color: #C2410C; }
.dchip.urgent .ic { color: var(--orange); }
.dchip.urgent.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.dchip.urgent.on .ic { color: #fff; }
.dchip.clear { background: #fff; border-style: dashed; color: #64748B; }
.dchip.clear.on { background: #F1F5F9; border-color: #CBD5E1; color: #334155; box-shadow: none; }
.dchip.clear.on .ic { color: #334155; }

/* page titles: the icon sits inside a soft panel, away from the edges */
.page-head { padding: 18px 22px; border: 1px solid #ECEAFD; border-radius: 20px; background: linear-gradient(135deg, #F8F7FF, #fff 70%); box-shadow: var(--shadow); gap: 18px; }
.page-head .ph-ic { margin-left: 2px; }
.actions > .page-head { padding: 0; border: 0; background: none; box-shadow: none; }

/* ===== round 5: links, money, detailed profile ===== */
/* links: never underlined; they light up in colour on hover, focus and click */
a, a:hover, a:focus, a:active, a:visited { text-decoration: none !important; }
a { transition: color .15s, background-color .15s, box-shadow .15s; }
:where(a:not(.btn)):hover, :where(a:not(.btn)):focus-visible { color: var(--orange); }
:where(a:not(.btn)):active { color: #C2410C; }
/* links inside running text: bold, then a soft orange highlight */
:where(p, li, td, figcaption, blockquote, .hint, .tip-box, .callout, .bcall, .check, .auth-foot, .muted, .small, .lead, .crumbs) a:not(.btn):not(.bmore):not(.bcat):not(.pg) {
  font-weight: 600; color: var(--navy); border-radius: 5px; padding: 0 2px; margin: 0 -2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
:where(p, li, td, figcaption, blockquote, .hint, .callout, .bcall, .check, .auth-foot, .muted, .small, .lead, .crumbs) a:not(.btn):not(.bmore):not(.bcat):not(.pg):hover,
:where(p, li, td, figcaption, blockquote, .hint, .callout, .bcall, .check, .auth-foot, .muted, .small, .lead, .crumbs) a:not(.btn):not(.bmore):not(.bcat):not(.pg):focus-visible { color: #C2410C; background: #FFEDD5; }
:where(p, li, td, figcaption, blockquote, .hint, .callout, .bcall, .check, .auth-foot, .muted, .small, .lead, .crumbs) a:not(.btn):not(.bmore):not(.bcat):not(.pg):active { color: #fff; background: var(--orange); }
.tip-box a { color: #FDBA74 !important; background: none !important; }
.tip-box a:hover { color: #fff !important; }
.bcard h2 a, .bcard h3 a { background: none !important; transition: color .2s; }
.bcard:hover h2 a, .bcard:hover h3 a, .bcard h2 a:focus-visible { color: var(--navy-2); }
.bcard h2 a:hover, .bcard h3 a:hover { color: var(--orange); }
.bp-nav a:hover b, .bp-nav a:focus-visible b { color: var(--orange); }

/* money: thousands separators while typing, unit beside the box */
.money { position: relative; display: flex; align-items: stretch; max-width: 100%; }
.money input { flex: 1; min-width: 0; padding-right: 64px !important; font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .01em; }
.money .unit { position: absolute; right: 6px; top: 6px; bottom: 6px; display: grid; place-items: center; min-width: 46px; padding: 0 10px; border-radius: 8px; background: #EEF0FF; color: var(--navy); font-weight: 700; font-size: .86rem; pointer-events: none; }
.money.w220 { width: 220px; } .money.w200 { width: 200px; }
.money.sm input { min-height: 38px; font-size: .9rem; }
.money.sm .unit { top: 4px; bottom: 4px; min-width: 40px; font-size: .78rem; }
.money input:focus + .unit { background: var(--navy); color: #fff; }

/* respondent detailed profile */
.pf-meter { margin-bottom: 18px; padding: 18px 20px; }
.pfm-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.pfm-top b { color: var(--ink); }
.pfm-pct { font-size: 1.5rem; font-weight: 800; color: var(--navy); }
.pfm-bar { height: 10px; border-radius: 99px; background: #EEF0FF; overflow: hidden; }
.pfm-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--navy), #7C3AED 60%, var(--orange)); transition: width .6s ease; }
.pf-meter p { margin: 10px 0 0; }
.trait { padding: 14px 16px; border: 1px solid #EEECFB; border-radius: 14px; background: #FCFCFF; }
.trait + .trait { margin-top: 2px; }
.trait-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 700; color: var(--ink); font-size: .92rem; }
.trait-h .ic { color: var(--navy); }
.trait-h .opt { font-style: normal; }
.pick input[type=radio] + span::before { border-radius: 50%; }
.pick input[type=radio]:checked + span::before { background-image: none; box-shadow: inset 0 0 0 3px #fff; }
.adv .trait { margin-top: 10px; background: #fff; }
.consent-box { padding: 14px 16px 14px 44px !important; border: 1px solid #ECEAFD; border-radius: 14px; background: #F8F7FF; }
.consent-box input { left: 16px !important; top: 16px !important; }
.adv .pick, .trait .pick { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.split .occ .pick { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
@media (max-width: 560px) { .adv .pick, .trait .pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* redemption: method cards and their detail panels */
.methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .methods { grid-template-columns: minmax(0, 1fr); } }
.mcard { position: relative; margin: 0; }
.mcard input { position: absolute; opacity: 0; }
.mcard span { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; padding: 12px 8px; border: 1.5px solid #E2E4F3; border-radius: 14px; background: #fff; text-align: center; font-size: .86rem; font-weight: 600; color: #475569; cursor: pointer; transition: all .15s; }
.mcard b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--tint); color: var(--navy); }
.mcard:hover span { border-color: #A5B4FC; }
.mcard input:checked + span { border-color: var(--navy); background: #F5F4FF; color: var(--navy); box-shadow: 0 0 0 3px rgba(26,0,170,.08); }
.mcard input:checked + span b { background: var(--navy); color: #fff; }
.mcard input:focus-visible + span { box-shadow: 0 0 0 3px #C7D2FE; }
.mpanel[hidden] { display: none !important; }
.mpanel { display: grid; gap: 12px; padding: 14px 16px; border: 1px solid #ECEAFD; border-radius: 14px; background: #FAFAFF; }
.mpanel.in { animation: tipIn .2s ease-out; }
.mpanel .hint { margin: 0; }

/* detailed profile sections */
.pfm-upd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -2px 0 8px; color: #64748B; font-size: .82rem; }
.pf-sec { border: 1px solid #E8E6F8; border-radius: 16px; background: #fff; overflow: hidden; }
.pf-sec + .pf-sec { margin-top: 2px; }
.pf-sec > summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; background: linear-gradient(135deg, #F8F7FF, #fff); }
.pf-sec > summary::-webkit-details-marker { display: none; }
.pf-sec > summary::after { content: ""; flex-shrink: 0; width: 9px; height: 9px; margin: 0 4px 0 6px; border-right: 2px solid #94A3B8; border-bottom: 2px solid #94A3B8; transform: rotate(45deg); transition: transform .2s; }
.pf-sec[open] > summary::after { transform: rotate(-135deg); }
.pf-sec[open] > summary { border-bottom: 1px solid #F1F0FB; }
.pfs-ic { flex-shrink: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--tint); color: var(--navy); }
.pfs-t { flex: 1; min-width: 0; }
.pfs-t b { display: block; color: var(--ink); }
.pfs-t small { display: block; color: var(--muted); font-size: .8rem; }
.pfs-n { flex-shrink: 0; padding: 3px 10px; border-radius: 99px; background: #FFF1E6; color: #C2410C; font-size: .78rem; font-weight: 700; }
.pfs-n.full { background: #DCFCE7; color: #166534; }
.pfs-body { display: grid; gap: 10px; padding: 14px; background: #FCFCFF; }
.pfs-body .trait { background: #fff; margin: 0; }
.pf-sec.sm > summary { padding: 10px 12px; }
.pf-sec.sm .pfs-ic { width: 34px; height: 34px; }
.adv .pf-sec { margin-top: 10px; }
.pts-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .pts-grid { grid-template-columns: minmax(0, 1fr); } }
.pts-card { display: grid; gap: 6px; justify-items: start; padding: 22px; border-radius: 20px; color: #fff; background: radial-gradient(300px 140px at 100% 0%, rgba(249,115,22,.4), transparent 70%), linear-gradient(135deg, #2A10C9, #1A00AA); box-shadow: 0 20px 44px rgba(26,0,170,.22); }
.pts-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: rgba(255,255,255,.15); color: #FDBA74; }
.pts-l { margin-top: 6px; color: #C7D2FE; font-size: .86rem; }
.pts-card b { font-size: 2.4rem; line-height: 1.1; letter-spacing: -.02em; }
.pts-s { color: #C7D2FE; font-size: .82rem; margin-bottom: 8px; }
.pts-card .btn-ghost { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
