:root {
  --bg: #f7f5f0;
  --panel: #ffffff;
  --surface2: #f0ede6;
  --ink: #1a1814;
  --muted: #6b6560;
  --line: #e2ddd5;
  --ink-faint: #9e9890;
  --blue: #2d7a64;
  --blue-strong: #1c4a3e;
  --orange: #c9a84c;
  --green: #059669;
  --radius: 16px;
  --card-shadow: 0 10px 24px rgba(26, 24, 20, 0.07);
  --card-shadow-hover: 0 16px 30px rgba(26, 24, 20, 0.13);
  --portal-shell-max: 1400px;
  --portal-content-max: 1260px;
}

* { box-sizing: border-box; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: rgba(148, 163, 184, 0.18); border-radius: 999px; }
*::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #93c5fd, #60a5fa); border-radius: 999px; border: 2px solid rgba(255,255,255,.65); }
* { scrollbar-width: thin; scrollbar-color: #60a5fa rgba(148, 163, 184, 0.18); }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(28, 74, 62, 0.08), transparent 35%),
    radial-gradient(circle at 85% 2%, rgba(201, 168, 76, 0.10), transparent 32%),
    var(--bg);
}

body.portal-report-open {
  overflow: hidden;
}

.portal-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 2400;
  border-radius: 10px;
  border: 1px solid #dbe6f3;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.portal-toast.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.portal-toast.info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.portal-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(107, 101, 96, 0.18);
}

.topbar-shell {
  max-width: var(--portal-shell-max);
  margin: 0 auto;
  padding: 10px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.topbar-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #1c4a3e, #2d7a64);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar-brand-text {
  color: #1a1814;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.1;
  font-family: 'DM Serif Display', serif;
}

.topbar-brand-text small {
  color: #6b6560;
  font-size: .78rem;
  margin-left: 4px;
  font-weight: 700;
}

.topbar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar-nav > a,
.segments-dropdown > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 7px 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.topbar-nav > a:hover,
.segments-dropdown > button:hover,
.topbar-nav > a.is-active {
  border-color: #e2ddd5;
  background: #f7f4ed;
  color: #1c4a3e;
}

.topbar-link-cta {
  color: #0f172a !important;
}

.topbar-link-highlight {
  border-color: #e8d8a4 !important;
  background: #fdf6e3 !important;
  color: #8a6b1e !important;
}

.topbar-link-highlight span {
  font-size: 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #fdba74;
  color: #9a3412;
  padding: 1px 6px;
}

.segments-dropdown {
  position: relative;
}

.segments-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid #dbe6f3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
  padding: 8px;
  display: grid;
  gap: 4px;
  z-index: 40;
}

.segments-dropdown-menu[hidden] {
  display: none !important;
}

.segments-menu-item {
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  padding: 8px;
  cursor: pointer;
  font-family: inherit;
}

.segments-menu-item:hover {
  border-color: #dbe6f3;
  background: #f8fafc;
}

.segments-menu-empty {
  color: #64748b;
  font-size: 12px;
  padding: 8px;
}

.topbar-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 11px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.topbar-login:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #eff6ff;
}

.portal-header {
  padding: 18px 20px 8px;
}

.header-hero {
  max-width: var(--portal-content-max);
  margin: 0 auto;
  background:
    linear-gradient(130deg, rgba(28, 74, 62, 0.95), rgba(26, 24, 20, 0.90)),
    url('https://images.unsplash.com/photo-1517048676732-d65bc937f952?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  border: 1px solid rgba(201, 168, 76, 0.32);
  border-radius: 22px;
  padding: 22px;
  display: grid;
  grid-template-columns: 1.6fr .8fr;
  gap: 16px;
  box-shadow: 0 26px 58px rgba(15, 23, 42, 0.35);
}

.hero-content h1 {
  margin: 12px 0 8px;
  color: #ffffff;
  font-size: clamp(1.56rem, 2.5vw, 2.3rem);
  letter-spacing: -.02em;
  max-width: 680px;
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
}

.hero-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.62;
  max-width: 680px;
}

.hero-cta-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-cta-primary,
.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  border-radius: 999px;
  padding: 9px 14px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
}

.hero-cta-primary {
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  border-color: rgba(191, 219, 254, 0.55);
}

.hero-cta-secondary {
  color: #dbeafe;
  border-color: rgba(147, 197, 253, 0.45);
  background: rgba(37, 99, 235, 0.22);
}

.hero-cta-secondary:hover {
  color: #fff;
  border-color: rgba(147, 197, 253, 0.76);
  background: rgba(30, 64, 175, 0.35);
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: rgba(15, 23, 42, 0.6);
}

.header-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-content: start;
}

.header-stats article {
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  padding: 14px 12px;
}

.header-stats strong {
  display: block;
  font-size: 1.55rem;
  color: #f8fafc;
}

.header-stats span {
  color: rgba(203, 213, 225, 0.92);
  font-size: .92rem;
}

.portal-main {
  max-width: var(--portal-content-max);
  margin: 0 auto;
  padding: 22px 20px 42px;
}

.portal-list-main {
  max-width: var(--portal-shell-max);
  margin: 0 auto;
  padding: 20px 20px 36px;
}

.portal-list-head {
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 18px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.portal-list-head h1 {
  margin: 0;
  color: #1a1814;
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: clamp(1.28rem, 2.4vw, 1.8rem);
  letter-spacing: -.01em;
}

.portal-list-head p {
  margin: 8px 0 0;
  color: #6b6560;
  font-size: .95rem;
}

.portal-list-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.portal-list-actions a {
  text-decoration: none;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #3f3a34;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 13px;
}

.portal-list-actions a:hover {
  border-color: #c9bda9;
  background: #f7f2e8;
  color: #1a1814;
}

.portal-list-intro {
  margin-top: 12px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--card-shadow);
  padding: 16px;
  color: #3f3a34;
  line-height: 1.7;
}

.portal-list-intro p {
  margin: 0;
}

.portal-list-intro p + p {
  margin-top: 8px;
}

.portal-list-links {
  margin-top: 11px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.portal-list-links a {
  border: 1.5px solid #ddd5c8;
  border-radius: 999px;
  background: #f7f4ed;
  color: #4b5563;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 10px;
}

.portal-list-links a:hover {
  border-color: #c9bda9;
  color: #1a1814;
}

.portal-list-cta {
  margin-top: 12px;
  border: 1.5px solid #c7d7cf;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(28,74,62,.95), rgba(26,24,20,.92));
  color: #e5e7eb;
  box-shadow: 0 16px 36px rgba(26,24,20,.25);
  padding: 16px;
}

.portal-list-cta h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #ffffff;
}

.portal-list-cta p {
  margin: 8px 0 0;
  color: rgba(229, 231, 235, .88);
}

.portal-list-cta-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-list-cta-actions a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid transparent;
}

.portal-list-cta-actions a.primary {
  color: #fff;
  background: linear-gradient(135deg, #2d7a64, #1c4a3e);
  border-color: rgba(201, 168, 76, .5);
}

.portal-list-cta-actions a.secondary {
  color: #eef2f7;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.2);
}

.portal-list-section-title {
  margin: 14px 2px 12px;
  color: #1a1814;
  font-weight: 800;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.portal-list-empty {
  border: 1.5px dashed #ddd5c8;
  border-radius: 14px;
  background: #fff;
  padding: 30px 24px;
  color: #6b6560;
  text-align: center;
  margin-top: 12px;
}

.how-it-works {
  margin: 0 0 18px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--card-shadow);
  padding: 22px;
}

.how-it-works-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.how-it-works-head h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  color: #1a1814;
  letter-spacing: -.01em;
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
}

.how-it-works-head p {
  margin: 0;
  color: #64748b;
  font-size: .95rem;
  line-height: 1.5;
  max-width: 680px;
}

.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.how-step {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  position: relative;
  overflow: hidden;
}

.how-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-width: 44px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--blue-strong);
  border: 1px solid #b9d7cb;
  background: #edf5f1;
}

.how-step h3 {
  margin: 10px 0 6px;
  font-size: 1rem;
  letter-spacing: -.01em;
  color: #0f172a;
}

.how-step p {
  margin: 0;
  color: #475569;
  font-size: .9rem;
  line-height: 1.5;
}

.paid-marquee {
  margin: 14px 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--card-shadow);
}

.paid-marquee-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.paid-marquee-head h2 {
  margin: 0;
  font-size: 1rem;
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
}

.paid-marquee-head p {
  margin: 0;
  color: #64748b;
  font-size: .86rem;
}

.paid-marquee-track {
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface2);
  padding: 8px 0;
}

.paid-logo-row {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  min-width: 100%;
  animation: paidLogoMarquee 26s linear infinite;
}

.paid-logo-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #3f3a34;
  min-width: 170px;
  border: 1px solid #ddd5c8;
  border-radius: 999px;
  background: #fff;
  padding: 5px 10px 5px 5px;
}

.paid-logo-media {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: linear-gradient(145deg, #1c4a3e, #2d7a64);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  overflow: hidden;
}

.paid-logo-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.paid-logo-name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paid-empty {
  display: inline-flex;
  padding: 10px 12px;
  color: #64748b;
  font-size: 12px;
}

.segment-showcase {
  margin: 12px 0 14px;
}

.segment-showcase-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.segment-showcase-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
}

.segment-showcase-head p {
  margin: 0;
  color: #64748b;
  font-size: .86rem;
}

.segment-showcase-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.segment-showcase-controls button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #cddbf0;
  background: #ffffff;
  color: #30435f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
}

.segment-showcase-controls button:hover:not(:disabled) {
  border-color: #8db4ef;
  color: #1d4ed8;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.16);
}

.segment-showcase-controls button:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
}

.segment-showcase-track {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.segment-showcase-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 220px);
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  scroll-snap-stop: always;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.segment-showcase-grid::-webkit-scrollbar {
  display: none;
}

.segment-showcase-card {
  position: relative;
  border: 1px solid #dbe6f3;
  border-radius: 14px;
  min-height: 96px;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  background: #0a0e27;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.segment-showcase-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform .28s ease;
}

.segment-showcase-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.62));
}

.segment-showcase-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 12px;
  color: #f8fafc;
  text-align: left;
}

.segment-showcase-content i {
  font-size: 14px;
  opacity: .92;
}

.segment-showcase-content strong {
  font-size: .95rem;
  line-height: 1.2;
}

.segment-showcase-content small {
  font-size: .76rem;
  color: rgba(241, 245, 249, 0.9);
}

.segment-showcase-card:hover .segment-showcase-bg {
  transform: scale(1.04);
}

.segment-showcase-card:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.segment-card-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: #64748b;
  padding: 12px;
  font-size: 13px;
}

.portal-layout {
  display: block;
}

.portal-layout.with-sidebar {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.portal-sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 10px;
}

.sidebar-card {
  border: 1px solid #dbe6f3;
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  padding: 12px;
}

.sidebar-card h3 {
  margin: 0 0 5px;
  font-size: .96rem;
}

.sidebar-card p {
  margin: 0 0 10px;
  color: #64748b;
  font-size: .82rem;
}

.sidebar-segment-list {
  display: grid;
  gap: 6px;
}

.sidebar-segment-btn {
  border: 1px solid #dbe6f3;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: #334155;
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sidebar-segment-btn:hover,
.sidebar-segment-btn.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e40af;
}

.sidebar-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sidebar-filter-chip {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
}

.sidebar-empty {
  color: #64748b;
  font-size: 12px;
}

.portal-content {
  min-width: 0;
}

@keyframes paidLogoMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.filters {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(140px, 1fr)) 130px 150px;
  gap: 10px;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  position: static;
  box-shadow: var(--card-shadow);
}

.field { display: grid; gap: 6px; }
.field.grow { grid-column: auto; }
.field label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: var(--ink-faint);
}

.field input,
.field select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--blue-strong);
  box-shadow: 0 0 0 3px rgba(45, 122, 100, 0.14);
}

.checkbox-field {
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.checkbox-field input {
  width: 22px;
  height: 22px;
  accent-color: var(--blue-strong);
}

.action-field {
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.action-field button {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface2);
  color: #4b5563;
  padding: 11px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.action-field button:hover {
  border-color: #c9bda9;
  background: #f7f2e8;
  color: #1a1814;
}

.result-meta {
  margin: 16px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1.5px solid var(--line);
}

.result-meta-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sort-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2ddd5;
  border-radius: 999px;
  background: #ffffff;
  padding: 4px 6px 4px 11px;
  color: #6b6560;
}

.sort-filter span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sort-filter select {
  border: 0;
  background: #f7f4ed;
  color: #1a1814;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 28px 7px 10px;
  min-width: 168px;
  cursor: pointer;
}

.sort-filter select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 122, 100, 0.16);
}

.quote-link-btn {
  border: 1px solid rgba(28, 74, 62, .24);
  border-radius: 999px;
  padding: 8px 13px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  color: #1c4a3e;
  background: linear-gradient(135deg, #edf5f3, #f8faf8);
}

.quote-link-btn:hover {
  border-color: #2d7a64;
  color: #13342c;
  background: linear-gradient(135deg, #dff1ec, #edf5f3);
}

.quote-hub {
  margin-top: 12px;
  border: 1px solid #d8e2f0;
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% 16%, rgba(14,165,233,.14), transparent 42%),
    radial-gradient(circle at 12% 8%, rgba(255,107,53,.12), transparent 40%),
    #ffffff;
  padding: 14px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.07);
}

.quote-hub-head h2 {
  margin: 0;
  font-size: 1.08rem;
  color: #0f172a;
}

.quote-hub-head p {
  margin: 6px 0 0;
  color: #475569;
  font-size: .9rem;
}

.quote-form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.quote-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quote-step-indicator {
  border: 1px solid #dbe6f3;
  border-radius: 12px;
  background: #f8fbff;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-weight: 700;
}

.quote-step-indicator span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
}

.quote-step-indicator small {
  font-size: 12px;
  letter-spacing: .02em;
}

.quote-step-indicator.is-active {
  border-color: #7dd3fc;
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
  color: #0f172a;
}

.quote-step-indicator.is-active span,
.quote-step-indicator.is-done span {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
}

.quote-step-pane {
  display: grid;
  gap: 10px;
}

.quote-confirm-box {
  border: 1px solid #dbe6f3;
  border-radius: 12px;
  background: #f8fbff;
  padding: 12px;
}

.quote-confirm-box h3 {
  margin: 0;
  font-size: 1rem;
  color: #0f172a;
}

.quote-confirm-box p {
  margin: 6px 0 0;
  color: #475569;
  font-size: .9rem;
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quote-dynamic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quote-dynamic-grid .field-full {
  grid-column: 1 / -1;
}

.quote-form textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
  resize: vertical;
  min-height: 110px;
}

.quote-form textarea:focus {
  outline: none;
  border-color: var(--blue-strong);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.quote-reference-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-start;
}

.quote-reference-btn {
  border: 1px solid #c7d5ec;
  background: #f8fbff;
  color: #0f172a;
  border-radius: 10px;
  padding: 7px 10px;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quote-reference-btn:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
}

.quote-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.quote-captcha {
  display: grid;
  gap: 6px;
}

.quote-captcha label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: #475569;
}

.quote-captcha-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quote-captcha-row span {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  color: #1f2937;
  min-width: 92px;
  text-align: center;
}

.quote-captcha-row input {
  width: 88px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  font-weight: 700;
}

.quote-captcha-row input:focus {
  outline: none;
  border-color: var(--blue-strong);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.quote-submit-btn {
  border: 1px solid rgba(37, 99, 235, .25);
  border-radius: 12px;
  padding: 11px 14px;
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 20px rgba(37, 99, 235, .25);
  min-height: 44px;
}

.quote-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.quote-nav-btn {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 11px 14px;
  min-height: 44px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quote-nav-btn:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.quote-submit-btn:disabled {
  opacity: .68;
  cursor: wait;
}

.quote-feedback {
  margin-top: 10px;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: .9rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.quote-feedback.success {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}

.quote-feedback.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.quote-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.result-meta p {
  margin: 0;
  color: #6b6560;
  font-weight: 600;
}

.refresh-cache-btn {
  border: 1px solid #e2ddd5;
  border-radius: 999px;
  background: #ffffff;
  color: #3f3a34;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.refresh-cache-btn:hover {
  border-color: #2d7a64;
  background: #edf5f3;
  color: #1c4a3e;
}

.refresh-cache-btn:disabled {
  opacity: .65;
  cursor: wait;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  align-items: start;
}

.card {
  background: var(--panel);
  border: 1px solid #e2ddd5;
  border-top: 3px solid var(--card-accent, #1c4a3e);
  border-radius: 15px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--card-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  min-height: 188px;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--card-accent-soft, #d8eee7);
}

.card-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.card-head > div:last-child {
  min-width: 0;
}

.card-title-wrap {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 24px;
}

.trust-badge i {
  font-size: 11px;
  line-height: 1;
}

.trust-badge.verified {
  border-color: #ddd6fe;
  background: #f3e8ff;
  color: #6d28d9;
}

.trust-badge.public-source {
  border-color: #d1d5db;
  background: #f8fafc;
  color: #475569;
}

.mini-tooltip {
  position: relative;
}

.mini-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.95);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  padding: 6px 9px;
  width: max-content;
  max-width: min(360px, 80vw);
  white-space: normal;
  line-height: 1.35;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.2);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 30;
}

.mini-tooltip:hover::after,
.mini-tooltip:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.status-dot {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(148,163,184,.2);
}

.status-dot.open { background: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.16); }
.status-dot.closed { background: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.16); }

.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #1e40af 0%, #0a0e27 100%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #e2e8f0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badges {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  align-items: center;
  min-height: 28px;
}

.badges-left {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .03em;
  border: 1px solid transparent;
  background: #f8fafc;
  color: #334155;
  border-color: #e2e8f0;
  white-space: nowrap;
  min-height: 24px;
  height: 24px;
  line-height: 1;
}

.badge.open {
  background: #e8f8ee;
  color: #166534;
  border-color: #6ee7b7;
}

.badge.closed {
  background: #ffe9e9;
  color: #b42318;
  border-color: #fda4af;
}

.badge-link {
  text-decoration: none;
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.segment-under-name {
  display: block;
  max-width: 100%;
  width: 100%;
  text-decoration: none;
  color: #6b6560;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-context {
  margin-top: 0;
}

.card-context-link {
  display: inline;
  text-decoration: none;
  color: #475569 !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.card-context-link:hover {
  color: #1d4ed8 !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.card-context-link.city-link {
  font-size: 0.86rem;
  font-weight: 500;
}

.badge-link:hover {
  border-color: #93c5fd;
  color: #1e40af;
  background: #eff6ff;
}

.card-google-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  border: 1px solid #d5e5fb;
  background: #f9fbff;
  color: #334155;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 700;
}

.rating-stars-inline {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  letter-spacing: -0.02em;
}

.rating-stars-inline span {
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1;
}

.rating-stars-inline span.on {
  color: #f59e0b;
}

.rating-total {
  color: #64748b;
  font-size: 11px;
}

.badges-rating-inline {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  letter-spacing: -0.02em;
}

.badges-rating-inline span {
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1;
}

.badges-rating-inline span.on {
  color: #f59e0b;
}

.google-mini {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  background: conic-gradient(#4285F4 0 90deg, #34A853 90deg 180deg, #FBBC05 180deg 270deg, #EA4335 270deg 360deg);
}

.star-mini {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fcd34d;
}

.star-mini svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.star-mini i {
  font-size: 10px;
  line-height: 1;
}

.meta {
  color: #64748b;
  font-size: .86rem;
  display: grid;
  gap: 3px;
  line-height: 1.35;
}

.item-description {
  margin: 0;
  font-size: .88rem;
  line-height: 1.45;
  color: #475569;
  min-height: 38px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-icon {
  display: inline-flex;
  width: 18px;
  color: #94a3b8;
  align-items: center;
  justify-content: center;
}

.meta-icon svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.meta-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color .15s ease, border-color .15s ease;
}

.meta-link:hover {
  color: #1d4ed8;
  border-color: #93c5fd;
}

.card a {
  margin-top: 4px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid var(--card-accent-soft, #d8eee7);
  background: linear-gradient(135deg, #ffffff, var(--card-accent-soft, #edf5f3));
  color: var(--card-accent, #1c4a3e);
  font-weight: 700;
  padding: 8px 10px;
  margin-top: auto;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.card a:hover {
  border-color: var(--card-accent, #1c4a3e);
  background: linear-gradient(135deg, var(--card-accent-soft, #edf5f3), #ffffff);
  transform: translateY(-1px);
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: auto;
}

.card-actions a {
  margin-top: 0;
  padding: 7px 10px;
  font-size: 12.5px;
  min-height: 36px;
}

.card-actions a svg {
  width: 14px;
  height: 14px;
  display: block;
  flex-shrink: 0;
}

.card-actions a svg.action-svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-actions a i {
  font-size: 12px;
  line-height: 1;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.card-actions .btn-report {
  margin-top: 0;
  padding: 7px 10px;
  font-size: 12.5px;
  min-height: 36px;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #9f1239;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.card-actions .btn-report:hover {
  border-color: #fda4af;
  background: #ffe4e6;
  transform: translateY(-1px);
}

.card-actions .btn-report i {
  font-size: 12px;
  line-height: 1;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.card-actions .btn-profile {
  border-color: #e2ddd5;
  color: #3f3a34;
  background: #faf8f3;
}

.card-actions .btn-whatsapp-card {
  border-color: #22c55e;
  background: #22c55e;
  color: #ffffff;
}

.card-actions .btn-whatsapp-card:hover {
  border-color: #16a34a;
  background: #16a34a;
  color: #ffffff;
}

.portal-report-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  z-index: 1200;
  padding: 16px;
}

.portal-report-modal[hidden] {
  display: none !important;
}

.portal-report-card {
  width: min(560px, 100%);
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #dbe6f3;
  box-shadow: 0 26px 48px rgba(15, 23, 42, 0.24);
  padding: 18px;
}

.portal-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.portal-report-head h2 {
  margin: 0;
  font-size: 1.12rem;
}

.portal-report-close {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.portal-report-help {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 13px;
}

.portal-report-form {
  display: grid;
  gap: 10px;
}

.portal-report-target {
  border: 1px solid #dbe5f3;
  background: #f8fafc;
  border-radius: 10px;
  padding: 9px 10px;
  color: #334155;
  font-size: 13px;
}

.portal-report-target span {
  color: #64748b;
}

.portal-report-field {
  display: grid;
  gap: 6px;
}

.portal-report-field label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.portal-report-field input,
.portal-report-field select,
.portal-report-field textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  padding: 10px 11px;
  font: inherit;
}

.portal-report-field textarea {
  resize: vertical;
  min-height: 86px;
}

.portal-report-field input:focus,
.portal-report-field select:focus,
.portal-report-field textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.portal-report-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.portal-report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}

.portal-report-btn {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.portal-report-btn.secondary {
  background: #f8fafc;
  color: #334155;
}

.portal-report-btn.primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #1d4ed8;
  color: #fff;
}

.portal-report-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.portal-report-feedback {
  margin-top: 10px;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 600;
}

.portal-report-feedback.success {
  border: 1px solid #86efac;
  background: #dcfce7;
  color: #166534;
}

.portal-report-feedback.error {
  border: 1px solid #fecaca;
  background: #fee2e2;
  color: #b91c1c;
}

.card-actions .btn-profile:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
  color: #0f172a;
}

.card-actions a:focus-visible,
.guide-links a:focus-visible,
.app-badge:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.empty-state {
  margin-top: 22px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  padding: 32px 18px;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.empty-state p {
  margin: 0;
  color: #64748b;
}

.guide-section {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dbe6f3;
  border-radius: 16px;
  padding: 16px;
}

.guide-head h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.guide-head p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

.guide-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.guide-card {
  border: 1px solid #dbe6f3;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
}

.guide-card h3 {
  margin: 0 0 8px;
  font-size: .98rem;
}

.guide-card p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
  font-size: .92rem;
}

.guide-card p + p {
  margin-top: 8px;
}

.guide-card ul {
  margin: 0;
  padding-left: 16px;
  color: #475569;
  display: grid;
  gap: 6px;
}

.guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.guide-links a {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  text-decoration: none;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guide-links a:hover {
  border-color: #93c5fd;
  color: #1e40af;
  background: #eff6ff;
}

.guide-links .guide-more-link {
  background: #e8f0ee;
  border-color: #b8d4cb;
  color: #1c4a3e;
}

.guide-placeholder {
  color: #64748b;
  font-size: 12px;
}

.portal-footer {
  margin-top: 24px;
  padding: 0 20px 26px;
  color: #64748b;
  display: grid;
  gap: 10px;
}

.portal-footer-shell {
  max-width: var(--portal-shell-max);
  width: 100%;
  margin: 0 auto;
  border: 1px solid #dbe6f3;
  border-radius: 18px;
  background: #ffffff;
  padding: 16px;
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr .9fr;
  gap: 12px;
}

.footer-col {
  display: grid;
  align-content: start;
  gap: 7px;
}

.footer-col h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: #0f172a;
}

.footer-col a {
  text-decoration: none;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.footer-col a:hover {
  color: #1e40af;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: #0f172a;
}

.footer-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #0ea5e9, #2563eb);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.footer-brand-text {
  font-size: 1rem;
  font-weight: 800;
}

.footer-brand-col p {
  margin: 0;
  line-height: 1.6;
  font-size: 13px;
}

.footer-socials {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.footer-socials a {
  width: 31px;
  height: 31px;
  border-radius: 999px;
  border: 1px solid #dbe6f3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #475569;
  background: #f8fafc;
}

.footer-socials a:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #eff6ff;
}

.apps-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  text-decoration: none;
}

.app-badge.disabled {
  cursor: not-allowed;
  opacity: .92;
}

.app-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  color: #94a3b8;
}

.app-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.soon-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
}

.portal-source-note,
#lastUpdatedText,
.portal-footer small {
  max-width: var(--portal-shell-max);
  width: 100%;
  margin: 0 auto;
  text-align: center;
  display: block;
  font-size: 12px;
}

.loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  grid-column: 1 / -1;
}

.loading-card {
  height: 220px;
  border-radius: 16px;
  border: 1px solid #dbe6f3;
  background: linear-gradient(110deg, #f8fafc 8%, #eef2f7 18%, #f8fafc 33%);
  background-size: 200% 100%;
  animation: shimmer 1.25s linear infinite;
}

.load-more-sentinel {
  width: 100%;
  height: 2px;
  opacity: 0;
  pointer-events: none;
}

.pagination-panel {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(26, 24, 20, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pagination-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pagination-left label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.pagination-left select {
  min-width: 76px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
  padding: 0 28px 0 10px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-faint) 50%),
    linear-gradient(135deg, var(--ink-faint) 50%, transparent 50%);
  background-position: calc(100% - 14px) 14px, calc(100% - 9px) 14px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.pagination-left select:focus {
  outline: none;
  border-color: #c5d9d3;
  box-shadow: 0 0 0 3px rgba(45, 122, 100, 0.15);
}

.pagination-numbers {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pagination-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  min-width: 36px;
  text-align: center;
  cursor: pointer;
}

.pagination-btn:hover:not(:disabled) {
  border-color: #c5d9d3;
  background: #f9fbfa;
  color: var(--blue-strong);
}

.pagination-btn.active,
.pagination-btn.is-active {
  border-color: var(--blue-strong);
  background: linear-gradient(135deg, var(--blue-strong), var(--blue));
  color: #fff;
  box-shadow: 0 8px 18px rgba(28, 74, 62, 0.24);
}

.pagination-btn:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.pagination-ellipsis {
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 700;
  padding: 0 2px;
}
}

@keyframes shimmer {
  to {
    background-position-x: -200%;
  }
}

@media (max-width: 1080px) {
  .how-it-works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topbar-shell {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
  }
  .topbar-nav {
    justify-content: center;
  }
  .header-hero {
    grid-template-columns: 1fr;
  }
  .portal-layout.with-sidebar {
    grid-template-columns: 1fr;
  }
  .portal-sidebar {
    position: static;
  }
  .portal-footer-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
  }
  .field.grow {
    grid-column: 1 / -1;
  }
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quote-grid,
  .quote-dynamic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quote-steps {
    grid-template-columns: 1fr;
  }
  .portal-list-main {
    padding: 16px 14px 30px;
  }
}

@media (max-width: 640px) {
  .how-it-works {
    padding: 14px;
    border-radius: 14px;
  }
  .how-it-works-grid {
    grid-template-columns: 1fr;
  }
  .topbar-shell {
    padding: 9px 12px;
  }
  .topbar-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }
  .topbar-nav > a,
  .segments-dropdown > button {
    white-space: nowrap;
  }
  .portal-header {
    padding: 12px 12px 6px;
  }
  .header-hero,
  .filters {
    border-radius: 14px;
  }
  .header-hero {
    padding: 14px;
  }
  .header-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-cta-primary,
  .hero-cta-secondary {
    justify-content: center;
  }
  .paid-marquee-head,
  .segment-showcase-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .segment-showcase-controls {
    width: 100%;
    justify-content: flex-end;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 13px;
    min-height: 178px;
  }
  .logo {
    width: 40px;
    height: 40px;
  }
  .card-actions {
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card-actions a {
    min-height: 34px;
    font-size: 12px;
  }
  .filters {
    grid-template-columns: 1fr;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .portal-report-row {
    grid-template-columns: 1fr;
  }
  .result-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .portal-footer {
    padding: 0 12px 20px;
  }
  .portal-footer-shell {
    grid-template-columns: 1fr;
    border-radius: 14px;
    padding: 12px;
  }
  .result-meta-actions {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }
  .sort-filter {
    width: 100%;
    justify-content: space-between;
  }
  .sort-filter select {
    width: 100%;
    min-width: 0;
  }
  .pagination-panel {
    align-items: flex-start;
  }
  .portal-list-head {
    padding: 14px;
  }
  .portal-list-actions {
    width: 100%;
  }
  .portal-list-actions a {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .portal-list-cta {
    padding: 14px;
  }
  .portal-list-cta-actions a {
    width: 100%;
    justify-content: center;
  }
  .pagination-left {
    width: 100%;
    justify-content: space-between;
  }
  .pagination-numbers {
    width: 100%;
    justify-content: flex-start;
  }
  .quote-grid,
  .quote-dynamic-grid {
    grid-template-columns: 1fr;
  }
  .quote-bottom {
    align-items: stretch;
  }
  .quote-actions {
    justify-content: stretch;
  }
  .quote-nav-btn,
  .quote-submit-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Mobile UX patch v20260221 */
@media (max-width: 860px) {
  .topbar-shell {
    padding: 10px 12px;
    justify-items: stretch;
  }

  .topbar-brand {
    justify-content: flex-start;
  }

  .topbar-nav {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .topbar-nav::-webkit-scrollbar {
    display: none;
  }

  .topbar-nav > a,
  .segments-dropdown > button,
  .topbar-login {
    min-height: 40px;
    white-space: nowrap;
  }

  .segments-dropdown-menu {
    min-width: min(340px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
  }

  .header-hero {
    padding: 16px;
  }

  .hero-cta-primary,
  .hero-cta-secondary,
  .portal-list-actions a,
  .portal-list-cta-actions a,
  .quote-nav-btn,
  .quote-submit-btn {
    min-height: 44px;
  }

  .result-meta-actions {
    width: 100%;
    justify-content: stretch;
  }

  .result-meta-actions .sort-filter {
    width: 100%;
  }

  .sort-filter select {
    min-height: 42px;
  }

  .pagination-numbers {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .pagination-numbers::-webkit-scrollbar {
    display: none;
  }

  .pagination-btn {
    min-width: 40px;
    min-height: 40px;
  }
}

@media (max-width: 560px) {
  .portal-header,
  .portal-main,
  .portal-footer {
    padding-left: 12px;
    padding-right: 12px;
  }

  .header-hero {
    border-radius: 12px;
  }

  .header-title {
    font-size: clamp(1.45rem, 8vw, 2rem);
  }

  .header-subtitle {
    font-size: 13px;
    line-height: 1.6;
  }

  .header-stats {
    grid-template-columns: 1fr;
  }

  .filters {
    gap: 10px;
    padding: 12px;
  }

  .field input,
  .field select,
  .field textarea,
  .sort-filter select,
  .pagination-left select {
    min-height: 42px;
    font-size: 15px;
  }

  .card-actions a {
    min-height: 40px;
  }

  .pagination-panel {
    gap: 10px;
  }

  .pagination-left {
    gap: 6px;
  }
}
