:root {
    --bg: #071019;
    --bg-2: #0c1624;
    --panel: rgba(14, 23, 37, 0.88);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(198, 255, 77, 0.18);
    --text: #f4f7fb;
    --muted: #9ba9c0;
    --accent: #b8f13b;
    --accent-2: #85c11d;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    --radius-xl: 26px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #04090f 0%, #09111c 100%);
    overflow-x: hidden;
}

body {
    position: relative;
}

html.capacitor-shell,
html.capacitor-shell body {
    background: #071019;
}

html.capacitor-shell .page-shell {
    padding-top: max(20px, calc(env(safe-area-inset-top) + 8px));
    padding-bottom: max(40px, calc(env(safe-area-inset-bottom) + 16px));
}

html.capacitor-shell .site-bg {
    display: none;
}

img {
    display: block;
    max-width: 100%;
}

.site-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 12% 10%, rgba(184, 241, 59, 0.12), transparent 24%),
        radial-gradient(circle at 88% 16%, rgba(103, 163, 26, 0.14), transparent 20%),
        radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.03), transparent 32%);
    pointer-events: none;
    z-index: 0;
}

.page-shell {
    position: relative;
    z-index: 1;
    width: min(1440px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 40px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo-shell {
    width: 104px;
    height: 104px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 104px;
    overflow: visible;
}

.brand-logo {
    width: 104px;
    height: 104px;
    object-fit: contain;
    transform: scale(1.22);
    transform-origin: center center;
    filter: drop-shadow(0 10px 28px rgba(112, 181, 24, 0.18));
}

.brand-logo-fallback {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: var(--shadow);
}

.brand-logo-fallback span {
    color: #081019;
    font-weight: 900;
    font-size: 1.3rem;
    letter-spacing: 0.05em;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
}

.topbar-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.micro-stat-link {
    text-decoration: none;
    color: inherit;
}

.micro-stat {
    min-width: 108px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    box-shadow: var(--shadow);
    transition: 0.18s ease;
}

.micro-stat:hover {
    border-color: rgba(184, 241, 59, 0.22);
    transform: translateY(-1px);
}

.micro-stat-active {
    background: rgba(184, 241, 59, 0.12);
    border-color: rgba(184, 241, 59, 0.34);
}

.micro-stat-number {
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1;
}

.micro-stat-label {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.82rem;
}

.hero {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 22px;
    margin-bottom: 24px;
}

.hero-main,
.hero-side-card,
.filters-panel,
.results-panel,
.market-summary,
.listing-card,
.empty-state,
.compare-panel,
.sidebar-section,
.trending-section,
.featured-sponsor-section {
    background: var(--panel);
    border: 1px solid var(--border);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
}

html.capacitor-shell .hero-main,
html.capacitor-shell .hero-side-card,
html.capacitor-shell .filters-panel,
html.capacitor-shell .results-panel,
html.capacitor-shell .market-summary,
html.capacitor-shell .listing-card,
html.capacitor-shell .empty-state,
html.capacitor-shell .compare-panel,
html.capacitor-shell .sidebar-section,
html.capacitor-shell .trending-section,
html.capacitor-shell .featured-sponsor-section,
html.capacitor-shell .market-shift-toast,
html.capacitor-shell .premium-hero,
html.capacitor-shell .premium-control-panel,
html.capacitor-shell .premium-analysis-panel,
html.capacitor-shell .premium-mini-card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(14, 23, 37, 0.96);
}

html.capacitor-shell .brand-logo {
    filter: none;
}

.hero-main,
.hero-side-card,
.filters-panel,
.results-panel,
.empty-state,
.compare-panel,
.sidebar-section,
.trending-section,
.featured-sponsor-section {
    border-radius: var(--radius-xl);
}

.hero-main {
    padding: 36px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-main h1 {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 0.98;
    max-width: 11ch;
    letter-spacing: -0.04em;
}

.hero-text {
    margin: 18px 0 0;
    max-width: 64ch;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.65;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.trust-pill,
.chip,
.checkbox-pill span,
.result-tag,
.accent-badge,
.results-view-pill,
.sponsored-badge {
    border-radius: 999px;
}

.trust-pill {
    padding: 10px 14px;
    background: rgba(184, 241, 59, 0.08);
    border: 1px solid rgba(184, 241, 59, 0.18);
    color: #edfbc9;
    font-size: 0.9rem;
    font-weight: 700;
}

.hero-side-card {
    padding: 28px;
    height: 100%;
}

.lease-protect-hero-promo,
.lease-protect-intent-banner,
.lease-protect-sidebar-promo {
    border-radius: 18px;
    border: 1px solid rgba(184, 241, 59, 0.18);
    background:
        linear-gradient(180deg, rgba(184, 241, 59, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(255, 255, 255, 0.03);
}

.lease-protect-hero-promo {
    margin-top: 18px;
    padding: 16px;
    display: grid;
    gap: 12px;
}

.lease-protect-promo-title {
    color: #f4f7fb;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 6px;
}

.lease-protect-promo-copy,
.lease-protect-compare-copy {
    color: var(--muted);
    line-height: 1.5;
}

.lease-protect-promo-button {
    text-decoration: none;
}

.hero-side-label {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.hero-side-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.hero-side-item {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
}

.hero-side-value {
    display: block;
    font-size: 1.02rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.hero-side-caption {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.main-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 22px;
    align-items: start;
}

.mobile-jump-row {
    display: none;
}

.filters-panel {
    padding: 24px;
    position: sticky;
    top: 18px;
    max-height: calc(100dvh - 36px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(184, 241, 59, 0.35) rgba(255, 255, 255, 0.05);
}

.filters-panel::-webkit-scrollbar {
    width: 10px;
}

.filters-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
}

.filters-panel::-webkit-scrollbar-thumb {
    background: rgba(184, 241, 59, 0.28);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.filters-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(184, 241, 59, 0.42);
    background-clip: padding-box;
}

.panel-header {
    margin-bottom: 18px;
}

.panel-header h2,
.results-header h2,
.compare-panel-header h3,
.sidebar-section-header h3,
.trending-section-header h3,
.featured-sponsor-header h3 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.panel-header p,
.results-subtitle,
.market-summary-text,
.empty-state p,
.compare-panel-header p,
.sidebar-empty,
.trending-section-subtitle,
.featured-sponsor-subtitle {
    color: var(--muted);
    line-height: 1.55;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-right: 2px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 0.9rem;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 13px 14px;
    font-size: 1rem;
    outline: none;
}

input::placeholder {
    color: #8795ad;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(184, 241, 59, 0.42);
    box-shadow: 0 0 0 4px rgba(184, 241, 59, 0.08);
}

.select-wrap {
    position: relative;
}

.select-wrap::after {
    content: "▾";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #cdd7e6;
    pointer-events: none;
    font-size: 0.9rem;
    opacity: 0.9;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px;
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

select option,
select optgroup {
    background: #0f1827;
    color: #f4f7fb;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.checkbox-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-pill span {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.88rem;
    cursor: pointer;
    transition: 0.18s ease;
}

.checkbox-pill input:checked + span {
    background: rgba(184, 241, 59, 0.12);
    border-color: rgba(184, 241, 59, 0.34);
    color: #eefccb;
}

.primary-button,
.view-button,
.ghost-button,
.saved-link,
.trending-card,
.featured-sponsor-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: 0.18s ease;
    font-weight: 900;
}

.primary-button {
    margin-top: 6px;
    padding: 14px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #081019;
    border: none;
}

.ghost-button {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
}

.small-button {
    padding: 8px 12px;
    font-size: 0.82rem;
}

.active-ghost {
    background: rgba(184, 241, 59, 0.12);
    border-color: rgba(184, 241, 59, 0.28);
    color: #edfbc9;
}

.save-btn {
    min-width: 110px;
}

.save-btn.active-ghost {
    background: rgba(184, 241, 59, 0.16);
    border-color: rgba(184, 241, 59, 0.36);
    color: #f1fccf;
    box-shadow: inset 0 0 0 1px rgba(184, 241, 59, 0.08);
}

.primary-button:hover,
.view-button:hover,
.ghost-button:hover,
.saved-link:hover,
.trending-card:hover,
.featured-sponsor-card:hover {
    transform: translateY(-1px);
}

.sidebar-section {
    margin-top: 20px;
    padding: 18px;
}

.lease-protect-sidebar-promo {
    margin-top: 16px;
    padding: 14px;
}

.lease-protect-sidebar-button {
    display: inline-flex;
    margin-top: 12px;
}

.sidebar-section-header,
.compare-panel-header,
.trending-section-header,
.results-header,
.featured-sponsor-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    margin-bottom: 14px;
}

.saved-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.saved-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
}

.saved-thumb,
.compare-card-head {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.saved-thumb img,
.compare-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.saved-thumb-fallback,
.compare-image-fallback,
.listing-image-fallback,
.trending-thumb-fallback,
.featured-sponsor-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(184, 241, 59, 0.15), rgba(133, 193, 29, 0.08));
    color: #edfbc9;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.image-frame {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.image-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.image-fallback-only {
    position: relative;
    inset: auto;
}

.display-image {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    opacity: 0;
    object-fit: cover;
    transition: opacity 0.18s ease;
}

.image-frame.is-loaded .display-image {
    opacity: 1;
}

.image-frame.is-loaded .image-fallback {
    opacity: 0;
}

.image-frame.is-error .image-fallback {
    opacity: 1;
}

.saved-item-name {
    font-weight: 800;
    line-height: 1.3;
}

.saved-item-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.88rem;
}

.saved-link {
    color: #effccb;
    white-space: nowrap;
}

.results-panel {
    padding: 24px;
    border-radius: var(--radius-xl);
    min-width: 0;
    scroll-margin-top: 18px;
}

#filters-panel {
    scroll-margin-top: 18px;
}

.results-view-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.results-view-pill {
    padding: 10px 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 800;
}

.results-view-pill-active {
    background: rgba(184, 241, 59, 0.14);
    border-color: rgba(184, 241, 59, 0.34);
    color: #eefccb;
}

.lease-protect-intent-banner {
    margin-bottom: 18px;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.market-summary {
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: rgba(184, 241, 59, 0.08);
    border: 1px solid rgba(184, 241, 59, 0.18);
}

.market-shift-summary {
    position: relative;
    overflow: hidden;
    border-color: rgba(184, 241, 59, 0.3);
    box-shadow: 0 14px 34px rgba(184, 241, 59, 0.08);
}

.market-shift-summary::before,
.market-shift-toast::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 5px;
    opacity: 0.92;
}

.market-shift-summary.severity-minor::before,
.market-shift-toast.severity-minor::before {
    background: rgba(184, 241, 59, 0.7);
}

.market-shift-summary.severity-notable::before,
.market-shift-toast.severity-notable::before {
    background: rgba(204, 255, 107, 0.9);
}

.market-shift-summary.severity-major::before,
.market-shift-toast.severity-major::before {
    background: linear-gradient(180deg, rgba(239, 252, 203, 0.96), rgba(184, 241, 59, 0.96));
}

.market-shift-summary.severity-minor {
    background: rgba(184, 241, 59, 0.08);
    border-color: rgba(184, 241, 59, 0.24);
}

.market-shift-summary.severity-notable {
    background: rgba(184, 241, 59, 0.12);
    border-color: rgba(184, 241, 59, 0.38);
    box-shadow: 0 18px 40px rgba(184, 241, 59, 0.12);
}

.market-shift-summary.severity-major {
    background: linear-gradient(135deg, rgba(184, 241, 59, 0.18), rgba(133, 193, 29, 0.1));
    border-color: rgba(184, 241, 59, 0.5);
    box-shadow: 0 20px 46px rgba(184, 241, 59, 0.16);
}

.market-shift-summary-top,
.market-shift-toast-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.market-shift-summary-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.market-shift-action-row {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.market-shift-action-row .view-button,
.market-shift-action-row .ghost-button {
    min-height: 42px;
}

.market-shift-summary-actions .view-button,
.market-shift-toast-actions .view-button {
    padding: 11px 16px;
}

.market-shift-summary-actions .ghost-button,
.market-shift-toast-actions .ghost-button {
    padding: 11px 16px;
}

.market-shift-summary-title,
.market-shift-toast-title {
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.35;
}

.market-shift-badge {
    position: relative;
    z-index: 1;
    border-color: transparent;
}

.market-shift-badge.severity-minor {
    background: rgba(184, 241, 59, 0.12);
    color: #eefccb;
}

.market-shift-badge.severity-notable {
    background: rgba(184, 241, 59, 0.18);
    color: #f6ffd8;
}

.market-shift-badge.severity-major {
    background: rgba(239, 252, 203, 0.16);
    color: #fcffea;
    box-shadow: 0 0 0 1px rgba(239, 252, 203, 0.18);
}

.market-summary-title {
    margin-bottom: 6px;
    color: var(--accent);
    font-size: 0.84rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.market-shift-toast {
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    width: min(380px, calc(100vw - 24px));
    padding: 18px 18px 18px 20px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(184, 241, 59, 0.18), rgba(184, 241, 59, 0) 42%),
        rgba(14, 23, 37, 0.97);
    border: 1px solid rgba(184, 241, 59, 0.34);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.38),
        0 10px 24px rgba(184, 241, 59, 0.1);
    backdrop-filter: blur(14px);
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    z-index: 40;
}

.capacitor-recovery-shell[hidden] {
    display: none !important;
}

.capacitor-recovery-shell {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #071019;
}

html.capacitor-shell.capacitor-shell-fallback-visible .capacitor-recovery-shell {
    display: flex;
}

.capacitor-recovery-card {
    width: min(420px, 100%);
    padding: 24px;
    border-radius: var(--radius-xl);
    background: #0d1725;
    border: 1px solid rgba(184, 241, 59, 0.22);
    box-shadow: var(--shadow);
}

.capacitor-recovery-kicker {
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.capacitor-recovery-card h2 {
    margin: 12px 0 10px;
    font-size: 1.5rem;
    line-height: 1.1;
}

.capacitor-recovery-text,
.capacitor-recovery-status {
    color: var(--muted);
    line-height: 1.6;
}

.capacitor-recovery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.capacitor-recovery-status {
    margin-top: 16px;
    font-size: 0.92rem;
}

.market-shift-toast.severity-minor {
    border-color: rgba(184, 241, 59, 0.28);
}

.market-shift-toast.severity-notable {
    background:
        radial-gradient(circle at top right, rgba(204, 255, 107, 0.24), rgba(204, 255, 107, 0) 42%),
        rgba(14, 23, 37, 0.98);
    border-color: rgba(184, 241, 59, 0.42);
    box-shadow: 0 28px 80px rgba(184, 241, 59, 0.14);
}

.market-shift-toast.severity-major {
    background:
        radial-gradient(circle at top right, rgba(239, 252, 203, 0.26), rgba(239, 252, 203, 0) 44%),
        linear-gradient(135deg, rgba(24, 36, 56, 0.99), rgba(14, 23, 37, 0.97));
    border-color: rgba(184, 241, 59, 0.56);
    box-shadow:
        0 30px 90px rgba(184, 241, 59, 0.2),
        0 12px 28px rgba(239, 252, 203, 0.12);
}

.market-shift-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.market-shift-toast .market-summary-text {
    position: relative;
    z-index: 1;
    padding-right: 10px;
    color: rgba(239, 244, 252, 0.94);
}

.market-shift-toast-actions .ghost-button {
    background: rgba(255, 255, 255, 0.06);
}

.market-shift-toast.is-visible.severity-major {
    animation: marketShiftPulse 1.2s ease-out 2;
}

.market-shift-toast.is-visible.severity-notable {
    animation: marketShiftPulse 1.3s ease-out 1;
}

.market-shift-toast-close {
    padding: 6px 10px;
    border: 1px solid rgba(184, 241, 59, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #d4dec8;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.market-shift-toast-close:hover {
    color: var(--text);
    background: rgba(184, 241, 59, 0.12);
    border-color: rgba(184, 241, 59, 0.3);
}

.market-shift-toast-title {
    position: relative;
    z-index: 1;
    font-size: 1.02rem;
}

@keyframes marketShiftPulse {
    0% {
        box-shadow:
            0 0 0 0 rgba(184, 241, 59, 0.28),
            0 24px 70px rgba(0, 0, 0, 0.38);
    }
    65% {
        box-shadow:
            0 0 0 14px rgba(184, 241, 59, 0),
            0 30px 90px rgba(184, 241, 59, 0.16);
    }
    100% {
        box-shadow:
            0 0 0 18px rgba(184, 241, 59, 0),
            0 30px 90px rgba(184, 241, 59, 0.2);
    }
}

.featured-sponsor-section {
    margin-bottom: 18px;
    padding: 18px;
    border-color: rgba(255, 179, 0, 0.22);
    box-shadow:
        0 18px 50px rgba(255, 179, 0, 0.06),
        var(--shadow);
}

.featured-sponsor-subtitle {
    margin: 6px 0 0;
    font-size: 0.92rem;
}

.featured-sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.featured-sponsor-card {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 179, 0, 0.18);
    color: var(--text);
    text-align: left;
    box-shadow: 0 10px 28px rgba(255, 179, 0, 0.06);
}

.featured-sponsor-card:hover {
    border-color: rgba(255, 179, 0, 0.34);
    box-shadow: 0 16px 40px rgba(255, 179, 0, 0.12);
}

.featured-sponsor-visual {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.featured-sponsor-body {
    padding: 16px;
}

.featured-sponsor-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.featured-sponsor-name {
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 8px;
}

.featured-sponsor-meta {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.featured-sponsor-copy {
    margin-top: 10px;
    color: #dfe7f4;
    font-size: 0.88rem;
    line-height: 1.5;
}

.trending-section {
    margin-bottom: 18px;
    padding: 18px;
}

.trending-section-subtitle {
    margin: 6px 0 0;
    font-size: 0.92rem;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.trending-card {
    width: 100%;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    color: var(--text);
    overflow: hidden;
    text-align: left;
}

.trending-card:hover {
    border-color: rgba(184, 241, 59, 0.28);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
}

.trending-card-sponsored {
    border-color: rgba(255, 179, 0, 0.22);
    box-shadow: 0 12px 30px rgba(255, 179, 0, 0.06);
}

.trending-card-inner {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 12px;
    width: 100%;
    padding: 14px;
    align-items: center;
}

.trending-thumb {
    width: 84px;
    height: 84px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.trending-thumb img {
    width: 100%;
    height: 100%;
}

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

.trending-name {
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 6px;
}

.trending-meta {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.trending-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
}

.compare-panel {
    margin-bottom: 18px;
    padding: 18px;
}

.lease-protect-compare-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.lease-protect-compare-copy {
    margin-bottom: 14px;
}

.compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.compare-card {
    border-radius: 18px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
}

.compare-title {
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.3;
    margin: 14px 0;
}

.compare-metric {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
}

.compare-metric span {
    color: var(--muted);
}

.compare-metric strong {
    text-align: right;
}

.compare-flags {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.listing-card {
    border-radius: 24px;
    padding: 22px;
    transition: 0.18s ease;
}

.listing-card:hover {
    transform: translateY(-2px);
}

.listing-card-top {
    border-color: var(--border-strong);
    box-shadow:
        0 16px 50px rgba(184, 241, 59, 0.08),
        var(--shadow);
}

.sponsored-card {
    border-color: rgba(255, 179, 0, 0.24);
    box-shadow:
        0 14px 40px rgba(255, 179, 0, 0.06),
        var(--shadow);
}

.listing-card-toprow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.listing-rank {
    color: var(--accent);
    font-size: 0.92rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.listing-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.result-tag {
    background: var(--accent);
    color: #081019;
    font-size: 0.8rem;
    font-weight: 900;
    padding: 8px 12px;
}

.accent-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 8px 12px;
}

.neutral-badge {
    background: rgba(184, 241, 59, 0.08);
    border-color: rgba(184, 241, 59, 0.18);
    color: #ecfac8;
}

.sponsored-badge {
    background: linear-gradient(135deg, #ffd54f, #ffb300);
    color: #1a1a1a;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 8px 12px;
    letter-spacing: 0.04em;
    box-shadow: 0 8px 22px rgba(255, 179, 0, 0.45);
    border: none;
}

.sponsored-badge-small {
    font-size: 0.7rem;
    padding: 6px 9px;
    box-shadow: 0 5px 14px rgba(255, 179, 0, 0.35);
}

.listing-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
    align-items: start;
}

.listing-visual {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.listing-image,
.listing-image-fallback {
    width: 100%;
    height: 100%;
}

.listing-image-fallback span {
    font-size: 1.2rem;
}

.listing-heading-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.listing-title-wrap {
    max-width: 70%;
}

.listing-heading-row h3 {
    margin: 0;
    font-size: 1.38rem;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.sponsored-inline {
    margin-top: 6px;
    font-size: 0.75rem;
    color: #ffd54f;
    font-weight: 700;
    opacity: 0.95;
}

.listing-address {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.score-block {
    min-width: 92px;
    text-align: right;
}

.score-number {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.score-label {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.78rem;
}

.listing-tagline {
    margin: 12px 0 16px;
    color: #d9e3f1;
    font-size: 0.98rem;
}

.listing-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.meta-box {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
}

.meta-label {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    margin-bottom: 6px;
}

.meta-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.chip {
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: #e5edf8;
}

.card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.inline-form {
    margin: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.detail-column {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
}

.detail-title {
    margin-bottom: 10px;
    font-size: 0.88rem;
    font-weight: 900;
}

.detail-list {
    margin: 0;
    padding-left: 18px;
    color: #d9e3f1;
    line-height: 1.6;
}

.good-list li::marker {
    color: #7dffb8;
}

.tradeoff-list li::marker {
    color: #ff8787;
}

.card-footer {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.landlord-line {
    color: var(--muted);
    font-size: 0.92rem;
}

.landlord-line strong {
    color: var(--text);
}

.view-button {
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(184, 241, 59, 0.12);
    border: 1px solid rgba(184, 241, 59, 0.22);
    color: #effccb;
}

.empty-state {
    padding: 34px;
    text-align: center;
}

.empty-state h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

@media (max-width: 1180px) {
    .hero,
    .main-grid,
    .listing-layout {
        grid-template-columns: 1fr;
    }

    .filters-panel {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .listing-title-wrap {
        max-width: 100%;
    }

    .listing-visual {
        max-width: 360px;
    }

    .trending-grid,
    .featured-sponsor-grid {
        grid-template-columns: 1fr 1fr;
    }

    .main-grid.results-first-mobile {
        display: flex;
        flex-direction: column;
    }

    .main-grid.results-first-mobile .results-panel {
        order: 1;
    }

    .main-grid.results-first-mobile .filters-panel {
        order: 2;
    }
}

@media (max-width: 820px) {
    .page-shell {
        width: min(100% - 24px, 1440px);
    }

    .topbar,
    .listing-card-toprow,
    .listing-heading-row,
    .sidebar-section-header,
    .compare-panel-header,
    .trending-section-header,
    .results-header,
    .featured-sponsor-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-right {
        width: 100%;
        justify-content: flex-start;
    }

    .lease-protect-intent-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .score-block {
        text-align: left;
    }

    .hero-side-grid,
    .two-col,
    .listing-meta-grid,
    .detail-grid,
    .compare-grid,
    .trending-grid,
    .featured-sponsor-grid {
        grid-template-columns: 1fr;
    }

    .saved-item {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .brand-logo-shell {
        width: 82px;
        height: 82px;
        flex-basis: 82px;
    }

    .brand-logo {
        width: 82px;
        height: 82px;
        transform: scale(1.18);
    }

    .hero-main {
        padding: 28px;
    }

    .trending-card-inner {
        grid-template-columns: 72px 1fr;
    }

    .trending-thumb {
        width: 72px;
        height: 72px;
    }

    .mobile-jump-row {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin: -6px 0 16px;
    }

    .mobile-jump-link,
    .saved-link {
        min-height: 44px;
        padding: 12px 16px;
    }

    .ghost-button {
        min-height: 44px;
        padding: 12px 16px;
    }

    .small-button {
        min-height: 40px;
        padding: 10px 14px;
    }

.saved-link {
    width: 100%;
    justify-content: center;
}

    .results-first-mobile .filters-panel {
        padding-top: 20px;
    }

    .market-shift-summary-top,
    .market-shift-toast-head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .market-shift-toast {
        left: 12px;
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        width: auto;
        max-width: none;
    }
}

.premium-shell {
    padding-bottom: 56px;
}

.premium-topbar {
    margin-bottom: 22px;
}

.premium-nav-link {
    text-decoration: none;
}

.premium-hero,
.premium-side-card,
.premium-control-panel,
.premium-analysis-panel,
.premium-card,
.premium-score-card,
.premium-score-breakdown,
.premium-mini-card {
    background: var(--panel);
    border: 1px solid var(--border);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
}

.premium-hero,
.premium-control-panel,
.premium-analysis-panel,
.premium-card,
.premium-score-card,
.premium-score-breakdown,
.premium-mini-card,
.premium-side-card {
    border-radius: var(--radius-xl);
}

.premium-hero {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 22px;
    margin-bottom: 22px;
    padding: 32px;
}

.premium-hero-main h1 {
    margin: 0;
    font-size: clamp(2.4rem, 4vw, 4.6rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    max-width: 11ch;
}

.premium-side-card {
    padding: 24px;
    height: 100%;
}

.premium-side-list {
    display: grid;
    gap: 16px;
    color: var(--muted);
    line-height: 1.6;
}

.premium-alert {
    margin-bottom: 16px;
    padding: 14px 18px;
    border-radius: 18px;
    font-weight: 700;
}

.premium-alert-error {
    background: rgba(255, 97, 97, 0.12);
    border: 1px solid rgba(255, 97, 97, 0.22);
    color: #ffc7c7;
}

.premium-alert-success {
    background: rgba(184, 241, 59, 0.12);
    border: 1px solid rgba(184, 241, 59, 0.22);
    color: #efffc6;
}

.premium-main-grid {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 22px;
}

.premium-control-panel,
.premium-analysis-panel {
    padding: 26px;
}

.premium-analysis-panel {
    display: grid;
    gap: 18px;
}

.premium-form {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

.premium-context-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.premium-unlock-form {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.premium-field-note {
    color: var(--muted);
    display: block;
    margin-top: 8px;
    font-size: 0.84rem;
}

.premium-fact-reason {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.premium-form input[type="file"],
.premium-form input[type="password"],
.premium-form textarea {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    padding: 14px 16px;
    font: inherit;
    font-size: 1rem;
}

.premium-form input[type="file"] {
    min-height: 54px;
    line-height: 1.4;
}

.premium-form textarea {
    min-height: 200px;
    resize: vertical;
}

.premium-upload-helper {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(184, 241, 59, 0.16);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    line-height: 1.55;
}

.premium-upload-helper strong {
    color: #efffc6;
}

.primary-button,
.ghost-button {
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
}

.primary-button {
    border: none;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--accent), #d6ff7a);
    color: #071019;
    cursor: pointer;
    box-shadow: 0 18px 36px rgba(184, 241, 59, 0.18);
}

.primary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.premium-mini-card {
    padding: 20px;
}

.premium-step-list {
    margin: 14px 0 0;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.8;
}

.premium-priority-stack {
    display: grid;
    gap: 18px;
}

.premium-score-card,
.premium-score-breakdown,
.premium-priority-card {
    padding: 24px;
}

.premium-score-card-dominant {
    padding: 28px;
    background:
        radial-gradient(circle at top left, rgba(184, 241, 59, 0.12), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(184, 241, 59, 0.18);
    box-shadow: 0 24px 48px rgba(7, 16, 25, 0.28);
}

.premium-kicker {
    color: var(--accent);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.premium-score-number {
    margin-top: 0;
    font-size: 4.4rem;
    line-height: 0.9;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.premium-risk-chip {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(184, 241, 59, 0.1);
    border: 1px solid rgba(184, 241, 59, 0.2);
    color: #eefecf;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.premium-score-card p {
    margin: 16px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.premium-score-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-top: 14px;
}

.premium-score-copy {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.premium-score-verdict {
    max-width: 320px;
    margin: 0;
    color: #f4f7fb;
    text-align: right;
    font-size: 1rem;
    line-height: 1.45;
}

.premium-score-scale {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.premium-context-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.premium-result-snapshot {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.premium-score-cta {
    margin-top: 16px;
    display: grid;
    gap: 8px;
    justify-items: start;
}

.premium-score-cta-button {
    min-height: 48px;
    padding: 0 18px;
    font-weight: 800;
    box-shadow: 0 16px 28px rgba(184, 241, 59, 0.16);
}

.premium-copy-note {
    color: rgba(238, 254, 207, 0.78);
    line-height: 1.45;
}

.premium-result-card {
    border-radius: 20px;
    border: 1px solid rgba(184, 241, 59, 0.24);
    background: linear-gradient(180deg, rgba(184, 241, 59, 0.1), rgba(255, 255, 255, 0.03));
    padding: 16px 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.premium-result-card-button {
    width: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.premium-result-card span {
    display: block;
    color: rgba(238, 254, 207, 0.82);
    font-size: 0.76rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.premium-result-card strong {
    display: block;
    color: #f5f8df;
    line-height: 1.45;
    font-size: 1rem;
}

.premium-result-card small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.45;
}

.premium-score-meta-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.premium-score-meta-row div {
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 14px;
}

.premium-score-meta-row span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    margin-bottom: 6px;
}

.premium-score-meta-row strong {
    font-size: 1rem;
}

.premium-breakdown-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.premium-breakdown-row:last-child {
    border-bottom: none;
}

.premium-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.premium-card {
    padding: 22px;
}

.premium-action-intro {
    margin-top: -4px;
    margin-bottom: 14px;
}

.premium-warning-card {
    padding: 22px;
    border-color: rgba(255, 120, 120, 0.34);
    background: linear-gradient(180deg, rgba(90, 24, 24, 0.42), rgba(24, 11, 11, 0.9));
    box-shadow: 0 18px 42px rgba(120, 28, 28, 0.22);
}

.premium-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.premium-card-header h2 {
    margin: 0;
    font-size: 1.08rem;
}

.premium-card-header-tight {
    margin-bottom: 14px;
}

.accent-badge-urgent {
    background: rgba(255, 97, 97, 0.16);
    border: 1px solid rgba(255, 97, 97, 0.32);
    color: #ffd7d7;
}

.premium-flag-card,
.premium-clause-card {
    border-radius: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.premium-flag-card + .premium-flag-card,
.premium-clause-card + .premium-clause-card {
    margin-top: 12px;
}

.premium-flag-card-interactive {
    cursor: pointer;
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.premium-flag-card-interactive:hover {
    transform: translateY(-1px);
    border-color: rgba(184, 241, 59, 0.22);
    background: rgba(255, 255, 255, 0.05);
}

.premium-flag-high {
    border-color: rgba(255, 153, 51, 0.28);
}

.premium-flag-medium {
    border-color: rgba(255, 208, 89, 0.24);
}

.premium-flag-critical {
    border-color: rgba(255, 97, 97, 0.3);
}

.premium-flag-header,
.premium-clause-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.premium-flag-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.premium-flag-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(184, 241, 59, 0.1);
    border: 1px solid rgba(184, 241, 59, 0.18);
    color: #eefecf;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.premium-flag-card p,
.premium-clause-card p,
.premium-summary-copy {
    color: var(--muted);
    line-height: 1.65;
}

.premium-issue-impact {
    margin: 8px 0 0;
    color: #f5f8df;
    line-height: 1.5;
    font-size: 0.98rem;
}

.premium-flag-micro {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.82rem;
}

.premium-copy-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.premium-copy-toolbar-split {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.premium-copy-edit-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.premium-inline-button {
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #f4f7fb;
    cursor: pointer;
}

@media (max-width: 760px) {
    .premium-context-grid,
    .premium-result-snapshot {
        grid-template-columns: 1fr;
    }

    .premium-score-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .premium-score-copy {
        justify-items: start;
    }

    .premium-score-verdict {
        text-align: left;
        max-width: none;
    }
}

.premium-fact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.premium-fact-grid-single {
    grid-template-columns: 1fr;
}

.premium-fact-grid div {
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
}

.premium-fact-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 8px;
}

.premium-fact-summary-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.premium-fact-summary-item {
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    padding: 14px 15px;
}

.premium-fact-summary-item span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.premium-action-copy {
    white-space: pre-wrap;
    margin: 0;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(7, 16, 25, 0.65);
    padding: 16px;
    color: var(--text);
    line-height: 1.6;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    overflow-x: auto;
}

.premium-action-copy-compact {
    line-height: 1.5;
}

.premium-action-editor {
    width: 100%;
    min-height: 260px;
    border-radius: 18px;
    border: 1px solid rgba(184, 241, 59, 0.18);
    background: rgba(7, 16, 25, 0.74);
    padding: 16px;
    color: var(--text);
    line-height: 1.6;
    font: inherit;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    resize: vertical;
}

.premium-copy-note-tight {
    margin-top: 10px;
}

.premium-action-list {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--muted);
}

.premium-action-priority-card {
    border-color: rgba(184, 241, 59, 0.2);
}

.premium-next-step-list {
    display: grid;
    gap: 12px;
}

.premium-next-step-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    border-radius: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
}

.premium-next-step-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(184, 241, 59, 0.14);
    border: 1px solid rgba(184, 241, 59, 0.22);
    color: #f0ffd0;
    font-weight: 900;
}

.premium-next-step-card p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.premium-warning-list {
    display: grid;
    gap: 10px;
    color: #fff0c7;
}

.premium-warning-lead {
    margin: 0 0 14px;
    color: #ffd8d8;
    line-height: 1.55;
    font-weight: 700;
}

.premium-warning-list div,
.premium-detail-card,
.premium-clause-group {
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
}

.premium-warning-list div + div,
.premium-detail-card + .premium-detail-card,
.premium-clause-group + .premium-clause-group {
    margin-top: 12px;
}

.premium-warning-list div {
    border-color: rgba(255, 120, 120, 0.24);
    background: rgba(255, 255, 255, 0.05);
}

.premium-detail-meta {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.premium-detail-meta span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.premium-detail-meta strong {
    line-height: 1.55;
}

.premium-clause-group-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

@media (max-width: 1100px) {
    .premium-main-grid,
    .premium-dashboard-grid,
    .premium-hero {
        grid-template-columns: 1fr;
    }

    .premium-score-meta-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .premium-fact-grid,
    .premium-fact-summary-list,
    .premium-score-meta-row {
        grid-template-columns: 1fr;
    }

    .premium-control-panel,
    .premium-analysis-panel,
    .premium-hero {
        padding: 22px;
    }

    .premium-card-header,
    .premium-flag-header,
    .premium-clause-group-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 760px) {
    input,
    select,
    textarea,
    .premium-form input[type="file"],
    .premium-form input[type="password"],
    .premium-form textarea {
        font-size: 16px;
    }

    .primary-button,
    .ghost-button,
    .view-button,
    .saved-link {
        min-height: 46px;
        touch-action: manipulation;
    }
}
