/* ==========================================================================
   IBS Support Portal — public helpdesk UI
   Self-hosted (the portal CSP forbids third-party styles/fonts).
   Palette: green primary, slate neutrals, amber for warnings.
   Gradients are kept subtle: solid fills everywhere, one soft glow on the hero.
   ========================================================================== */

:root {
  --hd-ink: #0f172a;
  --hd-ink-2: #334155;
  --hd-muted: #64748b;
  --hd-line: #e2e8f0;
  --hd-bg: #f6f8f7;
  --hd-card: #ffffff;
  --hd-primary: #15803d;
  --hd-primary-2: #16a34a;
  --hd-primary-dark: #14532d;
  --hd-primary-soft: #ecfdf3;
  --hd-primary-line: #bbf7d0;
  /* former accent slots, now shades of green so nothing turns blue */
  --hd-violet: #166534;
  --hd-sky: #22c55e;
  --hd-amber: #f59e0b;
  --hd-rose: #e11d48;
  --hd-emerald: #059669;
  --hd-radius: 18px;
  --hd-radius-sm: 12px;
  --hd-shadow: 0 10px 30px -12px rgba(15, 23, 42, .18), 0 2px 6px -2px rgba(15, 23, 42, .06);
  --hd-shadow-lg: 0 24px 48px -20px rgba(20, 83, 45, .35);
  --hd-ease: cubic-bezier(.22, 1, .36, 1);
  --hd-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body.hd-portal {
  margin: 0;
  min-height: 100vh;
  background: var(--hd-bg);
  color: var(--hd-ink);
  font-family: var(--hd-font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- full-screen shell: hero | content ---------- */
.hd-shell {
  display: grid;
  grid-template-columns: minmax(340px, 42%) 1fr;
  min-height: 100vh;
}

.hd-hero {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  padding: 48px 48px 36px;
  color: #fff;
  display: flex;
  flex-direction: column;
  /* solid deep green with a single soft glow - no multi-colour blend */
  background: #14532d; /* photo slideshow sits on top; this is the fallback */
  isolation: isolate;
}

/* slow drifting glows, same hue family, kept faint */
.hd-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: .22;
  z-index: -1;
  animation: hd-drift 18s ease-in-out infinite alternate;
}
.hd-blob.b1 { width: 320px; height: 320px; background: #22c55e; top: -90px; right: -70px; }
.hd-blob.b2 { width: 260px; height: 260px; background: #16a34a; bottom: 60px; left: -100px; animation-duration: 22s; }
.hd-blob.b3 { display: none; }
@keyframes hd-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, 40px) scale(1.08); }
  100% { transform: translate(-20px, 10px) scale(.95); }
}

/* background photo slideshow (all slides share one 4:5 aspect ratio) */
.hd-slides { position: absolute; inset: 0; z-index: -3; overflow: hidden; background: #14532d; }
.hd-slides img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0; transform: scale(1.04);
  transition: opacity 1.2s ease-in-out, transform 7s ease-out;
}
/* photos themselves are dimmed too, so the green reads as the dominant colour */
.hd-slides img.is-active { opacity: .75; transform: scale(1.1); }
/* flat green tint so text stays readable over any photo - no colour blend */
.hd-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: rgba(15, 61, 34, .88);
}

/* faint grid texture */
.hd-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 85%);
}

.hd-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .2px; }
.hd-brand-mark {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(6px);
  font-size: 22px;
}
.hd-brand small { display: block; font-weight: 500; opacity: .75; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; }
.hd-brand { text-decoration: none; color: #fff; }
.hd-logo { height: 54px; width: auto; max-width: 100%; display: block; }
.hd-brand-tag {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; align-self: flex-start;
  padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .4px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
}

.hd-contact { display: grid; gap: 8px; font-size: 13px; margin-bottom: 18px; }
.hd-contact a, .hd-contact span { color: rgba(255,255,255,.88); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.hd-contact a:hover { color: #fff; text-decoration: underline; }
.hd-contact i { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.1); font-size: 15px; }
.hd-hero-foot a { color: inherit; }

.hd-hero-body { margin-top: auto; margin-bottom: auto; padding: 32px 0; }
.hd-hero h1 {
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.12;
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: -.5px;
}
.hd-hero h1 .hd-gradient-text { color: #86efac; }
.hd-hero p.lead { font-size: 16px; opacity: .85; max-width: 440px; margin: 0 0 28px; }

.hd-features { display: grid; gap: 12px; max-width: 460px; }
.hd-feature {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
  transform: translateY(12px);
  opacity: 0;
  animation: hd-rise .8s var(--hd-ease) forwards;
}
.hd-feature:nth-child(2) { animation-delay: .12s; }
.hd-feature:nth-child(3) { animation-delay: .24s; }
.hd-feature i {
  flex: 0 0 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; font-size: 19px;
  background: rgba(255,255,255,.16);
}
.hd-feature strong { display: block; font-size: 14px; }
.hd-feature span { font-size: 13px; opacity: .78; }

.hd-hero-foot { font-size: 12px; opacity: .65; display: flex; gap: 16px; flex-wrap: wrap; }

/* services offered */
.hd-services { margin-top: 18px; max-width: 480px; opacity: 0; animation: hd-rise .8s .3s var(--hd-ease) forwards; }
.hd-services-title { font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; opacity: .75; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.hd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hd-chips span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  transition: background .25s, transform .25s var(--hd-ease);
}
.hd-chips span:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
.hd-chips i { color: #86efac; font-size: 15px; }

/* ---------- main column ---------- */
.hd-main {
  padding: 48px clamp(20px, 5vw, 72px) 40px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.hd-main-inner { width: 100%; max-width: 780px; margin: 0 auto; }

.hd-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; gap: 12px; }
.hd-topbar .hd-mobile-brand { display: none; }
.hd-secure-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--hd-primary-soft); color: var(--hd-primary);
  font-size: 12px; font-weight: 600;
}

.hd-card {
  background: var(--hd-card);
  border-radius: var(--hd-radius);
  box-shadow: var(--hd-shadow);
  border: 1px solid rgba(226, 232, 240, .8);
  padding: clamp(22px, 4vw, 40px);
  position: relative;
  overflow: hidden;
}
.hd-card + .hd-card { margin-top: 20px; }
.hd-card-accent::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: var(--hd-primary);
}

.hd-title { font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; letter-spacing: -.3px; margin: 0 0 6px; }
.hd-sub { color: var(--hd-muted); margin: 0 0 24px; }

/* entrance animation for every step */
.hd-animate { animation: hd-rise .6s var(--hd-ease) both; }
.hd-animate-2 { animation: hd-rise .6s .08s var(--hd-ease) both; }
.hd-animate-3 { animation: hd-rise .6s .16s var(--hd-ease) both; }
@keyframes hd-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- stepper ---------- */
.hd-stepper { display: flex; align-items: center; gap: 0; margin-bottom: 26px; }
.hd-step { display: flex; align-items: center; gap: 10px; color: var(--hd-muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.hd-step-dot {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; border: 2px solid var(--hd-line);
  font-size: 14px; transition: all .4s var(--hd-ease);
}
.hd-step.is-active { color: var(--hd-ink); }
.hd-step.is-active .hd-step-dot {
  border-color: var(--hd-primary); color: var(--hd-primary);
  box-shadow: 0 0 0 6px rgba(21, 128, 61, .12);
  animation: hd-pulse 2.2s ease-in-out infinite;
}
.hd-step.is-done .hd-step-dot { background: var(--hd-primary); border-color: var(--hd-primary); color: #fff; }
.hd-step-line { flex: 1; height: 2px; background: var(--hd-line); margin: 0 12px; border-radius: 2px; position: relative; overflow: hidden; min-width: 20px; }
.hd-step-line.is-done::after {
  content: ""; position: absolute; inset: 0;
  background: var(--hd-primary);
  animation: hd-fill .8s var(--hd-ease) both;
}
@keyframes hd-fill { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }
@keyframes hd-pulse { 0%, 100% { box-shadow: 0 0 0 6px rgba(21, 128, 61,.12); } 50% { box-shadow: 0 0 0 10px rgba(21, 128, 61,.05); } }

/* ---------- form controls ---------- */
.hd-label { display: block; font-weight: 650; font-size: 13.5px; color: var(--hd-ink-2); margin-bottom: 7px; }
.hd-label .req { color: var(--hd-rose); margin-left: 2px; }
.hd-hint { display: block; color: var(--hd-muted); font-size: 12.5px; margin-top: 6px; }
.hd-error { display: block; color: var(--hd-rose); font-size: 12.5px; margin-top: 6px; font-weight: 600; }
.hd-error:empty { display: none; }

.hd-portal .form-control,
.hd-portal .form-select,
.hd-input {
  width: 100%;
  border: 1.5px solid var(--hd-line);
  border-radius: var(--hd-radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  background: #fff;
  color: var(--hd-ink);
  transition: border-color .2s, box-shadow .2s, background .2s;
  font-family: inherit;
}
.hd-portal textarea.form-control { min-height: 140px; resize: vertical; }
.hd-portal .form-control:hover, .hd-portal .form-select:hover { border-color: #cbd5e1; }
.hd-portal .form-control:focus, .hd-portal .form-select:focus {
  outline: none; border-color: var(--hd-primary);
  box-shadow: 0 0 0 4px rgba(21, 128, 61, .14);
}
.hd-field { position: relative; }
.hd-field.has-icon .form-control { padding-left: 44px; }
.hd-field .hd-field-icon {
  position: absolute; left: 14px; top: 13px; font-size: 19px; color: #94a3b8;
  pointer-events: none; transition: color .2s;
}
.hd-field:focus-within .hd-field-icon { color: var(--hd-primary); }

.hd-section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--hd-primary); margin: 30px 0 14px;
}
.hd-section-title::after { content: ""; flex: 1; height: 1px; background: var(--hd-line); }
.hd-section-title:first-of-type { margin-top: 6px; }

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

/* ---------- selectable tiles (requester type, category, priority) ---------- */
.hd-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.hd-tile { position: relative; cursor: pointer; margin: 0; }
.hd-tile input { position: absolute; opacity: 0; pointer-events: none; }
.hd-tile-body {
  height: 100%;
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px;
  border-radius: 14px;
  border: 1.5px solid var(--hd-line);
  background: #fff;
  transition: transform .25s var(--hd-ease), border-color .2s, box-shadow .25s, background .2s;
}
.hd-tile-body i {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; font-size: 21px;
  background: #f1f5f9; color: var(--hd-ink-2);
  transition: all .25s var(--hd-ease);
}
.hd-tile-body strong { font-size: 14px; line-height: 1.25; }
.hd-tile-body small { color: var(--hd-muted); font-size: 12px; line-height: 1.35; }
.hd-tile:hover .hd-tile-body { transform: translateY(-3px); box-shadow: var(--hd-shadow); border-color: var(--hd-primary-line); }
.hd-tile input:focus-visible + .hd-tile-body { box-shadow: 0 0 0 4px rgba(21, 128, 61,.2); }
.hd-tile input:checked + .hd-tile-body {
  border-color: var(--hd-primary);
  background: var(--hd-primary-soft);
  box-shadow: 0 12px 24px -14px rgba(21, 128, 61, .6);
}
.hd-tile input:checked + .hd-tile-body i { background: var(--hd-primary); color: #fff; transform: rotate(-6deg) scale(1.05); }
.hd-tile input:checked + .hd-tile-body::after {
  content: "\2713"; position: absolute; top: 10px; right: 12px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--hd-primary); color: #fff;
  animation: hd-pop .35s var(--hd-ease);
}
@keyframes hd-pop { from { transform: scale(0); } to { transform: scale(1); } }
.hd-tiles.compact .hd-tile-body { flex-direction: row; align-items: center; padding: 12px 14px; }
.hd-tiles.compact .hd-tile-body i { width: 34px; height: 34px; font-size: 18px; flex: 0 0 34px; }

/* segmented priority control */
.hd-segment { display: grid; grid-template-columns: repeat(3, 1fr); background: #f1f5f9; border-radius: 14px; padding: 5px; gap: 5px; }
.hd-segment label { margin: 0; cursor: pointer; }
.hd-segment input { position: absolute; opacity: 0; pointer-events: none; }
.hd-segment span {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 8px; border-radius: 10px; font-weight: 650; font-size: 13.5px; color: var(--hd-muted);
  transition: all .25s var(--hd-ease);
}
.hd-segment span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .6; }
.hd-segment input:checked + span { background: #fff; color: var(--hd-ink); box-shadow: 0 4px 12px -6px rgba(15,23,42,.35); }
.hd-segment input[value="LOW"]:checked + span::before { background: #94a3b8; opacity: 1; }
.hd-segment input[value="MEDIUM"]:checked + span::before { background: var(--hd-sky); opacity: 1; }
.hd-segment input[value="HIGH"]:checked + span::before { background: var(--hd-amber); opacity: 1; }

/* ---------- buttons ---------- */
.hd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; cursor: pointer;
  padding: 13px 22px; font-weight: 700; font-size: 15px; font-family: inherit;
  text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--hd-ease), box-shadow .25s, background .2s, opacity .2s;
}
.hd-btn:active { transform: translateY(1px) scale(.99); }
.hd-btn-primary {
  color: #fff;
  background: var(--hd-primary);
  box-shadow: 0 12px 24px -12px rgba(21, 128, 61, .7);
  position: relative; overflow: hidden;
}
.hd-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -12px rgba(21, 128, 61, .8); color: #fff; }

.hd-btn-ghost { background: #fff; color: var(--hd-ink-2); border: 1.5px solid var(--hd-line); }
.hd-btn-ghost:hover { border-color: var(--hd-primary-line); color: var(--hd-primary); transform: translateY(-1px); }
.hd-btn-link { background: none; color: var(--hd-primary); padding: 6px 4px; font-weight: 650; font-size: 14px; }
.hd-btn-link:hover { text-decoration: underline; }
.hd-btn-link[disabled] { color: var(--hd-muted); cursor: not-allowed; text-decoration: none; }
.hd-btn-block { width: 100%; }
.hd-btn.is-loading { pointer-events: none; opacity: .85; }
.hd-btn.is-loading i { display: none; }
.hd-btn.is-loading::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5); border-top-color: #fff;
  animation: hd-spin .7s linear infinite;
}
@keyframes hd-spin { to { transform: rotate(360deg); } }

.hd-inline-form { display: flex; gap: 10px; }
.hd-inline-form > .hd-field { flex: 1; }

/* ---------- OTP code boxes ---------- */
.hd-otp { display: flex; gap: 10px; justify-content: center; margin: 8px 0 4px; }
.hd-otp input {
  width: 54px; height: 64px; text-align: center;
  font-size: 26px; font-weight: 800; font-family: "Cascadia Mono", Consolas, monospace;
  border: 2px solid var(--hd-line); border-radius: 14px; background: #fff; color: var(--hd-ink);
  transition: border-color .2s, box-shadow .2s, transform .2s var(--hd-ease);
}
.hd-otp input:focus { outline: none; border-color: var(--hd-primary); box-shadow: 0 0 0 4px rgba(21, 128, 61,.15); transform: translateY(-2px); }
.hd-otp input.filled { border-color: #86efac; background: var(--hd-primary-soft); }
.hd-otp.shake { animation: hd-shake .45s; }
.hd-otp .hd-otp-gap { width: 8px; }
@keyframes hd-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.hd-otp-native.is-enhanced { position: absolute; opacity: 0; pointer-events: none; height: 0; }

.hd-envelope {
  width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 24px;
  display: grid; place-items: center; font-size: 36px; color: var(--hd-primary);
  background: var(--hd-primary-soft);
  animation: hd-float 3.5s ease-in-out infinite;
}
@keyframes hd-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- alerts / toasts ---------- */
.hd-alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 14px; margin-bottom: 18px;
  font-size: 14px; border: 1px solid transparent;
  animation: hd-rise .5s var(--hd-ease) both;
}
.hd-alert i { font-size: 20px; line-height: 1; margin-top: 1px; }
.hd-alert.alert-info, .hd-alert.alert-success { background: var(--hd-primary-soft); color: var(--hd-primary-dark); border-color: var(--hd-primary-line); }
.hd-alert.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.hd-alert.alert-danger { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }

.hd-verified-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: 14px; margin-bottom: 22px;
  background: var(--hd-primary-soft);
  border: 1px solid var(--hd-primary-line); color: var(--hd-primary-dark); font-size: 14px;
}
.hd-verified-chip i { color: var(--hd-primary); font-size: 18px; vertical-align: -3px; margin-right: 6px; }

/* form progress bar */
.hd-progress { height: 6px; border-radius: 99px; background: #eef2f7; overflow: hidden; margin: -6px 0 26px; }
.hd-progress > div {
  height: 100%; width: 0; border-radius: 99px;
  background: var(--hd-primary);
  transition: width .5s var(--hd-ease);
}
.hd-progress-label { font-size: 12px; color: var(--hd-muted); display: flex; justify-content: space-between; margin-bottom: 8px; }

.hd-counter { float: right; font-size: 12px; color: var(--hd-muted); font-weight: 500; }

/* ---------- dropzone ---------- */
.hd-dropzone {
  border: 2px dashed var(--hd-primary-line); border-radius: 16px; padding: 26px 16px; text-align: center;
  cursor: pointer; background: #fff;
  transition: all .25s var(--hd-ease);
}
.hd-dropzone:hover, .hd-dropzone.dragover { border-color: var(--hd-primary); background: var(--hd-primary-soft); transform: scale(1.01); }
.hd-dropzone .hd-drop-icon {
  width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 16px;
  display: grid; place-items: center; font-size: 24px; color: #fff;
  background: var(--hd-primary);
  box-shadow: 0 10px 20px -10px rgba(21, 128, 61,.7);
}
.hd-dropzone strong { display: block; font-size: 14px; }
.hd-dropzone small { color: var(--hd-muted); }
.hd-file-list { display: grid; gap: 8px; margin-top: 12px; }
.hd-file {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px;
  border: 1px solid var(--hd-line); border-radius: 12px; background: #fff;
  animation: hd-rise .35s var(--hd-ease) both; font-size: 13px;
}
.hd-file .thumb {
  width: 40px; height: 40px; border-radius: 9px; flex: 0 0 40px;
  display: grid; place-items: center; background: #f1f5f9; color: var(--hd-primary); font-size: 18px;
  object-fit: cover;
}
.hd-file .meta { flex: 1; min-width: 0; }
.hd-file .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.hd-file .meta span { color: var(--hd-muted); font-size: 12px; }
.hd-file.is-bad { border-color: #fecdd3; background: #fff1f2; }
.hd-file.is-bad .meta span { color: var(--hd-rose); }

/* ---------- welcome step: what the portal offers + how it works ---------- */
.hd-offer-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hd-offer {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px;
  border: 1px solid var(--hd-line); border-radius: 14px; background: #fff;
  transition: transform .25s var(--hd-ease), border-color .2s, box-shadow .25s;
}
a.hd-offer { color: inherit; text-decoration: none; cursor: pointer; }
.hd-offer:hover, .hd-offer:focus-visible { transform: translateY(-2px); border-color: var(--hd-primary); box-shadow: var(--hd-shadow); outline: none; color: inherit; }
.hd-offer em {
  display: flex; width: max-content; align-items: center; gap: 4px; margin-top: 8px;
  font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--hd-primary);
}
.hd-offer em i { flex: none; width: auto; height: auto; background: none; font-size: 14px; transition: transform .25s var(--hd-ease); }
.hd-offer:hover em i { transform: translateY(2px); }
/* brief highlight on the email box when a card sends the visitor there */
.hd-start.is-pulsing { animation: hd-attention 1.2s var(--hd-ease); }
@keyframes hd-attention { 0% { box-shadow: 0 0 0 0 rgba(21,128,61,.45); } 100% { box-shadow: 0 0 0 16px rgba(21,128,61,0); } }
.hd-offer i {
  flex: 0 0 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  font-size: 19px; background: var(--hd-primary-soft); color: var(--hd-primary);
}
.hd-offer strong { display: block; font-size: 14px; margin-bottom: 2px; }
.hd-offer span { display: block; color: var(--hd-muted); font-size: 12.8px; line-height: 1.45; }

.hd-how { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hd-how li { display: flex; gap: 12px; align-items: flex-start; font-size: 12.8px; color: var(--hd-muted); line-height: 1.45; }
.hd-how li > span {
  flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; color: #fff; background: var(--hd-primary);
}
.hd-how strong { display: block; color: var(--hd-ink); font-size: 14px; margin-bottom: 2px; }

.hd-start {
  margin-top: 28px; padding: 20px; border-radius: 16px;
  background: var(--hd-primary-soft); border: 1px solid var(--hd-primary-line);
}

@media (max-width: 700px) {
  .hd-offer-grid, .hd-how { grid-template-columns: 1fr; }
  .hd-start { padding: 16px; }
}

/* ---------- site location: text + map picker ---------- */
.hd-location { display: flex; gap: 10px; }
.hd-location > .hd-field { flex: 1; min-width: 0; }
.hd-location .hd-btn { padding: 11px 16px; font-size: 14px; }
.hd-pin-chip {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  padding: 4px 6px 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--hd-primary-soft); color: var(--hd-primary-dark); border: 1px solid var(--hd-primary-line);
}
.hd-pin-chip[hidden] { display: none; }

.hd-map-modal {
  position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, .55);
  display: grid; place-items: center; padding: 20px;
  animation: hd-fade .2s ease-out;
}
.hd-map-modal[hidden] { display: none; }
@keyframes hd-fade { from { opacity: 0; } to { opacity: 1; } }
.hd-map-sheet {
  width: min(760px, 100%); height: min(620px, 100%);
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border-radius: 18px; box-shadow: var(--hd-shadow-lg);
  animation: hd-rise .35s var(--hd-ease);
}
.hd-map-head, .hd-map-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; }
.hd-map-head { border-bottom: 1px solid var(--hd-line); }
.hd-map-head strong { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; }
.hd-map-head strong i { color: var(--hd-primary); }
.hd-map-tools { display: flex; align-items: center; gap: 12px; padding: 10px 16px; flex-wrap: wrap; }
.hd-map-tools .hd-btn { padding: 8px 12px; font-size: 13.5px; }
.hd-map-coords { font-size: 13px; color: var(--hd-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.hd-map { flex: 1; min-height: 240px; background: #e8efe9; }
.hd-map-foot { border-top: 1px solid var(--hd-line); justify-content: flex-end; }
.hd-map-foot .hd-btn[disabled] { opacity: .5; cursor: not-allowed; }
.hd-map-pin { color: var(--hd-rose); font-size: 36px; line-height: 1; text-shadow: 0 2px 6px rgba(0,0,0,.35); background: none; border: 0; }
.hd-map-pin i { display: block; }
.leaflet-container { font-family: var(--hd-font); }

@media (max-width: 600px) {
  .hd-location { flex-direction: column; }
  .hd-map-modal { padding: 0; }
  .hd-map-sheet { width: 100%; height: 100%; border-radius: 0; }
}

/* ---------- choose: new vs existing ---------- */
.hd-choice-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; }
.hd-choice-grid > * { min-width: 0; }
.hd-new-card {
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
  padding: 26px; border-radius: var(--hd-radius); color: #fff; border: 0; text-align: left; cursor: pointer;
  background: var(--hd-primary-dark);
  box-shadow: var(--hd-shadow-lg); position: relative; overflow: hidden; width: 100%;
  transition: transform .3s var(--hd-ease), box-shadow .3s; font-family: inherit;
}
.hd-new-card:hover { transform: translateY(-4px) rotate(-.3deg); }
.hd-new-card i { font-size: 26px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: rgba(255,255,255,.16); }
.hd-new-card strong { font-size: 19px; }
.hd-new-card span { opacity: .8; font-size: 13.5px; }
.hd-new-card .arrow { margin-top: 6px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.hd-new-card::after {
  content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%;
  right: -60px; bottom: -60px; background: rgba(255,255,255,.1);
}

.hd-ticket-list { display: grid; gap: 10px; }
.hd-ticket-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 14px; background: #fff; border: 1.5px solid var(--hd-line);
  color: inherit; text-decoration: none;
  transition: transform .25s var(--hd-ease), border-color .2s, box-shadow .25s;
  animation: hd-rise .5s var(--hd-ease) both;
}
.hd-ticket-item:hover { transform: translateX(4px); border-color: var(--hd-primary-line); box-shadow: var(--hd-shadow); color: inherit; }
.hd-ticket-item .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; flex: 0 0 42px; background: var(--hd-primary-soft); color: var(--hd-primary); }
.hd-ticket-item .body { flex: 1; min-width: 0; }
.hd-ticket-item .body b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-ticket-item .body small { color: var(--hd-muted); }
.hd-ticket-item .go { color: var(--hd-muted); font-size: 18px; transition: transform .25s var(--hd-ease), color .2s; }
.hd-ticket-item:hover .go { transform: translateX(3px); color: var(--hd-primary); }

/* status pills */
.hd-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.hd-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hd-pill.OPEN { background: #fff1f2; color: var(--hd-rose); }
.hd-pill.IN_PROGRESS { background: #fffbeb; color: #b45309; }
.hd-pill.RESOLVED { background: #ecfdf5; color: var(--hd-emerald); }
.hd-pill.CLOSED { background: #f1f5f9; color: var(--hd-muted); }
.hd-pill.OPEN::before, .hd-pill.IN_PROGRESS::before { animation: hd-blink 1.6s ease-in-out infinite; }
@keyframes hd-blink { 50% { opacity: .35; } }

/* ---------- tracking page ---------- */
.hd-track-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.hd-ref { font-family: "Cascadia Mono", Consolas, monospace; font-size: 12.5px; letter-spacing: 1px; color: var(--hd-primary); font-weight: 700; }
.hd-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--hd-muted); font-size: 13px; margin-top: 10px; }
.hd-meta i { color: #94a3b8; margin-right: 4px; }

.hd-status-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 28px 0 6px; position: relative; }
.hd-status-track .rail { position: absolute; top: 17px; left: 12.5%; right: 12.5%; height: 3px; background: var(--hd-line); border-radius: 3px; }
.hd-status-track .rail > div {
  height: 100%; border-radius: 3px; width: 0;
  background: var(--hd-primary);
  animation: hd-grow 1.2s .2s var(--hd-ease) forwards;
}
@keyframes hd-grow { to { width: var(--hd-progress, 0%); } }
.hd-status-node { text-align: center; position: relative; z-index: 1; }
.hd-status-node .dot {
  width: 36px; height: 36px; margin: 0 auto 8px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; border: 3px solid var(--hd-line); color: #94a3b8; font-size: 16px;
  transition: all .4s var(--hd-ease);
}
.hd-status-node.done .dot { background: var(--hd-primary); border-color: var(--hd-primary); color: #fff; }
.hd-status-node.current .dot { border-color: var(--hd-primary); color: var(--hd-primary); animation: hd-pulse 2.2s infinite; }
.hd-status-node span { font-size: 12.5px; font-weight: 650; color: var(--hd-muted); }
.hd-status-node.done span, .hd-status-node.current span { color: var(--hd-ink); }

.hd-thread { display: flex; flex-direction: column; gap: 14px; }
.hd-msg { display: flex; gap: 12px; max-width: 88%; animation: hd-rise .5s var(--hd-ease) both; }
.hd-msg .avatar {
  width: 38px; height: 38px; border-radius: 12px; flex: 0 0 38px;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff;
  background: var(--hd-primary);
}
.hd-msg .bubble {
  padding: 14px 16px; border-radius: 4px 16px 16px 16px; background: #fff; border: 1px solid var(--hd-line);
  box-shadow: 0 6px 16px -12px rgba(15,23,42,.3);
}
.hd-msg .who { font-size: 12.5px; font-weight: 700; margin-bottom: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hd-msg .who time { color: var(--hd-muted); font-weight: 500; }
.hd-msg .text { white-space: pre-wrap; word-wrap: break-word; font-size: 14.5px; line-height: 1.55; }
.hd-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.hd-msg.mine .avatar { background: #475569; }
.hd-msg.mine .bubble { border-radius: 16px 4px 16px 16px; background: var(--hd-primary-soft); border-color: var(--hd-primary-line); }
.hd-support-tag { font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--hd-primary); color: #fff; }
.hd-attach { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hd-attach a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 9px;
  background: #fff; border: 1px solid var(--hd-line); color: var(--hd-ink-2); font-size: 12.5px; text-decoration: none;
  transition: border-color .2s, color .2s;
}
.hd-attach a:hover { border-color: var(--hd-primary); color: var(--hd-primary); }

.hd-composer { border: 1.5px solid var(--hd-line); border-radius: 16px; padding: 6px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.hd-composer:focus-within { border-color: var(--hd-primary); box-shadow: 0 0 0 4px rgba(21, 128, 61,.12); }
.hd-composer textarea.form-control { border: 0 !important; box-shadow: none !important; min-height: 110px; }
.hd-composer-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 8px 4px; flex-wrap: wrap; }
.hd-attach-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--hd-muted); font-weight: 600; font-size: 13.5px; cursor: pointer; border-radius: 10px; padding: 8px 10px; transition: background .2s, color .2s; }
.hd-attach-btn:hover { background: var(--hd-primary-soft); color: var(--hd-primary); }

.hd-celebrate { text-align: center; padding: 8px 0 18px; }
.hd-check {
  width: 74px; height: 74px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; font-size: 36px; color: #fff;
  background: var(--hd-primary);
  box-shadow: 0 0 0 10px rgba(21, 128, 61,.12);
  animation: hd-pop .6s var(--hd-ease) both, hd-pulse 2.4s 1s infinite;
}
.hd-confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.hd-confetti i {
  position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; opacity: .9;
  animation: hd-fall 2.8s ease-in forwards;
}
@keyframes hd-fall { to { transform: translateY(105vh) rotate(720deg); opacity: 0; } }

.hd-footer { text-align: center; color: var(--hd-muted); font-size: 12.5px; margin-top: 28px; }
.hd-footer i { color: var(--hd-primary); }
.hd-footer a, .hd-hint a { color: var(--hd-primary); font-weight: 600; text-decoration: none; }
.hd-footer a:hover, .hd-hint a:hover { text-decoration: underline; }

/* honeypot */
.hd-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- responsive ---------- */
/* shorter laptop screens: keep the whole hero (contacts included) in view */
@media (min-width: 901px) and (max-height: 940px) {
  .hd-hero { padding-top: 32px; padding-bottom: 24px; }
  .hd-hero-body { padding: 18px 0; }
  .hd-hero h1 { font-size: clamp(26px, 2.6vw, 36px); }
  .hd-hero p.lead { margin-bottom: 18px; }
  .hd-features { gap: 8px; }
  .hd-feature { padding: 10px 14px; }
  .hd-feature i { flex-basis: 32px; height: 32px; font-size: 17px; }
  .hd-feature span { font-size: 12px; line-height: 1.4; }
  .hd-services { margin-top: 12px; }
  .hd-chips { gap: 6px; }
  .hd-chips span { padding: 4px 9px; font-size: 11.5px; }
  .hd-contact { grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-bottom: 12px; }
}
@media (min-width: 901px) and (max-height: 800px) {
  .hd-hero p.lead, .hd-brand-tag { display: none; }
  .hd-hero h1 { margin-bottom: 12px; }
  .hd-hero-body { padding: 10px 0; }
  .hd-feature span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .hd-contact { margin-bottom: 8px; }
}
@media (max-width: 900px) {
  .hd-services { display: none; }
}
@media (max-width: 1100px) {
  .hd-shell { grid-template-columns: 38% 1fr; }
  .hd-hero { padding: 36px 32px; }
}
@media (max-width: 900px) {
  /* header sized to its content; the page body takes the remaining height */
  .hd-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; }
  .hd-hero {
    position: relative; height: auto; padding: 22px 20px 30px;
    border-radius: 0 0 28px 28px;
  }
  .hd-hero-body { padding: 18px 0 0; margin: 0; }
  .hd-hero h1 { font-size: 26px; margin-bottom: 8px; }
  .hd-hero p.lead { font-size: 14px; margin-bottom: 0; }
  .hd-features, .hd-hero-foot, .hd-contact { display: none; }  .hd-logo { height: 40px; }
  .hd-brand-tag { margin-top: 10px; }
  .hd-main { padding: 22px 16px 32px; margin-top: 0; }
  .hd-topbar { display: none; }
  .hd-choice-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  body.hd-portal { font-size: 14.5px; }
  .hd-grid { grid-template-columns: 1fr; }
  .hd-card { padding: 20px 16px; border-radius: 16px; }
  .hd-step-label { display: none; }
  .hd-step-line { margin: 0 8px; }
  .hd-inline-form { flex-direction: column; }
  .hd-otp { gap: 6px; }
  .hd-otp input { width: 44px; height: 56px; font-size: 22px; }
  .hd-otp .hd-otp-gap { width: 2px; }
  .hd-msg { max-width: 100%; }
  /* request list: status pill drops under the title instead of pushing it off-screen */
  .hd-ticket-item { flex-wrap: wrap; row-gap: 6px; padding: 12px; }
  .hd-ticket-item .body { flex: 1 1 calc(100% - 56px); }
  .hd-ticket-item .hd-pill { margin-left: 56px; }
  .hd-ticket-item .go { display: none; }
  .hd-status-node span { font-size: 11px; }
  .hd-tiles { grid-template-columns: 1fr 1fr; }
  .hd-btn { padding: 12px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
